Avoid crash in print_ada_task_info
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-11-22 Tom Tromey <tromey@adacore.com>
2
3 * gdb.ada/tasks.exp: Add -ada-task-info regression test.
4 * gdb.ada/tasks/foo.adb: Add another stopping location.
5
6 2019-11-20 Luis Machado <luis.machado@linaro.org>
7
8 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
9 instead of register count.
10 * tdesc.c (tdesc_contains_feature): New function.
11 * tdesc.h (tdesc_contains_feature): New prototype.
12
13 2019-11-15 Christian Biesinger <cbiesinger@google.com>
14
15 * Makefile.in: Add safe-strerror.c.
16 * configure: Regenerate.
17 * configure.ac: Don't source common.host.
18
19 2019-11-15 Christian Biesinger <cbiesinger@google.com>
20
21 * config.in: Regenerate.
22 * configure: Regenerate.
23
24 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
25
26 * ax.c (ax_printf): Handle size_t_arg.
27
28 2019-11-06 Christian Biesinger <cbiesinger@google.com>
29
30 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
31 * mi/mi-main.c (output_cores): Likewise.
32 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
33 (linux_xfer_osdata_modules): Likewise.
34 * remote.c (register_remote_support_xml): Likewise.
35 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
36 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
37
38 2019-11-01 Christian Biesinger <cbiesinger@google.com>
39
40 * configure: Regenerate.
41 * configure.ac: Remove check for strerror_r.
42
43 2019-10-31 Christian Biesinger <cbiesinger@google.com>
44
45 * config.in: Regenerate.
46 * configure: Regenerate.
47 * configure.ac: Also check for strerror_r.
48
49 2019-10-31 Christian Biesinger <cbiesinger@google.com>
50
51 * ax.h (debug_agent): Remove duplicate declaration.
52
53 2019-10-26 Tom de Vries <tdevries@suse.de>
54
55 * linux-aarch64-low.c: Fix typos in comments.
56 * linux-arm-low.c: Same.
57 * linux-low.c: Same.
58 * linux-ppc-low.c: Same.
59 * proc-service.c: Same.
60 * regcache.h: Same.
61 * server.c: Same.
62 * tracepoint.c: Same.
63 * win32-low.c: Same.
64
65 2019-10-25 Tom Tromey <tromey@adacore.com>
66
67 * utils.c (xstrdup): Remove.
68
69 2019-10-23 Tom Tromey <tom@tromey.com>
70
71 * configure, config.in: Rebuild.
72
73 2019-10-23 Tom Tromey <tom@tromey.com>
74
75 * configure: Rebuild.
76 * acinclude.m4: Use m4_include, not sinclude.
77
78 2019-10-17 Tom Tromey <tromey@adacore.com>
79
80 * configure: Rebuild.
81 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
82 in AC_CONFIG_FILES invocation.
83 * Makefile.in (stamp-h, Makefile): Use new-style config.status
84 invocation.
85
86 2019-10-16 Christian Biesinger <cbiesinger@google.com>
87
88 * server.c: Include xml-builtin.h.
89 (get_xml_features): Don't declare xml_builtins here.
90
91 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
92
93 * Makefile.in: Remove references to vec-ipa.o.
94
95 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
96
97 * Makefile.in: Remove references to vec.c.
98
99 2019-10-02 Christian Biesinger <cbiesinger@google.com>
100
101 * server.c (server_waiting): Change to bool.
102 (extended_protocol): Likewise.
103 (response_needed): Likewise.
104 (exit_requested): Likewise.
105 (run_once): Likewise.
106 (report_no_resumed): Likewise.
107 (non_stop): Likewise.
108 (disable_packet_vCont): Likewise.
109 (disable_packet_Tthread): Likewise.
110 (disable_packet_qC): Likewise.
111 (disable_packet_qfThreadInfo): Likewise.
112 (handle_general_set): Update.
113 (handle_detach): Update.
114 (handle_monitor_command): Update.
115 (handle_query): Update.
116 (captured_main): Update.
117 (process_serial_event): Update.
118 * server.h (server_waiting): Change to bool.
119 (disable_packet_vCont): Likewise.
120 (disable_packet_Tthread): Likewise.
121 (disable_packet_qC): Likewise.
122 (disable_packet_qfThreadInfo): Likewise.
123 (run_once): Likewise.
124 (non_stop): Likewise.
125 * target.c (target_stop_and_wait): Update.
126
127 2019-10-02 Tom Tromey <tromey@adacore.com>
128
129 * Makefile.in (SFILES): Add common-inferior.c.
130 (OBS): Add common-inferior.o.
131 * server.c (startup_with_shell): Don't define.
132
133 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
134
135 * linux-low.c (linux_low_read_btrace): Update for change to
136 std::vector.
137
138 2019-09-20 Christian Biesinger <cbiesinger@google.com>
139
140 * debug.c (debug_threads): Remove comment in favor of the header.
141 * debug.h (using_threads): Add declaration.
142 (debug_threads): Add comment.
143 * linux-aarch64-low.c: Include debug.h and remove declaration of
144 debug_threads.
145 * nto-low.c: Likewise.
146 * remote-utils.c: Likewise.
147 * thread-db.c: Likewise.
148
149 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
150
151 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
152 and powerpc-cell64l-ipa.o.
153 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
154 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
155 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
156 (spu*-*-*): Remove.
157
158 * spu-low.c: Remove file.
159
160 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
161 (parse_spufs_run): Remove.
162 (ppc_get_pc): Remove Cell/B.E. support.
163 (ppc_set_pc): Likewise.
164 (ppc_breakpoint_at): Likewise.
165 (ppc_arch_setup): Likewise.
166 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
167 tdesc_powerpc_cell32l.
168 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
169 or init_registers_powerpc_cell32l.
170 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
171 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
172 or init_registers_powerpc_cell32l.
173 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
174 (init_registers_powerpc_cell32l): Remove prototype.
175 (init_registers_powerpc_cell64l): Likewise.
176
177 * target.h (struct target_ops): Remove qxfer_spu member.
178 * server.c (handle_qxfer_spu): Remove.
179 (qxfer_packets): Remove entry for "spu".
180 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
181 * linux-low.c (SPUFS_MAGIC): Remove.
182 (spu_enumerate_spu_ids): Remove.
183 (linux_qxfer_spu): Remove.
184 (linux_target_ops): Remove qxfer_spu member.
185 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
186 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
187 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
188
189 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
190
191 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
192 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
193 * config.in: Regenerate.
194 * configure: Regenerate.
195
196 2019-08-15 Tom Tromey <tromey@adacore.com>
197
198 * target.c (target_write_memory): Use gdb::byte_vector.
199
200 2019-08-15 Tom Tromey <tromey@adacore.com>
201
202 * tracepoint.c (write_inferior_data_pointer)
203 (write_inferior_integer, write_inferior_int8)
204 (write_inferior_uinteger, m_tracepoint_action_download)
205 (r_tracepoint_action_download, x_tracepoint_action_download)
206 (l_tracepoint_action_download, clear_inferior_trace_buffer)
207 (download_agent_expr, download_tracepoint_1)
208 (download_trace_state_variables, upload_fast_traceframes): Update.
209 * server.c (gdb_write_memory): Update.
210 * remote-utils.c (relocate_instruction): Update.
211 * proc-service.c (ps_pdwrite): Update.
212 * mem-break.c (remove_memory_breakpoint)
213 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
214 (uninsert_fast_tracepoint_jumps_at)
215 (reinsert_fast_tracepoint_jumps_at): Update.
216 * linux-x86-low.c (append_insns)
217 (i386_install_fast_tracepoint_jump_pad)
218 (amd64_write_goto_address, i386_write_goto_address): Update.
219 * linux-s390-low.c (append_insns, s390_write_goto_address):
220 Update.
221 * linux-ppc-low.c (ppc_relocate_instruction)
222 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
223 (ppc_write_goto_address): Update.
224 * linux-aarch64-low.c (append_insns): Update.
225 * target.h (struct target_ops): Update.
226 (write_inferior_memory): Don't declare.
227 * target.c (target_write_memory): Rename from
228 write_inferior_memory. Remove old target_write_memory.
229
230 2019-08-15 Tom Tromey <tromey@adacore.com>
231
232 * target.c (write_inferior_memory): Use std::vector.
233
234 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
235
236 PR build/24886
237 * configure.ac: Drop enable-libmcheck support.
238 * configure, config.in: Rebuild.
239 * acinclude.m4: Don't include it.
240
241 2019-07-19 Alan Hayward <alan.hayward@arm.com>
242
243 * configure.srv: Remove Arm xml files.
244
245 2019-07-19 Alan Hayward <alan.hayward@arm.com>
246
247 * configure.srv: Add new files. Remove xml generated files.
248 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
249 registers.
250 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
251 * linux-aarch32-tdesc.c: New file.
252 * linux-aarch32-tdesc.h: New file.
253 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
254 * linux-arm-low.c (init_registers_arm, tdesc_arm)
255 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
256 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
257 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
258 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
259 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
260 (arm_read_description): Call arm_linux_read_description.
261 (initialize_low_arch): Don't init registers.
262 * linux-arm-tdesc.c: New file.
263 * linux-arm-tdesc.h: New file.
264
265 2019-07-10 Alan Hayward <alan.hayward@arm.com>
266
267 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
268 Move counter inside for.
269 (arm_read_description): Check ptrace earlier.
270 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
271
272 2019-07-09 Tom Tromey <tom@tromey.com>
273
274 * configure: Rebuild.
275 * configure.ac: Change common to gdbsupport.
276 * acinclude.m4: Change common to gdbsupport.
277 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
278 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
279 common to gdbsupport.
280 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
281 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
282 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
283 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
284 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
285 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
286 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
287 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
288 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
289 common to gdbsupport.
290
291 2019-07-04 Alan Hayward <alan.hayward@arm.com>
292
293 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
294 defines.
295 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
296
297 2019-07-04 Alan Hayward <alan.hayward@arm.com>
298
299 * configure.srv: Remove legacy xml.
300 * linux-aarch64-low.c (initialize_low_arch): Remove
301 initialize_low_tdesc call.
302 * linux-aarch64-tdesc-selftest.c: Remove file.
303 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
304 * linux-x86-low.c (initialize_low_arch): Remove
305 initialize_low_tdesc call.
306 * linux-x86-tdesc-selftest.c: Remove file.
307 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
308
309 2019-06-20 Tom de Vries <tdevries@suse.de>
310
311 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
312 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
313
314 2019-06-19 Tom de Vries <tdevries@suse.de>
315
316 * debug.h (debug_write): Change return type to ssize_t.
317 * debug.c (debug_write): Same.
318
319 2019-06-14 Tom Tromey <tom@tromey.com>
320
321 * configure.ac: Use new path to gnulib.
322 * configure: Rebuild.
323 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
324 to gnulib.
325
326 2019-06-11 Tom Tromey <tom@tromey.com>
327
328 * Makefile.in (SFILES): Add alloc.c.
329 (OBS): Add alloc.o.
330 (IPA_OBJS): Add alloc-ipa.o.
331 (alloc-ipa.o): New target.
332 (%.o: ../%.c): New pattern rule.
333
334 2019-06-10 Tom Tromey <tromey@adacore.com>
335
336 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
337 end warning with a newline.
338 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
339 newline.
340 * thread-db.c (attach_thread): Don't end warning with a newline.
341 (thread_db_notice_clone): Likewise.
342 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
343 newline.
344 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
345 end warning with a newline.
346
347 2019-06-04 Pedro Alves <palves@redhat.com>
348
349 * server.c (captured_main): Use make_unique_xstrdup.
350
351 2019-06-02 Tom Tromey <tom@tromey.com>
352
353 * gdbreplay.c (fromhex): Remove.
354 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
355
356 2019-05-29 Tom Tromey <tromey@adacore.com>
357
358 * configure: Rebuild.
359
360 2019-05-06 Kevin Buettner <kevinb@redhat.com>
361
362 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
363 sign extension code on 32-bit builds.
364
365 2019-05-03 Eli Zaretskii <eliz@gnu.org>
366
367 * remote-utils.c:
368 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
369
370 2019-04-19 Tom Tromey <tom@tromey.com>
371
372 * server.c (struct vstop_notif): Derive from notif_event.
373 <base>: Remove.
374 (queue_stop_reply): Update.
375 (remove_all_on_match_ptid): Change type. Rewrite.
376 (discard_queued_stop_replies): Rewrite.
377 (in_queued_stop_replies_ptid): Change type.
378 (in_queued_stop_replies): Rewrite.
379 (notif_stop): Update.
380 (queue_stop_reply_callback): Update.
381 (captured_main): Don't call initialize_notif.
382 (push_stop_notification): Update.
383 * notif.c (notif_write_event, handle_notif_ack)
384 (notif_event_enque, notif_push): Update.
385 (notif_event_xfree, initialize_notif): Remove.
386 * notif.h (struct notif_event): Include <list>, not
387 "common/queue.h".
388 (struct notif_server) <queue>: Now a std::list.
389 (notif_event_p): Remove typedef.
390 (initialize_notif): Don't declare.
391 (struct notif_event): Add virtual destructor.
392
393 2019-04-17 Alan Hayward <alan.hayward@arm.com>
394
395 * ax.c (ax_vdebug): Call debug_printf.
396 * debug.c (debug_write): New function.
397 * debug.h (debug_write): New declaration.
398 * linux-low.c (sigchld_handler): Call debug_write.
399
400 2019-04-17 Alan Hayward <alan.hayward@arm.com>
401
402 * debug.c (debug_set_output): New function.
403 (debug_vprintf): Send output to debug_file.
404 (debug_flush): Likewise.
405 * debug.h (debug_set_output): New declaration.
406 * server.c (handle_monitor_command): Add debug-file option.
407 (captured_main): Likewise.
408
409 2019-04-17 Alan Hayward <alan.hayward@arm.com>
410
411 * debug.c (remote_debug): Add definition.
412 * debug.h (remote_debug): Add declaration.
413 * hostio.c (remote_debug): Remove declaration.
414 * remote-utils.c (struct ui_file): Likewise.
415 (remote_debug): Likewise.
416 * remote-utils.h (remote_debug): Likewise,
417 * server.c (remote_debug): Remove definition.
418
419 2019-04-10 Kevin Buettner <kevinb@redhat.com>
420
421 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
422 when using a 64-bit gdbserver.
423
424 2019-04-09 Tom Tromey <tromey@adacore.com>
425
426 * linux-low.c (select_event_lwp): Use find_thread_in_random.
427
428 2019-04-08 Tom Tromey <tom@tromey.com>
429
430 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
431 throw.
432 (linux_resume_one_lwp): Likewise.
433
434 2019-04-08 Tom Tromey <tom@tromey.com>
435
436 * gdbreplay.c: Update.
437 * linux-low.c: Update.
438 * server.c: Update.
439
440 2019-04-08 Tom Tromey <tom@tromey.com>
441
442 * server.c: Use C++ exception handling.
443 * linux-low.c: Use C++ exception handling.
444 * gdbreplay.c: Use C++ exception handling.
445
446 2019-04-08 Tom Tromey <tom@tromey.com>
447
448 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
449 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
450 (captured_main, main): Update.
451 * gdbreplay.c (main): Update.
452
453 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
454
455 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
456 value in argument pointer, return 1 if the entry is found and 0
457 otherwise. Move comment.
458 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
459 * linux-low.h (linux_get_auxv): Declare.
460 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
461
462 2019-04-05 Tom Tromey <tromey@adacore.com>
463
464 * server.c (gdbserver_usage): Use upper-case for metasyntactic
465 variables.
466
467 2019-03-28 Alan Hayward <alan.hayward@arm.com>
468
469 * linux-low.c (AT_HWCAP2): Add define if not already included.
470
471 2019-03-26 Alan Hayward <alan.hayward@arm.com>
472
473 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
474 (aarch64_arch_setup): Call linux_get_hwcap.
475 * linux-arm-low.c (arm_get_hwcap): Remove function.
476 (arm_read_description): Call linux_get_hwcap.
477 * linux-low.c (linux_get_auxv): New function.
478 (linux_get_hwcap): Likewise.
479 (linux_get_hwcap2): Likewise.
480 * linux-low.h (linux_get_hwcap): New declaration.
481 (linux_get_hwcap2): Likewise.
482 * linux-ppc-low.c (ppc_get_auxv): Remove function.
483 (ppc_arch_setup): Call linux_get_hwcap.
484 * linux-s390-low.c (s390_get_hwcap): Remove function.
485 (s390_arch_setup): Call linux_get_hwcap.
486
487 2019-03-22 Alan Hayward <alan.hayward@arm.com>
488 Jiong Wang <jiong.wang@arm.com>
489
490 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
491 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
492 to fail.
493 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
494
495 2019-03-22 Alan Hayward <alan.hayward@arm.com>
496 Jiong Wang <jiong.wang@arm.com>
497
498 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
499 (aarch64_get_hwcap): New function.
500 (aarch64_arch_setup): Read APIA hwcap.
501
502 2019-03-22 Alan Hayward <alan.hayward@arm.com>
503 Jiong Wang <jiong.wang@arm.com>
504
505 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
506 (initialize_low_tracepoint): Likewise.
507 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
508 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
509 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
510 (aarch64_linux_read_description): Likewise.
511 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
512
513 2019-03-12 John Baldwin <jhb@FreeBSD.org>
514
515 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
516 i386_create_target_description for 'segments' parameter.
517 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
518 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
519 * win32-i386-low.c (i386_arch_setup): Likewise.
520
521 2019-03-12 Tom Tromey <tromey@adacore.com>
522
523 * linux-low.c (iterate_over_lwps): Update.
524
525 2019-03-06 Tom Tromey <tom@tromey.com>
526
527 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
528 (captured_main): Use SCOPE_EXIT.
529
530 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
531
532 * configure.srv: Use '$enable_unittest' instead of '$development'
533 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
534 case.
535
536 2019-02-27 Tom Tromey <tromey@adacore.com>
537
538 * gdbreplay.c (logchar): Handle \r\n.
539
540 2019-02-07 Alan Hayward <alan.hayward@arm.com>
541
542 * linux-low.c (linux_attach): Add process before lwp.
543 * server.c (attach_inferior): Check if already attached.
544
545 2019-02-07 Tom Tromey <tom@tromey.com>
546
547 * x86-tdesc.h: Rename include guard.
548 * x86-low.h: Add include guard.
549 * wincecompat.h: Rename include guard.
550 * win32-low.h: Add include guard.
551 * utils.h: Rename include guard.
552 * tracepoint.h: Rename include guard.
553 * tdesc.h: Rename include guard.
554 * target.h: Rename include guard.
555 * server.h: Rename include guard.
556 * remote-utils.h: Rename include guard.
557 * regcache.h: Rename include guard.
558 * nto-low.h: Rename include guard.
559 * notif.h: Add include guard.
560 * mem-break.h: Rename include guard.
561 * lynx-low.h: Add include guard.
562 * linux-x86-tdesc.h: Add include guard.
563 * linux-s390-tdesc.h: Add include guard.
564 * linux-ppc-tdesc-init.h: Add include guard.
565 * linux-low.h: Add include guard.
566 * linux-aarch64-tdesc.h: Add include guard.
567 * linux-aarch32-low.h: Add include guard.
568 * inferiors.h: Rename include guard.
569 * i387-fp.h: Rename include guard.
570 * hostio.h: Rename include guard.
571 * gdbthread.h: Rename include guard.
572 * gdb_proc_service.h: Rename include guard.
573 * event-loop.h: Rename include guard.
574 * dll.h: Rename include guard.
575 * debug.h: Rename include guard.
576 * ax.h: Rename include guard.
577
578 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
579
580 PR gdb/23985
581 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
582 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
583
584 2019-01-25 Tom Tromey <tom@tromey.com>
585
586 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
587
588 2019-01-25 Tom Tromey <tom@tromey.com>
589
590 * win32-low.c: Fix common/ includes.
591 * win32-i386-low.c: Fix common/ includes.
592 * tracepoint.c: Fix common/ includes.
593 * thread-db.c: Fix common/ includes.
594 * target.h: Fix common/ includes.
595 * symbol.c: Fix common/ includes.
596 * spu-low.c: Fix common/ includes.
597 * server.h: Fix common/ includes.
598 * server.c: Fix common/ includes.
599 * remote-utils.c: Fix common/ includes.
600 * regcache.h: Fix common/ includes.
601 * regcache.c: Fix common/ includes.
602 * nto-x86-low.c: Fix common/ includes.
603 * notif.h: Fix common/ includes.
604 * mem-break.h: Fix common/ includes.
605 * lynx-low.c: Fix common/ includes.
606 * lynx-i386-low.c: Fix common/ includes.
607 * linux-x86-tdesc-selftest.c: Fix common/ includes.
608 * linux-x86-low.c: Fix common/ includes.
609 * linux-low.c: Fix common/ includes.
610 * inferiors.h: Fix common/ includes.
611 * i387-fp.c: Fix common/ includes.
612 * hostio.c: Fix common/ includes.
613 * hostio-errno.c: Fix common/ includes.
614 * gdbthread.h: Fix common/ includes.
615 * gdbreplay.c: Fix common/ includes.
616 * fork-child.c: Fix common/ includes.
617 * event-loop.c: Fix common/ includes.
618 * ax.c:
619 (enum gdb_agent_op): Fix common/ includes.
620
621 2019-01-21 Tom Tromey <tom@tromey.com>
622
623 * tracepoint.c: Fix includes.
624 * remote-utils.c: Fix includes.
625 * linux-x86-low.c: Fix includes.
626
627 2019-01-01 Joel Brobecker <brobecker@adacore.com>
628
629 * gdbreplay.c (gdbreplay_version): Update copyright year in
630 version message.
631 * server.c (gdbserver_version): Likewise.
632
633 2018-12-05 Alan Hayward <alan.hayward@arm.com>
634
635 * linux-low.c (add_lwp): Switch ordering.
636
637 2018-11-29 Tom Tromey <tom@tromey.com>
638
639 * win32-low.c (win32_join): Take pid, not process.
640 * target.h (struct target_ops) <join>: Change argument type.
641 (join_inferior): Change argument name.
642 * spu-low.c (spu_join): Take pid, not process.
643 * server.c (handle_detach): Preserve pid before destroying
644 process.
645 * lynx-low.c (lynx_join): Take pid, not process.
646 * linux-low.c (linux_join): Take pid, not process.
647
648 2018-11-23 Alan Hayward <alan.hayward@arm.com>
649
650 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
651 (aarch64_cannot_fetch_register): Likewise.
652 (struct linux_target_ops): Update references.
653
654 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
655
656 * linux-ppc-low.c: Include nat/linux-ptrace.h.
657
658 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
659
660 * configure.srv (ipa_ppc_linux_regobj): Add
661 powerpc-isa207-htm-vsx32l-ipa.o and
662 powerpc-isa207-htm-vsx64l-ipa.o.
663 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
664 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
665 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
666 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
667 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
668 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
669 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
670 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
671 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
672 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
673 (init_registers_powerpc_isa207_htm_vsx32l)
674 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
675 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
676 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
677 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
678 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
679 (ppc_store_tm_ctarregset): New functions.
680 (ppc_regsets): Add entries for HTM regsets.
681 (ppc_arch_setup): Set htm in features struct when needed. Set
682 sizes for the HTM regsets.
683 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
684 (initialize_low_arch): Call
685 init_registers_powerpc_isa207_htm_vsx32l and
686 init_registers_powerpc_isa207_htm_vsx64l.
687 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
688 PPC_TDESC_ISA207_HTM_VSX.
689 (initialize_low_tracepoint): Call
690 init_registers_powerpc_isa207_htm_vsx32l and
691 init_registers_powerpc_isa207_htm_vsx64l.
692
693 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
694
695 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
696 rs6000/power-linux-pmu.xml to srv_xmlfiles.
697 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
698 (ppc_store_pmuregset): New functions.
699 (ppc_regsets): Add entries for ebb and pmu regsets.
700 (ppc_arch_setup): Set isa207 in features struct if the ebb and
701 pmu regsets are available. Set sizes for these regsets.
702
703 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
704
705 * configure.srv (ipa_ppc_linux_regobj): Add
706 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
707 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
708 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
709 rs6000/powerpc-isa207-vsx32l.xml, and
710 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
711 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
712 <PPC_TDESC_ISA207_VSX>: New enum value.
713 (init_registers_powerpc_isa207_vsx32l): Declare.
714 (init_registers_powerpc_isa207_vsx64l): Declare.
715 * linux-ppc-low.c (ppc_fill_tarregset): New function.
716 (ppc_store_tarregset): New function.
717 (ppc_regsets): Add entry for the TAR regset.
718 (ppc_arch_setup): Set isa207 in features struct when needed. Set
719 size for the TAR regsets.
720 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
721 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
722 and init_registers_powerpc_isa207_vsx64l.
723 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
724 (initialize_low_tracepoint): Call
725 init_registers_powerpc_isa207_vsx32l and
726 init_registers_powerpc_isa207_vsx64l.
727
728 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
729 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
730
731 * configure.srv (ipa_ppc_linux_regobj): Add
732 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
733 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
734 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
735 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
736 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
737 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
738 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
739 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
740 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
741 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
742 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
743 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
744 (ppc_hwcap): Add comment.
745 (ppc_hwcap2): New global.
746 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
747 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
748 (ppc_regsets): Add entries for the DSCR and PPR regsets.
749 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
750 when needed. Set sizes for the the DSCR and PPR regsets.
751 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
752 (initialize_low_arch): Call
753 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
754 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
755 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
756 PPC_TDESC_ISA205_PPR_DSCR_VSX.
757 (initialize_low_tracepoint): Call
758 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
759 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
760
761 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
762
763 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
764
765 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
766 Simon Marchi <simark@simark.ca>
767
768 * acinclude.m4: Include "../selftest.m4".
769 * configure: Regenerate.
770 * configure.ac: Use "GDB_AC_SELFTEST".
771 * configure.srv: Use "$enable_unittests" instead of
772 "$development" when checking whether unit tests have been
773 enabled.
774 * server.c (captured_main): Update message informing that
775 selftests have been disabled.
776
777 2018-10-04 Tom Tromey <tom@tromey.com>
778
779 * configure: Rebuild.
780
781 2018-10-04 Tom Tromey <tom@tromey.com>
782
783 * server.c (handle_status): Rename inner "thread".
784 (process_serial_event): Declare "res" in 'm' case.
785 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
786 (iterate_over_lwps): Rename inner "thread".
787 (linux_qxfer_libraries_svr4): Rename inner "len".
788 * gdbthread.h (find_thread_in_random): Rename inner "thread".
789
790 2018-10-01 Gary Benson <gbenson@redhat.com>
791
792 * gdb_proc_service.h: Moved common code to
793 common/gdb_proc_service.h.
794
795 2018-10-01 Gary Benson <gbenson@redhat.com>
796
797 * gdb_proc_service.h: Synchronize comments and whitespace with
798 GDB's version of this file.
799
800 2018-09-25 Tom Tromey <tom@tromey.com>
801
802 * configure: Rebuild.
803 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
804
805 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
806
807 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
808 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
809 ($(IPA_LIB)): Sort IPA_OBJS.
810
811 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
812
813 * Makefile.in: Remove references to $(ADD_DEPS).
814
815 2018-09-16 Tom Tromey <tom@tromey.com>
816
817 * remote-utils.c (remote_open): Use GNU style for metasyntactic
818 variables.
819 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
820 variables.
821
822 2018-09-05 Tom Tromey <tom@tromey.com>
823
824 * configure: Rebuild.
825
826 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
827
828 PR build/23399
829 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
830
831 2018-08-27 Tom Tromey <tom@tromey.com>
832
833 PR build/23087:
834 * configure: Rebuild.
835
836 2018-08-27 Tom Tromey <tom@tromey.com>
837
838 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
839 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
840 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
841 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
842 (s390x_emit_stack_adjust): Add casts to unsigned char.
843
844 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
845
846 PR gdb/23374
847 PR gdb/23375
848 * server.h (struct client_state) <disable_randomization>:
849 Initialize to 1.
850
851 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
852
853 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
854 variable.
855 (mips_supply_ptrace_register): Likewise.
856
857 2018-07-22 Tom Tromey <tom@tromey.com>
858
859 * configure: Rebuild.
860
861 2018-07-22 Tom Tromey <tom@tromey.com>
862
863 * win32-low.c (win32_create_inferior): Remove unused variables.
864 * gdbreplay.c (remote_open): Remove unused variable.
865 * remote-utils.c (remote_prepare): Remove unused variable.
866 * x86-tdesc.h (X86_TDESC_H): Define.
867 (amd64_expedite_regs): Define conditionally.
868 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
869 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
870 * remote-utils.c (readchar): Remove unused variable.
871
872 2018-07-13 Pedro Alves <palves@redhat.com>
873
874 * linux-low.c (linux_kill): Change parameter to process_info
875 pointer instead of pid. Adjust.
876 * lynx-low.c (lynx_kill): Likewise.
877 * nto-low.c (nto_kill): Likewise.
878 * spu-low.c (spu_kill): Likewise.
879 * win32-low.c (win32_kill): Likewise.
880 * server.c (handle_v_kill, kill_inferior_callback)
881 (detach_or_kill_for_exit): Adjust.
882 * target.c (kill_inferior): Change parameter to process_info
883 pointer instead of pid. Adjust.
884 * target.h (struct target_ops) <kill>: Change parameter to
885 process_info pointer instead of pid. Adjust all implementations
886 and callers.
887 (kill_inferior): Likewise.
888
889 2018-07-13 Pedro Alves <palves@redhat.com>
890
891 * linux-low.c (linux_detach, linux_join): Change parameter to
892 process_info pointer instead of pid. Adjust.
893 * lynx-low.c (lynx_detach, lynx_join): Likewise.
894 * nto-low.c (nto_detach): Likewise.
895 * spu-low.c (spu_detach, spu_join): Likewise.
896 * win32-low.c (win32_detach, win32_join): Likewise.
897 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
898 * target.h (struct target_ops) <detach, join>: Change parameter to
899 process_info pointer instead of pid. Adjust all implementations
900 and callers.
901 (detach_inferior, join_inferior): Rename 'pid' parameter to
902 'proc'.
903
904 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
905 Jan Kratochvil <jan.kratochvil@redhat.com>
906 Paul Fertser <fercerpav@gmail.com>
907 Tsutomu Seki <sekiriki@gmail.com>
908
909 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
910 (OBS): Add 'common/netstuff.o'.
911 (GDBREPLAY_OBS): Likewise.
912 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
913 (remote_open): Implement support for IPv6
914 connections.
915 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
916 and 'wspiapi.h'.
917 (handle_accept_event): Accept connections from IPv6 sources.
918 (remote_prepare): Handle IPv6-style hostnames; implement
919 support for IPv6 connections.
920 (remote_open): Implement support for printing connections from
921 IPv6 sources.
922
923 2018-07-11 Pedro Alves <palves@redhat.com>
924
925 PR gdb/23377
926 * mem-break.c (any_persistent_commands): Add process_info
927 parameter and use it instead of relying on the current process.
928 Change return type to bool.
929 * mem-break.h (any_persistent_commands): Add process_info
930 parameter and change return type to bool.
931 * server.c (handle_detach): Remove require_running_or_return call.
932 Look up the process_info for the process we're about to detach.
933 If not found, return back error to GDB. Adjust
934 any_persistent_commands call to pass down a process pointer.
935
936 2018-07-11 Pedro Alves <palves@redhat.com>
937
938 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
939 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
940 instead of collect_register_by_name.
941 * regcache.c (regcache_raw_get_unsigned_by_name): New.
942 * regcache.h (regcache_raw_get_unsigned_by_name): New.
943
944 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
945 Pedro Alves <palves@redhat.com>
946
947 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
948
949 2018-07-03 Tom Tromey <tom@tromey.com>
950
951 * linux-low.c: Update.
952 * lynx-low.c: Update.
953 * mem-break.c: Update.
954 * nto-low.c: Update.
955 * remote-utils.c: Update.
956 * server.c: Update.
957 * spu-low.c: Update.
958 * target.c: Update.
959 * win32-low.c: Update.
960
961 2018-07-03 Tom Tromey <tom@tromey.com>
962
963 * server.c: Update.
964
965 2018-07-03 Tom Tromey <tom@tromey.com>
966
967 * linux-low.c: Update.
968
969 2018-07-03 Tom Tromey <tom@tromey.com>
970
971 * target.c: Update.
972
973 2018-07-03 Tom Tromey <tom@tromey.com>
974
975 * linux-low.c: Update.
976 * linux-mips-low.c: Update.
977 * lynx-low.c: Update.
978 * nto-low.c: Update.
979 * remote-utils.c: Update.
980 * server.c: Update.
981 * spu-low.c: Update.
982 * target.c: Update.
983 * thread-db.c: Update.
984
985 2018-07-03 Tom Tromey <tom@tromey.com>
986
987 * linux-low.c: Update.
988 * linux-mips-low.c: Update.
989 * lynx-low.c: Update.
990 * mem-break.c: Update.
991 * nto-low.c: Update.
992 * remote-utils.c: Update.
993 * server.c: Update.
994 * spu-low.c: Update.
995 * target.c: Update.
996 * tracepoint.c: Update.
997
998 2018-07-03 Tom Tromey <tom@tromey.com>
999
1000 * linux-low.c: Update.
1001 * linux-ppc-low.c: Update.
1002 * linux-x86-low.c: Update.
1003 * proc-service.c: Update.
1004 * server.c: Update.
1005 * spu-low.c: Update.
1006 * thread-db.c: Update.
1007 * win32-low.c: Update.
1008
1009 2018-07-03 Tom Tromey <tom@tromey.com>
1010
1011 * linux-low.c: Update.
1012 * lynx-low.c: Update.
1013 * nto-low.c: Update.
1014 * remote-utils.c: Update.
1015 * spu-low.c: Update.
1016 * thread-db.c: Update.
1017 * win32-low.c: Update.
1018
1019 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1020
1021 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1022 parameter in call to 'amd64_create_target_description'.
1023
1024 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1025
1026 * x86-tdesc.h: Remove executable permission flag.
1027
1028 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1029
1030 * configure.ac: Remove AC_PREREQ, add missing quoting.
1031 * configure: Re-generate.
1032 * config.in: Re-generate.
1033 * aclocal.m4: Re-generate.
1034
1035 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1036
1037 * tracepoint.h (current_traceframe): Remove declaration.
1038
1039 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1040
1041 * linux-aarch64-low.c (is_sve_tdesc): New function.
1042 (aarch64_sve_regs_copy_to_regcache): Likewise.
1043 (aarch64_sve_regs_copy_from_regcache): Likewise.
1044 (aarch64_regs_info): Add SVE checks.
1045 (initialize_low_arch): Initialize SVE.
1046
1047 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1048
1049 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1050
1051 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1052
1053 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1054 (initialize_low_tracepoint): Likewise
1055 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1056 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1057 param.
1058 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1059 checks.
1060 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1061
1062 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1063
1064 * server.h (PBUFSIZ): Increase size
1065
1066 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1067
1068 * regcache.c (regcache::raw_compare): New function.
1069 * regcache.h (regcache::raw_compare): New declaration.
1070
1071 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1072
1073 * regcache.c (new_register_cache): Use new.
1074 (free_register_cache): Use delete.
1075 (register_data): Use const.
1076 (supply_register): Move body inside regcache.
1077 (regcache::raw_supply): New override function.
1078 (collect_register): Move body inside regcache.
1079 (regcache::raw_collect): New override function.
1080 (regcache::get_register_status): New override function.
1081 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1082
1083 2018-06-09 Tom Tromey <tom@tromey.com>
1084
1085 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1086 declare queue.
1087 (event_queue): Use std::queue.
1088 (gdb_event_xfree): Remove.
1089 (initialize_event_loop, process_event, wait_for_event): Update.
1090
1091 2018-06-08 Stan Cox <scox@redhat.com>
1092
1093 * win32-low.c (win32_create_inferior): last_ptid and last_status
1094 moved to client_state.
1095
1096 2018-06-08 Pedro Alves <palves@redhat.com>
1097
1098 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1099 common/common-exceptions.o, common/common-utils.o,
1100 common/errors.o, common/print-utils.o and utils.o.
1101 * gdbreplay.c: Include "common-defs.h" instead of the two
1102 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1103 string.h or alloca.h.
1104 (perror_with_name): Delete.
1105 (remote_open): Use xstrdup instead of strdup.
1106 (main): Rename to ...
1107 (captured_main): ... this.
1108 (main): New.
1109
1110 2018-06-08 Tom Tromey <tom@tromey.com>
1111
1112 * linux-low.c (linux_low_read_btrace): Update.
1113
1114 2018-06-04 Stan Cox <scox@redhat.com>
1115
1116 * server.h (struct client_state): New.
1117 * server.c (cont_thread, general_thread, multi_process)
1118 (report_fork_events, report_vfork_events, report_exec_events)
1119 (report_thread_events, swbreak_feature, hwbreak_feature)
1120 (vCont_supported, disable_randomization, pass_signals)
1121 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1122 Moved to client_state.
1123 * remote-utils.c (remote_debug, noack_mode)
1124 (transport_is_reliable): Moved to client_state.
1125 * tracepoint.c (current_traceframe): Moved to client_state.
1126
1127 Update all callers.
1128 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1129 linux-low.c, remote-utils.h, target.c: Use client_state.
1130
1131 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1132
1133 * configure.srv: Add new c/h file.
1134
1135 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1136
1137 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1138 null VQ.
1139
1140 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1141
1142 * gdb.arch/mips-fpregset-core.exp: New test.
1143 * gdb.arch/mips-fpregset-core.c: New test source.
1144
1145 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1146
1147 PR server/23198
1148 * hostio.c (require_int): Do not report overflow for integers
1149 between 0xfffffff and 0x7fffffff.
1150
1151 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1152
1153 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1154 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1155 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1156 functions.
1157 (the_low_target): Wire them.
1158
1159 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1160
1161 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1162 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1163 mode. Call collect_register_by_name with vscr using
1164 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1165 (ppc_store_vrregset): Add and set vscr_offset variable as in
1166 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1167 vscr_offset.
1168
1169 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1170
1171 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1172 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1173 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1174
1175 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1176
1177 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1178 (ppc_store_vsxregset): Likewise.
1179 (ppc_fill_vrregset): Likewise.
1180 (ppc_store_vrregset): Likewise.
1181 (ppc_fill_evrregset): Likewise.
1182 (ppc_store_evrregset): Likewise.
1183 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1184 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1185 needed.
1186
1187 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1188
1189 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1190 wordsize of the inferior. Call ppc_linux_target_wordsize.
1191
1192 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1193
1194 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1195 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1196 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1197 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1198 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1199 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1200 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1201 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1202 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1203 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1204 (tdesc_powerpc_e500l): Remove.
1205 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1206 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1207 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1208 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1209 linux-ppc-tdesc.h.
1210 (ppc_arch_setup): Remove target description matching code. Fill a
1211 ppc_linux_features struct and call ppc_linux_match_description
1212 with it.
1213
1214 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1215
1216 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1217 width of the requested register exceeds the width of the
1218 `ptrace' data type.
1219 (mips_cannot_store_register): Likewise.
1220
1221 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1222
1223 * linux-mips-low.c (mips_fetch_register): New function. Update
1224 preceding comment.
1225 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1226 (the_low_target): Wire `mips_fetch_register'.
1227
1228 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1229
1230 * lynx-i386-low.c (LYNXOS_178): New macro.
1231 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1232 the layout on LynxOS-178.
1233 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1234 handle floating point registers that are not supported by
1235 LynxOS-178.
1236
1237 2018-05-10 Tom Tromey <tom@tromey.com>
1238
1239 * configure: Rebuild.
1240
1241 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1242
1243 PR server/23158:
1244 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1245 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1246 Use it to set the expedite_regs field in the given tdesc.
1247 * x86-tdesc.h: New file.
1248 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1249 Adjust following the addition of the new expedite_regs parameter
1250 to init_target_desc.
1251 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1252 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1253 (i386_linux_read_description, amd64_linux_read_description):
1254 Adjust following the addition of the new expedite_regs parameter
1255 to init_target_desc.
1256 * lynx-i386-low.c: #include "x86-tdesc.h".
1257 (lynx_i386_arch_setup): Adjust following the addition of the new
1258 expedite_regs parameter to init_target_desc.
1259 * nto-x86-low.c: #include "x86-tdesc.h".
1260 (nto_x86_arch_setup): Adjust following the addition of the new
1261 expedite_regs parameter to init_target_desc.
1262 * win32-i386-low.c: #include "x86-tdesc.h".
1263 (i386_arch_setup): Adjust following the addition of the new
1264 expedite_regs parameter to init_target_desc.
1265
1266 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1267
1268 PR server/23158:
1269 * win32-low.c (win32_create_inferior): Add call to my_wait
1270 setting last_status global.
1271
1272 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1273
1274 PR server/23158:
1275 * win32-low.c (create_process): Only call gdb_tilde_expand if
1276 inferior_cwd is not NULL.
1277
1278 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1279
1280 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1281 registers to the cache if their values have changed.
1282 (i387_xsave_to_cache): Provide default values for x87 control
1283 registers when these features are available, but disabled.
1284 * regcache.c (supply_register_by_name_zeroed): New function.
1285 * regcache.h (supply_register_by_name_zeroed): Declare new
1286 function.
1287
1288 2018-05-07 Tom Tromey <tom@tromey.com>
1289
1290 * configure: Rebuild.
1291
1292 2018-05-04 Tom Tromey <tom@tromey.com>
1293
1294 * configure: Rebuild.
1295
1296 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1297 Pedro Alves <palves@redhat.com>
1298
1299 * linux-aarch64-low.c (aarch64_stopped_data_address):
1300 Likewise.
1301
1302 2018-04-27 Tom Tromey <tom@tromey.com>
1303
1304 * configure: Rebuild.
1305
1306 2018-04-23 Tom Tromey <tom@tromey.com>
1307
1308 * configure: Rebuild.
1309
1310 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1311
1312 * Makefile.in (depcomp): Add "..".
1313 (all_deps_files): New and use it.
1314
1315 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1316
1317 * configure.srv (aarch64*-*-linux*): Don't include xml.
1318 (i[34567]86-*-cygwin*): Likewise.
1319 (i[34567]86-*-linux*): Likewise.
1320 (i[34567]86-*-lynxos*): Likewise.
1321 (i[34567]86-*-mingw32ce*): Likewise.
1322 (i[34567]86-*-mingw*): Likewise.
1323 (i[34567]86-*-nto*): Likewise.
1324 (tic6x-*-uclinux): Likewise.
1325 (x86_64-*-linux*): Likewise.
1326 (x86_64-*-mingw*): Likewise.
1327 (x86_64-*-cygwin*): Likewise.
1328
1329 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1330
1331 * tdesc.c: Remove xml parameter.
1332
1333 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1334
1335 * server.c (get_features_xml): Remove cast.
1336 * tdesc.c (void target_desc::accept): Fill in function.
1337 (tdesc_get_features_xml): Remove old xml creation.
1338 (print_xml_feature::visit_pre): Add xml vistor.
1339 * tdesc.h (struct target_desc): Make xmltarget mutable.
1340 (tdesc_get_features_xml): Remove declaration.
1341
1342 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1343
1344 * tdesc.c (tdesc_architecture_name): Add new function.
1345 (tdesc_osabi_name): Likewise.
1346 (tdesc_get_features_xml): Use new functions.
1347
1348 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1349
1350 * tdesc.c (tdesc_create_flags): Remove.
1351 (tdesc_add_flag): Likewise.
1352 (tdesc_named_type): Likewise.
1353 (tdesc_create_union): Likewise.
1354 (tdesc_create_struct): Likewise.
1355 (tdesc_create_vector): Likewise.
1356 (tdesc_add_bitfield): Likewise.
1357 (tdesc_add_field): Likewise.
1358 (tdesc_set_struct_size): Likewise.
1359
1360 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1361
1362 * tdesc.c (~target_desc): Remove implictly deleted items.
1363 (init_target_desc): Iterate all features.
1364 (tdesc_get_features_xml): Use vector.
1365 (tdesc_create_feature): Create feature.
1366 * tdesc.h (tdesc_feature) Remove
1367 (target_desc): Add features.
1368
1369 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1370
1371 * Makefile.in: Add common/tdesc.c
1372 * tdesc.c (init_target_desc): init all reg_defs from register
1373 vector.
1374 (tdesc_create_reg): Create tdesc_reg.
1375 * tdesc.h (tdesc_feature): Add register vector.
1376
1377 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1378
1379 * tdesc.h (struct target_desc) <features>: Change type to
1380 std::vector<std::string>.
1381 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1382 changes.
1383 (tdesc_get_features_xml): Likewise.
1384 (tdesc_create_feature): Likewise.
1385
1386 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1387
1388 * regcache.c (find_register_by_number): Return a ref.
1389 (find_regno): Use references.
1390 (register_size): Likewise.
1391 (register_data): Likewise.
1392 * tdesc.c (target_desc::~target_desc): Remove free calls.
1393 (target_desc::operator==): Use std::vector compare.
1394 (init_target_desc): Use reference.
1395 (tdesc_create_reg): Use reg constructors.
1396 * tdesc.h (struct target_desc): Replace pointer with object.
1397
1398 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1399
1400 * regcache.c (find_register_by_number): Make static.
1401 (find_regno): Use find_register_by_number
1402 * regcache.h (struct reg): Remove declaration.
1403
1404 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1405
1406 * tdesc.c (target_desc::~target_desc): Move to here.
1407 (target_desc::operator==): Likewise.
1408 * tdesc.h (target_desc::~target_desc): Move from here.
1409 (target_desc::operator==): Likewise.
1410
1411 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1412
1413 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1414
1415 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1416
1417 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1418 S390_TDESC_GS.
1419 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1420 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1421 and init_registers_s390_gs_linux64.
1422
1423 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1424
1425 * linux-s390-low.c (s390_fill_gs): Remove function.
1426 (s390_fill_gsbc): Remove function.
1427 (s390_regsets): Set fill functions for the guarded storage regsets
1428 to NULL.
1429
1430 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1431
1432 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1433 the word size. Add comment.
1434 (s390_get_wordsize): New function.
1435 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1436 pswm with it. Instead, use s390_get_wordsize to determine the
1437 word size first and derive the correct tdesc from that directly.
1438
1439 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1440
1441 * Makefile.in: Include silent-rules.mk.
1442 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1443 (COMPILE): Add ECHO_CXX.
1444 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1445 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1446 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1447 (version-generated.c): Add ECHO_GEN.
1448 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1449 (IPAGENT_COMPILE): Add ECHO_CXX.
1450 (%-generated.c): Add ECHO_REGDAT.
1451
1452 2018-03-14 Tom Tromey <tom@tromey.com>
1453
1454 PR cli/14977:
1455 * ax.c (ax_printf): Special case for NULL.
1456
1457 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1458
1459 * linux-low.c (linux_qxfer_libraries_svr4): Use
1460 xml_escape_text_append.
1461
1462 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1463
1464 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1465
1466 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1467
1468 * server.c (handle_general_set): Remove unnecessary xstrdup.
1469
1470 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1471
1472 * server.c (parse_debug_format_options): Adjust to
1473 delim_string_to_char_ptr_vec changes.
1474 * thread-db.c (thread_db_load_search): Adjust to
1475 dirnames_to_char_ptr_vec changes.
1476
1477 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1478
1479 * target.h (target_enable_btrace, target_disable_btrace)
1480 (target_read_btrace, target_read_btrace_conf): Turn macro into
1481 inline function. Throw error if target method is not defined.
1482 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1483 check for btrace target method. Be prepared to handle exceptions
1484 from btrace target methods.
1485
1486 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1487
1488 * server.c (captured_main): Change order of error message printed
1489 when the current working directory cannot be found.
1490
1491 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1492
1493 * server.c: Include "filenames.h" and "pathstuff.h".
1494 (program_name): Delete variable.
1495 (program_path): New anonymous class.
1496 (get_exec_wrapper): Use "program_path" instead of
1497 "program_name".
1498 (handle_v_run): Likewise.
1499 (captured_main): Likewise.
1500 (process_serial_event): Likewise.
1501
1502 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1503
1504 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1505 (OBJS): Add "pathstuff.o".
1506 * server.c (current_directory): New global variable.
1507 (captured_main): Initialize "current_directory".
1508
1509 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1510
1511 * tdesc.c: Use common/tdesc.h.
1512 * tdesc.h: Likewise.
1513
1514 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1515 Simon Marchi <simon.marchi@ericsson.com>
1516
1517 * Makefile.in: Switch order of make rules.
1518
1519 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1520
1521 * Makefile.in: Add common directory in build.
1522 * configure.ac: Add common reference.
1523 * configure: Regenerate.
1524
1525 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1526
1527 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1528 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1529 * spu-low.c (spu_target_ops): Likewise.
1530 * win32-low.c (win32_target_ops): Likewise.
1531 * server.c (supported_btrace_packets): Report packets unconditionally.
1532 * target.h (target_ops) <supports_btrace>: Remove.
1533 (target_supports_btrace): Remove.
1534
1535 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1536
1537 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1538 (handle_btrace_disable): Change return type to void. Use exceptions
1539 to report errors.
1540 (handle_btrace_general_set): Catch exception and copy message to
1541 return message.
1542
1543 2018-02-08 Tom Tromey <tom@tromey.com>
1544
1545 * linux-low.c (install_software_single_step_breakpoints): Use
1546 make_scoped_restore.
1547 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1548 (do_restore_current_thread_cleanup): Remove.
1549 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1550 declare.
1551
1552 2018-02-08 Tom Tromey <tom@tromey.com>
1553
1554 * mem-break.c (set_raw_breakpoint_at): Use
1555 gdb::unique_xmalloc_ptr.
1556
1557 2018-01-30 Pedro Alves <palves@redhat.com>
1558
1559 PR gdb/13211
1560 * target.c (target_terminal::terminal_state): Rename to ...
1561 (target_terminal::m_terminal_state): ... this.
1562
1563 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1564
1565 * linux-low.c (handle_extended_wait): Surround call to
1566 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1567
1568 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1569
1570 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1571 linux_ptrace_attach_fail_reason_string now returning an
1572 std::string.
1573 (linux_attach): Likewise.
1574 * thread-db.c (attach_thread): Likewise.
1575
1576 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1577
1578 PR gdb/21559
1579 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1580 checking for fs_base/gs_base fields in struct user_regs_struct.
1581 * configure: Regenerate.
1582
1583 2018-01-16 Yao Qi <yao.qi@linaro.org>
1584
1585 PR gdb/18749
1586 * linux-low.c (fetch_register): Call supply_register instead of
1587 error.
1588
1589 2018-01-08 Yao Qi <yao.qi@linaro.org>
1590 Simon Marchi <simon.marchi@ericsson.com>
1591
1592 * Makefile.in (OBS): Remove selftest.o.
1593 * configure.ac: Set srv_selftest_objs if $development is true.
1594 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1595 * configure: Re-generated.
1596 * server.c (captured_main): Wrap variable selftest_filter with
1597 GDB_SELF_TEST.
1598
1599 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1600
1601 * server.c (parse_debug_format_options): Return std::string.
1602 (handle_monitor_command, captured_main): Adjust.
1603
1604 2018-01-05 Pedro Alves <palves@redhat.com>
1605
1606 PR gdb/18653
1607 * server.c (captured_main): Pass quiet=false to
1608 save_original_signals_state.
1609
1610 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1611
1612 * gdbreplay.c (gdbreplay_version): Update copyright year in
1613 version message.
1614 * server.c (gdbserver_version): Likewise.
1615
1616 2017-12-08 Tom Tromey <tom@tromey.com>
1617
1618 * ax.c (ax_printf): Update.
1619
1620 2017-12-07 Yao Qi <yao.qi@linaro.org>
1621
1622 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1623 aarch64_linux_read_description.
1624 * linux-amd64-ipa.c (idx2mask): New array.
1625 (get_ipa_tdesc): Move idx2mask out.
1626 (initialize_low_tracepoint): Initialize target descriptions.
1627 * linux-i386-ipa.c (idx2mask): New array.
1628 (get_ipa_tdesc): Move idx2mask out.
1629 (initialize_low_tracepoint): Initialize target descriptions.
1630
1631 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1632
1633 * tdesc.c (struct tdesc_type): Change return type.
1634 (tdesc_add_flag): Change parameter type.
1635 (tdesc_add_bitfield): Likewise.
1636 (tdesc_add_field): Likewise.
1637 (tdesc_set_struct_size): Likewise.
1638
1639 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1640
1641 * regcache.c (registers_to_string): Remove unused variable.
1642
1643 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1644
1645 * inferiors.c (for_each_inferior_with_data): Remove.
1646 * inferiors.h (for_each_inferior_with_data): Remove.
1647 * server.c (handle_qxfer_threads_worker): Change parameter type.
1648 (handle_qxfer_threads_proper): Use for_each_thread.
1649
1650 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1651
1652 * inferiors.c (for_each_inferior): Remove.
1653 (clear_inferiors): Use for_each_thread.
1654 * inferiors.h (for_each_inferior): Remove.
1655 * linux-low.c (linux_wait_for_event_filtered): Use
1656 for_each_thread.
1657 (linux_stabilize_threads): Likewise.
1658 * regcache.c (regcache_release): Likewise.
1659 * server.c (gdb_wants_all_threads_stopped): Likewise.
1660 (clear_pending_status_callback): Remove.
1661 (handle_status): Use for_each_thread.
1662 (captured_main): Likewise.
1663 * win32-low.c (child_init_thread_list): Likewise.
1664 (win32_clear_inferiors): Likewise.
1665 (fake_breakpoint_event): Likewise.
1666
1667 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1668
1669 * inferiors.h (find_inferior): Remove.
1670 * inferiors.c (find_inferior): Remove.
1671
1672 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1673
1674 * linux-low.c (resume_status_pending_p): Update comment.
1675 (need_step_over_p): Update comment.
1676
1677 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1678
1679 * linux-low.c (proceed_one_lwp): Return void, change parameter
1680 type.
1681 (unsuspend_and_proceed_one_lwp): Likewise.
1682 (proceed_all_lwps): Use for_each_thread.
1683 (unstop_all_lwps): Likewise.
1684
1685 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1686
1687 * linux-low.c (linux_resume_one_thread): Return void, take
1688 parameter directly.
1689 (linux_resume): Use for_each_thread.
1690
1691 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1692
1693 * linux-low.c (send_sigstop_callback): Return void, change
1694 parameter type. Rename to...
1695 (send_sigstop): ... this.
1696 (suspend_and_send_sigstop_callback): Return void, change parameter
1697 type. Rename to...
1698 (suspend_and_send_sigstop): ... this.
1699 (stop_all_lwps): Use for_each_thread.
1700
1701 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1702
1703 * linux-low.c (lwp_running): Return bool, remove unused
1704 argument.
1705 (linux_stabilize_threads): Use find_thread.
1706
1707 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1708
1709 * linux-low.c (select_singlestep_lwp_callback): Remove.
1710 (count_events_callback): Remove.
1711 (select_event_lwp_callback): Remove.
1712 (select_event_lwp): Use find_thread/for_each_thread.
1713
1714 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1715
1716 * linux-low.c (not_stopped_callback): Return bool, take filter
1717 argument directly.
1718 (linux_wait_for_event_filtered): Use find_thread.
1719 (linux_wait_1): Likewise.
1720
1721 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1722
1723 * linux-low.c (same_lwp): Remove.
1724 (find_lwp_pid): Use find_thread.
1725
1726 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1727
1728 * linux-low.c (delete_lwp_callback): Remove.
1729 (linux_mourn): Use for_each_thread.
1730
1731 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1732
1733 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1734 args parameter, don't check for pid.
1735 (linux_detach): Use for_each_thread.
1736
1737 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1738
1739 * linux-low.c (struct counter): Remove.
1740 (second_thread_of_pid_p): Remove.
1741 (last_thread_of_process_p): Use find_thread.
1742
1743 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1744
1745 * inferiors.c (find_inferior_in_random): Remove.
1746 * inferiors.h (find_inferior_in_random): Remove.
1747 * linux-low.c (status_pending_p_callback): Return bool, accept
1748 parameter ptid directly.
1749 (linux_wait_for_event_filtered): Use find_thread_in_random.
1750 (linux_wait_1): Likewise.
1751
1752 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1753
1754 * inferiors.c (find_inferior_id): Remove.
1755 (find_thread_ptid): Move implemention from find_inferior_id to
1756 here.
1757 * inferiors.h (find_inferior_id): Remove.
1758 * server.c (handle_status): Use find_thread_ptid.
1759 (process_serial_event): Likewise.
1760 * thread-db.c (find_one_thread): Likewise.
1761 (thread_db_thread_handle): Likewise.
1762 * win32-low.c (thread_rec): Likewise.
1763 (child_delete_thread): Likewise.
1764 (win32_thread_alive): Likewise.
1765 (get_child_debug_event): Likewise.
1766
1767 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1768
1769 * linux-mips-low.c (update_watch_registers_callback): Return
1770 void, remove pid_p parameter, don't check for pid.
1771 (mips_insert_point, mips_remove_point): Use for_each_thread.
1772
1773 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1774
1775 * lynx.low (lynx_delete_thread_callback): Remove.
1776 (lynx_mourn): Use for_each_thread.
1777
1778 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1779
1780 * regcache.c (regcache_invalidate_one): Remove.
1781 (regcache_invalidate_pid): use for_each_thread.
1782
1783 2017-11-26 Tom Tromey <tom@tromey.com>
1784
1785 * linux-low.c (linux_create_inferior): Update.
1786
1787 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1788
1789 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1790
1791 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1792
1793 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1794 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1795 * linux-aarch64-tdesc-selftest.c: New file.
1796 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1797
1798 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1799
1800 * configure.srv: Add new file.
1801 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1802 * linux-aarch64-tdesc-selftest.c: New file.
1803 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1804
1805 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1806
1807 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1808 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1809 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1810
1811 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1812
1813 * configure.srv: Add new files.
1814 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1815 aarch64_linux_read_description.
1816 * linux-aarch64-low.c (aarch64_linux_read_description):
1817 Merge with aarch64_arch_setup.
1818 (aarch64_arch_setup): Call aarch64_linux_read_description.
1819 * linux-aarch64-tdesc.c: New file.
1820 * linux-aarch64-tdesc.h: New file.
1821
1822 2017-11-24 Yao Qi <yao.qi@linaro.org>
1823
1824 * configure.srv: Set $srv_regobj for tic6x-linux.
1825 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1826 (tic6x_read_description): Move some code to tic6x_arch_setup.
1827 (tic6x_tdesc_test): New function.
1828 (initialize_low_arch): Call selftests::register_test.
1829
1830 2017-11-22 Yao Qi <yao.qi@linaro.org>
1831
1832 * remote-utils.c (prepare_resume_reply): Use memcpy.
1833
1834 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1835
1836 * linux-low.c (kill_one_lwp_callback): Return void, take
1837 argument directly, don't filter on pid.
1838 (linux_kill): Use for_each_thread.
1839
1840 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1841
1842 * linux-low.c (need_step_over_p): Return bool, remove dummy
1843 argument.
1844 (linux_resume, proceed_all_lwps): Use find_thread.
1845
1846 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1847
1848 * linux-low.c (resume_status_pending_p): Return bool, remove
1849 flag_p argument.
1850 (linux_resume): Use find_thread.
1851
1852 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1853
1854 * linux-low.c (struct thread_resume_array): Remove.
1855 (linux_set_resume_request): Return void, take arguments
1856 directly.
1857 (linux_resume): Use for_each_thread.
1858
1859 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1860
1861 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1862 return bool, remove data argument.
1863 (linux_stabilize_threads): Use find_thread.
1864
1865 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1866
1867 * linux-low.c (unsuspend_one_lwp): Remove.
1868 (unsuspend_all_lwps): Use for_each_thread, inline code from
1869 unsuspend_one_lwp.
1870
1871 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1872
1873 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1874 * linux-low.c (struct iterate_over_lwps_args): Remove.
1875 (iterate_over_lwps_filter): Remove.
1876 (iterate_over_lwps): Use find_thread.
1877
1878 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1879
1880 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1881 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1882 code from reset_lwp_ptrace_options_callback.
1883
1884 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1885
1886 * linux-arm-low.c (struct update_registers_data): Remove.
1887 (update_registers_callback): Return void, take arguments
1888 directly, don't check thread's pid.
1889 (arm_insert_point, arm_remove_point): Use for_each_thread.
1890
1891 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1892
1893 * win32-low.c (continue_one_thread): Return void, take argument
1894 directly.
1895 (child_continue): Use for_each_thread.
1896
1897 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1898
1899 * win32-i386-low.c (update_debug_registers_callback): Rename
1900 to ...
1901 (update_debug_registers): ... this, return void, remove pid_p arg.
1902 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1903
1904 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1905
1906 * inferiors.h (struct process_info): Add constructor, initialize
1907 fields..
1908 <syscalls_to_catch>: Change type to std::vector<int>.
1909 * inferiors.c (add_process): Allocate process_info with new.
1910 (remove_process): Free process_info with delete.
1911 * linux-low.c (handle_extended_wait): Adjust.
1912 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1913 * server.c (handle_general_set): Adjust.
1914
1915 2017-11-16 Pedro Alves <palves@redhat.com>
1916
1917 * remote-utils.c (remote_close): Block SIGIO signals instead of
1918 uninstalling the SIGIO handler.
1919
1920 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1921
1922 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1923
1924 2017-11-16 Yao Qi <yao.qi@linaro.org>
1925
1926 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1927 (tic6x_store_gregset): Likewise.
1928 (tic6x_usrregs_info): Move it up.
1929
1930 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1931
1932 * Makefile.in: Update arch rules.
1933 * configure.srv: Explicitly mark arch/ files.
1934
1935 2017-11-13 Andreas Schwab <schwab@suse.de>
1936
1937 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1938 function.
1939 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1940
1941 2017-11-06 Pedro Alves <palves@redhat.com>
1942
1943 * config.in, configure: Regenerate.
1944
1945 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1946
1947 * target.c (struct thread_search): Remove.
1948 (thread_search_callback): Remove.
1949 (prepare_to_access_memory): Use for_each_thread instead of
1950 find_inferior. Inline code from thread_search_callback.
1951
1952 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1953
1954 * server.c (struct visit_actioned_threads_data): Remove.
1955 (visit_actioned_threads): Change prototype to take arguments
1956 directly.
1957 (resume): Use find_thread instead of find_inferior.
1958
1959 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1960
1961 * server.c (queue_stop_reply_callback): Change prototype, return
1962 void.
1963 (find_status_pending_thread_callback): Remove.
1964 (handle_status): Replace find_inferior with find_thread and
1965 for_each_thread.
1966
1967 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1968
1969 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1970 with REGNO.
1971 (aarch64_store_gregset): Likewise.
1972 (aarch64_fill_fpregset): Likewise.
1973 (aarch64_store_fpregset): Likewise.
1974
1975 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1976
1977 * gdbthread.h (find_thread, for_each_thread): New functions.
1978 * inferiors.c (thread_of_pid): Remove.
1979 (find_any_thread_of_pid): Use find_thread.
1980 * linux-low.c (num_lwps): Use for_each_thread.
1981
1982 2017-10-17 Yao Qi <yao.qi@linaro.org>
1983
1984 * Makefile.in: Remove one rule.
1985 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1986
1987 2017-10-17 Yao Qi <yao.qi@linaro.org>
1988
1989 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1990 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1991
1992 2017-10-17 Yao Qi <yao.qi@linaro.org>
1993
1994 * configure.srv: Rename arm.o with arch/arm.o.
1995
1996 2017-10-17 Yao Qi <yao.qi@linaro.org>
1997
1998 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1999 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2000 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2001 (arch-i386.o, arch-amd64.o): Remove rules.
2002 (arch/%.o): New rule.
2003 Update POSTCOMPILE and COMPILE.pre.
2004 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2005 * configure: Re-generated.
2006 * configure.srv: Replace arch-i386.o with arch/i386.o.
2007 Replace arch-amd64.o with arch/amd64.o.
2008
2009 2017-10-16 Yao Qi <yao.qi@linaro.org>
2010
2011 * configure: Regenerated.
2012
2013 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2014
2015 * inferiors.h: (struct inferior_list): Remove.
2016 (struct inferior_list_entry); Remove.
2017 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2018 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2019 get_first_inferior): Remove.
2020 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2021 find_inferior_id, find_inferior_in_random): Change signature.
2022 * inferiors.c (all_threads): Change type to
2023 std::list<thread_info *>.
2024 (get_thread): Remove macro.
2025 (find_inferior, find_inferior_id): Change signature, implement
2026 using find_thread.
2027 (find_inferior_in_random): Change signature, implement using
2028 find_thread_in_random.
2029 (for_each_inferior, for_each_inferior_with_data): Change
2030 signature, implement using for_each_thread.
2031 (add_inferior_to_list, remove_inferior): Remove.
2032 (add_thread, get_first_thread, thread_of_pid,
2033 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2034 (get_first_inferior, one_inferior_p, clear_inferior_list):
2035 Remove.
2036 (clear_inferiors, get_thread_process): Update.
2037 * gdbthread.h: Include <list>.
2038 (struct thread_info) <entry>: Remove field.
2039 <id>: New field.
2040 (all_threads): Change type to std::list<thread_info *>.
2041 (get_first_inferior): Add doc.
2042 (find_thread, for_each_thread, find_thread_in_random): New
2043 functions.
2044 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2045 * linux-arm-low.c (update_registers_callback): Update.
2046 * linux-low.c (second_thread_of_pid_p): Update.
2047 (kill_one_lwp_callback, linux_detach_lwp_callback,
2048 delete_lwp_callback, status_pending_p_callback, same_lwp,
2049 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2050 iterate_over_lwps, not_stopped_callback,
2051 resume_stopped_resumed_lwps, count_events_callback,
2052 select_singlestep_lwp_callback, select_event_lwp_callback,
2053 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2054 suspend_and_send_sigstop_callback, wait_for_sigstop,
2055 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2056 lwp_running, linux_set_resume_request, resume_status_pending_p,
2057 need_step_over_p, start_step_over, linux_resume_one_thread,
2058 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2059 reset_lwp_ptrace_options_callback): Update.
2060 * linux-mips-low.c (update_watch_registers_callback): Update.
2061 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2062 Update.
2063 (free_register_cache_thread_one): Remove.
2064 (regcache_release): Update.
2065 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2066 handle_qxfer_threads_worker): Update.
2067 (handle_query): Update, use list iterator.
2068 (visit_actioned_threads, handle_pending_status,
2069 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2070 clear_pending_status_callback, set_pending_status_callback,
2071 find_status_pending_thread_callback, handle_status,
2072 process_serial_event): Update.
2073 * target.c (thread_search_callback): Update.
2074 * thread-db.c (thread_db_get_tls_address): Update.
2075 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2076 Update.
2077 * win32-i386-low.c (update_debug_registers_callback): Update.
2078 * win32-low.c (delete_thread_info, child_delete_thread,
2079 continue_one_thread, suspend_one_thread,
2080 get_child_debug_event): Adjust.
2081
2082 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2083
2084 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2085 * inferiors.h: Include <list>.
2086 (struct process_info) <entry>: Remove field.
2087 <pid>: New field.
2088 (pid_of): Change macro to function.
2089 (ptid_of, lwpid_of): Remove macro.
2090 (all_processes): Change type to std::list<process_info *>.
2091 (ALL_PROCESSES): Remove macro.
2092 (for_each_process, find_process): New function.
2093 * inferiors.c (all_processes): Change type to
2094 std::list<process_info *>.
2095 (find_thread_process): Adjust.
2096 (add_process): Likewise.
2097 (remove_process): Likewise.
2098 (find_process_pid): Likewise.
2099 (get_first_process): Likewise.
2100 (started_inferior_callback): Remove.
2101 (have_started_inferiors_p): Adjust.
2102 (attached_inferior_callback): Remove.
2103 (have_attached_inferiors_p): Adjust.
2104 * linux-low.c (check_zombie_leaders): Likewise.
2105 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2106 (x86_linux_update_xmltarget): Adjust.
2107 * server.c (handle_query): Likewise.
2108 (gdb_reattached_process): Remove.
2109 (handle_status): Adjust.
2110 (kill_inferior_callback): Likewise.
2111 (detach_or_kill_inferior): Remove.
2112 (print_started_pid): Likewise.
2113 (print_attached_pid): Likewise.
2114 (detach_or_kill_for_exit): Update.
2115 (process_serial_event): Likewise.
2116 * linux-arm-low.c (arm_new_fork): Likewise.
2117
2118 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2119
2120 * dll.h: Include <list>.
2121 (struct dll_info): Add constructor.
2122 <entry>: Remove field.
2123 (all_dlls): Change type to std::list<dll_info>.
2124 * dll.c: Include <algorithm>.
2125 (get_dll): Remove macro.
2126 (all_dlls): Change type to std::list<dll_info *>.
2127 (free_one_dll): Remove.
2128 (match_dll): Likewise.
2129 (loaded_dll): Adjust.
2130 (unloaded_dll): Adjust to all_dlls type change, use
2131 std::find_if. Inline code from match_dll.
2132 (clear_dlls): Adjust to all_dlls type change.
2133 * server.c (emit_dll_description): Remove.
2134 (handle_qxfer_libraries): Adjust to all_dlls type change,
2135 integrate emit_dll_description's functionality.
2136
2137 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2138
2139 * linux-low.h (struct linux_target_ops) <delete_process>: New
2140 field.
2141 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2142 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2143 (struct linux_target_ops): Add delete_process callback.
2144 * linux-arm-low.c (arm_delete_process): New.
2145 (struct linux_target_ops): Add delete_process callback.
2146 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2147 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2148 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2149 * linux-mips-low.c (mips_linux_delete_process): New.
2150 (struct linux_target_ops): Add delete_process callback.
2151 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2152 * linux-s390-low.c (struct linux_target_ops): Likewise.
2153 * linux-sh-low.c (struct linux_target_ops): Likewise.
2154 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2155 * linux-tile-low.c (struct linux_target_ops): Likewise.
2156 * linux-x86-low.c (x86_linux_delete_process): New.
2157 (struct linux_target_ops): Add delete_process callback.
2158 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2159
2160 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2161
2162 * linux-aarch64-low.c (the_low_target): Add thread delete
2163 callback.
2164 * linux-arm-low.c (arm_delete_thread): New function.
2165 (the_low_target): Add thread delete callback.
2166 * linux-bfin-low.c (the_low_target): Likewise.
2167 * linux-crisv32-low.c (the_low_target): Likewise.
2168 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2169 set.
2170 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2171 field.
2172 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2173 * linux-mips-low.c (mips_linux_delete_thread): New function.
2174 (the_low_target): Add thread delete callback.
2175 * linux-ppc-low.c (the_low_target): Likewise.
2176 * linux-s390-low.c (the_low_target): Likewise.
2177 * linux-sh-low.c (the_low_target): Likewise.
2178 * linux-tic6x-low.c (the_low_target): Likewise.
2179 * linux-tile-low.c (the_low_target): Likewise.
2180 * linux-x86-low.c (the_low_target): Likewise.
2181 * linux-xtensa-low.c (the_low_target): Likewise.
2182
2183 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2184
2185 * win32-low.c: Include "common-inferior.h".
2186
2187 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2188
2189 * inferiors.c (set_inferior_cwd): New function.
2190 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2191 (handle_query): Inform that QSetWorkingDir is supported.
2192 * win32-low.c (create_process): Pass the inferior's cwd to
2193 CreateProcess.
2194
2195 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2196
2197 * inferiors.c (current_inferior_cwd): New global variable.
2198 (get_inferior_cwd): New function.
2199 * inferiors.h (struct process_info) <cwd>: New field.
2200
2201 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2202
2203 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2204 (OBS): Add gdb_tilde_expand.o.
2205
2206 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2207
2208 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2209 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2210
2211 2017-09-29 Pedro Alves <palves@redhat.com>
2212
2213 * ax.c (gdb_parse_agent_expr): Constify.
2214 * ax.h (gdb_parse_agent_expr): Constify.
2215 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2216 Constify.
2217 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2218 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2219 * remote-utils.h (read_ptid): Constify.
2220 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2221 (process_point_options, process_serial_event): Constify.
2222 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2223 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2224 (cmd_qtbuffer): Constify.
2225
2226 2017-09-29 Pedro Alves <palves@redhat.com>
2227
2228 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2229 fails.
2230
2231 2017-09-29 Pedro Alves <palves@redhat.com>
2232
2233 * linux-low.c (handle_extended_wait): Pass parent thread instead
2234 of process to thread_db_notice_clone.
2235 * linux-low.h (thread_db_notice_clone): Replace parent process
2236 parameter with parent thread parameter.
2237 * thread-db.c (find_one_thread): Add comment.
2238 (thread_db_notice_clone): Replace parent process parameter with
2239 parent thread parameter. Temporarily switch to the parent thread.
2240
2241 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2242
2243 * gdbthread.h: Include "common-gdbthread.h".
2244 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2245 "if" when validating the ptid.
2246 * remote-utils.c: Include "gdbthread.h".
2247 (prepare_resume_reply): Use "switch_to_thread".
2248 * target.c (done_accessing_memory): Likewise.
2249
2250 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2251
2252 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2253 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2254 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2255 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2256 s390x-gs-linux64-ipa.o to ipa_obj.
2257 * linux-s390-low.c (HWCAP_S390_GS): New define.
2258 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2259 New functions.
2260 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2261 (s390_arch_setup): Check for guarded-storage support and choose
2262 appropriate tdesc.
2263 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2264 init_registers_s390x_gs_linux64.
2265 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2266 enum value.
2267 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2268 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2269
2270 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2271
2272 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2273
2274 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2275
2276 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2277 (thread_db_thread_handle): Declare.
2278 * linux-low.c (linux_target_ops): Initialize thread_handle.
2279 * server.c (handle_qxfer_threads_worker): Add support for
2280 "handle" attribute.
2281 * target.h (struct target_ops): Add new function pointer,
2282 thread_handle.
2283 (target_thread_handle): Define.
2284 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2285 field in lwp.
2286 (thread_db_thread_handle): New function.
2287
2288 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2289
2290 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2291 * linux-low.h (thread_db_notice_clone): Declare.
2292 * thread-db.c (thread_db_notice_clone): New function.
2293
2294 2017-09-21 Pedro Alves <palves@redhat.com>
2295
2296 * server.c (gdb_read_memory, handle_status, process_serial_event)
2297 (handle_serial_event, handle_target_event): Adjust to
2298 set_desired_thread prototype change.
2299 * target.c (set_desired_thread): Remove 'use_general' parameter
2300 and adjust.
2301 * target.h (set_desired_thread): Remove 'use_general' parameter.
2302
2303 2017-09-20 Tom Tromey <tom@tromey.com>
2304
2305 * target.c (target_terminal::terminal_state): Define.
2306 (target_terminal::init): Rename from target_terminal_init.
2307 (target_terminal::inferior): Rename from
2308 target_terminal_inferior.
2309 (target_terminal::ours): Rename from target_terminal_ours.
2310 (target_terminal::ours_for_output, target_terminal::info): New.
2311
2312 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2313
2314 * server.c (accumulate_file_name_length): Remove.
2315 (emit_dll_description): Adjust to std::string change.
2316 (handle_qxfer_libraries): Use std::string to hold document.
2317
2318 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2319
2320 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2321 return type of xml_escape_text.
2322 * server.c (emit_dll_description): Likewise.
2323
2324 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2325
2326 * server.c (captured_main): Accept argument for --selftest.
2327 Update run_tests call.
2328 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2329 when registering selftests.
2330
2331 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2332
2333 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2334 instead of "VEC" for "target_desc.reg_defs".
2335 (regcache_cpy): Likewise.
2336 (registers_to_string): Likewise.
2337 (registers_from_string): Likewise.
2338 (find_regno): Likewise.
2339 (supply_regblock): Likewise.
2340 (regcache_raw_read_unsigned): Likewise.
2341 * tdesc.c (init_target_desc): Likewise.
2342 (tdesc_create_reg): Likewise.
2343 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2344 (struct target_desc) <reg_defs>: Convert to "std::vector".
2345 (target_desc): Do not initialize "reg_defs".
2346 (~target_desc): Update code to use "std::vector" instead of "VEC"
2347 for "target_desc.reg_defs".
2348 (operator==): Likewise.
2349
2350 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2351
2352 * inferiors.h (thread_to_gdb_id): Remove.
2353 * inferiors.c (thread_to_gdb_id): Remove.
2354 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2355 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2356 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2357 Likewise.
2358 * nto-low.c (nto_fetch_registers, nto_store_registers,
2359 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2360
2361 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2362
2363 * inferiors.h (gdb_id_to_thread_id): Remove.
2364 * inferiors.c (gdb_id_to_thread_id): Remove.
2365 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2366 removal. Move pid declaration closer to where it's used.
2367
2368 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2369
2370 * server.c (handle_detach): New function.
2371 (process_serial_event): Move code out, call handle_detach.
2372
2373 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2374
2375 * server.c (require_running): Rename to ...
2376 (require_running_or_return): ... this ...
2377 (require_running_or_break): ... and this.
2378 (handle_query, process_serial_event): Adjust.
2379
2380 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2381
2382 * linux-low.c (linux_set_resume_request): Remove unused
2383 variables.
2384
2385 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2386
2387 * server.c (first_thread_of): Remove.
2388 (process_serial_event): Replace usage of first_thread_of with
2389 find_any_thread_of_pid.
2390 * tracepoint.c (same_process_p): Remove.
2391 (gdb_agent_about_to_close): Replace usage of same_process_p with
2392 find_any_thread_of_pid.
2393 * linux-x86-low.c (same_process_callback): Remove.
2394 (x86_arch_setup_process_callback): Replace usage of
2395 same_process_callback with find_any_thread_of_pid.
2396 * thread-db.c (any_thread_of): Remove.
2397 (switch_to_process): Replace usage of any_thread_of with
2398 find_any_thread_of_pid.
2399 * inferiors.c (thread_pid_matches_callback): Remove.
2400 (find_thread_process): Adjust to use find_any_thread_of_pid.
2401
2402 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2403
2404 * regcache.c (get_thread_regcache): Guard calls to "memset"
2405 with "!VEC_empty".
2406
2407 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2408
2409 * linux-low.c (handle_extended_wait): Use
2410 "allocate_target_description" instead of "XNEW".
2411 * linux-x86-low.c (initialize_low_arch): Likewise.
2412
2413 2017-09-05 Yao Qi <yao.qi@linaro.org>
2414
2415 * configure.srv (srv_i386_regobj): Remove.
2416 (srv_amd64_regobj): Remove.
2417 (srv_regobj): Set it to "" for x86 non-linux targets.
2418 * linux-x86-tdesc.c (i386_linux_read_description):
2419 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2420 (init_registers_i386): Remove the declaration.
2421 (tdesc_i386): Remove the declaration.
2422 (lynx_i386_arch_setup): Call i386_create_target_description.
2423 * nto-x86-low.c: Likewise.
2424 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2425 [!__x86_64__]: include arch/i386.h.
2426 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2427
2428 2017-09-05 Yao Qi <yao.qi@linaro.org>
2429
2430 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2431 i386/amd64-XXX-linux from it.
2432
2433 2017-09-05 Yao Qi <yao.qi@linaro.org>
2434
2435 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2436 false.
2437 (ipa_amd64_linux_regobj): Remove.
2438 (ipa_x32_linux_regobj): Remove.
2439
2440 2017-09-05 Yao Qi <yao.qi@linaro.org>
2441
2442 * Makefile.in (arch-amd64.o): New rule.
2443 * configure.srv: Append arch-amd64.o.
2444 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2445 (get_ipa_tdesc): Call amd64_linux_read_description.
2446 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2447 and init_registers_amd64_XXX.
2448 * linux-x86-low.c (x86_linux_read_description): Call
2449 amd64_linux_read_description.
2450 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2451 (initialize_low_arch): Don't call init_registers_x32_XXX and
2452 init_registers_amd64_XXX.
2453 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2454 and tdesc_amd64_XXX.
2455 [__x86_64__] (amd64_tdesc_test): New function.
2456 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2457 and init_registers_amd64_XXX.
2458 * linux-x86-tdesc.c: Include arch/amd64.h.
2459 (xcr0_to_tdesc_idx): New function.
2460 (i386_linux_read_description): New function.
2461 (amd64_get_ipa_tdesc_idx): New function.
2462 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2463 (amd64_get_ipa_tdesc): Declare.
2464
2465 2017-09-05 Yao Qi <yao.qi@linaro.org>
2466
2467 * configure.srv (srv_i386_linux_xmlfiles): Remove
2468 i386/i386-XXX-linux.xml from it.
2469
2470 2017-09-05 Yao Qi <yao.qi@linaro.org>
2471
2472 * configure.srv: Set srv_i386_linux_regobj empty if $development
2473 is false.
2474 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2475 initialize_low_tdesc.
2476 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2477 with #if initialize_low_tdesc.
2478 * linux-x86-tdesc-selftest.c: New file.
2479 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2480
2481 2017-09-05 Yao Qi <yao.qi@linaro.org>
2482
2483 * Makefile.in (arch-i386.o): New rule.
2484 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2485 (x86_64-*-linux*): Likewise.
2486 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2487 include arch/i386.h.
2488 (i386_linux_read_description): Remove code and call
2489 i386_create_target_description.
2490 * tdesc.c (allocate_target_description): New function.
2491 * tdesc.h (set_tdesc_architecture): Remove declaration.
2492 (set_tdesc_osabi): Likewise.
2493
2494 2017-09-05 Yao Qi <yao.qi@linaro.org>
2495
2496 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2497 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2498 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2499 .xmltarget.
2500 * server.c (get_features_xml): Call tdesc_get_features_xml.
2501 * tdesc.c (set_tdesc_architecture): New function.
2502 (set_tdesc_osabi): New function.
2503 (tdesc_get_features_xml): New function.
2504 (tdesc_create_feature): Add an argument.
2505 * tdesc.h (struct target_desc) <features>: New field.
2506 <arch, osabi>: New field.
2507 (~target_desc): xfree features, arch, and osabi.
2508 (target_desc::oerator==): Don't compare .xmltarget.
2509 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2510 (set_tdesc_osabi): Likewise.
2511 (tdesc_get_features_xml): Likewise.
2512
2513 2017-09-05 Yao Qi <yao.qi@linaro.org>
2514
2515 * linux-x86-tdesc.c: Include selftest.h.
2516 (i386_tdesc_test): New function.
2517 (initialize_low_tdesc): Call selftests::register_test.
2518 * tdesc.h: Include regdef.h.
2519 (target_desc): Override operator == and !=.
2520
2521 2017-09-05 Yao Qi <yao.qi@linaro.org>
2522
2523 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2524 (ipa_obj): Likewise.
2525 * linux-i386-ipa.c: Include common/x86-xstate.h
2526 (get_ipa_tdesc): Call i386_linux_read_description.
2527 (initialize_low_tracepoint): Don't call init_registers_XXX
2528 functions, call initialize_low_tdesc instead.
2529 * linux-x86-low.c (x86_linux_read_description): Call
2530 i386_linux_read_description.
2531 (initialize_low_arch): Don't call init_registers_i386_XXX
2532 functions, call initialize_low_tdesc.
2533 * linux-x86-tdesc.c: New file.
2534 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2535 (i386_get_ipa_tdesc_idx): Declare.
2536 (i386_get_ipa_tdesc): Declare.
2537 (initialize_low_tdesc): Declare.
2538
2539 2017-09-05 Yao Qi <yao.qi@linaro.org>
2540
2541 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2542 instead of 0.
2543
2544 2017-09-05 Yao Qi <yao.qi@linaro.org>
2545
2546 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2547 * regcache.c (get_thread_regcache): Use VEC_length.
2548 (init_register_cache): Likewise.
2549 (regcache_cpy): Likewise.
2550 (registers_to_string): Iterate reg_defs via VEC_iterate.
2551 (find_regno): Likewise.
2552 (find_register_by_number): Use VEC_index.
2553 (register_size): Call find_register_by_number.
2554 (register_data): Call find_register_by_number.
2555 (supply_regblock): Use VEC_length.
2556 (regcache_raw_read_unsigned): Likewise.
2557 * tdesc.c (init_target_desc): Iterate reg_defs via
2558 VEC_iterate.
2559 (default_description): Update initializer.
2560 (copy_target_description): Don't update field num_registers.
2561 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2562 <num_registers>: Remove.
2563
2564 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2565
2566 * Makefile.in (.SECONDARY): Define target.
2567
2568 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2569
2570 * linux-low.c (linux_wait_1): Adjust.
2571 * server.c (queue_stop_reply_callback): Adjust.
2572
2573 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2574
2575 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2576 QEnvironmentUnset and QEnvironmentReset packets.
2577 (handle_query): Inform remote that QEnvironmentHexEncoded,
2578 QEnvironmentUnset and QEnvironmentReset are supported.
2579
2580 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2581
2582 * inferiors.h (inferior_target_data): Rename to ...
2583 (thread_target_data): ... this.
2584 (inferior_regcache_data): Rename to ...
2585 (thread_regcache_data): ... this.
2586 (set_inferior_regcache_data): Rename to ...
2587 (set_thread_regcache_data): ... this.
2588 * inferiors.c (inferior_target_data): Rename to ...
2589 (thread_target_data): ... this.
2590 (inferior_regcache_data): Rename to ...
2591 (thread_regcache_data): ... this.
2592 (set_inferior_regcache_data): Rename to ...
2593 (set_thread_regcache_data): ... this.
2594 (free_one_thread): Update.
2595 * linux-low.h (get_thread_lwp): Update.
2596 * regcache.c (get_thread_regcache): Update.
2597 (regcache_invalidate_thread): Update.
2598 (free_register_cache_thread): Update.
2599 * win32-i386-low.c (update_debug_registers_callback): Update.
2600 (win32_get_current_dr): Update.
2601 * win32-low.c (thread_rec): Update.
2602 (delete_thread_info): Update.
2603 (continue_one_thread): Update.
2604 (suspend_one_thread): Update.
2605
2606 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2607
2608 * inferiors.c (set_inferior_target_data): Remove.
2609 * inferiors.h (set_inferior_target_data): Remove.
2610
2611 2017-08-18 Yao Qi <yao.qi@linaro.org>
2612
2613 * Makefile.in (OBS): Add selftest.o.
2614 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2615 * configure, config.in: Re-generated.
2616 * server.c: Include common/sefltest.h.
2617 (captured_main): Handle option --selftest.
2618
2619 2017-08-09 Yao Qi <yao.qi@linaro.org>
2620
2621 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2622 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2623 i386-avx-mpx.o and i386-mmx.o.
2624 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2625 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2626 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2627 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2628 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2629 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2630 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2631 i386/amd64-avx-mpx.xml.
2632
2633 2017-08-09 Yao Qi <yao.qi@linaro.org>
2634
2635 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2636 and x32-avx-avx512.o.
2637 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2638 i386/x32-avx-avx512.xml.
2639
2640 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2641
2642 * tracepoint.h (enum class fast_tpoint_collect_result): New
2643 enumeration.
2644 (fast_tracepoint_collecting): Change return type to
2645 fast_tpoint_collect_result.
2646 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2647 * linux-low.h: Include tracepoint.h.
2648 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2649 fast_tpoint_collect_result.
2650 * linux-low.c (handle_tracepoints): Adjust.
2651 (linux_fast_tracepoint_collecting): Change return type to
2652 fast_tpoint_collect_result.
2653 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2654 linux_wait_1, stuck_in_jump_pad_callback,
2655 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2656 proceed_one_lwp): Adjust to type change.
2657
2658 2017-07-10 Yao Qi <yao.qi@linaro.org>
2659
2660 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2661
2662 2017-06-29 Yao Qi <yao.qi@linaro.org>
2663
2664 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2665 Remove.
2666 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2667
2668 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2669
2670 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2671
2672 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2673
2674 * linux-low.c (linux_create_inferior): Adjust code to access the
2675 environment information via 'gdb_environ' class.
2676 * lynx-low.c (lynx_create_inferior): Likewise.
2677 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2678 (get_environ): Return a pointer to 'our_environ'.
2679 (captured_main): Initialize 'our_environ'.
2680 * server.h (get_environ): Adjust prototype.
2681 * spu-low.c (spu_create_inferior): Adjust code to access the
2682 environment information via 'gdb_environ' class.
2683
2684 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2685
2686 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2687 usage of "register" keyword.
2688
2689 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2690
2691 * configure: Re-generate.
2692
2693 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2694
2695 * configure: Re-generate.
2696
2697 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2698
2699 * Makefile.in (COMPILE.pre): Add "-x c++".
2700
2701 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2702
2703 * fork-child.c: Conditionally include <signal.h>.
2704
2705 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2706
2707 * server.c (handle_general_set): Handle new packet
2708 "QStartupWithShell".
2709 (handle_query): Add "QStartupWithShell" to the list of supported
2710 packets.
2711 (gdbserver_usage): Add help text explaining the
2712 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2713 options.
2714 (captured_main): Recognize and act upon the presence of the new
2715 CLI options.
2716
2717 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2718 Pedro Alves <palves@redhat.com>
2719
2720 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2721 * configure: Regenerate.
2722 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2723 "fork-inferior.o".
2724 (i[34567]86-*-lynxos*): Likewise.
2725 (spu*-*-*): Likewise.
2726 * fork-child.c: New file.
2727 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2728 and "environ.h".
2729 (linux_ptrace_fun): New function.
2730 (linux_create_inferior): Adjust function prototype to reflect
2731 change on "target.h". Adjust function code to use
2732 "fork_inferior".
2733 (linux_request_interrupt): Delete "signal_pid".
2734 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2735 (lynx_ptrace_fun): New function.
2736 (lynx_create_inferior): Adjust function prototype to reflect
2737 change on "target.h". Adjust function code to use
2738 "fork_inferior".
2739 * nto-low.c (nto_create_inferior): Adjust function prototype and
2740 code to reflect change on "target.h". Update comments.
2741 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2742 "common-terminal.h" and "environ.h".
2743 (terminal_fd): Moved to fork-child.c.
2744 (old_foreground_pgrp): Likewise.
2745 (restore_old_foreground_pgrp): Likewise.
2746 (last_status): Make it global.
2747 (last_ptid): Likewise.
2748 (our_environ): New variable.
2749 (startup_with_shell): Likewise.
2750 (program_name): Likewise.
2751 (program_argv): Rename to...
2752 (program_args): ...this.
2753 (wrapper_argv): New variable.
2754 (start_inferior): Delete function.
2755 (get_exec_wrapper): New function.
2756 (get_exec_file): Likewise.
2757 (get_environ): Likewise.
2758 (prefork_hook): Likewise.
2759 (post_fork_inferior): Likewise.
2760 (postfork_hook): Likewise.
2761 (postfork_child_hook): Likewise.
2762 (handle_v_run): Update code to deal with arguments coming from the
2763 remote host. Update calls from "start_inferior" to
2764 "create_inferior".
2765 (captured_main): Likewise. Initialize environment variable. Call
2766 "have_job_control".
2767 * server.h (post_fork_inferior): New prototype.
2768 (get_environ): Likewise.
2769 (last_status): Declare.
2770 (last_ptid): Likewise.
2771 (signal_pid): Likewise.
2772 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2773 (spu_ptrace_fun): New function.
2774 (spu_create_inferior): Adjust function prototype to reflect change
2775 on "target.h". Adjust function code to use "fork_inferior".
2776 * target.c (target_terminal_init): New function.
2777 (target_terminal_inferior): Likewise.
2778 (target_terminal_ours): Likewise.
2779 * target.h: Include <vector>.
2780 (struct target_ops) <create_inferior>: Update prototype.
2781 (create_inferior): Update macro.
2782 * utils.c (gdb_flush_out_err): New function.
2783 * win32-low.c (win32_create_inferior): Adjust function prototype
2784 and code to reflect change on "target.h".
2785
2786 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2787
2788 * inferiors.c (switch_to_thread): New function.
2789
2790 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2791
2792 * Makefile.in (SFILE): Add "common/job-control.c".
2793 (OBS): Add "job-control.o".
2794
2795 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2796
2797 * Makefile: Remove "@host_makefile_frag@".
2798
2799 2017-05-05 Pedro Alves <palves@redhat.com>
2800
2801 * configure: Regenerate.
2802
2803 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2804
2805 * configure: Regenerate.
2806
2807 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2808
2809 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2810 software_single_step change of return type to
2811 std::vector<CORE_ADDR>.
2812 * linux-low.c (install_software_single_step_breakpoints):
2813 Likewise.
2814 * linux-low.h (install_software_single_step_breakpoints):
2815 Likewise.
2816
2817 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2818
2819 * remote-utils.c: Include "gdb_termios.h" instead of
2820 "terminal.h".
2821 * terminal.h: Delete file.
2822
2823 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2824
2825 * server.c: Include <vector>.
2826 <program_argv, wrapper_argv>: Convert to std::vector.
2827 (start_inferior): Rewrite function to use C++.
2828 (handle_v_run): Likewise. Update code that calculates the argv
2829 based on the vRun packet; use C++.
2830 (captured_main): Likewise.
2831
2832 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2833
2834 * server.c (handle_v_cont): Initialize thread_resume::thread
2835 with null_ptid.
2836
2837 2017-04-05 Pedro Alves <palves@redhat.com>
2838
2839 * configure: Regenerate.
2840
2841 2017-04-05 Pedro Alves <palves@redhat.com>
2842
2843 * gdbreplay.c (sync_error): Constify.
2844 * linux-x86-low.c (push_opcode): Constify.
2845
2846 2017-04-05 Pedro Alves <palves@redhat.com>
2847
2848 * win32-low.c (get_child_debug_event)
2849 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2850 Report TARGET_WAITKIND_SPURIOUS instead.
2851
2852 2017-04-05 Pedro Alves <palves@redhat.com>
2853
2854 * remote-utils.c (remote_prepare, remote_open): Constify.
2855 * remote-utils.h (remote_prepare, remote_open): Constify.
2856 * server.c (captured_main): Constify 'port' handling.
2857
2858 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2859
2860 * Makefile.in (clean): Clear .deps.
2861
2862 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2863
2864 * .gitignore: Remove generated files, replace with wildcard.
2865 * (clean): Replace removal of generated files with wildcard.
2866 (version.c): Replace with...
2867 (version-generated.c): ...this.
2868 (xml-builtin.c): Replace with...
2869 (xml-builtin-generated.c): ...this.
2870 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2871 (%.c: *regformats*): Replace with...
2872 (%-generated.c: *regformats*): ...this.
2873
2874 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2875
2876 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2877 (xtensa_fill_gregset): Call collect_register_by_name for
2878 threadptr register.
2879 (xtensa_store_gregset): Call supply_register_by_name for
2880 threadptr register.
2881
2882 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2883
2884 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2885 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2886 (xtensa_store_gregset): Call supply_register for all registers in
2887 a0_regnum..a0_regnum + C0_NREGS range.
2888
2889 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2890
2891 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2892 (ax-ipa.o: ax.c): Remove.
2893 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2894 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2895 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2896 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2897 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2898
2899 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2900
2901 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2902 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2903 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2904 (errors-ipa.o: ../common/errors.c): Remove.
2905 (format-ipa.o: ../common/format.c): Remove.
2906 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2907
2908 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2909
2910 * Makefile.in (%-ipa.o: %.c): New rule.
2911 (tracepoint-ipa.o: tracepoint.c): Remove.
2912 (utils-ipa.o: utils.c): Remove.
2913 (remote-utils-ipa.o: remote-utils.c): Remove.
2914 (regcache-ipa.o: regcache.c): Remove.
2915 (i386-linux-ipa.o: i386-linux.c): Remove.
2916 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2917 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2918 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2919 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2920 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2921 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2922 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2923 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2924 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2925 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2926 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2927 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2928 (aarch64-ipa.o: aarch64.c): Remove.
2929 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2930 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2931 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2932 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2933 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2934 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2935 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2936 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2937 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2938 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2939 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2940 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2941 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2942 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2943 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2944 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2945 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2946 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2947 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2948 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2949 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2950 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2951 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2952 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2953 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2954 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2955 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2956 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2957 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2958 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2959 (tdesc-ipa.o: tdesc.c): Remove.
2960 (x32-linux-ipa.o: x32-linux.c): Remove.
2961 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2962 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2963
2964 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2965
2966 * Makefile.in (%.o: ../arch/%.c): New rule.
2967 (arm.o: ../arch/arm.c): Remove.
2968 (arm-linux.o: ../arch/arm-linux.c): Remove.
2969 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2970 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2971
2972 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2973
2974 * Makefile.in (%.o: ../nat/%.c): New rule.
2975 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2976 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2977 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2978 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2979 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2980 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2981 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2982 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2983 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2984 (linux-personality.o: ../nat/linux-personality.c): Remove.
2985 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2986 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2987 (x86-linux.o: ../nat/x86-linux.c): Remove.
2988 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2989 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2990
2991 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2992
2993 * Makefile.in (%.o: ../common/%.c): New rule.
2994 (signals.o: ../common/signals.c): Remove.
2995 (print-utils.o: ../common/print-utils.c): Remove.
2996 (rsp-low.o: ../common/rsp-low.c): Remove.
2997 (common-utils.o: ../common/common-utils.c): Remove.
2998 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2999 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3000 (vec.o: ../common/vec.c): Remove.
3001 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3002 (xml-utils.o: ../common/xml-utils.c): Remove.
3003 (ptid.o: ../common/ptid.c): Remove.
3004 (buffer.o: ../common/buffer.c): Remove.
3005 (format.o: ../common/format.c): Remove.
3006 (filestuff.o: ../common/filestuff.c): Remove.
3007 (agent.o: ../common/agent.c): Remove.
3008 (errors.o: ../common/errors.c): Remove.
3009 (environ.o: ../common/environ.c): Remove.
3010 (common-debug.o: ../common/common-debug.c): Remove.
3011 (cleanups.o: ../common/cleanups.c): Remove.
3012 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3013 (fileio.o: ../common/fileio.c): Remove.
3014 (common-regcache.o: ../common/common-regcache.c): Remove.
3015 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3016 (new-op.o: ../common/new-op.c): Remove.
3017 (btrace-common.o: ../common/btrace-common.c): Remove.
3018
3019 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3020
3021 * Makefile.in (%.o: ../target/%.c): New rule.
3022 (waitstatus.o: ../target/waitstatus.c): Remove.
3023
3024 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3025
3026 * Makefile.in
3027 (%.c: ../regformats/%.dat,
3028 (%.c: ../regformats/arm/%.dat,
3029 (%.c: ../regformats/i386/%.dat,
3030 (%.c: ../regformats/rs6000/%.dat): New rules.
3031 (aarch64.c): Remove.
3032 (reg-arm.c): Remove.
3033 (arm-with-iwmmxt.c): Remove.
3034 (arm-with-vfpv2.c): Remove.
3035 (arm-with-vfpv3.c): Remove.
3036 (arm-with-neon.c): Remove.
3037 (reg-bfin.c): Remove.
3038 (reg-cris.c): Remove.
3039 (reg-crisv32.c): Remove.
3040 (i386.c): Remove.
3041 (i386-linux.c): Remove.
3042 (i386-avx.c): Remove.
3043 (i386-avx-linux.c): Remove.
3044 (i386-avx-avx512.c): Remove.
3045 (i386-avx-avx512-linux.c): Remove.
3046 (i386-mpx.c): Remove.
3047 (i386-mpx-linux.c): Remove.
3048 (i386-avx-mpx-avx512-pku.c): Remove.
3049 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3050 (i386-avx-mpx.c): Remove.
3051 (i386-avx-mpx-linux.c): Remove.
3052 (i386-mmx.c): Remove.
3053 (i386-mmx-linux.c): Remove.
3054 (reg-ia64.c): Remove.
3055 (reg-m32r.c): Remove.
3056 (reg-m68k.c): Remove.
3057 (reg-cf.c): Remove.
3058 (mips-linux.c): Remove.
3059 (mips-dsp-linux.c): Remove.
3060 (mips64-linux.c): Remove.
3061 (mips64-dsp-linux.c): Remove.
3062 (nios2-linux.c): Remove.
3063 (powerpc-32.c): Remove.
3064 (powerpc-32l.c): Remove.
3065 (powerpc-altivec32l.c): Remove.
3066 (powerpc-cell32l.c): Remove.
3067 (powerpc-vsx32l.c): Remove.
3068 (powerpc-isa205-32l.c): Remove.
3069 (powerpc-isa205-altivec32l.c): Remove.
3070 (powerpc-isa205-vsx32l.c): Remove.
3071 (powerpc-e500l.c): Remove.
3072 (powerpc-64l.c): Remove.
3073 (powerpc-altivec64l.c): Remove.
3074 (powerpc-cell64l.c): Remove.
3075 (powerpc-vsx64l.c): Remove.
3076 (powerpc-isa205-64l.c): Remove.
3077 (powerpc-isa205-altivec64l.c): Remove.
3078 (powerpc-isa205-vsx64l.c): Remove.
3079 (s390-linux32.c): Remove.
3080 (s390-linux32v1.c): Remove.
3081 (s390-linux32v2.c): Remove.
3082 (s390-linux64.c): Remove.
3083 (s390-linux64v1.c): Remove.
3084 (s390-linux64v2.c): Remove.
3085 (s390-te-linux64.c): Remove.
3086 (s390-vx-linux64.c): Remove.
3087 (s390-tevx-linux64.c): Remove.
3088 (s390x-linux64.c): Remove.
3089 (s390x-linux64v1.c): Remove.
3090 (s390x-linux64v2.c): Remove.
3091 (s390x-te-linux64.c): Remove.
3092 (s390x-vx-linux64.c): Remove.
3093 (s390x-tevx-linux64.c): Remove.
3094 (tic6x-c64xp-linux.c): Remove.
3095 (tic6x-c64x-linux.c): Remove.
3096 (tic6x-c62x-linux.c): Remove.
3097 (reg-sh.c): Remove.
3098 (reg-sparc64.c): Remove.
3099 (reg-spu.c): Remove.
3100 (amd64.c): Remove.
3101 (amd64-linux.c): Remove.
3102 (amd64-avx.c): Remove.
3103 (amd64-avx-linux.c): Remove.
3104 (amd64-avx-avx512.c): Remove.
3105 (amd64-avx-avx512-linux.c): Remove.
3106 (amd64-mpx.c): Remove.
3107 (amd64-mpx-linux.c): Remove.
3108 (amd64-avx-mpx-avx512-pku.c): Remove.
3109 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3110 (amd64-avx-mpx.c): Remove.
3111 (amd64-avx-mpx-linux.c): Remove.
3112 (x32.c): Remove.
3113 (x32-linux.c): Remove.
3114 (x32-avx.c): Remove.
3115 (x32-avx-linux.c): Remove.
3116 (x32-avx-avx512.c): Remove.
3117 (x32-avx-avx512-linux.c): Remove.
3118 (reg-xtensa.c): Remove.
3119 (reg-tilegx.c): Remove.
3120 (reg-tilegx32.c): Remove.
3121
3122 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3123
3124 * Makefile.in (SFILES): Add "common/environ.c".
3125 (OBJS): Add "common/environ.h".
3126
3127 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3128
3129 * configure.ac: Check if the fs_base and gs_base members of
3130 `struct user_regs_struct' exist.
3131 * config.in: Regenerated.
3132 * configure: Likewise.
3133
3134 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3135
3136 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3137 target_read_memory.
3138 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3139 (get_next_pcs_syscall_next_pc): Likewise.
3140
3141 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3142
3143 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3144 * nto-x86-low.c: Likewise.
3145
3146 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3147
3148 * Makefile.in: Include disable-implicit-rules.mk.
3149
3150 2016-11-23 Pedro Alves <palves@redhat.com>
3151
3152 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3153 (debug_vprintf): Use std::chrono::steady_clock instead of
3154 gettimeofday. Use '.' instead of ':'.
3155 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3156 (get_timestamp): Use std::chrono::steady_clock instead of
3157 gettimeofday.
3158
3159 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3160
3161 * Makefile.in: Fix whitespace formatting.
3162
3163 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3164
3165 * Makefile.in (SFILES, OBS): Flatten list and order
3166 alphabetically.
3167
3168 2016-11-23 Pedro Alves <palves@redhat.com>
3169
3170 * event-loop.c (handle_file_event): Use warning.
3171 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3172 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3173 Use warning.
3174
3175 2016-11-23 Pedro Alves <palves@redhat.com>
3176
3177 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3178 output.
3179 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3180 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3181 debug_printf and debug_flush for debug output.
3182 * server.c (handle_general_set): Likewise.
3183 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3184 output.
3185
3186 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3187
3188 * Makefile.in (.c.o): Replace rule with ...
3189 (%.o: %.c): ... this one.
3190
3191 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3192
3193 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3194 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3195 make.
3196 * configure.ac: Remove checks for the make program.
3197 * configure: Re-generate.
3198
3199 2016-10-28 Pedro Alves <palves@redhat.com>
3200
3201 * Makefile.in (CXX_DIALECT): Get from configure.
3202 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3203 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3204 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3205 * config.in: Regenerate.
3206 * configure: Regenerate.
3207
3208 2016-10-27 Yao Qi <yao.qi@linaro.org>
3209
3210 * linux-low.c (linux_supports_range_stepping): Return true if
3211 can_software_single_step return true.
3212
3213 2016-10-27 Yao Qi <yao.qi@linaro.org>
3214
3215 * inferiors.c (find_inferior_in_random): New function.
3216 * inferiors.h (find_inferior_in_random): Declare.
3217 * linux-low.c (linux_wait_for_event_filtered): Call
3218 find_inferior_in_random instead of find_inferior.
3219
3220 2016-10-27 Yao Qi <yao.qi@linaro.org>
3221
3222 * linux-low.c (linux_wait_1): If single-step breakpoints are
3223 inserted, remove them.
3224
3225 2016-10-26 Pedro Alves <palves@redhat.com>
3226
3227 * linux-low.c (handle_extended_wait): Link parent/child fork
3228 threads.
3229 (linux_wait_1): Unlink them.
3230 (linux_set_resume_request): Ignore resume requests for
3231 already-resumed and unhandled fork child threads.
3232 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3233 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3234 New functions.
3235 (handle_v_requests) <vCont>: Don't call require_running.
3236 * server.h (in_queued_stop_replies): New declaration.
3237
3238 2016-10-24 Yao Qi <yao.qi@linaro.org>
3239
3240 PR server/20733
3241 * linux-aarch64-low.c (append_insns): Cast the return value to
3242 'uint32_t *'.
3243
3244 2016-10-10 Yao Qi <yao.qi@linaro.org>
3245
3246 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3247
3248 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3249
3250 * target.c (target_supports_multi_process): New function, moved
3251 from...
3252 * target.h (target_supports_multi_process): ... here. Remove
3253 macro.
3254
3255 2016-10-05 Tom Tromey <tom@tromey.com>
3256
3257 PR remote/20655:
3258 * tracepoint.c (handle_tracepoint_bkpts): Check
3259 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3260
3261 2016-10-05 Yao Qi <yao.qi@linaro.org>
3262
3263 * configure.srv: Update the path of arm-*.xml files.
3264
3265 2016-10-05 Terry Guo <terry.guo@arm.com>
3266 Yao Qi <yao.qi@linaro.org>
3267
3268 * Makefile.in: Adjust the path of rules.
3269 * configure.srv: Update the path of xml files.
3270 * regformats/arm-with-iwmmxt.dat: Regenerated.
3271 * regformats/arm-with-neon.dat: Likewise.
3272 * regformats/arm-with-vfpv2.dat: Likewise.
3273 * regformats/arm-with-vfpv3.dat Likewise.
3274
3275 2016-09-30 Yao Qi <yao.qi@linaro.org>
3276
3277 PR gdbserver/20627
3278 * target.c (target_stop_and_wait): Don't call
3279 target_continue_no_signal, use resume_stop instead.
3280
3281 2016-09-26 Yao Qi <yao.qi@linaro.org>
3282
3283 * linux-low.c (linux_wait_1): Call debug_exit.
3284
3285 2016-09-23 Pedro Alves <palves@redhat.com>
3286
3287 * Makefile.in (SFILES): Add common/new-op.c.
3288 (OBS): Add common/new-op.o.
3289 (new-op.o): New rule.
3290
3291 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3292
3293 * .gitinore: Ignore more files.
3294
3295 2016-09-21 Yao Qi <yao.qi@linaro.org>
3296
3297 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3298 23.
3299
3300 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3301
3302 * server.c (start_inferior): Call target_mourn_inferior instead of
3303 mourn_inferior; pass ptid_t argument to it.
3304 (resume): Likewise.
3305 (handle_target_event): Likewise.
3306 * target.c (target_mourn_inferior): New function.
3307 * target.h (mourn_inferior): Delete macro.
3308
3309 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3310
3311 * linux-low.c (lwp_is_stepping): New function.
3312
3313 2016-09-06 Carl Love <cel@us.ibm.com>
3314
3315 * server.c (start_inferior): Fixed comment, requested comment change
3316 didn't get updated correctly. Removed reference to ptrace () call as
3317 it is only true on Linux systems.
3318
3319 2016-09-06 Carl Love <cel@us.ibm.com>
3320
3321 * server.c (start_inferior): Do not call
3322 function target_post_create_inferior () if the
3323 inferior process has already exited.
3324
3325 2016-09-05 Pedro Alves <palves@redhat.com>
3326
3327 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3328 (COMPILE.pre, CC_LD): Use CXX directly.
3329 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3330 * acinclude.m4: Don't include build-with-cxx.m4.
3331 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3332 * configure: Regenerate.
3333
3334 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3335
3336 PR gdb/19495
3337 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3338 call writing data to own_buf.
3339
3340 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3341
3342 * target.c (mywait): Call target_wait instead of
3343 the_target->wait.
3344 (target_wait): New function.
3345
3346 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3347
3348 * server.c (start_inferior): New variable 'ptid'. Replace calls
3349 to the_target->resume by target_continue{,_no_signal}, depending
3350 on the case.
3351 * target.c (target_stop_and_wait): Call target_continue_no_signal
3352 instead of the_target->resume.
3353 (target_continue): New function.
3354
3355 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3356
3357 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3358
3359 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3360
3361 PR server/20491
3362 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3363 ps_prochandle.
3364 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3365 * linux-arm-low.c (ps_get_thread_area): Likewise.
3366 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3367 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3368 * linux-mips-low.c (ps_get_thread_area): Likewise.
3369 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3370 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3371 * linux-x86-low.c (ps_get_thread_area): Likewise.
3372 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3373
3374 2016-08-19 Pedro Alves <palves@redhat.com>
3375
3376 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3377
3378 2016-08-19 Pedro Alves <palves@redhat.com>
3379
3380 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3381 comment. Use memcpy instead of casting through unsigned long.
3382
3383 2016-08-19 Pedro Alves <palves@redhat.com>
3384
3385 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3386 allocating around 0x80000000.
3387
3388 2016-08-19 Pedro Alves <palves@redhat.com>
3389
3390 PR gdb/20415
3391 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3392 (x32-avx512-linux-ipa.o): New rules.
3393 * configure.ac (x86_64-*-linux*): New x32 check.
3394 * configure.srv (ipa_x32_linux_regobj): New.
3395 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3396 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3397 descriptions.
3398 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3399 descriptions.
3400 * configure: Regenerate.
3401
3402 2016-08-09 Pedro Alves <palves@redhat.com>
3403
3404 PR gdb/18653
3405 * Makefile.in (OBS): Add signals-state-save-restore.o.
3406 (signals-state-save-restore.o): New rule.
3407 * config.in: Regenerate.
3408 * configure: Regenerate.
3409 * linux-low.c: Include "signals-state-save-restore.h".
3410 (linux_create_inferior): Call
3411 restore_original_signals_state.
3412 * server.c: Include "dispositions-save-restore.h".
3413 (captured_main): Call save_original_signals_state.
3414
3415 2016-08-05 Pedro Alves <palves@redhat.com>
3416
3417 * configure: Regenerate.
3418
3419 2016-08-04 Yao Qi <yao.qi@linaro.org>
3420
3421 * linux-low.c (regsets_fetch_inferior_registers): Check
3422 errno is ESRCH or not.
3423
3424 2016-08-02 Yao Qi <yao.qi@linaro.org>
3425
3426 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3427 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3428 (thread_db_load_search): Update.
3429 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3430 td_ta_set_event and td_ta_event_getmsg.
3431
3432 2016-07-26 Pedro Alves <palves@redhat.com>
3433
3434 PR server/20414
3435 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3436 of unsigned long for 64-bit registers and use uint32_t instead of
3437 unsigned int for 32-bit registers.
3438
3439 2016-07-26 Pedro Alves <palves@redhat.com>
3440
3441 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3442 to 'ptrace'.
3443
3444 2016-07-21 Tom Tromey <tom@tromey.com>
3445
3446 * configure: Rebuild.
3447
3448 2016-07-21 Yao Qi <yao.qi@linaro.org>
3449
3450 * mem-break.c (find_gdb_breakpoint): Cast bp to
3451 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3452
3453 2016-07-21 Yao Qi <yao.qi@linaro.org>
3454
3455 * server.c (handle_v_requests): Support s and S actions
3456 if target_supports_software_single_step return true.
3457
3458 2016-07-21 Yao Qi <yao.qi@linaro.org>
3459
3460 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3461 is resume_step, call maybe_hw_step.
3462 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3463 and unstop them.
3464 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3465 breakpoints or not.
3466 (proceed_one_lwp): If resume request is resume_step, install
3467 reinsert breakpoints and call maybe_hw_step.
3468
3469 2016-07-21 Yao Qi <yao.qi@linaro.org>
3470
3471 * linux-low.c (proceed_one_lwp): Declare.
3472 (linux_resume_one_thread): Remove local variable 'step'.
3473 Lift code enqueue signal. Call proceed_one_lwp instead of
3474 linux_resume_one_lwp.
3475
3476 2016-07-21 Yao Qi <yao.qi@linaro.org>
3477
3478 * linux-low.c (linux_resume_one_thread): Call
3479 enqueue_pending_signal.
3480
3481 2016-07-21 Yao Qi <yao.qi@linaro.org>
3482
3483 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3484 * inferiors.c (do_restore_current_thread_cleanup): New function.
3485 (make_cleanup_restore_current_thread): Likewise.
3486 * linux-low.c (install_software_single_step_breakpoints): Call
3487 make_cleanup_restore_current_thread. Switch current_thread to
3488 thread.
3489
3490 2016-07-21 Yao Qi <yao.qi@linaro.org>
3491
3492 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3493 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3494 (clone_one_breakpoint): Likewise.
3495 (delete_reinsert_breakpoints): Change parameter to thread.
3496 Callers updated.
3497 (has_reinsert_breakpoints): Likewise.
3498 (uninsert_reinsert_breakpoints): Likewise.
3499 (reinsert_reinsert_breakpoints): Likewise.
3500 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3501 (delete_reinsert_breakpoints): Likewise.
3502 (reinsert_reinsert_breakpoints): Likewise.
3503 (uninsert_reinsert_breakpoints): Likewise.
3504 (has_reinsert_breakpoints): Likewise.
3505
3506 2016-07-21 Yao Qi <yao.qi@linaro.org>
3507
3508 * inferiors.c (get_thread_process): Make parameter const.
3509 * inferiors.h (get_thread_process): Update declaration.
3510 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3511 Add new parameters child_thread and parent_thread. Callers
3512 updated.
3513 * mem-break.h (clone_all_breakpoints): Update declaration.
3514
3515 2016-07-21 Yao Qi <yao.qi@linaro.org>
3516
3517 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3518 <command_list, handler>: Remove.
3519 (struct gdb_breakpoint): New.
3520 (struct other_breakpoint): New.
3521 (struct reinsert_breakpoint): New.
3522 (is_gdb_breakpoint): New function.
3523 (any_persistent_commands): Update command_list if
3524 is_gdb_breakpoint returns true.
3525 (set_breakpoint): Create breakpoints according to their types.
3526 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3527 (set_gdb_breakpoint_1): Likewise.
3528 (set_gdb_breakpoint): Likewise.
3529 (clear_breakpoint_conditions): Change parameter type to
3530 'struct gdb_breakpoint *'.
3531 (clear_breakpoint_commands): Likewise.
3532 (clear_breakpoint_conditions_and_commands): Likewise.
3533 (add_condition_to_breakpoint): Likewise.
3534 (add_breakpoint_condition): Likewise.
3535 (add_commands_to_breakpoint): Likewise.
3536 (check_breakpoints): Check other_breakpoint.
3537 (clone_one_breakpoint): Clone breakpopint according to its type.
3538 * mem-break.h (struct gdb_breakpoint): Declare.
3539 (set_gdb_breakpoint): Update declaration.
3540 (clear_breakpoint_conditions_and_commands): Likewise.
3541 (add_breakpoint_condition): Likewise.
3542 (add_breakpoint_commands): Likewise.
3543 * server.c (process_point_options): Change parameter type to
3544 'struct gdb_breakpoint *'.
3545
3546 2016-07-21 Yao Qi <yao.qi@linaro.org>
3547
3548 * mem-break.c (set_breakpoint_at): Rename it to ...
3549 (set_breakpoint_type_at): ... it.
3550 (set_breakpoint_at): Call set_breakpoint_type_at.
3551 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3552 * mem-break.h (set_breakpoint_at): Update comments.
3553
3554 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3555
3556 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3557 to buf parameter.
3558 (nios2_store_gregset): Likewise.
3559
3560 2016-07-01 Pedro Alves <palves@redhat.com>
3561 Antoine Tremblay <antoine.tremblay@ericsson.com>
3562
3563 * linux-low.c: Change interface to take the target lwp_info
3564 pointer directly and return void. Handle detaching from a zombie
3565 thread.
3566 (linux_detach_lwp_callback): New function.
3567 (linux_detach): Detach from the leader thread after detaching from
3568 the clone threads.
3569
3570 2016-06-28 Yao Qi <yao.qi@linaro.org>
3571
3572 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3573 for variable new_offset.
3574 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3575 (aarch64_ftrace_insn_reloc_cb): Likewise.
3576 (aarch64_ftrace_insn_reloc_tb): Likewise.
3577 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3578 PRIx64 instead of PRIx32.
3579
3580 2016-06-28 Yao Qi <yao.qi@linaro.org>
3581
3582 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3583 (the_low_target): Install arm_get_syscall_trapinfo.
3584
3585 2016-06-28 Yao Qi <yao.qi@linaro.org>
3586
3587 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3588 function.
3589 (the_low_target): Install aarch64_get_syscall_trapinfo.
3590
3591 2016-06-28 Yao Qi <yao.qi@linaro.org>
3592
3593 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3594 Callers updated.
3595 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3596 Remove parameter sysno.
3597 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3598 sysret.
3599
3600 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3601
3602 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3603 (s390_emit_ne_goto): Likewise.
3604 (s390_emit_lt_goto): Likewise.
3605 (s390_emit_le_goto): Likewise.
3606 (s390_emit_gt_goto): Likewise.
3607 (s390_emit_ge_goto): Likewise.
3608 (s390x_emit_eq_goto): Likewise.
3609 (s390x_emit_ne_goto): Likewise.
3610 (s390x_emit_lt_goto): Likewise.
3611 (s390x_emit_le_goto): Likewise.
3612 (s390x_emit_gt_goto): Likewise.
3613 (s390x_emit_ge_goto): Likewise.
3614 (s390_emit_ops_impl): Mark variable static.
3615 (s390x_emit_ops): Likewise.
3616
3617 2016-06-17 Yao Qi <yao.qi@linaro.org>
3618
3619 * linux-low.c (handle_extended_wait): Call
3620 uninsert_reinsert_breakpoints for the parent process. Remove
3621 reinsert breakpoints from the child process. Reinsert them to
3622 the parent process when vfork is done.
3623 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3624 (reinsert_reinsert_breakpoints): New function.
3625 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3626 (reinsert_reinsert_breakpoints): Declare.
3627
3628 2016-06-17 Yao Qi <yao.qi@linaro.org>
3629
3630 * linux-low.c (handle_extended_wait): If the parent is doing
3631 step-over, remove the reinsert breakpoints from the forked child.
3632
3633 2016-06-17 Yao Qi <yao.qi@linaro.org>
3634
3635 * linux-low.c (unsuspend_all_lwps): Declare.
3636 (linux_low_filter_event): If thread exited, call finish_step_over.
3637 If step-over is finished, unsuspend other threads.
3638
3639 2016-06-17 Yao Qi <yao.qi@linaro.org>
3640
3641 * linux-low.c (linux_resume_one_lwp_throw): Assert
3642 has_reinsert_breakpoints returns false.
3643 * mem-break.c (delete_disabled_breakpoints): Assert
3644 bp type isn't reinsert_breakpoint.
3645
3646 2016-06-17 Yao Qi <yao.qi@linaro.org>
3647
3648 * linux-low.c (maybe_hw_step): New function.
3649 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3650 (finish_step_over): Switch current_thread to lwp temporarily,
3651 and assert has_reinsert_breakpoints returns true.
3652 (proceed_one_lwp): Call maybe_hw_step.
3653 * mem-break.c (has_reinsert_breakpoints): New function.
3654 * mem-break.h (has_reinsert_breakpoints): Declare.
3655
3656 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3657
3658 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3659
3660 2016-05-17 Yao Qi <yao.qi@linaro.org>
3661
3662 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3663 instead of find_inferior.
3664
3665 2016-05-05 Yao Qi <yao.qi@linaro.org>
3666
3667 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3668 Initialize res to zero.
3669
3670 2016-05-05 Yao Qi <yao.qi@linaro.org>
3671
3672 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3673 to uint32_t.
3674
3675 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3676
3677 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3678 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3679 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3680
3681 2016-04-28 Par Olsson <par.olsson@windriver.com>
3682 Simon Marchi <simon.marchi@ericsson.com>
3683
3684 * tracepoint.c (write_inferior_int8): New function.
3685 (cmd_qtenable_disable): Write enable flag using
3686 write_inferior_int8.
3687
3688 2016-04-25 Yao Qi <yao.qi@linaro.org>
3689
3690 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3691 (need_step_over_p): Return zero if the LWP has pending signals
3692 can be delivered on software single step target.
3693
3694 2016-04-25 Yao Qi <yao.qi@linaro.org>
3695
3696 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3697 return instead of error.
3698
3699 2016-04-22 Yao Qi <yao.qi@linaro.org>
3700
3701 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3702 to 23.
3703
3704 2016-04-22 Yao Qi <yao.qi@linaro.org>
3705
3706 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3707 signal when stepping over breakpoint with software single
3708 step.
3709
3710 2016-04-21 Pedro Alves <palves@redhat.com>
3711
3712 * linux-s390-low.c (s390_collect_ptrace_register)
3713 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3714 add casts.
3715 (s390_check_regset): Use void * instead of gdb_byte *.
3716
3717 2016-04-20 Pedro Alves <palves@redhat.com>
3718
3719 * configure: Renegerate.
3720
3721 2016-04-20 Yao Qi <yao.qi@linaro.org>
3722
3723 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3724 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3725 number 16.
3726 (arm_store_gregset): Likewise.
3727
3728 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3729
3730 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3731 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3732 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3733 (amd64-avx-mpx-linux.c): New rules.
3734 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3735 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3736 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3737 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3738 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3739 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3740 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3741 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3742 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3743 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3744 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3745 * linux-x86-low.c (x86_linux_read_description): Add case for
3746 X86_XSTATE_AVX_MPX_MASK.
3747 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3748 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3749 init_registers_i386_avx_mpx_linux.
3750 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3751 (initialize_low_tracepoint): Call
3752 init_registers_i386_avx_mpx_linux.
3753 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3754 (initialize_low_tracepoint): Call
3755 init_registers_amd64_avx_mpx_linux.
3756 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3757 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3758 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3759 declarations.
3760
3761 2016-04-18 Pedro Alves <palves@redhat.com>
3762
3763 * configure: Regenerate.
3764
3765 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3766
3767 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3768 (aarch64_emit_sub): Likewise.
3769
3770 2016-04-12 Pedro Alves <palves@redhat.com>
3771
3772 * utils.c (prepare_to_throw_exception): Delete.
3773
3774 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3775
3776 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3777
3778 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3779
3780 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3781
3782 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3783
3784 * linux-aarch64-ipa.c: Add <elf.h> include.
3785 * linux-ppc-ipa.c: Add <elf.h> include.
3786 * linux-s390-ipa.c: Add <elf.h> include.
3787
3788 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3789
3790 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3791 (get_raw_reg_ptr): Likewise.
3792 (get_trace_state_variable_value_ptr): Likewise.
3793 (set_trace_state_variable_value_ptr): Likewise.
3794 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3795 char *.
3796
3797 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3798 Marcin Kościelnicki <koriakin@0x04.net>
3799
3800 PR/17221
3801 * linux-ppc-low.c (emit_insns): New function.
3802 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3803 (ppc_emit_prologue): New function.
3804 (ppc_emit_epilogue): New function.
3805 (ppc_emit_add): New function.
3806 (ppc_emit_sub): New function.
3807 (ppc_emit_mul): New function.
3808 (ppc_emit_lsh): New function.
3809 (ppc_emit_rsh_signed): New function.
3810 (ppc_emit_rsh_unsigned): New function.
3811 (ppc_emit_ext): New function.
3812 (ppc_emit_zero_ext): New function.
3813 (ppc_emit_log_not): New function.
3814 (ppc_emit_bit_and): New function.
3815 (ppc_emit_bit_or): New function.
3816 (ppc_emit_bit_xor): New function.
3817 (ppc_emit_bit_not): New function.
3818 (ppc_emit_equal): New function.
3819 (ppc_emit_less_signed): New function.
3820 (ppc_emit_less_unsigned): New function.
3821 (ppc_emit_ref): New function.
3822 (ppc_emit_const): New function.
3823 (ppc_emit_reg): New function.
3824 (ppc_emit_pop): New function.
3825 (ppc_emit_stack_flush): New function.
3826 (ppc_emit_swap): New function.
3827 (ppc_emit_stack_adjust): New function.
3828 (ppc_emit_call): New function.
3829 (ppc_emit_int_call_1): New function.
3830 (ppc_emit_void_call_2): New function.
3831 (ppc_emit_if_goto): New function.
3832 (ppc_emit_goto): New function.
3833 (ppc_emit_eq_goto): New function.
3834 (ppc_emit_ne_goto): New function.
3835 (ppc_emit_lt_goto): New function.
3836 (ppc_emit_le_goto): New function.
3837 (ppc_emit_gt_goto): New function.
3838 (ppc_emit_ge_goto): New function.
3839 (ppc_write_goto_address): New function.
3840 (ppc_emit_ops_impl): New static variable.
3841 (ppc64v1_emit_prologue): New function.
3842 (ppc64v2_emit_prologue): New function.
3843 (ppc64_emit_epilogue): New function.
3844 (ppc64_emit_add): New function.
3845 (ppc64_emit_sub): New function.
3846 (ppc64_emit_mul): New function.
3847 (ppc64_emit_lsh): New function.
3848 (ppc64_emit_rsh_signed): New function.
3849 (ppc64_emit_rsh_unsigned): New function.
3850 (ppc64_emit_ext): New function.
3851 (ppc64_emit_zero_ext): New function.
3852 (ppc64_emit_log_not): New function.
3853 (ppc64_emit_bit_and): New function.
3854 (ppc64_emit_bit_or): New function.
3855 (ppc64_emit_bit_xor): New function.
3856 (ppc64_emit_bit_not): New function.
3857 (ppc64_emit_equal): New function.
3858 (ppc64_emit_less_signed): New function.
3859 (ppc64_emit_less_unsigned): New function.
3860 (ppc64_emit_ref): New function.
3861 (ppc64_emit_const): New function.
3862 (ppc64v1_emit_reg): New function.
3863 (ppc64v2_emit_reg): New function.
3864 (ppc64_emit_pop): New function.
3865 (ppc64_emit_stack_flush): New function.
3866 (ppc64_emit_swap): New function.
3867 (ppc64v1_emit_call): New function.
3868 (ppc64v2_emit_call): New function.
3869 (ppc64v1_emit_int_call_1): New function.
3870 (ppc64v2_emit_int_call_1): New function.
3871 (ppc64v1_emit_void_call_2): New function.
3872 (ppc64v2_emit_void_call_2): New function.
3873 (ppc64_emit_if_goto): New function.
3874 (ppc64_emit_eq_goto): New function.
3875 (ppc64_emit_ne_goto): New function.
3876 (ppc64_emit_lt_goto): New function.
3877 (ppc64_emit_le_goto): New function.
3878 (ppc64_emit_gt_goto): New function.
3879 (ppc64_emit_ge_goto): New function.
3880 (ppc64v1_emit_ops_impl): New static variable.
3881 (ppc64v2_emit_ops_impl): New static variable.
3882 (ppc_emit_ops): New function.
3883 (linux_low_target): Wire in ppc_emit_ops.
3884
3885 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3886 Marcin Kościelnicki <koriakin@0x04.net>
3887
3888 PR/17221
3889 * Makefile.in: Add powerpc-*-ipa.o
3890 * configure.srv: Add ipa_obj for powerpc*-linux.
3891 * linux-ppc-ipa.c: New file.
3892 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3893 includes.
3894 (PPC_FIELD): New macro.
3895 (PPC_SEXT): New macro.
3896 (PPC_OP6): New macro.
3897 (PPC_BO): New macro.
3898 (PPC_LI): New macro.
3899 (PPC_BD): New macro.
3900 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3901 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3902 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3903 (ppc_get_thread_area): New function.
3904 (is_elfv2_inferior): New function.
3905 (gen_ds_form): New function.
3906 (GEN_STD): New macro.
3907 (GEN_STDU): New macro.
3908 (GEN_LD): New macro.
3909 (GEN_LDU): New macro.
3910 (gen_d_form): New function.
3911 (GEN_ADDI): New macro.
3912 (GEN_ADDIS): New macro.
3913 (GEN_LI): New macro.
3914 (GEN_LIS): New macro.
3915 (GEN_ORI): New macro.
3916 (GEN_ORIS): New macro.
3917 (GEN_LWZ): New macro.
3918 (GEN_STW): New macro.
3919 (GEN_STWU): New macro.
3920 (gen_xfx_form): New function.
3921 (GEN_MFSPR): New macro.
3922 (GEN_MTSPR): New macro.
3923 (GEN_MFCR): New macro.
3924 (GEN_MTCR): New macro.
3925 (GEN_SYNC): New macro.
3926 (GEN_LWSYNC): New macro.
3927 (gen_x_form): New function.
3928 (GEN_OR): New macro.
3929 (GEN_MR): New macro.
3930 (GEN_LWARX): New macro.
3931 (GEN_STWCX): New macro.
3932 (GEN_CMPW): New macro.
3933 (gen_md_form): New function.
3934 (GEN_RLDICL): New macro.
3935 (GEN_RLDICR): New macro.
3936 (gen_i_form): New function.
3937 (GEN_B): New macro.
3938 (GEN_BL): New macro.
3939 (gen_b_form): New function.
3940 (GEN_BNE): New macro.
3941 (GEN_LOAD): New macro.
3942 (GEN_STORE): New macro.
3943 (gen_limm): New function.
3944 (gen_atomic_xchg): New function.
3945 (gen_call): New function.
3946 (ppc_relocate_instruction): New function.
3947 (ppc_install_fast_tracepoint_jump_pad): New function.
3948 (ppc_get_min_fast_tracepoint_insn_len): New function.
3949 (ppc_get_ipa_tdesc_idx): New function.
3950 (the_low_target): Wire in the new functions.
3951 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3952 tdescs.
3953 * linux-ppc-tdesc.h: New file.
3954
3955 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3956
3957 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3958 (alloc_jump_pad_buffer): New function.
3959 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3960 (alloc_jump_pad_buffer): New function.
3961 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3962 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3963 (alloc_jump_pad_buffer): New function.
3964 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3965 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3966 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3967 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3968
3969 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3970
3971 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3972 * linux-amd64-ipa.c: Likewise.
3973 * linux-i386-ipa.c: Likewise.
3974 * linux-s390-ipa.c: Likewise.
3975 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3976 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3977 set_trace_state_variable_value_ptr.
3978 (struct ipa_sym_addresses): Likewise.
3979 (symbol_list): Likewise.
3980 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3981 accessing gdb_collect directly.
3982 (gdb_collect_ptr_type): New typedef.
3983 (get_raw_reg_ptr_type): New typedef.
3984 (get_trace_state_variable_value_ptr_type): New typedef.
3985 (set_trace_state_variable_value_ptr_type): New typedef.
3986 (gdb_collect_ptr): New global.
3987 (get_raw_reg_ptr): New global.
3988 (get_trace_state_variable_value_ptr): New global.
3989 (set_trace_state_variable_value_ptr): New global.
3990 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3991 accessing get_raw_reg directly.
3992 (get_get_tsv_func_addr): Likewise for
3993 get_trace_state_variable_value_ptr.
3994 (get_set_tsv_func_addr): Likewise for
3995 set_trace_state_variable_value_ptr.
3996 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3997
3998 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3999
4000 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4001
4002 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4003
4004 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4005 packets.
4006 (relocate_instruction): Remove own_buf.
4007 * server.c (own_buf): Make global.
4008 (handle_v_requests): Make global.
4009 * server.h (own_buf): New declaration.
4010 (handle_v_requests): New prototype.
4011
4012 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4013
4014 PR 18377
4015 * linux-s390-low.c (add_insns): New function.
4016 (s390_emit_prologue): New function.
4017 (s390_emit_epilogue): New function.
4018 (s390_emit_add): New function.
4019 (s390_emit_sub): New function.
4020 (s390_emit_mul): New function.
4021 (s390_emit_lsh): New function.
4022 (s390_emit_rsh_signed): New function.
4023 (s390_emit_rsh_unsigned): New function.
4024 (s390_emit_ext): New function.
4025 (s390_emit_log_not): New function.
4026 (s390_emit_bit_and): New function.
4027 (s390_emit_bit_or): New function.
4028 (s390_emit_bit_xor): New function.
4029 (s390_emit_bit_not): New function.
4030 (s390_emit_equal): New function.
4031 (s390_emit_less_signed): New function.
4032 (s390_emit_less_unsigned): New function.
4033 (s390_emit_ref): New function.
4034 (s390_emit_if_goto): New function.
4035 (s390_emit_goto): New function.
4036 (s390_write_goto_address): New function.
4037 (s390_emit_litpool): New function.
4038 (s390_emit_const): New function.
4039 (s390_emit_call): New function.
4040 (s390_emit_reg): New function.
4041 (s390_emit_pop): New function.
4042 (s390_emit_stack_flush): New function.
4043 (s390_emit_zero_ext): New function.
4044 (s390_emit_swap): New function.
4045 (s390_emit_stack_adjust): New function.
4046 (s390_emit_set_r2): New function.
4047 (s390_emit_int_call_1): New function.
4048 (s390_emit_void_call_2): New function.
4049 (s390_emit_eq_goto): New function.
4050 (s390_emit_ne_goto): New function.
4051 (s390_emit_lt_goto): New function.
4052 (s390_emit_le_goto): New function.
4053 (s390_emit_gt_goto): New function.
4054 (s390_emit_ge_goto): New function.
4055 (s390x_emit_prologue): New function.
4056 (s390x_emit_epilogue): New function.
4057 (s390x_emit_add): New function.
4058 (s390x_emit_sub): New function.
4059 (s390x_emit_mul): New function.
4060 (s390x_emit_lsh): New function.
4061 (s390x_emit_rsh_signed): New function.
4062 (s390x_emit_rsh_unsigned): New function.
4063 (s390x_emit_ext): New function.
4064 (s390x_emit_log_not): New function.
4065 (s390x_emit_bit_and): New function.
4066 (s390x_emit_bit_or): New function.
4067 (s390x_emit_bit_xor): New function.
4068 (s390x_emit_bit_not): New function.
4069 (s390x_emit_equal): New function.
4070 (s390x_emit_less_signed): New function.
4071 (s390x_emit_less_unsigned): New function.
4072 (s390x_emit_ref): New function.
4073 (s390x_emit_if_goto): New function.
4074 (s390x_emit_const): New function.
4075 (s390x_emit_call): New function.
4076 (s390x_emit_reg): New function.
4077 (s390x_emit_pop): New function.
4078 (s390x_emit_stack_flush): New function.
4079 (s390x_emit_zero_ext): New function.
4080 (s390x_emit_swap): New function.
4081 (s390x_emit_stack_adjust): New function.
4082 (s390x_emit_int_call_1): New function.
4083 (s390x_emit_void_call_2): New function.
4084 (s390x_emit_eq_goto): New function.
4085 (s390x_emit_ne_goto): New function.
4086 (s390x_emit_lt_goto): New function.
4087 (s390x_emit_le_goto): New function.
4088 (s390x_emit_gt_goto): New function.
4089 (s390x_emit_ge_goto): New function.
4090 (s390_emit_ops): New function.
4091 (struct linux_target_ops): Fill in emit_ops hook.
4092
4093 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4094
4095 PR 18377
4096 * Makefile.in: Add s390 IPA files.
4097 * configure.srv: Build IPA for s390.
4098 * linux-s390-ipa.c: New file.
4099 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4100 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4101 (tdesc_s390_linux32): Likewise.
4102 (init_registers_s390_linux32v1): Likewise.
4103 (tdesc_s390_linux32v1): Likewise.
4104 (init_registers_s390_linux32v2): Likewise.
4105 (tdesc_s390_linux32v2): Likewise.
4106 (init_registers_s390_linux64): Likewise.
4107 (tdesc_s390_linux64): Likewise.
4108 (init_registers_s390_linux64v1): Likewise.
4109 (tdesc_s390_linux64v1): Likewise.
4110 (init_registers_s390_linux64v2): Likewise.
4111 (tdesc_s390_linux64v2): Likewise.
4112 (init_registers_s390_te_linux64): Likewise.
4113 (tdesc_s390_te_linux64): Likewise.
4114 (init_registers_s390_vx_linux64): Likewise.
4115 (tdesc_s390_vx_linux64): Likewise.
4116 (init_registers_s390_tevx_linux64): Likewise.
4117 (tdesc_s390_tevx_linux64): Likewise.
4118 (init_registers_s390x_linux64): Likewise.
4119 (tdesc_s390x_linux64): Likewise.
4120 (init_registers_s390x_linux64v1): Likewise.
4121 (tdesc_s390x_linux64v1): Likewise.
4122 (init_registers_s390x_linux64v2): Likewise.
4123 (tdesc_s390x_linux64v2): Likewise.
4124 (init_registers_s390x_te_linux64): Likewise.
4125 (tdesc_s390x_te_linux64): Likewise.
4126 (init_registers_s390x_vx_linux64): Likewise.
4127 (tdesc_s390x_vx_linux64): Likewise.
4128 (init_registers_s390x_tevx_linux64): Likewise.
4129 (tdesc_s390x_tevx_linux64): Likewise.
4130 (have_hwcap_s390_vx): New static variable.
4131 (s390_arch_setup): Fill have_hwcap_s390_vx.
4132 (s390_get_thread_area): New function.
4133 (s390_ft_entry_gpr_esa): New const.
4134 (s390_ft_entry_gpr_zarch): New const.
4135 (s390_ft_entry_misc): New const.
4136 (s390_ft_entry_fr): New const.
4137 (s390_ft_entry_vr): New const.
4138 (s390_ft_main_31): New const.
4139 (s390_ft_main_64): New const.
4140 (s390_ft_exit_fr): New const.
4141 (s390_ft_exit_vr): New const.
4142 (s390_ft_exit_misc): New const.
4143 (s390_ft_exit_gpr_esa): New const.
4144 (s390_ft_exit_gpr_zarch): New const.
4145 (append_insns): New function.
4146 (s390_relocate_instruction): New function.
4147 (s390_install_fast_tracepoint_jump_pad): New function.
4148 (s390_get_min_fast_tracepoint_insn_len): New function.
4149 (s390_get_ipa_tdesc_idx): New function.
4150 (struct linux_target_ops): Wire in the above functions.
4151 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4152 * linux-s390-tdesc.h: New file.
4153
4154 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4155
4156 * linux-s390-low.c (s390_supports_tracepoints): New function.
4157 (struct linux_target_ops): Fill supports_tracepoints hook.
4158
4159 2016-03-18 Yao Qi <yao.qi@linaro.org>
4160
4161 * linux-low.c (lwp_signal_can_be_delivered): New function.
4162 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4163
4164 2016-03-18 Yao Qi <yao.qi@linaro.org>
4165
4166 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4167 0 if signal is enqueued. Remove 'signal' from one debugging
4168 message. Move one debugging message to some lines below.
4169 Remove code setting 'signal' to 0.
4170
4171 2016-03-18 Yao Qi <yao.qi@linaro.org>
4172
4173 * linux-low.c (linux_low_filter_event): Remove redundant
4174 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4175
4176 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4177
4178 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4179 (struct linux_target_ops): Wire in the above.
4180
4181 2016-03-03 Yao Qi <yao.qi@linaro.org>
4182
4183 * linux-low.c: Update comments to start_step_over.
4184
4185 2016-03-03 Yao Qi <yao.qi@linaro.org>
4186
4187 PR server/19736
4188 * linux-low.c (handle_extended_wait): Set child suspended
4189 if event_lwp->bp_reinsert isn't zero.
4190
4191 2016-03-02 Yao Qi <yao.qi@linaro.org>
4192
4193 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4194 enqueue_pending_signal.
4195
4196 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4197
4198 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4199 is actually loaded.
4200
4201 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4202
4203 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4204 (s390_regmap_3264) [!__s390x__]: New global.
4205 (s390_collect_ptrace_register): Skip map entries containing -1.
4206 (s390_supply_ptrace_register): Ditto.
4207 (s390_fill_gprs_high): New function.
4208 (s390_store_gprs_high): New function.
4209 (s390_regsets): Add NT_S390_HIGH_GPRS.
4210 (s390_get_hwcap): Enable on 31-bit.
4211 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4212 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4213 Detect NT_S390_HIGH_GPRS.
4214 (s390_usrregs_info_3264): Enable on 31-bit.
4215 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4216 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4217
4218 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4219
4220 PR gdb/13808
4221 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4222 * configure.srv: Ditto.
4223 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4224 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4225 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4226 (init_registers_amd64_linux): Remove prototype.
4227 (tdesc_amd64_linux): Remove declaration.
4228 (get_ipa_tdesc): New function.
4229 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4230 initialize remaining tdescs.
4231 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4232 (init_registers_i386_linux): Remove prototype.
4233 (tdesc_i386_linux): Remove declaration.
4234 (get_ipa_tdesc): New function.
4235 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4236 initialize remaining tdescs.
4237 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4238 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4239 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4240 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4241 (x86_get_ipa_tdesc_idx): New function.
4242 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4243 * linux-x86-tdesc.h: New file.
4244 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4245 (target_get_ipa_tdesc_idx): New macro.
4246 * tracepoint.c (ipa_tdesc_idx): New macro.
4247 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4248 (symbol_list): Add ipa_tdesc_idx.
4249 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4250 (ipa_tdesc): Remove.
4251 (ipa_tdesc_idx): New variable.
4252 (get_context_regcache): Use get_ipa_tdesc.
4253 (gdb_collect): Ditto.
4254 (gdb_probe): Ditto.
4255 * tracepoint.h (get_ipa_tdesc): New prototype.
4256 (ipa_tdesc): Remove.
4257
4258 2016-02-24 Pedro Alves <palves@redhat.com>
4259
4260 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4261 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4262 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4263 Factor out common code between the USE_SIGTRAP_SIGINFO and
4264 !USE_SIGTRAP_SIGINFO blocks.
4265 (linux_low_filter_event): Call save_stop_reason instead of
4266 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4267 Update comments.
4268 (linux_wait_1): Update comments.
4269
4270 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4271
4272 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4273 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4274 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4275 ppc_insert_point, ppc_remove_point.
4276
4277 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4278
4279 * linux-s390-low.c (s390_supports_z_point_type): New function.
4280 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4281
4282 2016-02-16 Yao Qi <yao.qi@linaro.org>
4283
4284 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4285 PC. Get pc from regcache_read_pc.
4286
4287 2016-02-12 Yao Qi <yao.qi@linaro.org>
4288
4289 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4290 or linux_get_pc_32bit.
4291 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4292
4293 2016-02-12 Yao Qi <yao.qi@linaro.org>
4294
4295 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4296 arm_linux_get_next_pcs_fixup.
4297
4298 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4299
4300 * tracepoint.c (x_tracepoint_action_download): Change
4301 write_inferior_data_ptr to write_inferior_data_pointer.
4302 (cmd_qtstart): Likewise.
4303 (write_inferior_data_ptr): Remove.
4304 (download_agent_expr): Change write_inferior_data_ptr to
4305 write_inferior_data_pointer.
4306 (download_tracepoint_1): Likewise.
4307 (download_tracepoint): Likewise.
4308 (download_trace_state_variables): Likewise.
4309
4310 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4311 Marcin Kościelnicki <koriakin@0x04.net>
4312
4313 * tracepoint.c (struct tracepoint_action_ops): Remove.
4314 (struct tracepoint_action): Remove ops.
4315 (m_tracepoint_action_download, r_tracepoint_action_download)
4316 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4317 size and offset accordingly.
4318 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4319 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4320 (tracepoint_action_send, tracepoint_action_download): New functions.
4321 Helpers for trace action handlers.
4322 (add_tracepoint_action): Remove setup actions ops.
4323 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4324
4325 2016-02-10 Yao Qi <yao.qi@linaro.org>
4326
4327 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4328
4329 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4330
4331 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4332 to AC_OUTPUT.
4333 * configure: Regenerate.
4334
4335 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4336
4337 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4338 void * to gdb_byte *.
4339 * linux-low.c (siginfo_fixup): Likewise.
4340 (linux_xfer_siginfo): Likewise.
4341 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4342 Likewise.
4343 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4344
4345 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4346
4347 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4348 to srv_tgtobj.
4349 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4350 to srv_tgtobj.
4351 * linux-x86-low.c [__x86_64__]: Include
4352 "nat/amd64-linux-siginfo.h".
4353 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4354 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4355 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4356 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4357 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4358 (cpt_si_fd, si_timerid, si_overrun): Move from
4359 nat/amd64-linux-siginfo.c.
4360 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4361
4362 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4363
4364 * server.c (skip_to_semicolon): Remove.
4365 (process_point_options): Use strchrnul instead of
4366 skip_to_semicolon.
4367
4368 2016-01-26 Yao Qi <yao.qi@linaro.org>
4369
4370 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4371 * linux-low.c (install_software_single_step_breakpoints): Don't
4372 call regcache_read_pc.
4373 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4374 argument pc.
4375
4376 2016-01-26 Yao Qi <yao.qi@linaro.org>
4377
4378 * linux-low.c (install_software_single_step_breakpoints): Call
4379 regcache_read_pc instead of get_pc.
4380
4381 2016-01-26 Yao Qi <yao.qi@linaro.org>
4382
4383 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4384 (unblock_async_io): Rename to ...
4385 (block_unblock_async_io): ... it. New function.
4386 (enable_async_io): Don't install SIGIO handler. Unblock it
4387 instead.
4388 (disable_async_io): Don't ignore SIGIO. Block it instead.
4389 (initialize_async_io): Install SIGIO handler. Don't call
4390 unblock_async_io.
4391
4392 2016-01-26 Yao Qi <yao.qi@linaro.org>
4393
4394 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4395 first character is '\003', call *the_target->request_interrupt.
4396
4397 2016-01-25 Yao Qi <yao.qi@linaro.org>
4398
4399 * remote-utils.c (new_thread_notify): Remove.
4400 (dead_thread_notify): Likewise.
4401 * remote-utils.h (new_thread_notify): Remove declaration.
4402 (dead_thread_notify): Likewise.
4403
4404 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4405
4406 * gdb.trace/pending.exp: Fix expected message on continue.
4407
4408 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4409
4410 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4411 it works properly on big-endian machines where sizeof (CORE_ADDR)
4412 != sizeof (void *).
4413
4414 2016-01-21 Pedro Alves <palves@redhat.com>
4415
4416 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4417 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4418 * configure: Regenerate.
4419
4420 2016-01-21 Yao Qi <yao.qi@linaro.org>
4421
4422 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4423 is_thumb and set it according to CPSR saved on the stack.
4424 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4425 arm_sigreturn_next_pc.
4426
4427 2016-01-18 Yao Qi <yao.qi@linaro.org>
4428
4429 * linux-low.c (linux_set_pc_64bit): New function.
4430 (linux_get_pc_64bit): New function.
4431 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4432 Declare.
4433 * linux-sparc-low.c (debug_threads): Remove declaration.
4434 (sparc_get_pc): Remove.
4435 (the_low_target): Use linux_get_pc_64bit instead of
4436 sparc_get_pc.
4437 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4438 (the_low_target): Use linux_get_pc_64bit and
4439 linux_set_pc_64bit.
4440
4441 2016-01-18 Yao Qi <yao.qi@linaro.org>
4442
4443 * linux-arm-low.c (debug_threads): Remove declaration.
4444 (arm_get_pc, arm_set_pc): Remove.
4445 (the_low_target): Use linux_get_pc_32bit and
4446 linux_set_pc_32bit.
4447 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4448 (the_low_target): Use linux_get_pc_32bit and
4449 linux_set_pc_32bit.
4450 * linux-cris-low.c (debug_threads): Remove declaration.
4451 (cris_get_pc, cris_set_pc,): Remove.
4452 (the_low_target): Use linux_get_pc_32bit and
4453 linux_set_pc_32bit.
4454 * linux-crisv32-low.c (debug_threads): Remove declaration.
4455 (cris_get_pc, cris_set_pc): Remove.
4456 (the_low_target): Use linux_get_pc_32bit and
4457 linux_set_pc_32bit.
4458 * linux-low.c: Include inttypes.h.
4459 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4460 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4461 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4462 (the_low_target): Use linux_get_pc_32bit and
4463 linux_set_pc_32bit.
4464 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4465 (the_low_target): Use linux_get_pc_32bit and
4466 linux_set_pc_32bit.
4467 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4468 (the_low_target): Use linux_get_pc_32bit and
4469 linux_set_pc_32bit.
4470 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4471 (the_low_target): Use linux_get_pc_32bit and
4472 linux_set_pc_32bit.
4473 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4474 (the_low_target): Use linux_get_pc_32bit and
4475 linux_set_pc_32bit.
4476
4477 2016-01-18 Gary Benson <gbenson@redhat.com>
4478
4479 * configure.ac (AC_FUNC_FORK): New check.
4480 * config.in: Regenerate.
4481 * configure: Likewise.
4482
4483 2016-01-14 Yao Qi <yao.qi@linaro.org>
4484
4485 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4486 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4487 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4488 arm_get_next_pcs_ctor.
4489
4490 2016-01-12 Josh Stone <jistone@redhat.com>
4491 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4492
4493 * inferiors.h: Include "gdb_vecs.h".
4494 (struct process_info): Add syscalls_to_catch.
4495 * inferiors.c (remove_process): Free syscalls_to_catch.
4496 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4497 syscall_return stops.
4498 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4499 * server.c (handle_general_set): Handle QCatchSyscalls.
4500 (handle_query): Report support for QCatchSyscalls.
4501 * target.h (struct target_ops): Add supports_catch_syscall.
4502 (target_supports_catch_syscall): New macro.
4503 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4504 (struct lwp_info): Add syscall_state.
4505 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4506 Maintain syscall_state and syscalls_to_catch across exec.
4507 (get_syscall_trapinfo): New function, proxy to the_low_target.
4508 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4509 (linux_low_filter_event): Toggle syscall_state entry/return for
4510 syscall traps, and set it ignored for all others.
4511 (gdb_catching_syscalls_p): New function.
4512 (gdb_catch_this_syscall_p): New function.
4513 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4514 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4515 (linux_supports_catch_syscall): New function.
4516 (linux_target_ops): Install it.
4517 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4518 (the_low_target): Install it.
4519
4520 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4521
4522 * acinclude.m4: Include new ../warning.m4 file.
4523 * configure: Regenerated.
4524 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4525
4526 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4527
4528 * ax.c (is_goto_target): Mark static.
4529 * linux-low.c (register_addr): Likewise.
4530 (linux_fetch_registers, linux_store_registers): Likewise.
4531 * mem-break.c (any_persistent_commands): Fix old prototype.
4532 (add_commands_to_breakpoint): Mark static.
4533 * regcache.c (find_register_by_name): Delete unused func.
4534 * remote-utils.c (hex_or_minus_one): Mark static.
4535 * server.c (monitor_show_help): Mark static.
4536 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4537 handle_v_requests): Likewise.
4538
4539 2016-01-12 Pedro Alves <palves@redhat.com>
4540
4541 Remove use of the registered trademark symbol throughout.
4542
4543 2016-01-08 Yao Qi <yao.qi@linaro.org>
4544
4545 * remote-utils.c (getpkt): If c is '\003', call target hook
4546 request_interrupt.
4547
4548 2016-01-06 Yao Qi <yao.qi@linaro.org>
4549
4550 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4551 linux-aarch32-low.c.
4552 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4553 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4554 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4555 (thumb2_breakpoint): Declare.
4556 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4557 linux-aarch32-low.h.
4558 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4559 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4560 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4561
4562 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4563
4564 * gdbreplay.c (gdbreplay_version): Change copyright year in
4565 version message.
4566 * server.c (gdbserver_version): Likewise.
4567
4568 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4569
4570 * server.c (crc32_table): Delete.
4571 (crc32): Use libiberty's xcrc32 function.
4572
4573 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4574
4575 * lynx-low.c (lynx_delete_thread_callback): New function.
4576 (lynx_mourn): Properly delete our process and all of its
4577 threads. Remove call to clear_inferiors.
4578
4579 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4580
4581 * target.c (thread_search_callback): Add check that
4582 the thread_stopped target callback is not NULL before
4583 calling it.
4584
4585 2015-12-21 Yao Qi <yao.qi@linaro.org>
4586
4587 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4588 arm breakpoint.
4589
4590 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4591
4592 * server.c (handle_query): Call target_supports_software_single_step.
4593
4594 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4595
4596 * linux-low.c (single_step): New function.
4597 (linux_resume_one_lwp_throw): Call single_step.
4598 (start_step_over): Likewise.
4599
4600 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4601
4602 * Makefile.in (SFILES): Append arch/arm-linux.c,
4603 arch/arm-get-next-pcs.c.
4604 (arm-linux.o): New rule.
4605 (arm-get-next-pcs.o): New rule.
4606 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4607 arm-linux.o.
4608 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4609 to linux-aarch32-low.c.
4610 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4611 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4612 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4613 (thumb2_breakpoint_len): Likewise.
4614 (arm_is_thumb_mode): Make non-static.
4615 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4616 from linux-aarch32-low.c.
4617 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4618 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4619 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4620 (thumb2_breakpoint_len): Likewise.
4621 (arm_is_thumb_mode): New declaration.
4622 * linux-arm-low.c: Include arch/arm-linux.h
4623 aarch/arm-get-next-pcs.h, sys/syscall.h.
4624 (get_next_pcs_ops): New struct.
4625 (get_next_pcs_addr_bits_remove): New function.
4626 (get_next_pcs_is_thumb): New function.
4627 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4628 (arm_sigreturn_next_pc): Likewise.
4629 (get_next_pcs_syscall_next_pc): Likewise.
4630 (arm_gdbserver_get_next_pcs): Likewise.
4631 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4632 Initialize.
4633 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4634 * server.h: Include gdb_vecs.h.
4635
4636 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4637
4638 * Makefile.in (SFILES): Append common/common-regcache.c.
4639 (OBS): Append common-regcache.o.
4640 (common-regcache.o): New rule.
4641 * regcache.c (init_register_cache): Initialize cache to
4642 REG_UNAVAILABLE.
4643 (regcache_raw_read_unsigned): New function.
4644 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4645 register_status enum.
4646
4647 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4648
4649 * linux-aarch64-low.c (the_low_targets): Rename
4650 breakpoint_reinsert_addr to get_next_pcs.
4651 * linux-arm-low.c (the_low_targets): Likewise.
4652 * linux-bfin-low.c (the_low_targets): Likewise.
4653 * linux-cris-low.c (the_low_targets): Likewise.
4654 * linux-crisv32-low.c (the_low_targets): Likewise.
4655 * linux-low.c (can_software_single_step): Likewise.
4656 (install_software_single_step_breakpoints): New function.
4657 (start_step_over): Use install_software_single_step_breakpoints.
4658 * linux-low.h: New CORE_ADDR vector.
4659 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4660 get_next_pcs.
4661 * linux-mips-low.c (the_low_targets): Likewise.
4662 * linux-nios2-low.c (the_low_targets): Likewise.
4663 * linux-sparc-low.c (the_low_targets): Likewise.
4664
4665 2015-12-17 Pedro Alves <palves@redhat.com>
4666
4667 * linux-low.c (linux_kill_one_lwp): Remove references to
4668 LinuxThreads.
4669 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4670 to 'kill'.
4671 (linux_init_signals): Delete.
4672 (initialize_low): Adjust.
4673 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4674
4675 2015-12-16 Pedro Alves <palves@redhat.com>
4676
4677 * configure.ac (compiler warning flags): When testing a
4678 -Wno-foo option, check whether -Wfoo works instead.
4679 * configure: Regenerate.
4680
4681 2015-12-11 Don Breazeal <donb@codesourcery.com>
4682
4683 * server.c (process_serial_event): Don't exit from gdbserver
4684 in remote mode if there are still active inferiors.
4685
4686 2015-12-11 Yao Qi <yao.qi@linaro.org>
4687
4688 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4689 arm_breakpoint_at if the process is 32-bit.
4690
4691 2015-12-11 Yao Qi <yao.qi@linaro.org>
4692
4693 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4694 arm breakpoint.
4695
4696 2015-12-07 Yao Qi <yao.qi@linaro.org>
4697
4698 * configure.srv: Append arm.o to srv_tgtobj for
4699 aarch64*-*-linux* target.
4700 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4701 from linux-arm-low.c.
4702 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4703 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4704 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4705 (thumb2_breakpoint_len): Likewise.
4706 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4707 (arm_breakpoint_kinds): Likewise.
4708 (arm_breakpoint_kind_from_pc): Likewise.
4709 (arm_sw_breakpoint_from_kind): Likewise.
4710 (arm_breakpoint_kind_from_current_state): Likewise.
4711 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4712 (arm_sw_breakpoint_from_kind): Declare.
4713 (arm_breakpoint_kind_from_current_state): Declare.
4714 (arm_breakpoint_at): Declare.
4715 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4716 arm_sw_breakpoint_from_kind if process is 32-bit.
4717 (aarch64_breakpoint_kind_from_pc): New function.
4718 (aarch64_breakpoint_kind_from_current_state): New function.
4719 (the_low_target): Initialize fields breakpoint_kind_from_pc
4720 and breakpoint_kind_from_current_state.
4721 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4722 linux-aarch32-low.c.
4723 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4724 (arm_breakpoint, arm_breakpoint_len): Likewise.
4725 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4726 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4727 (arm_is_thumb_mode): Likewise.
4728 (arm_breakpoint_at): Likewise.
4729 (arm_breakpoint_kind_from_pc): Likewise.
4730 (arm_sw_breakpoint_from_kind): Likewise.
4731 (arm_breakpoint_kind_from_current_state): Likewise.
4732
4733 Revert:
4734 2015-08-04 Yao Qi <yao.qi@linaro.org>
4735
4736 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4737 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4738 * server.c (extended_protocol): Remove "static".
4739 * server.h (extended_protocol): Declare it.
4740
4741 2015-12-04 Josh Stone <jistone@redhat.com>
4742
4743 * target.h (struct target_ops) <arch_setup>: Rename to ...
4744 (struct target_ops) <post_create_inferior>: ... this.
4745 (target_arch_setup): Rename to ...
4746 (target_post_create_inferior): ... this, calling post_create_inferior.
4747 * server.c (start_inferior): Update target_arch_setup calls to
4748 target_post_create_inferior.
4749 * linux-low.c (linux_low_ptrace_options): Forward declare.
4750 (linux_arch_setup): Update its comment for general use.
4751 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4752 (struct linux_target_ops): Use linux_post_create_inferior.
4753 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4754 to post_create_inferior.
4755 * nto-low.c (struct nto_target_ops): Likewise.
4756 * spu-low.c (struct spu_target_ops): Likewise.
4757 * win32-low.c (struct win32_target_ops): Likewise.
4758
4759 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4760
4761 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4762
4763 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4764
4765 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4766 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4767 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4768 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4769 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4770 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4771 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4772 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4773 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4774 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4775 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4776 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4777
4778 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4779
4780 * linux-low.c (linux_look_up_symbols): Don't call
4781 linux_supports_traceclone.
4782 * linux-low.h (thread_db_init): Remove use_events argument.
4783 * thread-db.c (thread_db_use_event): Remove global variable.
4784 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4785 (struct thread_db) <td_create_bp>: Remove field.
4786 (thread_db_create_event): Remove function.
4787 (thread_db_enable_reporting): Likewise.
4788 (find_one_thread): Don't check for thread_db_use_events.
4789 (attach_thread): Likewise.
4790 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4791 (try_thread_db_load_1): Don't check for thread_db_use_events.
4792 (thread_db_init): Remove use_events argument and thread events
4793 handling.
4794 (remove_thread_event_breakpoints): Remove function.
4795 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4796
4797 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4798
4799 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4800 New function.
4801 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4802 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4803 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4804 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4805 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4806 Initialize.
4807 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4808 New function.
4809 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4810 * linux-low.c (can_hardware_single_step): Use
4811 supports_hardware_single_step.
4812 (can_software_single_step): New function.
4813 (start_step_over): Call can_software_single_step.
4814 (linux_supports_hardware_single_step): New function.
4815 (struct target_ops) <supports_software_single_step>: Initialize.
4816 * linux-low.h (struct linux_target_ops)
4817 <supports_hardware_single_step>: Initialize.
4818 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4819 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4820 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4821 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4822 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4823 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4824 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4825 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4826 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4827 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4828 Initialize.
4829 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4830 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4831 Initialize.
4832 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4833 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4834 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4835 New function.
4836 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4837 * target.h (struct target_ops): <supports_software_single_step>:
4838 New field.
4839 (target_supports_software_single_step): New macro.
4840
4841 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4842
4843 * linux-low.c (linux_wait_1): Fix pc advance condition.
4844 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4845 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4846
4847 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4848
4849 * linux-arm-low.c (arm_is_thumb_mode): New function.
4850 (arm_breakpoint_at): Use arm_is_thumb_mode.
4851 (arm_breakpoint_kind_from_current_state): New function.
4852 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4853 Initialize.
4854 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4855 (linux_breakpoint_kind_from_current_state): New function.
4856 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4857 * linux-low.h (struct linux_target_ops)
4858 <breakpoint_kind_from_current_state>: New field.
4859 * target.h (struct target_ops): Likewise.
4860 (target_breakpoint_kind_from_current_state): New macro.
4861
4862 2015-11-30 Pedro Alves <palves@redhat.com>
4863
4864 * linux-low.c (linux_resume): Wake up the event loop before
4865 returning.
4866
4867 2015-11-30 Pedro Alves <palves@redhat.com>
4868
4869 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4870 check.
4871 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4872 to -1.
4873 * target.c (struct thread_search): New structure.
4874 (thread_search_callback): New function.
4875 (prev_general_thread): New global.
4876 (prepare_to_access_memory, done_accessing_memory): New functions.
4877 * target.h (prepare_to_access_memory, done_accessing_memory):
4878 Replace macros with function declarations.
4879
4880 2015-11-30 Pedro Alves <palves@redhat.com>
4881
4882 PR 14618
4883 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4884 report TARGET_WAITKIND_NO_RESUMED.
4885 * remote-utils.c (prepare_resume_reply): Handle
4886 TARGET_WAITKIND_NO_RESUMED.
4887 * server.c (report_no_resumed): New global.
4888 (handle_query) <qSupported>: Handle "no-resumed+". Report
4889 "no-resumed+" support.
4890 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4891 return error if the client doesn't support no-resumed events.
4892 (push_stop_notification): New function.
4893 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4894 events if the client supports them.
4895
4896 2015-11-30 Pedro Alves <palves@redhat.com>
4897
4898 * linux-low.c (thread_still_has_status_pending_p): Don't check
4899 vCont;t here.
4900 (lwp_resumed): New function.
4901 (status_pending_p_callback): Return early if the LWP is not
4902 supposed to be resumed.
4903
4904 2015-11-30 Pedro Alves <palves@redhat.com>
4905
4906 * linux-low.c (handle_extended_wait): Assert that the LWP's
4907 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4908 thread create events, leave the new child's status pending.
4909 (linux_low_filter_event): If GDB wants to hear about thread exit
4910 events, leave the LWP marked dead and don't delete it.
4911 (linux_wait_for_event_filtered): Don't check for thread exit.
4912 (filter_exit_event): New function.
4913 (linux_wait_1): Use it, when returning an exit event.
4914 (linux_resume_one_lwp_throw): Assert that the LWP's
4915 waitstatus is TARGET_WAITKIND_IGNORE.
4916 * remote-utils.c (prepare_resume_reply): Handle
4917 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4918 * server.c (report_thread_events): New global.
4919 (handle_general_set): Handle QThreadEvents.
4920 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4921 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4922 TARGET_WAITKIND_THREAD_EXITED.
4923 * server.h (report_thread_events): Declare.
4924
4925 2015-11-30 Pedro Alves <palves@redhat.com>
4926
4927 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4928 the thread's last_resume_kind was resume_stop.
4929
4930 2015-11-30 Pedro Alves <palves@redhat.com>
4931
4932 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4933 before returning.
4934
4935 2015-11-30 Pedro Alves <palves@redhat.com>
4936
4937 * server.c (handle_v_requests): Handle vCtrlC.
4938
4939 2015-11-30 Pedro Alves <palves@redhat.com>
4940
4941 * gdbthread.h (find_any_thread_of_pid): Declare.
4942 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4943 functions.
4944 * server.c (handle_query): If current_thread is NULL, look for
4945 another thread of the selected process.
4946
4947 2015-11-26 Daniel Colascione <dancol@dancol.org>
4948 Simon Marchi <simon.marchi@ericsson.com>
4949
4950 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4951 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4952 name in reply.
4953 * target.h (struct target_ops) <thread_name>: New field.
4954 (target_thread_name): New macro.
4955
4956 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4957
4958 * regcache.h (regcache_invalidate_pid): Add declaration.
4959 * regcache.c (regcache_invalidate_pid): New function, extracted
4960 from regcache_invalidate.
4961 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4962 Add trivial documentation comment.
4963 * lynx-low.c: Use regcache_invalidate_pid instead of
4964 regcache_invalidate.
4965
4966 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4967
4968 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4969 and Elf64_auxv_t if the target is Android.
4970
4971 2015-11-22 Doug Evans <xdje42@gmail.com>
4972
4973 * target.h: #include <sys/types.h>.
4974
4975 2015-11-19 Pedro Alves <palves@redhat.com>
4976
4977 * linux-low.c (linux_process_qsupported): Change prototype.
4978 Adjust.
4979 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4980 Change prototype.
4981 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4982 and adjust to loop over all features.
4983 * server.c (handle_query) <qSupported>: Adjust to call
4984 target_process_qsupported once, passing it a vector of unprocessed
4985 features.
4986 * target.h (struct target_ops) <process_qsupported>: Change
4987 prototype.
4988 (target_process_qsupported): Adjust.
4989
4990 2015-11-19 Pedro Alves <palves@redhat.com>
4991
4992 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4993 mode.
4994 * configure: Regenerate.
4995
4996 2015-11-19 Pedro Alves <palves@redhat.com>
4997
4998 * configure: Regenerate.
4999
5000 2015-11-19 Yao Qi <yao.qi@linaro.org>
5001
5002 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5003 type to uint32_t.
5004
5005 2015-11-19 Yao Qi <yao.qi@linaro.org>
5006
5007 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5008 (struct aarch64_operand): Move enum out.
5009
5010 2015-11-19 Yao Qi <yao.qi@linaro.org>
5011
5012 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5013 struct user_fpsimd_state *.
5014 (aarch64_store_fpregset): Likewise.
5015
5016 2015-11-19 Yao Qi <yao.qi@linaro.org>
5017
5018 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5019 struct user_pt_regs *.
5020 (aarch64_store_gregset): Likewise.
5021
5022 2015-11-18 Pedro Alves <palves@redhat.com>
5023
5024 * Makefile.in (all_object_files): Add $IPA_OBJS.
5025
5026 2015-11-17 Pedro Alves <palves@redhat.com>
5027
5028 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5029 GDB_SIGNAL_0 and gdb_signal_to_string.
5030
5031 2015-11-17 Pedro Alves <palves@redhat.com>
5032
5033 * win32-low.c (handle_output_debug_string): Remove parameter.
5034 (win32_kill): Remove our_status local and adjust call to
5035 handle_output_debug_string.
5036 (get_child_debug_event): Adjust call to
5037 handle_output_debug_string.
5038
5039 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5040
5041 * linux-mips-low.c (mips_fill_gregset): Add cast.
5042 (mips_store_gregset): Likewise.
5043 (mips_fill_fpregset): Likewise.
5044 (mips_store_fpregset): Likewise.
5045
5046 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5047
5048 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5049 priv.
5050
5051 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5052
5053 * linux-mips-low.c (mips_linux_new_thread): Change type of
5054 watch_type to enum target_hw_bp_type.
5055
5056 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5057
5058 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5059 Change return type to arm_hwbp_type.
5060
5061 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5062
5063 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5064 (arm_store_gregset): Likewise.
5065 * linux-arm-low.c (arm_get_hwcap): Likewise.
5066 (arm_read_description): Likewise.
5067
5068 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5069
5070 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5071
5072 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5073
5074 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5075 (ppc_fill_vsxregset): Likewise.
5076 (ppc_store_vsxregset): Likewise.
5077 (ppc_fill_vrregset): Likewise.
5078 (ppc_store_vrregset): Likewise.
5079 (ppc_fill_evrregset): Likewise.
5080 (ppc_store_evrregset): Likewise.
5081
5082 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5083
5084 * linux-ppc-low.c (ppc_usrregs_info): Remove
5085 forward-declaration.
5086 (ppc_arch_setup): Move lower in file.
5087
5088 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5089
5090 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5091 (ps_pdwrite): Likewise.
5092
5093 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5094
5095 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5096 to after assert checks.
5097
5098 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5099
5100 * proc-service.c (ps_pdread): Add/adjust casts.
5101 (ps_pdwrite): Add/adjust casts.
5102
5103 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5104
5105 * server.c (handle_search_memory_1): Cast return value of
5106 memmem.
5107
5108 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5109
5110 * server.c (write_qxfer_response): Change type of data to
5111 gdb_byte *.
5112
5113 2015-10-29 Pedro Alves <palves@redhat.com>
5114
5115 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5116
5117 2015-10-29 Pedro Alves <palves@redhat.com>
5118
5119 * tracepoint.c (clear_installed_tracepoints): Add casts.
5120
5121 2015-10-29 Pedro Alves <palves@redhat.com>
5122
5123 * server.c (handle_v_cont, process_serial_event): Add enum
5124 gdb_signal casts to signal parsing code.
5125
5126 2015-10-29 Pedro Alves <palves@redhat.com>
5127
5128 * linux-low.h (NULL_REGSET): Define.
5129 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5130 * linux-arm-low.c (arm_regsets): Likewise.
5131 * linux-crisv32-low.c (cris_regsets): Likewise.
5132 * linux-m68k-low.c (m68k_regsets): Likewise.
5133 * linux-mips-low.c (mips_regsets): Likewise.
5134 * linux-nios2-low.c (nios2_regsets): Likewise.
5135 * linux-ppc-low.c (ppc_regsets): Likewise.
5136 * linux-s390-low.c (s390_regsets): Likewise.
5137 * linux-sh-low.c (sh_regsets): Likewise.
5138 * linux-sparc-low.c (sparc_regsets): Likewise.
5139 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5140 * linux-tile-low.c (tile_regsets): Likewise.
5141 * linux-x86-low.c (x86_regsets): Likewise.
5142 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5143
5144 2015-10-29 Pedro Alves <palves@redhat.com>
5145
5146 * linux-low.h (NULL_REGSET): Define.
5147 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5148 * linux-arm-low.c (arm_regsets): Likewise.
5149 * linux-crisv32-low.c (cris_regsets): Likewise.
5150 * linux-m68k-low.c (m68k_regsets): Likewise.
5151 * linux-mips-low.c (mips_regsets): Likewise.
5152 * linux-nios2-low.c (nios2_regsets): Likewise.
5153 * linux-ppc-low.c (ppc_regsets): Likewise.
5154 * linux-s390-low.c (s390_regsets): Likewise.
5155 * linux-sh-low.c (sh_regsets): Likewise.
5156 * linux-sparc-low.c (sparc_regsets): Likewise.
5157 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5158 * linux-tile-low.c (tile_regsets): Likewise.
5159 * linux-x86-low.c (x86_regsets): Likewise.
5160 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5161
5162 2015-10-26 Doug Evans <dje@google.com>
5163
5164 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5165
5166 2015-10-26 Doug Evans <dje@google.com>
5167
5168 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5169
5170 2015-10-26 Doug Evans <dje@google.com>
5171
5172 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5173 for debug_printf.
5174 (attach_thread, find_new_threads_callback): Ditto.
5175
5176 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5177
5178 * mem-break.h (set_breakpoint_data): Remove.
5179
5180 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5181
5182 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5183 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5184 (initialize_low): Remove set_breakpoint_data call.
5185 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5186 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5187 (initialize_low): Remove set_breakpoint_data call.
5188 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5189 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5190 (initialize_low): Remove set_breakpoint_data call.
5191
5192 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5193
5194 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5195 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5196 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5197 * target.h (target_breakpoint_kind_from_pc): New macro.
5198
5199 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5200
5201 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5202 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5203 the default breakpoint kind.
5204
5205 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5206
5207 * linux-arm-low.c (arm_supports_z_point_type): Add software
5208 breakpoint support.
5209
5210 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5211
5212 * linux-arm-low.c: Refactor breakpoint definitions.
5213 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5214 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5215
5216 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5217
5218 * Makefile.in: Add arm.c/o.
5219 * configure.srv: Likewise.
5220 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5221 (arm_breakpoint_kind_from_pc): New function.
5222 (arm_sw_breakpoint_from_kind): Return proper kind.
5223 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5224
5225 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5226
5227 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5228 removal.
5229 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5230 (struct raw_breakpoint) <size>: Remove.
5231 (struct raw_breakpoint) <kind>: Add.
5232 (bp_size): New function.
5233 (bp_opcode): Likewise.
5234 (find_raw_breakpoint_at): Adjust for kind.
5235 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5236 (remove_memory_breakpoint): Adjust for kind call bp_size.
5237 (set_raw_breakpoint_at): Adjust for kind.
5238 (set_breakpoint): Likewise.
5239 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5240 (delete_raw_breakpoint): Adjust for kind.
5241 (delete_breakpoint): Likewise.
5242 (find_gdb_breakpoint): Likewise.
5243 (set_gdb_breakpoint_1): Likewise.
5244 (set_gdb_breakpoint): Likewise.
5245 (delete_gdb_breakpoint_1): Likewise.
5246 (delete_gdb_breakpoint): Likewise.
5247 (uninsert_raw_breakpoint): Likewise.
5248 (reinsert_raw_breakpoint): Likewise.
5249 (set_breakpoint_data): Remove.
5250 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5251 (check_mem_read): Adjust for kind call bp_size.
5252 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5253 (clone_one_breakpoint): Adjust for kind.
5254 * mem-break.h (set_gdb_breakpoint): Likewise.
5255 (delete_gdb_breakpoint): Likewise.
5256 * server.c (process_serial_event): Likewise.
5257
5258 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5259
5260 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5266 (arm_sw_breakpoint_from_kind): New function.
5267 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5268 (struct linux_target_ops) <breakpoint>: Remove.
5269 (struct linux_target_ops) <breakpoint_len>: Remove.
5270 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5271 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5272 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5273 (struct linux_target_ops) <breakpoint>: Remove.
5274 (struct linux_target_ops) <breakpoint_len>: Remove.
5275 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5276 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5277 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5278 (struct linux_target_ops) <breakpoint>: Remove.
5279 (struct linux_target_ops) <breakpoint_len>: Remove.
5280 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5281 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5282 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5283 and sw_breakpoint_from_kind to increment the pc.
5284 (linux_breakpoint_kind_from_pc): New function.
5285 (linux_sw_breakpoint_from_kind): New function.
5286 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5287 (initialize_low): Call breakpoint_kind_from_pc and
5288 sw_breakpoint_from_kind to replace breakpoint_data/len.
5289 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5290 New field.
5291 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5292 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5293 (struct linux_target_ops) <breakpoint>: Remove.
5294 (struct linux_target_ops) <breakpoint_len>: Remove.
5295 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5296 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5297 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5298 (struct linux_target_ops) <breakpoint>: Remove.
5299 (struct linux_target_ops) <breakpoint_len>: Remove.
5300 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5301 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5302 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5303 (struct linux_target_ops) <breakpoint>: Remove.
5304 (struct linux_target_ops) <breakpoint_len>: Remove.
5305 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5306 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5307 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5308 (struct linux_target_ops) <breakpoint>: Remove.
5309 (struct linux_target_ops) <breakpoint_len>: Remove.
5310 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5311 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5312 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5313 (struct linux_target_ops) <breakpoint>: Remove.
5314 (struct linux_target_ops) <breakpoint_len>: Remove.
5315 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5316 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5317 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5318 (struct linux_target_ops) <breakpoint>: Remove.
5319 (struct linux_target_ops) <breakpoint_len>: Remove.
5320 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5321 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5322 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5323 (struct linux_target_ops) <breakpoint>: Remove.
5324 (struct linux_target_ops) <breakpoint_len>: Remove.
5325 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5326 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5327 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5328 (struct linux_target_ops) <breakpoint>: Remove.
5329 (struct linux_target_ops) <breakpoint_len>: Remove.
5330 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5331 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5332 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5333 (struct linux_target_ops) <breakpoint>: Remove.
5334 (struct linux_target_ops) <breakpoint_len>: Remove.
5335 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5336 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5337 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5338 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5339 (struct linux_target_ops) <breakpoint>: Remove.
5340 (struct linux_target_ops) <breakpoint_len>: Remove.
5341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5342 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5343 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5344 (struct linux_target_ops) <breakpoint>: Remove.
5345 (struct linux_target_ops) <breakpoint_len>: Remove.
5346 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5347 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5348
5349 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5350
5351 * linux-cris-low.c (cris_get_pc): Remove void arg.
5352
5353 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5354
5355 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5356 variable name.
5357
5358 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5359
5360 * inferiors.c (thread_pid_matches_callback): New function.
5361 (find_thread_process): New function.
5362 (remove_thread): Reset current_thread.
5363 (remove_process): Assert threads have been removed first.
5364
5365 2015-10-15 Yao Qi <yao.qi@linaro.org>
5366
5367 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5368 if it is 3.
5369 (aarch64_remove_point): Likewise.
5370 * regcache.c (regcache_register_size): New function.
5371
5372 2015-10-12 Yao Qi <yao.qi@linaro.org>
5373
5374 * linux-aarch64-low.c: Update all callers as emit_load_store
5375 is renamed to aarch64_emit_load_store.
5376
5377 2015-10-12 Yao Qi <yao.qi@linaro.org>
5378
5379 * linux-aarch64-low.c: Update all callers of function renaming
5380 from emit_insn to aarch64_emit_insn.
5381
5382 2015-10-12 Yao Qi <yao.qi@linaro.org>
5383
5384 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5385 arch/aarch64-insn.h.
5386 (struct aarch64_memory_operand): Likewise.
5387 (ENCODE): Likewise.
5388 (emit_insn): Move to arch/aarch64-insn.c.
5389 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5390 (emit_load_store): Move to arch/aarch64-insn.c.
5391 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5392 (can_encode_int32): Remove.
5393
5394 2015-10-12 Yao Qi <yao.qi@linaro.org>
5395
5396 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5397 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5398 (aarch64_relocate_instruction): Likewise.
5399 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5400 (struct aarch64_insn_visitor): Likewise.
5401
5402 2015-10-12 Yao Qi <yao.qi@linaro.org>
5403
5404 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5405 (struct aarch64_insn_visitor): New.
5406 (struct aarch64_insn_relocation_data): New.
5407 (aarch64_ftrace_insn_reloc_b): New function.
5408 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5409 (aarch64_ftrace_insn_reloc_cb): Likewise.
5410 (aarch64_ftrace_insn_reloc_tb): Likewise.
5411 (aarch64_ftrace_insn_reloc_adr): Likewise.
5412 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5413 (aarch64_ftrace_insn_reloc_others): Likewise.
5414 (visitor): New.
5415 (aarch64_relocate_instruction): Use visitor.
5416
5417 2015-10-12 Yao Qi <yao.qi@linaro.org>
5418
5419 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5420 int. Add argument buf.
5421 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5422 aarch64_relocate_instruction.
5423
5424 2015-10-12 Yao Qi <yao.qi@linaro.org>
5425
5426 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5427 argument insn. Remove local variable insn. Don't call
5428 target_read_uint32.
5429 (aarch64_install_fast_tracepoint_jump_pad): Call
5430 target_read_uint32.
5431
5432 2015-09-30 Yao Qi <yao.qi@linaro.org>
5433
5434 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5435 (emit_load_store_pair): Likewise.
5436
5437 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5438
5439 * dll.c (match_dll): Add cast(s).
5440 (unloaded_dll): Likewise.
5441 * linux-low.c (second_thread_of_pid_p): Likewise.
5442 (delete_lwp_callback): Likewise.
5443 (count_events_callback): Likewise.
5444 (select_event_lwp_callback): Likewise.
5445 (linux_set_resume_request): Likewise.
5446 * server.c (accumulate_file_name_length): Likewise.
5447 (emit_dll_description): Likewise.
5448 (handle_qxfer_threads_worker): Likewise.
5449 (visit_actioned_threads): Likewise.
5450 * thread-db.c (any_thread_of): Likewise.
5451 * tracepoint.c (same_process_p): Likewise.
5452 (match_blocktype): Likewise.
5453 (build_traceframe_info_xml): Likewise.
5454
5455 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5456
5457 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5458 assignment.
5459 (gdb_unparse_agent_expr): Likewise.
5460 * hostio.c (require_data): Likewise.
5461 (handle_pread): Likewise.
5462 * linux-low.c (disable_regset): Likewise.
5463 (fetch_register): Likewise.
5464 (store_register): Likewise.
5465 (get_dynamic): Likewise.
5466 (linux_qxfer_libraries_svr4): Likewise.
5467 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5468 (set_fast_tracepoint_jump): Likewise.
5469 (uninsert_fast_tracepoint_jumps_at): Likewise.
5470 (reinsert_fast_tracepoint_jumps_at): Likewise.
5471 (validate_inserted_breakpoint): Likewise.
5472 (clone_agent_expr): Likewise.
5473 * regcache.c (init_register_cache): Likewise.
5474 * remote-utils.c (putpkt_binary_1): Likewise.
5475 (decode_M_packet): Likewise.
5476 (decode_X_packet): Likewise.
5477 (look_up_one_symbol): Likewise.
5478 (relocate_instruction): Likewise.
5479 (monitor_output): Likewise.
5480 * server.c (handle_search_memory): Likewise.
5481 (handle_qxfer_exec_file): Likewise.
5482 (handle_qxfer_libraries): Likewise.
5483 (handle_qxfer): Likewise.
5484 (handle_query): Likewise.
5485 (handle_v_cont): Likewise.
5486 (handle_v_run): Likewise.
5487 (captured_main): Likewise.
5488 * target.c (write_inferior_memory): Likewise.
5489 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5490 * tracepoint.c (init_trace_buffer): Likewise.
5491 (add_tracepoint_action): Likewise.
5492 (add_traceframe): Likewise.
5493 (add_traceframe_block): Likewise.
5494 (cmd_qtdpsrc): Likewise.
5495 (cmd_qtdv): Likewise.
5496 (cmd_qtstatus): Likewise.
5497 (response_source): Likewise.
5498 (response_tsv): Likewise.
5499 (cmd_qtnotes): Likewise.
5500 (gdb_collect): Likewise.
5501 (initialize_tracepoint): Likewise.
5502
5503 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5504
5505 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5506 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5507 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5508 <NOP>: New.
5509 (enum aarch64_condition_codes): New enum.
5510 (w0): New static global.
5511 (fp): Likewise.
5512 (lr): Likewise.
5513 (struct aarch64_memory_operand) <type>: New
5514 MEMORY_OPERAND_POSTINDEX type.
5515 (postindex_memory_operand): New helper function.
5516 (emit_ret): New function.
5517 (emit_load_store_pair): New function, factored out of emit_stp
5518 with support for MEMORY_OPERAND_POSTINDEX.
5519 (emit_stp): Rewrite using emit_load_store_pair.
5520 (emit_ldp): New function.
5521 (emit_load_store): Likewise.
5522 (emit_ldr): Mention post-index instruction in comment.
5523 (emit_ldrh): New function.
5524 (emit_ldrb): New function.
5525 (emit_ldrsw): Mention post-index instruction in comment.
5526 (emit_str): Likewise.
5527 (emit_subs): New function.
5528 (emit_cmp): Likewise.
5529 (emit_and): Likewise.
5530 (emit_orr): Likewise.
5531 (emit_orn): Likewise.
5532 (emit_eor): Likewise.
5533 (emit_mvn): Likewise.
5534 (emit_lslv): Likewise.
5535 (emit_lsrv): Likewise.
5536 (emit_asrv): Likewise.
5537 (emit_mul): Likewise.
5538 (emit_sbfm): Likewise.
5539 (emit_sbfx): Likewise.
5540 (emit_ubfm): Likewise.
5541 (emit_ubfx): Likewise.
5542 (emit_csinc): Likewise.
5543 (emit_cset): Likewise.
5544 (emit_nop): Likewise.
5545 (emit_ops_insns): New helper function.
5546 (emit_pop): Likewise.
5547 (emit_push): Likewise.
5548 (aarch64_emit_prologue): New function.
5549 (aarch64_emit_epilogue): Likewise.
5550 (aarch64_emit_add): Likewise.
5551 (aarch64_emit_sub): Likewise.
5552 (aarch64_emit_mul): Likewise.
5553 (aarch64_emit_lsh): Likewise.
5554 (aarch64_emit_rsh_signed): Likewise.
5555 (aarch64_emit_rsh_unsigned): Likewise.
5556 (aarch64_emit_ext): Likewise.
5557 (aarch64_emit_log_not): Likewise.
5558 (aarch64_emit_bit_and): Likewise.
5559 (aarch64_emit_bit_or): Likewise.
5560 (aarch64_emit_bit_xor): Likewise.
5561 (aarch64_emit_bit_not): Likewise.
5562 (aarch64_emit_equal): Likewise.
5563 (aarch64_emit_less_signed): Likewise.
5564 (aarch64_emit_less_unsigned): Likewise.
5565 (aarch64_emit_ref): Likewise.
5566 (aarch64_emit_if_goto): Likewise.
5567 (aarch64_emit_goto): Likewise.
5568 (aarch64_write_goto_address): Likewise.
5569 (aarch64_emit_const): Likewise.
5570 (aarch64_emit_call): Likewise.
5571 (aarch64_emit_reg): Likewise.
5572 (aarch64_emit_pop): Likewise.
5573 (aarch64_emit_stack_flush): Likewise.
5574 (aarch64_emit_zero_ext): Likewise.
5575 (aarch64_emit_swap): Likewise.
5576 (aarch64_emit_stack_adjust): Likewise.
5577 (aarch64_emit_int_call_1): Likewise.
5578 (aarch64_emit_void_call_2): Likewise.
5579 (aarch64_emit_eq_goto): Likewise.
5580 (aarch64_emit_ne_goto): Likewise.
5581 (aarch64_emit_lt_goto): Likewise.
5582 (aarch64_emit_le_goto): Likewise.
5583 (aarch64_emit_gt_goto): Likewise.
5584 (aarch64_emit_ge_got): Likewise.
5585 (aarch64_emit_ops_impl): New static global variable.
5586 (aarch64_emit_ops): New target function, return
5587 &aarch64_emit_ops_impl.
5588 (struct linux_target_ops): Install it.
5589
5590 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5591
5592 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5593 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5594 aarch64-ipa.o.
5595 * linux-aarch64-ipa.c: New file.
5596 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5597 and endian.h.
5598 (aarch64_get_thread_area): New target method.
5599 (extract_signed_bitfield): New helper function.
5600 (aarch64_decode_ldr_literal): New function.
5601 (enum aarch64_opcodes): New enum.
5602 (struct aarch64_register): New struct.
5603 (struct aarch64_operand): New struct.
5604 (x0): New static global.
5605 (x1): Likewise.
5606 (x2): Likewise.
5607 (x3): Likewise.
5608 (x4): Likewise.
5609 (w2): Likewise.
5610 (ip0): Likewise.
5611 (sp): Likewise.
5612 (xzr): Likewise.
5613 (aarch64_register): New helper function.
5614 (register_operand): Likewise.
5615 (immediate_operand): Likewise.
5616 (struct aarch64_memory_operand): New struct.
5617 (offset_memory_operand): New helper function.
5618 (preindex_memory_operand): Likewise.
5619 (enum aarch64_system_control_registers): New enum.
5620 (ENCODE): New macro.
5621 (emit_insn): New helper function.
5622 (emit_b): New function.
5623 (emit_bcond): Likewise.
5624 (emit_cb): Likewise.
5625 (emit_tb): Likewise.
5626 (emit_blr): Likewise.
5627 (emit_stp): Likewise.
5628 (emit_ldp_q_offset): Likewise.
5629 (emit_stp_q_offset): Likewise.
5630 (emit_load_store): Likewise.
5631 (emit_ldr): Likewise.
5632 (emit_ldrsw): Likewise.
5633 (emit_str): Likewise.
5634 (emit_ldaxr): Likewise.
5635 (emit_stxr): Likewise.
5636 (emit_stlr): Likewise.
5637 (emit_data_processing_reg): Likewise.
5638 (emit_data_processing): Likewise.
5639 (emit_add): Likewise.
5640 (emit_sub): Likewise.
5641 (emit_mov): Likewise.
5642 (emit_movk): Likewise.
5643 (emit_mov_addr): Likewise.
5644 (emit_mrs): Likewise.
5645 (emit_msr): Likewise.
5646 (emit_sevl): Likewise.
5647 (emit_wfe): Likewise.
5648 (append_insns): Likewise.
5649 (can_encode_int32_in): New helper function.
5650 (aarch64_relocate_instruction): New function.
5651 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5652 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5653 (struct linux_target_ops): Install aarch64_get_thread_area,
5654 aarch64_install_fast_tracepoint_jump_pad and
5655 aarch64_get_min_fast_tracepoint_insn_len.
5656
5657 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5658
5659 * Makefile.in (aarch64-insn.o): New rule.
5660 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5661
5662 2015-09-21 Yao Qi <yao.qi@linaro.org>
5663
5664 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5665
5666 2015-09-21 Yao Qi <yao.qi@linaro.org>
5667
5668 * tracepoint.c (max_jump_pad_size): Remove.
5669
5670 2015-09-18 Yao Qi <yao.qi@linaro.org>
5671
5672 * linux-aarch64-low.c: Don't include sys/uio.h.
5673 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5674
5675 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5676
5677 * tracepoint.c (eval_result_type): Change prototype.
5678 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5679
5680 2015-09-15 Pedro Alves <palves@redhat.com>
5681
5682 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5683 Check whether to report exec events instead of checking whether
5684 multiprocess is enabled.
5685
5686 2015-09-15 Pedro Alves <palves@redhat.com>
5687
5688 PR remote/18965
5689 * remote-utils.c (prepare_resume_reply): Merge
5690 TARGET_WAITKIND_VFORK_DONE switch case with the
5691 TARGET_WAITKIND_FORKED case.
5692
5693 2015-09-15 Yao Qi <yao.qi@linaro.org>
5694
5695 * server.c (handle_query): Check string comparison using
5696 "else if" instead of "if".
5697
5698 2015-09-15 Yao Qi <yao.qi@linaro.org>
5699
5700 * server.c (vCont_supported): New global variable.
5701 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5702 matches. Append ";vContSupported+" to own_buf.
5703 (handle_v_requests): Append ";s;S" to own_buf if target supports
5704 hardware single step or vCont_supported is false.
5705 (capture_main): Set vCont_supported to zero.
5706
5707 2015-09-15 Yao Qi <yao.qi@linaro.org>
5708
5709 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5710 it to ...
5711 (linux_supports_hardware_single_step): ... New function.
5712 (linux_target_ops): Update.
5713 * lynx-low.c (lynx_target_ops): Set field
5714 supports_hardware_single_step to target_can_do_hardware_single_step.
5715 * nto-low.c (nto_target_ops): Likewise.
5716 * spu-low.c (spu_target_ops): Likewise.
5717 * win32-low.c (win32_target_ops): Likewise.
5718 * target.c (target_can_do_hardware_single_step): New function.
5719 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5720 Remove. <supports_hardware_single_step>: New field.
5721 (target_supports_conditional_breakpoints): Remove.
5722 (target_supports_hardware_single_step): New macro.
5723 (target_can_do_hardware_single_step): Declare.
5724 * server.c (handle_query): Use target_supports_hardware_single_step
5725 instead of target_supports_conditional_breakpoints.
5726
5727 2015-09-15 Yao Qi <yao.qi@linaro.org>
5728
5729 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5730 function.
5731 (struct linux_target_ops the_low_target): Install
5732 aarch64_linux_siginfo_fixup.
5733
5734 2015-09-11 Don Breazeal <donb@codesourcery.com>
5735 Luis Machado <lgustavo@codesourcery.com>
5736
5737 * linux-low.c (linux_mourn): Static declaration.
5738 (linux_arch_setup): Move in front of
5739 handle_extended_wait.
5740 (linux_arch_setup_thread): New function.
5741 (handle_extended_wait): Handle exec events. Call
5742 linux_arch_setup_thread. Make event_lwp argument a
5743 pointer-to-a-pointer.
5744 (check_zombie_leaders): Do not check stopped threads.
5745 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5746 (linux_low_filter_event): Add lwp and thread for exec'ing
5747 non-leader thread if leader thread has been deleted.
5748 Refactor code into linux_arch_setup_thread and call it.
5749 Pass child lwp pointer by reference to handle_extended_wait.
5750 (linux_wait_for_event_filtered): Update comment.
5751 (linux_wait_1): Prevent clobbering exec event status.
5752 (linux_supports_exec_events): New function.
5753 (linux_target_ops) <supports_exec_events>: Initialize new member.
5754 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5755 new member.
5756 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5757 * server.c (report_exec_events): New global variable.
5758 (handle_query): Handle qSupported query for exec-events feature.
5759 (captured_main): Initialize report_exec_events.
5760 * server.h (report_exec_events): Declare new global variable.
5761 * target.h (struct target_ops) <supports_exec_events>: New
5762 member.
5763 (target_supports_exec_events): New macro.
5764 * win32-low.c (win32_target_ops) <supports_exec_events>:
5765 Initialize new member.
5766
5767 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5768
5769 * linux-low.c (linux_low_enable_btrace): Remove.
5770 (linux_target_ops): Replace linux_low_enable_btrace with
5771 linux_enable_btrace.
5772
5773 2015-09-03 Yao Qi <yao.qi@linaro.org>
5774
5775 * linux-aarch64-low.c (aarch64_insert_point): Call
5776 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5777 returns true.
5778
5779 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5780
5781 * linux-low.c (check_stopped_by_breakpoint): Use
5782 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5783
5784 2015-08-27 Pedro Alves <palves@redhat.com>
5785
5786 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5787
5788 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5789
5790 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5791 the XNEW-family equivalent.
5792 (compile_bytecodes): Likewise.
5793 * dll.c (loaded_dll): Likewise.
5794 * event-loop.c (append_callback_event): Likewise.
5795 (create_file_handler): Likewise.
5796 (create_file_event): Likewise.
5797 * hostio.c (handle_open): Likewise.
5798 * inferiors.c (add_thread): Likewise.
5799 (add_process): Likewise.
5800 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5801 * linux-arm-low.c (arm_new_process): Likewise.
5802 (arm_new_thread): Likewise.
5803 * linux-low.c (add_to_pid_list): Likewise.
5804 (linux_add_process): Likewise.
5805 (handle_extended_wait): Likewise.
5806 (add_lwp): Likewise.
5807 (enqueue_one_deferred_signal): Likewise.
5808 (enqueue_pending_signal): Likewise.
5809 (linux_resume_one_lwp_throw): Likewise.
5810 (linux_resume_one_thread): Likewise.
5811 (linux_read_memory): Likewise.
5812 (linux_write_memory): Likewise.
5813 * linux-mips-low.c (mips_linux_new_process): Likewise.
5814 (mips_linux_new_thread): Likewise.
5815 (mips_add_watchpoint): Likewise.
5816 * linux-x86-low.c (initialize_low_arch): Likewise.
5817 * lynx-low.c (lynx_add_process): Likewise.
5818 * mem-break.c (set_raw_breakpoint_at): Likewise.
5819 (set_breakpoint): Likewise.
5820 (add_condition_to_breakpoint): Likewise.
5821 (add_commands_to_breakpoint): Likewise.
5822 (clone_agent_expr): Likewise.
5823 (clone_one_breakpoint): Likewise.
5824 * regcache.c (new_register_cache): Likewise.
5825 * remote-utils.c (look_up_one_symbol): Likewise.
5826 * server.c (queue_stop_reply): Likewise.
5827 (start_inferior): Likewise.
5828 (queue_stop_reply_callback): Likewise.
5829 (handle_target_event): Likewise.
5830 * spu-low.c (fetch_ppc_memory): Likewise.
5831 (store_ppc_memory): Likewise.
5832 * target.c (set_target_ops): Likewise.
5833 * thread-db.c (thread_db_load_search): Likewise.
5834 (try_thread_db_load_1): Likewise.
5835 * tracepoint.c (add_tracepoint): Likewise.
5836 (add_tracepoint_action): Likewise.
5837 (create_trace_state_variable): Likewise.
5838 (cmd_qtdpsrc): Likewise.
5839 (cmd_qtro): Likewise.
5840 (add_while_stepping_state): Likewise.
5841 * win32-low.c (child_add_thread): Likewise.
5842 (get_image_name): Likewise.
5843
5844 2015-08-25 Yao Qi <yao.qi@linaro.org>
5845
5846 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5847
5848 2015-08-25 Yao Qi <yao.qi@linaro.org>
5849
5850 * Makefile.in (aarch64-linux.o): New rule.
5851 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5852 srv_tgtobj.
5853 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5854 (aarch64_init_debug_reg_state): Make it extern.
5855 (aarch64_linux_prepare_to_resume): Remove.
5856
5857 2015-08-25 Yao Qi <yao.qi@linaro.org>
5858
5859 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5860 lwp_arch_private_info and ptid_of_lwp.
5861
5862 2015-08-25 Yao Qi <yao.qi@linaro.org>
5863
5864 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5865 Find proc_info by find_process_pid. All callers updated.
5866
5867 2015-08-25 Yao Qi <yao.qi@linaro.org>
5868
5869 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5870 Remove.
5871 (debug_reg_change_callback): Remove.
5872 (aarch64_notify_debug_reg_change): Remove.
5873
5874 2015-08-25 Yao Qi <yao.qi@linaro.org>
5875
5876 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5877 Call current_lwp_ptid.
5878
5879 2015-08-25 Yao Qi <yao.qi@linaro.org>
5880
5881 * linux-aarch64-low.c (debug_reg_change_callback): Use
5882 debug_printf.
5883
5884 2015-08-25 Yao Qi <yao.qi@linaro.org>
5885
5886 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5887
5888 2015-08-25 Yao Qi <yao.qi@linaro.org>
5889
5890 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5891
5892 2015-08-25 Yao Qi <yao.qi@linaro.org>
5893
5894 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5895 the code.
5896
5897 2015-08-25 Yao Qi <yao.qi@linaro.org>
5898
5899 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5900 Remove.
5901 (debug_reg_change_callback): Remove argument entry and add argument
5902 lwp. Remove local variable thread. Don't print thread id in the
5903 debugging output. Don't check whether pid of thread equals to pid.
5904 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5905 iterate_over_lwps instead find_inferior.
5906
5907 2015-08-24 Pedro Alves <palves@redhat.com>
5908
5909 * inferiors.c (get_first_process): New function.
5910 * inferiors.h (get_first_process): New declaration.
5911 * remote-utils.c (read_ptid): Default to the first process in the
5912 list, instead of to the current thread's process.
5913
5914 2015-08-24 Pedro Alves <palves@redhat.com>
5915
5916 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5917 * event-loop.c: Likewise.
5918 * remote-utils.c: Likewise.
5919 * tracepoint.c: Likewise.
5920
5921 2015-08-24 Pedro Alves <palves@redhat.com>
5922
5923 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5924 ptid_get_lwp.
5925
5926 2015-08-21 Pedro Alves <palves@redhat.com>
5927
5928 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5929 instead of literal 1.
5930
5931 2015-08-21 Pedro Alves <palves@redhat.com>
5932
5933 * tdesc.c (default_description): Explicitly zero-initialize.
5934
5935 2015-08-21 Pedro Alves <palves@redhat.com>
5936
5937 PR gdb/18749
5938 * inferiors.c (remove_thread): Discard any pending stop reply for
5939 this thread.
5940 * server.c (remove_all_on_match_pid): Rename to ...
5941 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5942 instead of a pid.
5943 (discard_queued_stop_replies): Change parameter to a ptid. Now
5944 extern.
5945 (handle_v_kill, kill_inferior_callback, captured_main)
5946 (process_serial_event): Adjust.
5947 * server.h (discard_queued_stop_replies): Declare.
5948
5949 2015-08-21 Pedro Alves <palves@redhat.com>
5950
5951 * linux-low.c (wait_for_sigstop): Always switch to no thread
5952 selected if the previously current thread dies.
5953 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5954 process instead of the current thread's.
5955 * remote-utils.c (input_interrupt): Don't check if there's no
5956 current thread.
5957 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5958 current thread to the general thread fails, error out.
5959 (handle_qxfer_auxv, handle_qxfer_libraries)
5960 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5961 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5962 (handle_query): Check if there's a thread selected instead of
5963 checking whether there's any thread in the thread list.
5964 (handle_qxfer_threads, handle_qxfer_btrace)
5965 (handle_qxfer_btrace_conf): Don't error out early if there's no
5966 thread in the thread list.
5967 (handle_v_cont, myresume): Don't set the current thread to the
5968 continue thread.
5969 (process_serial_event) <Hg handling>: Also set thread_id if the
5970 previous general thread is still alive.
5971 (process_serial_event) <g/G handling>: If setting the current
5972 thread to the general thread fails, error out.
5973 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5974 thread's lwp instead of the current thread's.
5975 * target.c (set_desired_thread): If the desired thread was not
5976 found, leave the current thread pointing to NULL. Return an int
5977 (boolean) indicating success.
5978 * target.h (set_desired_thread): Change return type to int.
5979
5980 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5981
5982 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5983 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5984 #includes.
5985 (ps_get_thread_area): New function.
5986
5987 2015-08-19 Gary Benson <gbenson@redhat.com>
5988
5989 * hostio.c (handle_pread): Do not attempt to read more data
5990 than hostio_reply_with_data can fit in a packet.
5991
5992 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5993
5994 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5995
5996 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5997
5998 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5999
6000 2015-08-06 Pedro Alves <palves@redhat.com>
6001
6002 * tracepoint.c (expr_eval_result): Now an int.
6003
6004 2015-08-06 Pedro Alves <palves@redhat.com>
6005
6006 * gdbthread.h (struct regcache): Forward declare.
6007 (struct thread_info) <regcache_data>: Now a struct regcache
6008 pointer.
6009 * inferiors.c (inferior_regcache_data)
6010 (set_inferior_regcache_data): Now work with struct regcache
6011 pointers.
6012 * inferiors.h (struct regcache): Forward declare.
6013 (inferior_regcache_data, set_inferior_regcache_data): Now work
6014 with struct regcache pointers.
6015 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6016 (free_register_cache_thread): Remove struct regcache pointer
6017 casts.
6018
6019 2015-08-06 Pedro Alves <palves@redhat.com>
6020
6021 * server.c (captured_main): On error, print the exception message
6022 to stderr, and if run_once is set, throw a quit.
6023
6024 2015-08-06 Pedro Alves <palves@redhat.com>
6025
6026 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6027 the current thread.
6028
6029 2015-08-06 Pedro Alves <palves@redhat.com>
6030
6031 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6032 reading beyond the passed in buffer length.
6033
6034 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6035
6036 * tracepoint.c (symbol_list) <required>: Remove.
6037
6038 2015-08-06 Pedro Alves <palves@redhat.com>
6039
6040 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6041 count if stopping and suspending threads.
6042 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6043 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6044 (linux_detach): Complete an ongoing step-over.
6045 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6046 throughout.
6047 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6048 (linux_wait_1): If passing a signal to the inferior after
6049 finishing a step-over, unsuspend and re-resume all lwps. If we
6050 see a single-step event but the thread should be continuing, don't
6051 pass the trap to gdb.
6052 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6053 internal_error instead of gdb_assert.
6054 (enqueue_pending_signal): New function.
6055 (check_ptrace_stopped_lwp_gone): Add debug output.
6056 (start_step_over): Use internal_error instead of gdb_assert.
6057 (complete_ongoing_step_over): New function.
6058 (linux_resume_one_thread): Don't resume a suspended thread.
6059 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6060 it stepping.
6061
6062 2015-08-06 Pedro Alves <palves@redhat.com>
6063
6064 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6065 (linux_thread_alive): Use lwp_is_marked_dead.
6066 (extended_event_reported): Delete.
6067 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6068 instead of extended_event_reported.
6069 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6070 as well.
6071 (lwp_is_marked_dead): New function.
6072 (lwp_running): Use lwp_is_marked_dead.
6073 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6074 comment.
6075
6076 2015-08-06 Pedro Alves <palves@redhat.com>
6077
6078 * linux-low.c (linux_wait_1): Move fork event output out of the
6079 !report_to_gdb check. Pass event_child->waitstatus to
6080 target_waitstatus_to_string instead of ourstatus.
6081
6082 2015-08-04 Yao Qi <yao.qi@linaro.org>
6083
6084 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6085 if current_thread is 32 bit.
6086
6087 2015-08-04 Yao Qi <yao.qi@linaro.org>
6088
6089 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6090 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6091 * server.c (extended_protocol): Remove "static".
6092 * server.h (extended_protocol): Declare it.
6093
6094 2015-08-04 Yao Qi <yao.qi@linaro.org>
6095
6096 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6097 both aarch64 and aarch32.
6098 (aarch64_set_pc): Likewise.
6099
6100 2015-08-04 Yao Qi <yao.qi@linaro.org>
6101
6102 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6103 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6104 arm-with-neon.xml to srv_xmlfiles.
6105 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6106 (is_64bit_tdesc): New function.
6107 (aarch64_linux_read_description): New function.
6108 (aarch64_arch_setup): Call aarch64_linux_read_description.
6109 (regs_info): Rename to regs_info_aarch64.
6110 (aarch64_regs_info): Return right regs_info.
6111 (initialize_low_arch): Call initialize_low_arch_aarch32.
6112
6113 2015-08-04 Yao Qi <yao.qi@linaro.org>
6114
6115 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6116 * linux-aarch32-low.c: New file.
6117 * linux-aarch32-low.h: New file.
6118 * linux-arm-low.c (arm_fill_gregset): Move it to
6119 linux-aarch32-low.c.
6120 (arm_store_gregset): Likewise.
6121 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6122 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6123 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6124 (regs_info): Rename to regs_info_arm.
6125 (arm_regs_info): Return regs_info_aarch32 if
6126 have_ptrace_getregset is 1 and target description is
6127 arm_with_neon or arm_with_vfpv3.
6128 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6129 Call initialize_low_arch_aarch32 instead.
6130
6131 2015-08-04 Yao Qi <yao.qi@linaro.org>
6132
6133 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6134 * linux-low.c: ... here.
6135 * linux-low.h (have_ptrace_getregset): Declare it.
6136
6137 2015-08-04 Pedro Alves <palves@redhat.com>
6138
6139 * thread-db.c (struct thread_db): Use new typedefs.
6140 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6141 CHK calls.
6142 (disable_thread_event_reporting): Cast result of dlsym to
6143 destination function pointer type.
6144 (thread_db_mourn): Use td_ta_delete_ftype.
6145
6146 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6147
6148 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6149 arch variant.
6150 (CDX_BREAKPOINT): Define for R2.
6151 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6152 (the_low_target): Add comments.
6153
6154 2015-07-30 Yao Qi <yao.qi@linaro.org>
6155
6156 * linux-arm-low.c (arm_hwcap): Remove it.
6157 (arm_read_description): New local variable arm_hwcap. Don't
6158 set arm_hwcap to zero.
6159
6160 2015-07-30 Yao Qi <yao.qi@linaro.org>
6161
6162 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6163 Use regcache->tdesc instead.
6164 (arm_store_wmmxregset): Likewise.
6165 (arm_fill_vfpregset): Likewise.
6166 (arm_store_vfpregset): Likewise.
6167
6168 2015-07-30 Yao Qi <yao.qi@linaro.org>
6169
6170 * linux-arm-low.c: Include arch/arm.h.
6171 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6172 (arm_store_gregset): Likewise.
6173
6174 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6175
6176 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6177 ptrace's 4th parameter.
6178
6179 2015-07-27 Yao Qi <yao.qi@linaro.org>
6180
6181 * configure.srv (case aarch64*-*-linux*): Don't set
6182 srv_linux_usrregs.
6183
6184 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6185
6186 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6187 sys/ptrace.h.
6188 * linux-arm-low.c: Likewise.
6189 * linux-cris-low.c: Likewise.
6190 * linux-crisv32-low.c: Likewise.
6191 * linux-low.c: Likewise.
6192 * linux-m68k-low.c: Likewise.
6193 * linux-mips-low.c: Likewise.
6194 * linux-nios2-low.c: Likewise.
6195 * linux-s390-low.c: Likewise.
6196 * linux-sparc-low.c: Likewise.
6197 * linux-tic6x-low.c: Likewise.
6198 * linux-tile-low.c: Likewise.
6199 * linux-x86-low.c: Likewise.
6200
6201 2015-07-24 Pedro Alves <palves@redhat.com>
6202
6203 * config.in: Regenerate.
6204 * configure: Regenerate.
6205
6206 2015-07-24 Pedro Alves <palves@redhat.com>
6207
6208 * acinclude.m4: Include ../ptrace.m4.
6209 * configure.ac: Call GDB_AC_PTRACE.
6210 * config.in, configure: Regenerate.
6211
6212 2015-07-24 Yao Qi <yao.qi@linaro.org>
6213
6214 * linux-low.c (linux_create_inferior): Remove setting to
6215 proc->priv->new_inferior.
6216 (linux_attach): Likewise.
6217 (linux_low_filter_event): Likewise.
6218 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6219
6220 2015-07-24 Yao Qi <yao.qi@linaro.org>
6221
6222 * linux-low.c (linux_arch_setup): New function.
6223 (linux_low_filter_event): If proc->tdesc is NULL and
6224 proc->attached is true, call the_low_target.arch_setup.
6225 Otherwise, keep status pending, and return.
6226 (linux_resume_one_lwp_throw): Don't call get_pc if
6227 thread->while_stepping isn't NULL. Don't call
6228 get_thread_regcache if proc->tdesc is NULL.
6229 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6230 (linux_target_ops): Install arch_setup.
6231 * server.c (start_inferior): Call the_target->arch_setup.
6232 * target.h (struct target_ops) <arch_setup>: New field.
6233 (target_arch_setup): New marco.
6234 * lynx-low.c (lynx_target_ops): Update.
6235 * nto-low.c (nto_target_ops): Update.
6236 * spu-low.c (spu_target_ops): Update.
6237 * win32-low.c (win32_target_ops): Update.
6238
6239 2015-07-24 Yao Qi <yao.qi@linaro.org>
6240
6241 * linux-low.c (linux_add_process): Don't set
6242 proc->priv->new_inferior.
6243 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6244 (linux_attach): Likewise.
6245
6246 2015-07-24 Yao Qi <yao.qi@linaro.org>
6247
6248 * server.c (start_inferior): Code refactor.
6249
6250 2015-07-24 Yao Qi <yao.qi@linaro.org>
6251
6252 * server.c (process_serial_event): Set general_thread.
6253
6254 2015-07-21 Yao Qi <yao.qi@linaro.org>
6255
6256 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6257 aarch64_linux_get_debug_reg_capacity.
6258
6259 2015-07-17 Yao Qi <yao.qi@linaro.org>
6260
6261 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6262 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6263 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6264 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6265 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6266 (AARCH64_HWP_ALIGNMENT): Likewise.
6267 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6268 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6269 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6270 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6271 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6272 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6273 (struct aarch64_debug_reg_state): Likewise.
6274 (struct arch_lwp_info): Likewise.
6275 (aarch64_align_watchpoint): Likewise.
6276 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6277 (aarch64_watchpoint_length): Likewise.
6278 (aarch64_point_encode_ctrl_reg): Likewise
6279 (aarch64_point_is_aligned): Likewise.
6280 (aarch64_align_watchpoint): Likewise.
6281 (aarch64_linux_set_debug_regs):
6282 (aarch64_dr_state_insert_one_point): Likewise.
6283 (aarch64_dr_state_remove_one_point): Likewise.
6284 (aarch64_handle_breakpoint): Likewise.
6285 (aarch64_handle_aligned_watchpoint): Likewise.
6286 (aarch64_handle_unaligned_watchpoint): Likewise.
6287 (aarch64_handle_watchpoint): Likewise.
6288
6289 2015-07-17 Yao Qi <yao.qi@linaro.org>
6290
6291 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6292 and don't aarch64_get_debug_reg_state. All callers update.
6293 (aarch64_handle_aligned_watchpoint): Likewise.
6294 (aarch64_handle_unaligned_watchpoint): Likewise.
6295 (aarch64_handle_watchpoint): Likewise.
6296 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6297 (aarch64_remove_point): Likewise.
6298
6299 2015-07-17 Yao Qi <yao.qi@linaro.org>
6300
6301 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6302 debug_printf.
6303 (aarch64_handle_unaligned_watchpoint): Likewise.
6304
6305 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6306
6307 Revert the previous 3 commits:
6308 Move gdb_regex* to common/
6309 Move linux_find_memory_regions_full & co.
6310 gdbserver build-id attribute generator
6311
6312 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6313 Jan Kratochvil <jan.kratochvil@redhat.com>
6314
6315 gdbserver build-id attribute generator.
6316 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6317 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6318 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6319 (find_phdr): New.
6320 (get_dynamic): Use find_pdhr to traverse program headers.
6321 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6322 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6323 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6324 (get_hex_build_id): New.
6325 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6326 to reply XML document.
6327
6328 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6329 Jan Kratochvil <jan.kratochvil@redhat.com>
6330
6331 * target.c: Include target/target-utils.h and fcntl.h.
6332 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6333 (target_fileio_read_stralloc): New functions.
6334
6335 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6336
6337 * Makefile.in (OBS): Add gdb_regex.o.
6338 (gdb_regex.o): New.
6339 * config.in: Rebuilt.
6340 * configure: Rebuilt.
6341
6342 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6343 Jan Kratochvil <jan.kratochvil@redhat.com>
6344
6345 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6346 * Makefile.in (OBS): Add target-utils.o.
6347 (linux-maps.o, target-utils.o): New.
6348 * configure.srv (srv_linux_obj): Add linux-maps.o.
6349
6350 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6351
6352 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6353 function, return 1.
6354 (the_low_target): Install it.
6355
6356 2015-07-14 Pedro Alves <palves@redhat.com>
6357
6358 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6359 Instead, ignore ECHILD, and throw an error for other errnos.
6360
6361 2015-07-10 Pedro Alves <palves@redhat.com>
6362
6363 * event-loop.c (struct callback_event) <data>: Change type to
6364 gdb_client_data instance instead of gdb_client_data pointer.
6365 (append_callback_event): Adjust.
6366
6367 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6368
6369 * linux-aarch64-low.c: Add comments for each linux_target_ops
6370 method. Remove comments already covered in target_ops and
6371 linux_target_ops definitions.
6372 (the_low_target): Add comments for each unimplemented method.
6373
6374 2015-07-09 Yao Qi <yao.qi@linaro.org>
6375
6376 * linux-aarch64-low.c (aarch64_regmap): Remove.
6377 (aarch64_usrregs_info): Remove.
6378 (regs_info): Set field usrregs to NULL.
6379
6380 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6381
6382 * linux-low.c: Include "rsp-low.h"
6383 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6384 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6385 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6386 (handle_btrace_enable_pt): New.
6387 (handle_btrace_general_set): Support "pt".
6388 (handle_btrace_conf_general_set): Support "pt:size".
6389
6390 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6391
6392 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6393 Z_PACKET_SW_BP.
6394
6395 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6396
6397 * linux-aarch64-low.c: Remove comment about endianness.
6398 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6399 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6400 memcmp.
6401
6402 2015-06-24 Gary Benson <gbenson@redhat.com>
6403
6404 * linux-i386-ipa.c (stdint.h): Do not include.
6405 * lynx-i386-low.c (stdint.h): Likewise.
6406 * lynx-ppc-low.c (stdint.h): Likewise.
6407 * mem-break.c (stdint.h): Likewise.
6408 * thread-db.c (stdint.h): Likewise.
6409 * tracepoint.c (stdint.h): Likewise.
6410 * win32-low.c (stdint.h): Likewise.
6411
6412 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6413
6414 * server.c (write_qxfer_response): Update call to
6415 remote_escape_output.
6416
6417 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6418 Jan Kratochvil <jan.kratochvil@redhat.com>
6419
6420 Merge multiple hex conversions.
6421 * gdbreplay.c (tohex): Rename to 'fromhex'.
6422 (logchar): Use fromhex.
6423
6424 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6425
6426 * server.c (handle_qxfer_libraries): Set `version' attribute for
6427 <library-list>.
6428
6429 2015-06-10 Gary Benson <gbenson@redhat.com>
6430
6431 * target.h (struct target_ops) <multifs_open>: New field.
6432 <multifs_unlink>: Likewise.
6433 <multifs_readlink>: Likewise.
6434 * linux-low.c (nat/linux-namespaces.h): New include.
6435 (linux_target_ops): Initialize the_target->multifs_open,
6436 the_target->multifs_unlink and the_target->multifs_readlink.
6437 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6438 * hostio.c (hostio_fs_pid): New static variable.
6439 (hostio_handle_new_gdb_connection): New function.
6440 (handle_setfs): Likewise.
6441 (handle_open): Use the_target->multifs_open as appropriate.
6442 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6443 (handle_readlink): Use the_target->multifs_readlink as
6444 appropriate.
6445 (handle_vFile): Handle vFile:setfs packets.
6446 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6447 after target_handle_new_gdb_connection.
6448
6449 2015-06-10 Gary Benson <gbenson@redhat.com>
6450
6451 * configure.ac (AC_CHECK_FUNCS): Add setns.
6452 * config.in: Regenerate.
6453 * configure: Likewise.
6454 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6455 (linux-namespaces.o): New rule.
6456 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6457
6458 2015-06-09 Gary Benson <gbenson@redhat.com>
6459
6460 * hostio.c (handle_open): Process mode argument with
6461 fileio_to_host_mode.
6462
6463 2015-06-01 Yao Qi <yao.qi@linaro.org>
6464
6465 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6466 * linux-x86-low.c: Likewise.
6467
6468 2015-05-28 Don Breazeal <donb@codesourcery.com>
6469
6470 * linux-low.c (handle_extended_wait): Initialize
6471 thread_info.last_resume_kind for new fork children.
6472
6473 2015-05-15 Pedro Alves <palves@redhat.com>
6474
6475 * target.h (target_handle_new_gdb_connection): Rewrite using if
6476 wrapped in do/while.
6477
6478 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6479
6480 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6481 * configure, config.in: Regenerate.
6482 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6483 Declare typedef.
6484
6485 2015-05-12 Don Breazeal <donb@codesourcery.com>
6486
6487 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6488 PTRACE_EVENT_VFORK_DONE.
6489 (linux_low_ptrace_options, extended_event_reported): Add vfork
6490 events.
6491 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6492 and "vforkdone" for RSP 'T' Stop Reply Packet.
6493 * server.h (report_vfork_events): Declare
6494 global variable.
6495
6496 2015-05-12 Don Breazeal <donb@codesourcery.com>
6497
6498 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6499 (the_low_target) <new_fork>: Initialize new member.
6500 * linux-arm-low.c (arm_new_fork): New function.
6501 (the_low_target) <new_fork>: Initialize new member.
6502 * linux-low.c (handle_extended_wait): Call new target function
6503 new_fork.
6504 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6505 * linux-mips-low.c (mips_add_watchpoint): New function
6506 extracted from mips_insert_point.
6507 (the_low_target) <new_fork>: Initialize new member.
6508 (mips_linux_new_fork): New function.
6509 (mips_insert_point): Call mips_add_watchpoint.
6510 * linux-x86-low.c (x86_linux_new_fork): New function.
6511 (the_low_target) <new_fork>: Initialize new member.
6512
6513 2015-05-12 Don Breazeal <donb@codesourcery.com>
6514
6515 * linux-low.c (handle_extended_wait): Implement return value,
6516 rename argument 'event_child' to 'event_lwp', handle
6517 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6518 (linux_low_ptrace_options): New function.
6519 (linux_low_filter_event): Call linux_low_ptrace_options,
6520 use different argument fo linux_enable_event_reporting,
6521 use return value from handle_extended_wait.
6522 (extended_event_reported): New function.
6523 (linux_wait_1): Call extended_event_reported and set
6524 status to report fork events.
6525 (linux_write_memory): Add pid to debug message.
6526 (reset_lwp_ptrace_options_callback): New function.
6527 (linux_handle_new_gdb_connection): New function.
6528 (linux_target_ops): Initialize new structure member.
6529 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6530 * lynx-low.c: Initialize new structure member.
6531 * remote-utils.c (prepare_resume_reply): Implement stop reason
6532 "fork" for "T" stop message.
6533 * server.c (handle_query): Call handle_new_gdb_connection.
6534 * server.h (report_fork_events): Declare global flag.
6535 * target.h (struct target_ops) <handle_new_gdb_connection>:
6536 New member.
6537 (target_handle_new_gdb_connection): New macro.
6538 * win32-low.c: Initialize new structure member.
6539
6540 2015-05-12 Don Breazeal <donb@codesourcery.com>
6541
6542 * mem-break.c (APPEND_TO_LIST): Define macro.
6543 (clone_agent_expr): New function.
6544 (clone_one_breakpoint): New function.
6545 (clone_all_breakpoints): New function.
6546 * mem-break.h: Declare new functions.
6547
6548 2015-05-12 Don Breazeal <donb@codesourcery.com>
6549
6550 * linux-low.c (linux_supports_fork_events): New function.
6551 (linux_supports_vfork_events): New function.
6552 (linux_target_ops): Initialize new structure members.
6553 (initialize_low): Call linux_check_ptrace_features.
6554 * lynx-low.c (lynx_target_ops): Initialize new structure
6555 members.
6556 * server.c (report_fork_events, report_vfork_events):
6557 New global flags.
6558 (handle_query): Add new features to qSupported packet and
6559 response.
6560 (captured_main): Initialize new global variables.
6561 * target.h (struct target_ops) <supports_fork_events>:
6562 New member.
6563 <supports_vfork_events>: New member.
6564 (target_supports_fork_events): New macro.
6565 (target_supports_vfork_events): New macro.
6566 * win32-low.c (win32_target_ops): Initialize new structure
6567 members.
6568
6569 2015-05-12 Gary Benson <gbenson@redhat.com>
6570
6571 * server.c (handle_qxfer_exec_file): Use current process
6572 if annex is empty.
6573
6574 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6575
6576 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6577 Remove HAVE_PTRACE_GETREGS conditionals.
6578 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6579 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6580
6581 2015-05-08 Yao Qi <yao.qi@linaro.org>
6582
6583 * linux-low.c (linux_supports_conditional_breakpoints): New
6584 function.
6585 (linux_target_ops): Install new target method.
6586 * lynx-low.c (lynx_target_ops): Install NULL hook for
6587 supports_conditional_breakpoints.
6588 * nto-low.c (nto_target_ops): Likewise.
6589 * spu-low.c (spu_target_ops): Likewise.
6590 * win32-low.c (win32_target_ops): Likewise.
6591 * server.c (handle_query): Check
6592 target_supports_conditional_breakpoints.
6593 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6594 New field.
6595 (target_supports_conditional_breakpoints): New macro.
6596
6597 2015-05-06 Pedro Alves <palves@redhat.com>
6598
6599 PR server/18081
6600 * server.c (start_inferior): If the process exits, mourn it.
6601
6602 2015-04-21 Gary Benson <gbenson@redhat.com>
6603
6604 * hostio.c (fileio_open_flags_to_host): Factored out to
6605 fileio_to_host_openflags in common/fileio.c. Single use
6606 updated.
6607
6608 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6609
6610 * linux-xtensa-low.c (xtensa_fill_gregset)
6611 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6612 XCHAL_HAVE_LOOP.
6613
6614 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6615
6616 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6617 (regs_info): Replace usrregs pointer with NULL.
6618
6619 2015-04-17 Gary Benson <gbenson@redhat.com>
6620
6621 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6622 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6623 * server.c (handle_qxfer_exec_file): New function.
6624 (qxfer_packets): Add exec-file entry.
6625 (handle_query): Report qXfer:exec-file:read as supported packet.
6626
6627 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6628
6629 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6630
6631 2015-04-09 Gary Benson <gbenson@redhat.com>
6632
6633 * hostio-errno.c (errno_to_fileio_error): Remove function.
6634 Update caller to use remote_fileio_to_fio_error.
6635
6636 2015-04-09 Yao Qi <yao.qi@linaro.org>
6637
6638 * linux-low.c (linux_insert_point): Call
6639 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6640 (linux_remove_point): Call remove_memory_breakpoint if type is
6641 raw_bkpt_type_sw.
6642 * linux-x86-low.c (x86_insert_point): Don't call
6643 insert_memory_breakpoint.
6644 (x86_remove_point): Don't call remove_memory_breakpoint.
6645
6646 2015-04-01 Pedro Alves <palves@redhat.com>
6647 Cleber Rosa <crosa@redhat.com>
6648
6649 * server.c (gdbserver_usage): Reorganize and extend the usage
6650 message.
6651
6652 2015-03-24 Pedro Alves <palves@redhat.com>
6653
6654 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6655 output. Also dump TRAP_TRACE.
6656 (linux_low_filter_event): In debug output, distinguish a
6657 resume_stop SIGSTOP from a delayed SIGSTOP.
6658
6659 2015-03-24 Gary Benson <gbenson@redhat.com>
6660
6661 * linux-x86-low.c (x86_linux_new_thread): Moved to
6662 nat/x86-linux.c.
6663 (x86_linux_prepare_to_resume): Likewise.
6664
6665 2015-03-24 Gary Benson <gbenson@redhat.com>
6666
6667 * Makefile.in (x86-linux-dregs.o): New rule.
6668 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6669 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6670 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6671 (x86_linux_dr_get): Likewise.
6672 (x86_linux_dr_set): Likewise.
6673 (update_debug_registers_callback): Likewise.
6674 (x86_linux_dr_set_addr): Likewise.
6675 (x86_linux_dr_get_addr): Likewise.
6676 (x86_linux_dr_set_control): Likewise.
6677 (x86_linux_dr_get_control): Likewise.
6678 (x86_linux_dr_get_status): Likewise.
6679 (x86_linux_update_debug_registers): Likewise.
6680
6681 2015-03-24 Gary Benson <gbenson@redhat.com>
6682
6683 * linux-x86-low.c (x86_linux_update_debug_registers):
6684 New function, factored out from...
6685 (x86_linux_prepare_to_resume): ...this.
6686
6687 2015-03-24 Gary Benson <gbenson@redhat.com>
6688
6689 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6690 (x86_linux_dr_set): Likewise.
6691 (update_debug_registers_callback): Likewise.
6692 (x86_linux_dr_set_addr): Likewise.
6693 (x86_linux_dr_get_addr): Likewise.
6694 (x86_linux_dr_set_control): Likewise.
6695 (x86_linux_dr_get_control): Likewise.
6696 (x86_linux_dr_get_status): Likewise.
6697 (x86_linux_prepare_to_resume): Likewise.
6698
6699 2015-03-24 Gary Benson <gbenson@redhat.com>
6700
6701 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6702 Use perror_with_name. Pass string through gettext.
6703 (x86_linux_dr_set): Likewise.
6704
6705 2015-03-24 Gary Benson <gbenson@redhat.com>
6706
6707 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6708 (x86_linux_dr_set_addr): ...this.
6709 (x86_dr_low_get_addr): Rename to...
6710 (x86_linux_dr_get_addr): ...this.
6711 (x86_dr_low_set_control): Rename to...
6712 (x86_linux_dr_set_control): ...this.
6713 (x86_dr_low_get_control): Rename to...
6714 (x86_linux_dr_get_control): ...this.
6715 (x86_dr_low_get_status): Rename to...
6716 (x86_linux_dr_get_status): ...this.
6717 (x86_dr_low): Update with new function names.
6718
6719 2015-03-24 Gary Benson <gbenson@redhat.com>
6720
6721 * Makefile.in (x86-linux.o): New rule.
6722 * configure.srv: Add x86-linux.o to relevant targets.
6723 * linux-low.c (lwp_set_arch_private_info): New function.
6724 (lwp_arch_private_info): Likewise.
6725 * linux-x86-low.c: Include nat/x86-linux.h.
6726 (arch_lwp_info): Removed structure.
6727 (update_debug_registers_callback):
6728 Use lwp_set_debug_registers_changed.
6729 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6730 and lwp_set_debug_registers_changed.
6731 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6732
6733 2015-03-24 Gary Benson <gbenson@redhat.com>
6734
6735 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6736 * linux-arm-low.c (arm_new_thread): Likewise.
6737 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6738 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6739 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6740 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6741
6742 2015-03-24 Gary Benson <gbenson@redhat.com>
6743
6744 * linux-low.c (ptid_of_lwp): New function.
6745 (lwp_is_stopped): Likewise.
6746 (lwp_stop_reason): Likewise.
6747 * linux-x86-low.c (update_debug_registers_callback):
6748 Use lwp_is_stopped.
6749 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6750 lwp_stop_reason.
6751
6752 2015-03-24 Gary Benson <gbenson@redhat.com>
6753
6754 * linux-low.h (linux_stop_lwp): Remove declaration.
6755
6756 2015-03-24 Gary Benson <gbenson@redhat.com>
6757
6758 * linux-low.h: Include nat/linux-nat.h.
6759 * linux-low.c (iterate_over_lwps_args): New structure.
6760 (iterate_over_lwps_filter): New function.
6761 (iterate_over_lwps): Likewise.
6762 * linux-x86-low.c (update_debug_registers_callback):
6763 Update signature to what iterate_over_lwps expects.
6764 Remove PID check that iterate_over_lwps now performs.
6765 (x86_dr_low_set_addr): Use iterate_over_lwps.
6766 (x86_dr_low_set_control): Likewise.
6767
6768 2015-03-24 Gary Benson <gbenson@redhat.com>
6769
6770 * linux-x86-low.c (x86_debug_reg_state): New function.
6771 (x86_linux_prepare_to_resume): Use the above.
6772
6773 2015-03-24 Gary Benson <gbenson@redhat.com>
6774
6775 * linux-low.c (current_lwp_ptid): New function.
6776 * linux-x86-low.c: Include nat/linux-nat.h.
6777 (x86_dr_low_get_addr): Use current_lwp_ptid.
6778 (x86_dr_low_get_control): Likewise.
6779 (x86_dr_low_get_status): Likewise.
6780
6781 2015-03-20 Pedro Alves <palves@redhat.com>
6782
6783 * tracepoint.c (cmd_qtstatus): Make "str" const.
6784
6785 2015-03-20 Pedro Alves <palves@redhat.com>
6786
6787 * server.c (handle_general_set): Make "req_str" const.
6788
6789 2015-03-19 Pedro Alves <palves@redhat.com>
6790
6791 * linux-low.c (linux_resume_one_lwp): Rename to ...
6792 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6793 instead call perror_with_name.
6794 (check_ptrace_stopped_lwp_gone): New function.
6795 (linux_resume_one_lwp): Reimplement as wrapper around
6796 linux_resume_one_lwp_throw that swallows errors if the LWP is
6797 gone.
6798
6799 2015-03-19 Pedro Alves <palves@redhat.com>
6800
6801 * linux-low.c (count_events_callback, select_event_lwp_callback):
6802 No longer check whether the thread has resume_stop as last resume
6803 kind.
6804
6805 2015-03-19 Pedro Alves <palves@redhat.com>
6806
6807 * linux-low.c (count_events_callback, select_event_lwp_callback):
6808 Use the lwp's status_pending_p field, not the thread's.
6809
6810 2015-03-19 Pedro Alves <palves@redhat.com>
6811
6812 * linux-low.c (select_event_lwp_callback): Update comments to
6813 no longer mention SIGTRAP.
6814
6815 2015-03-18 Gary Benson <gbenson@redhat.com>
6816
6817 * server.c (handle_query): Do not report vFile:fstat as supported.
6818
6819 2015-03-11 Gary Benson <gbenson@redhat.com>
6820
6821 * hostio.c (sys/types.h): New include.
6822 (sys/stat.h): Likewise.
6823 (common-remote-fileio.h): Likewise.
6824 (handle_fstat): New function.
6825 (handle_vFile): Handle vFile:fstat packets.
6826
6827 2015-03-11 Gary Benson <gbenson@redhat.com>
6828
6829 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6830 struct stat.st_blocks and struct stat.st_blksize.
6831 * configure: Regenerate.
6832 * config.in: Likewise.
6833 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6834 (OBS): Add common-remote-fileio.o.
6835 (common-remote-fileio.o): New rule.
6836
6837 2015-03-09 Pedro Alves <palves@redhat.com>
6838
6839 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6840 'struct sockaddr' pointer in 'accept' call.
6841
6842 2015-03-09 Pedro Alves <palves@redhat.com>
6843
6844 Revert:
6845 2015-03-07 Pedro Alves <palves@redhat.com>
6846 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6847 or <winsock2.h> here. Instead include "gdb_socket.h".
6848 (remote_open): Use union gdb_sockaddr_u.
6849 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6850 or <winsock2.h> here. Instead include "gdb_socket.h".
6851 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6852 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6853 or <sys/un.h>.
6854 (init_named_socket, gdb_agent_helper_thread): Use union
6855 gdb_sockaddr_u.
6856
6857 2015-03-07 Pedro Alves <palves@redhat.com>
6858
6859 * configure.ac (build_warnings): Move
6860 -Wdeclaration-after-statement to the C-specific set.
6861 * configure: Regenerate.
6862
6863 2015-03-07 Pedro Alves <palves@redhat.com>
6864
6865 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6866 or <winsock2.h> here. Instead include "gdb_socket.h".
6867 (remote_open): Use union gdb_sockaddr_u.
6868 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6869 or <winsock2.h> here. Instead include "gdb_socket.h".
6870 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6871 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6872 or <sys/un.h>.
6873 (init_named_socket, gdb_agent_helper_thread): Use union
6874 gdb_sockaddr_u.
6875
6876 2015-03-07 Pedro Alves <palves@redhat.com>
6877
6878 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6879 instead.
6880
6881 2015-03-06 Yao Qi <yao.qi@linaro.org>
6882
6883 * linux-aarch64-low.c (aarch64_insert_point): Use
6884 show_debug_regs as a boolean.
6885 (aarch64_remove_point): Likewise.
6886
6887 2015-03-05 Pedro Alves <palves@redhat.com>
6888
6889 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6890 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6891 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6892 * nto-low.c (nto_target_ops): Likewise.
6893 * spu-low.c (spu_target_ops): Likewise.
6894 * win32-low.c (win32_target_ops): Likewise.
6895
6896 2015-03-04 Pedro Alves <palves@redhat.com>
6897
6898 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6899 Decide whether a breakpoint triggered based on the SIGTRAP's
6900 siginfo.si_code.
6901 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6902 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6903 (linux_low_filter_event): Check for breakpoints before checking
6904 watchpoints.
6905 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6906 siginfo.si_code.
6907 (linux_stopped_by_sw_breakpoint)
6908 (linux_supports_stopped_by_sw_breakpoint)
6909 (linux_stopped_by_hw_breakpoint)
6910 (linux_supports_stopped_by_hw_breakpoint): New functions.
6911 (linux_target_ops): Install new target methods.
6912
6913 2015-03-04 Pedro Alves <palves@redhat.com>
6914
6915 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6916 * server.c (swbreak_feature, hwbreak_feature): New globals.
6917 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6918 (captured_main): Clear swbreak_feature and hwbreak_feature.
6919 * server.h (swbreak_feature, hwbreak_feature): Declare.
6920 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6921 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6922 supports_stopped_by_hw_breakpoint>: New fields.
6923 (target_supports_stopped_by_sw_breakpoint)
6924 (target_stopped_by_sw_breakpoint)
6925 (target_supports_stopped_by_hw_breakpoint)
6926 (target_stopped_by_hw_breakpoint): Declare.
6927
6928 2015-03-04 Pedro Alves <palves@redhat.com>
6929
6930 enum lwp_stop_reason -> enum target_stop_reason
6931 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6932 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6933 (linux_wait_1, stuck_in_jump_pad_callback)
6934 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6935 (linux_stopped_by_watchpoint):
6936 * linux-low.h (enum lwp_stop_reason): Delete.
6937 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6938 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6939
6940 2015-03-04 Yao Qi <yao.qi@linaro.org>
6941
6942 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6943
6944 2015-03-03 Gary Benson <gbenson@redhat.com>
6945
6946 * hostio.c (handle_vFile): Fix prefix lengths.
6947
6948 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6949
6950 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6951 ptr_bits.
6952
6953 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6954
6955 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6956 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6957 (clean): Add "rm -f" for above C files.
6958 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6959 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6960 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6961 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6962 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6963 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6964 (init_registers_s390x_vx_linux64)
6965 (init_registers_s390x_tevx_linux64)
6966 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6967 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6968 declarations.
6969 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6970 (s390_store_vxrs_high): New functions.
6971 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6972 NT_S390_VXRS_HIGH.
6973 (s390_arch_setup): Add logic for selecting one of the new target
6974 descriptions. Activate the new vector regsets if applicable.
6975 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6976 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6977 and init_registers_s390x_tevx_linux64.
6978
6979 2015-03-01 Pedro Alves <palves@redhat.com>
6980
6981 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6982 parameter.
6983
6984 2015-02-27 Pedro Alves <palves@redhat.com>
6985
6986 * linux-x86-low.c (u_debugreg_offset): New function.
6987 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6988
6989 2015-02-27 Pedro Alves <palves@redhat.com>
6990
6991 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6992 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6993 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6994 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6995 (ps_lsetfpregs, ps_getpid)
6996 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6997 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6998 (ps_lsetxregs, ps_plog): Declare.
6999
7000 2015-02-27 Pedro Alves <palves@redhat.com>
7001
7002 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7003 IP_AGENT_EXPORT_FUNC.
7004 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7005 IP_AGENT_EXPORT_FUNC.
7006 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7007 (IP_AGENT_EXPORT): Delete.
7008 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7009 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7010 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7011 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7012 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7013 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7014 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7015 (traceframe_read_count, traceframe_write_count)
7016 (traceframes_created, trace_state_variables, get_raw_reg)
7017 (get_trace_state_variable_value, set_trace_state_variable_value)
7018 (ust_loaded, helper_thread_id, cmd_buf): Use
7019 IPA_SYM_EXPORTED_NAME.
7020 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7021 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7022 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7023 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7024 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7025 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7026 EXTERN_C_PUSH/EXTERN_C_POP.
7027 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7028 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7029 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7030 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7031 (traceframe_write_count, traceframe_read_count)
7032 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7033 (about_to_request_buffer_space, get_trace_state_variable_value)
7034 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7035 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7036 EXTERN_C_PUSH/EXTERN_C_POP.
7037 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7038 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7039 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7040 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7041 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7042 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7043 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7044 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7045 Define.
7046 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7047 (IP_AGENT_EXPORT_VAR_DECL): Define.
7048 (tracing): Declare.
7049 (gdb_agent_get_raw_reg): Declare.
7050
7051 2015-02-27 Tom Tromey <tromey@redhat.com>
7052 Pedro Alves <palves@redhat.com>
7053
7054 Rename symbols whose names are reserved C++ keywords throughout.
7055
7056 2015-02-27 Pedro Alves <palves@redhat.com>
7057
7058 * Makefile.in (COMPILER): New, get it from autoconf.
7059 (CXX): Get from autoconf instead.
7060 (COMPILE.pre): Use COMPILER.
7061 (CC-LD): Rename to ...
7062 (CC_LD): ... this. Use COMPILER.
7063 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7064 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7065 * acinclude.m4: Include build-with-cxx.m4.
7066 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7067 Disable -Werror by default if building in C++ mode.
7068 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7069 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7070 the C++ compiler. Save/restore CXXFLAGS too.
7071 * configure: Regenerate.
7072
7073 2015-02-27 Pedro Alves <palves@redhat.com>
7074
7075 * acinclude.m4: Include libiberty.m4.
7076 * configure.ac: Call libiberty_INIT.
7077 * config.in, configure: Regenerate.
7078
7079 2015-02-26 Pedro Alves <palves@redhat.com>
7080
7081 * linux-low.c (linux_wait_1): When incrementing the PC past a
7082 program breakpoint always use the_low_target.breakpoint_len as
7083 increment, rather than the maximum between that and
7084 the_low_target.decr_pc_after_break.
7085
7086 2015-02-23 Pedro Alves <palves@redhat.com>
7087
7088 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7089 thread was doing a step-over; always adjust the PC if
7090 we stepped over a permanent breakpoint.
7091 (linux_wait_1): If we stepped over breakpoint that was on top of a
7092 permanent breakpoint, manually advance the PC past it.
7093
7094 2015-02-23 Pedro Alves <palves@redhat.com>
7095
7096 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7097 modes.
7098 (x86_fill_gregset, x86_store_gregset): Use it when handling
7099 $orig_eax.
7100
7101 2015-02-20 Pedro Alves <palves@redhat.com>
7102
7103 * thread-db.c: Include "nat/linux-procfs.h".
7104 (thread_db_init): Skip listing new threads if the kernel supports
7105 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7106
7107 2015-02-20 Pedro Alves <palves@redhat.com>
7108
7109 * linux-low.c (status_pending_p_callback): Use ptid_match.
7110
7111 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7112
7113 PR breakpoints/16812
7114 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7115 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7116 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7117
7118 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7119
7120 PR breakpoints/15956
7121 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7122
7123 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7124
7125 * linux-low.c (linux_low_btrace_conf): Print size.
7126 * server.c (handle_btrace_conf_general_set): New.
7127 (hanle_general_set): Call handle_btrace_conf_general_set.
7128 (handle_query): Report Qbtrace-conf:bts:size as supported.
7129
7130 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7131
7132 * linux-low.c (linux_low_enable_btrace): Update parameters.
7133 (linux_low_btrace_conf): New.
7134 (linux_target_ops)<to_btrace_conf>: Initialize.
7135 * server.c (current_btrace_conf): New.
7136 (handle_btrace_enable): Rename to ...
7137 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7138 to target_enable_btrace. Update comment. Update users.
7139 (handle_qxfer_btrace_conf): New.
7140 (qxfer_packets): Add btrace-conf entry.
7141 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7142 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7143 (target_ops)<read_btrace_conf>: New.
7144 (target_enable_btrace): Update parameters.
7145 (target_read_btrace_conf): New.
7146
7147 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7148
7149 * server.c (handle_btrace_general_set): Remove call to
7150 target_supports_btrace.
7151 (supported_btrace_packets): New.
7152 (handle_query): Call supported_btrace_packets.
7153 * target.h: include btrace-common.h.
7154 (btrace_target_info): Removed.
7155 (supports_btrace, target_supports_btrace): Update parameters.
7156
7157 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7158
7159 * Makefile.in (SFILES): Add common/btrace-common.c.
7160 (OBS): Add common/btrace-common.o.
7161 (btrace-common.o): Add build rules.
7162 * linux-low: Include btrace-common.h.
7163 (linux_low_read_btrace): Use struct btrace_data. Call
7164 btrace_data_init and btrace_data_fini.
7165
7166 2015-02-06 Pedro Alves <palves@redhat.com>
7167
7168 * thread-db.c (find_new_threads_callback): Add debug output.
7169
7170 2015-02-04 Pedro Alves <palves@redhat.com>
7171
7172 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7173 (resume_stopped_resumed_lwps): New function.
7174 (linux_wait_for_event_filtered): Use it.
7175
7176 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7177
7178 * Makefile.in (SFILES): Add linux-personality.c.
7179 (linux-personality.o): New rule.
7180 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7181 list of objects to be built.
7182 * linux-low.c: Include nat/linux-personality.h.
7183 (linux_create_inferior): Remove code to disable address space
7184 randomization (moved to ../nat/linux-personality.c). Create
7185 cleanup to disable address space randomization.
7186
7187 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7188
7189 * Makefile.in (posix-strerror.o): New rule.
7190 (mingw-strerror.o): Likewise.
7191 * configure: Regenerated.
7192 * configure.ac: Source file ../common/common.host. Initialize new
7193 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7194
7195 2015-01-14 Yao Qi <yao@codesourcery.com>
7196
7197 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7198 (ppc-linux.o): New rule.
7199 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7200 * configure.ac: AC_CHECK_FUNCS(getauxval).
7201 * config.in: Re-generated.
7202 * configure: Re-generated.
7203 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7204 ppc64_64bit_inferior_p
7205
7206 2015-01-14 Yao Qi <yao@codesourcery.com>
7207
7208 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7209 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7210 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7211 (PT_ORIG_R3, PT_TRAP): Likewise.
7212 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7213 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7214 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7215
7216 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7217
7218 * i387-fp.c (i387_cache_to_xsave): In look over
7219 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7220 zmmh_low_space field by use of zmmh_high_space.
7221
7222 2015-01-09 Pedro Alves <palves@redhat.com>
7223
7224 * linux-low.c (step_over_bkpt): Move higher up in the file.
7225 (handle_extended_wait): Don't store the stop_pc here.
7226 (get_stop_pc): Adjust comments and rename to ...
7227 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7228 stopped for a software breakpoint or hardware breakpoint.
7229 (thread_still_has_status_pending_p): New function.
7230 (status_pending_p_callback): Use
7231 thread_still_has_status_pending_p. If the event is no longer
7232 interesting, resume the LWP.
7233 (handle_tracepoints): Add assert.
7234 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7235 (wstatus_maybe_breakpoint): New function.
7236 (cancel_breakpoint): Delete function.
7237 (check_stopped_by_watchpoint): New function, factored out from
7238 linux_low_filter_event.
7239 (lp_status_maybe_breakpoint): Delete function.
7240 (linux_low_filter_event): Remove filter_ptid argument.
7241 Leave thread group exits pending here. Store the LWP's stop PC.
7242 Always leave events pending.
7243 (linux_wait_for_event_filtered): Pull all events out of the
7244 kernel, and leave them all pending.
7245 (count_events_callback, select_event_lwp_callback): Consider all
7246 events.
7247 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7248 (select_event_lwp): Only give preference to the stepping LWP in
7249 all-stop mode. Adjust comments.
7250 (ignore_event): New function.
7251 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7252 references to cancel_breakpoints. Adjust to renames. Also give
7253 equal priority to all LWPs that have had events in non-stop mode.
7254 If reporting a software breakpoint event, unadjust the LWP's PC.
7255 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7256 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7257 Adjust.
7258 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7259 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7260 (linux_stopped_by_watchpoint): Adjust.
7261 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7262 * linux-low.h (enum lwp_stop_reason): New.
7263 (struct lwp_info) <stop_pc>: Adjust comment.
7264 <stopped_by_watchpoint>: Delete field.
7265 <stop_reason>: New field.
7266 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7267 * mem-break.c (software_breakpoint_inserted_here)
7268 (hardware_breakpoint_inserted_here): New function.
7269 * mem-break.h (software_breakpoint_inserted_here)
7270 (hardware_breakpoint_inserted_here): Declare.
7271 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7272 (cancel_breakpoints): Delete.
7273 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7274 (upload_fast_traceframes): Remove references to
7275 cancel_breakpoints.
7276
7277 2015-01-09 Pedro Alves <palves@redhat.com>
7278
7279 * thread-db.c (find_new_threads_callback): Ignore thread if the
7280 kernel thread ID is -1.
7281
7282 2015-01-09 Pedro Alves <palves@redhat.com>
7283
7284 * linux-low.c (linux_attach_fail_reason_string): Move to
7285 nat/linux-ptrace.c, and rename.
7286 (linux_attach_lwp): Update comment.
7287 (attach_proc_task_lwp_callback): New function.
7288 (linux_attach): Adjust to rename and use
7289 linux_proc_attach_tgid_threads.
7290 (linux_attach_fail_reason_string): Delete declaration.
7291
7292 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7293
7294 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7295 * server.c (gdbserver_version): Likewise.
7296
7297 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7298
7299 * remote-utils.c: Include ctype.h.
7300 (input_interrupt): Explicitly handle the case when the char
7301 received is the NUL byte. Improve the printing of non-ASCII
7302 characters.
7303
7304 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7305
7306 * linux-low.c (linux_low_filter_event): Update call to
7307 linux_enable_event_reporting following the addition of
7308 a new parameter to that function.
7309
7310 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7311
7312 PR server/17457
7313 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7314 (AARCH64_FPCR_REGNO): Likewise.
7315 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7316 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7317 (aarch64_store_fpregset): Likewise.
7318
7319 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7320
7321 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7322 Remove FIXME comment about assumption about N.
7323
7324 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7325
7326 * configure.ac: If large-file support is disabled in GDBserver,
7327 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7328 * configure: Regenerate.
7329
7330 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7331
7332 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7333 warning upon ENODATA from ptrace.
7334 * linux-s390-low.c (s390_store_tdb): New.
7335 (s390_regsets): Add regset for NT_S390_TDB.
7336
7337 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7338
7339 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7340 without a fill_function.
7341 * linux-s390-low.c (s390_fill_last_break): Remove.
7342 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7343 (s390_arch_setup): Use regset's size instead of fill_function for
7344 loop end condition.
7345
7346 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7347
7348 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7349 the regset's store function when ptrace returned an error.
7350 * regcache.c (get_thread_regcache): Invalidate register cache
7351 before fetching inferior's registers.
7352
7353 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7354
7355 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7356 while-loop as for-loop.
7357 (regsets_store_inferior_registers): Likewise.
7358
7359 2014-11-28 Yao Qi <yao@codesourcery.com>
7360
7361 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7362 * config.in, configure: Re-generate.
7363 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7364 is defined.
7365
7366 2014-11-21 Yao Qi <yao@codesourcery.com>
7367
7368 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7369 (AC_CHECK_HEADERS): Remove malloc.h.
7370 * configure: Re-generated.
7371 * config.in: Re-generated.
7372 * server.h: Don't include alloca.h and malloc.h.
7373 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7374 Don't include malloc.h.
7375
7376 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7377
7378 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7379 corresponding ERRNO check in same block.
7380
7381 2014-11-12 Pedro Alves <palves@redhat.com>
7382
7383 * server.c (cont_thread): Update comment.
7384 (start_inferior, attach_inferior): No longer clear cont_thread.
7385 (handle_v_cont): No longer set cont_thread.
7386 (captured_main): Clear cont_thread each time a GDB connects.
7387
7388 2014-11-12 Pedro Alves <palves@redhat.com>
7389
7390 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7391 thread, and don't resume all threads if the Hc thread has exited.
7392
7393 2014-11-12 Pedro Alves <palves@redhat.com>
7394
7395 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7396 the process group instead of to a specific LWP.
7397
7398 2014-10-15 Pedro Alves <palves@redhat.com>
7399
7400 PR server/17487
7401 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7402 parameter.
7403 (arm_set_thread_context): Delete.
7404 (the_low_target): Adjust.
7405 * win32-i386-low.c (debug_registers_changed)
7406 (debug_registers_used): Delete.
7407 (update_debug_registers_callback): New function.
7408 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7409 needing to update their debug registers.
7410 (win32_get_current_dr): New function.
7411 (x86_dr_low_get_addr, x86_dr_low_get_control)
7412 (x86_dr_low_get_status): Fetch the debug register from the thread
7413 record's context.
7414 (i386_initial_stuff): Adjust.
7415 (i386_get_thread_context): Remove current_event parameter. Don't
7416 clear debug_registers_changed nor copy DR values to
7417 debug_reg_state.
7418 (i386_set_thread_context): Delete.
7419 (i386_prepare_to_resume): New function.
7420 (i386_thread_added): Mark the thread as needing to update irs
7421 debug registers.
7422 (the_low_target): Remove i386_set_thread_context and install
7423 i386_prepare_to_resume.
7424 * win32-low.c (win32_get_thread_context): Adjust.
7425 (win32_set_thread_context): Use SetThreadContext
7426 directly.
7427 (win32_prepare_to_resume): New function.
7428 (win32_require_context): New function, factored out from ...
7429 (thread_rec): ... this.
7430 (continue_one_thread): Call win32_prepare_to_resume on each thread
7431 we're about to continue.
7432 (win32_resume): Call win32_prepare_to_resume on the event thread.
7433 * win32-low.h (struct win32_thread_info)
7434 <debug_registers_changed>: New field.
7435 (struct win32_target_ops): Change prototype of set_thread_context,
7436 delete set_thread_context and add prepare_to_resume.
7437 (win32_require_context): New declaration.
7438
7439 2014-10-08 Gary Benson <gbenson@redhat.com>
7440
7441 * server.h: Do not include common-exceptions.h.
7442
7443 2014-10-08 Gary Benson <gbenson@redhat.com>
7444
7445 * server.h: Do not include cleanups.h.
7446
7447 2014-09-30 James Hogan <james.hogan@imgtec.com>
7448
7449 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7450 mips64-dsp-linux.c.
7451
7452 2014-09-23 Yao Qi <yao@codesourcery.com>
7453
7454 * linux-low.c (lp_status_maybe_breakpoint): New function.
7455 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7456 (count_events_callback): Likewise.
7457 (select_event_lwp_callback): Likewise.
7458 (cancel_breakpoints_callback): Likewise.
7459
7460 2014-09-19 Don Breazeal <donb@codesourcery.com>
7461
7462 * linux-low.c (handle_extended_wait): Call
7463 linux_ptrace_get_extended_event.
7464 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7465 linux_is_extended_waitstatus.
7466
7467 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7468
7469 * Makefile.in (CPPFLAGS): Define.
7470 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7471 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7472
7473 2014-09-16 Gary Benson <gbenson@redhat.com>
7474
7475 * inferiors.h (current_inferior): Renamed as...
7476 (current_thread): New variable. All uses updated.
7477 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7478 (maybe_move_out_of_jump_pad): Likewise.
7479 (cancel_breakpoint): Likewise.
7480 (linux_low_filter_event): Likewise.
7481 (wait_for_sigstop): Likewise.
7482 (linux_resume_one_lwp): Likewise.
7483 (need_step_over_p): Likewise.
7484 (start_step_over): Likewise.
7485 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7486 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7487 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7488 and save_inferior as saved_thread.
7489 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7490 saved_thread.
7491 (regcache_invalidate_thread): Likewise.
7492 * remote-utils.c (prepare_resume_reply): Likewise.
7493 * thread-db.c (thread_db_get_tls_address): Likewise.
7494 (disable_thread_event_reporting): Likewise.
7495 (remove_thread_event_breakpoints): Likewise.
7496 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7497 as saved_thread.
7498 * target.h (set_desired_inferior): Renamed as...
7499 (set_desired_thread): New declaration. All uses updated.
7500 * server.c (myresume): Updated comment to reference thread instead
7501 of inferior.
7502 (handle_serial_event): Likewise.
7503 (handle_target_event): Likewise.
7504
7505 2014-09-12 Tom Tromey <tromey@redhat.com>
7506 Gary Benson <gbenson@redhat.com>
7507
7508 * regcache.h: Include common-regcache.h.
7509 (regcache_read_pc): Don't declare.
7510 * regcache.c (get_thread_regcache_for_ptid): New function.
7511
7512 2014-09-11 Tom Tromey <tromey@redhat.com>
7513 Gary Benson <gbenson@redhat.com>
7514
7515 * symbol.c: New file.
7516 * Makefile.in (SFILES): Add symbol.c.
7517 (OBS): Add symbol.o.
7518
7519 2014-09-11 Gary Benson <gbenson@redhat.com>
7520
7521 * target.c (target_stop_ptid, target_continue_ptid): New
7522 functions.
7523
7524 2014-09-11 Tom Tromey <tromey@redhat.com>
7525 Gary Benson <gbenson@redhat.com>
7526
7527 * target.h: Include target/target.h.
7528 * target.c (target_read_memory, target_read_uint32)
7529 (target_write_memory): New functions.
7530
7531 2014-09-11 Gary Benson <gbenson@redhat.com>
7532
7533 * server.h (debug_hw_points): Don't declare.
7534 * server.c (debug_hw_points): Don't define. Replace all uses
7535 with show_debug_regs.
7536 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7537 all uses with show_debug_regs.
7538
7539 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7540
7541 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7542 endianness into account.
7543 (ppc_supply_ptrace_register): Likewise.
7544
7545 2014-09-03 James Hogan <james.hogan@imgtec.com>
7546
7547 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7548 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7549
7550 2014-09-03 Gary Benson <gbenson@redhat.com>
7551
7552 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7553 ALL_DEBUG_ADDRESS_REGISTERS.
7554
7555 2014-09-02 Gary Benson <gbenson@redhat.com>
7556
7557 * i386-low.h: Renamed as...
7558 * x86-low.h: New file. All type, function and variable name
7559 prefixes changed from "i386_" to "x86_". All references updated.
7560 * i386-low.c: Renamed as...
7561 * x86-low.c: New file. All type, function and variable name
7562 prefixes changed from "i386_" to "x86_". All references updated.
7563
7564 2014-09-02 Gary Benson <gbenson@redhat.com>
7565
7566 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7567 (x86_linux_new_thread): Likewise.
7568
7569 2014-08-29 Gary Benson <gbenson@redhat.com>
7570
7571 * server.h (setjmp.h): Do not include.
7572 (toplevel): Do not declare.
7573 (common-exceptions.h): Include.
7574 (cleanups.h): Likewise.
7575 * server.c (toplevel): Do not define.
7576 (exit_code): New static global.
7577 (detach_or_kill_for_exit_cleanup): New function.
7578 (main): New function. Original main renamed to...
7579 (captured_main): New function.
7580 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7581
7582 2014-08-29 Gary Benson <gbenson@redhat.com>
7583
7584 * Makefile.in (SFILES): Add common/common-exceptions.c.
7585 (OBS): Add common-exceptions.o.
7586 (common-exceptions.o): New rule.
7587 * utils.c (prepare_to_throw_exception): New function.
7588
7589 2014-08-29 Gary Benson <gbenson@redhat.com>
7590
7591 * config.in: Regenerate.
7592 * configure: Likewise.
7593
7594 2014-08-29 Gary Benson <gbenson@redhat.com>
7595
7596 * Makefile.in (SFILES): Add common/cleanups.c.
7597 (OBS): cleanups.o.
7598 (cleanups.o): New rule.
7599
7600 2014-08-29 Gary Benson <gbenson@redhat.com>
7601
7602 * utils.c (internal_vwarning): New function.
7603
7604 2014-08-28 Gary Benson <gbenson@redhat.com>
7605
7606 * utils.h (fatal): Remove declaration.
7607 * utils.c (fatal): Remove function.
7608
7609 2014-08-28 Gary Benson <gbenson@redhat.com>
7610
7611 * tracepoint.c (gdb_agent_init): Replace fatal with
7612 perror_with_name.
7613 (initialize_tracepoint): Likewise.
7614
7615 2014-08-28 Gary Benson <gbenson@redhat.com>
7616
7617 * remote-utils.c (remote_prepare): Replace fatal with error.
7618
7619 2014-08-28 Gary Benson <gbenson@redhat.com>
7620
7621 * linux-low.c (linux_async): Replace fatal with warning.
7622 Tidy up and return.
7623 (linux_start_non_stop): Return -1 if linux_async failed.
7624
7625 2014-08-28 Gary Benson <gbenson@redhat.com>
7626
7627 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7628 gdb_assert.
7629 (i386_dr_low_get_addr): Remove vague comment.
7630 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7631 gdb_assert.
7632
7633 2014-08-28 Gary Benson <gbenson@redhat.com>
7634
7635 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7636 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7637 internal_error.
7638 (linux_resume_one_lwp): Likewise.
7639 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7640 gdb_assert.
7641 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7642 with internal_error.
7643 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7644 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7645 (find_register_by_name): Replace fatal with internal_error.
7646 (find_regno): Likewise.
7647 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7648 * thread-db.c (thread_db_create_event): Likewise.
7649 (thread_db_load_search): Likewise.
7650 (try_thread_db_load_1): Likewise.
7651 * tracepoint.c (get_jump_space_head): Replace fatal with
7652 internal_error.
7653 (claim_trampoline_space): Likewise.
7654 (have_fast_tracepoint_trampoline_buffer): Likewise.
7655 (cmd_qtstart): Likewise.
7656 (stop_tracing): Likewise.
7657 (fast_tracepoint_collecting): Likewise.
7658 (target_malloc): Likewise.
7659 (download_tracepoint): Likewise.
7660 (download_trace_state_variables): Replace check with gdb_assert.
7661 (upload_fast_traceframes): Replace fatal with internal_error.
7662
7663 2014-08-19 Tom Tromey <tromey@redhat.com>
7664 Gary Benson <gbenson@redhat.com>
7665
7666 * Makefile.in (SFILES): Add common/common-debug.c.
7667 (OBS): Add common-debug.o.
7668 (common-debug.o): New rule.
7669 * debug.h (debug_printf): Don't declare.
7670 * debug.c (debug_printf): Renamed and rewritten as...
7671 (debug_vprintf): New function.
7672
7673 2014-08-19 Gary Benson <gbenson@redhat.com>
7674
7675 * utils.h: Do not include print-utils.h.
7676
7677 2014-08-19 Tom Tromey <tromey@redhat.com>
7678 Gary Benson <gbenson@redhat.com>
7679
7680 * server.h: Add static assertion.
7681 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7682
7683 2014-08-19 Tom Tromey <tromey@redhat.com>
7684 Gary Benson <gbenson@redhat.com>
7685
7686 * Makefile.in (SFILES): Add common/errors.c.
7687 (OBS): Add errors.o.
7688 (IPA_OBS): Add errors-ipa.o.
7689 (errors.o): New rule.
7690 (errors-ipa.o): Likewise.
7691 * utils.h (perror_with_name, error, warning): Don't declare.
7692 * utils.c (warning): Renamed and rewritten as...
7693 (vwarning): New function.
7694 (error): Renamed and rewritten as...
7695 (verror): New function.
7696 (internal_error): Renamed and rewritten as...
7697 (internal_verror): New function.
7698
7699 2014-08-07 Gary Benson <gbenson@redhat.com>
7700
7701 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7702 * configure: Regenerate.
7703 * config.in: Likewise.
7704 * server.h: Do not include errno.h.
7705 * event-loop.c: Likewise.
7706 * hostio-errno.c: Likewise.
7707 * linux-low.c: Likewise.
7708 * remote-utils.c: Likewise.
7709 * spu-low.c: Likewise.
7710 * utils.c: Likewise.
7711 * gdbreplay.c: Unconditionally include errno.h.
7712
7713 2014-08-07 Gary Benson <gbenson@redhat.com>
7714
7715 * server.h: Do not include string.h.
7716 * event-loop.c: Likewise.
7717 * linux-low.c: Likewise.
7718 * regcache.c: Likewise.
7719 * remote-utils.c: Likewise.
7720 * spu-low.c: Likewise.
7721 * utils.c: Likewise.
7722
7723 2014-08-07 Gary Benson <gbenson@redhat.com>
7724
7725 * server.h: Do not include gdb_assert.h.
7726
7727 2014-08-07 Gary Benson <gbenson@redhat.com>
7728
7729 * server.h: Do not include common-utils.h.
7730
7731 2014-08-07 Gary Benson <gbenson@redhat.com>
7732
7733 * server.h: Do not include ptid.h.
7734 * notif.h: Likewise.
7735
7736 2014-08-07 Gary Benson <gbenson@redhat.com>
7737
7738 * server.h: Do not include gdb_locale.h.
7739
7740 2014-08-07 Gary Benson <gbenson@redhat.com>
7741
7742 * server.h: Do not include gdb/signals.h.
7743 * win32-low.c: Likewise.
7744
7745 2014-08-07 Gary Benson <gbenson@redhat.com>
7746
7747 * server.h: Do not include pathmax.h.
7748
7749 2014-08-07 Gary Benson <gbenson@redhat.com>
7750
7751 * server.h: Do not include libiberty.h.
7752 * linux-bfin-low.c: Likewise.
7753
7754 2014-08-07 Gary Benson <gbenson@redhat.com>
7755
7756 * server.h: Do not include ansidecl.h.
7757
7758 2014-08-07 Gary Benson <gbenson@redhat.com>
7759
7760 * linux-x86-low.c: Do not include stddef.h.
7761 * lynx-ppc-low.c: Likewise.
7762 * tracepoint.c: Likewise.
7763
7764 2014-08-07 Gary Benson <gbenson@redhat.com>
7765
7766 * server.h: Do not include stdarg.h.
7767 * nto-low.c: Likewise.
7768
7769 2014-08-07 Gary Benson <gbenson@redhat.com>
7770
7771 * server.h: Do not include stdlib.h.
7772 * inferiors.c: Likewise.
7773 * linux-low.c: Likewise.
7774 * regcache.c: Likewise.
7775 * spu-low.c: Likewise.
7776 * tracepoint.c: Likewise.
7777 * utils.c: Likewise.
7778
7779 2014-08-07 Gary Benson <gbenson@redhat.com>
7780
7781 * server.h: Do not include stdio.h.
7782 * linux-low.c: Likewise.
7783 * remote-utils.c: Likewise.
7784 * spu-low.c: Likewise.
7785 * utils.c: Likewise.
7786 * wincecompat.c: Likewise.
7787
7788 2014-08-06 Gary Benson <gbenson@redhat.com>
7789
7790 * regcache.c (init_register_cache): Move conditionals inside if.
7791
7792 2014-08-06 Gary Benson <gbenson@redhat.com>
7793
7794 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7795
7796 2014-07-31 Gary Benson <gbenson@redhat.com>
7797
7798 * ax.h: Do not include server.h.
7799 * gdbthread.h: Likewise.
7800 * lynx-low.h: Likewise.
7801 * notif.h: Likewise.
7802
7803 2014-07-30 Gary Benson <gbenson@redhat.com>
7804
7805 * server.h: Include common-defs.h.
7806 Do not include config.h or build-gnulib-gdbserver/config.h.
7807
7808 2014-07-30 Gary Benson <gbenson@redhat.com>
7809
7810 * hostio-errno.c: Move server.h to top of includes list.
7811 * inferiors.c: Likewise.
7812 * linux-x86-low.c: Likewise.
7813 * notif.c: Include server.h.
7814
7815 2014-07-24 Tom Tromey <tromey@redhat.com>
7816 Gary Benson <gbenson@redhat.com>
7817
7818 * server.h (CORE_ADDR): Now unsigned.
7819
7820 2014-07-16 Pedro Alves <palves@redhat.com>
7821
7822 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7823
7824 2014-07-15 Pedro Alves <palves@redhat.com>
7825
7826 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7827 copy.
7828
7829 2014-07-11 Pedro Alves <palves@redhat.com>
7830
7831 * linux-low.c (kill_wait_lwp): New function, based on
7832 kill_one_lwp_callback, but use my_waitpid directly.
7833 (kill_one_lwp_callback, linux_kill): Use it.
7834
7835 2014-06-23 Pedro Alves <palves@redhat.com>
7836
7837 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7838 before setting DR0..DR3.
7839
7840 2014-06-20 Gary Benson <gbenson@redhat.com>
7841
7842 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7843 * configure: Regenerated.
7844 * config.in: Likewise.
7845
7846 2014-06-20 Gary Benson <gbenson@redhat.com>
7847
7848 * Makefile.in (SFILES): Update locations for files moved
7849 from common to nat.
7850 (object file files): Reordered.
7851
7852 2014-06-20 Gary Benson <gbenson@redhat.com>
7853
7854 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7855 (i386_dr_low_set_addr): Likewise.
7856 (i386_dr_low_get_addr): Likewise.
7857 (i386_dr_low_can_set_control): Likewise.
7858 (i386_dr_low_set_control): Likewise.
7859 (i386_dr_low_get_control): Likewise.
7860 (i386_dr_low_get_status): Likewise.
7861 (i386_get_debug_register_length): Likewise.
7862 * linux-x86-low.c (i386_dr_low_set_addr):
7863 Changed signature. Made static.
7864 (i386_dr_low_get_addr): Likewise.
7865 (i386_dr_low_set_control): Likewise.
7866 (i386_dr_low_get_control): Likewise.
7867 (i386_dr_low_get_status): Likewise.
7868 (i386_dr_low): New global variable.
7869 * win32-i386-low.c (i386_dr_low_set_addr):
7870 Changed signature. Made static.
7871 (i386_dr_low_get_addr): Likewise.
7872 (i386_dr_low_set_control): Likewise.
7873 (i386_dr_low_get_control): Likewise.
7874 (i386_dr_low_get_status): Likewise.
7875 (i386_dr_low): New global variable.
7876
7877 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7878
7879 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7880 * Makefile.in (AR, AR_FLAGS): Define.
7881 * configure: Regenerate.
7882
7883 2014-06-19 Gary Benson <gbenson@redhat.com>
7884
7885 * Makefile.in (i386-dregs.o): New rule.
7886 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7887 * i386-low.c (target.h): Remove include.
7888 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7889 (DR_CONTROL_SHIFT): Likewise.
7890 (DR_CONTROL_SIZE): Likewise.
7891 (DR_RW_EXECUTE): Likewise.
7892 (DR_RW_WRITE): Likewise.
7893 (DR_RW_READ): Likewise.
7894 (DR_RW_IORW): Likewise.
7895 (DR_LEN_1): Likewise.
7896 (DR_LEN_2): Likewise.
7897 (DR_LEN_4): Likewise.
7898 (DR_LEN_8): Likewise.
7899 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7900 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7901 (DR_ENABLE_SIZE): Likewise.
7902 (DR_LOCAL_SLOWDOWN): Likewise.
7903 (DR_GLOBAL_SLOWDOWN): Likewise.
7904 (DR_CONTROL_RESERVED): Likewise.
7905 (I386_DR_CONTROL_MASK): Likewise.
7906 (I386_DR_VACANT): Likewise.
7907 (I386_DR_LOCAL_ENABLE): Likewise.
7908 (I386_DR_GLOBAL_ENABLE): Likewise.
7909 (I386_DR_DISABLE): Likewise.
7910 (I386_DR_SET_RW_LEN): Likewise.
7911 (I386_DR_GET_RW_LEN): Likewise.
7912 (I386_DR_WATCH_HIT): Likewise.
7913 (i386_wp_op_t): Likewise.
7914 (i386_show_dr): Likewise.
7915 (i386_length_and_rw_bits): Likewise.
7916 (i386_insert_aligned_watchpoint): Likewise.
7917 (i386_remove_aligned_watchpoint): Likewise.
7918 (i386_handle_nonaligned_watchpoint): Likewise.
7919 i386_update_inferior_debug_regs(): Likewise.
7920 (i386_dr_insert_watchpoint): Likewise.
7921 (i386_dr_remove_watchpoint): Likewise.
7922 (i386_dr_region_ok_for_watchpoint): Likewise.
7923 (i386_dr_stopped_data_address): Likewise.
7924 (i386_dr_stopped_by_watchpoint): Likewise.
7925
7926 2014-06-19 Gary Benson <gbenson@redhat.com>
7927
7928 * i386-low.c (i386_dr_show): Renamed to
7929 i386_show_dr and made static. All uses updated.
7930 (i386_dr_length_and_rw_bits): Renamed to
7931 i386_length_and_rw_bits and made static.
7932 All uses updated.
7933 (i386_dr_insert_aligned_watchpoint): Renamed to
7934 i386_insert_aligned_watchpoint and made static.
7935 All uses updated.
7936 (i386_dr_remove_aligned_watchpoint): Renamed to
7937 i386_remove_aligned_watchpoint and made static.
7938 All uses updated.
7939 (i386_dr_update_inferior_debug_regs): Renamed to
7940 i386_update_inferior_debug_regs and made static.
7941 All uses updated.
7942
7943 2014-06-18 Gary Benson <gbenson@redhat.com>
7944
7945 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7946 (i386_dr_low_can_set_control): Likewise.
7947 (i386_get_debug_register_length): Likewise.
7948 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7949 (i386_dr_low_can_set_control): Likewise.
7950 (i386_get_debug_register_length): Likewise.
7951
7952 2014-06-17 Gary Benson <gbenson@redhat.com>
7953
7954 * i386-low.h (i386-dregs.h): New include.
7955 (DR_FIRSTADDR): Now in i386-dregs.h.
7956 (DR_LASTADDR): Likewise.
7957 (DR_NADDR): Likewise.
7958 (DR_STATUS): Likewise.
7959 (DR_CONTROL): Likewise.
7960 (i386_debug_reg_state): Likewise.
7961 (i386_dr_insert_watchpoint): Likewise.
7962 (i386_dr_remove_watchpoint): Likewise.
7963 (i386_dr_region_ok_for_watchpoint): Likewise.
7964 (i386_dr_stopped_data_address): Likewise.
7965 (i386_dr_stopped_by_watchpoint): Likewise.
7966 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7967
7968 2014-06-18 Gary Benson <gbenson@redhat.com>
7969
7970 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7971 i386_dr_insert_watchpoint.
7972 (i386_low_remove_watchpoint): Renamed to
7973 i386_dr_remove_watchpoint.
7974 (i386_low_region_ok_for_watchpoint): Renamed to
7975 i386_dr_region_ok_for_watchpoint.
7976 (i386_low_stopped_data_address): Renamed to
7977 i386_dr_stopped_data_address.
7978 (i386_low_stopped_by_watchpoint): Renamed to
7979 i386_dr_stopped_by_watchpoint.
7980 * i386-low.c (i386_show_dr): Renamed to
7981 i386_dr_show and made nonstatic. All uses updated.
7982 (i386_length_and_rw_bits): Renamed to
7983 i386_dr_length_and_rw_bits and made nonstatic.
7984 All uses updated.
7985 (i386_insert_aligned_watchpoint): Renamed to
7986 i386_dr_insert_aligned_watchpoint and made nonstatic.
7987 All uses updated.
7988 (i386_remove_aligned_watchpoint): Renamed to
7989 i386_dr_remove_aligned_watchpoint and made nonstatic.
7990 All uses updated.
7991 (i386_update_inferior_debug_regs): Renamed to
7992 i386_dr_update_inferior_debug_regs and made nonstatic.
7993 All uses updated.
7994 (i386_low_insert_watchpoint): Renamed to
7995 i386_dr_insert_watchpoint. All uses updated.
7996 (i386_low_remove_watchpoint): Renamed to
7997 i386_dr_remove_watchpoint. All uses updated.
7998 (i386_low_region_ok_for_watchpoint): Renamed to
7999 i386_dr_region_ok_for_watchpoint. All uses updated.
8000 (i386_low_stopped_data_address): Renamed to
8001 i386_dr_stopped_data_address. All uses updated.
8002 (i386_low_stopped_by_watchpoint): Renamed to
8003 i386_dr_stopped_by_watchpoint. All uses updated.
8004
8005 2014-06-18 Gary Benson <gbenson@redhat.com>
8006
8007 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8008 (i386_dr_low_can_set_control): Likewise.
8009 (i386_insert_aligned_watchpoint): New check.
8010
8011 2014-06-18 Gary Benson <gbenson@redhat.com>
8012
8013 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8014 Renamed to state.
8015
8016 2014-06-18 Gary Benson <gbenson@redhat.com>
8017
8018 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8019 instead of fatal and error.
8020 (i386_handle_nonaligned_watchpoint): Likewise.
8021
8022 2014-06-18 Gary Benson <gbenson@redhat.com>
8023
8024 * i386-low.c (i386_get_debug_register_length): New macro.
8025 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8026 (i386_show_dr): Use debug_printf instead of fprintf. Use
8027 phex to format values.
8028
8029 2014-06-18 Gary Benson <gbenson@redhat.com>
8030
8031 * i386-low.h: Comment changes.
8032 * i386-low.c: Likewise.
8033
8034 2014-06-18 Gary Benson <gbenson@redhat.com>
8035
8036 * i386-low.c: Whitespace changes.
8037
8038 2014-06-12 Tom Tromey <tromey@redhat.com>
8039
8040 * utils.c (freeargv): Remove.
8041
8042 2014-06-12 Tom Tromey <tromey@redhat.com>
8043
8044 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8045 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8046 (parse_debug_format_options): Likewise.
8047 (gdbserver_usage): Likewise.
8048 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8049 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8050 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8051 against libiberty.
8052 ($(LIBGNU)): Depend on libiberty.
8053 (all-lib): Recurse into all subdirs.
8054 (install-only): Invoke "install" target in subdirs.
8055 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8056 targets.
8057 * configure: Rebuild.
8058 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8059 for vasprintf, vsnprintf, or gettimeofday.
8060 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8061 srv_tgtobj.
8062
8063 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8064
8065 * development.sh: Delete.
8066 * Makefile.in (config.status): Adjust dependency on development.sh.
8067 * configure.ac: Adjust development.sh source call.
8068 * configure: Regenerate.
8069
8070 2014-06-02 Pedro Alves <palves@redhat.com>
8071
8072 * ax.c (gdb_free_agent_expr): New function.
8073 * ax.h (gdb_free_agent_expr): New declaration.
8074 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8075 list.
8076 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8077 static.
8078 (clear_breakpoint_conditions_and_commands): New function.
8079 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8080 (clear_breakpoint_conditions_and_commands): New declaration.
8081
8082 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8083
8084 * linux-aarch64-low.c (asm/ptrace.h): Include.
8085
8086 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8087
8088 Fix TLS access for -static -pthread.
8089 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8090 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8091 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8092
8093 2014-05-20 Pedro Alves <palves@redhat.com>
8094
8095 * linux-aarch64-low.c (aarch64_insert_point)
8096 (aarch64_remove_point): No longer check whether the type is
8097 supported here. Adjust to new interface.
8098 (the_low_target): Install aarch64_supports_z_point_type as
8099 supports_z_point_type method.
8100 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8101 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8102 instead of a Z packet char. Adjust.
8103 (arm_supports_z_point_type): New function.
8104 (arm_insert_point, arm_remove_point): Adjust to new interface.
8105 (the_low_target): Install arm_supports_z_point_type.
8106 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8107 (cris_insert_point, cris_remove_point): Adjust to new interface.
8108 Don't check whether the type is supported here.
8109 (the_low_target): Install cris_supports_z_point_type.
8110 * linux-low.c (linux_supports_z_point_type): New function.
8111 (linux_insert_point, linux_remove_point): Adjust to new interface.
8112 * linux-low.h (struct linux_target_ops) <insert_point,
8113 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8114 raw_breakpoint pointer parameter.
8115 <supports_z_point_type>: New method.
8116 * linux-mips-low.c (mips_supports_z_point_type): New function.
8117 (mips_insert_point, mips_remove_point): Adjust to new interface.
8118 Use mips_supports_z_point_type.
8119 (the_low_target): Install mips_supports_z_point_type.
8120 * linux-ppc-low.c (the_low_target): Install NULL as
8121 supports_z_point_type method.
8122 * linux-s390-low.c (the_low_target): Install NULL as
8123 supports_z_point_type method.
8124 * linux-sparc-low.c (the_low_target): Install NULL as
8125 supports_z_point_type method.
8126 * linux-x86-low.c (x86_supports_z_point_type): New function.
8127 (x86_insert_point): Adjust to new insert_point interface. Use
8128 insert_memory_breakpoint. Adjust to new
8129 i386_low_insert_watchpoint interface.
8130 (x86_remove_point): Adjust to remove_point interface. Use
8131 remove_memory_breakpoint. Adjust to new
8132 i386_low_remove_watchpoint interface.
8133 (the_low_target): Install x86_supports_z_point_type.
8134 * lynx-low.c (lynx_target_ops): Install NULL as
8135 supports_z_point_type callback.
8136 * nto-low.c (nto_supports_z_point_type): New.
8137 (nto_insert_point, nto_remove_point): Adjust to new interface.
8138 (nto_target_ops): Install nto_supports_z_point_type.
8139 * mem-break.c: Adjust intro comment.
8140 (struct raw_breakpoint) <raw_type, size>: New fields.
8141 <inserted>: Update comment.
8142 <shlib_disabled>: Delete field.
8143 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8144 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8145 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8146 (raw_bkpt_type_to_target_hw_bp_type): New function.
8147 (find_enabled_raw_code_breakpoint_at): New function.
8148 (find_raw_breakpoint_at): New type and size parameters. Use them.
8149 (insert_memory_breakpoint): New function, based off
8150 set_raw_breakpoint_at.
8151 (remove_memory_breakpoint): New function.
8152 (set_raw_breakpoint_at): Reimplement.
8153 (set_breakpoint): New, based on set_breakpoint_at.
8154 (set_breakpoint_at): Reimplement.
8155 (delete_raw_breakpoint): Go through the_target->remove_point
8156 instead of assuming memory breakpoints.
8157 (find_gdb_breakpoint_at): Delete.
8158 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8159 (find_gdb_breakpoint): New function.
8160 (set_gdb_breakpoint_at): Delete.
8161 (z_type_supported): New function.
8162 (set_gdb_breakpoint_1): New function, loosely based off
8163 set_gdb_breakpoint_at.
8164 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8165 (delete_gdb_breakpoint_at): Delete.
8166 (delete_gdb_breakpoint_1): New function, loosely based off
8167 delete_gdb_breakpoint_at.
8168 (delete_gdb_breakpoint): New function.
8169 (clear_gdb_breakpoint_conditions): Rename to ...
8170 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8171 breakpoint.
8172 (add_condition_to_breakpoint): Make static.
8173 (add_breakpoint_condition): Take a struct breakpoint pointer
8174 instead of an address. Adjust.
8175 (gdb_condition_true_at_breakpoint): Rename to ...
8176 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8177 z_type parameter.
8178 (gdb_condition_true_at_breakpoint): Reimplement.
8179 (add_breakpoint_commands): Take a struct breakpoint pointer
8180 instead of an address. Adjust.
8181 (gdb_no_commands_at_breakpoint): Rename to ...
8182 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8183 parameter. Return true if no breakpoint was found. Change debug
8184 output.
8185 (gdb_no_commands_at_breakpoint): Reimplement.
8186 (run_breakpoint_commands): Rename to ...
8187 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8188 and change return type to boolean.
8189 (run_breakpoint_commands): New function.
8190 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8191 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8192 breakpoint. Go through the_target->remove_point instead of
8193 assuming memory breakpoint.
8194 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8195 software and hardware breakpoints.
8196 (reinsert_raw_breakpoint): Go through the_target->insert_point
8197 instead of assuming memory breakpoint.
8198 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8199 software and hardware breakpoints.
8200 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8201 Check both software and hardware breakpoints.
8202 (validate_inserted_breakpoint): Assert the breakpoint is a
8203 software breakpoint. Set the inserted flag to -1 instead of
8204 setting shlib_disabled.
8205 (delete_disabled_breakpoints): Adjust.
8206 (validate_breakpoints): Only validate software breakpoints.
8207 Adjust to inserted flag change.
8208 (check_mem_read, check_mem_write): Skip breakpoint types other
8209 than software breakpoints. Adjust to inserted flag change.
8210 * mem-break.h (enum raw_bkpt_type): New enum.
8211 (raw_breakpoint, struct process_info): Forward declare.
8212 (Z_packet_to_target_hw_bp_type): Delete declaration.
8213 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8214 (set_gdb_breakpoint, delete_gdb_breakpoint)
8215 (clear_breakpoint_conditions): New declarations.
8216 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8217 (breakpoint_inserted_here): Update comment.
8218 (add_breakpoint_condition, add_breakpoint_commands): Replace
8219 address parameter with a breakpoint pointer parameter.
8220 (gdb_breakpoint_here): Update comment.
8221 (delete_gdb_breakpoint_at): Delete.
8222 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8223 * server.c (process_point_options): Take a struct breakpoint
8224 pointer instead of an address. Adjust.
8225 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8226 delete_gdb_breakpoint.
8227 * spu-low.c (spu_target_ops): Install NULL as
8228 supports_z_point_type method.
8229 * target.h: Include mem-break.h.
8230 (struct target_ops) <prepare_to_access_memory>: Update comment.
8231 <supports_z_point_type>: New field.
8232 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8233 instead of a char. Also take a raw breakpoint pointer.
8234 * win32-arm-low.c (the_low_target): Install NULL as
8235 supports_z_point_type.
8236 * win32-i386-low.c (i386_supports_z_point_type): New function.
8237 (i386_insert_point, i386_remove_point): Adjust to new interface.
8238 (the_low_target): Install i386_supports_z_point_type.
8239 * win32-low.c (win32_supports_z_point_type): New function.
8240 (win32_insert_point, win32_remove_point): Adjust to new interface.
8241 (win32_target_ops): Install win32_supports_z_point_type.
8242 * win32-low.h (struct win32_target_ops):
8243 <supports_z_point_type>: New method.
8244 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8245 instead of a char. Also take a raw breakpoint pointer.
8246
8247 2014-05-20 Pedro Alves <palves@redhat.com>
8248
8249 * mem-break.h: Include break-common.h.
8250 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8251 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8252 (Z_packet_to_target_hw_bp_type): New declaration.
8253 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8254 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8255 (Z_PACKET_ACCESS_WP): Delete macros.
8256 (Z_packet_to_hw_type): Delete function.
8257 * i386-low.h: Don't include break-common.h here.
8258 (Z_packet_to_hw_type): Delete declaration.
8259 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8260 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8261 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8262 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8263 * linux-aarch64-low.c: Don't include break-common.h here.
8264 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8265 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8266 (Z_packet_to_target_hw_bp_type): Delete function.
8267 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8268 function.
8269 (mips_insert_point, mips_remove_point): Use
8270 Z_packet_to_target_hw_bp_type.
8271
8272 2014-05-20 Pedro Alves <palves@redhat.com>
8273
8274 * linux-aarch64-low.c: Include break-common.h.
8275 (enum target_point_type): Delete.
8276 (Z_packet_to_point_type): Rename to ...
8277 (Z_packet_to_target_hw_bp_type): ... this, and return a
8278 target_hw_bp_type instead.
8279 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8280 instead of an enum target_point_type.
8281 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8282 breakpoint type.
8283 (aarch64_dr_state_insert_one_point)
8284 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8285 (aarch64_handle_aligned_watchpoint)
8286 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8287 Take an enum target_hw_bp_type instead of an enum
8288 target_point_type.
8289 (aarch64_supports_z_point_type): New function.
8290 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8291 use Z_packet_to_target_hw_bp_type.
8292
8293 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8294
8295 * configure.ac: Only use -Werror by default when DEVELOPMENT
8296 is true.
8297 * configure: Regenerate.
8298
8299 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8300
8301 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8302 * linux-x86-low.c (X86_64_USER_REGS): New.
8303 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8304
8305 2014-04-28 Yao Qi <yao@codesourcery.com>
8306
8307 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8308 name.
8309
8310 2014-04-25 Pedro Alves <palves@redhat.com>
8311
8312 PR server/16255
8313 * linux-low.c (linux_attach_fail_reason_string): New function.
8314 (linux_attach_lwp): Delete.
8315 (linux_attach_lwp_1): Rename to ...
8316 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8317 argument. Remove "initial" parameter. Return int instead of
8318 void. Don't error or warn here.
8319 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8320 failure to attach to the tgid. Call warning when failing to
8321 attach to an lwp.
8322 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8323 argument. Remove "initial" parameter. Return int instead of
8324 void. Don't error or warn here.
8325 (linux_attach_fail_reason_string): New declaration.
8326 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8327 interface change. Use linux_attach_fail_reason_string.
8328
8329 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8330 Walfred Tedeschi <walfred.tedeschi@intel.com>
8331
8332 * Makefile.in: Added rules to handle new files
8333 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8334 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8335 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8336 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8337 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8338 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8339 x32-avx512-linux.o.
8340 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8341 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8342 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8343 i386/x32-avx512.xml.
8344 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8345 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8346 i386/x32-avx512-linux.xml.
8347 * i387-fp.c (num_avx512_k_registers): New constant for number
8348 of K registers.
8349 (num_avx512_zmmh_low_registers): New constant for number of
8350 lower ZMM registers (0-15).
8351 (num_avx512_zmmh_high_registers): New constant for number of
8352 higher ZMM registers (16-31).
8353 (num_avx512_ymmh_registers): New contant for number of higher
8354 YMM registers (ymm16-31 added by avx521 on x86_64).
8355 (num_avx512_xmm_registers): New constant for number of higher
8356 XMM registers (xmm16-31 added by AVX512 on x86_64).
8357 (struct i387_xsave): Add space for AVX512 registers.
8358 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8359 Add code to handle AVX512 registers.
8360 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8361 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8362 prototypei from generated file.
8363 (tdesc_amd64_avx512_linux): Likewise.
8364 (init_registers_x32_avx512_linux): Likewise.
8365 (tdesc_x32_avx512_linux): Likewise.
8366 (init_registers_i386_avx512_linux): Likewise.
8367 (tdesc_i386_avx512_linux): Likewise.
8368 (x86_64_regmap): Add AVX512 registers.
8369 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8370 mask.
8371 (initialize_low_arch): Add code to initialize AVX512 registers.
8372
8373 2014-04-23 Pedro Alves <palves@redhat.com>
8374
8375 * mem-break.c (find_gdb_breakpoint_at): Make static.
8376 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8377
8378 2014-04-23 Pedro Alves <palves@redhat.com>
8379
8380 * i386-low.c: Don't include break-common.h here.
8381 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8382 prototype to take target_hw_bp_type as argument instead of a Z
8383 packet char.
8384 * i386-low.h: Include break-common.h here.
8385 (Z_packet_to_hw_type): Declare.
8386 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8387 prototypes.
8388 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8389 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8390 (x86_remove_point): Convert the packet number to a
8391 target_hw_bp_type before calling i386_low_remove_watchpoint.
8392 * win32-i386-low.c (i386_insert_point): Convert the packet number
8393 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8394 (i386_remove_point): Convert the packet number to a
8395 target_hw_bp_type before calling i386_low_remove_watchpoint.
8396
8397 2014-04-23 Pedro Alves <palves@redhat.com>
8398
8399 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8400
8401 2014-04-10 Pedro Alves <palves@redhat.com>
8402
8403 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8404 Check if the condition or command is NULL before checking if the
8405 breakpoint is known. On success, return true.
8406 * mem-break.h (add_breakpoint_condition): Document return.
8407 (add_breakpoint_commands): Add describing comment.
8408 * server.c (skip_to_semicolon): New function.
8409 (process_point_options): Use it.
8410
8411 2014-04-09 Pedro Alves <palves@redhat.com>
8412
8413 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8414 to lwpid_of.
8415
8416 2014-02-27 Pedro Alves <palves@redhat.com>
8417
8418 PR 12702
8419 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8420 macros.
8421 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8422 output.
8423 (last_thread_of_process_p): Take a PID argument instead of a
8424 thread pointer.
8425 (linux_wait_for_lwp): Delete.
8426 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8427 functions.
8428 (linux_low_filter_event): New function, party factored out from
8429 linux_wait_for_event.
8430 (linux_wait_for_event): Rename to ...
8431 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8432 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8433 sigsuspend. Check for zombie leaders.
8434 (linux_wait_for_event): Reimplement as wrapper around
8435 linux_wait_for_event_filtered.
8436 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8437 a normal or signal exit is seen, it's the whole process exiting.
8438 (wait_for_sigstop): No longer a for_each_inferior callback.
8439 Rewrite on top of linux_wait_for_event_filtered.
8440 (stop_all_lwps): Call wait_for_sigstop directly.
8441 * server.c (resume, handle_target_event): Handle
8442 TARGET_WAITKIND_NO_RESUMED.
8443
8444 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8445
8446 * win32-low.c (psapi_get_dll_name,
8447 * win32_CreateToolhelp32Snapshot): Delete.
8448 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8449 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8450 Delete.
8451 (handle_load_dll): Add function description.
8452 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8453
8454 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8455
8456 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8457 Add comment.
8458 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8459 base address when calling win32_add_one_solib.
8460 (handle_load_dll): Delete local variable load_addr.
8461 Remove 0x1000 offset applied to DLL base address when calling
8462 win32_add_one_solib.
8463 (handle_unload_dll): Add comment.
8464
8465 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8466
8467 * win32-low.c (win32_add_all_dlls): Renames
8468 win32_ensure_ntdll_loaded. Rewrite function documentation.
8469 Adjust implementation to always load all DLLs.
8470 Add 0x1000 offset to DLL base address when calling
8471 win32_add_one_solib.
8472 (child_initialization_done): New static global.
8473 (do_initial_child_stuff): Set child_initialization_done to
8474 zero during child initialization, and 1 after. Replace call
8475 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8476 Add comment.
8477 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8478 (handle_unload_dll): Add function documentation.
8479 (get_child_debug_event): Ignore load and unload DLL events
8480 during child initialization.
8481
8482 2014-02-20 Doug Evans <dje@google.com>
8483
8484 Remove global all_lwps.
8485 * inferiors.h (ptid_of): Move here from linux-low.h.
8486 (pid_of, lwpid_of): Ditto.
8487 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8488 parameter is a struct thread_info * now.
8489 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8490 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8491 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8492 directly.
8493 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8494 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8495 * linux-arm-low.c (update_registers_callback): Update, "entry"
8496 parameter is a struct thread_info * now.
8497 Fetch lwpid from current_inferior directly.
8498 (arm_insert_point): Pass &all_threads to find_inferior instead of
8499 &all_lwps.
8500 (arm_remove_point): Ditto.
8501 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8502 (arm_prepare_to_resume): Fetch pid from thread.
8503 (arm_read_description): Fetch lwpid from current_inferior directly.
8504 * linux-low.c (all_lwps): Delete.
8505 (delete_lwp): Delete call to remove_inferior.
8506 (handle_extended_wait): Fetch lwpid from thread.
8507 (add_lwp): Don't set lwp->entry.id. Remove call to
8508 add_inferior_to_list.
8509 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8510 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8511 (kill_one_lwp_callback): Ditto.
8512 (linux_kill): Don't dereference NULL pointer.
8513 Fetch ptid,lwpid from thread.
8514 (get_detach_signal): Fetch ptid from thread.
8515 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8516 Simplify call to regcache_invalidate_thread.
8517 (delete_lwp_callback): Update, "entry" parameter is a
8518 struct thread_info * now. Fetch pid from thread.
8519 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8520 (status_pending_p_callback): Update, "entry" parameter is a
8521 struct thread_info * now. Fetch ptid from thread.
8522 (find_lwp_pid): Update, "entry" parameter is a
8523 struct thread_info * now.
8524 (linux_wait_for_lwp): Fetch pid from thread.
8525 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8526 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8527 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8528 (dequeue_one_deferred_signal): Ditto.
8529 (cancel_breakpoint): Fetch ptid from current_inferior.
8530 (linux_wait_for_event): Pass &all_threads to find_inferior,
8531 not &all_lwps. Fetch ptid, lwpid from thread.
8532 (count_events_callback): Update, "entry" parameter is a
8533 struct thread_info * now.
8534 (select_singlestep_lwp_callback): Ditto.
8535 (select_event_lwp_callback): Ditto.
8536 (cancel_breakpoints_callback): Ditto.
8537 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8538 not &all_lwps.
8539 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8540 (unsuspend_one_lwp): Update, "entry" parameter is a
8541 struct thread_info * now.
8542 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8543 not &all_lwps.
8544 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8545 Fetch lwpid from thread, not lwp.
8546 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8547 Pass &all_threads to find_inferior, not &all_lwps.
8548 (send_sigstop): Fetch lwpid from thread, not lwp.
8549 (send_sigstop_callback): Update, "entry" parameter is a
8550 struct thread_info * now.
8551 (suspend_and_send_sigstop_callback): Ditto.
8552 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8553 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8554 struct thread_info * now.
8555 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8556 from thread, lwp.
8557 (lwp_running): Update, "entry" parameter is a
8558 struct thread_info * now.
8559 (stop_all_lwps): Fetch ptid from thread.
8560 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8561 (linux_resume_one_lwp): Fetch lwpid from thread.
8562 (linux_set_resume_request): Update, "entry" parameter is a
8563 struct thread_info * now. Fetch pid, lwpid from thread.
8564 (resume_status_pending_p): Update, "entry" parameter is a
8565 struct thread_info * now.
8566 (need_step_over_p): Ditto. Fetch lwpid from thread.
8567 (start_step_over): Fetch lwpid from thread.
8568 (linux_resume_one_thread): Update, "entry" parameter is a
8569 struct thread_info * now. Fetch lwpid from thread.
8570 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8571 (proceed_one_lwp): Update, "entry" parameter is a
8572 struct thread_info * now. Fetch lwpid from thread.
8573 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8574 struct thread_info * now.
8575 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8576 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8577 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8578 directly.
8579 (regsets_store_inferior_registers): Ditto.
8580 (fetch_register, store_register): Ditto.
8581 (linux_read_memory, linux_write_memory): Ditto.
8582 (linux_request_interrupt): Ditto.
8583 (linux_read_auxv): Ditto.
8584 (linux_xfer_siginfo): Ditto.
8585 (linux_qxfer_spu): Ditto.
8586 (linux_qxfer_libraries_svr4): Ditto.
8587 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8588 moved to inferiors.h.
8589 (get_lwp): Delete.
8590 (get_thread_lwp): Update.
8591 (struct lwp_info): Delete member "entry". Simplify comment for
8592 member "thread".
8593 (all_lwps): Delete.
8594 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8595 current_inferior directly.
8596 (update_watch_registers_callback): Update, "entry" parameter is a
8597 struct thread_info * now. Fetch pid from thread.
8598 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8599 (mips_insert_point): Fetch lwpid from current_inferior.
8600 Pass &all_threads to find_inferior, not &all_lwps.
8601 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8602 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8603 directly.
8604 (mips_stopped_data_address): Ditto.
8605 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8606 directly.
8607 * linux-tile-low.c (tile_arch_setup): Ditto.
8608 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8609 (update_debug_registers_callback): Update, "entry" parameter is a
8610 struct thread_info * now. Fetch pid from thread.
8611 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8612 Pass &all_threads to find_inferior, not &all_lwps.
8613 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8614 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8615 Pass &all_threads to find_inferior, not &all_lwps.
8616 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8617 (i386_dr_low_get_status): Ditto.
8618 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8619 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8620 (x86_linux_read_description): Ditto.
8621 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8622
8623 2014-02-20 Doug Evans <dje@google.com>
8624
8625 * inferiors.c (get_first_inferior): Fix buglet.
8626
8627 2014-02-19 Doug Evans <dje@google.com>
8628
8629 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8630 * inferiors.c (add_thread): Change result type to struct thread_info *.
8631 All callers updated.
8632 (add_lwp): Call add_thread here instead of in callers.
8633 All callers updated.
8634 * linux-low.h (get_lwp_thread): Rewrite.
8635 (struct lwp_info): New member "thread".
8636
8637 2014-02-19 Doug Evans <dje@google.com>
8638
8639 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8640 All callers updated.
8641
8642 2014-02-19 Doug Evans <dje@google.com>
8643
8644 * inferiors.c (add_thread): Fix whitespace.
8645
8646 2014-02-19 Doug Evans <dje@google.com>
8647
8648 * dll.c (clear_dlls): Replace accessing list implemention details
8649 with API function.
8650 * gdbthread.h (get_first_thread): Declare.
8651 * inferiors.c (for_each_inferior_with_data): New function.
8652 (get_first_thread): New function.
8653 (find_thread_ptid): Simplify.
8654 (get_first_inferior): New function.
8655 (clear_list): Delete.
8656 (one_inferior_p): New function.
8657 (clear_inferior_list): New function.
8658 (clear_inferiors): Update.
8659 * inferiors.h (for_each_inferior_with_data): Declare.
8660 (clear_inferior_list): Declare.
8661 (one_inferior_p): Declare.
8662 (get_first_inferior): Declare.
8663 * linux-low.c (linux_wait_for_event): Replace accessing list
8664 implemention details with API function.
8665 * server.c (target_running): Ditto.
8666 (accumulate_file_name_length): New function.
8667 (emit_dll_description): New function.
8668 (handle_qxfer_libraries): Replace accessing list implemention
8669 details with API function.
8670 (handle_qxfer_threads_worker): New function.
8671 (handle_qxfer_threads_proper): Replace accessing list implemention
8672 details with API function.
8673 (handle_query): Ditto.
8674 (visit_actioned_threads_callback_ftype): New typedef.
8675 (visit_actioned_threads_data): New struct.
8676 (visit_actioned_threads): Rewrite to be find_inferior callback.
8677 (resume): Call find_inferior.
8678 (handle_status): Replace accessing list implemention
8679 details with API function.
8680 (process_serial_event): Replace accessing list implemention details
8681 with API function.
8682 * target.c (set_desired_inferior): Replace accessing list implemention
8683 details with API function.
8684 * tracepoint.c (same_process_p): New function.
8685 (gdb_agent_about_to_close): Replace accessing list implemention
8686 details with API function.
8687 * win32-low.c (child_delete_thread): Replace accessing list
8688 implemention details with API function.
8689 (match_dll_by_basename): New function.
8690 (dll_is_loaded_by_basename): New function.
8691 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8692 details call to dll_is_loaded_by_basename.
8693
8694 2014-02-19 Doug Evans <dje@google.com>
8695
8696 * dll.h (struct dll_info): Add comment.
8697 * gdbthread.h (struct thread_info): Add comment.
8698 (current_ptid): Simplify.
8699 * inferiors.c (add_process): Update.
8700 (remove_process): Update.
8701 * inferiors.h (struct process_info): Rename member "head" to "entry".
8702 * linux-low.c (delete_lwp): Update.
8703 (add_lwp): Update.
8704 (last_thread_of_process_p): Update.
8705 (kill_one_lwp_callback, linux_kill): Update.
8706 (status_pending_p_callback): Update.
8707 (wait_for_sigstop): Update. Simplify read of ptid.
8708 (start_step_over): Update.
8709 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8710 (get_lwp_thread): Update.
8711 (struct lwp_info): Rename member "head" to "entry".
8712 * regcache.h (inferior_list_entry): Delete.
8713 * server.c (kill_inferior_callback): Update.
8714 (detach_or_kill_inferior_callback): Update.
8715 (print_started_pid): Update.
8716 (print_attached_pid): Update.
8717 (process_serial_event): Simplify read of ptid.
8718 * thread-db.c (thread_db_create_event): Update.
8719 (thread_db_get_tls_address): Update.
8720 * win32-low.c (current_inferior_ptid): Simplify.
8721
8722 2014-02-19 Tom Tromey <tromey@redhat.com>
8723
8724 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8725 argument.
8726 (target_supports_btrace): Update.
8727
8728 2014-02-14 Yao Qi <yao@codesourcery.com>
8729
8730 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8731 (rsp-low-ipa.o): New target.
8732
8733 2014-02-12 Tom Tromey <tromey@redhat.com>
8734
8735 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8736 convert_ascii_to_int.
8737 * regcache.c (registers_to_string): Likewise.
8738 * remote-utils.c (decode_M_packet): Likewise.
8739 * server.c (process_serial_event): Likewise.
8740
8741 2014-02-12 Tom Tromey <tromey@redhat.com>
8742
8743 * server.c (handle_query, handle_v_run): Use hex2bin, not
8744 unhexify.
8745 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8746
8747 2014-02-12 Tom Tromey <tromey@redhat.com>
8748
8749 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8750 convert_int_to_ascii.
8751 * regcache.c (registers_to_string, collect_register_as_string):
8752 Likewise.
8753 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8754 Likewise.
8755 * server.c (process_serial_event): Likewise.
8756 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8757 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8758
8759 2014-02-12 Tom Tromey <tromey@redhat.com>
8760
8761 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8762 bin2hex, not hexify.
8763 * tracepoint.c (cmd_qtstatus): Likewise.
8764
8765 2014-02-12 Tom Tromey <tromey@redhat.com>
8766
8767 * remote-utils.c (monitor_output): Pass explicit length to
8768 hexify.
8769
8770 2014-02-12 Tom Tromey <tromey@redhat.com>
8771
8772 * tracepoint.c: Include rsp-low.h.
8773 * server.c: Include rsp-low.h.
8774 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8775 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8776 declare.
8777 * remote-utils.c: Include rsp-low.h.
8778 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8779 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8780 (convert_int_to_ascii, convert_ascii_to_int): Move to
8781 common/rsp-low.c.
8782 * regcache.c: Include rsp-low.h.
8783 * ax.c: Include rsp-low.h.
8784 * Makefile.in (SFILES): Add common/rsp-low.c.
8785 (OBS): Add rsp-low.o.
8786 (rsp-low.o): New target.
8787
8788 2014-02-12 Tom Tromey <tromey@redhat.com>
8789
8790 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8791 Include print-utils.h.
8792 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8793 (plongest, thirty_two, phex_nz): Remove.
8794 * Makefile.in (SFILES): Add common/print-utils.c.
8795 (OBS): Add print-utils.o.
8796 (print-utils-ipa.o): New target.
8797 (print-utils.o): New target.
8798 (IPA_OBJS): Add print-utils-ipa.o.
8799
8800 2014-02-06 Tom Tromey <tromey@redhat.com>
8801
8802 * Makefile.in (SFILES): Fix indentation.
8803
8804 2014-02-05 Doug Evans <dje@google.com>
8805
8806 * linux-low.c (linux_wait_for_event): Improve comment.
8807 (linux_wait_1): Keep current_inferior in sync with event_child.
8808
8809 2014-01-22 Doug Evans <dje@google.com>
8810
8811 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8812
8813 2014-01-22 Doug Evans <dje@google.com>
8814
8815 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8816 * configure: Regenerate.
8817 * config.in: Regenerate.
8818 * Makefile.in (SFILES): Add debug.c.
8819 (OBS): Add debug.o.
8820 * debug.c: New file.
8821 * debug.h: New file.
8822 * linux-aarch64-low.c (*): Update all debugging printfs to use
8823 debug_printf instead of fprintf.
8824 * linux-arm-low.c (*): Ditto.
8825 * linux-cris-low.c (*): Ditto.
8826 * linux-crisv32-low.c (*): Ditto.
8827 * linux-m32r-low.c (*): Ditto.
8828 * linux-sparc-low.c (*): Ditto.
8829 * linux-x86.c (*): Ditto.
8830 * linux-low.c (*): Ditto.
8831 (linux_wait_1): Add calls to debug_enter, debug_exit.
8832 (linux_wait): Remove redundant debugging printf.
8833 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8834 (linux_resume, unstop_all_lwps): Ditto.
8835 * mem-break.c (*): Update all debugging printfs to use
8836 debug_printf instead of fprintf.
8837 * remote-utils.c (*): Ditto.
8838 * thread-db.c (*): Ditto.
8839 * server.c #include <ctype.h>, "gdb_vecs.h".
8840 (debug_threads): Moved to debug.c.
8841 (*): Update all debugging printfs to use debug_printf instead of
8842 fprintf.
8843 (start_inferior): Replace call to fflush with call to debug_flush.
8844 (monitor_show_help): Mention set debug-format.
8845 (parse_debug_format_options): New function.
8846 (handle_monitor_command): Handle "monitor set debug-format".
8847 (gdbserver_usage): Mention --debug-format.
8848 (main): Parse --debug-format.
8849 * server.h (debug_threads): Declaration moved to debug.h.
8850 #include "debug.h".
8851 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8852 trace_debug_1 that uses debug_printf.
8853 (tracepoint_look_up_symbols): Update all debugging printfs to use
8854 debug_printf instead of fprintf.
8855
8856 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8857
8858 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8859 sys/ptrace.h.
8860
8861 2014-01-17 Pedro Alves <palves@redhat.com>
8862
8863 PR build/16445
8864 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8865 defined after including gdb_proc_service.h.
8866
8867 2014-01-16 Doug Evans <dje@google.com>
8868
8869 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8870 (match_dll): Use it.
8871
8872 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8873
8874 * target.h (target_ops) <read_btrace>: Change parameters and
8875 return type to allow error reporting.
8876 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8877 trace reading errors on.
8878 * linux-low.c (linux_low_read_btrace): Pass trace reading
8879 errors on.
8880 (linux_low_disable_btrace): New.
8881
8882 2014-01-15 Doug Evans <dje@google.com>
8883
8884 * inferiors.c (thread_id_to_gdb_id): Delete.
8885 * inferiors.h (thread_id_to_gdb_id): Delete.
8886
8887 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8888
8889 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8890 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8891 versions.
8892
8893 2014-01-08 Pedro Alves <palves@redhat.com>
8894
8895 * server.c (handle_status): Don't discard previous queued stop
8896 replies or thread's pending status here.
8897 (main) <disconnection>: Do it here instead.
8898
8899 2014-01-08 Pedro Alves <palves@redhat.com>
8900
8901 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8902 * server.c (visit_actioned_threads, handle_pending_status): New
8903 function.
8904 (handle_v_cont): Factor out parts to ...
8905 (resume): ... this new function. If in all-stop, and a thread
8906 being resumed has a pending status, report it without actually
8907 resuming.
8908 (myresume): Adjust to use the new 'resume' function.
8909 (clear_pending_status_callback, set_pending_status_callback)
8910 (find_status_pending_thread_callback): New functions.
8911 (handle_status): Handle the case of multiple threads having
8912 interesting statuses to report. Report threads' real last signal
8913 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8914 with an interesting thread to report the status for, instead of
8915 always reporting the status of the first thread.
8916
8917 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8918
8919 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8920 * gdbreplay.c (gdbreplay_version): Likewise.
8921
8922 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8923
8924 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8925 iov.iov_len with the real length in use.
8926
8927 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8928
8929 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8930 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8931 for all targets that use win32-low.c.
8932 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8933 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8934
8935 2013-12-13 Pedro Alves <palves@redhat.com>
8936
8937 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8938 if equal to TARGET_WAITKIND_LOADED.
8939 * win32-low.c (cached_status): New static global.
8940 (win32_wait): Add declaration.
8941 (do_initial_child_stuff): Flush all initial pending debug events
8942 up to the initial breakpoint.
8943 (win32_wait): If CACHED_STATUS was set, return that instead
8944 of doing a real wait. Remove the code resuming the execution
8945 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8946 during the initial phase. Also remove the code changing
8947 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8948 TARGET_WAITKIND_STOPPED.
8949
8950 2013-12-11 Yao Qi <yao@codesourcery.com>
8951
8952 * notif.c (handle_notif_ack): Return 0 if no notification
8953 matches.
8954
8955 2013-11-20 Doug Evans <dje@google.com>
8956
8957 * linux-low.c (linux_set_resume_request): Fix comment.
8958
8959 2013-11-20 Doug Evans <dje@google.com>
8960
8961 * linux-low.c (resume_status_pending_p): Tweak comment.
8962
8963 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8964
8965 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8966 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8967 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8968 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8969 (srv_amd64_regobj): Add amd64-mpx.o.
8970 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8971 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8972 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8973 * i387-fp.c (num_pl_bnd_register) Added constant.
8974 (num_pl_bnd_cfg_registers) Added constant.
8975 (struct i387_xsave) Added reserved area and MPX fields.
8976 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8977 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8978 function.
8979 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8980 (init_registers_amd64_mpx_linux): Declare new function.
8981 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8982 (x86_64_regmap): Add MPX registers.
8983 (x86_linux_read_description): Add MPX case.
8984 (initialize_low_arch): Initialize MPX targets.
8985
8986 2013-11-18 Tom Tromey <tromey@redhat.com>
8987
8988 * configure: Rebuild.
8989 * configure.ac: Don't check for stdlib.h.
8990 * gdbreplay.c: Unconditionally include stdlib.h.
8991
8992 2013-11-18 Tom Tromey <tromey@redhat.com>
8993
8994 * config.in: Rebuild.
8995 * configure: Rebuild.
8996 * configure.ac: Don't use AC_HEADER_DIRENT.
8997
8998 2013-11-18 Tom Tromey <tromey@redhat.com>
8999
9000 * server.h: Don't check HAVE_STRING_H.
9001 * gdbreplay.c: Don't check HAVE_STRING_H.
9002 * configure: Rebuild.
9003
9004 2013-11-18 Tom Tromey <tromey@redhat.com>
9005
9006 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9007 LIBGNU.
9008
9009 2013-11-08 Tom Tromey <tromey@redhat.com>
9010
9011 * configure, config.in: Rebuild.
9012 * configure.ac: Remove unused configury.
9013
9014 2013-11-08 Tom Tromey <tromey@redhat.com>
9015
9016 * acinclude.m4: Include common.m4, codeset.m4.
9017 * configure, config.in: Rebuild.
9018 * configure.ac: Use GDB_AC_COMMON.
9019
9020 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9021
9022 * linux-s390-low.c (HWCAP_S390_TE): New define.
9023 (s390_arch_setup): Consider the TE field in the HWCAP for
9024 determining 'have_regset_tdb'.
9025
9026 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9027
9028 PR gdb/16014
9029 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9030 call to sizeof.
9031
9032 2013-10-02 Pedro Alves <palves@redhat.com>
9033
9034 * server.c (process_serial_event): Don't output "GDBserver
9035 exiting" if GDB is connected through stdio.
9036 * target.c (mywait): Likewise, be silent if GDB is connected
9037 through stdio.
9038
9039 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9040
9041 * lynx-low.c (lynx_add_threads_after_attach): New function.
9042 (lynx_attach): Remove call to add_thread. Add call to
9043 lynx_add_threads_after_attach instead.
9044
9045 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9046
9047 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9048 * config.in, configure: Regenerated.
9049
9050 2013-09-18 Yao Qi <yao@codesourcery.com>
9051
9052 PR server/15959
9053 * server.c (start_inferior): Clear 'resume_info'.
9054
9055 2013-09-16 Jiong Wang <jiwang@tilera.com>
9056
9057 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9058 for each register.
9059
9060 2013-09-16 Jiong Wang <jiwang@tilera.com>
9061
9062 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9063 linux-tile-low.o to srv_tgtobj.
9064
9065 2013-09-16 Will Newton <will.newton@linaro.org>
9066
9067 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9068 out regs.
9069
9070 2013-09-06 Pedro Alves <palves@redhat.com>
9071
9072 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9073 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9074 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9075 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9076 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9077 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9078
9079 2013-09-06 Pedro Alves <palves@redhat.com>
9080
9081 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9082 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9083
9084 2013-09-06 Pedro Alves <palves@redhat.com>
9085
9086 * linux-amd64-ipa.c: Include tracepoint.h.
9087 * linux-i386-ipa.c: Include tracepoint.h.
9088
9089 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9090
9091 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9092 (ps_get_thread_area): New function.
9093
9094 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9095
9096 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9097 (initialize_low_arch): Call init_registers_crisv32 rather than
9098 init_register_crisv32.
9099
9100 2013-09-05 Pedro Alves <palves@redhat.com>
9101
9102 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9103 to ...
9104 * hostio.h: ... this new file.
9105 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9106 win32-low.c: Include hostio.h.
9107
9108 2013-09-05 Pedro Alves <palves@redhat.com>
9109
9110 * server.h (gdb_client_data, handler_func, callback_handler_func)
9111 (delete_file_handler, add_file_handler, append_callback_event)
9112 (delete_callback_event, start_event_loop, initialize_event_loop):
9113 Move to event-loop.h and include it.
9114 * event-loop.h: New file.
9115
9116 2013-09-05 Pedro Alves <palves@redhat.com>
9117
9118 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9119 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9120 (loaded_dll, unloaded_dll): Move to ...
9121 * dll.h: ... this new file.
9122 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9123
9124 2013-09-05 Pedro Alves <palves@redhat.com>
9125
9126 * server.h (current_process, get_thread_process, all_processes)
9127 (add_inferior_to_list, for_each_inferior, current_inferior)
9128 (remove_inferior, add_process, remove_process, find_process_pid)
9129 (have_started_inferiors_p, have_attached_inferiors_p)
9130 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9131 (clear_inferiors, find_inferior, find_inferior_id)
9132 (inferior_target_data, set_inferior_target_data)
9133 (inferior_regcache_data, set_inferior_regcache_data): Move to
9134 inferiors.h, and include it.
9135 * inferiors.h: New file.
9136
9137 2013-09-05 Pedro Alves <palves@redhat.com>
9138
9139 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9140 Move ...
9141 * ax.h: ... here.
9142
9143 2013-09-05 Pedro Alves <palves@redhat.com>
9144
9145 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9146 tracepoint.h.
9147 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9148 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9149 (handle_tracepoint_general_set, handle_tracepoint_query)
9150 (tracepoint_finished_step, tracepoint_was_hit)
9151 (release_while_stepping_state_list, current_traceframe)
9152 (in_readonly_region, traceframe_read_mem)
9153 (fetch_traceframe_registers, traceframe_read_sdata)
9154 (traceframe_read_info, struct fast_tpoint_collect_status)
9155 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9156 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9157 (supply_fast_tracepoint_registers)
9158 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9159 (ipa_tdesc, claim_trampoline_space)
9160 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9161 (agent_mem_read, agent_get_trace_state_variable_value)
9162 (agent_set_trace_state_variable_value, agent_tsv_read)
9163 (agent_mem_read_string, get_raw_reg_func_addr)
9164 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9165 * tracepoint.h: ... this new file.
9166
9167 2013-09-05 Pedro Alves <palves@redhat.com>
9168
9169 * server.h (perror_with_name, error, fatal, warning, paddress)
9170 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9171 include it.
9172 * utils.h: New file.
9173
9174 2013-09-05 Pedro Alves <palves@redhat.com>
9175
9176 * server.h (remote_debug, noack_mode, transport_is_reliable)
9177 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9178 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9179 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9180 (write_enn, initialize_async_io, enable_async_io)
9181 (disable_async_io, check_remote_input_interrupt_request)
9182 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9183 (dead_thread_notify, prepare_resume_reply)
9184 (decode_address_to_semicolon, decode_address, decode_m_packet)
9185 (decode_M_packet, decode_X_packet, decode_xfer_write)
9186 (decode_search_memory_packet, unhexify, hexify)
9187 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9188 (look_up_one_symbol, relocate_instruction)
9189 (monitor_output): Move to remote-utils.h, and include it.
9190 * remote-utils.h: New file.
9191
9192 2013-09-05 Pedro Alves <palves@redhat.com>
9193
9194 * server.h (_): Delete.
9195
9196 2013-09-02 Pedro Alves <palves@redhat.com>
9197
9198 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9199 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9200 allocated.
9201 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9202
9203 2013-09-02 Pierre Muller <muller@sourceware.org>
9204
9205 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9206 or WriteProcessMemory complete successfully and handle
9207 ERROR_PARTIAL_COPY error.
9208
9209 2013-09-02 Pedro Alves <palves@redhat.com>
9210
9211 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9212 error instead of EIO.
9213
9214 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9215
9216 PR server/15604
9217 * linux-low.c: Include filestuff.h.
9218 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9219 * lynx-low.c: Include filestuff.h.
9220 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9221 * server.c: Include filestuff.h.
9222 (main): Call notice_open_fds.
9223 * spu-low.c: Include filestuff.h.
9224 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9225
9226 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9227
9228 * Makefile.in: Explain why ../target and ../nat are not
9229 listed as include file search paths.
9230 (linux-waitpid.o): New object file rule.
9231 * configure.srv (srv_native_linux_obj): New variable.
9232 Replace all occurrences of linux native object files with
9233 $srv_native_linux_obj.
9234 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9235 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9236 (linux_enable_event_reporting): Remove declaration.
9237 (my_waitpid): Moved to common/linux-waitpid.c.
9238 (linux_wait_for_event): Pass ptid when calling
9239 linux_enable_event_reporting.
9240 (linux_supports_tracefork_flag): Remove.
9241 (linux_enable_event_reporting): Likewise.
9242 (linux_tracefork_grandchild): Remove.
9243 (STACK_SIZE): Moved to common/linux-ptrace.c.
9244 (linux_tracefork_child): Remove.
9245 (linux_test_for_tracefork): Remove.
9246 (linux_look_up_symbols): Call linux_supports_traceclone.
9247 (initialize_low): Remove call to linux_test_for_tracefork.
9248 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9249 common/linux-ptrace.h.
9250 (PTRACE_TYPE_ARG4): Likewise.
9251 Include linux-ptrace.h.
9252
9253 2013-08-21 Pedro Alves <palves@redhat.com>
9254
9255 * config.in: Renegerate.
9256
9257 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9258
9259 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9260 (SFILES): Remove $(srcdir)/common/target-common.c and
9261 add $(srcdir)/target/waitstatus.c.
9262 (OBS): Remove target-common.o and add waitstatus.o.
9263 (server_h): Remove $(srcdir)/../common/target-common.h and
9264 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9265 and $(srcdir)/../target/waitstatus.h.
9266 (target-common.o): Remove.
9267 (waitstatus.o): New target object file.
9268 * target.h: Do not include target-common.h and
9269 include target/resume.h, target/wait.h and
9270 target/waitstatus.h.
9271
9272 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9273
9274 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9275 to PTRACE_TYPE_ARG3.
9276 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9277 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9278 PTRACE_TYPE_ARG4.
9279 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9280 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9281
9282 2013-07-27 Jie Zhang <jie@codesourcery.com>
9283 Daniel Jacobowitz <dan@codesourcery.com>
9284 Yao Qi <yao@codesourcery.com>
9285
9286 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9287 (mips-linux-watch.o): New rule.
9288 (mips_linux_watch_h): New variable.
9289 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9290 srv_tgtobj.
9291 * linux-mips-low.c: Include mips-linux-watch.h.
9292 (struct arch_process_info, struct arch_lwp_info): New.
9293 (update_watch_registers_callback): New function.
9294 (mips_linux_new_process, mips_linux_new_thread) New functions.
9295 (mips_linux_prepare_to_resume, mips_insert_point): New
9296 functions.
9297 (mips_remove_point, mips_stopped_by_watchpoint): New
9298 functions.
9299 (rsp_bp_type_to_target_hw_bp_type): New function.
9300 (mips_stopped_data_address): New function.
9301 (the_low_target): Add watchpoint support functions.
9302
9303 2013-07-27 Yao Qi <yao@codesourcery.com>
9304
9305 * i386-low.c: Include break-common.h.
9306 (enum target_hw_bp_type): Remove.
9307
9308 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9309
9310 * Makefile.in (SFILES): /common/target-common.c.
9311 (OBS): Add target-common.o.
9312 (server_h): Add $(srcdir)/../common/target-common.h.
9313 (target-common.o): New target.
9314 * server.c (queue_stop_reply_callback): Free
9315 status string after use.
9316 * target.c (target_waitstatus_to_string): Remove.
9317 * target.h: Include target-common.h.
9318 (resume_kind): Likewise.
9319 (target_waitkind): Likewise.
9320 (target_waitstatus): Likewise.
9321 (TARGET_WNOHANG): Likewise.
9322
9323 2013-07-04 Yao Qi <yao@codesourcery.com>
9324
9325 * Makefile.in (host_alias): Use @host_noncanonical@.
9326 (target_alias): Use @target_noncanonical@.
9327 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9328 ACX_NONCANONICAL_HOST.
9329 * configure: Regenerated.
9330
9331 Revert:
9332 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9333
9334 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9335 * configure: Rebuild.
9336 * Makefile.in (version_host, version_target): Get from configure.
9337 (version.c): Use $(version_host) and $(version_target).
9338
9339 2013-07-03 Pedro Alves <palves@redhat.com>
9340
9341 * Makefile.in (config.status): Depend on development.sh.
9342 * acinclude.m4: Include libmcheck.m4.
9343 * configure: Regenerate.
9344
9345 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9346
9347 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9348 attribute inside the parentheses.
9349 (winapi_DebugSetProcessKillOnExit): Ditto.
9350 (winapi_DebugBreakProcess): Ditto.
9351 (winapi_GenerateConsoleCtrlEvent): Ditto.
9352
9353 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9354
9355 * notif.h (notif_event): Add a dummy member to avoid compiler
9356 errors.
9357
9358 2013-07-01 Pedro Alves <palves@redhat.com>
9359
9360 * hostio.c (HOSTIO_PATH_MAX): Define.
9361 (require_filename, handle_open, handle_unlink, handle_readlink):
9362 Use it.
9363
9364 2013-07-01 Pedro Alves <palves@redhat.com>
9365
9366 * server.h: Include "pathmax.h".
9367 * linux-low.c: Don't include sys/param.h.
9368 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9369 MAXPATHLEN.
9370 * win32-low.c: Don't include sys/param.h.
9371 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9372
9373 2013-07-01 Pedro Alves <palves@redhat.com>
9374
9375 * event-loop.c: Don't check HAVE_UNISTD_H before including
9376 <unistd.h>.
9377 * gdbreplay.c: Likewise.
9378 * remote-utils.c: Likewise.
9379 * server.c: Likewise.
9380 * configure.ac: Don't check for unistd.h.
9381 * configure: Regenerate.
9382
9383 2013-06-28 Tom Tromey <tromey@redhat.com>
9384
9385 * Makefile.in (version.c): Use version.in, not
9386 common/version.in.
9387
9388 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9389
9390 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9391 * configure: Rebuild.
9392 * Makefile.in (version_host, version_target): Get from configure.
9393 (version.c): Use $(version_host) and $(version_target).
9394
9395 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9396
9397 Fix trace-status to output user name without trailing colon.
9398 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9399
9400 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9401
9402 Fix trace-status to output proper start-time and stop-time.
9403 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9404 output start time and stop time in hex as gdb expects.
9405
9406 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9407
9408 * tracepoint.c (build_traceframe_info_xml): Output trace state
9409 variables present in the trace buffer.
9410
9411 2013-06-24 Tom Tromey <tromey@redhat.com>
9412
9413 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9414 create-version.sh.
9415 (version.o): Remove.
9416 * gdbreplay.c: Include version.h.
9417 (version, host_name): Don't declare.
9418 * server.h: Include version.h.
9419 (version, host_name): Don't declare.
9420
9421 2013-06-12 Pedro Alves <palves@redhat.com>
9422
9423 * linux-x86-low.c (linux_is_elf64): Delete global.
9424 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9425 with local linux_pid_exe_is_elf_64_file use.
9426
9427 2013-06-11 Pedro Alves <palves@redhat.com>
9428
9429 * linux-low.c (regset_disabled, disable_regset): New functions.
9430 (regsets_fetch_inferior_registers)
9431 (regsets_store_inferior_registers): Use them.
9432 (initialize_regsets_info); Don't allocate the disabled_regsets
9433 array here.
9434 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9435 comment.
9436
9437 2013-06-11 Pedro Alves <palves@redhat.com>
9438
9439 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9440 xmalloc.
9441
9442 2013-06-11 Pedro Alves <palves@redhat.com>
9443
9444 * linux-x86-low.c (initialize_low_arch): Call
9445 init_registers_x32_avx_linux.
9446
9447 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9448
9449 Fix compatibility with Android Bionic.
9450 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9451 it is not empty.
9452
9453 2013-06-07 Pedro Alves <palves@redhat.com>
9454
9455 PR server/14823
9456 * Makefile.in (OBS): Add tdesc.o.
9457 (IPA_OBJS): Add tdesc-ipa.o.
9458 (tdesc-ipa.o): New rule.
9459 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9460 interface.
9461 * linux-low.c (new_inferior): Delete.
9462 (disabled_regsets, num_regsets): Delete.
9463 (linux_add_process): Adjust to set the new per-process
9464 new_inferior flag.
9465 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9466 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9467 was a stop. When calling arch_setup, switch the current inferior
9468 to the thread that got an event.
9469 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9470 (regsets_fetch_inferior_registers)
9471 (regsets_store_inferior_registers): New regsets_info parameter.
9472 Adjust to use it.
9473 (linux_register_in_regsets): New regs_info parameter. Adjust to
9474 use it.
9475 (register_addr, fetch_register, store_register): New usrregs_info
9476 parameter. Adjust to use it.
9477 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9478 parameter regs_info. Adjust to use it.
9479 (linux_fetch_registers): Get the current inferior's regs_info, and
9480 adjust to use it.
9481 (linux_store_registers): Ditto.
9482 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9483 (initialize_low): Don't initialize the target_regsets here. Call
9484 initialize_low_arch.
9485 * linux-low.h (target_regsets): Delete declaration.
9486 (struct regsets_info): New.
9487 (struct usrregs_info): New.
9488 (struct regs_info): New.
9489 (struct process_info_private) <new_inferior>: New field.
9490 (struct linux_target_ops): Delete the num_regs, regmap, and
9491 regset_bitmap fields. New field regs_info.
9492 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9493 * i387-fp.c (num_xmm_registers): Delete.
9494 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9495 calls to new interface.
9496 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9497 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9498 Infer the number of xmm registers from the regcache's target
9499 description.
9500 * i387-fp.h (num_xmm_registers): Delete.
9501 * inferiors.c (add_thread): Don't install the thread's regcache
9502 here.
9503 * proc-service.c (gregset_info): Fetch the current inferior's
9504 regs_info. Adjust to use it.
9505 * regcache.c: Include tdesc.h.
9506 (register_bytes, reg_defs, num_registers)
9507 (gdbserver_expedite_regs): Delete.
9508 (get_thread_regcache): If the thread doesn't have a regcache yet,
9509 create one, instead of aborting gdbserver.
9510 (regcache_invalidate_one): Rename to ...
9511 (regcache_invalidate_thread): ... this.
9512 (regcache_invalidate_one): New.
9513 (regcache_invalidate): Only invalidate registers of the current
9514 process.
9515 (init_register_cache): Add target_desc parameter, and use it.
9516 (new_register_cache): Ditto. Assert the target description has a
9517 non zero registers_size.
9518 (regcache_cpy): Add assertions. Adjust.
9519 (realloc_register_cache, set_register_cache): Delete.
9520 (registers_to_string, registers_from_string): Adjust.
9521 (find_register_by_name, find_regno, find_register_by_number)
9522 (register_cache_size): Add target_desc parameter, and use it.
9523 (free_register_cache_thread, free_register_cache_thread_one)
9524 (regcache_release, register_cache_size): New.
9525 (register_size): Add target_desc parameter, and use it.
9526 (register_data, supply_register, supply_register_zeroed)
9527 (supply_regblock, supply_register_by_name, collect_register)
9528 (collect_register_as_string, collect_register_by_name): Adjust.
9529 * regcache.h (struct target_desc): Forward declare.
9530 (struct regcache) <tdesc>: New field.
9531 (init_register_cache, new_register_cache): Add target_desc
9532 parameter.
9533 (regcache_invalidate_thread): Declare.
9534 (regcache_invalidate_one): Delete declaration.
9535 (regcache_release): Declare.
9536 (find_register_by_number, register_cache_size, register_size)
9537 (find_regno): Add target_desc parameter.
9538 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9539 declarations.
9540 * remote-utils.c: Include tdesc.h.
9541 (outreg, prepare_resume_reply): Adjust.
9542 * server.c: Include tdesc.h.
9543 (gdbserver_xmltarget): Delete declaration.
9544 (get_features_xml, process_serial_event): Adjust.
9545 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9546 declare.
9547 (struct process_info) <tdesc>: New field.
9548 (ipa_tdesc): Declare.
9549 * tdesc.c: New file.
9550 * tdesc.h: New file.
9551 * tracepoint.c: Include tdesc.h.
9552 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9553 (get_context_regcache): Adjust to pass ipa_tdesc down.
9554 (do_action_at_tracepoint): Adjust to get the register cache size
9555 from the context regcache's description.
9556 (traceframe_walk_blocks): Adjust to get the register cache size
9557 from the current trace frame's description.
9558 (traceframe_get_pc): Adjust to get current trace frame's
9559 description and pass it down.
9560 (gdb_collect): Adjust to get the register cache size from the
9561 IPA's description.
9562 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9563 (gdbserver_xmltarget): Delete.
9564 (initialize_low_tracepoint): Set the ipa's target description.
9565 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9566 (initialize_low_tracepoint): Set the ipa's target description.
9567 * linux-x86-low.c: Include tdesc.h.
9568 [__x86_64__] (is_64bit_tdesc): New.
9569 (ps_get_thread_area, x86_get_thread_area): Use it.
9570 (i386_cannot_store_register): Rename to ...
9571 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9572 (i386_cannot_fetch_register): Rename to ...
9573 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9574 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9575 to new interface.
9576 (target_regsets): Rename to ...
9577 (x86_regsets): ... this.
9578 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9579 interface.
9580 (x86_siginfo_fixup): Use is_64bit_tdesc.
9581 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9582 (tdesc_x32_avx_linux, tdesc_x32_linux)
9583 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9584 Declare.
9585 (x86_linux_update_xmltarget): Delete.
9586 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9587 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9588 (AMD64_LINUX_USER64_CS): New.
9589 (x86_linux_read_description): New, based on
9590 x86_linux_update_xmltarget.
9591 (same_process_callback): New.
9592 (x86_arch_setup_process_callback): New.
9593 (x86_linux_update_xmltarget): New.
9594 (x86_regsets_info): New.
9595 (amd64_linux_regs_info): New.
9596 (i386_linux_usrregs_info): New.
9597 (i386_linux_regs_info): New.
9598 (x86_linux_regs_info): New.
9599 (x86_arch_setup): Reimplement.
9600 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9601 (x86_emit_ops): Ditto.
9602 (the_low_target): Adjust. Install x86_linux_regs_info,
9603 x86_cannot_fetch_register, and x86_cannot_store_register.
9604 (initialize_low_arch): New.
9605 * linux-ia64-low.c (tdesc_ia64): Declare.
9606 (ia64_fetch_register): Adjust.
9607 (ia64_usrregs_info, regs_info): New globals.
9608 (ia64_regs_info): New function.
9609 (the_low_target): Adjust.
9610 (initialize_low_arch): New function.
9611 * linux-sparc-low.c (tdesc_sparc64): Declare.
9612 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9613 Adjust.
9614 (sparc_arch_setup): New function.
9615 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9616 (the_low_target): Adjust.
9617 (initialize_low_arch): New function.
9618 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9619 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9620 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9621 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9622 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9623 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9624 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9625 (tdesc_powerpc_isa205_vsx64l): Declare.
9626 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9627 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9628 (ppc_set_pc, ppc_get_hwcap): Adjust.
9629 (ppc_usrregs_info): Forward declare.
9630 (!__powerpc64__) ppc_regmap_adjusted: New global.
9631 (ppc_arch_setup): Adjust to the current process'es target
9632 description.
9633 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9634 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9635 (ppc_store_evrregset): Adjust.
9636 (target_regsets): Rename to ...
9637 (ppc_regsets): ... this, and make static.
9638 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9639 (ppc_regs_info): New function.
9640 (the_low_target): Adjust.
9641 (initialize_low_arch): New function.
9642 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9643 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9644 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9645 (tdesc_s390x_linux64v2): Declare.
9646 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9647 (s390_fill_gregset, s390_store_last_break): Adjust.
9648 (target_regsets): Rename to ...
9649 (s390_regsets): ... this, and make static.
9650 (s390_get_pc, s390_set_pc): Adjust.
9651 (s390_get_hwcap): New target_desc parameter, and use it.
9652 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9653 (s390_arch_setup): Adjust to set the current process'es target
9654 description. Don't adjust the regmap.
9655 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9656 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9657 (regs_info_3264): New globals.
9658 (s390_regs_info): New function.
9659 (the_low_target): Adjust.
9660 (initialize_low_arch): New function.
9661 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9662 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9663 [__mips64] (init_registers_mips_linux)
9664 (init_registers_mips_dsp_linux): Delete defines.
9665 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9666 (have_dsp): New global.
9667 (mips_read_description): New, based on mips_arch_setup.
9668 (mips_arch_setup): Reimplement.
9669 (get_usrregs_info): New function.
9670 (mips_cannot_fetch_register, mips_cannot_store_register)
9671 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9672 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9673 (target_regsets): Rename to ...
9674 (mips_regsets): ... this, and make static.
9675 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9676 (dsp_regs_info, regs_info): New globals.
9677 (mips_regs_info): New function.
9678 (the_low_target): Adjust.
9679 (initialize_low_arch): New function.
9680 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9681 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9682 Declare.
9683 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9684 (arm_read_description): New, with bits factored from
9685 arm_arch_setup.
9686 (arm_arch_setup): Reimplement.
9687 (target_regsets): Rename to ...
9688 (arm_regsets): ... this, and make static.
9689 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9690 (arm_regs_info): New function.
9691 (the_low_target): Adjust.
9692 (initialize_low_arch): New function.
9693 * linux-m68k-low.c (tdesc_m68k): Declare.
9694 (target_regsets): Rename to ...
9695 (m68k_regsets): ... this, and make static.
9696 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9697 (m68k_regs_info): New function.
9698 (m68k_arch_setup): New function.
9699 (the_low_target): Adjust.
9700 (initialize_low_arch): New function.
9701 * linux-sh-low.c (tdesc_sharch): Declare.
9702 (target_regsets): Rename to ...
9703 (sh_regsets): ... this, and make static.
9704 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9705 (sh_regs_info, sh_arch_setup): New functions.
9706 (the_low_target): Adjust.
9707 (initialize_low_arch): New function.
9708 * linux-bfin-low.c (tdesc_bfin): Declare.
9709 (bfin_arch_setup): New function.
9710 (bfin_usrregs_info, regs_info): New globals.
9711 (bfin_regs_info): New function.
9712 (the_low_target): Adjust.
9713 (initialize_low_arch): New function.
9714 * linux-cris-low.c (tdesc_cris): Declare.
9715 (cris_arch_setup): New function.
9716 (cris_usrregs_info, regs_info): New globals.
9717 (cris_regs_info): New function.
9718 (the_low_target): Adjust.
9719 (initialize_low_arch): New function.
9720 * linux-cris-low.c (tdesc_crisv32): Declare.
9721 (cris_arch_setup): New function.
9722 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9723 (cris_regs_info): New function.
9724 (the_low_target): Adjust.
9725 (initialize_low_arch): New function.
9726 * linux-m32r-low.c (tdesc_m32r): Declare.
9727 (m32r_arch_setup): New function.
9728 (m32r_usrregs_info, regs_info): New globals.
9729 (m32r_regs_info): Adjust.
9730 (initialize_low_arch): New function.
9731 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9732 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9733 (tic6x_usrregs_info): Forward declare.
9734 (tic6x_read_description): New function, based on ...
9735 (tic6x_arch_setup): ... this. Reimplement.
9736 (target_regsets): Rename to ...
9737 (tic6x_regsets): ... this, and make static.
9738 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9739 (tic6x_regs_info): New function.
9740 (the_low_target): Adjust.
9741 (initialize_low_arch): New function.
9742 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9743 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9744 (target_regsets): Rename to ...
9745 (xtensa_regsets): ... this, and make static.
9746 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9747 globals.
9748 (xtensa_arch_setup, xtensa_regs_info): New functions.
9749 (the_low_target): Adjust.
9750 (initialize_low_arch): New function.
9751 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9752 (nios2_arch_setup): Set the current process'es tdesc.
9753 (target_regsets): Rename to ...
9754 (nios2_regsets): ... this.
9755 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9756 (nios2_regs_info): New function.
9757 (the_low_target): Adjust.
9758 (initialize_low_arch): New function.
9759 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9760 (aarch64_arch_setup): Set the current process'es tdesc.
9761 (target_regsets): Rename to ...
9762 (aarch64_regsets): ... this.
9763 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9764 (aarch64_regs_info): New function.
9765 (the_low_target): Adjust.
9766 (initialize_low_arch): New function.
9767 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9768 globals.
9769 (target_regsets): Rename to ...
9770 (tile_regsets): ... this.
9771 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9772 (tile_regs_info): New function.
9773 (tile_arch_setup): Set the current process'es tdesc.
9774 (the_low_target): Adjust.
9775 (initialize_low_arch): New function.
9776 * spu-low.c (tdesc_spu): Declare.
9777 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9778 * win32-arm-low.c (tdesc_arm): Declare.
9779 (arm_arch_setup): New function.
9780 (the_low_target): Install arm_arch_setup instead of
9781 init_registers_arm.
9782 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9783 (init_windows_x86): Rename to ...
9784 (i386_arch_setup): ... this. Set `win32_tdesc'.
9785 (the_low_target): Adjust.
9786 * win32-low.c (win32_tdesc): New global.
9787 (child_add_thread): Don't create the thread cache here.
9788 (do_initial_child_stuff): Set the new process'es tdesc.
9789 * win32-low.h (struct target_desc): Forward declare.
9790 (win32_tdesc): Declare.
9791 * lynx-i386-low.c (tdesc_i386): Declare global.
9792 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9793 * lynx-low.c (lynx_tdesc): New global.
9794 (lynx_add_process): Set the new process'es tdesc.
9795 * lynx-low.h (struct target_desc): Forward declare.
9796 (lynx_tdesc): Declare global.
9797 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9798 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9799 * nto-low.c (nto_tdesc): New global.
9800 (do_attach): Set the new process'es tdesc.
9801 * nto-low.h (struct target_desc): Forward declare.
9802 (nto_tdesc): Declare.
9803 * nto-x86-low.c (tdesc_i386): Declare.
9804 (nto_x86_arch_setup): Set `nto_tdesc'.
9805
9806 2013-06-04 Gary Benson <gbenson@redhat.com>
9807
9808 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9809 to qSupported response when appropriate.
9810 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9811 with nonzero-length annex.
9812 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9813 arguments supplied in annex.
9814
9815 2013-05-31 Doug Evans <dje@google.com>
9816
9817 PR server/15594
9818 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9819 64 bits in 64-cross-32 environment.
9820
9821 2013-05-28 Pedro Alves <palves@redhat.com>
9822
9823 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9824 (aarch64-without-fpu.c): Delete rule.
9825 * configure.srv (aarch64*-*-linux*): Remove references to
9826 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9827 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9828 declaration.
9829
9830 2013-05-24 Pedro Alves <palves@redhat.com>
9831
9832 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9833 instead of strchr/decode_address. Error if the range isn't split
9834 with a ','. Don't assume there's be a ':' in the action.
9835
9836 2013-05-23 Yao Qi <yao@codesourcery.com>
9837 Pedro Alves <palves@redhat.com>
9838
9839 * linux-low.c (lwp_in_step_range): New function.
9840 (linux_wait_1): If the thread was range stepping and stopped
9841 outside the stepping range, report the stop to GDB. Otherwise,
9842 continue stepping. Add range stepping debug output.
9843 (linux_set_resume_request): Copy the step range from the resume
9844 request to the lwp.
9845 (linux_supports_range_stepping): New.
9846 (linux_target_ops) <supports_range_stepping>: Set to
9847 linux_supports_range_stepping.
9848 * linux-low.h (struct linux_target_ops)
9849 <supports_range_stepping>: New field.
9850 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9851 * linux-x86-low.c (x86_supports_range_stepping): New.
9852 (the_low_target) <supports_range_stepping>: Set to
9853 x86_supports_range_stepping.
9854 * server.c (handle_v_cont): Handle 'r' action.
9855 (handle_v_requests): Append ";r" if the target supports range
9856 stepping.
9857 * target.h (struct thread_resume) <step_range_start,
9858 step_range_end>: New fields.
9859 (struct target_ops) <supports_range_stepping>:
9860 New field.
9861 (target_supports_range_stepping): New macro.
9862
9863 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9864
9865 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9866 confusion in comment.
9867
9868 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9869
9870 * lynx-low.c (struct process_info_private): New type.
9871 (lynx_add_process): New function.
9872 (lynx_create_inferior, lynx_attach): Replace calls to
9873 add_process by calls to lynx_add_process.
9874 (lynx_resume): If PTID is null, then try using
9875 current_process()->private->last_wait_event_ptid.
9876 Add comments.
9877 (lynx_clear_inferiors): Delete. The contents of that function
9878 has been inlined in lynx_mourn;
9879 (lynx_wait_1): Save the ptid in the process's private data.
9880 (lynx_mourn): Free the process' private data. Replace call
9881 to lynx_clear_inferiors by call to clear_inferiors.
9882
9883 2013-05-17 Yao Qi <yao@codesourcery.com>
9884
9885 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9886 the right place.
9887
9888 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9889
9890 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9891 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9892 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9893 PT_TEXT_END_ADDR guards. Update comments.
9894 (linux_target_op) <read_offsets>: Conditionally define to
9895 linux_read_offsets if the target is UCLIBC and if it defines
9896 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9897
9898 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9899 Andrew Jenner <andrew@codesourcery.com>
9900
9901 * Makefile.in (SFILES): Add linux-nios2-low.c.
9902 (clean): Add action to delete nios2-linux.c.
9903 (nios2-linux.c): New rule.
9904 * configure.srv: Add nios2*-*-linux*.
9905 * linux-nios2-low.c: New.
9906
9907 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9908
9909 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9910
9911 2013-04-25 Hui Zhu <hui@codesourcery.com>
9912
9913 PR gdb/15186
9914 * ax.c (ax_printf): Add fflush.
9915
9916 2013-04-22 Tom Tromey <tromey@redhat.com>
9917
9918 * Makefile.in (SFILES): Add filestuff.c.
9919 (OBS): Add filestuff.o.
9920 (filestuff.o): New target.
9921 * config.in, configure: Rebuild.
9922 * configure.ac: Check for fdwalk, pipe2.
9923
9924 2013-04-17 Pedro Alves <palves@redhat.com>
9925
9926 * configure.ac (USE_THREAD_DB): Delete variable.
9927 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9928 Don't AC_SUBST USE_THREAD_DB.
9929 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9930 * config.in, configure: Regenerate.
9931
9932 2013-04-16 Pedro Alves <palves@redhat.com>
9933
9934 * linux-low.h (struct lwp_info) <thread_known>: Move under
9935 the USE_THREAD_DB #ifdef.
9936
9937 2013-04-16 Pedro Alves <palves@redhat.com>
9938
9939 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9940 (linux-low.o): Delete rule.
9941 * linux-low.h: Always include "gdb_thread_db.h" instead of
9942 conditionally including thread_db.h.
9943 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9944 HAVE_THREAD_DB_H.
9945
9946 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9947
9948 * Makefile.in (install-only): Fix make install regression.
9949
9950 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9951
9952 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9953 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9954 installation.
9955 * gdbserver.1: Remove.
9956
9957 2013-03-22 Pedro Alves <palves@redhat.com>
9958
9959 * linux-low.c (handle_extended_wait): Don't call
9960 linux_enable_event_reporting.
9961
9962 2013-03-15 Tony Theodore <tonyt@logyst.com>
9963
9964 PR build/9098:
9965 * Makefile.in (SHELL): Use @SHELL@.
9966
9967 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9968
9969 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9970 compiler warning.
9971
9972 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9973
9974 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9975 Remove extraneous NULL element.
9976
9977 2013-03-13 Yao Qi <yao@codesourcery.com>
9978
9979 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9980 'V' block in trace frame.
9981
9982 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9983
9984 * target.h (struct target_ops): Add btrace ops.
9985 (target_supports_btrace): New macro.
9986 (target_enable_btrace): New macro.
9987 (target_disable_btrace): New macro.
9988 (target_read_btrace): New macro.
9989 * gdbthread.h (struct thread_info): Add btrace field.
9990 * server.c: Include btrace-common.h.
9991 (handle_btrace_general_set): New function.
9992 (handle_btrace_enable): New function.
9993 (handle_btrace_disable): New function.
9994 (handle_general_set): Call handle_btrace_general_set.
9995 (handle_qxfer_btrace): New function.
9996 (struct qxfer qxfer_packets[]): Add btrace entry.
9997 * inferiors.c (remove_thread): Disable btrace.
9998 * linux-low: Include linux-btrace.h.
9999 (linux_low_enable_btrace): New function.
10000 (linux_low_read_btrace): New function.
10001 (linux_target_ops): Add btrace ops.
10002 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10003 Add srv_linux_btrace=yes.
10004 (x86_64-*-linux*): Add linux-btrace.o.
10005 Add srv_linux_btrace=yes.
10006 * configure.ac: Define HAVE_LINUX_BTRACE.
10007 * config.in: Regenerated.
10008 * configure: Regenerated.
10009
10010 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10011
10012 * server.c (handle_qxfer): Preserve error message if -3 is
10013 returned.
10014 (qxfer): Document the -3 return value.
10015
10016 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10017
10018 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10019 (linux_btrace_h): New variable.
10020 (linux-btrace.o): New rule.
10021
10022 2013-03-08 Stan Shebs <stan@codesourcery.com>
10023 Hafiz Abid Qadeer <abidh@codesourcery.com>
10024
10025 * tracepoint.c (trace_buffer_size): New global.
10026 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10027 (init_trace_buffer): Change to one-argument function. Allocate
10028 trace buffer memory.
10029 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10030 handle QTBuffer:size packet.
10031 (cmd_bigqtbuffer_size): New function.
10032 (initialize_tracepoint): Call init_trace_buffer with
10033 DEFAULT_TRACE_BUFFER_SIZE.
10034 * server.c (handle_query): Add QTBuffer:size in the
10035 supported packets.
10036
10037 2013-03-07 Yao Qi <yao@codesourcery.com>
10038
10039 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10040 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10041 of -1.
10042 (cmd_qtsp): Adjust condition. Do post increment.
10043 Set cur_action and cur_step_action back to 0.
10044
10045 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10046
10047 PR server/15236
10048 * linux-low.c (linux_write_memory): Return early success if LEN is
10049 zero.
10050
10051 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10052
10053 * configure.srv: Add x86_64-*-cygwin* as target.
10054
10055 2013-02-28 Tom Tromey <tromey@redhat.com>
10056
10057 * configure.ac: Invoke AC_SYS_LARGEFILE.
10058 * configure, config.in: Rebuild.
10059
10060 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10061
10062 * win32-low.c: Throughout, fix format strings and casts of
10063 printf-like functions to avoid type related warnings on all
10064 platforms.
10065 (get_child_debug_event): Print dwDebugEventCode as hex since
10066 that's how it's usually documented.
10067
10068 2013-02-28 Yao Qi <yao@codesourcery.com>
10069
10070 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10071 pulongest.
10072
10073 2013-02-27 Jiong Wang <jiwang@tilera.com>
10074
10075 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10076 (reg-tilegx32.c): New rule.
10077 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10078 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10079 different register info initializer according to elf class.
10080 (init_registers_tilgx32): New function. The tilegx32 register info
10081 initializer.
10082 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10083 (tile_store_gregset): Likewise.
10084
10085 2013-02-27 Yao Qi <yao@codesourcery.com>
10086
10087 * server.c (process_point_options): Print debug message when
10088 debug_threads is true.
10089
10090 2013-02-26 Yao Qi <yao@codesourcery.com>
10091
10092 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10093
10094 2013-02-19 Pedro Alves <palves@redhat.com>
10095 Kai Tietz <ktietz@redhat.com>
10096
10097 PR gdb/15161
10098
10099 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10100 instead of strtoul to extract address from packet.
10101 (process_serial_event) <'z'>: Likewise.
10102
10103 2013-02-18 Yao Qi <yao@codesourcery.com>
10104
10105 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10106
10107 2013-02-14 Pedro Alves <palves@redhat.com>
10108
10109 Plug memory leak.
10110
10111 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10112 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10113
10114 2013-02-14 Pedro Alves <palves@redhat.com>
10115
10116 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10117
10118 2013-02-14 Pedro Alves <palves@redhat.com>
10119
10120 * tracepoint.c (save_string): Delete.
10121 (add_tracepoint_action): Use savestring instead of save_string.
10122
10123 2013-02-12 Pedro Alves <palves@redhat.com>
10124
10125 * linux-xtensa-low.c: Ditto.
10126 * xtensa-xtregs.c: Ditto.
10127
10128 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10129
10130 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10131 thread_db.
10132
10133 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10134
10135 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10136 aarch64_num_wp_regs and aarch64_num_bp_regs to
10137 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10138
10139 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10140
10141 * linux-aarch64-low.c (ps_get_thread_area): Replace
10142 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10143
10144 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10145 Marcus Shawcroft <marcus.shawcroft@arm.com>
10146 Nigel Stephens <nigel.stephens@arm.com>
10147 Yufeng Zhang <yufeng.zhang@arm.com>
10148
10149 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10150 (aarch64.c, aarch64-without-fpu.c): New targets.
10151 * configure.srv (aarch64*-*-linux*): New.
10152 * linux-aarch64-low.c: New file.
10153
10154 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10155
10156 * linux-low.c (handle_extended_wait, linux_create_inferior)
10157 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10158 (dequeue_one_deferred_signal, linux_resume_one_thread)
10159 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10160 (linux_tracefork_grandchild, linux_test_for_tracefork)
10161 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10162 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10163 where the argument is 0.
10164
10165 2013-01-25 Yao Qi <yao@codesourcery.com>
10166
10167 * event-loop.c: Include "queue.h".
10168 (gdb_event_p): New typedef.
10169 (struct gdb_event) <next_event>: Remove.
10170 (event_queue): Change to QUEUE(gdb_event_p).
10171 (async_queue_event): Remove.
10172 (gdb_event_xfree): New.
10173 (initialize_event_loop): New.
10174 (process_event): Use API from QUEUE.
10175 (wait_for_event): Likewise.
10176 * server.c (main): Call initialize_event_loop.
10177 * server.h (initialize_event_loop): Declare.
10178
10179 2013-01-18 Yao Qi <yao@codesourcery.com>
10180
10181 * ax.h (struct eval_agent_expr_context): New.
10182 (gdb_eval_agent_expr): Update declaration.
10183 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10184 TFRAME. Add new argument CTX.
10185 * server.h (struct eval_agent_expr_context): Declare.
10186 (agent_mem_read, agent_tsv_read): Update declaration.
10187 (agent_mem_read_string): Likewise.
10188 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10189 (add_traceframe_block): Add new argument TPOINT.
10190 Increase TPOINT->traceframe_usage.
10191 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10192 eval_tracepoint_agent_expr.
10193 (condition_true_at_tracepoint): Likewise.
10194 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10195 (agent_mem_read_string, agent_tsv_read): Likewise.
10196
10197 2013-01-16 Yao Qi <yao@codesourcery.com>
10198
10199 * linux-low.c (linux_resume_one_lwp): Don't check
10200 'lwp->bp_reinsert != 0'.
10201
10202 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10203 Pedro Alves <palves@redhat.com>
10204
10205 * lynx-low.c (ptrace_request_to_str): Define a temporary
10206 macro and use it to simplify this function's implementation.
10207
10208 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10209
10210 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10211 sets errno.
10212
10213 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10214
10215 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10216
10217 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10218
10219 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10220
10221 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10222
10223 * lynx-low.c (lynx_resume): Use the resume_info parameter
10224 to determine the ptid for the lynx_ptrace call, unless
10225 it is equal to minus_one_ptid, in which case we use the
10226 ptid of the current_inferior.
10227 (lynx_wait_1): After having received a thread create/exit
10228 event, resume the inferior's execution using the signaling
10229 thread's ptid, rather than the old ptid.
10230
10231 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10232
10233 * lynx-low.c (lynx_resume): Delete variable ret.
10234
10235 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10236
10237 * gdbreplay.c (gdbreplay_version): Update copyright year.
10238 * server.c (gdbserver_version): Likewise.
10239
10240 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10241
10242 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10243 new thread.
10244
10245 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10246
10247 * lynx-low.c (ptrace_request_to_str): Add handling for
10248 PTRACE_GETTRACESIG.
10249
10250 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10251
10252 * lynx-low.c (lynx_attach): Delete variable new_process.
10253
10254 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10255
10256 * lynx-low.c (lynx_create_inferior): Delete variable
10257 new_process.
10258
10259 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10260
10261 * lynx-low.c (ptrace_request_to_str): Do not handle
10262 PTRACE_GETTHREADLIST if this macro does not exist.
10263
10264 2012-12-15 Yao Qi <yao@codesourcery.com>
10265
10266 * Makefile.in (OBS): Add notif.o.
10267 * notif.c, notif.h: New.
10268 * server.c: Include "notif.h".
10269 (struct vstop_notif) <next>: Remove.
10270 <base>: New field.
10271 (queue_stop_reply): Update.
10272 (push_event, send_next_stop_reply): Remove.
10273 (discard_queued_stop_replies): Update.
10274 (notif_stop): New variable.
10275 (handle_v_stopped): Remove.
10276 (handle_v_requests): Don't call handle_v_stopped. Call
10277 handle_ack_notif instead.
10278 (queue_stop_reply_callback): Call notif_event_enque instead
10279 of queue_stop_reply.
10280 (handle_status): Don't call send_next_stop_reply, call
10281 notif_write_event instead.
10282 (kill_inferior_callback): Likewise.
10283 (detach_or_kill_inferior_callback): Likewise.
10284 (main): Call initialize_notif.
10285 (process_serial_event): Call QUEUE_is_empty.
10286 (handle_target_event): Call notif_push instead of push event.
10287 * server.h (push_event): Remove declaration.
10288
10289 2012-12-10 Tom Tromey <tromey@redhat.com>
10290
10291 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10292 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10293 macros.
10294 (.c.o): Rewrite.
10295 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10296 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10297 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10298 (amd64-linux-ipa.o, ax.o): Rewrite.
10299 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10300 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10301 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10302 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10303 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10304 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10305 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10306 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10307 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10308 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10309 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10310 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10311 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10312 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10313 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10314 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10315 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10316 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10317 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10318 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10319 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10320 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10321 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10322 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10323 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10324 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10325 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10326 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10327 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10328 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10329 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10330 (reg-tilegx.o): Remove.
10331 (all_object_files): New macro.
10332 Include .deps files.
10333 * aclocal.m4, configure: Rebuild.
10334 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10335 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10336 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10337
10338 2012-12-05 Tom Tromey <tromey@redhat.com>
10339
10340 PR gdb/14917:
10341 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10342
10343 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10344
10345 * configure.ac: Check for linux/perf_event.h.
10346 * config.in: Regenerated.
10347 * configure: Regenerated.
10348
10349 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10350
10351 * hostio.c (handle_readlink): Decrease buffer size
10352 parameter passed to readlink by one byte.
10353
10354 2012-11-26 Yao Qi <yao@codesourcery.com>
10355
10356 * configure.ac (build_warnings): Append '-Wempty-body'.
10357 * configure: Regenerated.
10358 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10359 body.
10360
10361 2012-11-15 Pierre Muller <muller@sourceware.org>
10362
10363 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10364 * config.in: Regenerate.
10365 * configure: Regenerate.
10366 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10367 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10368 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10369 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10370 header.
10371 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10372 instead of <sys/wait.h> header.
10373 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10374
10375 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10376
10377 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10378 (various make rules): Remove -DGDBSERVER
10379
10380 2012-11-09 Yao Qi <yao@codesourcery.com>
10381
10382 * spu-low.c (current_ptid): Move it to ..
10383 * gdbthread.h: ... here. New.
10384 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10385 * server.c (myresume, process_serial_event): Likewise.
10386 * thread-db.c (thread_db_find_new_threads): Likewise.
10387 * tracepoint.c (run_inferior_command): Likewise.
10388
10389 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10390
10391 * server.c (handle_search_memory_1): Include access length in
10392 warning message.
10393
10394 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10395
10396 * linux-crisv32-low.c: Fix compile errors.
10397
10398 2012-09-04 Yao Qi <yao@codesourcery.com>
10399
10400 * tracepoint.c (cmd_qtsv): Adjust debug message.
10401 Don't check CUR_TPOINT.
10402
10403 2012-08-28 Yao Qi <yao@codesourcery.com>
10404
10405 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10406 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10407 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10408 Remove declarations of xmalloc, xreallloc, xstrdup and
10409 freeargv.
10410 * Makefile.in (libiberty_h): New.
10411 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10412 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10413
10414 2012-08-23 Yao Qi <yao@codesourcery.com>
10415
10416 * server.h: Remove declaration of 'xsnprintf'.
10417
10418 2012-08-22 Keith Seitz <keiths@redhat.com>
10419
10420 * server.h: Include build-gnulib-gbserver/config.h.
10421 * gdbreplay.c: Likewise.
10422
10423 2012-08-08 Doug Evans <dje@google.com>
10424
10425 * Makefile.in (SFILES): Add gdb_vecs.c.
10426 (OBS): Add gdb_vecs.o.
10427 (gdb_vecs_h, host_defs_h): New variables.
10428 (thread-db.o): Add $(gdb_vecs_h) dependency.
10429 (gdb_vecs.o): New rule.
10430 * thread-db.c: #include "gdb_vecs.h".
10431 (thread_db_load_search): Use a vector to iterate over path elements.
10432 Handle text appearing after "$pdir".
10433
10434 * configure.ac: Add check for strstr.
10435 * config.in: Regenerate.
10436 * configure: Regenerate.
10437
10438 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10439
10440 * hostio.c (handle_pread): If pread fails, fall back to attempting
10441 lseek/read.
10442 (handle_pwrite): Likewise for pwrite.
10443
10444 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10445
10446 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10447 between unsupported TYPE and unimplementable ADDR/LEN combination.
10448 (arm_insert_point): Act on new return value.
10449
10450 2012-07-31 Pedro Alves <palves@redhat.com>
10451
10452 * server.c (process_point_options): Only skip tokens if we find
10453 one that is unrecognized. Don't treat 'X' specially while
10454 skipping unrecognized tokens.
10455
10456 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10457
10458 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10459 to 4-byte-align HW breakpoint addresses for Thumb.
10460
10461 2012-07-27 Yao Qi <yao@codesourcery.com>
10462
10463 PR remote/14161.
10464
10465 * server.h: Declare gdb_agent_about_to_close.
10466 * target.c (kill_inferior): Include "agent.h".
10467 New. Send command 'kill'.
10468 * target.h (kill_inferior): Removed macro.
10469 * tracepoint.c (gdb_agent_about_to_close): New.
10470 (gdb_agent_helper_thread): Handle command 'close'.
10471 Wait endlessly until the inferior stops.
10472 Install gdb_agent_remove_socket to atexit hook.
10473 (agent_socket_name): New static variable.
10474 (gdb_agent_socket_init): Replace local variable 'name' with
10475 'agent_socket_name'.
10476 (gdb_agent_remove_socket): New.
10477
10478 2012-07-27 Yao Qi <yao@codesourcery.com>
10479
10480 * server.c (process_point_options): Stop at 'X' when parsing.
10481
10482 2012-07-19 Michael Eager <eager@eagercon.com>
10483
10484 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10485 to hw_execute.
10486 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10487 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10488 hardware breakpoint.
10489
10490 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10491
10492 * gdbserver/linux-low.c (initialize_low): Call
10493 linux_ptrace_init_warnings.
10494
10495 2012-07-02 Doug Evans <dje@google.com>
10496
10497 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10498 pointer to int.
10499
10500 2012-07-02 Stan Shebs <stan@codesourcery.com>
10501
10502 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10503 (ax.o): Add it to build rule.
10504 (ax-ipa.o): Ditto.
10505 (OBS): Add format.o.
10506 (IPA_OBS): Add format.o.
10507 * server.c (handle_query): Claim support for breakpoint commands.
10508 (process_point_options): Add command case.
10509 (process_serial_event): Leave running if there are printfs in
10510 effect.
10511 * mem-break.h (any_persistent_commands): Declare.
10512 (add_breakpoint_commands): Declare.
10513 (gdb_no_commands_at_breakpoint): Declare.
10514 (run_breakpoint_commands): Declare.
10515 * mem-break.c (struct point_command_list): New struct.
10516 (struct breakpoint): New field command_list.
10517 (any_persistent_commands): New function.
10518 (add_commands_to_breakpoint): New function.
10519 (add_breakpoint_commands): New function.
10520 (gdb_no_commands_at_breakpoint): New function.
10521 (run_breakpoint_commands): New function.
10522 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10523 locally.
10524 * ax.c: Include format.h.
10525 (ax_printf): New function.
10526 (gdb_eval_agent_expr): Add printf opcode.
10527
10528 2012-06-13 Yao Qi <yao@codesourcery.com>
10529
10530 * server.c (start_inferior): Remove duplicated writes to fields
10531 'last_resume_kind' and 'last_status' of 'current_inferior'.
10532
10533 2012-06-12 Yao Qi <yao@codesourcery.com>
10534 Pedro Alves <palves@redhat.com>
10535
10536 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10537 comment.
10538 * server.c (handle_v_cont): Extend comment.
10539
10540 2012-06-11 Yao Qi <yao@codesourcery.com>
10541
10542 * linux-low.c (linux_attach): Add 'static'.
10543
10544 2012-06-06 Yao Qi <yao@codesourcery.com>
10545
10546 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10547
10548 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10549
10550 Fix gcc -flto compilation warning.
10551 * server.c (main): Make variable multi_mode and attach volatile.
10552
10553 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10554
10555 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10556 if the platform doesn't know about it.
10557
10558 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10559
10560 * Makefile.in (SFILES): Add linux-tile-low.c.
10561 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10562 * configure.srv: Handle tilegx-*-linux*.
10563 * linux-tile-low.c: New file.
10564
10565 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10566
10567 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10568
10569 2012-05-24 Pedro Alves <palves@redhat.com>
10570
10571 PR gdb/7205
10572
10573 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10574
10575 2012-05-24 Pedro Alves <palves@redhat.com>
10576
10577 PR gdb/7205
10578
10579 Replace target_signal with gdb_signal throughout.
10580
10581 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10582
10583 * linux-low.c (linux_store_registers): Avoid the copying sequence
10584 when no data has been retrieved by ptrace.
10585
10586 2012-05-22 Will Deacon <will.deacon@arm.com>
10587
10588 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10589 Include asm/ptrace.h.
10590 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10591 already defined.
10592
10593 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10594
10595 * linux-low.c (linux_store_registers): Don't re-retrieve data
10596 with ptrace that has already been obtained from /proc. Always
10597 copy any data retrieved with ptrace to the buffer supplied.
10598
10599 2012-05-11 Yao Qi <yao@codesourcery.com>
10600 Pedro Alves <palves@redhat.com>
10601
10602 * linux-low.c (enum stopping_threads_kind): New.
10603 (stopping_threads): Change type to `enum stopping_threads_kind'.
10604 (handle_extended_wait): If stopping and suspending threads, leave
10605 the new_lwp suspended too.
10606 (linux_wait_for_event): Adjust.
10607 (stop_all_lwps): Set `stopping_threads' to
10608 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10609 whether we're suspending threads or just stopping them. Assert no
10610 recursion happens.
10611
10612 2012-04-29 Yao Qi <yao@codesourcery.com>
10613
10614 * server.h: Move some code to ...
10615 * gdbthread.h: ... here. New.
10616 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10617 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10618 (nto-low.o, win32-low.o): Likewise.
10619 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10620 * regcache.c, remote-utils.c, server.c: Likewise.
10621 * target.c, tracepoint.c, win32-low.c: Likewise.
10622
10623 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10624
10625 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10626 (PTRACE_ARG4_TYPE): Likewise.
10627 (PTRACE_XFER_TYPE): Likewise.
10628 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10629 ptrace to PTRACE_ARG3_TYPE.
10630 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10631 (PTRACE_ARG4_TYPE): Likewise.
10632 (PTRACE_XFER_TYPE): Likewise.
10633 (linux_detach_one_lwp): Cast fourth argument of
10634 ptrace to long then PTRACE_ARG4_TYPE.
10635 (regsets_fetch_inferior_registers): Cast third argument of
10636 ptrace to long then PTRACE_ARG3_TYPE.
10637 (regsets_store_inferior_registers): Likewise.
10638
10639 2012-04-20 Pedro Alves <palves@redhat.com>
10640
10641 * configure: Regenerate.
10642
10643 2012-04-19 Pedro Alves <palves@redhat.com>
10644
10645 * Makefile.in (GNULIB_BUILDDIR): New.
10646 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10647 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10648 (all, install-only, uninstall, clean-info, all-lib, clean): No
10649 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10650 (maintainer-clean realclean distclean): Use subdir_do.
10651 (subdir_do): New.
10652 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10653 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10654 * acinclude.m4: Include acx_configure_dir.m4.
10655 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10656 calls. Call AC_PROG_RANLIB. Configure gnulib using
10657 ACX_CONFIGURE_DIR.
10658 (GNULIB): New.
10659 (GNULIB_STDINT_H): Adjust.
10660 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10661 * gdbreplay.c: Include build-gnulib/config.h.
10662 * server.h: Likewise.
10663 * aclocal.m4: Regenerate.
10664 * config.in: Regenerate.
10665 * configure: Regenerate.
10666
10667 2012-04-19 Pedro Alves <palves@redhat.com>
10668
10669 * Makefile.in (LIBGNU, INCGNU): Adjust.
10670 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10671 (all, install-only, uninstall, clean-info, all-lib, clean)
10672 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10673 * configure.ac: Adjust AC_OUTPUT output.
10674 * aclocal.m4: Regenerate.
10675 * configure: Regenerate.
10676
10677 2012-04-19 Pedro Alves <palves@redhat.com>
10678
10679 * Makefile.in (generated_files): New.
10680 (server_h): Remove the explicit dependency on config.h, and depend
10681 on $generated_files.
10682
10683 2012-04-19 Pedro Alves <palves@redhat.com>
10684
10685 * Makefile.in (INCGNU): Add -Ignulib.
10686
10687 2012-04-19 Pedro Alves <palves@redhat.com>
10688
10689 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10690 (INCGNU): ... this, and spell out -I here.
10691 (GNULIB_LIB): Rename to ...
10692 (LIBGNU): ... this.
10693 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10694
10695 2012-04-19 Pedro Alves <palves@redhat.com>
10696
10697 * config.in: Regenerate.
10698
10699 2012-04-19 Pedro Alves <palves@redhat.com>
10700
10701 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10702 * server.h (memmem): Remove declaration.
10703 * config.in: Regenerate.
10704 * configure: Regenerate.
10705
10706 2012-04-19 Yao Qi <yao@codesourcery.com>
10707
10708 * Makefile.in (SFILES): Add common/vec.c.
10709 (OBS): Add vec.o.
10710 (vec.o): New rule.
10711
10712 2012-04-19 Yao Qi <yao@codesourcery.com>
10713
10714 * remote-utils.c (prepare_resume_reply): Replace with macro
10715 target_core_of_thread.
10716 * server.c (handle_qxfer_threads_proper): Likewise.
10717 * target.h (traget_core_of_thread): New macro.
10718
10719 2012-04-18 Pedro Alves <palves@redhat.com>
10720
10721 * aclocal.m4: Regenerate.
10722 * configure: Regenerate.
10723
10724 2012-04-16 Yao Qi <yao@codesourcery.com>
10725
10726 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10727 duplicated on address.
10728
10729 2012-04-16 Yao Qi <yao@codesourcery.com>
10730
10731 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10732 (struct tracepoint_action_ops) <send>: New field.
10733 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10734 (agent_expr_send, x_tracepoint_action_send): New.
10735 (l_tracepoint_action_send): New.
10736 (cmd_qtdp): Download and install tracepoint
10737 according to `use_agent'.
10738 (run_inferior_command): Add one more parameter `len'.
10739 Update callers.
10740 (tracepoint_send_agent): New.
10741 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10742
10743 2012-04-16 Yao Qi <yao@codesourcery.com>
10744
10745 * tracepoint.c (download_tracepoints): Moved to ...
10746 (cmd_qtstart): ... here.
10747
10748 2012-04-14 Yao Qi <yao@codesourcery.com>
10749
10750 * tracepoint.c: Include inttypes.h.
10751 (struct collect_memory_action): Use sized types.
10752 (struct tracepoint): Likewise.
10753 (cmd_qtdp, stop_tracing): Update print specifiers.
10754 (cmd_qtp, response_tracepoint): Likewise.
10755 (collect_data_at_tracepoint): Likewise.
10756 (collect_data_at_step): Likewise.
10757
10758 2012-04-14 Yao Qi <yao@codesourcery.com>
10759
10760 Import gnulib module inttypes.
10761 * aclocal.m4, config.in, configure: Regenerated.
10762
10763 2012-04-14 Yao Qi <yao@codesourcery.com>
10764
10765 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10766 Makefile and config.status at last.
10767
10768 2012-04-13 Yao Qi <yao@codesourcery.com>
10769
10770 * tracepoint.c: Include stdint.h unconditionally.
10771
10772 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10773
10774 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10775 on BFD_HAVE_SYS_PROCFS_TYPE.
10776 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10777 * configure: Regenerate.
10778 * config.in: Likewise.
10779
10780 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10781
10782 * Makefile.in (clean): Also remove x32.c x32-linux.c
10783 x32-avx.c x32-avx-linux.c.
10784 (x32.o): New target.
10785 (x32.c): Likewise.
10786 (x32-linux.o): Likewise.
10787 (x32-linux.c): Likewise.
10788 (x32-avx.o): Likewise.
10789 (x32-avx.c): Likewise.
10790 (x32-avx-linux.o): Likewise.
10791 (x32-avx-linux.c): Likewise.
10792
10793 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10794 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10795 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10796 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10797 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10798 i386/x32-avx-linux.xml.
10799
10800 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10801 (init_registers_x32_avx_linux): Likwise.
10802 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10803 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10804
10805 2012-04-13 Pedro Alves <palves@redhat.com>
10806
10807 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10808 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10809 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10810 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10811 the sub-make.
10812
10813 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10814
10815 * linux-x86-low.c (compat_x32_clock_t): New.
10816 (compat_x32_siginfo_t): Likewise.
10817 (compat_x32_siginfo_from_siginfo): Likewise.
10818 (siginfo_from_compat_x32_siginfo): Likewise.
10819 (linux_is_elf64): Likewise.
10820 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10821 and siginfo_from_compat_x32_siginfo for x32.
10822 (x86_arch_setup): Set linux_is_elf64.
10823
10824 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10825
10826 PR gdb/13969
10827 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10828 e_machine field.
10829 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10830 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10831 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10832 compatible with process.
10833
10834 2012-04-12 Yao Qi <yao@codesourcery.com>
10835
10836 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10837 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10838 (install-only, install-info, clean): Handle sub dir gnulib.
10839 (all-lib, am--refresh): New targets.
10840 (memmem.o): Remove target.
10841 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10842 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10843 (AC_REPLACE_FUNCS): Remove memmem.
10844 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10845 (AC_OUTPUT): Generate Makefile in gnulib/.
10846 * aclocal.m4, config.in, configure: Regenerated.
10847
10848 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10849
10850 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10851
10852 2012-04-05 Pedro Alves <palves@redhat.com>
10853
10854 -Werror=strict-aliasing
10855
10856 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10857 pointer.
10858
10859 2012-04-04 Pedro Alves <palves@redhat.com>
10860
10861 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10862 (sparc_store_gregset_from_stack, sparc_store_gregset)
10863 (sparc_breakpoint_at): Fix formatting.
10864
10865 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10866
10867 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10868 are available.
10869 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10870 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10871 * config.in: Regenerate.
10872 * configure: Likewise.
10873
10874 2012-03-29 Pedro Alves <palves@redhat.com>
10875
10876 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10877 Correct ptrace arguments.
10878
10879 2012-03-28 Pedro Alves <palves@redhat.com>
10880
10881 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10882 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10883 (IA64_FR1_REGNUM): New defines.
10884 (ia64_fetch_register): New.
10885 (the_low_target): Install it.
10886 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10887 field.
10888 * linux-low.c (linux_fetch_registers): Try the
10889 the_low_target.fetch_register hook first.
10890
10891 * linux-arm-low.c (the_low_target): Adjust.
10892 * linux-bfin-low.c (the_low_target): Adjust.
10893 * linux-cris-low.c (the_low_target): Adjust.
10894 * linux-crisv32-low.c (the_low_target): Adjust.
10895 * linux-m32r-low.c (the_low_target): Adjust.
10896 * linux-m68k-low.c (the_low_target): Adjust.
10897 * linux-mips-low.c (the_low_target): Adjust.
10898 * linux-ppc-low.c (the_low_target): Adjust.
10899 * linux-s390-low.c (the_low_target): Adjust.
10900 * linux-sh-low.c (the_low_target): Adjust.
10901 * linux-sparc-low.c (the_low_target): Adjust.
10902 * linux-tic6x-low.c (the_low_target): Adjust.
10903 * linux-x86-low.c (the_low_target): Adjust.
10904 * linux-xtensa-low.c (the_low_target): Adjust.
10905
10906 2012-03-26 Pedro Alves <palves@redhat.com>
10907
10908 * server.c (handle_qxfer_libraries): Don't bail early if
10909 the_target->qxfer_libraries_svr4 is not NULL.
10910
10911 2012-03-26 Pedro Alves <palves@redhat.com>
10912
10913 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10914
10915 2012-03-23 Pedro Alves <palves@redhat.com>
10916
10917 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10918 "library-list-svr4" element's start tag when the the DSO list is
10919 empty.
10920
10921 2012-03-23 Pedro Alves <palves@redhat.com>
10922
10923 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10924 a variable whose type size is the same as the inferior's pointer
10925 size.
10926
10927 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10928
10929 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10930 struct siginfo.
10931 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10932 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10933 * linux-low.h: Include <signal.h>.
10934 (struct siginfo): Remove forward declaration.
10935 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10936 struct siginfo.
10937
10938 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10939
10940 * .gitignore: Ignore more files.
10941
10942 2012-03-19 Pedro Alves <palves@redhat.com>
10943 Jan Kratochvil <jan.kratochvil@redhat.com>
10944
10945 * server.c (cont_thread, general_thread): Add describing comments.
10946 (start_inferior): Clear `cont_thread'.
10947 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10948 of a process.
10949
10950 2012-03-15 Yao Qi <yao@codesourcery.com>
10951
10952 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10953 handling to ...
10954 (cmd_qtdp): ... here.
10955
10956 2012-03-15 Yao Qi <yao@codesourcery.com>
10957
10958 * tracepoint.c (struct tracepoint_action_ops): New.
10959 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10960 (m_tracepoint_action_download): New.
10961 (r_tracepoint_action_download): New.
10962 (x_tracepoint_action_download): New.
10963 (l_tracepoint_action_download): New.
10964 (add_tracepoint_action): Install `action->ops' according type.
10965 (download_tracepoint_1): Move code `download' function pointer
10966 of various tracepoint_action_ops.
10967
10968 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10969
10970 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10971 linux_ptrace_attach_warnings.
10972
10973 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10974
10975 * Makefile.in (linux-ptrace.o): New.
10976 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10977 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10978 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10979 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10980 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10981 of these targets.
10982 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10983
10984 2012-03-08 Yao Qi <yao@codesourcery.com>
10985 Pedro Alves <palves@redhat.com>
10986
10987 Fix PR server/13392.
10988 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10989 offset of JMP insn.
10990 * tracepoint.c (remove_tracepoint): New.
10991 (cmd_qtdp): Call remove_tracepoint when failed to install.
10992
10993 2012-03-07 Pedro Alves <palves@redhat.com>
10994
10995 * linux-low.c (get_detach_signal): New.
10996 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10997 Pass on pending signals to PTRACE_DETACH. Check the result of the
10998 ptrace call.
10999 * server.c (program_signals, program_signals_p): New.
11000 (handle_general_set): Handle QProgramSignals.
11001 * server.h (program_signals, program_signals_p): Declare.
11002
11003 2012-03-05 Pedro Alves <palves@redhat.com>
11004 Jan Kratochvil <jan.kratochvil@redhat.com>
11005
11006 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11007 New comment why.
11008
11009 2012-03-03 Yao Qi <yao@codesourcery.com>
11010
11011 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11012 agent_look_up_symbols.
11013
11014 2012-03-03 Yao Qi <yao@codesourcery.com>
11015
11016 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11017 (linux-x86-low.o): Likewise.
11018 * server.h: Remove in_process_agent_loaded.
11019 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11020 common/agent.c.
11021 Update callers.
11022
11023 2012-03-03 Yao Qi <yao@codesourcery.com>
11024
11025 * tracepoint.c (gdb_agent_capability): New global.
11026 (in_process_agent_loaded_ust): Renamed to
11027 `in_process_agent_supports_ust'.
11028 Update callers.
11029 (in_process_agent_supports_ust): Call agent_capability_check.
11030 (clear_installed_tracepoints): Assert that agent supports
11031 agent.
11032
11033 2012-03-03 Yao Qi <yao@codesourcery.com>
11034
11035 * linux-low.c (linux_supports_agent): New.
11036 (linux_target_ops): Initialize field `supports_agent' with
11037 linux_supports_agent.
11038 * target.h (struct target_ops) <supports_agent>: New.
11039 (target_supports_agent): New macro.
11040 * server.c (handle_general_set): Handle packet 'QAgent'.
11041 (handle_query): Send `QAgent+'.
11042 * Makefile.in (server.o): Depends on agent.h.
11043
11044 2012-03-03 Yao Qi <yao@codesourcery.com>
11045
11046 * Makefile.in (OBS): Add agent.o.
11047 Add new rule for agent.o.
11048 Track dependence of tracepoint.c on agent.h.
11049 * tracepoint.c (run_inferior_command_1):
11050 (run_inferior_command): Call agent_run_command.
11051 (gdb_ust_connect_sync_socket): Deleted. Move it to
11052 common/agent.c.
11053 (resume_thread, stop_thread): Likewise.
11054 (gdb_ust_socket_init): Renamed to ...
11055 (gdb_agent_socket_init): ... New.
11056 (gdb_ust_thread): Renamed to ...
11057 (gdb_agent_helper_thread): ... New.
11058 (gdb_ust_init): Move some code to ...
11059 (gdb_agent_init): ... here. New.
11060 [HAVE_UST]: Call gdb_ust_init.
11061 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11062 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11063 * config.in, configure: Regenerated.
11064
11065 2012-03-02 Pedro Alves <palves@redhat.com>
11066
11067 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11068 * linux-low.c (struct simple_pid_list): New.
11069 (stopped_pids): New a struct simple_pid_list pointer.
11070 (add_to_pid_list, pull_pid_from_list): New.
11071 (handle_extended_wait): Don't assume the first signal new children
11072 report is SIGSTOP. Adjust call to pull_pid_from_list.
11073 (linux_wait_for_lwp): Adjust.
11074
11075 2012-03-02 Yao Qi <yao@codesourcery.com>
11076
11077 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11078 debug log.
11079
11080 2012-03-02 Yao Qi <yao@codesourcery.com>
11081
11082 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11083 `stop_pc' and `tpoint'. Update caller.
11084
11085 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11086
11087 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11088 * linux-low.c (use_linux_regsets): New macro.
11089 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11090 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11091 (linux_register_in_regsets): New function.
11092 (usr_fetch_inferior_registers): Skip registers covered by
11093 regsets.
11094 (usr_store_inferior_registers): Likewise.
11095 (usr_fetch_inferior_registers): New macro.
11096 (usr_store_inferior_registers): Likewise.
11097 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11098 (linux_store_registers): Likewise.
11099 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11100 prototype.
11101 (init_registers_mips64_dsp_linux): Likewise.
11102 (init_registers_mips_linux): New macro.
11103 (init_registers_mips_dsp_linux): Likewise.
11104 (mips_dsp_num_regs): Likewise.
11105 (DSP_BASE, DSP_CONTROL): New fallback macros.
11106 (mips_base_regs): New macro.
11107 (mips_regmap): Use it. Fix the size.
11108 (mips_dsp_regmap): New variable.
11109 (mips_dsp_regset_bitmap): Likewise.
11110 (mips_arch_setup): New function.
11111 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11112 than mips_regmap.
11113 (mips_cannot_store_register): Likewise.
11114 (the_low_target): Update .arch_setup, .num_regs and .regmap
11115 initializers. Add .regset_bitmap initializer.
11116 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11117 initializer.
11118 * linux-bfin-low.c (the_low_target): Likewise.
11119 * linux-cris-low.c (the_low_target): Likewise.
11120 * linux-crisv32-low.c (the_low_target): Likewise.
11121 * linux-ia64-low.c (the_low_target): Likewise.
11122 * linux-m32r-low.c (the_low_target): Likewise.
11123 * linux-m68k-low.c (the_low_target): Likewise.
11124 * linux-ppc-low.c (the_low_target): Likewise.
11125 * linux-s390-low.c (the_low_target): Likewise.
11126 * linux-sh-low.c (the_low_target): Likewise.
11127 * linux-sparc-low.c (the_low_target): Likewise.
11128 * linux-tic6x-low.c (the_low_target): Likewise.
11129 * linux-x86-low.c (the_low_target): Likewise.
11130 * linux-xtensa-low.c (the_low_target): Likewise.
11131 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11132 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11133 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11134 srv_xmlfiles.
11135 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11136 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11137
11138 2012-02-29 Yao Qi <yao@codesourcery.com>
11139 Pedro Alves <palves@redhat.com>
11140
11141 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11142 `step_over_finished' is true.
11143
11144 2012-02-27 Pedro Alves <palves@redhat.com>
11145
11146 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11147 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11148
11149 2012-02-27 Pedro Alves <palves@redhat.com>
11150
11151 PR server/9684
11152 * linux-low.c (pid_is_stopped): New.
11153 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11154
11155 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11156
11157 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11158 of conditions.
11159
11160 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11161
11162 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11163
11164 2012-02-24 Luis Machado <lgustavo@codesourcery>
11165
11166 * server.c (handle_query): Advertise support for target-side
11167 breakpoint condition evaluation.
11168 (process_point_options): New function.
11169 (process_serial_event): When inserting a breakpoint, check for
11170 a target-side condition that should be evaluated.
11171
11172 * mem-break.c: Include regcache.h and ax.h.
11173 (point_cond_list_t): New data structure.
11174 (breakpoint) <cond_list>: New field.
11175 (find_gdb_breakpoint_at): Make non-static.
11176 (delete_gdb_breakpoint_at): Clear any target-side
11177 conditions.
11178 (clear_gdb_breakpoint_conditions): New function.
11179 (add_condition_to_breakpoint): Likewise.
11180 (add_breakpoint_condition): Likewise.
11181 (gdb_condition_true_at_breakpoint): Likewise.
11182 (gdb_breakpoint_here): Return result directly instead
11183 of going through a local variable.
11184
11185 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11186 (clear_gdb_breakpoint_conditions): Likewise.
11187 (add_breakpoint_condition): Likewise.
11188 (gdb_condition_true_at_breakpoint): Likewise.
11189
11190 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11191 (need_step_over_p): Take target-side breakpoint condition into
11192 consideration.
11193
11194 2012-02-24 Luis Machado <lgustavo@codesourcery>
11195
11196 * server.h: Include tracepoint.h.
11197 (agent_mem_read, agent_get_trace_state_variable_value,
11198 agent_set_trace_state_variable_value,
11199 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11200 get_set_tsv_func_addr): New prototypes.
11201
11202 * ax.h: New include file.
11203 * ax.c: New source file.
11204
11205 * tracepoint.c: Include ax.h.
11206 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11207 agent_expr, eval_result_type): Move to ax.h.
11208 (parse_agent_expr): Rename to ...
11209 (gdb_parse_agent_expr): ... this, make it non-static and move
11210 to ax.h.
11211 (unparse_agent_expr) Rename to ...
11212 (gdb_unparse_agent_expr): ... this, make it non-static and move
11213 to ax.h.
11214 (eval_agent_expr): Rename to ...
11215 (eval_tracepoint_agent_expr): ... this.
11216 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11217 forward declarations.
11218 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11219 (agent_get_trace_state_variable_value): New function.
11220 (agent_set_trace_state_variable_value): New function.
11221 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11222 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11223 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11224 (condition_true_at_tracepoint): Likewise.
11225 (parse_agent_expr): Rename to ...
11226 (gdb_parse_agent_expr): ... this and move to ax.c.
11227 (unparse_agent_expr): Rename to ...
11228 (gdb_unparse_agent_expr): ... this and move to ax.c.
11229 (gdb_agent_op_name): Move to ax.c.
11230 (eval_agent_expr): Rename to ...
11231 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11232 and move to ax.c.
11233 (eval_tracepoint_agent_expr): New function.
11234 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11235 non-static.
11236 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11237 ax.c.
11238 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11239 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11240 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11241 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11242 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11243 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11244 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11245 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11246 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11247 (compile_bytecodes): Remove forward declaration.
11248 (is_goto_target): Move to ax.c.
11249 (compile_bytecodes): Move to ax.c and call
11250 agent_get_trace_state_variable_value (...) and
11251 agent_set_trace_state_variable_value (...).
11252
11253 * Makefile.in: Update ax.c and IPA dependencies.
11254
11255 2012-02-24 Pedro Alves <palves@redhat.com>
11256
11257 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11258 (cmd_bigqtbuffer_circular): ... this. Only handle
11259 'QTBuffer:circular:'.
11260 (handle_tracepoint_general_set): Adjust.
11261
11262 2012-02-16 Yao Qi <yao@codesourcery.com>
11263
11264 * inferiors.c: Move code to ...
11265 * dll.c: .... here. New.
11266 * server.h: Declare clear_dlls.
11267 * Makefile.in (SFILES): Add dll.c.
11268 (OBS): Add dll.o
11269 (dll.o): New rule.
11270
11271 2012-02-11 Yao Qi <yao@codesourcery.com>
11272
11273 * server.c: (handle_monitor_command): Add a new parameter
11274 `own_buf'.
11275 (handle_query): Update caller.
11276
11277 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11278
11279 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11280 * configure, config.in: Regenerate.
11281 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11282 is not defined.
11283
11284 2012-02-02 Pedro Alves <palves@redhat.com>
11285
11286 Try SIGKILL first, then PTRACE_KILL.
11287 * linux-low.c (linux_kill_one_lwp): New.
11288 (linux_kill_one_lwp): Rename to ...
11289 (kill_one_lwp_callback): ... this. Use the new
11290 linux_kill_one_lwp.
11291
11292 2012-02-02 Pedro Alves <palves@redhat.com>
11293
11294 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11295 inferior.
11296
11297 2012-01-27 Pedro Alves <palves@redhat.com>
11298
11299 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11300 (elf_64_file_p): Make static.
11301 (linux_pid_exe_is_elf_64_file): New.
11302 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11303 Delete declarations.
11304 (linux_pid_exe_is_elf_64_file): Declare.
11305 * linux-x86-low.c (x86_arch_setup): Use
11306 linux_pid_exe_is_elf_64_file.
11307
11308 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11309
11310 * linux-low.c (linux_wait_for_event_1): Rename to ...
11311 (linux_wait_for_event): ... here and merge it with former
11312 linux_wait_for_event - new variable wait_ptid, use it.
11313 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11314
11315 2012-01-23 Pedro Alves <palves@redhat.com>
11316
11317 * server.c (main): Avoid yet another case of infinite loop while
11318 detaching/killing after a longjmp.
11319
11320 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11321
11322 Code cleanup.
11323 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11324
11325 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11326
11327 * hostio.c (handle_readlink): New function.
11328 (handle_vFile): Call it to handle "vFile:readlink" packets.
11329
11330 2012-01-20 Pedro Alves <palves@redhat.com>
11331 Ulrich Weigand <ulrich.weigand@linaro.org>
11332
11333 * server.c (handle_v_requests): Only support vAttach and vRun to
11334 start multiple processes when in extended protocol mode.
11335
11336 2012-01-17 Pedro Alves <palves@redhat.com>
11337
11338 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11339 memalign plus mprotect to allocate the scratch buffer.
11340
11341 2012-01-13 Pedro Alves <palves@redhat.com>
11342
11343 * server.c (attach_inferior): Clear `cont_thread'.
11344
11345 2012-01-13 Pedro Alves <palves@redhat.com>
11346
11347 * server.c (main): Avoid infinite loop while detaching/killing
11348 after a longjmp.
11349
11350 2012-01-09 Doug Evans <dje@google.com>
11351
11352 * server.c (start_inferior): Set last_ptid in --wrapper case.
11353
11354 2012-01-06 Yao Qi <yao@codesourcery.com>
11355
11356 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11357 defined.
11358 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11359
11360 2012-01-04 Yao Qi <yao@codesourcery.com>
11361
11362 * tracepoint.c (cmd_qtdp): Print debug message
11363 for static tracepoint.
11364
11365 2012-01-04 Yao Qi <yao@codesourcery.com>
11366
11367 * tracepoint.c (trace_vdebug): Differentiate debug message
11368 between gdbserver and IPA.
11369
11370 2012-01-03 Yao Qi <yao@codesourcery.com>
11371
11372 * tracepoint.c (tracepoint_was_hit): Don't collect for
11373 static tracepoint.
11374
11375 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11376
11377 * terminal.h: Reformat copyright header.
11378
11379 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11380
11381 * server.c (gdbserver_version): Update copyright year.
11382 * gdbreplay.c (gdbreplay_version): Likewise.
11383
11384 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11385
11386 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11387
11388 Revert:
11389 2011-12-18 Hui Zhu <teawater@gmail.com>
11390 * linux-low.c (linux_create_inferior): Save return value to ret.
11391
11392 2011-12-18 Hui Zhu <teawater@gmail.com>
11393
11394 * linux-low.c (linux_create_inferior): Save return value to ret.
11395
11396 2011-12-16 Doug Evans <dje@google.com>
11397
11398 * linux-low.c (linux_create_inferior): If stdio connection,
11399 redirect stdin from /dev/null, stdout to stderr.
11400 * remote-utils.c (remote_is_stdio): New static global.
11401 (remote_connection_is_stdio): New function.
11402 (remote_prepare): Handle stdio connection.
11403 (remote_open): Ditto.
11404 (remote_close): Don't close stdin for stdio connections.
11405 (read_prim,write_prim): New functions. Replace all calls to
11406 read/write to these.
11407 * server.c (main): Watch for "-" argument. Move call to
11408 remote_prepare before start_inferior.
11409 * server.h (STDIO_CONNECTION_NAME): New macro.
11410 (remote_connection_is_stdio): Declare.
11411
11412 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11413 in debugging output.
11414
11415 2011-12-15 Yao Qi <yao@codesourcery.com>
11416
11417 * tracepoint.c: Include sys/syscall.h.
11418 (gdb_ust_thread): Remove preprocessor conditional.
11419
11420 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11421
11422 * linux-low.c (linux_detach_one_lwp): Call
11423 the_low_target.prepare_to_resume before detaching.
11424
11425 2011-12-14 Yao Qi <yao@codesourcery.com>
11426
11427 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11428 of write.
11429
11430 2011-12-14 Yao Qi <yao@codesourcery.com>
11431
11432 * i386-low.c (i386_low_stopped_data_address): Initialize local
11433 variable `control'.
11434
11435 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11436
11437 PR remote/13492
11438
11439 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11440 DR_CONTROL unless necessary. Extend comments.
11441 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11442 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11443
11444 2011-12-13 Yao Qi <yao@codesourcery.com>
11445
11446 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11447 macros.
11448 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11449
11450 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11451
11452 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11453 Print new debug message for such case.
11454
11455 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11456
11457 Fix overlapping memcpy.
11458 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11459 the read_inferior_memory transfer.
11460 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11461 write_inferior_memory transfer.
11462 (set_fast_tracepoint_jump): New variable buf. Use it for the
11463 read_inferior_memory and write_inferior_memory transfers.
11464 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11465 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11466 Use it for the write_inferior_memory transfer.
11467 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11468 buffers.
11469
11470 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11471
11472 * linux-low.c (fetch_register, store_register): Make code
11473 consistent, fix formatting.
11474
11475 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11476
11477 * linux-low.c (usr_store_inferior_registers): Factor out code
11478 to handle individual registers into...
11479 (store_register): ... this new function.
11480
11481 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11482
11483 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11484 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11485 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11486 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11487 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11488 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11489 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11490 (srv_xmlfiles): Add new XML files.
11491
11492 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11493 and <sys/uio.h>.
11494 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11495 (init_registers_s390_linux32v1): Add prototype.
11496 (init_registers_s390_linux32v2): Likewise.
11497 (init_registers_s390_linux64v1): Likewise.
11498 (init_registers_s390_linux64v2): Likewise.
11499 (init_registers_s390x_linux64v1): Likewise.
11500 (init_registers_s390x_linux64v2): Likewise.
11501 (s390_num_regs): Increment to 52.
11502 (s390_regmap): Add orig_r2 register.
11503 (s390_num_regs_3264): Increment to 68.
11504 (s390_regmap_3264): Add orig_r2 register.
11505 (s390_collect_ptrace_register): Handle orig_r2 register.
11506 (s390_supply_ptrace_register): Likewise.
11507 (s390_fill_last_break): New function.
11508 (s390_store_last_break): Likewise.
11509 (s390_fill_system_call): New function.
11510 (s390_store_system_call): Likewise.
11511 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11512 register sets.
11513 (s390_check_regset): New function.
11514 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11515 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11516 Update target_regsets for available register sets.
11517
11518 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11519 Jan Kratochvil <jan.kratochvil@redhat.com>
11520
11521 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11522 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11523 New.
11524 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11525 * linux-low.h (struct process_info_private): New member r_debug.
11526 * server.c (handle_qxfer_libraries): Call
11527 the_target->qxfer_libraries_svr4.
11528 (handle_qxfer_libraries_svr4): New function.
11529 (qxfer_packets): New entry "libraries-svr4".
11530 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11531 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11532 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11533 PACKET_qXfer_libraries_svr4.
11534
11535 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11536
11537 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11538 PSW address/mask between 8-byte and 16-byte formats.
11539 (s390_supply_ptrace_register): Likewise.
11540 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11541 basic addressing mode bit.
11542
11543 2011-11-24 Stan Shebs <stan@codesourcery.com>
11544
11545 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11546
11547 2011-11-17 Stan Shebs <stan@codesourcery.com>
11548
11549 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11550 (tracing_start_time): New global.
11551 (tracing_stop_time): New global.
11552 (tracing_user_name): New global.
11553 (tracing_notes): New global.
11554 (tracing_stop_note): New global.
11555 (cmd_qtstart): Set traceframe_usage, start_time.
11556 (stop_tracing): Set stop_time.
11557 (cmd_qtstatus): Report additional status.
11558 (cmd_qtp): New function.
11559 (handle_tracepoint_query): Call it.
11560 (cmd_qtnotes): New function.
11561 (handle_tracepoint_general_set): Call it.
11562 (get_timestamp): Rename from tsv_get_timestamp.
11563
11564 2011-11-14 Stan Shebs <stan@codesourcery.com>
11565 Kwok Cheung Yeung <kcy@codesourcery.com>
11566
11567 * linux-x86-low.c (small_jump_insn): New.
11568 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11569 trampoline and error message, build a trampoline and issue a small
11570 jump instruction to it.
11571 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11572 trampoline and error message.
11573 (x86_get_min_fast_tracepoint_insn_len): New.
11574 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11575 * linux-low.h (struct linux_target_ops): Add arguments to
11576 install_fast_tracepoint_jump_pad operation, add new operation.
11577 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11578 arguments.
11579 (linux_get_min_fast_tracepoint_insn_len): New function.
11580 (linux_target_op): Add new operation.
11581 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11582 (gdb_trampoline_buffer_end): Ditto.
11583 (gdb_trampoline_buffer_error): Ditto.
11584 (struct ipa_sym_addresses): Add fields for new IPA variables.
11585 (symbol_list): Add entries for new IPA variables.
11586 (struct tracepoint): Add fields to hold the address range of the
11587 trampoline used by the tracepoint.
11588 (trampoline_buffer_head): New static variable.
11589 (trampoline_buffer_tail): Ditto.
11590 (claim_trampoline_space): New function.
11591 (have_fast_tracepoint_trampoline_buffer): New function.
11592 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11593 structure.
11594 (install_fast_tracepoint): Ditto, also add error buffer argument.
11595 (cmd_qtminftpilen): New function.
11596 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11597 (fast_tracepoint_from_trampoline_address): New function.
11598 (fast_tracepoint_collecting): Handle trampoline as part of jump
11599 pad space.
11600 (set_trampoline_buffer_space): New function.
11601 (initialize_tracepoint): Initialize new IPA variables.
11602 * target.h (struct target_ops): Add arguments to
11603 install_fast_tracepoint_jump_pad operation, add new
11604 get_min_fast_tracepoint_insn_len operation.
11605 (target_get_min_fast_tracepoint_insn_len): New.
11606 (install_fast_tracepoint_jump_pad): Add arguments.
11607 * server.h (IPA_BUFSIZ): Define.
11608 * linux-i386-ipa.c: Include extra header files.
11609 (initialize_fast_tracepoint_trampoline_buffer): New function.
11610 (initialize_low_tracepoint): Call it.
11611 * server.h (set_trampoline_buffer_space): Declare.
11612 (claim_trampoline_space): Ditto.
11613 (have_fast_tracepoint_trampoline_buffer): Ditto.
11614
11615 2011-11-14 Yao Qi <yao@codesourcery.com>
11616
11617 * server.c (handle_query): Handle InstallInTrace for qSupported.
11618 * tracepoint.c (add_tracepoint): Sort list.
11619 (install_tracepoint, download_tracepoint): New.
11620 (cmd_qtdp): Call them to install and download tracepoints.
11621 (sort_tracepoints): Removed.
11622 (cmd_qtstart): Update.
11623
11624 2011-11-14 Yao Qi <yao@codesourcery.com>
11625
11626 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11627 * mem-break.h: Declare.
11628 * tracepoint.c (cmd_qtstart): Move some code to ...
11629 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11630 New.
11631 (download_tracepoints): Move some code to ...
11632 (download_tracepoint_1): ... here. New.
11633
11634 2011-11-08 Yao Qi <yao@codesourcery.com>
11635
11636 * remote-utils.c (relocate_instruction): A comment fix.
11637
11638 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11639
11640 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11641 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11642 dr_status_mirror and dr_control_mirror from debug_reg_state.
11643 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11644 (i386_initial_stuff): Remove use of deleted globals.
11645 (i386_get_thread_context, i386_set_thread_context,
11646 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11647 from debug_reg_state.
11648
11649 2011-11-05 Yao Qi <yao@codesourcery.com>
11650
11651 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11652 address as TPOINT's.
11653
11654 2011-11-02 Stan Shebs <stan@codesourcery.com>
11655
11656 * tracepoint.c (agent_mem_read_string): New function.
11657 (eval_agent_expr): Call it for tracenz.
11658 * server.c (handle_query): Report support for tracenz.
11659
11660 2011-11-02 Yao Qi <yao@codesourcery.com>
11661
11662 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11663
11664 2011-11-02 Yao Qi <yao@codesourcery.com>
11665
11666 * target.h: Fix a typo in comment.
11667
11668 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11669
11670 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11671 clobber the breakpoints' shadows with fast tracepoint jumps.
11672 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11673 * target.c (write_inferior_memory): Also pass MYADDR down to
11674 check_mem_write.
11675
11676 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11677
11678 * configure.ac: Check support for personality routine.
11679 * configure: Regenerate.
11680 * config.in: Likewise.
11681 * linux-low.c: Include <sys/personality.h>.
11682 Define ADDR_NO_RANDOMIZE if necessary.
11683 (linux_create_inferior): Disable address space randomization when
11684 forking inferior, if requested.
11685 (linux_supports_disable_randomization): New function.
11686 (linux_target_ops): Install it.
11687 * server.h (disable_randomization): Declare.
11688 * server.c (disable_randomization): New global variable.
11689 (handle_general_set): Handle QDisableRandomization.
11690 (handle_query): Likewise for qSupported.
11691 (main): Support --disable-randomization and --no-disable-randomization
11692 command line arguments.
11693 * target.h (struct target_ops): Add supports_disable_randomization.
11694 (target_supports_disable_randomization): New macro.
11695
11696 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11697
11698 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11699 ifdef check.
11700 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11701 [!PT_GETDSBT] (target_loadmap): New definition.
11702 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11703 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11704 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11705 and PT_GETDSBT to LINUX_LOADMAP.
11706 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11707 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11708
11709 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11710
11711 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11712 (arm_linux_hwbp_cap): New static variable.
11713 (arm_linux_get_hwbp_cap): Replace by ...
11714 (arm_linux_init_hwbp_cap): ... this new function.
11715 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11716 (arm_linux_get_hw_watchpoint_count): Likewise.
11717 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11718 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11719 (arm_prepare_to_resume): Use perror_with_name instead of error.
11720
11721 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11722
11723 * linux-arm-low.c: Include <signal.h>.
11724 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11725 (struct arm_linux_hwbp_cap): New data type.
11726 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11727 (struct arm_linux_hw_breakpoint): New data type.
11728 (MAX_BPTS, MAX_WPTS): Define.
11729 (struct arch_process_info, struct arch_lwp_info): New data types.
11730 (arm_linux_get_hwbp_cap): New function.
11731 (arm_linux_get_hw_breakpoint_count): Likewise.
11732 (arm_linux_get_hw_watchpoint_count): Likewise.
11733 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11734 (arm_hwbp_control_initialize): Likewise.
11735 (arm_hwbp_control_is_enabled): Likewise.
11736 (arm_hwbp_control_is_initialized): Likewise.
11737 (arm_hwbp_control_disable): Likewise.
11738 (arm_linux_hw_breakpoint_equal): Likewise.
11739 (arm_linux_hw_point_initialize): Likewise.
11740 (struct update_registers_data): New data structure.
11741 (update_registers_callback: New function.
11742 (arm_insert_point): Likewise.
11743 (arm_remove_point): Likewise.
11744 (arm_stopped_by_watchpoint): Likewise.
11745 (arm_stopped_data_address): Likewise.
11746 (arm_new_process): Likewise.
11747 (arm_new_thread): Likewise.
11748 (arm_prepare_to_resume): Likewise.
11749 (the_low_target): Register arm_insert_point, arm_remove_point,
11750 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11751 arm_new_thread, and arm_prepare_to_resume.
11752
11753 2011-09-15 Stan Shebs <stan@codesourcery.com>
11754
11755 * server.h (struct emit_ops): Add compare-goto fields.
11756 * tracepoint.c (gdb_agent_op_sizes): New table.
11757 (emit_eq_goto): New function.
11758 (emit_ne_goto): New function.
11759 (emit_lt_goto): New function.
11760 (emit_le_goto): New function.
11761 (emit_gt_goto): New function.
11762 (emit_ge_goto): New function.
11763 (is_goto_target): New function.
11764 (compile_bytecodes): Recognize special cases of compare-goto
11765 combinations and call specialized emitters for them.
11766 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11767 (amd64_emit_ne_goto): New function.
11768 (amd64_emit_lt_goto): New function.
11769 (amd64_emit_le_goto): New function.
11770 (amd64_emit_gt_goto): New function.
11771 (amd64_emit_ge_goto): New function.
11772 (amd64_emit_ops): Add the new functions.
11773 (i386_emit_eq_goto): New function.
11774 (i386_emit_ne_goto): New function.
11775 (i386_emit_lt_goto): New function.
11776 (i386_emit_le_goto): New function.
11777 (i386_emit_gt_goto): New function.
11778 (i386_emit_ge_goto): New function.
11779 (i386_emit_ops): Add the new functions.
11780
11781 2011-09-08 Stan Shebs <stan@codesourcery.com>
11782
11783 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11784 (i386_emit_epilogue): Restore %ebx.
11785
11786 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11787
11788 * server.c (step_thread): Remove definition.
11789 (process_serial_event): Don't handle Hs.
11790 * server.h (step_thread): Remove declaration.
11791 * target.c (set_desired_inferior): Remove use of step_thread.
11792
11793 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11794
11795 * linux-low.c: Include linux-procfs.h.
11796 (linux_attach_lwp_1): Update comments.
11797 (linux_attach): Scan for existing threads when attaching to a
11798 process that is the tgid.
11799 * Makefile.in: Update dependencies.
11800
11801 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11802
11803 * configure.srv: Add linux-procfs.o dependencies.
11804
11805 2011-08-14 Yao Qi <yao@codesourcery.com>
11806
11807 * target.h (struct target_ops): Fix indent.
11808 * win32-low.c (win32_target_ops): Fix comment.
11809
11810 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11811 Yao Qi <yao@codesourcery.com>
11812
11813 * Makefile.in (clean): Remove tic6x-*.c files.
11814 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11815 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11816 (tic6x-c64xp-linux.c): Likewise.
11817 * configure.srv: Add support for tic6x-*-uclinux.
11818 * linux-tic6x-low.c: New.
11819 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11820
11821 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11822 Yao Qi <yao@codesourcery.com>
11823
11824 * target.h (struct target_ops): Add read_loadmap.
11825 * linux-low.c (struct target_loadseg): New type.
11826 (struct target_loadmap): New type.
11827 (linux_read_loadmap): New function.
11828 (linux_target_ops): Add linux_read_loadmap.
11829 * server.c (handle_query): Support qXfer:fdpic:read packet.
11830 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11831 to NULL.
11832
11833 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11834
11835 * win32-low.c: Include <stdint.h>.
11836
11837 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11838
11839 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11840 to the inferior here.
11841 (i386_remove_aligned_watchpoint): Ditto.
11842 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11843 fit part of the watchpoint in the debug registers.
11844 (i386_update_inferior_debug_regs): New.
11845 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11846 registers, and only update the inferior on success.
11847 (i386_low_remove_watchpoint): Ditto.
11848
11849 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11850
11851 * linux-low.c (compare_ints, unique, list_threads, show_process,
11852 linux_core_of_thread): Delete.
11853 (linux_target_ops): Change linux_core_of_thread to
11854 linux_common_core_of_thread.
11855 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11856 * utils.c (malloc_failure): Change type of argument.
11857 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11858 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11859 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11860 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11861 (IPA_OBJS): Add common-utils-ipa.o.
11862 (ptid_h, linux_osdata_h): New macros.
11863 (server_h): Add common/common-utils.h, common/xml-utils.h,
11864 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11865 common/ptid.h.
11866 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11867 ptid.o, buffer.o): New rules.
11868 (linux-low.o): Add common/linux-osdata.h as a dependency.
11869 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11870 * configure.ac: Add AC_HEADER_DIRENT check.
11871 * config.in: Regenerate.
11872 * configure: Regenerate.
11873 * remote-utils.c (xml_escape_text): Delete.
11874 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11875 buffer_xml_printf): Move to common/buffer.c.
11876 * server.c (main): Remove call to initialize_inferiors.
11877 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11878 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11879 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11880 internal_error, gdb_assert, gdb_assert_fail): Delete.
11881 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11882 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11883 common/buffer.h.
11884 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11885 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11886 initialize_inferiors): Delete.
11887
11888 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11889
11890 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11891 symbol error.
11892
11893 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11894
11895 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11896 assertion.
11897 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11898
11899 2011-05-26 Yao Qi <yao@codesourcery.com>
11900
11901 * Makefile.in (thread-db.o): Track dependence to
11902 common/gdb_thread_db.h.
11903 * thread-db.c: include gdb_thread_db.h from right place.
11904
11905 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11906
11907 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11908 __FILE__ and __LINE__ to internal_error.
11909
11910 2011-05-13 Doug Evans <dje@google.com>
11911
11912 * thread-db.c (try_thread_db_load_from_sdir): New function.
11913 (try_thread_db_load_from_dir): New function.
11914 (thread_db_load_search): Handle $sdir, ignore $pdir.
11915 Remove trying of system directories if search of
11916 libthread-db-search-path fails, that is now done via $sdir.
11917
11918 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11919
11920 * server.c (handle_query): Add EnableDisableTracepoints to the list
11921 of supported features.
11922 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11923 tracepoints.
11924 (cmd_qtenable_disable): New.
11925 (cmd_qtstart): Install tracepoints even if disabled.
11926 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11927 receiving a QTEnable or QTDisable packet.
11928 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11929 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11930 tracepoints.
11931 (gdb_probe): Skip data collection if static tracepoint is disabled.
11932
11933 2011-05-10 Doug Evans <dje@google.com>
11934
11935 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11936
11937 2011-05-04 Doug Evans <dje@google.com>
11938
11939 * linux-low.c (linux_join): Skip process lookup.
11940 * spu-low.c (spu_join): Ditto.
11941 * server.c (join_inferiors_callback): Delete.
11942 (process_serial_event): For 'D' packet (detach) call join_inferior
11943 directly.
11944
11945 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11946
11947 * README: Don't mention xscale*-*-linux*.
11948 * configure.srv (xscale*-*-linux*): Don't handle target.
11949
11950 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11951
11952 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11953 casting pointers.
11954 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11955 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11956 (i386_emit_void_call_2): Likewise.
11957
11958 2011-04-26 Yao Qi <yao@codesourcery.com>
11959
11960 * linux-low.c: Move common macros to linux-ptrace.h.
11961 Include linux-ptrace.h.
11962 * Makefile.in (linux_ptrace_h): New.
11963 (linux-low.o): Depends on linux-ptrace.h.
11964
11965 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11966
11967 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11968 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11969 (remote_prepare): New function with most of the TCP code from ...
11970 (remote_open): ... here. Detect PORT here unconditionally. Move also
11971 setting transport_is_reliable.
11972 * server.c (run_once): New variable.
11973 (gdbserver_usage): Document it.
11974 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11975 the first run if RUN_ONCE.
11976 * server.h (run_once, remote_prepare): New declarations.
11977
11978 2011-04-19 Tom Tromey <tromey@redhat.com>
11979
11980 * win32-low.c (handle_load_dll): Remove duplicate "the".
11981
11982 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11983
11984 Remove support for old Cygwin 1.5 versions.
11985 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11986 function to avoid warning.
11987 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11988 warning.
11989
11990 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11991
11992 * gdbserver/server.h (Macro _): Define it if not available.
11993
11994 2011-03-14 Michael Snyder <msnyder@vmware.com>
11995
11996 * hostio.c (handle_close): Remove unnecessary null test.
11997
11998 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11999
12000 * Makefile.in (maintainer-clean realclean distclean): Remove
12001 "make ... subdir_do" command.
12002
12003 2011-03-10 Michael Snyder <msnyder@vmware.com>
12004
12005 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12006
12007 * server.c (handle_v_run): Free alloced buffer on early return.
12008
12009 2011-03-09 Yao Qi <yao@codesourcery.com>
12010
12011 Revert:
12012 2011-03-04 Yao Qi <yao@codesourcery.com>
12013
12014 * Makefile.in: Remove GNU make feature --directory.
12015
12016 2011-03-05 Yao Qi <yao@codesourcery.com>
12017
12018 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12019 (subdir_do): New make target. Copied from gdb/Makefile.
12020 (maintainer-clean, realclean, distclean, clean): Call corresponding
12021 make targets in common/Makefile.
12022
12023 2011-02-11 Yao Qi <yao@codesourcery.com>
12024
12025 * configure.ac: Call AC_PROG_RANLIB.
12026 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12027 * configure: Regenerate.
12028
12029 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12030
12031 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12032
12033 2011-03-06 Yao Qi <yao@codesourcery.com>
12034
12035 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12036
12037 2011-03-05 Yao Qi <yao@codesourcery.com>
12038
12039 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12040 (subdir_do): New make target. Copied from gdb/Makefile.
12041 (maintainer-clean, realclean, distclean, clean): Call corresponding
12042 make targets in common/Makefile.
12043
12044 2011-03-04 Yao Qi <yao@codesourcery.com>
12045
12046 * Makefile.in: Remove GNU make feature --directory.
12047
12048 2011-03-04 Michael Snyder <msnyder@vmware.com>
12049
12050 * server.c (queue_stop_reply): Call xmalloc not malloc.
12051
12052 2011-03-02 Michael Snyder <msnyder@vmware.com>
12053
12054 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12055
12056 2011-02-28 Michael Snyder <msnyder@vmware.com>
12057
12058 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12059 (cmd_qtframe): Ditto.
12060 (cmd_qtbuffer): Ditto.
12061 (cmd_bigqtbuffer): Ditto.
12062
12063 * utils.c (decimal2str): Initialize 'width' to nine, then
12064 don't mess with it.
12065
12066 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12067
12068 * hostio.c (require_data): Free *data, not data.
12069
12070 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12071
12072 * hostio.c (require_data): Use free, not xfree.
12073
12074 2011-02-27 Michael Snyder <msnyder@vmware.com>
12075
12076 * server.c (handle_query): Discard unused value.
12077
12078 * hostio.c (require_data): Free malloc memory before returning
12079 error.
12080
12081 2011-02-26 Michael Snyder <msnyder@vmware.com>
12082
12083 * linux-low.c (list_threads): Call closedir for dirent.
12084
12085 2011-02-27 Michael Snyder <msnyder@vmware.com>
12086
12087 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12088 a case statement falls through.
12089
12090 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12091
12092 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12093 in comparison.
12094
12095 2011-02-26 Michael Snyder <msnyder@vmware.com>
12096
12097 * utils.c (decimal2str): Eliminate dead code and dead param.
12098 (pulongest): Drop dead param from call to decimal2str.
12099 (plongest): Ditto.
12100
12101 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12102
12103 Revert the following patch (not approved yet):
12104 2011-02-21 Hui Zhu <teawater@gmail.com>
12105 * tracepoint.c (tp_printf): New function.
12106 (eval_agent_expr): Handle gdb_agent_op_printf.
12107
12108 2011-02-21 Hui Zhu <teawater@gmail.com>
12109
12110 * tracepoint.c (tp_printf): New function.
12111 (eval_agent_expr): Handle gdb_agent_op_printf.
12112
12113 2011-02-18 Tom Tromey <tromey@redhat.com>
12114
12115 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12116 (tracepoint.o): Likewise.
12117 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12118 (gdb_agent_op_names): Likewise.
12119
12120 2011-02-18 Tom Tromey <tromey@redhat.com>
12121
12122 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12123 gdb_agent_op_rot>: New constants.
12124 (gdb_agent_op_names): Add pick and roll.
12125 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12126 cases.
12127
12128 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12129
12130 * aclocal.m4: Regenerated with aclocal-1.11.1.
12131
12132 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12133
12134 * server.c (handle_qxfer_traceframe_info): New.
12135 (qxfer_packets): Register "traceframe-info".
12136 (handle_query): Report support for qXfer:traceframe-info:read+.
12137 * tracepoint.c (match_blocktype): New.
12138 (traceframe_find_block_type): Rename to ...
12139 (traceframe_walk_blocks): ... this. Add callback filter argument,
12140 and use it.
12141 (traceframe_find_block_type): New, reimplemented on top of
12142 traceframe_walk_blocks.
12143 (build_traceframe_info_xml): New.
12144 (traceframe_read_info): New.
12145 * server.h (traceframe_read_info): Declare.
12146
12147 2011-02-11 Yao Qi <yao@codesourcery.com>
12148
12149 * configure.ac: Call AC_PROG_RANLIB.
12150 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12151 * configure: Regenerate.
12152
12153 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12154
12155 * server.c (gdb_read_memory): Change return semantics to allow
12156 partial transfers.
12157 (handle_search_memory_1): Adjust.
12158 (process_serial_event) <'m' packet>: Handle partial transfers.
12159 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12160
12161 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12162
12163 * regcache.c (init_register_cache): Initialize
12164 regcache->register_status.
12165 (free_register_cache): Release regcache->register_status.
12166 (regcache_cpy): Copy register_status.
12167 (registers_to_string): Print 'x's for unavailable registers.
12168 (supply_register): Mark the register's status valid or
12169 unavailable, depending on whether a buffer was passed in or not.
12170 (supply_register_zeroed): New.
12171 (supply_regblock): Mark the registers' status valid or
12172 unavailable, depending on whether a buffer was passed in or not.
12173 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12174 (struct regcache): New `register_status' field.
12175 (supply_register_zeroed): Declare.
12176 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12177 supply_register_zeroed, rather than passing a NULL buffer to
12178 supply_register.
12179 * tracepoint.c (fetch_traceframe_registers): Update comment.
12180
12181 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12182
12183 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12184 buffer explicit.
12185
12186 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12187
12188 * server.h (decode_xfer_write): Change prototype.
12189 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12190 and don't extract the annex here.
12191 * server.c (decode_xfer_read): Remove `annex' parameter,
12192 and don't extract the annex here.
12193 (decode_xfer): New.
12194 (struct qxfer): New.
12195 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12196 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12197 (handle_qxfer_statictrace): New functions, abstracted out from
12198 handle_query, and made to use the struct qxfer interface.
12199 (handle_threads_qxfer_proper): Rename to ...
12200 (handle_qxfer_threads_proper): ... this.
12201 (handle_threads_qxfer): Rename to ...
12202 (handle_qxfer_threads): ... this. Adjust.
12203 (qxfer_packets): New array.
12204 (handle_qxfer): New function.
12205 (handle_query): Use handle_qxfer.
12206
12207 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12208
12209 * gdbreplay.c: Shorten lines of >= 80 columns.
12210 * linux-low.c: Ditto.
12211 * linux-ppc-low.c: Ditto.
12212 * linux-s390-low.c: Ditto.
12213 * linux-sparc-low.c: Ditto.
12214 * linux-x86-low.c: Ditto.
12215 * linux-xtensa-low.c: Ditto.
12216 * mem-break.c: Ditto.
12217 * nto-low.c: Ditto.
12218 * regcache.h: Ditto.
12219 * remote-utils.c: Ditto.
12220 * server.c: Ditto.
12221 * server.h: Ditto.
12222 * thread-db.c: Ditto.
12223 * tracepoint.c: Ditto.
12224 * utils.c: Ditto.
12225 * win32-low.h: Ditto.
12226
12227 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12228
12229 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12230 update.
12231
12232 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12233
12234 * server.c (gdbserver_version): Update copyright year in version
12235 output.
12236 * gdbreplay.c (gdbreplay_version): Ditto.
12237
12238 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12239
12240 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12241 * linux-bfin-low.c: New file.
12242 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12243 PT_DATA_ADDR for BFIN targets.
12244 * Makefile.in (SFILES): Add linux-bfin-low.c.
12245 (clean): Remove reg-bfin.c.
12246 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12247 * README: Mention supported Blackfin targets.
12248
12249 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12250
12251 * .gitignore: New file.
12252
12253 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12254
12255 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12256
12257 2010-10-22 Jie Zhang <jie@codesourcery.com>
12258
12259 * Makefile.in: Add FLAGS_TO_PASS variable.
12260 (install): Remove dependency of install-only and recursively
12261 invoke make for install-only.
12262
12263 2010-10-04 Doug Evans <dje@google.com>
12264
12265 * Makefile.in (uninstall): Use $(DESTDIR).
12266
12267 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12268
12269 PR gdb/11842
12270
12271 * linux-x86-low.c (compat_siginfo_from_siginfo)
12272 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12273 si_code is < 0. Check for si_code == SI_TIMER before checking for
12274 si_code < 0.
12275
12276 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12277
12278 * lynx-i386-low.c: New file.
12279 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12280
12281 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12282
12283 * lynx-low.c (ptrace_request_to_str): Remove handling for
12284 request values that have been removed in LynxOS 5.x.
12285
12286 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12287
12288 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12289 <ptrace.h>
12290
12291 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12292
12293 * configure.ac: Add --enable-inprocess-agent option.
12294 * configure: Rebuilt.
12295
12296 2010-09-06 Yao Qi <yao@codesourcery.com>
12297
12298 * linux-low.c (linux_kill): Remove unused variable.
12299 (linux_stabilize_threads): Likewise.
12300 * server.c (start_inferior): Likewise.
12301 (queue_stop_reply_callback): Likewise.
12302 * tracepoint.c (do_action_at_tracepoint): Likewise.
12303
12304 2010-09-06 Yao Qi <yao@codesourcery.com>
12305
12306 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12307 on return.
12308
12309 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12310
12311 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12312
12313 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12314
12315 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12316 "$(IPA_DEPFILES)".
12317
12318 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12319
12320 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12321 gdbserver/lynx-ppc-low.c: New files.
12322 * Makefile.in (lynx_low_h): New variable.
12323 (lynx-low.o, lynx-ppc-low.o): New rules.
12324 * configure.ac: On LynxOS, link with -lnetinet.
12325 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12326 * configure: regenerate.
12327
12328 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12329
12330 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12331 * configure.ac: Add check for vasprintf and vsnprintf.
12332 * configure, config.in: Regenerate.
12333 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12334
12335 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12336
12337 * gdbreplay.c: Move include of alloca.h up, next to include of
12338 malloc.h.
12339 * server.h: Add include of malloc.h.
12340 * mem-break.c: Remove include of malloc.h.
12341 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12342
12343 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12344
12345 * Makefile.in (memmem.o): Build with -Wno-error.
12346
12347 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12348
12349 * utils.c (xsnprintf): Make non-static.
12350 * server.h: Add xsnprintf declaration.
12351 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12352 replace calls to snprintf by calls to xsnprintf throughout.
12353
12354 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12355
12356 * configure.ac: Add configure check for alloca.
12357 * configure, config.in: Regenerate.
12358 * server.h: Include alloca.h if it exists.
12359 * gdbreplay.c: Include alloca.h if it exists.
12360
12361 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12362
12363 * linux-low.c (__SIGRTMIN): Define if not already defined.
12364 (linux_create_inferior): Check for __ANDROID__ rather than
12365 __SIGRTMIN.
12366 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12367 are already deferred.
12368 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12369 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12370 stopped and already has a pending signal to report.
12371 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12372 a pending signal to report or is moving out of a jump pad.
12373 (linux_init_signals): Check for __ANDROID__ rather than
12374 __SIGRTMIN.
12375
12376 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12377
12378 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12379 debug_threads check. Avoid a linear search when not doing debug
12380 output.
12381
12382 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12383
12384 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12385 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12386 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12387 (process_event): Change local fd's type to gdb_fildes_t.
12388 (create_file_handler): Adjust prototype.
12389 (delete_file_handler): Adjust prototype.
12390 (handle_file_event): Adjust prototype. Use pfildes.
12391 (create_file_event): Adjsut prototype.
12392 * remote-utils.c (remote_desc, listen_desc): Change type to
12393 gdb_fildes_t.
12394 * server.h: New gdb_fildes_t typedef.
12395 [USE_WIN32API]: Include winsock2.h.
12396 (delete_file_handler, add_file_handler): Adjust prototypes.
12397 (pfildes): Declare.
12398 * utils.c (pfildes): New.
12399
12400 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12401
12402 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12403 * configure: Regenerate.
12404
12405 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12406
12407 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12408 (linux_done_accessing_memory): ... this.
12409 (linux_target_ops): Adjust.
12410 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12411 * nto-low.c (nto_target_ops): Adjust comment.
12412 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12413 * spu-low.c (spu_target_ops): Adjust comment.
12414 * target.h (target_ops): Rename unprepare_to_access_memory field
12415 to done_accessing_memory.
12416 (unprepare_to_access_memory): Rename to ...
12417 (done_accessing_memory): ... this.
12418
12419 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12420
12421 * linux-low.c (linux_prepare_to_access_memory): New.
12422 (linux_unprepare_to_access_memory): New.
12423 (linux_target_ops): Install them.
12424 * server.c (read_memory): Rename to ...
12425 (gdb_read_memory): ... this. Use
12426 prepare_to_access_memory/prepare_to_access_memory.
12427 (write_memory): Rename to ...
12428 (gdb_write_memory): ... this. Use
12429 prepare_to_access_memory/prepare_to_access_memory.
12430 (handle_search_memory_1): Adjust.
12431 (process_serial_event): Adjust.
12432 * target.h (struct target_ops): New fields
12433 prepare_to_access_memory and unprepare_to_access_memory.
12434 (prepare_to_access_memory, unprepare_to_access_memory): New.
12435 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12436 prepare_to_access_memory/prepare_to_access_memory.
12437 * nto-low.c (nto_target_ops): Adjust.
12438 * spu-low.c (spu_target_ops): Adjust.
12439 * win32-low.c (win32_target_ops): Adjust.
12440
12441 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12442
12443 * Makefile.in (WARN_CFLAGS): Get it from configure.
12444 (WERROR_CFLAGS): New.
12445 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12446 * configure.ac: Introduce --enable-werror, which adds -Werror to
12447 the compiler command line. Enabled by default. Disable with
12448 --disable-werror. Add -Wdeclaration-after-statement
12449 Wpointer-arith and -Wformat-nonliteral to warning flags.
12450 * configure: Regenerate.
12451
12452 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12453
12454 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12455
12456 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12457
12458 * gdbreplay.c (remote_error): New.
12459 (gdbchar): New.
12460 (expect): Use gdbchar. Check for error reading from GDB.
12461 Clarify sync error output.
12462 (play): Check for errors writing to GDB.
12463 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12464 * remote-utils.c (getpkt): Check for errors writing to the remote
12465 descriptor.
12466
12467 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12468
12469 * linux-low.c (linux_wait_1): Move non-debugging code out of
12470 `debug_threads' control.
12471
12472 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12473
12474 * linux-low.c (linux_wait_1): Don't set last_status here.
12475 * server.c (push_event, queue_stop_reply_callback): Assert we're
12476 not pushing a TARGET_WAITKIND_IGNORE event.
12477 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12478 (myresume, handle_target_event): Set the thread's last_resume_kind
12479 and last_status from the target returned status.
12480
12481 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12482
12483 PR threads/10729
12484
12485 * linux-x86-low.c (update_debug_registers_callback): New.
12486 (i386_dr_low_set_addr): Use it.
12487 (i386_dr_low_get_addr): New.
12488 (i386_dr_low_set_control): Use update_debug_registers_callback.
12489 (i386_dr_low_get_control): New.
12490 (i386_dr_low_get_status): Adjust.
12491 * linux-low.c (linux_stop_lwp): New.
12492 * linux-low.h (linux_stop_lwp): Declare.
12493
12494 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12495 argument instead of a i386_debug_reg_state.
12496 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12497 a i386_debug_reg_state.
12498 (i386_insert_aligned_watchpoint): Adjust.
12499 (i386_remove_aligned_watchpoint): Adjust.
12500 (i386_low_stopped_data_address): Read the debug registers from the
12501 inferior instead of from the mirrors.
12502 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12503 (i386_dr_low_get_addr): Declare.
12504 (i386_dr_low_get_control): Declare.
12505 (i386_dr_low_get_status): Change prototype.
12506
12507 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12508 (i386_dr_low_get_addr): New.
12509 (i386_dr_low_get_control): New.
12510 (i386_dr_low_get_status): Adjust prototype. Return
12511 dr_status_mirror.
12512 (i386_initial_stuff): Clear dr_status_mirror and
12513 dr_control_mirror.
12514 (i386_get_thread_context): Adjust.
12515 (i386_set_thread_context): Adjust.
12516 (i386_thread_added): Adjust.
12517
12518 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12519
12520 * linux-low.h (linux_thread_area): Delete declaration.
12521
12522 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12523
12524 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12525 after its termination.
12526
12527 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12528
12529 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12530 (gdb_wants_all_stopped): Delete.
12531 (linux_wait_1): Don't call them.
12532 * server.c (handle_v_cont): Tag all threads as want-stopped.
12533 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12534 stopped as "client-wants-stopped".
12535
12536 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12537
12538 * Makefile.in (signals_h): New.
12539 (server_h): Depend on it.
12540 (server.o): Don't depend on $(signals_def).
12541 (signals.o): Depend on $(signals_def).
12542
12543 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12544
12545 * Makefile.in (signals_def): New.
12546 (server_h): Append include/gdb/signals.h and signals_def.
12547 (server.o): Append signals_def.
12548
12549 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12550
12551 * server.c (handle_target_event): Use target_signal_to_host for
12552 resume_info.sig initialization.
12553 * target.h (struct thread_resume) <sig>: New comment.
12554
12555 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12556
12557 * server.c (handle_query): strcpy() the returned string from paddress()
12558 instead of sprintf().
12559 * utils.c (paddress): Return phex_nz().
12560
12561 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12562
12563 * server.c (handle_v_cont): Call mourn_inferior if process
12564 just exited.
12565 (myresume): Likewise.
12566
12567 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12568
12569 Static tracepoints, and integration with UST.
12570
12571 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12572 * mem-break.c (uninsert_all_breakpoints)
12573 (reinsert_all_breakpoints): New.
12574 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12575 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12576 (gdb_agent_ust_loaded, helper_thread_id)
12577 (gdb_agent_helper_thread_id): New macros.
12578 (struct ipa_sym_addresses): Add addr_ust_loaded,
12579 addr_helper_thread_id, addr_cmd_buf.
12580 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12581 (in_process_agent_loaded_ust): New.
12582 (write_e_ust_not_loaded): New.
12583 (maybe_write_ipa_ust_not_loaded): New.
12584 (struct collect_static_trace_data_action): New.
12585 (enum tracepoint_type) <static_tracepoint>: New.
12586 (struct tracepoint) <handle>: Mention static tracepoints.
12587 (struct static_tracepoint_ctx): New.
12588 (CMD_BUF_SIZE): New.
12589 (add_tracepoint_action): Handle static tracepoint actions.
12590 (unprobe_marker_at): New.
12591 (clear_installed_tracepoints): Handle static tracepoints.
12592 (cmd_qtdp): Handle static tracepoints.
12593 (probe_marker_at): New.
12594 (cmd_qtstart): Handle static tracepoints.
12595 (response_tracepoint): Handle static tracepoints.
12596 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12597 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12598 (get_context_regcache): Handle static tracepoints.
12599 (do_action_at_tracepoint): Handle static tracepoint actions.
12600 (traceframe_find_block_type): Handle static trace data blocks.
12601 (traceframe_read_sdata): New.
12602 (download_tracepoints): Download static tracepoint actions.
12603 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12604 (GDB_PROBE_NAME): New.
12605 (ust_ops): New.
12606 (GET_UST_SYM): New.
12607 (USTF): New.
12608 (dlsym_ust): New.
12609 (ust_marker_to_static_tracepoint): New.
12610 (gdb_probe): New.
12611 (collect_ust_data_at_tracepoint): New.
12612 (gdb_ust_probe): New.
12613 (UNIX_PATH_MAX, SOCK_DIR): New.
12614 (gdb_ust_connect_sync_socket): New.
12615 (resume_thread, stop_thread): New.
12616 (run_inferior_command): New.
12617 (init_named_socket): New.
12618 (gdb_ust_socket_init): New.
12619 (cstr_to_hexstr): New.
12620 (next_st): New.
12621 (first_marker, next_marker): New.
12622 (response_ust_marker): New.
12623 (cmd_qtfstm, cmd_qtsstm): New.
12624 (unprobe_marker_at, probe_marker_at): New.
12625 (cmd_qtstmat, gdb_ust_thread): New.
12626 (gdb_ust_init): New.
12627 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12628 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12629 (ST_REGENTRY): New.
12630 (x86_64_st_collect_regmap): New.
12631 (X86_64_NUM_ST_COLLECT_GREGS): New.
12632 (AMD64_RIP_REGNUM): New.
12633 (supply_static_tracepoint_registers): New.
12634 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12635 (ST_REGENTRY): New.
12636 (i386_st_collect_regmap): New.
12637 (i386_NUM_ST_COLLECT_GREGS): New.
12638 (supply_static_tracepoint_registers): New.
12639 * server.c (handle_query): Handle qXfer:statictrace:read.
12640 <qSupported>: Report support for StaticTracepoints, and
12641 qXfer:statictrace:read features.
12642 * server.h (traceframe_read_sdata)
12643 (supply_static_tracepoint_registers): Declare.
12644 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12645 (unpack_varlen_hex): Include in IPA build.
12646 * Makefile.in (ustlibs, ustinc): New.
12647 (IPA_OBJS): Add remote-utils-ipa.o.
12648 ($(IPA_LIB)): Link -ldl and -lpthread.
12649 (UST_CFLAGS): New.
12650 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12651 * config.in, configure: Regenerate.
12652
12653 2010-06-20 Ian Lance Taylor <iant@google.com>
12654 Pedro Alves <pedro@codesourcery.com>
12655
12656 * linux-x86-low.c (always_true): Delete.
12657 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12658 trying to fool the compiler with always_true.
12659
12660 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12661
12662 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12663 conditions in gdbserver.
12664
12665 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12666
12667 * spu-low.c (spu_read_memory): Wrap around local store limit.
12668 (spu_write_memory): Likewise.
12669
12670 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12671
12672 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12673 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12674 LONGEST uses.
12675 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12676 uses.
12677 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12678 uses with LONGEST uses.
12679
12680 2010-06-14 Stan Shebs <stan@codesourcery.com>
12681 Pedro Alves <pedro@codesourcery.com>
12682
12683 Bytecode compiler.
12684
12685 * linux-x86-low.c: Include limits.h.
12686 (add_insns): New.
12687 (always_true): New.
12688 (EMIT_ASM): New.
12689 (EMIT_ASM32): New.
12690 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12691 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12692 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12693 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12694 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12695 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12696 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12697 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12698 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12699 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12700 (amd64_emit_void_call_2): New.
12701 (amd64_emit_ops): New.
12702 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12703 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12704 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12705 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12706 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12707 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12708 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12709 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12710 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12711 (i386_emit_stack_adjust, i386_emit_int_call_1)
12712 (i386_emit_void_call_2): New.
12713 (i386_emit_ops): New.
12714 (x86_emit_ops): New.
12715 (the_low_target): Install x86_emit_ops.
12716 * server.h (struct emit_ops): New.
12717 (get_raw_reg_func_addr): Declare.
12718 (current_insn_ptr, emit_error): Declare.
12719 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12720 (set_trace_state_variable_value): New defines.
12721 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12722 addr_get_trace_state_variable_value and
12723 addr_set_trace_state_variable_value.
12724 (symbol_list): New fields for get_raw_reg,
12725 get_trace_state_variable_value and set_trace_state_variable_value.
12726 (condfn): New typedef.
12727 (struct tracepoint): New field `compiled_cond'.
12728 (do_action_at_tracepoint): Clear compiled_cond.
12729 (get_trace_state_variable_value, set_trace_state_variable_value):
12730 Export in the IPA.
12731 (condition_true_at_tracepoint): If there's a compiled condition,
12732 run that.
12733 (current_insn_ptr, emit_error): New globals.
12734 (struct bytecode_address): New.
12735 (get_raw_reg_func_addr): New.
12736 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12737 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12738 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12739 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12740 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12741 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12742 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12743 (compile_tracepoint_condition, compile_bytecodes): New.
12744 * target.h (emit_ops): Forward declare.
12745 (struct target_ops): New field emit_ops.
12746 (target_emit_ops): New.
12747 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12748 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12749 * linux-low.c (linux_emit_ops): New.
12750 (linux_target_ops): Install it.
12751 * linux-low.h (struct linux_target_ops): New field emit_ops.
12752
12753 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12754
12755 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12756 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12757
12758 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12759 Stan Shebs <stan@codesourcery.com>
12760
12761 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12762 (all): Depend on $(extra_libraries).
12763 (install-only): Install the IPA.
12764 (IPA_OBJS, IPA_LIB): New.
12765 (clean): Remove the IPA lib.
12766 (IPAGENT_CFLAGS): New.
12767 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12768 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12769 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12770 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12771 * configure.ac: Check for atomic builtins support in the compiler.
12772 (IPA_DEPFILES, extra_libraries): Define.
12773 * configure.srv (ipa_obj): Add description.
12774 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12775 (i[34567]86-*-linux*): Set ipa_obj.
12776 (x86_64-*-linux*): Set ipa_obj.
12777 * linux-low.c (stabilizing_threads): New.
12778 (supports_fast_tracepoints): New.
12779 (linux_detach): Stabilize threads before detaching.
12780 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12781 the lwp is either not stabilizing, or is moving out of a jump pad.
12782 (linux_fast_tracepoint_collecting): New.
12783 (maybe_move_out_of_jump_pad): New.
12784 (enqueue_one_deferred_signal): New.
12785 (dequeue_one_deferred_signal): New.
12786 (linux_wait_for_event_1): If moving out of a jump pad, defer
12787 pending signals to later.
12788 (linux_stabilize_threads): New.
12789 (linux_wait_1): Check if threads need moving out of jump pads, and
12790 do it if so.
12791 (stuck_in_jump_pad_callback): New.
12792 (move_out_of_jump_pad_callback): New.
12793 (lwp_running): New.
12794 (linux_resume_one_lwp): Handle moving out of jump pads.
12795 (linux_set_resume_request): Dequeue deferred signals.
12796 (need_step_over_p): Also step over fast tracepoint jumps.
12797 (start_step_over): Also uninsert fast tracepoint jumps.
12798 (finish_step_over): Also reinsert fast tracepoint jumps.
12799 (linux_install_fast_tracepoint_jump): New.
12800 (linux_target_ops): Install linux_stabilize_threads and
12801 linux_install_fast_tracepoint_jump_pad.
12802 * linux-low.h (linux_target_ops) <get_thread_area,
12803 install_fast_tracepoint_jump_pad>: New fields.
12804 (struct lwp_info) <collecting_fast_tracepoint,
12805 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12806 (linux_get_thread_area): Declare.
12807 * linux-x86-low.c (jump_insn): New.
12808 (x86_get_thread_area): New.
12809 (append_insns): New.
12810 (push_opcode): New.
12811 (amd64_install_fast_tracepoint_jump_pad): New.
12812 (i386_install_fast_tracepoint_jump_pad): New.
12813 (x86_install_fast_tracepoint_jump_pad): New.
12814 (the_low_target): Install x86_get_thread_area and
12815 x86_install_fast_tracepoint_jump_pad.
12816 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12817 (struct fast_tracepoint_jump): New.
12818 (fast_tracepoint_jump_insn): New.
12819 (fast_tracepoint_jump_shadow): New.
12820 (find_fast_tracepoint_jump_at): New.
12821 (fast_tracepoint_jump_here): New.
12822 (delete_fast_tracepoint_jump): New.
12823 (set_fast_tracepoint_jump): New.
12824 (uninsert_fast_tracepoint_jumps_at): New.
12825 (reinsert_fast_tracepoint_jumps_at): New.
12826 (set_breakpoint_at): Use write_inferior_memory.
12827 (uninsert_raw_breakpoint): Use write_inferior_memory.
12828 (check_mem_read): Mask out fast tracepoint jumps.
12829 (check_mem_write): Mask out fast tracepoint jumps.
12830 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12831 (set_fast_tracepoint_jump): Declare.
12832 (delete_fast_tracepoint_jump)
12833 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12834 (reinsert_fast_tracepoint_jumps_at): Declare.
12835 * regcache.c: Don't compile many functions when building the
12836 in-process agent library.
12837 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12838 the register buffer in the heap.
12839 (free_register_cache): If the register buffer isn't owned by the
12840 regcache, don't free it.
12841 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12842 pre-existing register caches.
12843 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12844 type.
12845 (convert_ascii_to_int): : Constify `from' parameter type.
12846 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12847 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12848 the needed buffer in-place.
12849 (relocate_instruction): New.
12850 * server.c (handle_query) <qSymbols>: If the target supports
12851 tracepoints, give it a chance of looking up symbols. Report
12852 support for fast tracepoints.
12853 (handle_status): Stabilize threads.
12854 (process_serial_event): Adjust.
12855 * server.h (struct fast_tracepoint_jump): Forward declare.
12856 (struct process_info) <fast_tracepoint_jumps>: New field.
12857 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12858 (decode_X_packet, decode_M_packet): Adjust.
12859 (relocate_instruction): Declare.
12860 (in_process_agent_loaded): Declare.
12861 (tracepoint_look_up_symbols): Declare.
12862 (struct fast_tpoint_collect_status): Declare.
12863 (fast_tracepoint_collecting): Declare.
12864 (force_unlock_trace_buffer): Declare.
12865 (handle_tracepoint_bkpts): Declare.
12866 (initialize_low_tracepoint)
12867 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12868 * target.h (struct target_ops) <stabilize_threads,
12869 install_fast_tracepoint_jump_pad>: New fields.
12870 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12871 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12872 [HAVE_STDINT_H]: Include stdint.h.
12873 (trace_debug_1): Rename to ...
12874 (trace_vdebug): ... this.
12875 (trace_debug): Rename to ...
12876 (trace_debug_1): ... this. Add `level' parameter.
12877 (trace_debug): New.
12878 (ATTR_USED, ATTR_NOINLINE): New.
12879 (IP_AGENT_EXPORT): New.
12880 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12881 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12882 (about_to_request_buffer_space, trace_buffer_is_full)
12883 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12884 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12885 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12886 (traceframe_write_count, traceframes_created)
12887 (trace_state_variables)
12888 New renaming defines.
12889 (struct ipa_sym_addresses): New.
12890 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12891 (symbol_list): New.
12892 (ipa_sym_addrs): New.
12893 (all_tracepoint_symbols_looked_up): New.
12894 (in_process_agent_loaded): New.
12895 (write_e_ipa_not_loaded): New.
12896 (maybe_write_ipa_not_loaded): New.
12897 (tracepoint_look_up_symbols): New.
12898 (debug_threads) [IN_PROCESS_AGENT]: New.
12899 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12900 (UNKNOWN_SIDE_EFFECTS): New.
12901 (stop_tracing): New.
12902 (flush_trace_buffer): New.
12903 (stop_tracing_bkpt): New.
12904 (flush_trace_buffer_bkpt): New.
12905 (read_inferior_integer): New.
12906 (read_inferior_uinteger): New.
12907 (read_inferior_data_pointer): New.
12908 (write_inferior_data_pointer): New.
12909 (write_inferior_integer): New.
12910 (write_inferior_uinteger): New.
12911 (struct collect_static_trace_data_action): Delete.
12912 (enum tracepoint_type): New.
12913 (struct tracepoint) <type>: New field `type'.
12914 <actions_str, step_actions, step_actions_str>: Only include in
12915 GDBserver.
12916 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12917 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12918 (tracepoints): Use IP_AGENT_EXPORT.
12919 (last_tracepoint): Don't include in the IPA.
12920 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12921 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12922 (alloced_trace_state_variables): New.
12923 (trace_state_variables): Use IP_AGENT_EXPORT.
12924 (traceframe_t): Delete unused variable.
12925 (circular_trace_buffer): Don't include in the IPA.
12926 (trace_buffer_start): Delete.
12927 (struct trace_buffer_control): New.
12928 (trace_buffer_free): Delete.
12929 (struct ipa_trace_buffer_control): New.
12930 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12931 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12932 New.
12933 (trace_buffer_ctrl): New.
12934 (TRACE_BUFFER_CTRL_CURR): New.
12935 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12936 Reimplement as macros.
12937 (trace_buffer_wrap): Delete.
12938 (traceframe_write_count, traceframe_read_count)
12939 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12940 (struct tracepoint_hit_ctx) <type>: New field.
12941 (struct fast_tracepoint_ctx): New.
12942 (memory_barrier): New.
12943 (cmpxchg): New.
12944 (record_tracepoint_error): Update atomically in the IPA.
12945 (clear_inferior_trace_buffer): New.
12946 (about_to_request_buffer_space): New.
12947 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12948 updating the same buffer.
12949 (add_tracepoint): Default the tracepoint's type to trap
12950 tracepoint, and orig_size to -1.
12951 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12952 internal variables.
12953 (create_trace_state_variable): New parameter `gdb'. Handle it.
12954 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12955 (cmd_qtdp): Handle fast tracepoints.
12956 (cmd_qtdv): Adjust.
12957 (max_jump_pad_size): New.
12958 (gdb_jump_pad_head): New.
12959 (get_jump_space_head): New.
12960 (claim_jump_space): New.
12961 (sort_tracepoints): New.
12962 (MAX_JUMP_SIZE): New.
12963 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12964 IPA.
12965 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12966 support. Upload fast traceframes, and delete internal IPA
12967 breakpoints.
12968 (stop_tracing_handler): New.
12969 (flush_trace_buffer_handler): New.
12970 (cmd_qtstop): Upload fast tracepoints.
12971 (response_tracepoint): Handle fast tracepoints.
12972 (tracepoint_finished_step): Upload fast traceframes. Set the
12973 tracepoint hit context's tracepoint type.
12974 (handle_tracepoint_bkpts): New.
12975 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12976 type. Add comment about fast tracepoints.
12977 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12978 non-existing action_str field.
12979 (get_context_regcache): Handle fast tracepoints.
12980 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12981 to the regcache.
12982 (fast_tracepoint_from_jump_pad_address): New.
12983 (fast_tracepoint_from_ipa_tpoint_address): New.
12984 (collecting_t): New.
12985 (force_unlock_trace_buffer): New.
12986 (fast_tracepoint_collecting): New.
12987 (collecting): New.
12988 (gdb_collect): New.
12989 (write_inferior_data_ptr): New.
12990 (target_tp_heap): New.
12991 (target_malloc): New.
12992 (download_agent_expr): New.
12993 (UALIGN): New.
12994 (download_tracepoints): New.
12995 (download_trace_state_variables): New.
12996 (upload_fast_traceframes): New.
12997 (IPA_FIRST_TRACEFRAME): New.
12998 (IPA_NEXT_TRACEFRAME_1): New.
12999 (IPA_NEXT_TRACEFRAME): New.
13000 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13001 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13002 (gdb_jump_pad_buffer_end): New.
13003 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13004 (initialize_tracepoint): Adjust.
13005 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13006 buffer. Initialize the low module.
13007 * utils.c (PREFIX, TOOLNAME): New.
13008 (malloc_failure): Use PREFIX.
13009 (error): In the IPA, an error causes an exit.
13010 (fatal, warning): Use PREFIX.
13011 (internal_error): Use TOOLNAME.
13012 (NUMCELLS): Increase to 10.
13013 * configure, config.in: Regenerate.
13014
13015 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13016
13017 * server.c (handle_query) <qSupported>: Do two passes over the
13018 qSupported string to avoid nesting strtok.
13019
13020 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13021
13022 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13023 (CDEPS): New.
13024 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13025 -Wl,--dynamic-list.
13026 * configure: Regenerate.
13027 * proc-service.list: New.
13028
13029 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13030
13031 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13032 New comment.
13033
13034 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13035
13036 * gdbreplay.c (remote_open): Check error return from socket() call by
13037 its equality to -1 not by it being negative.
13038 * remote-utils.c (remote_open): Likewise.
13039
13040 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13041
13042 * config.h: Regenerate.
13043
13044 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13045
13046 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13047 doesn't provide PTRACE_GET_THREAD_AREA.
13048
13049 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13050
13051 * linux-m68k-low.c: Include <asm/ptrace.h>
13052 (ps_get_thread_area): Implement.
13053
13054 2010-05-03 Doug Evans <dje@google.com>
13055
13056 * event-loop.c (struct callback_event): New struct.
13057 (callback_list): New global.
13058 (append_callback_event, delete_callback_event): New functions.
13059 (process_callback): New function.
13060 (start_event_loop): Call it.
13061 * remote-utils.c (NOT_SCHEDULED): Define.
13062 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13063 moved out of readchar.
13064 (readchar): Rewrite. Call reschedule before returning.
13065 (reset_readchar): New function.
13066 (remote_close): Call it.
13067 (process_remaining, reschedule): New functions.
13068 * server.h (callback_handler_func): New typedef.
13069 (append_callback_event, delete_callback_event): Declare.
13070
13071 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13072
13073 * proc-service.c (ps_pglobal_lookup): Use
13074 thread_db_look_up_one_symbol.
13075 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13076 parameter. Use it instead of all_symbols_looked_up.
13077 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13078 field.
13079 (all_symbols_looked_up): Don't declare.
13080 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13081 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13082 field.
13083 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13084 Set all_symbols_looked_up here.
13085 (thread_db_look_up_one_symbol): New.
13086 (thread_db_get_tls_address): Adjust.
13087 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13088 thread_db object on the heap, and tentatively set it in the
13089 process structure.
13090 (thread_db_init): Don't set all_symbols_looked_up here.
13091 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13092
13093 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13094
13095 * linux-low.c (linux_kill, linux_detach): Adjust.
13096 (status_pending_p_callback): Remove redundant statement. Check
13097 for !TARGET_WAITIKIND_IGNORE, instead of
13098 TARGET_WAITKIND_STOPPED.
13099 (handle_tracepoints): Make sure LWP is locked. Adjust.
13100 (linux_wait_for_event_1): Adjust.
13101 (linux_cancel_breakpoints): New.
13102 (unsuspend_one_lwp): New.
13103 (unsuspend_all_lwps): New.
13104 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13105 (send_sigstop_callback): Change return type to int, add new
13106 `except' parameter and handle it.
13107 (suspend_and_send_sigstop_callback): New.
13108 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13109 pass them down. If SUSPEND, also increment the lwp's suspend
13110 count.
13111 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13112 (need_step_over_p): Don't consider suspended LWPs.
13113 (start_step_over): Adjust.
13114 (proceed_one_lwp): Change return type to int, add new `except'
13115 parameter and handle it.
13116 (unsuspend_and_proceed_one_lwp): New.
13117 (proceed_all_lwps): Use find_inferior instead of
13118 for_each_inferior.
13119 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13120 also decrement the suspend count of LWPs. Pass `except' down,
13121 instead of hacking its suspend count.
13122 (linux_pause_all): Add `freeze' parameter. Adjust.
13123 (linux_unpause_all): New.
13124 (linux_target_ops): Install linux_unpause_all.
13125 * server.c (handle_status): Adjust.
13126 * target.h (struct target_ops): New fields `unpause_all' and
13127 `cancel_breakpoints'. Add new parameter to `pause_all'.
13128 (pause_all): Add new `freeze' parameter.
13129 (unpause_all): New.
13130 (cancel_breakpoints): New.
13131 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13132 cancel breakpoints.
13133 (cmd_qtstart): Pause threads.
13134 (stop_tracing): Pause threads, and cancel breakpoints.
13135 * win32-low.c (win32_target_ops): Adjust.
13136
13137 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13138
13139 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13140 the inferior right away from here...
13141 (linux_wait_1): ... to here, and adjust to check the thread's
13142 last_resume_kind instead of the lwp's step or stop_expected flags.
13143
13144 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13145
13146 * README: Use consistent `GDB' and `GDBserver' spellings.
13147
13148 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13149
13150 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13151 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13152 (linux_detach_one_lwp): Assume the lwp is stopped.
13153 (any_thread_of): Delete.
13154 (linux_detach): Stop all lwps here. Don't blindly delete all
13155 breakpoints.
13156 (delete_lwp_callback): New.
13157 (linux_mourn): Delete all lwps of the process that is gone.
13158 (linux_wait_1): Don't delete the last lwp of the process here.
13159 * mem-break.h (mark_breakpoints_out): Declare.
13160 * mem-break.c (mark_breakpoints_out): New.
13161 (free_all_breakpoints): Use it.
13162 * server.c (handle_target_event): If the process is gone, mark
13163 breakpoints out.
13164 * thread-db.c (struct thread_db) <create_bp>: New field.
13165 (thread_db_enable_reporting): Fix prototype. Store a thread event
13166 breakpoint reference in the thread_db struct.
13167 (thread_db_load_search): Clear the thread_db object.
13168 (try_thread_db_load_1): Ditto.
13169 (switch_to_process): New.
13170 (disable_thread_event_reporting): Use it.
13171 (remove_thread_event_breakpoints): New.
13172 (thread_db_detach, thread_db_mourn): Use it.
13173
13174 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13175
13176 * linux-low.c (linux_enable_event_reporting): New.
13177 (linux_wait_for_event_1, handle_extended_wait): Use it.
13178
13179 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13180
13181 * linux-low.c (linux_kill_one_lwp, linux_kill)
13182 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13183 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13184 SIGSTOP even if the LWP is stopped.
13185 (send_sigstop_callback): New.
13186 (stop_all_lwps): Use send_sigstop_callback instead.
13187 (linux_resume_one_thread): Adjust.
13188 (proceed_one_lwp): Still proceed an LWP that the client has
13189 requested to stop, if we haven't reported it as stopped yet. Make
13190 sure that LWPs the client want stopped, have a pending SIGSTOP.
13191
13192 2010-04-26 Doug Evans <dje@google.com>
13193
13194 * server.c (handle_general_set): Make static.
13195
13196 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13197 Print received char after testing for error/eof instead of before.
13198 (input_interrupt): Tweak comment.
13199
13200 2010-04-23 Doug Evans <dje@google.com>
13201
13202 * server.c (start_inferior): Print inferior argv if --debug.
13203
13204 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13205
13206 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13207 * nto-x86-low.c: Include server.h
13208
13209 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13210
13211 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13212 be consistent with other sources of this directory.
13213 (init_registers_amd64): Correct name of source file of this function
13214 in the comment.
13215
13216 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13217
13218 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13219 64-bit executables.
13220
13221 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13222
13223 * win32-i386-low.c: Add 64-bit support.
13224 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13225 (init_registers_amd64): Declare.
13226 (mappings): Add 64-bit version of array.
13227 (init_windows_x86): New function.
13228 (the_low_target): Change init_arch field to init_windows_x86.
13229
13230 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13231
13232 * win32-low.c: Adapt to support also 64-bit architecture.
13233 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13234 (get_image_name): Use SIZE_T type for local variable `done'.
13235 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13236 (toolhelp_get_dll_name): Idem.
13237 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13238 Use uintptr_t typecast to avoid warning.
13239 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13240 (handle_exception): Use phex_nz to avoid warning.
13241 (win32_wait): Remove unused local variable `process'.
13242
13243 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13244
13245 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13246 `amd64-avx.o'.
13247
13248 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13249
13250 * configure.ac: Use `ws2_32' library for srv_mingw.
13251 * configure: Regenerate.
13252 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13253 * remote-utils.c: Likewise.
13254
13255 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13256
13257 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13258 if __x86_64__ is defined.
13259
13260 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13261
13262 * configure: Regenerate.
13263
13264 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13265
13266 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13267 * target.h (target_ops): New get_tib_address field.
13268 * win32-low.h (win32_thread_info): Add thread_local_base field.
13269 * win32-low.c (child_add_thread): Add tlb argument.
13270 Set thread_local_base field to TLB.
13271 (get_child_debug_event): Adapt to child_add_thread change.
13272 (win32_get_tib_address): New function.
13273 (win32_target_ops): Set get_tib_address field to
13274 win32_get_tib_address.
13275 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13276
13277 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13278
13279 * linux-low.c (linux_mourn): Also remove the process.
13280 * server.c (handle_target_event): Don't remove the process here.
13281 * nto-low.c (nto_mourn): New.
13282 (nto_target_ops): Install it.
13283 * spu-low.c (spu_mourn): New.
13284 (spu_target_ops): Install it.
13285 * win32-low.c (win32_mourn): New.
13286 (win32_target_ops): Install it.
13287
13288 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13289
13290 * server.h (buffer_xml_printf): Remove redundant `;'.
13291
13292 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13293
13294 * regcache.c (set_register_cache): Invalidate regcaches before
13295 changing the register cache layout.
13296 (regcache_invalidate_one): Allow a NULL regcache.
13297 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13298 regcaches before changing the register cache layout or the target
13299 regsets.
13300
13301 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13302
13303 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13304 variable warning on Linux/x86-64.
13305
13306 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13307
13308 GDBserver disconnected tracing support.
13309
13310 * linux-low.c (linux_remove_process): Delete.
13311 (add_lwp): Don't set last_resume_kind here.
13312 (linux_kill): Use `mourn'.
13313 (linux_detach): Use `thread_db_detach', and `mourn'.
13314 (linux_mourn): New.
13315 (linux_attach_lwp_1): Adjust comment.
13316 (linux_attach): last_resume_kind moved the thread_info; adjust.
13317 (status_pending_p_callback): Adjust.
13318 (linux_wait_for_event_1): Adjust.
13319 (count_events_callback, select_singlestep_lwp_callback)
13320 (select_event_lwp_callback, cancel_breakpoints_callback)
13321 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13322 (proceed_one_lwp): Adjust.
13323 (linux_async): Add debug output.
13324 (linux_thread_stopped): New.
13325 (linux_pause_all): New.
13326 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13327 linux_pause_all.
13328 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13329 (thread_db_free): Delete declaration.
13330 (thread_db_detach, thread_db_mourn): Declare.
13331 * thread-db.c (thread_db_init): Use thread_db_mourn.
13332 (thread_db_free): Delete, split in two.
13333 (disable_thread_event_reporting): New.
13334 (thread_db_detach): New.
13335 (thread_db_mourn): New.
13336
13337 * server.h (struct thread_info) <last_resume_kind>: New field.
13338 <attached>: Add comment.
13339 <gdb_detached>: New field.
13340 (handler_func): Change return type to int.
13341 (handle_serial_event, handle_target_event): Ditto.
13342 (gdb_connected): Declare.
13343 (tracing): Delete.
13344 (disconnected_tracing): Declare.
13345 (stop_tracing): Declare.
13346
13347 * server.c (handle_query) <qSupported>: Report support for
13348 disconnected tracing.
13349 (queue_stop_reply_callback): Account for running threads.
13350 (gdb_wants_thread_stopped): New.
13351 (gdb_wants_all_threads_stopped): New.
13352 (gdb_reattached_process): New.
13353 (handle_status): Clear the `gdb_detached' flag of all processes.
13354 In all-stop, stop all threads.
13355 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13356 (process_serial_event): If the remote connection breaks, or if an
13357 exit was forced with "monitor exit", force an event loop exit.
13358 Handle disconnected tracing on detach.
13359 (handle_serial_event): Adjust.
13360 (handle_target_event): If GDB isn't connected, forward events back
13361 to the inferior, unless the last process exited, in which case,
13362 exit gdbserver. Adjust interface.
13363
13364 * remote-utils.c (remote_open): Don't block in accept. Instead
13365 register an event loop source on the listen socket file
13366 descriptor. Refactor bits into ...
13367 (listen_desc): ... this new global.
13368 (gdb_connected): ... this new function.
13369 (enable_async_notification): ... this new function.
13370 (handle_accept_event): ... this new function.
13371 (remote_close): Clear remote_desc.
13372
13373 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13374
13375 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13376 New fields.
13377 (mourn_inferior): Define.
13378 (target_process_qsupported): Avoid the dangling else problem.
13379 (thread_stopped): Define.
13380 (pause_all): Define.
13381 (target_waitstatus_to_string): Declare.
13382 * target.c (target_waitstatus_to_string): New.
13383
13384 * tracepoint.c (tracing): Make extern.
13385 (disconnected_tracing): New.
13386 (stop_tracing): Make extern. Handle tracing stops due to GDB
13387 disconnecting.
13388 (cmd_qtdisconnected): New.
13389 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13390 (handle_tracepoint_general_set): Handle QTDisconnected.
13391
13392 * event-loop.c (event_handler_func): Change return type to int.
13393 (process_event): Bail out if the event handler wants the event
13394 loop to stop.
13395 (handle_file_event): Ditto.
13396 (start_event_loop): Bail out if the event handler wants the event
13397 loop to stop.
13398
13399 * nto-low.c (nto_target_ops): Adjust.
13400 * spu-low.c (spu_wait): Don't remove the process here.
13401 (spu_target_ops): Adjust.
13402 * win32-low.c (win32_wait): Don't remove the process here.
13403 (win32_target_ops): Adjust.
13404
13405 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13406
13407 * regcache.c (realloc_register_cache): Invalidate inferior's
13408 regcache before recreating it.
13409
13410 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13411
13412 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13413
13414 2010-04-09 Stan Shebs <stan@codesourcery.com>
13415 Pedro Alves <pedro@codesourcery.com>
13416
13417 * server.h (LONGEST): New.
13418 (struct thread_info) <while_stepping>: New field.
13419 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13420 Declare.
13421 (initialize_tracepoint, handle_tracepoint_general_set)
13422 (handle_tracepoint_query, tracepoint_finished_step)
13423 (tracepoint_was_hit, release_while_stepping_state_list):
13424 (current_traceframe): Declare.
13425 * server.c (handle_general_set): Handle tracepoint packets.
13426 (read_memory): New.
13427 (write_memory): New.
13428 (handle_search_memory_1): Use read_memory.
13429 (handle_query): Report support for conditional tracepoints, trace
13430 state variables, and tracepoint sources. Handle tracepoint
13431 queries.
13432 (main): Initialize the tracepoints module.
13433 (process_serial_event): Handle traceframe reads/writes.
13434
13435 * linux-low.c (handle_tracepoints): New.
13436 (linux_wait_1): Call it.
13437 (linux_resume_one_lwp): Handle while-stepping.
13438 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13439 (linux_target_ops): Install them.
13440 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13441 New field.
13442 * linux-x86-low.c (x86_supports_tracepoints): New.
13443 (the_low_target). Install it.
13444
13445 * mem-break.h (delete_breakpoint): Declare.
13446 * mem-break.c (delete_breakpoint): Make external.
13447
13448 * target.h (struct target_ops): Add `supports_tracepoints',
13449 `read_pc', and `write_pc' fields.
13450 (target_supports_tracepoints): Define.
13451 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13452 (phex_nz): New.
13453
13454 * regcache.h (struct regcache) <registers_owned>: New field.
13455 (init_register_cache, regcache_cpy): Declare.
13456 (regcache_read_pc, regcache_write_pc): Declare.
13457 (register_cache_size): Declare.
13458 (supply_regblock): Declare.
13459 * regcache.c (init_register_cache): New.
13460 (new_register_cache): Use it.
13461 (regcache_cpy): New.
13462 (register_cache_size): New.
13463 (supply_regblock): New.
13464 (regcache_read_pc, regcache_write_pc): New.
13465
13466 * tracepoint.c: New.
13467
13468 * Makefile.in (OBS): Add tracepoint.o.
13469 (tracepoint.o): New rule.
13470
13471 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13472
13473 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13474 (i386-mmx.o): New.
13475 (i386-mmx.c): Likewise.
13476 (i386-mmx-linux.o): Likewise.
13477 (i386-mmx-linux.c): Likewise.
13478
13479 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13480 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13481 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13482 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13483
13484 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13485 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13486 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13487
13488 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13489
13490 * Makefile.in (clean): Updated.
13491 (i386-avx.o): New.
13492 (i386-avx.c): Likewise.
13493 (i386-avx-linux.o): Likewise.
13494 (i386-avx-linux.c): Likewise.
13495 (amd64-avx.o): Likewise.
13496 (amd64-avx.c): Likewise.
13497 (amd64-avx-linux.o): Likewise.
13498 (amd64-avx-linux.c): Likewise.
13499
13500 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13501 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13502 (srv_amd64_regobj): Add amd64-avx.o.
13503 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13504 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13505 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13506 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13507 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13508 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13509 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13510
13511 * i387-fp.c: Include "i386-xstate.h".
13512 (i387_xsave): New.
13513 (i387_cache_to_xsave): Likewise.
13514 (i387_xsave_to_cache): Likewise.
13515 (x86_xcr0): Likewise.
13516
13517 * i387-fp.h (i387_cache_to_xsave): Likewise.
13518 (i387_xsave_to_cache): Likewise.
13519 (x86_xcr0): Likewise.
13520
13521 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13522 * linux-crisv32-low.c (target_regsets): Likewise.
13523 * linux-m68k-low.c (target_regsets): Likewise.
13524 * linux-mips-low.c (target_regsets): Likewise.
13525 * linux-ppc-low.c (target_regsets): Likewise.
13526 * linux-s390-low.c (target_regsets): Likewise.
13527 * linux-sh-low.c (target_regsets): Likewise.
13528 * linux-sparc-low.c (target_regsets): Likewise.
13529 * linux-xtensa-low.c (target_regsets): Likewise.
13530
13531 * linux-low.c: Include <sys/uio.h>.
13532 (regsets_fetch_inferior_registers): Support nt_type.
13533 (regsets_store_inferior_registers): Likewise.
13534 (linux_process_qsupported): New.
13535 (linux_target_ops): Add linux_process_qsupported.
13536
13537 * linux-low.h (regset_info): Add nt_type.
13538 (linux_target_ops): Add process_qsupported.
13539
13540 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13541 and <sys/uio.h>.
13542 (init_registers_i386_avx_linux): New.
13543 (init_registers_amd64_avx_linux): Likewise.
13544 (xmltarget_i386_linux_no_xml): Likewise.
13545 (xmltarget_amd64_linux_no_xml): Likewise.
13546 (PTRACE_GETREGSET): Likewise.
13547 (PTRACE_SETREGSET): Likewise.
13548 (x86_fill_xstateregset): Likewise.
13549 (x86_store_xstateregset): Likewise.
13550 (use_xml): Likewise.
13551 (x86_linux_update_xmltarget): Likewise.
13552 (x86_linux_process_qsupported): Likewise.
13553 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13554 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13555 init_registers_i386_linux here. Call
13556 x86_linux_update_xmltarget.
13557 (the_low_target): Add x86_linux_process_qsupported.
13558
13559 * server.c (handle_query): Call target_process_qsupported.
13560
13561 * target.h (target_ops): Add process_qsupported.
13562 (target_process_qsupported): New.
13563
13564 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13565
13566 * inferiors.c (add_thread): Set last_status kind to
13567 TARGET_WAITKIND_IGNORE.
13568 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13569 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13570 (linux_wait_1): Move `thread' local definition to block that uses
13571 it. Don't NULL initialize `event_child'.
13572 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13573 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13574 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13575
13576 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13577
13578 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13579 an extended waitstatus, or by a watchpoint.
13580 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13581 thread was stepping or has been stopped by a watchpoint.
13582
13583 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13584
13585 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13586 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13587 of another, then delete the previous, and validate all
13588 breakpoints.
13589 (validate_inserted_breakpoint): New.
13590 (delete_disabled_breakpoints): New.
13591 (validate_breakpoints): New.
13592 (check_mem_read): Validate breakpoints before trusting their
13593 shadow. Delete disabled breakpoints.
13594 (check_mem_write): Validate breakpoints before trusting they
13595 should be inserted. Delete disabled breakpoints.
13596 * mem-break.h (validate_breakpoints):
13597 * server.c (handle_query): Validate breakpoints when we see a
13598 qSymbol query.
13599
13600 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13601
13602 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13603 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13604 if we could tell there's a GDB breakpoint at stop_pc.
13605 (need_step_over_p): Don't do a step over if we find a GDB
13606 breakpoint at the resume PC.
13607
13608 * mem-break.c (struct raw_breakpoint): New.
13609 (enum bkpt_type): New type `gdb_breakpoint'.
13610 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13611 fields. New field `raw'.
13612 (find_raw_breakpoint_at): New.
13613 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13614 breakpoint instead.
13615 (set_breakpoint_at): Adjust.
13616 (delete_raw_breakpoint): New.
13617 (release_breakpoint): New.
13618 (delete_breakpoint): Rename to...
13619 (delete_breakpoint_1): ... this. Add proc parameter. Use
13620 release_breakpoint. Return ENOENT.
13621 (delete_breakpoint): Reimplement.
13622 (find_breakpoint_at): Delete.
13623 (find_gdb_breakpoint_at): New.
13624 (delete_breakpoint_at): Delete.
13625 (set_gdb_breakpoint_at): New.
13626 (delete_gdb_breakpoint_at): New.
13627 (gdb_breakpoint_here): New.
13628 (set_reinsert_breakpoint): Use release_breakpoint.
13629 (uninsert_breakpoint): Rename to ...
13630 (uninsert_raw_breakpoint): ... this.
13631 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13632 (reinsert_raw_breakpoint): Change parameter type to
13633 raw_breakpoint.
13634 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13635 instead.
13636 (check_breakpoints): Adjust. Use release_breakpoint.
13637 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13638 (breakpoint_inserted_here): Ditto.
13639 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13640 Don't trust the breakpoint's shadow if it is not inserted.
13641 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13642 (delete_all_breakpoints): Adjust.
13643 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13644 use delete_breakpoint_1.
13645
13646 * mem-break.h (breakpoints_supported): Delete declaration.
13647 (set_gdb_breakpoint_at): Declare.
13648 (gdb_breakpoint_here): Declare.
13649 (delete_breakpoint_at): Delete.
13650 (delete_gdb_breakpoint_at): Declare.
13651
13652 * server.h (struct raw_breakpoint): Forward declare.
13653 (struct process_info): New field `raw_breakpoints'.
13654
13655 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13656 breakpoints.
13657
13658 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13659
13660 * linux-low.c (status_pending_p_callback): Fix comment.
13661 (linux_wait_for_event_1): Move most of the internal breakpoint
13662 handling from here...
13663 (linux_wait_1): ... to here.
13664 (count_events_callback): New.
13665 (select_singlestep_lwp_callback): New.
13666 (select_event_lwp_callback): New.
13667 (cancel_breakpoints_callback): New.
13668 (select_event_lwp): New.
13669 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13670 priority to all LWPs that have had events that should be reported
13671 to the client. Cancel breakpoints when about to reporting the
13672 event to the client, not while stopping lwps. No longer cancel
13673 finished single-steps here.
13674 (cancel_finished_single_step): Delete.
13675 (cancel_finished_single_steps): Delete.
13676
13677 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13678
13679 * mem-break.c (enum bkpt_type): New.
13680 (struct breakpoint): New field `type'.
13681 (set_breakpoint_at): Change return type to struct breakpoint
13682 pointer. Set type to `other_breakpoint' by default.
13683 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13684 in the breakpoint list.
13685 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13686 (reinsert_breakpoint): Rename to ...
13687 (reinsert_raw_breakpoint): ... this.
13688 (reinsert_breakpoints_at): Adjust.
13689 * mem-break.h (struct breakpoint): Declare.
13690 (set_breakpoint_at): Change return type to struct breakpoint
13691 pointer.
13692
13693 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13694
13695 * server.c (handle_query): Assign, not compare.
13696
13697 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13698
13699 Teach linux gdbserver to step-over-breakpoints.
13700
13701 * linux-low.c (can_hardware_single_step): New.
13702 (supports_breakpoints): New.
13703 (handle_extended_wait): If stopping threads, read the stop pc of
13704 the new cloned LWP.
13705 (get_pc): New.
13706 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13707 low target doesn't support retrieving the PC.
13708 (add_lwp): Set last_resume_kind to resume_continue.
13709 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13710 (linux_attach): Don't clear stop_expected. Set the lwp's
13711 last_resume_kind to resume_stop.
13712 (linux_detach_one_lwp): Don't check for removed breakpoints.
13713 (check_removed_breakpoint): Delete.
13714 (status_pending_p): Rename to ...
13715 (status_pending_p_callback): ... this. Don't check for removed
13716 breakpoints. Don't consider threads that are stopped from GDB's
13717 perspective.
13718 (linux_wait_for_lwp): Always read the stop_pc here.
13719 (cancel_breakpoint): New.
13720 (step_over_bkpt): New global.
13721 (linux_wait_for_event_1): Implement stepping over breakpoints.
13722 (gdb_wants_lwp_stopped): New.
13723 (gdb_wants_all_stopped): New.
13724 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13725 single-step traps here. Store the thread's last reported target
13726 wait status.
13727 (send_sigstop): Don't clear stop_expected. Always set it,
13728 instead.
13729 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13730 (cancel_finished_single_step): New.
13731 (cancel_finished_single_steps): New.
13732 (wait_for_sigstop): Don't cancel finished single-step traps here.
13733 (linux_resume_one_lwp): Don't check for removed breakpoints.
13734 Don't set `step' on non-hardware step archs.
13735 (linux_set_resume_request): Ignore resume_stop requests if already
13736 stopping or stopped. Set the lwp's last_resume_kind.
13737 (resume_status_pending_p): Don't check for removed breakpoints.
13738 (need_step_over_p): New.
13739 (start_step_over): New.
13740 (finish_step_over): New.
13741 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13742 requests. Clear the thread's last reported target waitstatus.
13743 Don't use the `suspended' flag. Don't consider pending breakpoints.
13744 (linux_resume): Start a step-over if necessary.
13745 (proceed_one_lwp): New.
13746 (proceed_all_lwps): New.
13747 (unstop_all_lwps): New.
13748 * linux-low.h (struct lwp_info): Rewrite comment for the
13749 `suspended' flag. Add the `stop_pc' field. Delete the
13750 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13751 Add `'last_resume_kind' and `need_step_over' fields.
13752 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13753 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13754 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13755 (set_raw_breakpoint_at): New.
13756 (set_breakpoint_at): Rewrite to use it.
13757 (reinsert_breakpoint_handler): Delete.
13758 (set_reinsert_breakpoint): New.
13759 (reinsert_breakpoint_by_bp): Delete.
13760 (delete_reinsert_breakpoints): New.
13761 (uninsert_breakpoint): Rewrite.
13762 (uninsert_breakpoints_at): New.
13763 (reinsert_breakpoint): Rewrite.
13764 (reinsert_breakpoints_at): New.
13765 (check_breakpoints): Rewrite.
13766 (breakpoint_here): New.
13767 (breakpoint_inserted_here): New.
13768 (check_mem_read): Adjust.
13769 * mem-break.h (breakpoints_supported, breakpoint_here)
13770 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13771 (reinsert_breakpoint_by_bp): Delete declaration.
13772 (delete_reinsert_breakpoints): Declare.
13773 (reinsert_breakpoint): Delete declaration.
13774 (reinsert_breakpoints_at): Declare.
13775 (uninsert_breakpoint): Delete declaration.
13776 (uninsert_breakpoints_at): Declare.
13777 (check_breakpoints): Adjust prototype.
13778 * server.h: Adjust include order.
13779 (struct thread_info): Declare here. Add a `last_status' field.
13780
13781 2010-03-23 Michael Snyder <msnyder@vmware.com>
13782
13783 * server.c (crc32): New function.
13784 (handle_query): Add handling for 'qCRC:' request.
13785
13786 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13787
13788 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13789 lwp had been stopped by a watchpoint.
13790
13791 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13792
13793 * server.h (internal_error): Declare.
13794 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13795 * utils.c (internal_error): New function.
13796
13797 2010-03-15 Andreas Schwab <schwab@redhat.com>
13798
13799 * configure.srv: Fix typo setting srv_regobj.
13800
13801 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13802
13803 * linux-low.c (fetch_register): Avoid passing a non string literal
13804 format to `error'.
13805 (usr_store_inferior_registers): Ditto.
13806
13807 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13808
13809 * linux-low.c (linux_write_memory): Bail out early if peeking
13810 memory failed.
13811
13812 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13813
13814 * linux-low.h (struct lwp_info): New fields
13815 `stopped_by_watchpoint' and `stopped_data_address'.
13816 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13817 here, and cache them in the lwp object.
13818 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13819 directly.
13820 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13821 field.
13822 (linux_stopped_by_watchpoint): Rewrite.
13823 (linux_stopped_data_address): Rewrite.
13824
13825 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13826
13827 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13828 switching the current inferior, not before.
13829
13830 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13831
13832 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13833 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13834 i386-linux.c and amd64-linux.c.
13835 (reg-i386.o): Removed.
13836 (reg-i386.c): Likewise.
13837 (reg-i386-linux.o): Likewise.
13838 (reg-i386-linux.c): Likewise.
13839 (reg-x86-64.o): Likewise.
13840 (reg-x86-64.c): Likewise.
13841 (reg-x86-64-linux.o): Likewise.
13842 (reg-x86-64-linux.c): Likewise.
13843 (i386.o): New.
13844 (i386.c): Likewise.
13845 (i386-linux.o): Likewise.
13846 (i386-linux.c): Likewise.
13847 (amd64.o): Likewise.
13848 (amd64.c): Likewise.
13849 (amd64-linux.o): Likewise.
13850 (amd64-linux.c): Likewise.
13851
13852 * configure.srv (srv_i386_regobj): New.
13853 (srv_i386_linux_regobj): Likewise.
13854 (srv_amd64_regobj): Likewise.
13855 (srv_amd64_linux_regobj): Likewise.
13856 (srv_i386_32bit_xmlfiles): Likewise.
13857 (srv_i386_64bit_xmlfiles): Likewise.
13858 (srv_i386_xmlfiles): Likewise.
13859 (srv_amd64_xmlfiles): Likewise.
13860 (srv_i386_linux_xmlfiles): Likewise.
13861 (srv_amd64_linux_xmlfiles): Likewise.
13862 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13863 srv_xmlfiles to $srv_i386_xmlfiles.
13864 (i[34567]86-*-mingw32ce*): Likewise.
13865 (i[34567]86-*-mingw*): Likewise.
13866 (i[34567]86-*-nto*): Likewise.
13867 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13868 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13869 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13870 (x86_64-*-linux*): Likewise.
13871
13872 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13873 (init_registers_amd64_linux): New.
13874 (x86_arch_setup): Replace init_registers_x86_64_linux with
13875 init_registers_amd64_linux.
13876
13877 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13878
13879 * configure.ac: Check for libdl. If it is not available link against
13880 static libthread_db.
13881 * configure: Regenerate.
13882
13883 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13884
13885 PR9605
13886
13887 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13888 handing a read watchpoint.
13889 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13890
13891 2010-02-12 Doug Evans <dje@google.com>
13892
13893 * linux-low.c (linux_supports_tracefork_flag): Document.
13894 (linux_look_up_symbols): Add comment.
13895
13896 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13897
13898 * regcache.c (supply_register): Clear regcache if buf is NULL.
13899
13900 2010-02-02 Nicolas Roche <roche@sourceware.org>
13901 Joel Brobecker <brobecker@adacore.com>
13902
13903 * inferiors.c (find_inferior): Add function documentation.
13904 (unloaded_dll): Handle the case where the unloaded dll has not
13905 been previously registered in the dll list.
13906
13907 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13908
13909 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13910 (thumb2_breakpoint): New.
13911 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13912
13913 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13914
13915 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13916 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13917 breakpoints.
13918
13919 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13920
13921 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13922
13923 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13924
13925 * linux-s390-low.c (s390_collect_ptrace_register)
13926 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13927
13928 2010-01-21 Doug Evans <dje@google.com>
13929
13930 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13931 (PTRACE_ARG4_TYPE): New macro.
13932 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13933 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13934 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13935 (usr_store_inferior_registers): Ditto.
13936 (linux_read_memory, linux_write_memory): Ditto.
13937 (linux_test_for_tracefork): Ditto.
13938
13939 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13940 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13941
13942 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13943
13944 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13945 target.
13946
13947 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13948
13949 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13950 prototype to take a regcache. Adjust.
13951
13952 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13953
13954 * regcache.h (struct thread_info): Forward declare.
13955 (struct regcache): New.
13956 (new_register_cache): Adjust prototype.
13957 (get_thread_regcache): Declare.
13958 (free_register_cache): Adjust prototype.
13959 (registers_to_string, registers_from_string): Ditto.
13960 (supply_register, supply_register_by_name, collect_register)
13961 (collect_register_as_string, collect_register_by_name): Ditto.
13962 * regcache.c (struct inferior_regcache_data): Delete.
13963 (get_regcache): Rename to ...
13964 (get_thread_regcache): ... this. Adjust. Switch inferior before
13965 fetching registers.
13966 (regcache_invalidate_one): Adjust.
13967 (regcache_invalidate): Fix prototype.
13968 (new_register_cache): Return the new register cache.
13969 (free_register_cache): Change prototype.
13970 (realloc_register_cache): Adjust.
13971 (registers_to_string): Change prototype to take a regcache. Adjust.
13972 (registers_from_string): Ditto.
13973 (register_data): Ditto.
13974 (supply_register): Ditto.
13975 (supply_register_by_name): Ditto.
13976 (collect_register): Ditto.
13977 (collect_register_as_string): Ditto.
13978 (collect_register_by_name): Ditto.
13979 * server.c (process_serial_event): Adjust.
13980 * linux-low.h (regset_fill_func, regset_store_func): Change
13981 prototype.
13982 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13983 Change prototype.
13984 * linux-low.c (get_stop_pc): Adjust.
13985 (check_removed_breakpoint): Adjust.
13986 (linux_wait_for_event): Adjust.
13987 (linux_resume_one_lwp): Adjust.
13988 (fetch_register): Add regcache parameter. Adjust.
13989 (usr_store_inferior_registers): Ditto.
13990 (regsets_fetch_inferior_registers): Ditto.
13991 (regsets_store_inferior_registers): Ditto.
13992 (linux_fetch_registers, linux_store_registers): Ditto.
13993 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13994 regcache. Adjust.
13995 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13996 Ditto.
13997 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13998 prototype to take a regcache.
13999 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14000 * remote-utils.c (convert_ascii_to_int, outreg)
14001 (prepare_resume_reply): Change prototype to take a regcache.
14002 Adjust.
14003 * target.h (struct target_ops) <fetch_registers, store_registers>:
14004 Change prototype to take a regcache.
14005 (fetch_inferior_registers, store_inferior_registers): Change
14006 prototype to take a regcache. Adjust.
14007 * proc-service.c (ps_lgetregs): Adjust.
14008 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14009 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14010 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14011 take a regcache. Adjust.
14012 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14013 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14014 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14015 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14016 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14017 (cris_cannot_fetch_register):
14018 (cris_breakpoint_at): Change prototype to take a regcache.
14019 Adjust.
14020 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14021 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14022 to take a regcache. Adjust.
14023 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14024 Adjust.
14025 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14026 take a regcache. Adjust.
14027 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14028 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14029 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14030 * linux-mips-low.c (mips_get_pc):
14031 (mips_set_pc): Change prototype to take a regcache. Adjust.
14032 (mips_reinsert_addr): Adjust.
14033 (mips_collect_register): Change prototype to take a regcache.
14034 Adjust.
14035 (mips_supply_register):
14036 (mips_collect_register_32bit, mips_supply_register_32bit)
14037 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14038 (mips_store_fpregset): Ditto.
14039 * linux-ppc-low.c (ppc_supply_ptrace_register)
14040 (ppc_supply_ptrace_register): Ditto.
14041 (parse_spufs_run): Adjust.
14042 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14043 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14044 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14045 take a regcache. Adjust.
14046 * linux-s390-low.c (s390_collect_ptrace_register)
14047 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14048 (s390_set_pc): Change prototype to take a regcache. Adjust.
14049 (s390_arch_setup): Adjust.
14050 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14051 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14052 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14053 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14054 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14055 regcache. Adjust.
14056 (sparc_breakpoint_at): Adjust.
14057 * linux-xtensa-low.c (xtensa_fill_gregset):
14058 (xtensa_store_gregset):
14059 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14060 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14061 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14062 prototype to take a regcache. Adjust.
14063 * win32-arm-low.c (arm_fetch_inferior_register)
14064 (arm_store_inferior_register): Change prototype to take a
14065 regcache. Adjust.
14066 * win32-i386-low.c (i386_fetch_inferior_register)
14067 (i386_store_inferior_register): Change prototype to take a
14068 regcache. Adjust.
14069 * win32-low.c (child_fetch_inferior_registers)
14070 (child_store_inferior_registers): Change prototype to take a
14071 regcache. Adjust.
14072 (win32_wait): Adjust.
14073 (win32_fetch_inferior_registers): Change prototype to take a
14074 regcache. Adjust.
14075 (win32_store_inferior_registers): Adjust.
14076 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14077 store_inferior_register>: Change prototype to take a regcache.
14078
14079 2010-01-20 Doug Evans <dje@google.com>
14080
14081 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14082 #ifdef.
14083 (linux_wait_for_event1, linux_init_signals): Ditto.
14084 (W_STOPCODE): Provide definition if missing.
14085
14086 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14087
14088 * linux-low.c (linux_core_of_thread): New.
14089 (compare_ints, show_process, list_threads): New.
14090 (linux_qxfer_osdata): Report threads and cores.
14091 (linux_target_op): Register linux_core_of_thread.
14092 * remote-utils.c (prepare_resume_reply): Report the core.
14093 (buffer_xml_printf): Support %d specifier.
14094 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14095 New.
14096 (handle_query): Handle qXfer:threads. Announce availability
14097 thereof.
14098 * target.h (struct target_ops): New field core_of_thread.
14099
14100 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14101
14102 * Makefile.in (clean): Remove new generated files.
14103 (reg-s390.o, reg-s390.c): Remove rules.
14104 (reg-s390x.o, reg-s390x.c): Likewise.
14105 (s390-linux32.o, s390-linux32.c): Add rules.
14106 (s390-linux64.o, s390-linux64.c): Likewise.
14107 (s390x-linux64.o, s390x-linux64.c): Likewise.
14108 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14109 * linux-s390-low.c: Include <elf.h>.
14110 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14111 (init_registers_s390): Remove prototype.
14112 (init_registers_s390x): Likewise.
14113 (init_registers_s390_linux32): Add prototype.
14114 (init_registers_s390_linux64): Likewise.
14115 (init_registers_s390x_linux64): Likewise.
14116 (s390_num_regs_3264): New define.
14117 (s390_regmap_3264): New global variable.
14118 (s390_cannot_fetch_register): Remove obsolete check.
14119 (s390_cannot_store_register): Likewise.
14120 (s390_collect_ptrace_register): Handle upper/lower register halves.
14121 (s390_supply_ptrace_register): Likewise.
14122 (s390_fill_gregset): Update to register number changes.
14123 (s390_get_hwcap): New routine.
14124 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14125 Install appropriate regmap and register set.
14126
14127 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14128
14129 * server.c (gdbserver_version): Update copyright year to 2010.
14130 * gdbreplay.c (gdbreplay_version): Likewise.
14131
14132 2009-12-28 Doug Evans <dje@google.com>
14133
14134 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14135 elf/external.h. Include <elf.h> instead but only if necessary.
14136
14137 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14138
14139 * linux-low.c (linux_remove_process): Remove `detaching'
14140 parameter. Don't release/detach from thread_db here.
14141 (linux_kill): Release/detach from thread_db here, ...
14142 (linux_detach): ... and here, before actually detaching.
14143 (linux_wait_1): ... and here, when a process exits.
14144 * thread-db.c (any_thread_of): New.
14145 (thread_db_free): Switch the current inferior to a thread of the
14146 passed in process.
14147
14148 2009-12-21 Doug Evans <dje@google.com>
14149
14150 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14151
14152 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14153 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14154 warning ifndef __NR_tkill. Move setting of errno there too.
14155 Delete unnecessary resetting of errno after syscall.
14156 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14157
14158 * configure.ac: Check for dladdr.
14159 * config.in: Regenerate.
14160 * configure: Regenerate.
14161 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14162 (try_thread_db_load): Update.
14163
14164 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14165
14166 2009-12-18 Doug Evans <dje@google.com>
14167
14168 * event-loop.c: Include unistd.h if it exists.
14169
14170 * linux-low.c (my_waitpid): Move definition away from being in
14171 between linux_tracefork_child/linux_test_for_tracefork.
14172
14173 * gdb_proc_service.h (psaddr_t): Fix type.
14174 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14175 signature to match glibc.
14176
14177 2009-12-16 Doug Evans <dje@google.com>
14178
14179 * linux-low.c (linux_read_memory): Fix argument to read.
14180
14181 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14182
14183 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14184 events, don't leave current_inferior pointing at null.
14185
14186 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14187
14188 * win32-low.c (LOG): Delete.
14189 (OUTMSG): Output to stderr.
14190 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14191 on compile time LOG macro.
14192 (win32_wait): Fix debug output.
14193
14194 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14195
14196 * win32-low.c (win32_add_one_solib): If the dll name is
14197 "ntdll.dll", prepend the system directory to the dll path.
14198
14199 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14200
14201 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14202
14203 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14204 Vladimir Prus <vladimir@codesourcery.com>
14205
14206 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14207 * configure.ac: Check for __mcoldfire__ and set
14208 gdb_cv_m68k_is_coldfire.
14209 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14210 reg-cf.o and reg-m68k.o.
14211 * configure: Regenerated.
14212
14213 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14214
14215 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14216 Pass it to thread_db_free.
14217 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14218 proper `detaching' argument to linux_remove_process.
14219 * linux-low.h (thread_db_free): Add `detaching' parameter.
14220 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14221 to thread_db_free.
14222 (thread_db_free): Add `detaching' parameter. Only
14223 call td_ta_clear_event if detaching from process.
14224
14225 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14226
14227 * thread-db.c (thread_db_free): Fix typo.
14228
14229 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14230
14231 PR gdb/10838
14232 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14233
14234 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14235
14236 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14237 with an i686 compiler.
14238 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14239 needed.
14240 * configure: Rebuilt.
14241
14242 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14243
14244 PR gdb/10783
14245
14246 * server.c (handle_search_memory_1): Correct read_addr initialization
14247 in loop for searching subsequent chunks.
14248
14249 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14250
14251 * configure.ac: New --with-libthread-db option.
14252 * thread-db.c: Allow direct dependence on libthread_db.
14253 (thread_db_free): Adjust.
14254 * config.in: Regenerate.
14255 * configure: Likewise.
14256
14257 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14258
14259 PR gdb/10757
14260 * thread-db.c (attach_thread): New function.
14261 (maybe_attach_thread): Return success/failure.
14262 (find_new_threads_callback): Adjust.
14263 (thread_db_find_new_threads): Loop until no new threads.
14264
14265 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14266
14267 * proc-service.c (ps_lgetregs): Formatting.
14268
14269 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14270
14271 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14272 * configure.ac: Adjust.
14273 * linux-low.h (struct process_info_private): Move members to struct
14274 thread_db.
14275 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14276 * linux-low.c (linux_remove_process): Adjust.
14277 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14278 * server.c (handle_query): Move code ...
14279 (handle_monitor_command): ... here. New function.
14280 * target.h (struct target_ops): New member.
14281 * thread-db.c (struct thread_db): New.
14282 (libthread_db_search_path): New variable.
14283 (thread_db_create_event, thread_db_enable_reporting)
14284 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14285 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14286 (try_thread_db_load_1, dladdr_to_soname): New functions.
14287 (try_thread_db_load, thread_db_load_search): New functions.
14288 (thread_db_init): Search for libthread_db.
14289 (thread_db_free): New function.
14290 (thread_db_handle_monitor_command): Likewise.
14291 * config.in: Regenerate.
14292 * configure: Regenerate.
14293
14294 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14295
14296 * spu-low.c (spu_kill): Wait for inferior to terminate.
14297 Call clear_inferiors.
14298 (spu_detach): Call clear_inferiors.
14299
14300 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14301
14302 * aclocal.m4: Regenerate.
14303 * config.in: Likewise.
14304 * configure: Likewise.
14305
14306 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14307
14308 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14309 (parse_spufs_run): New function.
14310 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14311 (ppc_breakpoint_at): Handle SPU breakpoints.
14312
14313 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14314
14315 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14316 (SPUFS_MAGIC): Define.
14317 (spu_enumerate_spu_ids): New function.
14318 (linux_qxfer_spu): New function.
14319 (linux_target_ops): Install linux_qxfer_spu.
14320
14321 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14322
14323 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14324 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14325 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14326 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14327 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14328 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14329 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14330 (init_registers_powerpc_cell32l): Add prototype.
14331 (init_registers_powerpc_cell64l): Likewise.
14332 (ppc_arch_setup): Detect Cell/B.E. architecture.
14333
14334 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14335
14336 * Makefile.in (datarootdir): New variable.
14337
14338 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14339
14340 * linux-low.c (linux_write_memory): Update debugging output.
14341 * Makefile.in (clean): Add new descriptions.
14342 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14343 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14344 * configure.srv: Add new files for arm*-*-linux*.
14345 * linux-arm-low.c: Add new declarations.
14346 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14347 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14348 (HWCAP_VFPv3D16): New.
14349 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14350 instead of __IWMMXT__.
14351 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14352 (arm_arch_setup): New.
14353 (target_regsets): Remove #ifdef. Add VFP regset.
14354 (the_low_target): Use arm_arch_setup.
14355
14356 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14357
14358 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14359 the main thread again.
14360
14361 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14362
14363 Adding Neutrino gdbserver.
14364 * configure: Regenerated.
14365 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14366 * configure.srv (i[34567]86-*-nto*): New target.
14367 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14368 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14369 (nto_comctrl) [__QNX__]: New function.
14370 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14371
14372 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14373
14374 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14375 srv_tgtobj.
14376
14377 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14378 Pedro Alves <pedro@codesourcery.com>
14379
14380 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14381 don't support CONTEXT_EXTENDED_REGISTERS.
14382 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14383 (the_low_target): Install them.
14384 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14385 failing with ERROR_PIPE_NOT_CONNECTED.
14386
14387 2009-06-30 Doug Evans <dje@google.com>
14388 Pierre Muller <muller@ics.u-strasbg.fr>
14389
14390 Add h/w watchpoint support to x86-linux, win32-i386.
14391 * Makefile.in (SFILES): Add i386-low.c
14392 (i386_low_h): Define.
14393 (i386-low.o): Add dependencies.
14394 (linux-x86-low.o): Add i386-low.h dependency.
14395 (win32-i386-low.o): Ditto.
14396 * i386-low.c: New file.
14397 * i386-low.h: New file.
14398 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14399 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14400 * linux-low.c (linux_add_process): Initialize arch_private.
14401 (linux_remove_process): Free arch_private.
14402 (add_lwp): Initialize arch_private.
14403 (delete_lwp): Free arch_private.
14404 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14405 provided.
14406 * linux-low.h (process_info_private): New member arch_private.
14407 (lwp_info): New member arch_private.
14408 (linux_target_ops): New members new_process, new_thread,
14409 prepare_to_resume.
14410 (ptid_of): New macro.
14411 * linux-x86-low.c: Include stddef.h, i386-low.h.
14412 (arch_process_info): New struct.
14413 (arch_lwp_info): New struct.
14414 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14415 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14416 (i386_dr_low_get_status): New function.
14417 (x86_insert_point, x86_remove_point): New functions.
14418 (x86_stopped_by_watchpoint): New function.
14419 (x86_stopped_data_address): New function.
14420 (x86_linux_new_process, x86_linux_new_thread): New functions.
14421 (x86_linux_prepare_to_resume): New function.
14422 (the_low_target): Add entries for insert_point, remove_point,
14423 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14424 prepare_to_resume.
14425 * server.c (debug_hw_points): New global.
14426 (monitor_show_help): Document set debug-hw-points.
14427 (handle_query): Process "set debug-hw-points".
14428 * server.h (debug_hw_points): Declare.
14429 (paddress): Declare.
14430 * utils.c (NUMCELLS, CELLSIZE): New macros.
14431 (get_sell, xsnprintf, paddress): New functions.
14432 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14433 remove_point, stopped_by_watchpoint, stopped_data_address.
14434 * win32-i386-low.c: Include i386-low.h.
14435 (debug_reg_state): Replaces dr.
14436 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14437 (i386_dr_low_get_status): New function.
14438 (i386_insert_point, i386_remove_point): New functions.
14439 (i386_stopped_by_watchpoint): New function.
14440 (i386_stopped_data_address): New function.
14441 (i386_initial_stuff): Update.
14442 (get_thread_context,set_thread_context,i386_thread_added): Update.
14443 (the_low_target): Add entries for insert_point,
14444 remove_point, stopped_by_watchpoint, stopped_data_address.
14445 * win32-low.c (win32_insert_watchpoint): New function.
14446 (win32_remove_watchpoint): New function.
14447 (win32_stopped_by_watchpoint): New function.
14448 (win32_stopped_data_address): New function.
14449 (win32_target_ops): Add entries for insert_watchpoint,
14450 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14451 * win32-low.h (win32_target_ops): New members insert_point,
14452 remove_point, stopped_by_watchpoint, stopped_data_address.
14453
14454 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14455
14456 * server.c (process_serial_event): Re-return unsupported, not
14457 error, if the type isn't recognized. Re-allow supporting only
14458 insert or remove packets. Also call require_running for
14459 breakpoints. Add missing break statement to default case. Tidy.
14460 * target.h (struct target_ops): Rename insert_watchpoint to
14461 insert_point, and remove_watchpoint to remove_point.
14462
14463 * linux-low.h (struct linux_target_ops): Likewise.
14464 * linux-low.c (linux_insert_watchpoint): Rename to ...
14465 (linux_insert_point): ... this. Adjust.
14466 (linux_remove_watchpoint): Rename to ...
14467 (linux_remove_point): ... this. Adjust.
14468 (linux_target_ops): Adjust.
14469 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14470 (cris_insert_point): ... this.
14471 (cris_remove_watchpoint): Rename to ...
14472 (cris_remove_point): ... this.
14473 (the_low_target): Adjust.
14474
14475 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14476
14477 * server.c (handle_v_kill): Pass signal_pid to
14478 kill_inferior if multi_process is zero.
14479
14480 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14481
14482 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14483 * target.h (target_ops): Comment for *_watchpoint to make it clear
14484 the functions can get types '0' and '1'.
14485
14486 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14487
14488 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14489 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14490 * regcache.c (get_regcache): Likewise.
14491 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14492 * win32-low.c (child_fetch_inferior_registers): Remove check for
14493 regno 0.
14494
14495 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14496 Pedro Alves <pedro@codesourcery.com>
14497
14498 * target.h (struct target_ops) <supports_multi_process>: New
14499 callback.
14500 (target_supports_multi_process): New.
14501 * server.c (handle_query): Even if GDB reports support, only
14502 enable multi-process if the target also supports it. Report
14503 multi-process support only if the target backend supports it.
14504 * linux-low.c (linux_supports_multi_process): New function.
14505 (linux_target_ops): Install it as target_supports_multi_process
14506 callback.
14507
14508 2009-05-24 Doug Evans <dje@google.com>
14509
14510 Global renaming of find_thread_pid to find_thread_ptid.
14511 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14512 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14513 All callers updated.
14514
14515 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14516 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14517 directly.
14518
14519 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14520 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14521 (linux_resume_one_lwp): Ditto.
14522
14523 2009-05-23 Doug Evans <dje@google.com>
14524
14525 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14526 from struct inferior_list_entry * to struct lwp_info *.
14527 All callers updated.
14528
14529 2009-05-13 Doug Evans <dje@google.com>
14530
14531 * linux-x86-low.c: Don't include assert.h.
14532 (x86_siginfo_fixup): Use fatal, not assert.
14533 (x86_arch_setup): Fix comment.
14534
14535 2009-05-12 Doug Evans <dje@google.com>
14536
14537 Biarch support for i386/amd64 gdbserver.
14538 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14539 Add linux-x86-low.c.
14540 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14541 (linux-x86-low.o): Add.
14542 * linux-x86-64-low.c: Delete.
14543 * linux-i386-low.c: Delete.
14544 * linux-x86-low.c: New file.
14545 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14546 linux-x86-low.o.
14547 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14548 linux-x86-low.o.
14549 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14550 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14551 (linux_child_pid_to_exec_file): New function.
14552 (elf_64_header_p, elf_64_file_p): New functions.
14553 (siginfo_fixup): New function.
14554 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14555 give target a chance to convert layout.
14556 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14557 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14558
14559 2009-05-07 Doug Evans <dje@google.com>
14560
14561 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14562 (regsets_store_inferior_registers): Ditto.
14563
14564 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14565
14566 PR server/10048
14567
14568 * linux-low.c (must_set_ptrace_flags): Delete.
14569 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14570 of the global.
14571 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14572 `lwp->must_set_ptrace_flags' instead.
14573 (linux_wait_for_event_1): Set ptrace options here.
14574 (linux_wait_1): ... not here.
14575
14576 2009-04-30 Doug Evans <dje@google.com>
14577
14578 * inferiors.c (started_inferior_callback): New function.
14579 (attached_inferior_callback): New function.
14580 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14581 * server.c (print_started_pid, print_attached_pid): New functions.
14582 (detach_or_kill_for_exit): New function.
14583 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14584 * server.h (have_started_inferiors_p): Declare.
14585 (have_attached_inferiors_p): Declare.
14586
14587 * inferiors.c (remove_process): Fix memory leak, free process.
14588 * linux-low.c (linux_remove_process): New function.
14589 (linux_kill): Call it instead of remove_process.
14590 (linux_detach, linux_wait_1): Ditto.
14591
14592 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14593
14594 * configure.srv: Add x86 Windows CE target.
14595
14596 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14597
14598 * inferiors.c (get_thread_process): Make global.
14599 * server.h (get_thread_process): Add prototype.
14600 * thread-db.c (find_one_thread): Use get_thread_process
14601 instead of current_process.
14602 (thread_db_get_tls_address): Do not crash if called when
14603 thread layer is not yet initialized.
14604
14605 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14606
14607 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14608 * spu-low.c (current_tid): Rename to ...
14609 (current_ptid): ... this.
14610 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14611 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14612 ptid_get_lwp (current_ptid) instead of current_tid.
14613 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14614 instead of current_tid. Use find_process_pid to verify pid
14615 argument is valid. Pass proper argument to remove_process.
14616 (spu_thread_alive): Compare current_ptid instead of current_tid.
14617 (spu_resume): Likewise.
14618
14619 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14620
14621 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14622 variable.
14623
14624 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14625
14626 Implement the multiprocess extensions, and add linux multiprocess
14627 support.
14628
14629 * server.h (ULONGEST): Declare.
14630 (struct ptid, ptid_t): New.
14631 (minus_one_ptid, null_ptid): Declare.
14632 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14633 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14634 (struct inferior_list_entry): Change `id' type from unsigned from
14635 to ptid_t.
14636 (struct sym_cache, struct breakpoint, struct
14637 process_info_private): Forward declare.
14638 (struct process_info): Declare.
14639 (current_process): Declare.
14640 (all_processes): Declare.
14641 (initialize_inferiors): Declare.
14642 (add_thread): Adjust to use ptid_t.
14643 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14644 (add_process, remove_process, find_thread_pid): Declare.
14645 (find_inferior_id): Adjust to use ptid_t.
14646 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14647 (multi_process): Declare.
14648 (push_event): Adjust to use ptid_t.
14649 (read_ptid, write_ptid): Declare.
14650 (prepare_resume_reply): Adjust to use ptid_t.
14651 (clear_symbol_cache): Declare.
14652 * inferiors.c (all_processes): New.
14653 (null_ptid, minus_one_ptid): New.
14654 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14655 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14656 (add_thread): Change unsigned long to ptid. Remove gdb_id
14657 parameter. Adjust.
14658 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14659 (gdb_id_to_thread): Rename to ...
14660 (find_thread_pid): ... this. Change unsigned long to ptid.
14661 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14662 (loaded_dll, pull_pid_from_list): Adjust.
14663 (add_process, remove_process, find_process_pid)
14664 (get_thread_process, current_process, initialize_inferiors): New.
14665 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14666 (struct target_waitstatus) <related_pid>: Ditto.
14667 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14668 return type to int.
14669 (struct target_ops) <join>: Add `pid' argument.
14670 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14671 (struct target_ops) <wait>: Add `ptid' field. Change return type
14672 to ptid.
14673 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14674 (mywait): Add `ptid' argument. Change return type to ptid_t.
14675 (target_pid_to_str): Declare.
14676 * target.c (set_desired_inferior): Adjust to use ptids.
14677 (mywait): Add new `ptid' argument. Adjust.
14678 (target_pid_to_str): New.
14679 * mem-break.h (free_all_breakpoints): Declare.
14680 * mem-break.c (breakpoints): Delelete.
14681 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14682 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14683 to use per-process breakpoint list.
14684 (free_all_breakpoints): New.
14685 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14686 (symbol_cache, all_symbols_looked_up): Delete.
14687 (hexchars): New.
14688 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14689 read_ptid): New.
14690 (prepare_resume_reply): Change ptid argument's type from unsigned
14691 long to ptid_t. Adjust. Implement W;process and X;process.
14692 (free_sym_cache, clear_symbol_cache): New.
14693 (look_up_one_symbol): Adjust to per-process symbol cache. *
14694 * server.c (cont_thread, general_thread, step_thread): Change type
14695 to ptid_t.
14696 (attached): Delete.
14697 (multi_process): New.
14698 (last_ptid): Change type to ptid_t.
14699 (struct vstop_notif) <ptid>: Change type to ptid_t.
14700 (queue_stop_reply, push_event): Change `ptid' argument's type to
14701 ptid_t.
14702 (discard_queued_stop_replies): Add `pid' argument.
14703 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14704 changes. Don't reference the `attached' global.
14705 (attach_inferior): Adjust to mywait interface changes.
14706 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14707 features. Handle and report "multiprocess+". Handle
14708 "qAttached:PID".
14709 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14710 changes.
14711 (handle_v_kill): New.
14712 (handle_v_stopped): Adjust to use target_pid_to_str.
14713 (handle_v_requests): Allow multiple attaches and runs when
14714 multiprocess extensions are in effect. Handle "vKill".
14715 (myresume): Adjust to use ptids.
14716 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14717 (handle_status): Adjust to discard_queued_stop_replies interface
14718 change.
14719 (first_thread_of, kill_inferior_callback)
14720 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14721 (main): Call initialize_inferiors. Adjust to use ptids, killing
14722 and detaching from all inferiors. Handle multiprocess packet
14723 variants.
14724 * linux-low.h: Include gdb_proc_service.h.
14725 (struct process_info_private): New.
14726 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14727 <lwpid_of>: Use ptid_get_lwp.
14728 (get_lwp_thread): Adjust.
14729 (struct lwp_info): Add `dead' member.
14730 (find_lwp_pid): Declare.
14731 * linux-low.c (thread_db_active): Delete.
14732 (new_inferior): Adjust comment.
14733 (inferior_pid): Delete.
14734 (linux_add_process): New.
14735 (handle_extended_wait): Adjust.
14736 (add_lwp): Change unsigned long to ptid.
14737 (linux_create_inferior): Add process to processes table. Adjust
14738 to use ptids. Don't set new_inferior here.
14739 (linux_attach_lwp): Rename to ...
14740 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14741 it. Adjust to use ptids.
14742 (linux_attach_lwp): New.
14743 (linux_attach): Add process to processes table. Don't set
14744 new_inferior here.
14745 (struct counter): New.
14746 (second_thread_of_pid_p, last_thread_of_process_p): New.
14747 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14748 multiple processes.
14749 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14750 processes. Remove process from process table.
14751 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14752 to multiple processes.
14753 (any_thread_of): New.
14754 (linux_detach): Add `pid' argument, and handle it. Remove process
14755 from processes table.
14756 (linux_join): Add `pid' argument. Handle it.
14757 (linux_thread_alive): Change unsighed long argument to ptid_t.
14758 Consider dead lwps as not being alive.
14759 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14760 threads we're not interested in.
14761 (same_lwp, find_lwp_pid): New.
14762 (linux_wait_for_lwp): Change `pid' argument's type from int to
14763 ptid_t. Adjust.
14764 (linux_wait_for_event): Rename to ...
14765 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14766 from int to ptid_t. Adjust.
14767 (linux_wait_for_event): New.
14768 (linux_wait_1): Add `ptid' argument. Change return type to
14769 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14770 that exit from the process table.
14771 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14772 Adjust.
14773 (mark_lwp_dead): New.
14774 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14775 stopping all threads, mark its main lwp as dead.
14776 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14777 ptids.
14778 (fetch_register, usr_store_inferior_registers)
14779 (regsets_fetch_inferior_registers)
14780 (regsets_store_inferior_registers, linux_read_memory)
14781 (linux_write_memory): Inline `inferior_pid'.
14782 (linux_look_up_symbols): Adjust to use per-process
14783 `thread_db_active'.
14784 (linux_request_interrupt): Adjust to use ptids.
14785 (linux_read_auxv): Inline `inferior_pid'.
14786 (initialize_low): Don't reference thread_db_active.
14787 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14788 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14789 (ps_getpid): Return the pid of the current inferior.
14790 * thread-db.c (proc_handle, thread_agent): Delete.
14791 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14792 per-process data.
14793 (find_one_thread): Change argument type to ptid_t. Adjust to
14794 per-process data.
14795 (maybe_attach_thread): Adjust to per-process data and ptids.
14796 (thread_db_find_new_threads): Ditto.
14797 (thread_db_init): Ditto.
14798 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14799 processes table. Adjust to use ptids.
14800 (spu_kill, spu_detach): Adjust interface. Remove process from
14801 processes table.
14802 (spu_join, spu_thread_alive): Adjust interface.
14803 (spu_wait): Adjust interface. Remove process from processes
14804 table. Adjust to use ptids.
14805 * win32-low.c (current_inferior_tid): Delete.
14806 (current_inferior_ptid): New.
14807 (debug_event_ptid): New.
14808 (thread_rec): Take a ptid. Adjust.
14809 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14810 (child_delete_thread): Ditto.
14811 (do_initial_child_stuff): Add `attached' argument. Add process to
14812 processes table.
14813 (child_fetch_inferior_registers, child_store_inferior_registers):
14814 Adjust.
14815 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14816 (win32_attach): Pass 1 to do_initial_child_stuff.
14817 (win32_kill): Adjust interface. Remove process from processes
14818 table.
14819 (win32_detach): Ditto.
14820 (win32_join): Adjust interface.
14821 (win32_thread_alive): Take a ptid.
14822 (win32_resume): Adjust to use ptids.
14823 (get_child_debug_event): Ditto.
14824 (win32_wait): Adjust interface. Remove exiting process from
14825 processes table.
14826
14827 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14828
14829 Non-stop mode support.
14830
14831 * server.h (non_stop): Declare.
14832 (gdb_client_data, handler_func): Declare.
14833 (delete_file_handler, add_file_handler, start_event_loop):
14834 Declare.
14835 (handle_serial_event, handle_target_event, push_event)
14836 (putpkt_notif): Declare.
14837 * target.h (enum resume_kind): New.
14838 (struct thread_resume): Replace `step' field by `kind' field.
14839 (TARGET_WNOHANG): Define.
14840 (struct target_ops) <wait>: Add `options' argument.
14841 <supports_non_stop, async, start_non_stop>: New fields.
14842 (target_supports_non_stop, target_async): New.
14843 (start_non_stop): Declare.
14844 (mywait): Add `options' argument.
14845 * target.c (mywait): Add `options' argument. Print child exit
14846 notifications here.
14847 (start_non_stop): New.
14848 * server.c (non_stop, own_buf, mem_buf): New globals.
14849 (struct vstop_notif): New.
14850 (notif_queue): New global.
14851 (queue_stop_reply, push_event, discard_queued_stop_replies)
14852 (send_next_stop_reply): New.
14853 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14854 interface changes.
14855 (attach_inferior): In non-stop mode, don't wait for the target
14856 here.
14857 (handle_general_set): Handle QNonStop.
14858 (handle_query): When handling qC, return the current general
14859 thread, instead of the first thread of the list.
14860 (handle_query): If the backend supports non-stop mode, include
14861 QNonStop+ in the qSupported query response.
14862 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14863 and non-stop mode.
14864 (handle_v_attach, handle_v_run): Handle non-stop mode.
14865 (handle_v_stopped): New.
14866 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14867 (myresume): Adjust to use resume_kind. Handle non-stop.
14868 (queue_stop_reply_callback): New.
14869 (handle_status): Handle non-stop mode.
14870 (main): Clear non_stop flag on reconnection. Use the event-loop.
14871 Refactor serial protocol handling from here ...
14872 (process_serial_event): ... to this new function. When GDB
14873 selects any thread, select one here. In non-stop mode, wait until
14874 GDB acks all pending events before exiting.
14875 (handle_serial_event, handle_target_event): New.
14876 * remote-utils.c (remote_open): Install remote_desc in the event
14877 loop.
14878 (remote_close): Remove remote_desc from the event loop.
14879 (putpkt_binary): Rename to...
14880 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14881 (putpkt_binary): New as wrapper around putpkt_binary_1.
14882 (putpkt_notif): New.
14883 (prepare_resume_reply): In non-stop mode, don't change the
14884 general_thread.
14885 * event-loop.c: New.
14886 * Makefile.in (OBJ): Add event-loop.o.
14887 (event-loop.o): New rule.
14888
14889 * linux-low.h (pid_of): Moved here.
14890 (lwpid_of): New.
14891 (get_lwp_thread): Use lwpid_of.
14892 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14893 * linux-low.c (pid_of): Delete.
14894 (inferior_pid): Use lwpid_of.
14895 (linux_event_pipe): New.
14896 (target_is_async_p): New.
14897 (delete_lwp): New.
14898 (handle_extended_wait): Use lwpid_of.
14899 (add_lwp): Don't set lwpid field.
14900 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14901 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14902 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14903 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14904 first. Adjust to linux_wait_for_event interface changes. Use
14905 lwpid_of.
14906 (linux_detach): Don't delete the main lwp here.
14907 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14908 (status_pending_p): Don't consider explicitly suspended lwps.
14909 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14910 pointer. Add OPTIONS argument. Change return type to int. Use
14911 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14912 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14913 pointer. Add status pointer argument. Return a pid instead of a
14914 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14915 changes. In non-stop mode, don't switch to a random thread.
14916 (linux_wait): Rename to...
14917 (linux_wait_1): ... this. Add target_options argument, and handle
14918 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14919 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14920 clean exit and signal exit code. Don't stop all threads in
14921 non-stop mode. In all-stop mode, only stop all threads when
14922 reporting a stop to GDB. Handle explicit thread stop requests.
14923 (async_file_flush, async_file_mark): New.
14924 (linux_wait): New.
14925 (send_sigstop): Use lwpid_of.
14926 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14927 interface changes. In non-stop mode, don't switch to a random
14928 thread.
14929 (linux_resume_one_lwp): Use lwpid_of.
14930 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14931 (linux_resume_one_thread): ... this. Handle resume_stop. In
14932 non-stop mode, don't look for pending flag in all threads.
14933 (resume_status_pending_p): Don't consider explicitly suspended
14934 threads.
14935 (my_waitpid): Reimplement. Emulate __WALL.
14936 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14937 Use lwpid_of.
14938 (sigchld_handler, linux_supports_non_stop, linux_async)
14939 (linux_start_non_stop): New.
14940 (linux_target_ops): Register linux_supports_non_stop, linux_async
14941 and linux_start_non_stop.
14942 (initialize_low): Install SIGCHLD handler.
14943 * thread-db.c (thread_db_create_event, find_one_thread)
14944 (thread_db_get_tls_address): Use lwpid_of.
14945 * win32-low.c (win32_detach): Adjust to use resume_kind.
14946 (win32_wait): Add `options' argument.
14947 * spu-low.c (spu_resume): Adjust to use resume_kind.
14948 (spu_wait): Add `options' argument.
14949
14950 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14951
14952 Decouple target code from remote protocol.
14953
14954 * target.h (enum target_waitkind): New.
14955 (struct target_waitstatus): New.
14956 (struct target_ops) <wait>: Return an unsigned long. Take a
14957 target_waitstatus pointer instead of a char pointer.
14958 (mywait): Likewise.
14959 * target.c (mywait): Change prototype to return an unsigned long.
14960 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14961 * server.h (thread_from_wait, old_thread_from_wait): Delete
14962 declarations.
14963 (prepare_resume_reply): Change prototype to take a
14964 target_waitstatus.
14965 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14966 (last_status, last_ptid): New.
14967 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14968 pid instead of a signal.
14969 (attach_inferior): Remove "status" and "signal" parameters.
14970 Adjust.
14971 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14972 not as an address.
14973 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14974 (handle_v_requests, myresume): Remove "status" and "signal"
14975 parameters. Adjust.
14976 (handle_status): New.
14977 (main): Delete local `status'. Adjust.
14978 * remote-utils.c: Include target.h.
14979 (prepare_resume_reply): Change prototype to take a
14980 target_waitstatus. Adjust.
14981
14982 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14983 interface.
14984 * spu-low.c (spu_wait): Adjust.
14985 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14986 Delete.
14987 (win32_wait): Adjust.
14988
14989 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14990
14991 * target.h (struct thread_resume): Delete leave_stopped member.
14992 (struct target_ops): Add a `n' argument to the `resume' callback.
14993 * server.c (start_inferior): Adjust.
14994 (handle_v_cont, myresume): Adjust.
14995 * linux-low.c (check_removed_breakpoint): Adjust to resume
14996 interface change, and to removed leave_stopped field.
14997 (resume_ptr): Delete.
14998 (struct thread_resume_array): New.
14999 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15000 resume interface change.
15001 (linux_continue_one_thread, linux_queue_one_thread)
15002 (resume_status_pending_p): Check if the resume field is NULL
15003 instead of checking the leave_stopped member.
15004 (linux_resume): Adjust to the target resume interface change.
15005 * spu-low.c (spu_resume): Adjust to the target resume interface
15006 change.
15007 * win32-low.c (win32_detach, win32_resume): Ditto.
15008
15009 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15010
15011 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15012 flag.
15013 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15014 pending.
15015 (linux_continue_one_thread): Only preserve the stepping flag if
15016 there's a pending breakpoint.
15017
15018 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15019
15020 * server.c (main): After the inferior having exited, call
15021 remote_close before exiting gdbserver.
15022
15023 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15024
15025 Fix size of FPSCR in Power 7 processors.
15026 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15027 (PPC_FEATURE_HAS_DFP): New #define.
15028 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15029 size of the FPSCR.
15030
15031 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15032
15033 * server.c (handle_query) Whitespace and formatting.
15034
15035 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15036
15037 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15038 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15039 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15040 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15041 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15042 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15043 Makefile.in, configure.ac: Fix whitespace throughout.
15044 * configure: Regenerate.
15045
15046 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15047
15048 * inferiors.c (find_inferior): Make it safe for the callback
15049 function to delete the currently iterated inferior.
15050
15051 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15052
15053 * Makefile.in (linuw_low_h): Move higher.
15054 (thread-db.o): Depend on $(linux_low_h).
15055
15056 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15057
15058 Rename "process" to "lwp" throughout.
15059
15060 * linux-low.c (all_processes): Rename to...
15061 (all_lwps): ... this.
15062 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15063 (add_process): Rename to ...
15064 (add_lwp): ... this. Adjust.
15065 (linux_create_inferior): Adjust.
15066 (linux_attach_lwp): Adjust.
15067 (linux_attach): Adjust.
15068 (linux_kill_one_process): Rename to ...
15069 (linux_kill_one_lwp): ... this. Adjust.
15070 (linux_kill): Adjust.
15071 (linux_detach_one_process): Rename to ...
15072 (linux_detach_one_lwp): ... this. Adjust.
15073 (linux_detach): Adjust.
15074 (check_removed_breakpoint): Adjust.
15075 (status_pending_p): Adjust.
15076 (linux_wait_for_process): Rename to ...
15077 (linux_wait_for_lwp): ... this. Adjust.
15078 (linux_wait_for_event): Adjust.
15079 (send_sigstop): Adjust.
15080 (wait_for_sigstop): Adjust.
15081 (stop_all_processes): Rename to ...
15082 (stop_all_lwps): ... this.
15083 (linux_resume_one_process): Rename to ...
15084 (linux_resume_one_lwp): ... this. Adjust.
15085 (linux_set_resume_request, linux_continue_one_thread)
15086 (linux_queue_one_thread, resume_status_pending_p)
15087 (usr_store_inferior_registers, regsets_store_inferior_registers)
15088 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15089 Adjust.
15090 * linux-low.h (get_process): Rename to ...
15091 (get_lwp): ... this. Adjust.
15092 (get_thread_process): Rename to ...
15093 (get_thread_lwp): ... this. Adjust.
15094 (get_process_thread): Rename to ...
15095 (get_lwp_thread): ... this. Adjust.
15096 (struct process_info): Rename to ...
15097 (struct lwp_info): ... this.
15098 (all_processes): Rename to ...
15099 (all_lwps): ... this.
15100 * proc-service.c (ps_lgetregs): Adjust.
15101 * thread-db.c (thread_db_create_event, find_one_thread)
15102 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15103
15104 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15105
15106 * server.c (handle_query): Handle "qAttached".
15107
15108 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15109
15110 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15111 GPLv3, update license URL.
15112
15113 2009-03-01 Doug Evans <dje@google.com>
15114
15115 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15116 (server_h): Add gdb_signals.h.
15117 (signals.o): Update.
15118 * server.h (target_signal_from_host,target_signal_to_host_p)
15119 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15120
15121 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15122
15123 * remote-utils.c (getpkt): Also generate remote-debug
15124 information if noack_mode is set.
15125
15126 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15127
15128 * server.c (handle_query): Report qXfer:siginfo:read and
15129 qXfer:siginfo:write as supported and handle them.
15130 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15131 * linux-low.c (linux_xfer_siginfo): New.
15132 (linux_target_ops): Set it.
15133
15134 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15135
15136 * server.c (gdbserver_usage): Mention --remote-debug.
15137 (main): Accept '--remote-debug' switch.
15138
15139 2009-01-18 Doug Evans <dje@google.com>
15140
15141 * regcache.c (new_register_cache): No need to check result of xcalloc.
15142 * server.c (handle_search_memory): Back out calls to xmalloc,
15143 result is checked and error is returned to user upon failure.
15144 (handle_query): Ditto. Add more checks for result of malloc.
15145 (handle_v_cont): Check result of malloc, report error back to
15146 user upon failure.
15147 (handle_v_run): Ditto. Call freeargv.
15148 * server.h (freeargv): Declare.
15149 * utils.c (freeargv): New fn.
15150
15151 2009-01-15 Doug Evans <dje@google.com>
15152
15153 * gdbreplay.c (perror_with_name): Make arg const char *.
15154 * server.h (target_signal_to_name): Make return type const char *.
15155 * thread-db.c (thread_db_err_str): Make return type const char *.
15156 * utils.c (perror_with_name): Make arg const char *.
15157
15158 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15159
15160 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15161 when handling a EXIT_PROCESS_DEBUG_EVENT.
15162
15163 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15164
15165 * gdbreplay.c (gdbreplay_version): Update copyright year.
15166 * server.c (gdbserver_version): Likewise.
15167
15168 2009-01-05 Doug Evans <dje@google.com>
15169
15170 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15171 (handle_extended_wait): Improve comment.
15172
15173 2008-12-13 Doug Evans <dje@google.com>
15174
15175 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15176 * server.h (ATTR_MALLOC): New macro.
15177 (xmalloc,xcalloc,xstrdup): Declare.
15178 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15179 * inferiors.c: Ditto.
15180 * linux-low.c: Ditto.
15181 * mem-break.c: Ditto.
15182 * regcache.c: Ditto.
15183 * remote-utils.c: Ditto.
15184 * server.c: Ditto.
15185 * target.c: Ditto.
15186 * win32-low.c: Ditto.
15187
15188 2008-12-12 Doug Evans <dje@google.com>
15189
15190 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15191 in debugging printf.
15192
15193 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15194
15195 2008-12-09 Doug Evans <dje@google.com>
15196
15197 * linux-low.h (struct process_info): Delete member tid, unused.
15198 * thread-db.c (find_one_thread): Update.
15199 (maybe_attach_thread): Update.
15200
15201 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15202
15203 * target.h (struct target_ops): Add qxfer_osdata member.
15204 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15205 and dirent.h.
15206 (linux_qxfer_osdata): New functions.
15207 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15208 callback.
15209 * server.c (handle_query): Handle "qXfer:osdata:read:".
15210 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15211 (buffer_xml_printf): New functions.
15212 * server.h (struct buffer): New.
15213 (buffer_grow_str, buffer_grow_str0): New macros.
15214 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15215 (buffer_xml_printf): Declare.
15216
15217 2008-11-24 Doug Evans <dje@google.com>
15218
15219 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15220
15221 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15222
15223 * server.c (handle_v_run): Always use the supplied argument list.
15224
15225 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15226
15227 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15228 (xtensa_regmap_table): Add entry for scompare1.
15229
15230 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15231
15232 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15233 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15234 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15235 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15236 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15237 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15238 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15239 XML target descriptions.
15240 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15241 when inferior is running on an ISA 2.05 or later processor. Add
15242 special case to return offset for full 64-bit slot of FPSCR when
15243 in 32-bits.
15244
15245 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15246
15247 * Makefile.in (SFILES, clean): Added sparc64 files.
15248 (reg-sparc64.o, reg-sparc64.c): New.
15249 * configure.srv (sparc*-*-linux*): New configuration.
15250 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15251 syscall arguments for SPARC.
15252 (regsets_store_inferior_registers): Likewise.
15253 * linux-sparc-low.c: New file.
15254
15255 2008-10-21 Doug Evans <dje@google.com>
15256
15257 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15258 (READLINE_DIR,READLINE_DEP): Delete.
15259 (INTERNAL_CFLAGS): Update.
15260 (LINTFLAGS): Update.
15261
15262 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15263
15264 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15265 whole argv from the last run, not just argv[0].
15266
15267 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15268
15269 * regcache.c (new_register_cache): Return NULL if the register
15270 cache size isn't known yet.
15271 (free_register_cache): Avoid dereferencing a NULL regcache.
15272
15273 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15274
15275 * configure.srv: Merge MIPS and MIPS64.
15276
15277 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15278
15279 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15280
15281 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15282
15283 * Makefile.in: Add required vsx dependencies.
15284
15285 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15286 Declare init_registers_powerpc_vsx32l.
15287 Declare init_registers_powerpc_vsx64l.
15288 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15289 (ppc_arch_setup): Check for VSX in hwcap.
15290 (ppc_fill_vsxregset): New function.
15291 (ppc_store_vsxregset): New function.
15292 Add new VSX entry in regset_info target_regsets.
15293
15294 * configure.srv: Add new VSX dependencies.
15295
15296 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15297
15298 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15299 (remote_open): Set or clear transport_is_reliable.
15300 (putpkt_binary): Don't expect acks in noack mode.
15301 (getpkt): Don't send ack/nac in noack mode.
15302 * server.c (handle_general_set): Handle QStartNoAckMode.
15303 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15304 qSupported.
15305 (main): Reset noack_mode on every connection.
15306 * server.h (noack_mode): Declare.
15307
15308 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15309
15310 * Makefile.in (GDBREPLAY_OBS): New variable.
15311 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15312
15313 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15314 Daniel Jacobowitz <dan@codesourcery.com>
15315
15316 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15317 (usr_store_inferior_registers): Likewise.
15318 (regsets_store_inferior_registers): Likewise.
15319
15320 2008-07-31 Rolf Jansen <rj@surtec.com>
15321 Pedro Alves <pedro@codesourcery.com>
15322
15323 * configure.ac: Check for memmem declaration.
15324 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15325 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15326 (disable_packet_qfThreadInfo): Unconditionally compile.
15327 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15328 * configure, config.in: Regenerate.
15329
15330 2008-07-28 Doug Kwan <dougkwan@google.com>
15331
15332 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15333 (linux_write_memory): Remove declaration of errno.
15334
15335 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15336
15337 * linux-low.c (handle_extended_wait): Do not use "status"
15338 variable uninitialized.
15339
15340 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15341
15342 * server.c (handle_v_attach): Inhibit reporting dll changes.
15343
15344 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15345
15346 * remote-utils.c (prepare_resume_reply): If requested, don't
15347 output "thread:TID" in the T stop reply.
15348
15349 * server.c (disable_packet_vCont, disable_packet_Tthread)
15350 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15351 (handle_query): If requested, disable support for qC, qfThreadInfo
15352 and qsThreadInfo.
15353 (handle_v_requests): If requested, disable support for vCont.
15354 (gdbserver_show_disableable): New.
15355 (main): Handle --disable-packet and --disable-packet=LIST.
15356
15357 * server.h (disable_packet_vCont, disable_packet_Tthread)
15358 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15359
15360 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15361
15362 * server.c (gdbserver_usage): Mention --version.
15363
15364 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15365
15366 * Makefile.in (gdbreplay.o): New rule.
15367
15368 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15369
15370 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15371 message, not gdbserver.
15372
15373 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15374 Nathan Sidwell <nathan@codesourcery.com>
15375 Joseph Myers <joseph@codesourcery.com>
15376
15377 * acinclude.m4: Include ../../config/acx.m4.
15378 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15379 * configure, config.in: Regenerate.
15380 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15381 * server.c (gdbserver_version): Print PKGVERSION.
15382 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15383 (main): Adjust gdbserver_usage calls.
15384 * gdbreplay.c (version, host_name): Add declarations.
15385 (gdbreplay_version, gdbreplay_usage): New.
15386 (main): Accept --version and --help options.
15387
15388 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15389
15390 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15391 (arm_breakpoint_at): Handle Thumb.
15392 (the_low_target): Add comment.
15393
15394 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15395
15396 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15397
15398 2008-05-09 Doug Evans <dje@google.com>
15399
15400 * server.h (decode_search_memory_packet): Declare.
15401 * remote-utils.c (decode_search_memory_packet): New fn.
15402 * server.c (handle_search_memory_1): New fn.
15403 (handle_search_memory): New fn.
15404 (handle_query): Process qSearch:memory packets.
15405
15406 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15407
15408 * regcache.c (registers_length): Remove.
15409 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15410 full register packet.
15411 * regcache.h (registers_length): Remove prototype.
15412 * server.h (PBUFSIZ): Define to 16384.
15413
15414 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15415
15416 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15417 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15418 powerpc-64l.o, and powerpc-altivec64l.o.
15419 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15420 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15421 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15422 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15423 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15424 to srv_xmlfiles.
15425
15426 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15427 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15428 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15429 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15430 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15431 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15432 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15433 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15434 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15435 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15436 (clean): Update.
15437
15438 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15439 (init_registers_powerpc_32l): ... this new prototype.
15440 (init_registers_powerpc_32): Remove, replace by ...
15441 (init_registers_powerpc_altivec32l): ... this new prototype.
15442 (init_registers_powerpc_e500): Remove, replace by ...
15443 (init_registers_powerpc_e500l): ... this new prototype.
15444 (init_registers_ppc64): Remove, replace by ...
15445 (init_registers_powerpc_64l): ... this new prototype.
15446 (init_registers_powerpc_64): Remove, replace by ...
15447 (init_registers_powerpc_altivec64l): ... this new prototype.
15448 (ppc_num_regs): Set to 73.
15449 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15450 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15451 (ppc_cannot_store_register): Handle orig_r3 and trap.
15452 (ppc_arch_setup): Update init_registers_... calls.
15453 (ppc_fill_gregset): Handle orig_r3 and trap.
15454
15455 * inferiors.c (clear_inferiors): Reset current_inferior.
15456
15457 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15458
15459 * acinclude.m4: Add override.m4.
15460 * configure: Regenerate.
15461
15462 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15463
15464 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15465 initial call to init_register_ppc64.
15466
15467 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15468
15469 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15470 single powerpc*-*-linux* case.
15471 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15472
15473 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15474
15475 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15476 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15477 from reg_xmlfiles.
15478 * linux-ppc-low.c: Include <elf.h>.
15479 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15480 (ppc_hwcap): New global variable.
15481 (ppc_regmap): Remove __SPE__ #ifdef sections.
15482 (ppc_regmap_e500): New global variable.
15483 (ppc_cannot_store_register): Update __SPE__ special case.
15484 (ppc_get_hwcap): New function.
15485 (ppc_arch_setup): Use it to determine whether inferior supports
15486 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15487 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15488 Do not access registers if target does not support AltiVec.
15489 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15490 Do not access registers if target does not support SPE.
15491 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15492
15493 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15494
15495 * linux-low.c (disabled_regsets, num_regsets): New.
15496 (use_regsets_p): Delete.
15497 (linux_wait_for_process): Clear disabled_regsets.
15498 (regsets_fetch_inferior_registers): Check and set it.
15499 (regsets_store_inferior_registers): Likewise.
15500 (linux_fetch_registers, linux_store_registers): Do not use
15501 use_regsets_p.
15502 (initialize_low): Allocate disabled_regsets.
15503
15504 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15505
15506 * Makefile.in (LIBOBJS): New.
15507 (OBS): Use LIBOBJS.
15508 (memmem.o): New rule.
15509 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15510 * configure: Regenerated.
15511
15512 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15513
15514 * server.c (handle_query): Never return "unsupported" for
15515 qXfer:features:read queries.
15516
15517 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15518
15519 * server.c (get_features_xml): Fix inverted condition.
15520 (handle_query): Always support qXfer:feature:read.
15521
15522 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15523
15524 * server.c (wrapper_argv): New.
15525 (start_inferior): Handle wrapper_argv. If set, expect an extra
15526 trap.
15527 (gdbserver_usage): Document --wrapper.
15528 (main): Parse --wrapper.
15529
15530 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15531
15532 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15533 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15534 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15535 (ppc_set_pc): Likewise.
15536 (ppc_arch_setup): New function.
15537 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15538 of collect_register.
15539 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15540
15541 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15542
15543 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15544 instead of linux-ppc64-low.o.
15545 * linux-ppc64-low.c: Remove file.
15546 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15547 (linux-ppc64-low.o): Remove rule.
15548
15549 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15550 (init_registers_powerpc_64): Likewise.
15551 (ppc_regmap): Conditionally define depending on __powerpc64__.
15552 (ppc_cannot_store_register): Do not special-case "fpscr" when
15553 compiled on __powerpc64__.
15554 (ppc_collect_ptrace_register): New function.
15555 (ppc_supply_ptrace_register): New function.
15556 (ppc_breakpoint): Change type to "unsigned int".
15557 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15558 (the_low_target): Conditionally provide initializers for the
15559 arch_setup member depending on __powerpc64__. Install
15560 collect_ptrace_register and supply_ptrace_register members.
15561
15562 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15563
15564 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15565 * server.c (gdbserver_xmltarget): Define.
15566 (get_features_xml): Use it to replace "target.xml" and arch_string.
15567
15568 * configure.srv: Remove srv_xmltarget. Add XML files that were
15569 mentioned there to srv_xmlfiles instead. Remove conditional tests
15570 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15571 srv_xmlfiles and srv_regobj to include all possible choices.
15572 * configure.ac (srv_xmltarget): Remove.
15573 (srv_xmlfiles): Do not add "target.xml".
15574 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15575 checks for supplementary target information.
15576 * configure: Regenerate.
15577 * Makefile.in (XML_TARGET): Remove.
15578 (target.xml): Remove rule.
15579 (clean): Do not clean up target.xml.
15580 (.PRECIOUS): Do not mention target.xml.
15581
15582 * target.h (struct target_ops): Remove arch_string member.
15583 * linux-low.c (linux_arch_string): Remove.
15584 (linux_target_ops): Remove arch_string initializer.
15585 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15586 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15587 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15588 * spu-low.c (spu_arch_string): Remove.
15589 (spu_target_ops): Remove arch_string initializer.
15590 * win32-low.c (win32_arch_string): Remove.
15591 (win32_target_ops): Remove arch_string initializer.
15592 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15593 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15594 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15595
15596 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15597
15598 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15599 by collect_ptrace_register and supply_ptrace_register hooks.
15600 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15601 instead of checking for the_low_target.left_pad_xfer.
15602 (usr_store_inferior_registers): Use collect_ptrace_register callback
15603 instead of checking for the_low_target.left_pad_xfer.
15604
15605 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15606 (s390_supply_ptrace_register): Likewise.
15607 (s390_fill_gregset): Call s390_collect_ptrace_register.
15608 (the_low_target): Update.
15609
15610 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15611 (ppc_supply_ptrace_register): Likewise.
15612 (the_low_target): Update.
15613
15614 * linux-i386-low.c (the_low_target): Update.
15615 * linux-x86-64-low.c (the_low_target): Update.
15616
15617 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15618
15619 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15620 reg-s390.o and reg-s390x.o.
15621
15622 * linux-low.c (new_inferior): New global variable.
15623 (linux_create_inferior, linux_attach): Set it.
15624 (linux_wait_for_process): Call the_low_target.arch_setup after the
15625 target has stopped for the first time.
15626 (initialize_low): Do not call the_low_target.arch_setup.
15627
15628 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15629 (s390_set_pc): Likewise.
15630 (s390_arch_setup): New function.
15631 (the_low_target): Use s390_arch_setup as arch_setup routine.
15632
15633 * regcache.c (realloc_register_cache): New function.
15634 (set_register_cache): Call it for each existing regcache.
15635
15636 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15637
15638 * server.h (init_registers): Remove prototype.
15639
15640 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15641 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15642 instead of init_registers ().
15643 * linux-arm-low.c (init_registers_arm): Add prototype.
15644 (init_registers_arm_with_iwmmxt): Likewise.
15645 (the_low_target): Add initializer for arch_setup field.
15646 * linux-cris-low.c (init_registers_cris): Add prototype.
15647 (the_low_target): Add initializer for arch_setup field.
15648 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15649 (the_low_target): Add initializer for arch_setup field.
15650 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15651 (the_low_target): Add initializer for arch_setup field.
15652 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15653 (the_low_target): Add initializer for arch_setup field.
15654 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15655 (the_low_target): Add initializer for arch_setup field.
15656 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15657 (the_low_target): Add initializer for arch_setup field.
15658 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15659 (init_registers_mips64_linux): Likewise.
15660 (the_low_target): Add initializer for arch_setup field.
15661 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15662 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15663 (the_low_target): Add initializer for arch_setup field.
15664 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15665 (init_registers_powerpc_64): Likewise.
15666 (the_low_target): Add initializer for arch_setup field.
15667 * linux-s390-low.c (init_registers_s390): Add prototype.
15668 (init_registers_s390x): Likewise.
15669 (the_low_target): Add initializer for arch_setup field.
15670 * linux-sh-low.c (init_registers_sh): Add prototype.
15671 (the_low_target): Add initializer for arch_setup field.
15672 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15673 (the_low_target): Add initializer for arch_setup field.
15674 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15675 (the_low_target): Add initializer for arch_setup field.
15676
15677 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15678 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15679 instead of init_registers ().
15680 * win32-arm-low.c (init_registers_arm): Add prototype.
15681 (the_low_target): Add initializer for arch_setup field.
15682 * win32-i386-low.c (init_registers_i386): Add prototype.
15683 (the_low_target): Add initializer for arch_setup field.
15684
15685 * spu-low.c (init_registers_spu): Add prototype.
15686 (initialize_low): Call initialie_registers_spu () instead of
15687 initialize_registers ().
15688
15689 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15690
15691 * server.c (handle_v_requests): When handling the vRun and vAttach
15692 packets, if already debugging a process, don't kill it. Return an
15693 error instead.
15694
15695 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15696
15697 * server.c (handle_query): Correct length check.
15698
15699 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15700
15701 * win32-low.c (do_initial_child_stuff): Add process handle
15702 parameter. Set current_process_handle and current_process_id from the
15703 parameters. Clear globals.
15704 (win32_create_inferior): Don't set current_process_handle and
15705 current_process_id here. Instead pass them on the call to
15706 do_initial_child_stuff.
15707 (win32_attach): Likewise.
15708 (win32_clear_inferiors): New.
15709 (win32_kill): Don't close the current process handle or the
15710 current thread handle here. Instead call win32_clear_inferiors.
15711 (win32_detach): Don't open a new handle to the process. Call
15712 win32_clear_inferiors.
15713 (win32_join): Don't rely on current_process_handle; open a new
15714 handle using the process id.
15715 (win32_wait): Call win32_clear_inferiors when the inferior process
15716 has exited.
15717
15718 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15719
15720 * server.c (monitor_show_help): Add "exit".
15721
15722 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15723
15724 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15725 (clean): Add reg-xtensa.c.
15726 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15727 * configure.srv (xtensa*-*-linux*) New target.
15728 * linux-xtensa-low.c: New.
15729 * xtensa-xtregs.c: New.
15730
15731 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15732
15733 * hostio.c: Don't include errno.h.
15734 (errno_to_fileio_errno): Move to hostio-errno.
15735 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15736 error number outputting to the target->hostio_last_error callback.
15737 (hostio_packet_error): Use FILEIO_EINVAL directly.
15738 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15739 calls to hostio_error.
15740 * hostio-errno.c: New.
15741 * server.h (hostio_last_error_from_errno): Declare.
15742 * target.h (target_ops): Add hostio_last_error member.
15743 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15744 as hostio_last_error handler.
15745 * spu-low.c (spu_target_ops): Likewise.
15746 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15747 (wince_hostio_last_error): New functions.
15748 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15749 as hostio_last_error handler.
15750 (win32_target_ops) [!_WIN32_WCE]: Register
15751 hostio_last_error_from_errno as hostio_last_error handler.
15752 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15753 (hostio-errno.o): New rule.
15754 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15755 * configure.srv (srv_hostio_err_objs): New variable. Default to
15756 hostio-errno.o.
15757 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15758 * configure: Regenerate.
15759
15760 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15761
15762 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15763 (linux_kill, linux_detach): Clean up the process list.
15764 * remote-utils.c (remote_open): Improve port number parsing.
15765 (putpkt_binary, input_interrupt): Only send interrupts if the target
15766 is running.
15767 * server.c (extended_protocol): Make static.
15768 (attached): Define earlier.
15769 (exit_requested, response_needed, program_argv): New variables.
15770 (target_running): New.
15771 (start_inferior): Clear attached here.
15772 (attach_inferior): Set attached here.
15773 (require_running): Define.
15774 (handle_query): Use require_running and target_running. Implement
15775 "monitor exit".
15776 (handle_v_attach, handle_v_run): New.
15777 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15778 (gdbserver_usage): Update.
15779 (main): Redo argument parsing. Handle --debug and --multi. Handle
15780 --attach along with other options or after the port. Save
15781 program_argv. Support no initial program. Resynchronize
15782 communication with GDB after an error. Handle "monitor exit".
15783 Use require_running and target_running. Always allow the extended
15784 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15785 restart in extended mode.
15786 * README: Refer to the GDB manual. Update --attach usage.
15787
15788 2007-12-20 Andreas Schwab <schwab@suse.de>
15789
15790 * linux-low.c (STACK_SIZE): Define.
15791 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15792 (linux_test_for_tracefork): Likewise.
15793
15794 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15795
15796 * linux-low.c (linux_wait_for_event): Update messages. Do not
15797 reinsert auto-delete breakpoints.
15798 * mem-break.c (struct breakpoint): Change return type of handler to
15799 int.
15800 (set_breakpoint_at): Update handler type.
15801 (reinsert_breakpoint_handler): Return 1 instead of calling
15802 delete_breakpoint.
15803 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15804 setting a new one.
15805 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15806 * mem-break.h (set_breakpoint_at): Update handler type.
15807 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15808 * win32-low.c (auto_delete_breakpoint): New.
15809 (get_child_debug_event): Use it.
15810
15811 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15812
15813 * configure.ac: Check for pread and pwrite.
15814 * hostio.c (handle_pread): Fall back to lseek and read.
15815 (handle_pwrite): Fall back to lseek and write.
15816 * config.in, configure: Regenerated.
15817
15818 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15819
15820 * server.c (myresume): Add own_buf argument.
15821 (main): Update calls.
15822
15823 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15824
15825 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15826 * remote-utils.c (remote_open): Do not call disable_async_io.
15827 (block_async_io): Delete.
15828 (unblock_async_io): Make static.
15829 (initialize_async_io): New.
15830 * server.c (handle_v_cont): Handle async I/O here.
15831 (myresume): Likewise. Move other common resume tasks here...
15832 (main): ... from here. Call initialize_async_io. Disable async
15833 I/O before the main loop.
15834 * server.h (initialize_async_io): Declare.
15835 (block_async_io, unblock_async_io): Delete prototypes.
15836 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15837
15838 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15839
15840 * remote-utils.c (readchar): Allow binary data in received messages.
15841
15842 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15843
15844 * win32-low.c (attaching): New global.
15845 (win32_create_inferior): Clear the `attaching' global.
15846 (win32_attach): Set the `attaching' global.
15847 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15848 attaching. Only set a breakpoint at the entry point if not
15849 attaching.
15850
15851 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15852
15853 * server.c (main): Don't report dll events on the initial
15854 connection on attaches.
15855
15856 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15857
15858 * server.c (main): Relax numerical bases supported for the pid of
15859 the --attach command line argument.
15860
15861 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15862
15863 * win32-low.c (win32_attach): Call OpenProcess before
15864 DebugActiveProcess, not after. Add last error output to error
15865 call.
15866
15867 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15868
15869 * win32-low.c (win32_get_thread_context)
15870 (win32_set_thread_context): New functions.
15871 (thread_rec): Use win32_get_thread_context.
15872 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15873 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15874 field.
15875
15876 2007-12-03 Leo Zayas
15877 Pedro Alves <pedro_alves@portugalmail.pt>
15878
15879 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15880 global variables.
15881 (child_add_thread): Minor cleanup.
15882 (child_continue): Resume artificially suspended threads before
15883 calling ContinueDebugEvent.
15884 (suspend_one_thread): New.
15885 (fake_breakpoint_event): New.
15886 (get_child_debug_event): Change return type to int. Check here if
15887 gdb sent an interrupt request. If a soft interrupt was requested,
15888 fake a breakpoint event. Return 0 if there is no event to handle,
15889 and 1 otherwise.
15890 (win32_wait): Don't check here if gdb sent an interrupt request.
15891 Ensure there is a valid event to handle.
15892 (win32_request_interrupt): Add soft interruption method as last
15893 resort.
15894
15895 2007-12-03 Leo Zayas
15896 Pedro Alves <pedro_alves@portugalmail.pt>
15897
15898 * win32-low.h (win32_thread_info): Add descriptions to the
15899 structure members. Replace `suspend_count' counter by a
15900 `suspended' flag.
15901 * win32-low.c (thread_rec): Update condition of when to get the
15902 context from the inferior. Rely on ContextFlags being set if it
15903 has already been retrieved. Only suspend the inferior thread if
15904 we haven't already. Warn if that fails.
15905 (continue_one_thread): s/suspend_count/suspended/. Only call
15906 ResumeThread once. Warn if that fails.
15907
15908 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15909
15910 * win32-low.c (win32_wait): Don't read from the inferior when it
15911 has already exited.
15912
15913 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15914
15915 * Makefile.in (win32_low_h): New variable.
15916 (win32-low.o): Add dependency on $(win32_low_h).
15917 (win32-arm-low.o, win32-i386-low.o): New rules.
15918
15919 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15920
15921 * hostio.c: Correct copyright year.
15922
15923 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15924
15925 * Makefile.in (OBS): Add hostio.o.
15926 (hostio.o): New rule.
15927 * server.h (handle_vFile): Declare.
15928 * hostio.c: New file.
15929 * server.c (handle_v_requests): Take packet_len and new_packet_len
15930 for binary packets. Call handle_vFile.
15931 (main): Update call to handle_v_requests.
15932
15933 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15934
15935 * linux-low.c: Include <sched.h>.
15936
15937 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15938
15939 * linux-low.c (linux_tracefork_grandchild): New.
15940 (linux_tracefork_child): Use clone.
15941 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15942
15943 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15944
15945 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15946
15947 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15948
15949 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15950
15951 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15952
15953 * inferiors.c (change_inferior_id): Delete.
15954 (add_pid_to_list, pull_pid_from_list): New.
15955 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15956 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15957 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15958 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15959 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15960 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15961 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15962 (using_threads): Always set to 1.
15963 (handle_extended_wait): New.
15964 (add_process): Do not set TID.
15965 (linux_create_inferior): Set must_set_ptrace_flags.
15966 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15967 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15968 (linux_thread_alive): Rename TID argument to LWPID.
15969 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15970 (linux_wait_for_event): Do not use TID or check using_threads. Update
15971 call to dead_thread_notify. Call handle_extended_wait.
15972 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15973 (send_sigstop): Delete sigstop_sent.
15974 (wait_for_sigstop): Avoid TID.
15975 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15976 (linux_test_for_tracefork): New.
15977 (linux_lookup_signals): Use thread_db_active and
15978 linux_supports_tracefork_flag.
15979 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15980 * linux-low.h (get_process_thread): Avoid TID.
15981 (struct process_ifo): Move thread_known and tid to the end. Remove
15982 sigstop_sent.
15983 (linux_attach_lwp, thread_db_init): Update prototypes.
15984 * server.h (change_inferior_id): Delete prototype.
15985 (add_pid_to_list, pull_pid_from_list): New prototypes.
15986 * thread-db.c (thread_db_use_events): New.
15987 (find_first_thread): Rename to...
15988 (find_one_thread): ...this. Update callers and messages. Do not
15989 call fatal. Check thread_db_use_events. Do not call
15990 change_inferior_id or new_thread_notify.
15991 (maybe_attach_thread): Update. Do not call new_thread_notify.
15992 (thread_db_init): Set thread_db_use_events. Check use_events.
15993 * utils.c (fatal, warning): Correct message prefix.
15994
15995 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15996
15997 * Makefile.in (clean): Remove new files.
15998 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15999 (powerpc-64.o, powerpc-64.c): New rules.
16000 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16001 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16002 with SPE.
16003 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16004 SPE targets.
16005 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16006 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16007 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16008 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16009 (target_regsets): Add AltiVec and SPE register sets.
16010 * configure.ac: Check for AltiVec and SPE.
16011 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16012 (ppc_fill_vrregset, ppc_store_vrregset): New.
16013 (target_regsets): Add AltiVec register set.
16014 * configure: Regenerated.
16015
16016 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16017
16018 * linux-low.c (O_LARGEFILE): Define.
16019 (linux_read_memory): Use /proc/PID/mem.
16020 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16021 * configure, config.in: Regenerated.
16022
16023 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16024
16025 * linux-low.c (linux_wait_for_event): Do not pass signals while
16026 single-stepping.
16027
16028 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16029
16030 * win32-low.c (create_process): New.
16031 (win32_create_inferior): Use create_process instead of
16032 CreateProcess. If create_process failed retry appending an ".exe"
16033 suffix. Store the GetLastError result immediatelly after
16034 create_process calls and use it on the call to error.
16035
16036 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16037
16038 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16039
16040 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16041
16042 * configure.ac: Switch license to GPLv3.
16043
16044 2007-08-01 Michael Snyder <msnyder@access-company.com>
16045
16046 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16047
16048 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16049
16050 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16051 typedef.
16052 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16053 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16054 CloseToolhelp32Snapshot.
16055 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16056 CloseToolhelp32Snapshot.
16057
16058 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16059
16060 * server.c (main): Check for inferior exit before main loop.
16061
16062 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16063
16064 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16065 instead of on tmp_desc.
16066
16067 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16068 Daniel Jacobowitz <dan@codesourcery.com>
16069
16070 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16071 (add_thread): Minor cleanups.
16072 (clear_inferiors): Move lower in the file. Clear the DLL
16073 list.
16074 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16075 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16076 (xml_escape_text): New.
16077 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16078 for qSupported.
16079 (handle_v_cont): Report errors.
16080 (gdbserver_version): Update.
16081 (main): Correct size of own_buf. Do not report initial DLL events.
16082 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16083 (unloaded_dll, xml_escape_text): New.
16084 * win32-low.c (enum target_waitkind): Update comments.
16085 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16086 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16087 (win32_EnumProcessModules, win32_GetModuleInformation)
16088 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16089 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16090 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16091 (win32_Module32First, win32_Module32Next, load_toolhelp)
16092 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16093 (get_child_debug_event): Handle DLL events.
16094 (win32_wait): Likewise.
16095
16096 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16097
16098 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16099 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16100
16101 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16102
16103 * win32-low.c (handle_output_debug_string): Ignore event if not
16104 waiting.
16105
16106 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16107
16108 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16109
16110 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16111
16112 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16113
16114 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16115
16116 * inferiors.c (change_inferior_id): Add comment.
16117 * linux-low.c (check_removed_breakpoint): Add an early
16118 prototype. Improve debug output.
16119 (linux_attach): Doc update.
16120 (linux_detach_one_process, linux_detach): Clean up before releasing
16121 each process.
16122 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16123 * linux-low.h (struct process_info): Doc improvement.
16124 * mem-break.c (delete_all_breakpoints): New.
16125 * mem-break.h (delete_all_breakpoints): New prototype.
16126 * thread-db.c (find_first_thread): New.
16127 (thread_db_create_event): Call it instead of
16128 thread_db_find_new_threads. Clean up unused variables.
16129 (maybe_attach_thread): Remove first thread handling.
16130 (thread_db_find_new_threads): Use find_first_thread.
16131 (thread_db_get_tls_address): Likewise.
16132
16133 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16134
16135 * thread-db.c (thread_db_find_new_threads): Add prototype.
16136 (thread_db_create_event): Check for the main thread before adding
16137 a new thread.
16138 (maybe_attach_thread): Only enable event reporting if TID == 0.
16139 (thread_db_get_tls_address): Check for new threads.
16140
16141 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16142
16143 * linux-low.c (linux_create_inferior): Try execv before execvp.
16144 * spu-low.c (spu_create_inferior): Likewise.
16145
16146 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16147
16148 * linux-low.c (linux_create_inferior): Change execv to execvp.
16149 * spu-low.c (spu_create_inferior): Likewies.
16150
16151 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16152
16153 * Makefile.in (clean): Clean new files instead of deleted ones.
16154 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16155 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16156 rules.
16157 * configure.srv: Specify XML files and new regformats for MIPS and
16158 MIPS64 GNU/Linux.
16159 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16160 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16161 an entry for the restart register.
16162 (mips_cannot_fetch_register, mips_cannot_store_register)
16163 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16164 register names to match the XML descriptions.
16165 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16166 restart register instead of $0.
16167
16168 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16169 Markus Deuling <deuling@de.ibm.com>
16170
16171 * remote-utils.c (decode_xfer_write): New function.
16172 * server.h (decode_xfer_write): Add prototype.
16173 * server.c (handle_query): Add PACKET_LEN argument. Support
16174 qXfer:spu:read and qXfer:spu:write packets.
16175 (main): Pass packet_len to handle_query.
16176 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16177 * target.h (target_ops): Add qxfer_spu.
16178
16179 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16180
16181 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16182 accessing non-seekable spufs files.
16183
16184 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16185
16186 * server.c (handle_query): Add reply for qC packet.
16187
16188 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16189 Leo Zayas <lerele@champenstudios@com>
16190
16191 * server.h (check_remote_input_interrupt_request): New function.
16192 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16193 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16194 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16195 (check_remote_input_interrupt_request): New function.
16196 * server.h (check_remote_input_interrupt_request): Declare.
16197 * win32-low.c (winapi_DebugBreakProcess,
16198 winapi_GenerateConsoleCtrlEvent): New typedefs.
16199 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16200 to 250 ms.
16201 (win32_wait): Check for remote interrupt request
16202 with check_remote_input_interrupt_request.
16203 (win32_request_interrupt): New function.
16204 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16205
16206 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16207
16208 * win32-low.c (debug_registers_changed,
16209 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16210 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16211 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16212 (thread_rec): Get context using the low target.
16213 (child_add_thread): Call thread_added on the low target,
16214 which does the same thing.
16215 (regptr): Delete.
16216 (do_initial_child_stuff): Remove debug registers references.
16217 Set context using the low target. Resume threads after
16218 setting the contexts.
16219 (child_continue): Remove dead variable. Remove debug
16220 registers references.
16221 (child_fetch_inferior_registers): Go through the low target.
16222 (do_child_store_inferior_registers): Remove.
16223 (child_store_inferior_registers): Go through the low target.
16224 (win32_resume): Remove debug registers references.
16225 Set context using the low target.
16226 (handle_exception): Change return type to void. Don't record
16227 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16228 first chance exception.
16229 (get_child_debug_event): Change return type to void. Remove
16230 goto loop. Always return after waiting for debug event.
16231 (win32_wait): Convert to switch statement. Handle spurious
16232 events.
16233
16234 * win32-i386-low.c (debug_registers_changed,
16235 debug_registers_used): New.
16236 (initial_stuff): Rename to ...
16237 (i386_initial_stuff): ... this. Clear debug registers
16238 state variables.
16239 (store_debug_registers): Delete.
16240 (i386_get_thread_context): New.
16241 (load_debug_registers): Delete.
16242 (i386_set_thread_context): New.
16243 (i386_thread_added): New.
16244 (single_step): Rename to ...
16245 (i386_single_step): ... this.
16246 (do_fetch_inferior_registers): Rename to ...
16247 (i386_fetch_inferior_register): ... this.
16248 (i386_store_inferior_register): New.
16249 (the_low_target): Adapt to new interface.
16250
16251 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16252 (arm_get_thread_context): New.
16253 (arm_set_thread_context): New.
16254 (regptr): New.
16255 (do_fetch_inferior_registers): Rename to ...
16256 (arm_fetch_inferior_register): ... this.
16257 (arm_store_inferior_register): New.
16258 (arm_wince_breakpoint): Reimplement as unsigned long.
16259 (arm_wince_breakpoint_len): Define.
16260 (the_low_target): Adapt to new interface.
16261
16262 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16263 load_debug_registers. Add get_thread_context, set_thread_context,
16264 thread_added and store_inferior_register. Rename
16265 fetch_inferior_registers to fetch_inferior_register.
16266 (regptr): Remove declaration.
16267
16268 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16269
16270 * linux-low.c (linux_detach): Change return type to int. Return 0.
16271 * spu-low.c (spu_detach): Likewise.
16272
16273 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16274
16275 * target.h (target_ops): Change return type of detach to int.
16276 Add join.
16277 (join_inferior): New.
16278 * server.c (main): Don't skip detach support on mingw32.
16279 If the inferior doesn't support detaching return error.
16280 Call join_inferior instead of using waitpid.
16281 * linux-low.c (linux_join): New.
16282 (linux_target_op): Add linux_join.
16283 * spu-low.c (spu_join): New.
16284 (spu_target_ops): Add spu_join.
16285 * win32-low.c (win32_detach): Adapt to new interface.
16286 Reopen current_process_handle before detaching. Issue a child
16287 resume before detaching.
16288 (win32_join): New.
16289 (win32_target_op): Add win32_join.
16290
16291 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16292
16293 * win32-low.c (win32-attach): Fix return value.
16294 * target.h (target_ops): Describe ATTACH return values.
16295
16296 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16297
16298 * win32-low.c (GETPROCADDRESS): Define.
16299 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16300 (winapi_DebugSetProcessKillOnExit): Likewise.
16301 (win32_create_inferior): Force usage of ansi CreateProcessA.
16302 (win32_attach): Use GETPROCADDRESS.
16303 (win32_detach): Likewise.
16304
16305 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16306
16307 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16308
16309 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16310
16311 * win32-low.c: Commit leftover changes from 2007-03-29.
16312
16313 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16314
16315 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16316 fields short instead of int. Add explicit padding.
16317 (i387_cache_to_fsave): Remove unnecessary casts.
16318 (i387_fsave_to_cache): Doc fix.
16319 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16320
16321 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16322
16323 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16324 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16325
16326 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16327
16328 * configure.srv (arm*-*-mingw32ce*): Move near the other
16329 arm targets.
16330
16331 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16332
16333 * configure.ac: Add errno checking.
16334 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16335 sys/file.h and malloc.h.
16336 (AC_CHECK_DECLS): Add perror.
16337 (srv_mingwce): Handle.
16338 * configure.srv (i[34567]86-*-cygwin*): Add
16339 win32-i386-low.o to srv_tgtobj.
16340 (i[34567]86-*-mingw*): Likewise.
16341 (arm*-*-mingw32ce*): Add case.
16342 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16343 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16344 [__MINGW32CE__] (strerror): New function.
16345 [__MINGW32CE__] (errno): Define to GetLastError.
16346 [__MINGW32CE__] (COUNTOF): New macro.
16347 (remote_open): Remove extra close call.
16348 * mem-break.c (delete_breakpoint_at): New function.
16349 * mem-break.h (delete_breakpoint_at): Declare.
16350 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16351 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16352 [USE_WIN32API] (read, write): Add char* casts.
16353 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16354 * server.h: Include wincecompat.h on Windows CE.
16355 [HAVE_ERRNO_H]: Check.
16356 (perror): Declare if not declared.
16357 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16358 (perror_with_name): Remove errno declaration.
16359 * wincecompat.h: New.
16360 * wincecompat.c: New.
16361 * win32-low.h: New.
16362 * win32-arm-low.c: New.
16363 * win32-i386-low.c: New.
16364 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16365 (OUTMSG2): Make it safe.
16366 (_T): New macro.
16367 (COUNTOF): New macro.
16368 (NUM_REGS): Get it from the low target.
16369 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16370 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16371 (thread_rec): Let low target handle debug registers.
16372 (child_add_thread): Likewise.
16373 (child_init_thread_list): Likewise.
16374 (continue_one_thread): Likewise.
16375 (regptr): New.
16376 (do_child_fetch_inferior_registers): Move to ...
16377 * win32-i386-low.c: ... here, and rename to ...
16378 (do_fetch_inferior_registers): ... this.
16379 * win32-low.c (child_fetch_inferior_registers):
16380 Go through the low target.
16381 (do_child_store_inferior_registers): Use regptr.
16382 (strwinerror): New function.
16383 (win32_create_inferior): Handle Windows CE.
16384 Use strwinerror instead of strerror on Windows error
16385 codes. Add program to the error output.
16386 Don't close the main thread handle on Windows CE.
16387 (win32_attach): Use coredll.dll on Windows CE.
16388 (win32_kill): Close current process and current
16389 thread handles.
16390 (win32_detach): Use coredll.dll on Windows CE.
16391 (win32_resume): Let low target handle debug registers, and
16392 step request.
16393 (handle_exception): Add/Remove initial breakpoint. Avoid
16394 non-existant WSTOPSIG on Windows CE.
16395 (win32_read_inferior_memory): Cast to remove warning.
16396 (win32_arch_string): Go through the low target.
16397 (initialize_low): Call set_breakpoint_data with the low
16398 target's breakpoint.
16399 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16400 FOP_REGNUM, mappings): Move to ...
16401 * win32-i386-low.c: ... here.
16402 * win32-low.c (win32_thread_info): Move to ...
16403 * win32-low.h: ... here.
16404 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16405 win32-arm-low.c and wincecompat.c.
16406 (all:): Add $EXEEXT.
16407 (install-only:): Likewise.
16408 (gdbserver:): Likewise.
16409 (gdbreplay:): Likewise.
16410 * config.in: Regenerate.
16411 * configure: Regenerate.
16412
16413 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16414
16415 * win32-low.c: Rename typedef thread_info to
16416 win32_thread_info throughout.
16417
16418 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16419
16420 * win32-i386-low.c: Rename to ...
16421 * win32-low.c: ... this.
16422 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16423 * Makefile.in: Likewise.
16424
16425 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16426
16427 * remote-utils.c (monitor_output): Constify msg parameter.
16428 * server.h (monitor_output): Likewise.
16429 * win32-i386-low.c (handle_output_debug_string): New.
16430 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16431 handle_output_debug_string.
16432 (get_child_debug_event): Likewise.
16433
16434 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16435
16436 * server.c (main): Correct strtoul check.
16437
16438 2007-03-27 Jon Ringle <jon@ringle.org>
16439
16440 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16441
16442 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16443
16444 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16445
16446 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16447
16448 * terminal.h: Check HAVE_SGTTY_H.
16449
16450 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16451
16452 * remote-utils.c (remote_open): Print out the assigned port number.
16453
16454 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16455
16456 * remote-utils.c (monitor_output): New function.
16457 * server.c (debug_threads): Define here.
16458 (monitor_show_help): New function.
16459 (handle_query): Handle qRcmd.
16460 (main): Do not handle 'd' packet.
16461 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16462 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16463 of debug_threads.
16464
16465 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16466
16467 * Makefile.in (EXEEXT): New.
16468 (clean): Use $(EXEEXT).
16469
16470 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16471
16472 * target.h (target_ops): Rename send_signal to request_interrupt,
16473 and remove enum target_signal parameter.
16474 * linux-low.c (linux_request_interrupt): Rename from
16475 linux_send_signal, and always send SIGINT.
16476 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16477 and always send SIGINT.
16478 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16479 of send_signal.
16480 (input_interrupt): Likewise.
16481
16482 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16483
16484 * server.c (get_features_xml): Check if target implemented
16485 arch_string.
16486 * win32-i386-low.c (win32_arch_string): New.
16487 (win32_target_ops): Add win32_arch_string as arch_string member.
16488
16489 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16490
16491 * spu-low.c (spu_arch_string): New.
16492 (spu_target_ops): Add spu_arch_string.
16493
16494 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16495
16496 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16497 * configure.ac: Do not check for terminal.h.
16498 * configure, config.in: Regenerated.
16499
16500 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16501
16502 * Makefile.in (OBS): Add $(XML_BUILTIN).
16503 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16504 (clean): Update.
16505 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16506 (arm-with-iwmmxt.c): New.
16507 * config.in, configure: Regenerate.
16508 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16509 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16510 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16511 (arm*-*-linux*): Add iWMMXt and regset support.
16512 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16513 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16514 (arm_store_wmmxregset, target_regsets): New.
16515 * server.c (get_features_xml): Take annex argument. Check builtin
16516 XML documents.
16517 (handle_query): Handle multiple annexes.
16518
16519 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16520
16521 * remote-utils.c [USE_WIN32API] (read, write): Define.
16522 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16523 write.
16524
16525 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16526
16527 * linux-i386-low.c (the_low_target): Set arch_string.
16528 * linux-x86-64-low.c (the_low_target): Likewise.
16529 * linux-low.c (linux_arch_string): New.
16530 (linux_target_ops): Add it.
16531 * linux-low.h (struct linux_target_ops): Add arch_string.
16532 * server.c (write_qxfer_response): Use const void * for DATA.
16533 (get_features_xml): New.
16534 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16535 * target.h (struct target_ops): Add arch_string method.
16536
16537 2007-01-03 Denis Pilat <denis.pilat@st.com>
16538 Daniel Jacobowitz <dan@codesourcery.com>
16539
16540 * linux-low.c (linux_kill): Handle being called with no threads.
16541 * win32-i386-low.c (win32_kill): Likewise.
16542 (get_child_debug_event): Clear current_process_handle.
16543
16544 2006-12-30 Denis PILAT <denis.pilat@st.com>
16545 Daniel Jacobowitz <dan@codesourcery.com>
16546
16547 * remote-utils.c (remote_open): Check the type of specified
16548 serial port devices before opening them.
16549 * server.c (main): Kill the inferior if an error occurs during
16550 the first remote_open.
16551
16552 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16553
16554 * README: Update supported targets.
16555
16556 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16557
16558 * Makefile.in (clean): Remove reg-mips64.c.
16559 (reg-mips64.c, reg-mips64.o): New rules.
16560 * configure.srv: Handle mips64. Include regset support for mips.
16561 * linux-mips-low.c (union mips_register): New.
16562 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16563 (mips_breakpoint, mips_breakpoint_at): Use int.
16564 (mips_collect_register, mips_supply_register)
16565 (mips_collect_register_32bit, mips_supply_register_32bit)
16566 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16567 (mips_store_fpregset, target_regsets): New.
16568 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16569
16570 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16571
16572 * configure.srv: Add target "spu*-*-*".
16573 * Makefile.in (clean): Remove reg-spu.c.
16574 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16575 * spu-low.c: New file.
16576
16577 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16578
16579 * configure.ac: Correct td_thr_tls_get_addr test.
16580 * configure: Regenerated.
16581
16582 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16583
16584 * linux-low.c (linux_wait_for_event): Reformat. Use the
16585 pass_signals array.
16586 * remote-utils.c (decode_address_to_semicolon): New.
16587 * server.c (pass_signals, handle_general_set): New.
16588 (handle_query): Mention QPassSignals for qSupported.
16589 (main): Call handle_general_set.
16590 * server.h (pass_signals, decode_address_to_semicolon): New.
16591
16592 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16593
16594 * server.c (handle_query): Correct error handling for read_auxv.
16595
16596 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16597
16598 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16599 and srv_linux_thread_db to yes.
16600 * linux-s390-low.c (s390_fill_gregset): New function.
16601 (target_regsets): Define data structure.
16602
16603 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16604
16605 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16606 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16607 * config.in, configure: Regenerated.
16608 * inferiors.c (gdb_id_to_thread): New function.
16609 (gdb_id_to_thread_id): Use it.
16610 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16611 * linux-low.h (struct process_info): Add th member.
16612 (thread_db_get_tls_address): New prototype.
16613 * remote-utils.c (decode_address): Make non-static.
16614 * server.c (handle_query): Handle qGetTLSAddr.
16615 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16616 * target.h (struct target_ops): Add get_tls_address.
16617 * thread-db.c (maybe_attach_thread): Save the thread handle.
16618 (thread_db_get_tls_address): New.
16619
16620 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16621
16622 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16623 (linux_resume_one_process): Take a siginfo_t *. Update all
16624 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16625 (struct pending_signals): Add a siginfo_t.
16626 (linux_wait_for_process): Always set last_status.
16627 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16628 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16629 * linux-low.h (struct process_info): Add last_status.
16630
16631 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16632
16633 * remote-utils.c (try_rle): New function.
16634 (putpkt_binary): Use it.
16635
16636 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16637
16638 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16639 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16640 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16641 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16642 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16643 point registers.
16644
16645 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16646
16647 * server.c (terminal_fd): New variable.
16648 (old_foreground_pgrp): Likewise.
16649 (restore_old_foreground_pgrp): New function.
16650 (start_inferior): Record the terminal file descriptor in terminal_fd
16651 and its original foreground group in old_foreground_pgrp. Register
16652 restore_old_foreground_pgrp with atexit().
16653
16654 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16655
16656 * server.c (handle_query): Correct qPart to qXfer.
16657
16658 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16659
16660 * configure.ac: Check for more headers which are missing on
16661 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16662 * configure.srv: Add Cygwin and mingw32.
16663 * remote-utils.c: Don't include headers unconditionally which
16664 are missing on mingw32. Include <winsock.h> for mingw32.
16665 (remote_open): Adjust for mingw32 support. Flush
16666 standard error after writing to it.
16667 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16668 (unblock_async_io, enable_async_io, disable_async_io)
16669 (readchar, getpkt): Update for Winsock support.
16670 (prepare_resume_reply): Expect a protocol signal number.
16671 * server.c: Disable <sys/wait.h> on mingw32.
16672 (start_inferior): Adjust for mingw32 support. Flush
16673 standard error after writing to it.
16674 (attach_inferior): Likewise. Use protocol signal
16675 numbers.
16676 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16677 and names.
16678 * win32-i386-low.c: New file.
16679 * Makefile.in (XM_CLIBS): Set.
16680 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16681 (win32-i386-low.o): New dependency rule.
16682 * linux-low.c (linux_wait): Use target signal numbers.
16683 * target.h (struct target_ops): Doc fix.
16684 * server.h (target_signal_to_name): New prototype.
16685 * gdbreplay.c: Don't include headers unconditionally which
16686 are missing on mingw32. Include <winsock.h> for mingw32.
16687 (remote_close, remote_open): Adjust for Winsock support.
16688 * configure, config.in: Regenerated.
16689
16690 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16691
16692 * server.c (decode_xfer_read, write_qxfer_response): New.
16693 (handle_query): Take a packet length argument. Handle
16694 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16695 the qSupported response.
16696 (main): Update call to handle_query.
16697
16698 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16699
16700 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16701 (putpkt_binary): Renamed from putpkt and adjusted for binary
16702 data.
16703 (putpkt): New wrapper for putpkt_binary.
16704 (readchar): Don't mask off the high bit.
16705 (decode_X_packet): New function.
16706 * server.c (main): Call putpkt_binary if a handler sets the packet
16707 length. Save the length of the incoming packet. Handle 'X'.
16708 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16709
16710 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16711
16712 * server.c (handle_query): Handle qSupported.
16713
16714 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16715
16716 * remote-utils.c (all_symbols_looked_up): New variable.
16717 (look_up_one_symbol): Check it.
16718 * server.h (look_up_one_symbol): New declaration.
16719 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16720
16721 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16722
16723 * Makefile.in (linux-arm-low.o): Update dependencies.
16724 * linux-arm-low.c: Include "gdb_proc_service.h".
16725 (PTRACE_GET_THREAD_AREA): Define.
16726 (ps_get_thread_area): New function.
16727
16728 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16729
16730 * configure.srv (m68k*-*-uclinux*): New target.
16731 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16732 (linux_resume_one_process): Remove extraneous cast.
16733 (linux_read_offsets): New.
16734 (linux_target_op): Add linux_read_offsets on mmuless systems.
16735 * server.c (handle_query): Add qOffsets logic.
16736 * target.h (struct target_ops): Add read_offsets.
16737
16738 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16739
16740 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16741 (PTRACE_GET_THREAD_AREA): Define.
16742 (ps_get_thread_area): New function.
16743 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16744 (linux-x86-64-low.o): Update.
16745
16746 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16747
16748 * configure.ac: Remove checks for prfpregset_t.
16749 * gdb_proc_service.h: New file.
16750 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16751 new "gdb_proc_service.h".
16752 * proc-service.c: Likewise.
16753 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16754 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16755 * Makefile.in (gdb_proc_service_h): Updated.
16756 * configure, config.in: Regenerated.
16757
16758 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16759
16760 * remote-utils.c (prepare_resume_reply): Move declaration
16761 of gdb_id_from_wait to the top of the block.
16762
16763 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16764
16765 * linux-low.c (regsets_store_inferior_registers): Read the regset
16766 from the target before filling it.
16767
16768 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16769
16770 * server.c (attach_inferior): Return SIGTRAP for a successful
16771 attach.
16772
16773 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16774
16775 * Makefile.in (OBS): Add version.o.
16776 (STAGESTUFF): Delete.
16777 (version.o): Add dependencies.
16778 (version.c): Replace rule.
16779 (clean): Remove version.c.
16780 * server.c (gdbserver_version): New.
16781 (gdbserver_usage): Use printf.
16782 (main): Handle --version and --help.
16783 * server.h (version, host_name): Add declarations.
16784
16785 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16786
16787 * linux-arm-low.c:
16788 * linux-arm-low.c:
16789 * inferiors.c:
16790 * i387-fp.h:
16791 * i387-fp.c:
16792 * gdbreplay.c:
16793 * regcache.c:
16794 * proc-service.c:
16795 * mem-break.h:
16796 * mem-break.c:
16797 * linux-x86-64-low.c:
16798 * linux-sh-low.c:
16799 * linux-s390-low.c:
16800 * linux-ppc64-low.c:
16801 * linux-ppc-low.c:
16802 * linux-mips-low.c:
16803 * linux-m68k-low.c:
16804 * linux-m32r-low.c:
16805 * linux-low.h:
16806 * linux-low.c:
16807 * linux-ia64-low.c:
16808 * linux-i386-low.c:
16809 * linux-crisv32-low.c:
16810 * thread-db.c:
16811 * terminal.h:
16812 * target.h:
16813 * target.c:
16814 * server.h:
16815 * server.c:
16816 * remote-utils.c:
16817 * regcache.h:
16818 * utils.c:
16819 * Makefile.in:
16820 * configure.ac:
16821 * gdbserver.1: Add (C) after Copyright. Update the FSF
16822 address.
16823
16824 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16825
16826 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16827 (arm_breakpoint_at): Recognize both breakpoints.
16828 (the_low_target): Use the correct breakpoint instruction.
16829
16830 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16831
16832 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16833 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16834 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16835 (the_low_target): Update.
16836
16837 2005-10-25 Andreas Schwab <schwab@suse.de>
16838
16839 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16840
16841 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16842 (ia64_num_regs): Reduce to 462.
16843
16844 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16845
16846 * acinclude.m4: Correct quoting.
16847 * aclocal.m4: Regenerated.
16848
16849 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16850 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16851 (thread_db_init): Call thread_db_err_str.
16852 * configure.ac: Check for TD_VERSION.
16853 * config.in, configure: Regenerated.
16854
16855 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16856
16857 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16858
16859 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16860
16861 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16862 is not available. Define HAVE_PTRACE_GETREGS if it is.
16863 * config.in, configure: Regenerated.
16864 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16865 * linux-i386-low.c, linux-m68k-low.c: Update to use
16866 HAVE_PTRACE_GETREGS.
16867 * linux-low.c (regsets_fetch_inferior_registers)
16868 (regsets_store_inferior_registers): Only return 0 if we processed
16869 GENERAL_REGS.
16870 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16871 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16872
16873 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16874
16875 * inferiors.c (struct thread_info): Add gdb_id.
16876 (add_thread): Add gdb_id argument.
16877 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16878 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16879 calls to add_thread.
16880 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16881 * server.c (handle_query): Use thread_to_gdb_id.
16882 (handle_v_cont, main): Use gdb_id_to_thread_id.
16883 * server.h (add_thread): Update prototype.
16884 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16885 prototypes.
16886
16887 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16888
16889 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16890 left-padded registers.
16891 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16892 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16893
16894 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16895
16896 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16897 * configure: Regenerate.
16898 * config.in: Regenerate.
16899 * server.h (NEED_DECLARATION_STRERROR):
16900 Replace with !HAVE_DECL_STRERROR.
16901
16902 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16903
16904 * linux-low.c (linux_wait, linux_send_signal): Don't test
16905 an unsigned long variable for > 0 if it could be MAX_ULONG.
16906 * server.c (myresume): Likewise.
16907 * target.c (set_desired_inferior): Likewise.
16908
16909 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16910
16911 * configure.ac: Simplify and improve check for socklen_t.
16912 * configure, config.in: Regenerate.
16913
16914 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16915
16916 * acconfig.h: Remove.
16917 * configure.ac: Add a test for socklen_t. Use three-argument
16918 AC_DEFINE throughout.
16919 * config.in: Regenerated using autoheader 2.59.
16920 * configure: Regenerated.
16921
16922 * gdbreplay.c (socklen_t): Provide a default.
16923 (remote_open): Use socklen_t.
16924 * remote-utils.c (socklen_t): Provide a default.
16925 (remote_open): Use socklen_t.
16926 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16927 unsigned char.
16928
16929 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16930 char for buffers.
16931 * linux-low.c (linux_read_memory, linux_write_memory)
16932 (linux_read_auxv): Likewise.
16933 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16934 (check_mem_write): Likewise.
16935 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16936 Likewise.
16937 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16938 (registers_from_string, register_data): Likewise.
16939 * server.c (handle_query, main): Likewise.
16940 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16941 (decode_M_packet): Likewise.
16942 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16943 * target.h (struct target_ops): Update read_memory, write_memory,
16944 and read_auxv.
16945 (read_inferior_memory, write_inferior_memory): Update.
16946 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16947 to unsigned char *.
16948 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16949 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16950 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16951 linux-s390-low.c, linux-sh-low.c: Update for changes in
16952 read_inferior_memory and the_low_target->breakpoint.
16953
16954 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16955
16956 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16957 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16958 * configure.srv: Add powerpc64-*-linux*.
16959 * linux-ppc64-low.c: New file.
16960
16961 2005-05-23 Orjan Friberg <orjanf@axis.com>
16962
16963 * linux-cris-low.c: New file with support for CRIS.
16964 * linux-crisv32-low.c: Ditto for CRISv32.
16965 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16966 (clean): Add reg-cris.c and reg-crisv32.c.
16967 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16968 reg-crisv32.o, and reg-crisv32.c to make rules.
16969 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16970 recognized targets.
16971
16972 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16973
16974 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16975 of sizeof (PTRACE_XFER_TYPE).
16976 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16977
16978 2005-05-12 Orjan Friberg <orjanf@axis.com>
16979
16980 * target.h (struct target_ops): Add insert_watchpoint,
16981 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16982 pointers for hardware watchpoint support.
16983 * linux-low.h (struct linux_target_ops): Ditto.
16984 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16985 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16986 to linux_target_ops.
16987 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16988 reply packet.
16989 * server.c (main): Recognize 'Z' and 'z' packets.
16990
16991 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16992
16993 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16994 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16995 (the_low_target): Add new members.
16996
16997 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16998
16999 * proc-service.c (ps_lgetregs): Search all_processes instead of
17000 all_threads.
17001
17002 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17003
17004 * server.c (start_inferior): Change return type to int.
17005 (attach_inferior): Change sigptr to int *.
17006 (handle_v_cont, handle_v_requests): Change signal to int *.
17007 (main): Change signal to int.
17008
17009 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17010
17011 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17012 * configure.srv: Add m32r*-*-linux*.
17013 * linux-m32r-low.c: New file.
17014
17015 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17016
17017 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17018
17019 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17020
17021 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17022 Take unsigned long arguments for PIDs.
17023 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17024 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17025 (wait_for_sigstop, linux_resume_one_process)
17026 (regsets_fetch_inferior_registers, linux_send_signal)
17027 (linux_read_auxv): Likewise. Update the types of variables holding
17028 PIDs. Update format string specifiers.
17029 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17030 * remote-utils.c (prepare_resume_reply): Likewise.
17031 * server.c (cont_thread, general_thread, step_thread)
17032 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17033 unsigned long.
17034 (handle_query): Update format specifiers.
17035 (handle_v_cont, main): Use strtoul for thread IDs.
17036 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17037 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17038 (general_thread, step_thread, thread_from_wait)
17039 (old_thread_from_wait): Update.
17040 * target.h (struct thread_resume): Use unsigned long for THREAD.
17041 (struct target_ops): Use unsigned long for arguments to attach and
17042 thread_alive.
17043
17044 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17045
17046 * acinclude.m4: Include bfd/bfd.m4 directly.
17047 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17048 <agriffis@toolchain.org>.
17049 * aclocal.m4, configure: Regenerated.
17050
17051 2005-01-07 Andrew Cagney <cagney@gnu.org>
17052
17053 * configure.ac: Rename configure.in, require autoconf 2.59.
17054 * configure: Re-generate.
17055
17056 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17057
17058 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17059 LIBS when finished.
17060 * aclocal.m4: Regenerated.
17061 * configure: Regenerated.
17062
17063 2004-11-21 Andreas Schwab <schwab@suse.de>
17064
17065 * linux-m68k-low.c (m68k_num_gregs): Define.
17066 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17067 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17068 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17069 (m68k_breakpoint_at): New. Add to the_low_target.
17070
17071 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17072 srv_linux_thread_db to yes.
17073
17074 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17075
17076 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17077 (ARCH_SET_FS): Likewise.
17078 (ARCH_GET_FS): Likewise.
17079 (ARCH_GET_GS): Likewise.
17080
17081 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17082
17083 * linux-i386-low.c (ps_get_thread_area): New.
17084 * linux-x86-64-low.c (ps_get_thread_area): New.
17085 * linux-low.c: Include <sys/syscall.h>.
17086 (linux_kill_one_process): Don't kill the first thread here.
17087 (linux_kill): Kill the first thread here.
17088 (kill_lwp): New function.
17089 (send_sigstop, linux_send_signal): Use it.
17090 * proc-service.c: Clean up #ifdefs.
17091 (fpregset_info): Delete.
17092 (ps_lgetregs): Update and enable implementation.
17093 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17094 implementations.
17095 * remote-utils.c (struct sym_cache, symbol_cache): New.
17096 (input_interrupt): Print a clearer message.
17097 (async_io_enabled): New variable.
17098 (enable_async_io, disable_async_io): Use it. Update comments.
17099 (look_up_one_symbol): Use the symbol cache.
17100 * thread-db.c (thread_db_look_up_symbols): New function.
17101 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17102
17103 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17104
17105 * configure.in: Test for -rdynamic.
17106 * configure: Regenerated.
17107 * Makefile (INTERNAL_LDFLAGS): New.
17108 (gdbserver, gdbreplay): Use it.
17109
17110 2004-09-02 Andrew Cagney <cagney@gnu.org>
17111
17112 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17113
17114 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17115
17116 * linux-low.c (linux_wait): Clear all_processes list also.
17117
17118 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17119
17120 * linux-low.c: Include <errno.h>. Remove extern declaration of
17121 errno.
17122
17123 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17124
17125 * gdbreplay.c, server.h, utils.c: Update copyright years.
17126
17127 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17128
17129 * server.c (main): Print child status or termination signal from
17130 variable 'signal', not 'sig'.
17131
17132 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17133
17134 * linux-low.c (linux_read_memory): Change return type to
17135 int. Check for and return error from ptrace().
17136 * target.c (read_inferior_memory): Change return type to int. Pass
17137 back return status from the_target->read_memory().
17138 * target.h (struct target_ops): Adapt *read_memory() prototype.
17139 Update comment.
17140 (read_inferior_memory): Adapt prototype.
17141 * server.c (main): Return an error packet if
17142 read_inferior_memory() returns an error.
17143
17144 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17145
17146 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17147 Unify with other clean targets.
17148
17149 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17150
17151 * server.c (handle_v_cont): Call set_desired_inferior.
17152
17153 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17154
17155 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17156
17157 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17158
17159 * linux-low.c (linux_wait): Unblock async I/O.
17160 (linux_resume): Block and enable async I/O.
17161 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17162 * server.h (block_async_io, unblock_async_io): Add prototypes.
17163
17164 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17165
17166 * remote-utils.c (remote_open): Print a status notice after
17167 opening a TCP port.
17168 * server.c (attach_inferior): Print a status notice after
17169 attaching.
17170
17171 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17172
17173 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17174
17175 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17176
17177 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17178 error packet.
17179 * server.c, target.h: Update copyright years.
17180
17181 2004-02-25 Roland McGrath <roland@redhat.com>
17182
17183 * target.h (struct target_ops): New member `read_auxv'.
17184 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17185 * linux-low.c (linux_read_auxv): New function.
17186 (linux_target_ops): Initialize `read_auxv' member to that.
17187
17188 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17189
17190 Committed by Jim Blandy <jimb@redhat.com>.
17191
17192 * linux-s390-low.c (s390_num_regs): Update.
17193 (s390_regmap): Remove control registers. Use __s390x__ predefine
17194 instead of GPR_SIZE to distiguish s390 and s390x targets.
17195
17196 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17197
17198 * linux-low.c: Update copyright year.
17199 (check_removed_breakpoint): Clear pending_is_breakpoint.
17200 (linux_set_resume_request, linux_queue_one_thread)
17201 (resume_status_pending_p): New functions.
17202 (linux_continue_one_thread): Use process->resume.
17203 (linux_resume): Only resume threads if there are no pending events.
17204 * linux-low.h (struct process_info): Add resume request
17205 pointer.
17206
17207 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17208
17209 * regcache.c (new_register_cache): Clear the allocated register
17210 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17211
17212 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17213
17214 * linux-low.c (linux_resume): Take a struct thread_resume *
17215 argument.
17216 (linux_wait): Update call.
17217 (resume_ptr): New static variable.
17218 (linux_continue_one_thread): Renamed from
17219 linux_continue_one_process. Use resume_ptr.
17220 (linux_resume): Use linux_continue_one_thread.
17221 * server.c (handle_v_cont, handle_v_requests): New functions.
17222 (myresume): New function.
17223 (main): Handle 'v' case.
17224 * target.h (struct thread_resume): New type.
17225 (struct target_ops): Change argument of "resume" to struct
17226 thread_resume *.
17227 (myresume): Delete macro.
17228
17229 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17230
17231 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17232 (uninstall): Support DESTDIR.
17233
17234 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17235
17236 * configure.srv: Add xscale*linux copy of arm*linux entry.
17237
17238 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17239
17240 * linux-arm-low.c (arm_reinsert_addr): New function.
17241 (the_low_target): Add arm_reinsert_addr.
17242
17243 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17244
17245 * mem-break.c: Remove whitespace at end of file.
17246
17247 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17248
17249 * configure.in: Check whether we need to prototype strerror.
17250 * server.h: Optionally prototype strerror.
17251 * gdbreplay.c (perror_with_name): Use strerror.
17252 * linux-low.c (linux_attach_lwp): Use strerror.
17253 * utils.c (perror_with_name): Use strerror.
17254 * config.in, configure: Regenerated.
17255
17256 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17257
17258 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17259 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17260
17261 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17262
17263 * Makefile.in (SFILES): Update.
17264 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17265 low-sun3.c: Remove files.
17266
17267 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17268
17269 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17270 (linux_detach_one_process, linux_detach): New functions.
17271 (linux_target_ops): Add linux_detach.
17272 * server.c (main): Handle 'D' packet.
17273 * target.h (struct target_ops): Add "detach" member.
17274 (detach_inferior): Define.
17275
17276 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17277
17278 From Kelley Cook <kelleycook@wideopenwest.com>:
17279 * configure.srv: Accept i[34567]86 variants.
17280
17281 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17282
17283 * linux-low.c (linux_wait_for_event): Correct comment typos.
17284 (linux_resume_one_process): Call check_removed_breakpoint.
17285 (linux_send_signal): New function.
17286 (linux_target_ops): Add linux_send_signal.
17287 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17288 of kill.
17289 * target.h (struct target_ops): Add send_signal.
17290
17291 2003-05-29 Jim Blandy <jimb@redhat.com>
17292
17293 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17294 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17295 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17296 away part of the register's value.
17297
17298 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17299
17300 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17301 (linux_wait_for_event, linux_init_signals): Likewise.
17302
17303 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17304
17305 * configure.in: Check for stdlib.h.
17306 * configure: Regenerated.
17307 * config.in: Regenerated.
17308
17309 2003-01-04 Andreas Schwab <schwab@suse.de>
17310
17311 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17312
17313 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17314
17315 * Makefile.in: Remove obsolete code.
17316
17317 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17318
17319 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17320 defined(PT_FPR0_HI).
17321
17322 2002-11-17 Stuart Hughes <seh@zee2.com>
17323
17324 * linux-arm-low.c (arm_num_regs): Increase.
17325 (arm_regmap): Include status register.
17326
17327 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17328
17329 * linux-low.c (register_addr): Remove incorrect -1 check.
17330
17331 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17332
17333 * linux-low.c (linux_create_inferior): Call setpgid. Return
17334 the new PID.
17335 (unstopped_p, linux_signal_pid): Remove.
17336 (linux_target_ops): Remove linux_signal_pid.
17337 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17338 global instead of target method.
17339 * target.h (struct target_ops): Remove signal_pid. Update comment
17340 for create_inferior.
17341 * server.c (signal_pid): New variable.
17342 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17343 gdbserver. Set the child to be the foreground process group.
17344 (attach_inferior): Set signal_pid.
17345
17346 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17347
17348 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17349
17350 2002-08-20 Jim Blandy <jimb@redhat.com>
17351
17352 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17353 default for this.
17354
17355 2002-08-01 Andrew Cagney <cagney@redhat.com>
17356
17357 * Makefile.in: Make chill references obsolete.
17358
17359 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17360
17361 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17362 * configure: Regenerate.
17363 * config.in: Regenerate.
17364
17365 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17366
17367 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17368 (perror_with_name, remote_close, remote_open, expect, play): Static.
17369
17370 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17371
17372 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17373 byte offsets instead of an array of indexes.
17374 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17375
17376 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17377
17378 * regcache.c: Add comment.
17379
17380 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17381
17382 * thread-db.c: New file.
17383 * proc-service.c: New file.
17384 * acinclude.m4: New file.
17385 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17386 proc-service.o, and thread-db.o.
17387 (linux-low.o): Add USE_THREAD_DB.
17388 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17389 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17390 * aclocal.m4: Regenerated.
17391 * config.in: Regenerated.
17392 * configure: Regenerated.
17393 * configure.in: Check for proc_service.h, sys/procfs.h,
17394 thread_db.h, and linux/elf.h headrs.
17395 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17396 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17397 Check for -lthread_db and thread support.
17398 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17399 PowerPC, and SuperH.
17400 * i387-fp.c: Constify arguments.
17401 * i387-fp.h: Likewise.
17402 * inferiors.c: (struct thread_info): Renamed from
17403 `struct inferior_info'. Remove PID member. Use generic inferior
17404 list header. All uses updated.
17405 (inferiors, signal_pid): Removed.
17406 (all_threads): New variable.
17407 (get_thread): Define.
17408 (add_inferior_to_list): New function.
17409 (for_each_inferior): New function.
17410 (change_inferior_id): New function.
17411 (add_inferior): Removed.
17412 (remove_inferior): New function.
17413 (add_thread): New function.
17414 (free_one_thread): New function.
17415 (remove_thread): New function.
17416 (clear_inferiors): Use for_each_inferior and free_one_thread.
17417 (find_inferior): New function.
17418 (find_inferior_id): New function.
17419 (inferior_target_data): Update argument type.
17420 (set_inferior_target_data): Likewise.
17421 (inferior_regcache_data): Likewise.
17422 (set_inferior_regcache_data): Likewise.
17423 * linux-low.c (linux_bp_reinsert): Remove.
17424 (all_processes, stopping_threads, using_thrads)
17425 (struct pending_signals, debug_threads, pid_of): New.
17426 (inferior_pid): Replace with macro.
17427 (struct inferior_linux_data): Remove.
17428 (get_stop_pc, add_process): New functions.
17429 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17430 Use add_process and add_thread.
17431 (linux_attach_lwp): New function, based on old linux_attach. Use
17432 add_process and add_thread. Set stop_expected for new threads.
17433 (linux_attach): New function.
17434 (linux_kill_one_process): New function.
17435 (linux_kill): Kill all LWPs.
17436 (linux_thread_alive): Use find_inferior_id.
17437 (check_removed_breakpoints, status_pending_p): New functions.
17438 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17439 Update. Use WNOHANG. Wait for cloned processes also. Update process
17440 struct for the found process.
17441 (linux_wait_for_event): New function.
17442 (linux_wait): Use it. Support LWPs.
17443 (send_sigstop, wait_for_sigstop, stop_all_processes)
17444 (linux_resume_one_process, linux_continue_one_process): New functions.
17445 (linux_resume): Support LWPs.
17446 (REGISTER_RAW_SIZE): Remove.
17447 (fetch_register): Use register_size instead. Call supply_register.
17448 (usr_store_inferior_registers): Likewise. Call collect_register.
17449 Fix recursive case.
17450 (regsets_fetch_inferior_registers): Improve error message.
17451 (regsets_store_inferior_registers): Add debugging.
17452 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17453 (unstopped_p, linux_signal_pid): New functions.
17454 (linux_target_ops): Add linux_signal_pid.
17455 (linux_init_signals): New function.
17456 (initialize_low): Call it. Initialize using_threads.
17457 * regcache.c (inferior_regcache_data): Add valid
17458 flag.
17459 (get_regcache): Fetch registers lazily. Add fetch argument
17460 and update all callers.
17461 (regcache_invalidate_one, regcache_invalidate): New
17462 functions.
17463 (new_register_cache): Renamed from create_register_cache.
17464 Return the new regcache.
17465 (free_register_cache): Change argument to a void *.
17466 (registers_to_string, registers_from_string): Call get_regcache
17467 with fetch flag set.
17468 (register_data): Make static. Pass fetch flag to get_regcache.
17469 (supply_register): Call get_regcache with fetch flag clear.
17470 (collect_register): Call get_regcache with fetch flag set.
17471 (collect_register_as_string): New function.
17472 * regcache.h: Update.
17473 * remote-utils.c (putpkt): Flush after debug output and use
17474 stderr.
17475 Handle input interrupts while waiting for an ACK.
17476 (input_interrupt): Use signal_pid method.
17477 (getpkt): Flush after debug output and use stderr.
17478 (outreg): Use collect_register_as_string.
17479 (new_thread_notify, dead_thread_notify): New functions.
17480 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17481 and general_thread.
17482 (look_up_one_symbol): Flush after debug output.
17483 * server.c (step_thread, server_waiting): New variables.
17484 (start_inferior): Don't use signal_pid. Update call to mywait.
17485 (attach_inferior): Update call to mywait.
17486 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17487 (main): Don't fetch/store registers explicitly. Use
17488 set_desired_inferior. Support proposed ``Hs'' packet. Update
17489 calls to mywait.
17490 * server.h: Update.
17491 (struct inferior_list, struct_inferior_list_entry): New.
17492 * target.c (set_desired_inferior): New.
17493 (write_inferior_memory): Constify.
17494 (mywait): New function.
17495 * target.h: Update.
17496 (struct target_ops): New signal_pid method.
17497 (mywait): Removed macro, added prototype.
17498
17499 * linux-low.h (regset_func): Removed.
17500 (regset_fill_func, regset_store_func): New.
17501 (enum regset_type): New.
17502 (struct regset_info): Add type field. Use new operation types.
17503 (struct linux_target_ops): stop_pc renamed to get_pc.
17504 Add decr_pc_after_break and breakpoint_at.
17505 (get_process, get_thread_proess, get_process_thread)
17506 (strut process_info, all_processes, linux_attach_lwp)
17507 (thread_db_init): New.
17508
17509 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17510 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17511 (the_low_target): Add new members.
17512 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17513 (i386_store_fpxregset): Constify.
17514 (target_regsets): Add new kind identifier.
17515 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17516 (i386_set_pc): Add debugging.
17517 (i386_breakpoint_at): New function.
17518 (the_low_target): Add new members.
17519 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17520 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17521 (mips_breakpoint_at): New.
17522 (the_low_target): Add new members.
17523 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17524 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17525 (the_low_target): Add new members.
17526 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17527 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17528 (the_low_target): Add new members.
17529 * linux-x86-64-low.c (target_regsets): Add new kind
17530 identifier.
17531
17532 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17533
17534 From Martin Pool <mbp@samba.org>:
17535 * server.c (gdbserver_usage): New function.
17536 (main): Call it.
17537
17538 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17539
17540 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17541 stop_at -> stop_pc.
17542
17543 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17544
17545 * Makefile.in: Remove obsolete code.
17546
17547 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17548
17549 * linux-low.c (regsets_fetch_inferior_registers),
17550 (regsets_store_inferior_registers): Removed cast to int from
17551 ptrace() calls.
17552 * regcache.h: Added declaration of struct inferior_info.
17553
17554 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17555
17556 * inferiors.c (struct inferior_info): Add regcache_data.
17557 (add_inferior): Call create_register_cache.
17558 (clear_inferiors): Call free_register_cache.
17559 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17560 * regcache.c (struct inferior_regcache_data): New.
17561 (registers): Remove.
17562 (get_regcache): New function.
17563 (create_register_cache, free_register_cache): New functions.
17564 (set_register_cache): Don't initialize the register cache here.
17565 (registers_to_string, registers_from_string, register_data): Call
17566 get_regcache.
17567 * regcache.h: Add prototypes.
17568 * server.h: Likewise.
17569
17570 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17571
17572 * mem-break.c: New file.
17573 * mem-break.h: New file.
17574 * Makefile.in: Add mem-break.o rule; update server.h
17575 dependencies.
17576 * inferiors.c (struct inferior_info): Add target_data
17577 member.
17578 (clear_inferiors): Free target_data member if set.
17579 (inferior_target_data, set_inferior_target_data): New functions.
17580 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17581 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17582 * linux-low.c (linux_bp_reinsert): New variable.
17583 (struct inferior_linux_data): New.
17584 (linux_create_inferior): Use set_inferior_target_data.
17585 (linux_attach): Likewise. Call add_inferior.
17586 (linux_wait_for_one_inferior): New function.
17587 (linux_wait): Call it.
17588 (linux_write_memory): Add const.
17589 (initialize_low): Call set_breakpoint_data.
17590 * linux-low.h (struct linux_target_ops): Add breakpoint
17591 handling members.
17592 * server.c (attach_inferior): Remove extra add_inferior
17593 call.
17594 * server.h: Include mem-break.h. Update inferior.c
17595 prototypes.
17596 * target.c (read_inferior_memory)
17597 (write_inferior_memory): New functions.
17598 * target.h (read_inferior_memory)
17599 (write_inferior_memory): Change macros to prototypes.
17600 (struct target_ops): Update comments. Add const to write_memory
17601 definition.
17602
17603 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17604
17605 * linux-low.c (usr_store_inferior_registers): Support
17606 registers which are allowed to fail to store.
17607 * linux-low.h (linux_target_ops): Likewise.
17608 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17609 (ppc_cannot_store_register): FPSCR may not be storable.
17610
17611 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17612
17613 * server.h: Include <string.h> if HAVE_STRING_H.
17614 * ChangeLog: Correct paths in last ChangeLog entry.
17615
17616 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17617
17618 * linux-low.h: Remove obsolete prototypes.
17619 (struct linux_target_ops): New.
17620 (extern the_low_target): New.
17621 * linux-low.c (num_regs, regmap): Remove declarations.
17622 (register_addr): Use the_low_target explicitly.
17623 (fetch_register): Likewise.
17624 (usr_fetch_inferior_registers): Likewise.
17625 (usr_store_inferior_registers): Likewise.
17626 * linux-arm-low.c (num_regs): Remove.
17627 (arm_num_regs): Define.
17628 (arm_regmap): Renamed from regmap, made static.
17629 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17630 made static.
17631 (arm_cannot_store_register): Renamed from cannot_store_register,
17632 made static.
17633 (the_low_target): New.
17634 * linux-i386-low.c (num_regs): Remove.
17635 (i386_num_regs): Define.
17636 (i386_regmap): Renamed from regmap, made static.
17637 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17638 made static.
17639 (i386_cannot_store_register): Renamed from cannot_store_register,
17640 made static.
17641 (the_low_target): New.
17642 * linux-ia64-low.c (num_regs): Remove.
17643 (ia64_num_regs): Define.
17644 (ia64_regmap): Renamed from regmap, made static.
17645 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17646 made static.
17647 (ia64_cannot_store_register): Renamed from cannot_store_register,
17648 made static.
17649 (the_low_target): New.
17650 * linux-m68k-low.c (num_regs): Remove.
17651 (m68k_num_regs): Define.
17652 (m68k_regmap): Renamed from regmap, made static.
17653 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17654 made static.
17655 (m68k_cannot_store_register): Renamed from cannot_store_register,
17656 made static.
17657 (the_low_target): New.
17658 * linux-mips-low.c (num_regs): Remove.
17659 (mips_num_regs): Define.
17660 (mips_regmap): Renamed from regmap, made static.
17661 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17662 made static.
17663 (mips_cannot_store_register): Renamed from cannot_store_register,
17664 made static.
17665 (the_low_target): New.
17666 * linux-ppc-low.c (num_regs): Remove.
17667 (ppc_num_regs): Define.
17668 (ppc_regmap): Renamed from regmap, made static.
17669 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17670 made static.
17671 (ppc_cannot_store_register): Renamed from cannot_store_register,
17672 made static.
17673 (the_low_target): New.
17674 * linux-s390-low.c (num_regs): Remove.
17675 (s390_num_regs): Define.
17676 (s390_regmap): Renamed from regmap, made static.
17677 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17678 made static.
17679 (s390_cannot_store_register): Renamed from cannot_store_register,
17680 made static.
17681 (the_low_target): New.
17682 * linux-sh-low.c (num_regs): Remove.
17683 (sh_num_regs): Define.
17684 (sh_regmap): Renamed from regmap, made static.
17685 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17686 made static.
17687 (sh_cannot_store_register): Renamed from cannot_store_register,
17688 made static.
17689 (the_low_target): New.
17690 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17691 (the_low_target): New.
17692
17693 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17694
17695 * Makefile.in: Add stamp-h target.
17696 * configure.in: Create stamp-h.
17697 * configure: Regenerated.
17698
17699 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17700
17701 * inferiors.c: New file.
17702 * target.c: New file.
17703 * target.h: New file.
17704 * Makefile.in: Add target.o and inferiors.o. Update
17705 dependencies.
17706 * linux-low.c (inferior_pid): New static variable,
17707 moved from server.c.
17708 (linux_create_inferior): Renamed from create_inferior.
17709 Call add_inferior. Return 0 on success instead of a PID.
17710 (linux_attach): Renamed from myattach.
17711 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17712 (linux_thread_alive): Renamed from mythread_alive.
17713 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17714 child dies.
17715 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17716 (regsets_store_inferior_registers): Correct error message.
17717 Add missing ``return 0''.
17718 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17719 (linux_store_registers): Renamed from store_inferior_registers.
17720 (linux_read_memory): Renamed from read_inferior_memory.
17721 (linux_write_memory): Renamed from write_inferior_memory.
17722 (linux_target_ops): New structure.
17723 (initialize_low): Call set_target_ops ().
17724 * remote-utils.c (unhexify): New function.
17725 (hexify): New function.
17726 (input_interrupt): Send signals to ``signal_pid''.
17727 * server.c (inferior_pid): Remove.
17728 (start_inferior): Update create_inferior call.
17729 (attach_inferior): Call add_inferior.
17730 (handle_query): New function.
17731 (main): Call handle_query for `q' packets.
17732 * server.h: Include "target.h". Remove obsolete prototypes.
17733 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17734
17735 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17736
17737 * Makefile.in: Add WARN_CFLAGS. Update configury
17738 dependencies.
17739 * configure.in: Check for <string.h>
17740 * configure: Regenerate.
17741 * config.in: Regenerate.
17742 * gdbreplay.c: Include needed system headers.
17743 (remote_open): Remove strchr prototype.
17744 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17745 * regcache.c (supply_register): Change buf argument to const void *.
17746 (supply_register_by_name): Likewise.
17747 (collect_register): Change buf argument to void *.
17748 (collect_register_by_name): Likewise.
17749 * regcache.h: Add missing prototypes.
17750 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17751 * server.c (handle_query): New function.
17752 (attached): New static variable, moved out of main.
17753 (main): Quiet longjmp clobber warnings.
17754 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17755 * utils.c (error): Remove NORETURN.
17756 (fatal): Likewise.
This page took 0.402991 seconds and 5 git commands to generate.