Fix install-strip for cross-compilation
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
2
3 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4
5 2020-01-01 Joel Brobecker <brobecker@adacore.com>
6
7 * server.c (gdbserver_version): Change copyright year to 2020.
8 * gdbreplay.c (gdbreplay_version): Likewise.
9
10 2019-12-19 Christian Biesinger <cbiesinger@google.com>
11
12 * configure: Regenerate.
13 * configure.ac: Quote variable arguments of test.
14
15 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
16
17 * Makefile.in: Fix build with GNU Make 3.81
18
19 2019-12-16 Tom Tromey <tromey@adacore.com>
20
21 * server.c (get_exec_file): Constify result.
22
23 2019-12-10 Christian Biesinger <cbiesinger@google.com>
24
25 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
26 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
27 * config.in: Regenerate.
28 * configure: Regenerate.
29 * configure.ac: Don't check for strerror.
30 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
31 Call safe_strerror instead of strerror.
32 * server.h (strerror): Remove this now-unnecessary declaration.
33 * tracepoint.c (init_named_socket): Call safe_strerror instead of
34 strerror.
35 (gdb_agent_helper_thread): Likewise.
36 * utils.c (perror_with_name): Likewise.
37
38 2019-11-26 Tom Tromey <tom@tromey.com>
39
40 * configure, config.in: Rebuild.
41
42 2019-11-26 Tom Tromey <tom@tromey.com>
43
44 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
45 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
46 gdb_sigmask.
47 * configure, config.in: Rebuild.
48
49 2019-11-26 Tom Tromey <tom@tromey.com>
50
51 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
52 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
53 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
54 * acinclude.m4: Include ax_pthread.m4.
55 * config.in, configure: Rebuild.
56
57 2019-11-26 Christian Biesinger <cbiesinger@google.com>
58
59 * debug.c (debug_set_output): Call safe_strerror instead of
60 strerror.
61 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
62 (linux_kill_one_lwp): Likewise.
63 (linux_detach_one_lwp): Likewise.
64 (linux_wait_for_event_filtered): Likewise.
65 (store_register): Likewise.
66 * lynx-low.c (lynx_attach): Likewise.
67 * mem-break.c (insert_memory_breakpoint): Likewise.
68 (remove_memory_breakpoint): Likewise.
69 (delete_fast_tracepoint_jump): Likewise.
70 (set_fast_tracepoint_jump): Likewise.
71 (uninsert_fast_tracepoint_jumps_at): Likewise.
72 (reinsert_fast_tracepoint_jumps_at): Likewise.
73 * nto-low.c (nto_xfer_memory): Likewise.
74 (nto_resume): Likewise.
75
76 2019-11-20 Luis Machado <luis.machado@linaro.org>
77
78 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
79 instead of register count.
80 * tdesc.c (tdesc_contains_feature): New function.
81 * tdesc.h (tdesc_contains_feature): New prototype.
82
83 2019-11-15 Christian Biesinger <cbiesinger@google.com>
84
85 * Makefile.in: Add safe-strerror.c.
86 * configure: Regenerate.
87 * configure.ac: Don't source common.host.
88
89 2019-11-15 Christian Biesinger <cbiesinger@google.com>
90
91 * config.in: Regenerate.
92 * configure: Regenerate.
93
94 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
95
96 * ax.c (ax_printf): Handle size_t_arg.
97
98 2019-11-06 Christian Biesinger <cbiesinger@google.com>
99
100 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
101 * mi/mi-main.c (output_cores): Likewise.
102 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
103 (linux_xfer_osdata_modules): Likewise.
104 * remote.c (register_remote_support_xml): Likewise.
105 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
106 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
107
108 2019-11-01 Christian Biesinger <cbiesinger@google.com>
109
110 * configure: Regenerate.
111 * configure.ac: Remove check for strerror_r.
112
113 2019-10-31 Christian Biesinger <cbiesinger@google.com>
114
115 * config.in: Regenerate.
116 * configure: Regenerate.
117 * configure.ac: Also check for strerror_r.
118
119 2019-10-31 Christian Biesinger <cbiesinger@google.com>
120
121 * ax.h (debug_agent): Remove duplicate declaration.
122
123 2019-10-26 Tom de Vries <tdevries@suse.de>
124
125 * linux-aarch64-low.c: Fix typos in comments.
126 * linux-arm-low.c: Same.
127 * linux-low.c: Same.
128 * linux-ppc-low.c: Same.
129 * proc-service.c: Same.
130 * regcache.h: Same.
131 * server.c: Same.
132 * tracepoint.c: Same.
133 * win32-low.c: Same.
134
135 2019-10-25 Tom Tromey <tromey@adacore.com>
136
137 * utils.c (xstrdup): Remove.
138
139 2019-10-23 Tom Tromey <tom@tromey.com>
140
141 * configure, config.in: Rebuild.
142
143 2019-10-23 Tom Tromey <tom@tromey.com>
144
145 * configure: Rebuild.
146 * acinclude.m4: Use m4_include, not sinclude.
147
148 2019-10-17 Tom Tromey <tromey@adacore.com>
149
150 * configure: Rebuild.
151 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
152 in AC_CONFIG_FILES invocation.
153 * Makefile.in (stamp-h, Makefile): Use new-style config.status
154 invocation.
155
156 2019-10-16 Christian Biesinger <cbiesinger@google.com>
157
158 * server.c: Include xml-builtin.h.
159 (get_xml_features): Don't declare xml_builtins here.
160
161 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
162
163 * Makefile.in: Remove references to vec-ipa.o.
164
165 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
166
167 * Makefile.in: Remove references to vec.c.
168
169 2019-10-02 Christian Biesinger <cbiesinger@google.com>
170
171 * server.c (server_waiting): Change to bool.
172 (extended_protocol): Likewise.
173 (response_needed): Likewise.
174 (exit_requested): Likewise.
175 (run_once): Likewise.
176 (report_no_resumed): Likewise.
177 (non_stop): Likewise.
178 (disable_packet_vCont): Likewise.
179 (disable_packet_Tthread): Likewise.
180 (disable_packet_qC): Likewise.
181 (disable_packet_qfThreadInfo): Likewise.
182 (handle_general_set): Update.
183 (handle_detach): Update.
184 (handle_monitor_command): Update.
185 (handle_query): Update.
186 (captured_main): Update.
187 (process_serial_event): Update.
188 * server.h (server_waiting): Change to bool.
189 (disable_packet_vCont): Likewise.
190 (disable_packet_Tthread): Likewise.
191 (disable_packet_qC): Likewise.
192 (disable_packet_qfThreadInfo): Likewise.
193 (run_once): Likewise.
194 (non_stop): Likewise.
195 * target.c (target_stop_and_wait): Update.
196
197 2019-10-02 Tom Tromey <tromey@adacore.com>
198
199 * Makefile.in (SFILES): Add common-inferior.c.
200 (OBS): Add common-inferior.o.
201 * server.c (startup_with_shell): Don't define.
202
203 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
204
205 * linux-low.c (linux_low_read_btrace): Update for change to
206 std::vector.
207
208 2019-09-20 Christian Biesinger <cbiesinger@google.com>
209
210 * debug.c (debug_threads): Remove comment in favor of the header.
211 * debug.h (using_threads): Add declaration.
212 (debug_threads): Add comment.
213 * linux-aarch64-low.c: Include debug.h and remove declaration of
214 debug_threads.
215 * nto-low.c: Likewise.
216 * remote-utils.c: Likewise.
217 * thread-db.c: Likewise.
218
219 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
220
221 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
222 and powerpc-cell64l-ipa.o.
223 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
224 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
225 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
226 (spu*-*-*): Remove.
227
228 * spu-low.c: Remove file.
229
230 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
231 (parse_spufs_run): Remove.
232 (ppc_get_pc): Remove Cell/B.E. support.
233 (ppc_set_pc): Likewise.
234 (ppc_breakpoint_at): Likewise.
235 (ppc_arch_setup): Likewise.
236 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
237 tdesc_powerpc_cell32l.
238 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
239 or init_registers_powerpc_cell32l.
240 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
241 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
242 or init_registers_powerpc_cell32l.
243 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
244 (init_registers_powerpc_cell32l): Remove prototype.
245 (init_registers_powerpc_cell64l): Likewise.
246
247 * target.h (struct target_ops): Remove qxfer_spu member.
248 * server.c (handle_qxfer_spu): Remove.
249 (qxfer_packets): Remove entry for "spu".
250 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
251 * linux-low.c (SPUFS_MAGIC): Remove.
252 (spu_enumerate_spu_ids): Remove.
253 (linux_qxfer_spu): Remove.
254 (linux_target_ops): Remove qxfer_spu member.
255 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
256 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
257 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
258
259 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
260
261 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
262 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
263 * config.in: Regenerate.
264 * configure: Regenerate.
265
266 2019-08-15 Tom Tromey <tromey@adacore.com>
267
268 * target.c (target_write_memory): Use gdb::byte_vector.
269
270 2019-08-15 Tom Tromey <tromey@adacore.com>
271
272 * tracepoint.c (write_inferior_data_pointer)
273 (write_inferior_integer, write_inferior_int8)
274 (write_inferior_uinteger, m_tracepoint_action_download)
275 (r_tracepoint_action_download, x_tracepoint_action_download)
276 (l_tracepoint_action_download, clear_inferior_trace_buffer)
277 (download_agent_expr, download_tracepoint_1)
278 (download_trace_state_variables, upload_fast_traceframes): Update.
279 * server.c (gdb_write_memory): Update.
280 * remote-utils.c (relocate_instruction): Update.
281 * proc-service.c (ps_pdwrite): Update.
282 * mem-break.c (remove_memory_breakpoint)
283 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
284 (uninsert_fast_tracepoint_jumps_at)
285 (reinsert_fast_tracepoint_jumps_at): Update.
286 * linux-x86-low.c (append_insns)
287 (i386_install_fast_tracepoint_jump_pad)
288 (amd64_write_goto_address, i386_write_goto_address): Update.
289 * linux-s390-low.c (append_insns, s390_write_goto_address):
290 Update.
291 * linux-ppc-low.c (ppc_relocate_instruction)
292 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
293 (ppc_write_goto_address): Update.
294 * linux-aarch64-low.c (append_insns): Update.
295 * target.h (struct target_ops): Update.
296 (write_inferior_memory): Don't declare.
297 * target.c (target_write_memory): Rename from
298 write_inferior_memory. Remove old target_write_memory.
299
300 2019-08-15 Tom Tromey <tromey@adacore.com>
301
302 * target.c (write_inferior_memory): Use std::vector.
303
304 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
305
306 PR build/24886
307 * configure.ac: Drop enable-libmcheck support.
308 * configure, config.in: Rebuild.
309 * acinclude.m4: Don't include it.
310
311 2019-07-19 Alan Hayward <alan.hayward@arm.com>
312
313 * configure.srv: Remove Arm xml files.
314
315 2019-07-19 Alan Hayward <alan.hayward@arm.com>
316
317 * configure.srv: Add new files. Remove xml generated files.
318 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
319 registers.
320 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
321 * linux-aarch32-tdesc.c: New file.
322 * linux-aarch32-tdesc.h: New file.
323 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
324 * linux-arm-low.c (init_registers_arm, tdesc_arm)
325 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
326 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
327 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
328 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
329 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
330 (arm_read_description): Call arm_linux_read_description.
331 (initialize_low_arch): Don't init registers.
332 * linux-arm-tdesc.c: New file.
333 * linux-arm-tdesc.h: New file.
334
335 2019-07-10 Alan Hayward <alan.hayward@arm.com>
336
337 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
338 Move counter inside for.
339 (arm_read_description): Check ptrace earlier.
340 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
341
342 2019-07-09 Tom Tromey <tom@tromey.com>
343
344 * configure: Rebuild.
345 * configure.ac: Change common to gdbsupport.
346 * acinclude.m4: Change common to gdbsupport.
347 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
348 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
349 common to gdbsupport.
350 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
351 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
352 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
353 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
354 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
355 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
356 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
357 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
358 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
359 common to gdbsupport.
360
361 2019-07-04 Alan Hayward <alan.hayward@arm.com>
362
363 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
364 defines.
365 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
366
367 2019-07-04 Alan Hayward <alan.hayward@arm.com>
368
369 * configure.srv: Remove legacy xml.
370 * linux-aarch64-low.c (initialize_low_arch): Remove
371 initialize_low_tdesc call.
372 * linux-aarch64-tdesc-selftest.c: Remove file.
373 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
374 * linux-x86-low.c (initialize_low_arch): Remove
375 initialize_low_tdesc call.
376 * linux-x86-tdesc-selftest.c: Remove file.
377 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
378
379 2019-06-20 Tom de Vries <tdevries@suse.de>
380
381 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
382 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
383
384 2019-06-19 Tom de Vries <tdevries@suse.de>
385
386 * debug.h (debug_write): Change return type to ssize_t.
387 * debug.c (debug_write): Same.
388
389 2019-06-14 Tom Tromey <tom@tromey.com>
390
391 * configure.ac: Use new path to gnulib.
392 * configure: Rebuild.
393 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
394 to gnulib.
395
396 2019-06-11 Tom Tromey <tom@tromey.com>
397
398 * Makefile.in (SFILES): Add alloc.c.
399 (OBS): Add alloc.o.
400 (IPA_OBJS): Add alloc-ipa.o.
401 (alloc-ipa.o): New target.
402 (%.o: ../%.c): New pattern rule.
403
404 2019-06-10 Tom Tromey <tromey@adacore.com>
405
406 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
407 end warning with a newline.
408 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
409 newline.
410 * thread-db.c (attach_thread): Don't end warning with a newline.
411 (thread_db_notice_clone): Likewise.
412 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
413 newline.
414 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
415 end warning with a newline.
416
417 2019-06-04 Pedro Alves <palves@redhat.com>
418
419 * server.c (captured_main): Use make_unique_xstrdup.
420
421 2019-06-02 Tom Tromey <tom@tromey.com>
422
423 * gdbreplay.c (fromhex): Remove.
424 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
425
426 2019-05-29 Tom Tromey <tromey@adacore.com>
427
428 * configure: Rebuild.
429
430 2019-05-06 Kevin Buettner <kevinb@redhat.com>
431
432 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
433 sign extension code on 32-bit builds.
434
435 2019-05-03 Eli Zaretskii <eliz@gnu.org>
436
437 * remote-utils.c:
438 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
439
440 2019-04-19 Tom Tromey <tom@tromey.com>
441
442 * server.c (struct vstop_notif): Derive from notif_event.
443 <base>: Remove.
444 (queue_stop_reply): Update.
445 (remove_all_on_match_ptid): Change type. Rewrite.
446 (discard_queued_stop_replies): Rewrite.
447 (in_queued_stop_replies_ptid): Change type.
448 (in_queued_stop_replies): Rewrite.
449 (notif_stop): Update.
450 (queue_stop_reply_callback): Update.
451 (captured_main): Don't call initialize_notif.
452 (push_stop_notification): Update.
453 * notif.c (notif_write_event, handle_notif_ack)
454 (notif_event_enque, notif_push): Update.
455 (notif_event_xfree, initialize_notif): Remove.
456 * notif.h (struct notif_event): Include <list>, not
457 "common/queue.h".
458 (struct notif_server) <queue>: Now a std::list.
459 (notif_event_p): Remove typedef.
460 (initialize_notif): Don't declare.
461 (struct notif_event): Add virtual destructor.
462
463 2019-04-17 Alan Hayward <alan.hayward@arm.com>
464
465 * ax.c (ax_vdebug): Call debug_printf.
466 * debug.c (debug_write): New function.
467 * debug.h (debug_write): New declaration.
468 * linux-low.c (sigchld_handler): Call debug_write.
469
470 2019-04-17 Alan Hayward <alan.hayward@arm.com>
471
472 * debug.c (debug_set_output): New function.
473 (debug_vprintf): Send output to debug_file.
474 (debug_flush): Likewise.
475 * debug.h (debug_set_output): New declaration.
476 * server.c (handle_monitor_command): Add debug-file option.
477 (captured_main): Likewise.
478
479 2019-04-17 Alan Hayward <alan.hayward@arm.com>
480
481 * debug.c (remote_debug): Add definition.
482 * debug.h (remote_debug): Add declaration.
483 * hostio.c (remote_debug): Remove declaration.
484 * remote-utils.c (struct ui_file): Likewise.
485 (remote_debug): Likewise.
486 * remote-utils.h (remote_debug): Likewise,
487 * server.c (remote_debug): Remove definition.
488
489 2019-04-10 Kevin Buettner <kevinb@redhat.com>
490
491 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
492 when using a 64-bit gdbserver.
493
494 2019-04-09 Tom Tromey <tromey@adacore.com>
495
496 * linux-low.c (select_event_lwp): Use find_thread_in_random.
497
498 2019-04-08 Tom Tromey <tom@tromey.com>
499
500 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
501 throw.
502 (linux_resume_one_lwp): Likewise.
503
504 2019-04-08 Tom Tromey <tom@tromey.com>
505
506 * gdbreplay.c: Update.
507 * linux-low.c: Update.
508 * server.c: Update.
509
510 2019-04-08 Tom Tromey <tom@tromey.com>
511
512 * server.c: Use C++ exception handling.
513 * linux-low.c: Use C++ exception handling.
514 * gdbreplay.c: Use C++ exception handling.
515
516 2019-04-08 Tom Tromey <tom@tromey.com>
517
518 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
519 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
520 (captured_main, main): Update.
521 * gdbreplay.c (main): Update.
522
523 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
524
525 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
526 value in argument pointer, return 1 if the entry is found and 0
527 otherwise. Move comment.
528 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
529 * linux-low.h (linux_get_auxv): Declare.
530 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
531
532 2019-04-05 Tom Tromey <tromey@adacore.com>
533
534 * server.c (gdbserver_usage): Use upper-case for metasyntactic
535 variables.
536
537 2019-03-28 Alan Hayward <alan.hayward@arm.com>
538
539 * linux-low.c (AT_HWCAP2): Add define if not already included.
540
541 2019-03-26 Alan Hayward <alan.hayward@arm.com>
542
543 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
544 (aarch64_arch_setup): Call linux_get_hwcap.
545 * linux-arm-low.c (arm_get_hwcap): Remove function.
546 (arm_read_description): Call linux_get_hwcap.
547 * linux-low.c (linux_get_auxv): New function.
548 (linux_get_hwcap): Likewise.
549 (linux_get_hwcap2): Likewise.
550 * linux-low.h (linux_get_hwcap): New declaration.
551 (linux_get_hwcap2): Likewise.
552 * linux-ppc-low.c (ppc_get_auxv): Remove function.
553 (ppc_arch_setup): Call linux_get_hwcap.
554 * linux-s390-low.c (s390_get_hwcap): Remove function.
555 (s390_arch_setup): Call linux_get_hwcap.
556
557 2019-03-22 Alan Hayward <alan.hayward@arm.com>
558 Jiong Wang <jiong.wang@arm.com>
559
560 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
561 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
562 to fail.
563 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
564
565 2019-03-22 Alan Hayward <alan.hayward@arm.com>
566 Jiong Wang <jiong.wang@arm.com>
567
568 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
569 (aarch64_get_hwcap): New function.
570 (aarch64_arch_setup): Read APIA hwcap.
571
572 2019-03-22 Alan Hayward <alan.hayward@arm.com>
573 Jiong Wang <jiong.wang@arm.com>
574
575 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
576 (initialize_low_tracepoint): Likewise.
577 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
578 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
579 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
580 (aarch64_linux_read_description): Likewise.
581 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
582
583 2019-03-12 John Baldwin <jhb@FreeBSD.org>
584
585 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
586 i386_create_target_description for 'segments' parameter.
587 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
588 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
589 * win32-i386-low.c (i386_arch_setup): Likewise.
590
591 2019-03-12 Tom Tromey <tromey@adacore.com>
592
593 * linux-low.c (iterate_over_lwps): Update.
594
595 2019-03-06 Tom Tromey <tom@tromey.com>
596
597 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
598 (captured_main): Use SCOPE_EXIT.
599
600 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
601
602 * configure.srv: Use '$enable_unittest' instead of '$development'
603 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
604 case.
605
606 2019-02-27 Tom Tromey <tromey@adacore.com>
607
608 * gdbreplay.c (logchar): Handle \r\n.
609
610 2019-02-07 Alan Hayward <alan.hayward@arm.com>
611
612 * linux-low.c (linux_attach): Add process before lwp.
613 * server.c (attach_inferior): Check if already attached.
614
615 2019-02-07 Tom Tromey <tom@tromey.com>
616
617 * x86-tdesc.h: Rename include guard.
618 * x86-low.h: Add include guard.
619 * wincecompat.h: Rename include guard.
620 * win32-low.h: Add include guard.
621 * utils.h: Rename include guard.
622 * tracepoint.h: Rename include guard.
623 * tdesc.h: Rename include guard.
624 * target.h: Rename include guard.
625 * server.h: Rename include guard.
626 * remote-utils.h: Rename include guard.
627 * regcache.h: Rename include guard.
628 * nto-low.h: Rename include guard.
629 * notif.h: Add include guard.
630 * mem-break.h: Rename include guard.
631 * lynx-low.h: Add include guard.
632 * linux-x86-tdesc.h: Add include guard.
633 * linux-s390-tdesc.h: Add include guard.
634 * linux-ppc-tdesc-init.h: Add include guard.
635 * linux-low.h: Add include guard.
636 * linux-aarch64-tdesc.h: Add include guard.
637 * linux-aarch32-low.h: Add include guard.
638 * inferiors.h: Rename include guard.
639 * i387-fp.h: Rename include guard.
640 * hostio.h: Rename include guard.
641 * gdbthread.h: Rename include guard.
642 * gdb_proc_service.h: Rename include guard.
643 * event-loop.h: Rename include guard.
644 * dll.h: Rename include guard.
645 * debug.h: Rename include guard.
646 * ax.h: Rename include guard.
647
648 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
649
650 PR gdb/23985
651 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
652 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
653
654 2019-01-25 Tom Tromey <tom@tromey.com>
655
656 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
657
658 2019-01-25 Tom Tromey <tom@tromey.com>
659
660 * win32-low.c: Fix common/ includes.
661 * win32-i386-low.c: Fix common/ includes.
662 * tracepoint.c: Fix common/ includes.
663 * thread-db.c: Fix common/ includes.
664 * target.h: Fix common/ includes.
665 * symbol.c: Fix common/ includes.
666 * spu-low.c: Fix common/ includes.
667 * server.h: Fix common/ includes.
668 * server.c: Fix common/ includes.
669 * remote-utils.c: Fix common/ includes.
670 * regcache.h: Fix common/ includes.
671 * regcache.c: Fix common/ includes.
672 * nto-x86-low.c: Fix common/ includes.
673 * notif.h: Fix common/ includes.
674 * mem-break.h: Fix common/ includes.
675 * lynx-low.c: Fix common/ includes.
676 * lynx-i386-low.c: Fix common/ includes.
677 * linux-x86-tdesc-selftest.c: Fix common/ includes.
678 * linux-x86-low.c: Fix common/ includes.
679 * linux-low.c: Fix common/ includes.
680 * inferiors.h: Fix common/ includes.
681 * i387-fp.c: Fix common/ includes.
682 * hostio.c: Fix common/ includes.
683 * hostio-errno.c: Fix common/ includes.
684 * gdbthread.h: Fix common/ includes.
685 * gdbreplay.c: Fix common/ includes.
686 * fork-child.c: Fix common/ includes.
687 * event-loop.c: Fix common/ includes.
688 * ax.c:
689 (enum gdb_agent_op): Fix common/ includes.
690
691 2019-01-21 Tom Tromey <tom@tromey.com>
692
693 * tracepoint.c: Fix includes.
694 * remote-utils.c: Fix includes.
695 * linux-x86-low.c: Fix includes.
696
697 2019-01-01 Joel Brobecker <brobecker@adacore.com>
698
699 * gdbreplay.c (gdbreplay_version): Update copyright year in
700 version message.
701 * server.c (gdbserver_version): Likewise.
702
703 2018-12-05 Alan Hayward <alan.hayward@arm.com>
704
705 * linux-low.c (add_lwp): Switch ordering.
706
707 2018-11-29 Tom Tromey <tom@tromey.com>
708
709 * win32-low.c (win32_join): Take pid, not process.
710 * target.h (struct target_ops) <join>: Change argument type.
711 (join_inferior): Change argument name.
712 * spu-low.c (spu_join): Take pid, not process.
713 * server.c (handle_detach): Preserve pid before destroying
714 process.
715 * lynx-low.c (lynx_join): Take pid, not process.
716 * linux-low.c (linux_join): Take pid, not process.
717
718 2018-11-23 Alan Hayward <alan.hayward@arm.com>
719
720 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
721 (aarch64_cannot_fetch_register): Likewise.
722 (struct linux_target_ops): Update references.
723
724 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
725
726 * linux-ppc-low.c: Include nat/linux-ptrace.h.
727
728 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
729
730 * configure.srv (ipa_ppc_linux_regobj): Add
731 powerpc-isa207-htm-vsx32l-ipa.o and
732 powerpc-isa207-htm-vsx64l-ipa.o.
733 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
734 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
735 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
736 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
737 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
738 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
739 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
740 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
741 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
742 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
743 (init_registers_powerpc_isa207_htm_vsx32l)
744 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
745 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
746 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
747 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
748 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
749 (ppc_store_tm_ctarregset): New functions.
750 (ppc_regsets): Add entries for HTM regsets.
751 (ppc_arch_setup): Set htm in features struct when needed. Set
752 sizes for the HTM regsets.
753 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
754 (initialize_low_arch): Call
755 init_registers_powerpc_isa207_htm_vsx32l and
756 init_registers_powerpc_isa207_htm_vsx64l.
757 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
758 PPC_TDESC_ISA207_HTM_VSX.
759 (initialize_low_tracepoint): Call
760 init_registers_powerpc_isa207_htm_vsx32l and
761 init_registers_powerpc_isa207_htm_vsx64l.
762
763 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
764
765 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
766 rs6000/power-linux-pmu.xml to srv_xmlfiles.
767 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
768 (ppc_store_pmuregset): New functions.
769 (ppc_regsets): Add entries for ebb and pmu regsets.
770 (ppc_arch_setup): Set isa207 in features struct if the ebb and
771 pmu regsets are available. Set sizes for these regsets.
772
773 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
774
775 * configure.srv (ipa_ppc_linux_regobj): Add
776 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
777 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
778 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
779 rs6000/powerpc-isa207-vsx32l.xml, and
780 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
781 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
782 <PPC_TDESC_ISA207_VSX>: New enum value.
783 (init_registers_powerpc_isa207_vsx32l): Declare.
784 (init_registers_powerpc_isa207_vsx64l): Declare.
785 * linux-ppc-low.c (ppc_fill_tarregset): New function.
786 (ppc_store_tarregset): New function.
787 (ppc_regsets): Add entry for the TAR regset.
788 (ppc_arch_setup): Set isa207 in features struct when needed. Set
789 size for the TAR regsets.
790 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
791 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
792 and init_registers_powerpc_isa207_vsx64l.
793 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
794 (initialize_low_tracepoint): Call
795 init_registers_powerpc_isa207_vsx32l and
796 init_registers_powerpc_isa207_vsx64l.
797
798 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
799 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
800
801 * configure.srv (ipa_ppc_linux_regobj): Add
802 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
803 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
804 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
805 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
806 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
807 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
808 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
809 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
810 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
811 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
812 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
813 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
814 (ppc_hwcap): Add comment.
815 (ppc_hwcap2): New global.
816 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
817 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
818 (ppc_regsets): Add entries for the DSCR and PPR regsets.
819 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
820 when needed. Set sizes for the the DSCR and PPR regsets.
821 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
822 (initialize_low_arch): Call
823 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
824 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
825 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
826 PPC_TDESC_ISA205_PPR_DSCR_VSX.
827 (initialize_low_tracepoint): Call
828 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
829 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
830
831 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
832
833 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
834
835 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
836 Simon Marchi <simark@simark.ca>
837
838 * acinclude.m4: Include "../selftest.m4".
839 * configure: Regenerate.
840 * configure.ac: Use "GDB_AC_SELFTEST".
841 * configure.srv: Use "$enable_unittests" instead of
842 "$development" when checking whether unit tests have been
843 enabled.
844 * server.c (captured_main): Update message informing that
845 selftests have been disabled.
846
847 2018-10-04 Tom Tromey <tom@tromey.com>
848
849 * configure: Rebuild.
850
851 2018-10-04 Tom Tromey <tom@tromey.com>
852
853 * server.c (handle_status): Rename inner "thread".
854 (process_serial_event): Declare "res" in 'm' case.
855 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
856 (iterate_over_lwps): Rename inner "thread".
857 (linux_qxfer_libraries_svr4): Rename inner "len".
858 * gdbthread.h (find_thread_in_random): Rename inner "thread".
859
860 2018-10-01 Gary Benson <gbenson@redhat.com>
861
862 * gdb_proc_service.h: Moved common code to
863 common/gdb_proc_service.h.
864
865 2018-10-01 Gary Benson <gbenson@redhat.com>
866
867 * gdb_proc_service.h: Synchronize comments and whitespace with
868 GDB's version of this file.
869
870 2018-09-25 Tom Tromey <tom@tromey.com>
871
872 * configure: Rebuild.
873 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
874
875 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
876
877 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
878 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
879 ($(IPA_LIB)): Sort IPA_OBJS.
880
881 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
882
883 * Makefile.in: Remove references to $(ADD_DEPS).
884
885 2018-09-16 Tom Tromey <tom@tromey.com>
886
887 * remote-utils.c (remote_open): Use GNU style for metasyntactic
888 variables.
889 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
890 variables.
891
892 2018-09-05 Tom Tromey <tom@tromey.com>
893
894 * configure: Rebuild.
895
896 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
897
898 PR build/23399
899 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
900
901 2018-08-27 Tom Tromey <tom@tromey.com>
902
903 PR build/23087:
904 * configure: Rebuild.
905
906 2018-08-27 Tom Tromey <tom@tromey.com>
907
908 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
909 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
910 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
911 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
912 (s390x_emit_stack_adjust): Add casts to unsigned char.
913
914 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
915
916 PR gdb/23374
917 PR gdb/23375
918 * server.h (struct client_state) <disable_randomization>:
919 Initialize to 1.
920
921 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
922
923 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
924 variable.
925 (mips_supply_ptrace_register): Likewise.
926
927 2018-07-22 Tom Tromey <tom@tromey.com>
928
929 * configure: Rebuild.
930
931 2018-07-22 Tom Tromey <tom@tromey.com>
932
933 * win32-low.c (win32_create_inferior): Remove unused variables.
934 * gdbreplay.c (remote_open): Remove unused variable.
935 * remote-utils.c (remote_prepare): Remove unused variable.
936 * x86-tdesc.h (X86_TDESC_H): Define.
937 (amd64_expedite_regs): Define conditionally.
938 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
939 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
940 * remote-utils.c (readchar): Remove unused variable.
941
942 2018-07-13 Pedro Alves <palves@redhat.com>
943
944 * linux-low.c (linux_kill): Change parameter to process_info
945 pointer instead of pid. Adjust.
946 * lynx-low.c (lynx_kill): Likewise.
947 * nto-low.c (nto_kill): Likewise.
948 * spu-low.c (spu_kill): Likewise.
949 * win32-low.c (win32_kill): Likewise.
950 * server.c (handle_v_kill, kill_inferior_callback)
951 (detach_or_kill_for_exit): Adjust.
952 * target.c (kill_inferior): Change parameter to process_info
953 pointer instead of pid. Adjust.
954 * target.h (struct target_ops) <kill>: Change parameter to
955 process_info pointer instead of pid. Adjust all implementations
956 and callers.
957 (kill_inferior): Likewise.
958
959 2018-07-13 Pedro Alves <palves@redhat.com>
960
961 * linux-low.c (linux_detach, linux_join): Change parameter to
962 process_info pointer instead of pid. Adjust.
963 * lynx-low.c (lynx_detach, lynx_join): Likewise.
964 * nto-low.c (nto_detach): Likewise.
965 * spu-low.c (spu_detach, spu_join): Likewise.
966 * win32-low.c (win32_detach, win32_join): Likewise.
967 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
968 * target.h (struct target_ops) <detach, join>: Change parameter to
969 process_info pointer instead of pid. Adjust all implementations
970 and callers.
971 (detach_inferior, join_inferior): Rename 'pid' parameter to
972 'proc'.
973
974 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
975 Jan Kratochvil <jan.kratochvil@redhat.com>
976 Paul Fertser <fercerpav@gmail.com>
977 Tsutomu Seki <sekiriki@gmail.com>
978
979 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
980 (OBS): Add 'common/netstuff.o'.
981 (GDBREPLAY_OBS): Likewise.
982 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
983 (remote_open): Implement support for IPv6
984 connections.
985 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
986 and 'wspiapi.h'.
987 (handle_accept_event): Accept connections from IPv6 sources.
988 (remote_prepare): Handle IPv6-style hostnames; implement
989 support for IPv6 connections.
990 (remote_open): Implement support for printing connections from
991 IPv6 sources.
992
993 2018-07-11 Pedro Alves <palves@redhat.com>
994
995 PR gdb/23377
996 * mem-break.c (any_persistent_commands): Add process_info
997 parameter and use it instead of relying on the current process.
998 Change return type to bool.
999 * mem-break.h (any_persistent_commands): Add process_info
1000 parameter and change return type to bool.
1001 * server.c (handle_detach): Remove require_running_or_return call.
1002 Look up the process_info for the process we're about to detach.
1003 If not found, return back error to GDB. Adjust
1004 any_persistent_commands call to pass down a process pointer.
1005
1006 2018-07-11 Pedro Alves <palves@redhat.com>
1007
1008 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1009 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1010 instead of collect_register_by_name.
1011 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1012 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1013
1014 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1015 Pedro Alves <palves@redhat.com>
1016
1017 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1018
1019 2018-07-03 Tom Tromey <tom@tromey.com>
1020
1021 * linux-low.c: Update.
1022 * lynx-low.c: Update.
1023 * mem-break.c: Update.
1024 * nto-low.c: Update.
1025 * remote-utils.c: Update.
1026 * server.c: Update.
1027 * spu-low.c: Update.
1028 * target.c: Update.
1029 * win32-low.c: Update.
1030
1031 2018-07-03 Tom Tromey <tom@tromey.com>
1032
1033 * server.c: Update.
1034
1035 2018-07-03 Tom Tromey <tom@tromey.com>
1036
1037 * linux-low.c: Update.
1038
1039 2018-07-03 Tom Tromey <tom@tromey.com>
1040
1041 * target.c: Update.
1042
1043 2018-07-03 Tom Tromey <tom@tromey.com>
1044
1045 * linux-low.c: Update.
1046 * linux-mips-low.c: Update.
1047 * lynx-low.c: Update.
1048 * nto-low.c: Update.
1049 * remote-utils.c: Update.
1050 * server.c: Update.
1051 * spu-low.c: Update.
1052 * target.c: Update.
1053 * thread-db.c: Update.
1054
1055 2018-07-03 Tom Tromey <tom@tromey.com>
1056
1057 * linux-low.c: Update.
1058 * linux-mips-low.c: Update.
1059 * lynx-low.c: Update.
1060 * mem-break.c: Update.
1061 * nto-low.c: Update.
1062 * remote-utils.c: Update.
1063 * server.c: Update.
1064 * spu-low.c: Update.
1065 * target.c: Update.
1066 * tracepoint.c: Update.
1067
1068 2018-07-03 Tom Tromey <tom@tromey.com>
1069
1070 * linux-low.c: Update.
1071 * linux-ppc-low.c: Update.
1072 * linux-x86-low.c: Update.
1073 * proc-service.c: Update.
1074 * server.c: Update.
1075 * spu-low.c: Update.
1076 * thread-db.c: Update.
1077 * win32-low.c: Update.
1078
1079 2018-07-03 Tom Tromey <tom@tromey.com>
1080
1081 * linux-low.c: Update.
1082 * lynx-low.c: Update.
1083 * nto-low.c: Update.
1084 * remote-utils.c: Update.
1085 * spu-low.c: Update.
1086 * thread-db.c: Update.
1087 * win32-low.c: Update.
1088
1089 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1090
1091 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1092 parameter in call to 'amd64_create_target_description'.
1093
1094 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1095
1096 * x86-tdesc.h: Remove executable permission flag.
1097
1098 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1099
1100 * configure.ac: Remove AC_PREREQ, add missing quoting.
1101 * configure: Re-generate.
1102 * config.in: Re-generate.
1103 * aclocal.m4: Re-generate.
1104
1105 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1106
1107 * tracepoint.h (current_traceframe): Remove declaration.
1108
1109 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1110
1111 * linux-aarch64-low.c (is_sve_tdesc): New function.
1112 (aarch64_sve_regs_copy_to_regcache): Likewise.
1113 (aarch64_sve_regs_copy_from_regcache): Likewise.
1114 (aarch64_regs_info): Add SVE checks.
1115 (initialize_low_arch): Initialize SVE.
1116
1117 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1118
1119 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1120
1121 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1122
1123 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1124 (initialize_low_tracepoint): Likewise
1125 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1126 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1127 param.
1128 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1129 checks.
1130 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1131
1132 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1133
1134 * server.h (PBUFSIZ): Increase size
1135
1136 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1137
1138 * regcache.c (regcache::raw_compare): New function.
1139 * regcache.h (regcache::raw_compare): New declaration.
1140
1141 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1142
1143 * regcache.c (new_register_cache): Use new.
1144 (free_register_cache): Use delete.
1145 (register_data): Use const.
1146 (supply_register): Move body inside regcache.
1147 (regcache::raw_supply): New override function.
1148 (collect_register): Move body inside regcache.
1149 (regcache::raw_collect): New override function.
1150 (regcache::get_register_status): New override function.
1151 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1152
1153 2018-06-09 Tom Tromey <tom@tromey.com>
1154
1155 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1156 declare queue.
1157 (event_queue): Use std::queue.
1158 (gdb_event_xfree): Remove.
1159 (initialize_event_loop, process_event, wait_for_event): Update.
1160
1161 2018-06-08 Stan Cox <scox@redhat.com>
1162
1163 * win32-low.c (win32_create_inferior): last_ptid and last_status
1164 moved to client_state.
1165
1166 2018-06-08 Pedro Alves <palves@redhat.com>
1167
1168 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1169 common/common-exceptions.o, common/common-utils.o,
1170 common/errors.o, common/print-utils.o and utils.o.
1171 * gdbreplay.c: Include "common-defs.h" instead of the two
1172 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1173 string.h or alloca.h.
1174 (perror_with_name): Delete.
1175 (remote_open): Use xstrdup instead of strdup.
1176 (main): Rename to ...
1177 (captured_main): ... this.
1178 (main): New.
1179
1180 2018-06-08 Tom Tromey <tom@tromey.com>
1181
1182 * linux-low.c (linux_low_read_btrace): Update.
1183
1184 2018-06-04 Stan Cox <scox@redhat.com>
1185
1186 * server.h (struct client_state): New.
1187 * server.c (cont_thread, general_thread, multi_process)
1188 (report_fork_events, report_vfork_events, report_exec_events)
1189 (report_thread_events, swbreak_feature, hwbreak_feature)
1190 (vCont_supported, disable_randomization, pass_signals)
1191 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1192 Moved to client_state.
1193 * remote-utils.c (remote_debug, noack_mode)
1194 (transport_is_reliable): Moved to client_state.
1195 * tracepoint.c (current_traceframe): Moved to client_state.
1196
1197 Update all callers.
1198 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1199 linux-low.c, remote-utils.h, target.c: Use client_state.
1200
1201 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1202
1203 * configure.srv: Add new c/h file.
1204
1205 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1206
1207 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1208 null VQ.
1209
1210 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1211
1212 * gdb.arch/mips-fpregset-core.exp: New test.
1213 * gdb.arch/mips-fpregset-core.c: New test source.
1214
1215 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1216
1217 PR server/23198
1218 * hostio.c (require_int): Do not report overflow for integers
1219 between 0xfffffff and 0x7fffffff.
1220
1221 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1222
1223 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1224 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1225 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1226 functions.
1227 (the_low_target): Wire them.
1228
1229 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1230
1231 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1232 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1233 mode. Call collect_register_by_name with vscr using
1234 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1235 (ppc_store_vrregset): Add and set vscr_offset variable as in
1236 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1237 vscr_offset.
1238
1239 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1240
1241 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1242 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1243 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1244
1245 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1246
1247 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1248 (ppc_store_vsxregset): Likewise.
1249 (ppc_fill_vrregset): Likewise.
1250 (ppc_store_vrregset): Likewise.
1251 (ppc_fill_evrregset): Likewise.
1252 (ppc_store_evrregset): Likewise.
1253 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1254 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1255 needed.
1256
1257 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1258
1259 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1260 wordsize of the inferior. Call ppc_linux_target_wordsize.
1261
1262 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1263
1264 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1265 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1266 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1267 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1268 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1269 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1270 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1271 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1272 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1273 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1274 (tdesc_powerpc_e500l): Remove.
1275 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1276 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1277 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1278 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1279 linux-ppc-tdesc.h.
1280 (ppc_arch_setup): Remove target description matching code. Fill a
1281 ppc_linux_features struct and call ppc_linux_match_description
1282 with it.
1283
1284 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1285
1286 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1287 width of the requested register exceeds the width of the
1288 `ptrace' data type.
1289 (mips_cannot_store_register): Likewise.
1290
1291 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1292
1293 * linux-mips-low.c (mips_fetch_register): New function. Update
1294 preceding comment.
1295 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1296 (the_low_target): Wire `mips_fetch_register'.
1297
1298 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1299
1300 * lynx-i386-low.c (LYNXOS_178): New macro.
1301 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1302 the layout on LynxOS-178.
1303 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1304 handle floating point registers that are not supported by
1305 LynxOS-178.
1306
1307 2018-05-10 Tom Tromey <tom@tromey.com>
1308
1309 * configure: Rebuild.
1310
1311 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1312
1313 PR server/23158:
1314 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1315 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1316 Use it to set the expedite_regs field in the given tdesc.
1317 * x86-tdesc.h: New file.
1318 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1319 Adjust following the addition of the new expedite_regs parameter
1320 to init_target_desc.
1321 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1322 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1323 (i386_linux_read_description, amd64_linux_read_description):
1324 Adjust following the addition of the new expedite_regs parameter
1325 to init_target_desc.
1326 * lynx-i386-low.c: #include "x86-tdesc.h".
1327 (lynx_i386_arch_setup): Adjust following the addition of the new
1328 expedite_regs parameter to init_target_desc.
1329 * nto-x86-low.c: #include "x86-tdesc.h".
1330 (nto_x86_arch_setup): Adjust following the addition of the new
1331 expedite_regs parameter to init_target_desc.
1332 * win32-i386-low.c: #include "x86-tdesc.h".
1333 (i386_arch_setup): Adjust following the addition of the new
1334 expedite_regs parameter to init_target_desc.
1335
1336 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1337
1338 PR server/23158:
1339 * win32-low.c (win32_create_inferior): Add call to my_wait
1340 setting last_status global.
1341
1342 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1343
1344 PR server/23158:
1345 * win32-low.c (create_process): Only call gdb_tilde_expand if
1346 inferior_cwd is not NULL.
1347
1348 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1349
1350 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1351 registers to the cache if their values have changed.
1352 (i387_xsave_to_cache): Provide default values for x87 control
1353 registers when these features are available, but disabled.
1354 * regcache.c (supply_register_by_name_zeroed): New function.
1355 * regcache.h (supply_register_by_name_zeroed): Declare new
1356 function.
1357
1358 2018-05-07 Tom Tromey <tom@tromey.com>
1359
1360 * configure: Rebuild.
1361
1362 2018-05-04 Tom Tromey <tom@tromey.com>
1363
1364 * configure: Rebuild.
1365
1366 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1367 Pedro Alves <palves@redhat.com>
1368
1369 * linux-aarch64-low.c (aarch64_stopped_data_address):
1370 Likewise.
1371
1372 2018-04-27 Tom Tromey <tom@tromey.com>
1373
1374 * configure: Rebuild.
1375
1376 2018-04-23 Tom Tromey <tom@tromey.com>
1377
1378 * configure: Rebuild.
1379
1380 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1381
1382 * Makefile.in (depcomp): Add "..".
1383 (all_deps_files): New and use it.
1384
1385 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1386
1387 * configure.srv (aarch64*-*-linux*): Don't include xml.
1388 (i[34567]86-*-cygwin*): Likewise.
1389 (i[34567]86-*-linux*): Likewise.
1390 (i[34567]86-*-lynxos*): Likewise.
1391 (i[34567]86-*-mingw32ce*): Likewise.
1392 (i[34567]86-*-mingw*): Likewise.
1393 (i[34567]86-*-nto*): Likewise.
1394 (tic6x-*-uclinux): Likewise.
1395 (x86_64-*-linux*): Likewise.
1396 (x86_64-*-mingw*): Likewise.
1397 (x86_64-*-cygwin*): Likewise.
1398
1399 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1400
1401 * tdesc.c: Remove xml parameter.
1402
1403 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1404
1405 * server.c (get_features_xml): Remove cast.
1406 * tdesc.c (void target_desc::accept): Fill in function.
1407 (tdesc_get_features_xml): Remove old xml creation.
1408 (print_xml_feature::visit_pre): Add xml vistor.
1409 * tdesc.h (struct target_desc): Make xmltarget mutable.
1410 (tdesc_get_features_xml): Remove declaration.
1411
1412 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1413
1414 * tdesc.c (tdesc_architecture_name): Add new function.
1415 (tdesc_osabi_name): Likewise.
1416 (tdesc_get_features_xml): Use new functions.
1417
1418 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1419
1420 * tdesc.c (tdesc_create_flags): Remove.
1421 (tdesc_add_flag): Likewise.
1422 (tdesc_named_type): Likewise.
1423 (tdesc_create_union): Likewise.
1424 (tdesc_create_struct): Likewise.
1425 (tdesc_create_vector): Likewise.
1426 (tdesc_add_bitfield): Likewise.
1427 (tdesc_add_field): Likewise.
1428 (tdesc_set_struct_size): Likewise.
1429
1430 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1431
1432 * tdesc.c (~target_desc): Remove implictly deleted items.
1433 (init_target_desc): Iterate all features.
1434 (tdesc_get_features_xml): Use vector.
1435 (tdesc_create_feature): Create feature.
1436 * tdesc.h (tdesc_feature) Remove
1437 (target_desc): Add features.
1438
1439 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1440
1441 * Makefile.in: Add common/tdesc.c
1442 * tdesc.c (init_target_desc): init all reg_defs from register
1443 vector.
1444 (tdesc_create_reg): Create tdesc_reg.
1445 * tdesc.h (tdesc_feature): Add register vector.
1446
1447 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1448
1449 * tdesc.h (struct target_desc) <features>: Change type to
1450 std::vector<std::string>.
1451 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1452 changes.
1453 (tdesc_get_features_xml): Likewise.
1454 (tdesc_create_feature): Likewise.
1455
1456 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1457
1458 * regcache.c (find_register_by_number): Return a ref.
1459 (find_regno): Use references.
1460 (register_size): Likewise.
1461 (register_data): Likewise.
1462 * tdesc.c (target_desc::~target_desc): Remove free calls.
1463 (target_desc::operator==): Use std::vector compare.
1464 (init_target_desc): Use reference.
1465 (tdesc_create_reg): Use reg constructors.
1466 * tdesc.h (struct target_desc): Replace pointer with object.
1467
1468 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1469
1470 * regcache.c (find_register_by_number): Make static.
1471 (find_regno): Use find_register_by_number
1472 * regcache.h (struct reg): Remove declaration.
1473
1474 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1475
1476 * tdesc.c (target_desc::~target_desc): Move to here.
1477 (target_desc::operator==): Likewise.
1478 * tdesc.h (target_desc::~target_desc): Move from here.
1479 (target_desc::operator==): Likewise.
1480
1481 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1482
1483 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1484
1485 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1486
1487 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1488 S390_TDESC_GS.
1489 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1490 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1491 and init_registers_s390_gs_linux64.
1492
1493 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1494
1495 * linux-s390-low.c (s390_fill_gs): Remove function.
1496 (s390_fill_gsbc): Remove function.
1497 (s390_regsets): Set fill functions for the guarded storage regsets
1498 to NULL.
1499
1500 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1501
1502 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1503 the word size. Add comment.
1504 (s390_get_wordsize): New function.
1505 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1506 pswm with it. Instead, use s390_get_wordsize to determine the
1507 word size first and derive the correct tdesc from that directly.
1508
1509 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1510
1511 * Makefile.in: Include silent-rules.mk.
1512 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1513 (COMPILE): Add ECHO_CXX.
1514 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1515 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1516 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1517 (version-generated.c): Add ECHO_GEN.
1518 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1519 (IPAGENT_COMPILE): Add ECHO_CXX.
1520 (%-generated.c): Add ECHO_REGDAT.
1521
1522 2018-03-14 Tom Tromey <tom@tromey.com>
1523
1524 PR cli/14977:
1525 * ax.c (ax_printf): Special case for NULL.
1526
1527 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1528
1529 * linux-low.c (linux_qxfer_libraries_svr4): Use
1530 xml_escape_text_append.
1531
1532 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1533
1534 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1535
1536 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1537
1538 * server.c (handle_general_set): Remove unnecessary xstrdup.
1539
1540 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1541
1542 * server.c (parse_debug_format_options): Adjust to
1543 delim_string_to_char_ptr_vec changes.
1544 * thread-db.c (thread_db_load_search): Adjust to
1545 dirnames_to_char_ptr_vec changes.
1546
1547 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1548
1549 * target.h (target_enable_btrace, target_disable_btrace)
1550 (target_read_btrace, target_read_btrace_conf): Turn macro into
1551 inline function. Throw error if target method is not defined.
1552 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1553 check for btrace target method. Be prepared to handle exceptions
1554 from btrace target methods.
1555
1556 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1557
1558 * server.c (captured_main): Change order of error message printed
1559 when the current working directory cannot be found.
1560
1561 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1562
1563 * server.c: Include "filenames.h" and "pathstuff.h".
1564 (program_name): Delete variable.
1565 (program_path): New anonymous class.
1566 (get_exec_wrapper): Use "program_path" instead of
1567 "program_name".
1568 (handle_v_run): Likewise.
1569 (captured_main): Likewise.
1570 (process_serial_event): Likewise.
1571
1572 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1573
1574 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1575 (OBJS): Add "pathstuff.o".
1576 * server.c (current_directory): New global variable.
1577 (captured_main): Initialize "current_directory".
1578
1579 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1580
1581 * tdesc.c: Use common/tdesc.h.
1582 * tdesc.h: Likewise.
1583
1584 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1585 Simon Marchi <simon.marchi@ericsson.com>
1586
1587 * Makefile.in: Switch order of make rules.
1588
1589 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1590
1591 * Makefile.in: Add common directory in build.
1592 * configure.ac: Add common reference.
1593 * configure: Regenerate.
1594
1595 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1596
1597 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1598 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1599 * spu-low.c (spu_target_ops): Likewise.
1600 * win32-low.c (win32_target_ops): Likewise.
1601 * server.c (supported_btrace_packets): Report packets unconditionally.
1602 * target.h (target_ops) <supports_btrace>: Remove.
1603 (target_supports_btrace): Remove.
1604
1605 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1606
1607 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1608 (handle_btrace_disable): Change return type to void. Use exceptions
1609 to report errors.
1610 (handle_btrace_general_set): Catch exception and copy message to
1611 return message.
1612
1613 2018-02-08 Tom Tromey <tom@tromey.com>
1614
1615 * linux-low.c (install_software_single_step_breakpoints): Use
1616 make_scoped_restore.
1617 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1618 (do_restore_current_thread_cleanup): Remove.
1619 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1620 declare.
1621
1622 2018-02-08 Tom Tromey <tom@tromey.com>
1623
1624 * mem-break.c (set_raw_breakpoint_at): Use
1625 gdb::unique_xmalloc_ptr.
1626
1627 2018-01-30 Pedro Alves <palves@redhat.com>
1628
1629 PR gdb/13211
1630 * target.c (target_terminal::terminal_state): Rename to ...
1631 (target_terminal::m_terminal_state): ... this.
1632
1633 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1634
1635 * linux-low.c (handle_extended_wait): Surround call to
1636 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1637
1638 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1639
1640 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1641 linux_ptrace_attach_fail_reason_string now returning an
1642 std::string.
1643 (linux_attach): Likewise.
1644 * thread-db.c (attach_thread): Likewise.
1645
1646 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1647
1648 PR gdb/21559
1649 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1650 checking for fs_base/gs_base fields in struct user_regs_struct.
1651 * configure: Regenerate.
1652
1653 2018-01-16 Yao Qi <yao.qi@linaro.org>
1654
1655 PR gdb/18749
1656 * linux-low.c (fetch_register): Call supply_register instead of
1657 error.
1658
1659 2018-01-08 Yao Qi <yao.qi@linaro.org>
1660 Simon Marchi <simon.marchi@ericsson.com>
1661
1662 * Makefile.in (OBS): Remove selftest.o.
1663 * configure.ac: Set srv_selftest_objs if $development is true.
1664 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1665 * configure: Re-generated.
1666 * server.c (captured_main): Wrap variable selftest_filter with
1667 GDB_SELF_TEST.
1668
1669 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1670
1671 * server.c (parse_debug_format_options): Return std::string.
1672 (handle_monitor_command, captured_main): Adjust.
1673
1674 2018-01-05 Pedro Alves <palves@redhat.com>
1675
1676 PR gdb/18653
1677 * server.c (captured_main): Pass quiet=false to
1678 save_original_signals_state.
1679
1680 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1681
1682 * gdbreplay.c (gdbreplay_version): Update copyright year in
1683 version message.
1684 * server.c (gdbserver_version): Likewise.
1685
1686 2017-12-08 Tom Tromey <tom@tromey.com>
1687
1688 * ax.c (ax_printf): Update.
1689
1690 2017-12-07 Yao Qi <yao.qi@linaro.org>
1691
1692 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1693 aarch64_linux_read_description.
1694 * linux-amd64-ipa.c (idx2mask): New array.
1695 (get_ipa_tdesc): Move idx2mask out.
1696 (initialize_low_tracepoint): Initialize target descriptions.
1697 * linux-i386-ipa.c (idx2mask): New array.
1698 (get_ipa_tdesc): Move idx2mask out.
1699 (initialize_low_tracepoint): Initialize target descriptions.
1700
1701 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1702
1703 * tdesc.c (struct tdesc_type): Change return type.
1704 (tdesc_add_flag): Change parameter type.
1705 (tdesc_add_bitfield): Likewise.
1706 (tdesc_add_field): Likewise.
1707 (tdesc_set_struct_size): Likewise.
1708
1709 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1710
1711 * regcache.c (registers_to_string): Remove unused variable.
1712
1713 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1714
1715 * inferiors.c (for_each_inferior_with_data): Remove.
1716 * inferiors.h (for_each_inferior_with_data): Remove.
1717 * server.c (handle_qxfer_threads_worker): Change parameter type.
1718 (handle_qxfer_threads_proper): Use for_each_thread.
1719
1720 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1721
1722 * inferiors.c (for_each_inferior): Remove.
1723 (clear_inferiors): Use for_each_thread.
1724 * inferiors.h (for_each_inferior): Remove.
1725 * linux-low.c (linux_wait_for_event_filtered): Use
1726 for_each_thread.
1727 (linux_stabilize_threads): Likewise.
1728 * regcache.c (regcache_release): Likewise.
1729 * server.c (gdb_wants_all_threads_stopped): Likewise.
1730 (clear_pending_status_callback): Remove.
1731 (handle_status): Use for_each_thread.
1732 (captured_main): Likewise.
1733 * win32-low.c (child_init_thread_list): Likewise.
1734 (win32_clear_inferiors): Likewise.
1735 (fake_breakpoint_event): Likewise.
1736
1737 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1738
1739 * inferiors.h (find_inferior): Remove.
1740 * inferiors.c (find_inferior): Remove.
1741
1742 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1743
1744 * linux-low.c (resume_status_pending_p): Update comment.
1745 (need_step_over_p): Update comment.
1746
1747 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1748
1749 * linux-low.c (proceed_one_lwp): Return void, change parameter
1750 type.
1751 (unsuspend_and_proceed_one_lwp): Likewise.
1752 (proceed_all_lwps): Use for_each_thread.
1753 (unstop_all_lwps): Likewise.
1754
1755 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1756
1757 * linux-low.c (linux_resume_one_thread): Return void, take
1758 parameter directly.
1759 (linux_resume): Use for_each_thread.
1760
1761 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1762
1763 * linux-low.c (send_sigstop_callback): Return void, change
1764 parameter type. Rename to...
1765 (send_sigstop): ... this.
1766 (suspend_and_send_sigstop_callback): Return void, change parameter
1767 type. Rename to...
1768 (suspend_and_send_sigstop): ... this.
1769 (stop_all_lwps): Use for_each_thread.
1770
1771 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1772
1773 * linux-low.c (lwp_running): Return bool, remove unused
1774 argument.
1775 (linux_stabilize_threads): Use find_thread.
1776
1777 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1778
1779 * linux-low.c (select_singlestep_lwp_callback): Remove.
1780 (count_events_callback): Remove.
1781 (select_event_lwp_callback): Remove.
1782 (select_event_lwp): Use find_thread/for_each_thread.
1783
1784 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1785
1786 * linux-low.c (not_stopped_callback): Return bool, take filter
1787 argument directly.
1788 (linux_wait_for_event_filtered): Use find_thread.
1789 (linux_wait_1): Likewise.
1790
1791 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1792
1793 * linux-low.c (same_lwp): Remove.
1794 (find_lwp_pid): Use find_thread.
1795
1796 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1797
1798 * linux-low.c (delete_lwp_callback): Remove.
1799 (linux_mourn): Use for_each_thread.
1800
1801 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1802
1803 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1804 args parameter, don't check for pid.
1805 (linux_detach): Use for_each_thread.
1806
1807 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1808
1809 * linux-low.c (struct counter): Remove.
1810 (second_thread_of_pid_p): Remove.
1811 (last_thread_of_process_p): Use find_thread.
1812
1813 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1814
1815 * inferiors.c (find_inferior_in_random): Remove.
1816 * inferiors.h (find_inferior_in_random): Remove.
1817 * linux-low.c (status_pending_p_callback): Return bool, accept
1818 parameter ptid directly.
1819 (linux_wait_for_event_filtered): Use find_thread_in_random.
1820 (linux_wait_1): Likewise.
1821
1822 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1823
1824 * inferiors.c (find_inferior_id): Remove.
1825 (find_thread_ptid): Move implemention from find_inferior_id to
1826 here.
1827 * inferiors.h (find_inferior_id): Remove.
1828 * server.c (handle_status): Use find_thread_ptid.
1829 (process_serial_event): Likewise.
1830 * thread-db.c (find_one_thread): Likewise.
1831 (thread_db_thread_handle): Likewise.
1832 * win32-low.c (thread_rec): Likewise.
1833 (child_delete_thread): Likewise.
1834 (win32_thread_alive): Likewise.
1835 (get_child_debug_event): Likewise.
1836
1837 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1838
1839 * linux-mips-low.c (update_watch_registers_callback): Return
1840 void, remove pid_p parameter, don't check for pid.
1841 (mips_insert_point, mips_remove_point): Use for_each_thread.
1842
1843 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1844
1845 * lynx.low (lynx_delete_thread_callback): Remove.
1846 (lynx_mourn): Use for_each_thread.
1847
1848 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1849
1850 * regcache.c (regcache_invalidate_one): Remove.
1851 (regcache_invalidate_pid): use for_each_thread.
1852
1853 2017-11-26 Tom Tromey <tom@tromey.com>
1854
1855 * linux-low.c (linux_create_inferior): Update.
1856
1857 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1858
1859 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1860
1861 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1862
1863 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1864 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1865 * linux-aarch64-tdesc-selftest.c: New file.
1866 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1867
1868 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1869
1870 * configure.srv: Add new file.
1871 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1872 * linux-aarch64-tdesc-selftest.c: New file.
1873 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1874
1875 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1876
1877 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1878 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1879 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1880
1881 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1882
1883 * configure.srv: Add new files.
1884 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1885 aarch64_linux_read_description.
1886 * linux-aarch64-low.c (aarch64_linux_read_description):
1887 Merge with aarch64_arch_setup.
1888 (aarch64_arch_setup): Call aarch64_linux_read_description.
1889 * linux-aarch64-tdesc.c: New file.
1890 * linux-aarch64-tdesc.h: New file.
1891
1892 2017-11-24 Yao Qi <yao.qi@linaro.org>
1893
1894 * configure.srv: Set $srv_regobj for tic6x-linux.
1895 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1896 (tic6x_read_description): Move some code to tic6x_arch_setup.
1897 (tic6x_tdesc_test): New function.
1898 (initialize_low_arch): Call selftests::register_test.
1899
1900 2017-11-22 Yao Qi <yao.qi@linaro.org>
1901
1902 * remote-utils.c (prepare_resume_reply): Use memcpy.
1903
1904 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1905
1906 * linux-low.c (kill_one_lwp_callback): Return void, take
1907 argument directly, don't filter on pid.
1908 (linux_kill): Use for_each_thread.
1909
1910 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1911
1912 * linux-low.c (need_step_over_p): Return bool, remove dummy
1913 argument.
1914 (linux_resume, proceed_all_lwps): Use find_thread.
1915
1916 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1917
1918 * linux-low.c (resume_status_pending_p): Return bool, remove
1919 flag_p argument.
1920 (linux_resume): Use find_thread.
1921
1922 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1923
1924 * linux-low.c (struct thread_resume_array): Remove.
1925 (linux_set_resume_request): Return void, take arguments
1926 directly.
1927 (linux_resume): Use for_each_thread.
1928
1929 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1930
1931 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1932 return bool, remove data argument.
1933 (linux_stabilize_threads): Use find_thread.
1934
1935 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1936
1937 * linux-low.c (unsuspend_one_lwp): Remove.
1938 (unsuspend_all_lwps): Use for_each_thread, inline code from
1939 unsuspend_one_lwp.
1940
1941 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1942
1943 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1944 * linux-low.c (struct iterate_over_lwps_args): Remove.
1945 (iterate_over_lwps_filter): Remove.
1946 (iterate_over_lwps): Use find_thread.
1947
1948 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1949
1950 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1951 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1952 code from reset_lwp_ptrace_options_callback.
1953
1954 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1955
1956 * linux-arm-low.c (struct update_registers_data): Remove.
1957 (update_registers_callback): Return void, take arguments
1958 directly, don't check thread's pid.
1959 (arm_insert_point, arm_remove_point): Use for_each_thread.
1960
1961 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1962
1963 * win32-low.c (continue_one_thread): Return void, take argument
1964 directly.
1965 (child_continue): Use for_each_thread.
1966
1967 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1968
1969 * win32-i386-low.c (update_debug_registers_callback): Rename
1970 to ...
1971 (update_debug_registers): ... this, return void, remove pid_p arg.
1972 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1973
1974 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1975
1976 * inferiors.h (struct process_info): Add constructor, initialize
1977 fields..
1978 <syscalls_to_catch>: Change type to std::vector<int>.
1979 * inferiors.c (add_process): Allocate process_info with new.
1980 (remove_process): Free process_info with delete.
1981 * linux-low.c (handle_extended_wait): Adjust.
1982 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1983 * server.c (handle_general_set): Adjust.
1984
1985 2017-11-16 Pedro Alves <palves@redhat.com>
1986
1987 * remote-utils.c (remote_close): Block SIGIO signals instead of
1988 uninstalling the SIGIO handler.
1989
1990 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1991
1992 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1993
1994 2017-11-16 Yao Qi <yao.qi@linaro.org>
1995
1996 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1997 (tic6x_store_gregset): Likewise.
1998 (tic6x_usrregs_info): Move it up.
1999
2000 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2001
2002 * Makefile.in: Update arch rules.
2003 * configure.srv: Explicitly mark arch/ files.
2004
2005 2017-11-13 Andreas Schwab <schwab@suse.de>
2006
2007 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2008 function.
2009 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2010
2011 2017-11-06 Pedro Alves <palves@redhat.com>
2012
2013 * config.in, configure: Regenerate.
2014
2015 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2016
2017 * target.c (struct thread_search): Remove.
2018 (thread_search_callback): Remove.
2019 (prepare_to_access_memory): Use for_each_thread instead of
2020 find_inferior. Inline code from thread_search_callback.
2021
2022 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2023
2024 * server.c (struct visit_actioned_threads_data): Remove.
2025 (visit_actioned_threads): Change prototype to take arguments
2026 directly.
2027 (resume): Use find_thread instead of find_inferior.
2028
2029 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2030
2031 * server.c (queue_stop_reply_callback): Change prototype, return
2032 void.
2033 (find_status_pending_thread_callback): Remove.
2034 (handle_status): Replace find_inferior with find_thread and
2035 for_each_thread.
2036
2037 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2038
2039 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2040 with REGNO.
2041 (aarch64_store_gregset): Likewise.
2042 (aarch64_fill_fpregset): Likewise.
2043 (aarch64_store_fpregset): Likewise.
2044
2045 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2046
2047 * gdbthread.h (find_thread, for_each_thread): New functions.
2048 * inferiors.c (thread_of_pid): Remove.
2049 (find_any_thread_of_pid): Use find_thread.
2050 * linux-low.c (num_lwps): Use for_each_thread.
2051
2052 2017-10-17 Yao Qi <yao.qi@linaro.org>
2053
2054 * Makefile.in: Remove one rule.
2055 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2056
2057 2017-10-17 Yao Qi <yao.qi@linaro.org>
2058
2059 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2060 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2061
2062 2017-10-17 Yao Qi <yao.qi@linaro.org>
2063
2064 * configure.srv: Rename arm.o with arch/arm.o.
2065
2066 2017-10-17 Yao Qi <yao.qi@linaro.org>
2067
2068 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2069 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2070 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2071 (arch-i386.o, arch-amd64.o): Remove rules.
2072 (arch/%.o): New rule.
2073 Update POSTCOMPILE and COMPILE.pre.
2074 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2075 * configure: Re-generated.
2076 * configure.srv: Replace arch-i386.o with arch/i386.o.
2077 Replace arch-amd64.o with arch/amd64.o.
2078
2079 2017-10-16 Yao Qi <yao.qi@linaro.org>
2080
2081 * configure: Regenerated.
2082
2083 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2084
2085 * inferiors.h: (struct inferior_list): Remove.
2086 (struct inferior_list_entry); Remove.
2087 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2088 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2089 get_first_inferior): Remove.
2090 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2091 find_inferior_id, find_inferior_in_random): Change signature.
2092 * inferiors.c (all_threads): Change type to
2093 std::list<thread_info *>.
2094 (get_thread): Remove macro.
2095 (find_inferior, find_inferior_id): Change signature, implement
2096 using find_thread.
2097 (find_inferior_in_random): Change signature, implement using
2098 find_thread_in_random.
2099 (for_each_inferior, for_each_inferior_with_data): Change
2100 signature, implement using for_each_thread.
2101 (add_inferior_to_list, remove_inferior): Remove.
2102 (add_thread, get_first_thread, thread_of_pid,
2103 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2104 (get_first_inferior, one_inferior_p, clear_inferior_list):
2105 Remove.
2106 (clear_inferiors, get_thread_process): Update.
2107 * gdbthread.h: Include <list>.
2108 (struct thread_info) <entry>: Remove field.
2109 <id>: New field.
2110 (all_threads): Change type to std::list<thread_info *>.
2111 (get_first_inferior): Add doc.
2112 (find_thread, for_each_thread, find_thread_in_random): New
2113 functions.
2114 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2115 * linux-arm-low.c (update_registers_callback): Update.
2116 * linux-low.c (second_thread_of_pid_p): Update.
2117 (kill_one_lwp_callback, linux_detach_lwp_callback,
2118 delete_lwp_callback, status_pending_p_callback, same_lwp,
2119 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2120 iterate_over_lwps, not_stopped_callback,
2121 resume_stopped_resumed_lwps, count_events_callback,
2122 select_singlestep_lwp_callback, select_event_lwp_callback,
2123 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2124 suspend_and_send_sigstop_callback, wait_for_sigstop,
2125 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2126 lwp_running, linux_set_resume_request, resume_status_pending_p,
2127 need_step_over_p, start_step_over, linux_resume_one_thread,
2128 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2129 reset_lwp_ptrace_options_callback): Update.
2130 * linux-mips-low.c (update_watch_registers_callback): Update.
2131 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2132 Update.
2133 (free_register_cache_thread_one): Remove.
2134 (regcache_release): Update.
2135 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2136 handle_qxfer_threads_worker): Update.
2137 (handle_query): Update, use list iterator.
2138 (visit_actioned_threads, handle_pending_status,
2139 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2140 clear_pending_status_callback, set_pending_status_callback,
2141 find_status_pending_thread_callback, handle_status,
2142 process_serial_event): Update.
2143 * target.c (thread_search_callback): Update.
2144 * thread-db.c (thread_db_get_tls_address): Update.
2145 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2146 Update.
2147 * win32-i386-low.c (update_debug_registers_callback): Update.
2148 * win32-low.c (delete_thread_info, child_delete_thread,
2149 continue_one_thread, suspend_one_thread,
2150 get_child_debug_event): Adjust.
2151
2152 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2153
2154 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2155 * inferiors.h: Include <list>.
2156 (struct process_info) <entry>: Remove field.
2157 <pid>: New field.
2158 (pid_of): Change macro to function.
2159 (ptid_of, lwpid_of): Remove macro.
2160 (all_processes): Change type to std::list<process_info *>.
2161 (ALL_PROCESSES): Remove macro.
2162 (for_each_process, find_process): New function.
2163 * inferiors.c (all_processes): Change type to
2164 std::list<process_info *>.
2165 (find_thread_process): Adjust.
2166 (add_process): Likewise.
2167 (remove_process): Likewise.
2168 (find_process_pid): Likewise.
2169 (get_first_process): Likewise.
2170 (started_inferior_callback): Remove.
2171 (have_started_inferiors_p): Adjust.
2172 (attached_inferior_callback): Remove.
2173 (have_attached_inferiors_p): Adjust.
2174 * linux-low.c (check_zombie_leaders): Likewise.
2175 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2176 (x86_linux_update_xmltarget): Adjust.
2177 * server.c (handle_query): Likewise.
2178 (gdb_reattached_process): Remove.
2179 (handle_status): Adjust.
2180 (kill_inferior_callback): Likewise.
2181 (detach_or_kill_inferior): Remove.
2182 (print_started_pid): Likewise.
2183 (print_attached_pid): Likewise.
2184 (detach_or_kill_for_exit): Update.
2185 (process_serial_event): Likewise.
2186 * linux-arm-low.c (arm_new_fork): Likewise.
2187
2188 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2189
2190 * dll.h: Include <list>.
2191 (struct dll_info): Add constructor.
2192 <entry>: Remove field.
2193 (all_dlls): Change type to std::list<dll_info>.
2194 * dll.c: Include <algorithm>.
2195 (get_dll): Remove macro.
2196 (all_dlls): Change type to std::list<dll_info *>.
2197 (free_one_dll): Remove.
2198 (match_dll): Likewise.
2199 (loaded_dll): Adjust.
2200 (unloaded_dll): Adjust to all_dlls type change, use
2201 std::find_if. Inline code from match_dll.
2202 (clear_dlls): Adjust to all_dlls type change.
2203 * server.c (emit_dll_description): Remove.
2204 (handle_qxfer_libraries): Adjust to all_dlls type change,
2205 integrate emit_dll_description's functionality.
2206
2207 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2208
2209 * linux-low.h (struct linux_target_ops) <delete_process>: New
2210 field.
2211 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2212 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2213 (struct linux_target_ops): Add delete_process callback.
2214 * linux-arm-low.c (arm_delete_process): New.
2215 (struct linux_target_ops): Add delete_process callback.
2216 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2217 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2218 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2219 * linux-mips-low.c (mips_linux_delete_process): New.
2220 (struct linux_target_ops): Add delete_process callback.
2221 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2222 * linux-s390-low.c (struct linux_target_ops): Likewise.
2223 * linux-sh-low.c (struct linux_target_ops): Likewise.
2224 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2225 * linux-tile-low.c (struct linux_target_ops): Likewise.
2226 * linux-x86-low.c (x86_linux_delete_process): New.
2227 (struct linux_target_ops): Add delete_process callback.
2228 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2229
2230 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2231
2232 * linux-aarch64-low.c (the_low_target): Add thread delete
2233 callback.
2234 * linux-arm-low.c (arm_delete_thread): New function.
2235 (the_low_target): Add thread delete callback.
2236 * linux-bfin-low.c (the_low_target): Likewise.
2237 * linux-crisv32-low.c (the_low_target): Likewise.
2238 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2239 set.
2240 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2241 field.
2242 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2243 * linux-mips-low.c (mips_linux_delete_thread): New function.
2244 (the_low_target): Add thread delete callback.
2245 * linux-ppc-low.c (the_low_target): Likewise.
2246 * linux-s390-low.c (the_low_target): Likewise.
2247 * linux-sh-low.c (the_low_target): Likewise.
2248 * linux-tic6x-low.c (the_low_target): Likewise.
2249 * linux-tile-low.c (the_low_target): Likewise.
2250 * linux-x86-low.c (the_low_target): Likewise.
2251 * linux-xtensa-low.c (the_low_target): Likewise.
2252
2253 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2254
2255 * win32-low.c: Include "common-inferior.h".
2256
2257 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2258
2259 * inferiors.c (set_inferior_cwd): New function.
2260 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2261 (handle_query): Inform that QSetWorkingDir is supported.
2262 * win32-low.c (create_process): Pass the inferior's cwd to
2263 CreateProcess.
2264
2265 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2266
2267 * inferiors.c (current_inferior_cwd): New global variable.
2268 (get_inferior_cwd): New function.
2269 * inferiors.h (struct process_info) <cwd>: New field.
2270
2271 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2272
2273 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2274 (OBS): Add gdb_tilde_expand.o.
2275
2276 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2277
2278 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2279 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2280
2281 2017-09-29 Pedro Alves <palves@redhat.com>
2282
2283 * ax.c (gdb_parse_agent_expr): Constify.
2284 * ax.h (gdb_parse_agent_expr): Constify.
2285 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2286 Constify.
2287 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2288 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2289 * remote-utils.h (read_ptid): Constify.
2290 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2291 (process_point_options, process_serial_event): Constify.
2292 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2293 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2294 (cmd_qtbuffer): Constify.
2295
2296 2017-09-29 Pedro Alves <palves@redhat.com>
2297
2298 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2299 fails.
2300
2301 2017-09-29 Pedro Alves <palves@redhat.com>
2302
2303 * linux-low.c (handle_extended_wait): Pass parent thread instead
2304 of process to thread_db_notice_clone.
2305 * linux-low.h (thread_db_notice_clone): Replace parent process
2306 parameter with parent thread parameter.
2307 * thread-db.c (find_one_thread): Add comment.
2308 (thread_db_notice_clone): Replace parent process parameter with
2309 parent thread parameter. Temporarily switch to the parent thread.
2310
2311 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2312
2313 * gdbthread.h: Include "common-gdbthread.h".
2314 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2315 "if" when validating the ptid.
2316 * remote-utils.c: Include "gdbthread.h".
2317 (prepare_resume_reply): Use "switch_to_thread".
2318 * target.c (done_accessing_memory): Likewise.
2319
2320 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2321
2322 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2323 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2324 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2325 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2326 s390x-gs-linux64-ipa.o to ipa_obj.
2327 * linux-s390-low.c (HWCAP_S390_GS): New define.
2328 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2329 New functions.
2330 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2331 (s390_arch_setup): Check for guarded-storage support and choose
2332 appropriate tdesc.
2333 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2334 init_registers_s390x_gs_linux64.
2335 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2336 enum value.
2337 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2338 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2339
2340 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2341
2342 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2343
2344 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2345
2346 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2347 (thread_db_thread_handle): Declare.
2348 * linux-low.c (linux_target_ops): Initialize thread_handle.
2349 * server.c (handle_qxfer_threads_worker): Add support for
2350 "handle" attribute.
2351 * target.h (struct target_ops): Add new function pointer,
2352 thread_handle.
2353 (target_thread_handle): Define.
2354 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2355 field in lwp.
2356 (thread_db_thread_handle): New function.
2357
2358 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2359
2360 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2361 * linux-low.h (thread_db_notice_clone): Declare.
2362 * thread-db.c (thread_db_notice_clone): New function.
2363
2364 2017-09-21 Pedro Alves <palves@redhat.com>
2365
2366 * server.c (gdb_read_memory, handle_status, process_serial_event)
2367 (handle_serial_event, handle_target_event): Adjust to
2368 set_desired_thread prototype change.
2369 * target.c (set_desired_thread): Remove 'use_general' parameter
2370 and adjust.
2371 * target.h (set_desired_thread): Remove 'use_general' parameter.
2372
2373 2017-09-20 Tom Tromey <tom@tromey.com>
2374
2375 * target.c (target_terminal::terminal_state): Define.
2376 (target_terminal::init): Rename from target_terminal_init.
2377 (target_terminal::inferior): Rename from
2378 target_terminal_inferior.
2379 (target_terminal::ours): Rename from target_terminal_ours.
2380 (target_terminal::ours_for_output, target_terminal::info): New.
2381
2382 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2383
2384 * server.c (accumulate_file_name_length): Remove.
2385 (emit_dll_description): Adjust to std::string change.
2386 (handle_qxfer_libraries): Use std::string to hold document.
2387
2388 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2389
2390 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2391 return type of xml_escape_text.
2392 * server.c (emit_dll_description): Likewise.
2393
2394 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2395
2396 * server.c (captured_main): Accept argument for --selftest.
2397 Update run_tests call.
2398 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2399 when registering selftests.
2400
2401 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2402
2403 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2404 instead of "VEC" for "target_desc.reg_defs".
2405 (regcache_cpy): Likewise.
2406 (registers_to_string): Likewise.
2407 (registers_from_string): Likewise.
2408 (find_regno): Likewise.
2409 (supply_regblock): Likewise.
2410 (regcache_raw_read_unsigned): Likewise.
2411 * tdesc.c (init_target_desc): Likewise.
2412 (tdesc_create_reg): Likewise.
2413 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2414 (struct target_desc) <reg_defs>: Convert to "std::vector".
2415 (target_desc): Do not initialize "reg_defs".
2416 (~target_desc): Update code to use "std::vector" instead of "VEC"
2417 for "target_desc.reg_defs".
2418 (operator==): Likewise.
2419
2420 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2421
2422 * inferiors.h (thread_to_gdb_id): Remove.
2423 * inferiors.c (thread_to_gdb_id): Remove.
2424 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2425 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2426 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2427 Likewise.
2428 * nto-low.c (nto_fetch_registers, nto_store_registers,
2429 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2430
2431 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2432
2433 * inferiors.h (gdb_id_to_thread_id): Remove.
2434 * inferiors.c (gdb_id_to_thread_id): Remove.
2435 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2436 removal. Move pid declaration closer to where it's used.
2437
2438 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2439
2440 * server.c (handle_detach): New function.
2441 (process_serial_event): Move code out, call handle_detach.
2442
2443 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2444
2445 * server.c (require_running): Rename to ...
2446 (require_running_or_return): ... this ...
2447 (require_running_or_break): ... and this.
2448 (handle_query, process_serial_event): Adjust.
2449
2450 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2451
2452 * linux-low.c (linux_set_resume_request): Remove unused
2453 variables.
2454
2455 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2456
2457 * server.c (first_thread_of): Remove.
2458 (process_serial_event): Replace usage of first_thread_of with
2459 find_any_thread_of_pid.
2460 * tracepoint.c (same_process_p): Remove.
2461 (gdb_agent_about_to_close): Replace usage of same_process_p with
2462 find_any_thread_of_pid.
2463 * linux-x86-low.c (same_process_callback): Remove.
2464 (x86_arch_setup_process_callback): Replace usage of
2465 same_process_callback with find_any_thread_of_pid.
2466 * thread-db.c (any_thread_of): Remove.
2467 (switch_to_process): Replace usage of any_thread_of with
2468 find_any_thread_of_pid.
2469 * inferiors.c (thread_pid_matches_callback): Remove.
2470 (find_thread_process): Adjust to use find_any_thread_of_pid.
2471
2472 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2473
2474 * regcache.c (get_thread_regcache): Guard calls to "memset"
2475 with "!VEC_empty".
2476
2477 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2478
2479 * linux-low.c (handle_extended_wait): Use
2480 "allocate_target_description" instead of "XNEW".
2481 * linux-x86-low.c (initialize_low_arch): Likewise.
2482
2483 2017-09-05 Yao Qi <yao.qi@linaro.org>
2484
2485 * configure.srv (srv_i386_regobj): Remove.
2486 (srv_amd64_regobj): Remove.
2487 (srv_regobj): Set it to "" for x86 non-linux targets.
2488 * linux-x86-tdesc.c (i386_linux_read_description):
2489 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2490 (init_registers_i386): Remove the declaration.
2491 (tdesc_i386): Remove the declaration.
2492 (lynx_i386_arch_setup): Call i386_create_target_description.
2493 * nto-x86-low.c: Likewise.
2494 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2495 [!__x86_64__]: include arch/i386.h.
2496 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2497
2498 2017-09-05 Yao Qi <yao.qi@linaro.org>
2499
2500 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2501 i386/amd64-XXX-linux from it.
2502
2503 2017-09-05 Yao Qi <yao.qi@linaro.org>
2504
2505 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2506 false.
2507 (ipa_amd64_linux_regobj): Remove.
2508 (ipa_x32_linux_regobj): Remove.
2509
2510 2017-09-05 Yao Qi <yao.qi@linaro.org>
2511
2512 * Makefile.in (arch-amd64.o): New rule.
2513 * configure.srv: Append arch-amd64.o.
2514 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2515 (get_ipa_tdesc): Call amd64_linux_read_description.
2516 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2517 and init_registers_amd64_XXX.
2518 * linux-x86-low.c (x86_linux_read_description): Call
2519 amd64_linux_read_description.
2520 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2521 (initialize_low_arch): Don't call init_registers_x32_XXX and
2522 init_registers_amd64_XXX.
2523 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2524 and tdesc_amd64_XXX.
2525 [__x86_64__] (amd64_tdesc_test): New function.
2526 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2527 and init_registers_amd64_XXX.
2528 * linux-x86-tdesc.c: Include arch/amd64.h.
2529 (xcr0_to_tdesc_idx): New function.
2530 (i386_linux_read_description): New function.
2531 (amd64_get_ipa_tdesc_idx): New function.
2532 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2533 (amd64_get_ipa_tdesc): Declare.
2534
2535 2017-09-05 Yao Qi <yao.qi@linaro.org>
2536
2537 * configure.srv (srv_i386_linux_xmlfiles): Remove
2538 i386/i386-XXX-linux.xml from it.
2539
2540 2017-09-05 Yao Qi <yao.qi@linaro.org>
2541
2542 * configure.srv: Set srv_i386_linux_regobj empty if $development
2543 is false.
2544 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2545 initialize_low_tdesc.
2546 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2547 with #if initialize_low_tdesc.
2548 * linux-x86-tdesc-selftest.c: New file.
2549 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2550
2551 2017-09-05 Yao Qi <yao.qi@linaro.org>
2552
2553 * Makefile.in (arch-i386.o): New rule.
2554 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2555 (x86_64-*-linux*): Likewise.
2556 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2557 include arch/i386.h.
2558 (i386_linux_read_description): Remove code and call
2559 i386_create_target_description.
2560 * tdesc.c (allocate_target_description): New function.
2561 * tdesc.h (set_tdesc_architecture): Remove declaration.
2562 (set_tdesc_osabi): Likewise.
2563
2564 2017-09-05 Yao Qi <yao.qi@linaro.org>
2565
2566 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2567 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2568 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2569 .xmltarget.
2570 * server.c (get_features_xml): Call tdesc_get_features_xml.
2571 * tdesc.c (set_tdesc_architecture): New function.
2572 (set_tdesc_osabi): New function.
2573 (tdesc_get_features_xml): New function.
2574 (tdesc_create_feature): Add an argument.
2575 * tdesc.h (struct target_desc) <features>: New field.
2576 <arch, osabi>: New field.
2577 (~target_desc): xfree features, arch, and osabi.
2578 (target_desc::oerator==): Don't compare .xmltarget.
2579 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2580 (set_tdesc_osabi): Likewise.
2581 (tdesc_get_features_xml): Likewise.
2582
2583 2017-09-05 Yao Qi <yao.qi@linaro.org>
2584
2585 * linux-x86-tdesc.c: Include selftest.h.
2586 (i386_tdesc_test): New function.
2587 (initialize_low_tdesc): Call selftests::register_test.
2588 * tdesc.h: Include regdef.h.
2589 (target_desc): Override operator == and !=.
2590
2591 2017-09-05 Yao Qi <yao.qi@linaro.org>
2592
2593 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2594 (ipa_obj): Likewise.
2595 * linux-i386-ipa.c: Include common/x86-xstate.h
2596 (get_ipa_tdesc): Call i386_linux_read_description.
2597 (initialize_low_tracepoint): Don't call init_registers_XXX
2598 functions, call initialize_low_tdesc instead.
2599 * linux-x86-low.c (x86_linux_read_description): Call
2600 i386_linux_read_description.
2601 (initialize_low_arch): Don't call init_registers_i386_XXX
2602 functions, call initialize_low_tdesc.
2603 * linux-x86-tdesc.c: New file.
2604 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2605 (i386_get_ipa_tdesc_idx): Declare.
2606 (i386_get_ipa_tdesc): Declare.
2607 (initialize_low_tdesc): Declare.
2608
2609 2017-09-05 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2612 instead of 0.
2613
2614 2017-09-05 Yao Qi <yao.qi@linaro.org>
2615
2616 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2617 * regcache.c (get_thread_regcache): Use VEC_length.
2618 (init_register_cache): Likewise.
2619 (regcache_cpy): Likewise.
2620 (registers_to_string): Iterate reg_defs via VEC_iterate.
2621 (find_regno): Likewise.
2622 (find_register_by_number): Use VEC_index.
2623 (register_size): Call find_register_by_number.
2624 (register_data): Call find_register_by_number.
2625 (supply_regblock): Use VEC_length.
2626 (regcache_raw_read_unsigned): Likewise.
2627 * tdesc.c (init_target_desc): Iterate reg_defs via
2628 VEC_iterate.
2629 (default_description): Update initializer.
2630 (copy_target_description): Don't update field num_registers.
2631 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2632 <num_registers>: Remove.
2633
2634 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2635
2636 * Makefile.in (.SECONDARY): Define target.
2637
2638 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2639
2640 * linux-low.c (linux_wait_1): Adjust.
2641 * server.c (queue_stop_reply_callback): Adjust.
2642
2643 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2644
2645 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2646 QEnvironmentUnset and QEnvironmentReset packets.
2647 (handle_query): Inform remote that QEnvironmentHexEncoded,
2648 QEnvironmentUnset and QEnvironmentReset are supported.
2649
2650 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2651
2652 * inferiors.h (inferior_target_data): Rename to ...
2653 (thread_target_data): ... this.
2654 (inferior_regcache_data): Rename to ...
2655 (thread_regcache_data): ... this.
2656 (set_inferior_regcache_data): Rename to ...
2657 (set_thread_regcache_data): ... this.
2658 * inferiors.c (inferior_target_data): Rename to ...
2659 (thread_target_data): ... this.
2660 (inferior_regcache_data): Rename to ...
2661 (thread_regcache_data): ... this.
2662 (set_inferior_regcache_data): Rename to ...
2663 (set_thread_regcache_data): ... this.
2664 (free_one_thread): Update.
2665 * linux-low.h (get_thread_lwp): Update.
2666 * regcache.c (get_thread_regcache): Update.
2667 (regcache_invalidate_thread): Update.
2668 (free_register_cache_thread): Update.
2669 * win32-i386-low.c (update_debug_registers_callback): Update.
2670 (win32_get_current_dr): Update.
2671 * win32-low.c (thread_rec): Update.
2672 (delete_thread_info): Update.
2673 (continue_one_thread): Update.
2674 (suspend_one_thread): Update.
2675
2676 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2677
2678 * inferiors.c (set_inferior_target_data): Remove.
2679 * inferiors.h (set_inferior_target_data): Remove.
2680
2681 2017-08-18 Yao Qi <yao.qi@linaro.org>
2682
2683 * Makefile.in (OBS): Add selftest.o.
2684 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2685 * configure, config.in: Re-generated.
2686 * server.c: Include common/sefltest.h.
2687 (captured_main): Handle option --selftest.
2688
2689 2017-08-09 Yao Qi <yao.qi@linaro.org>
2690
2691 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2692 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2693 i386-avx-mpx.o and i386-mmx.o.
2694 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2695 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2696 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2697 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2698 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2699 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2700 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2701 i386/amd64-avx-mpx.xml.
2702
2703 2017-08-09 Yao Qi <yao.qi@linaro.org>
2704
2705 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2706 and x32-avx-avx512.o.
2707 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2708 i386/x32-avx-avx512.xml.
2709
2710 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2711
2712 * tracepoint.h (enum class fast_tpoint_collect_result): New
2713 enumeration.
2714 (fast_tracepoint_collecting): Change return type to
2715 fast_tpoint_collect_result.
2716 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2717 * linux-low.h: Include tracepoint.h.
2718 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2719 fast_tpoint_collect_result.
2720 * linux-low.c (handle_tracepoints): Adjust.
2721 (linux_fast_tracepoint_collecting): Change return type to
2722 fast_tpoint_collect_result.
2723 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2724 linux_wait_1, stuck_in_jump_pad_callback,
2725 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2726 proceed_one_lwp): Adjust to type change.
2727
2728 2017-07-10 Yao Qi <yao.qi@linaro.org>
2729
2730 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2731
2732 2017-06-29 Yao Qi <yao.qi@linaro.org>
2733
2734 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2735 Remove.
2736 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2737
2738 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2739
2740 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2741
2742 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2743
2744 * linux-low.c (linux_create_inferior): Adjust code to access the
2745 environment information via 'gdb_environ' class.
2746 * lynx-low.c (lynx_create_inferior): Likewise.
2747 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2748 (get_environ): Return a pointer to 'our_environ'.
2749 (captured_main): Initialize 'our_environ'.
2750 * server.h (get_environ): Adjust prototype.
2751 * spu-low.c (spu_create_inferior): Adjust code to access the
2752 environment information via 'gdb_environ' class.
2753
2754 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2755
2756 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2757 usage of "register" keyword.
2758
2759 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2760
2761 * configure: Re-generate.
2762
2763 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2764
2765 * configure: Re-generate.
2766
2767 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2768
2769 * Makefile.in (COMPILE.pre): Add "-x c++".
2770
2771 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2772
2773 * fork-child.c: Conditionally include <signal.h>.
2774
2775 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2776
2777 * server.c (handle_general_set): Handle new packet
2778 "QStartupWithShell".
2779 (handle_query): Add "QStartupWithShell" to the list of supported
2780 packets.
2781 (gdbserver_usage): Add help text explaining the
2782 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2783 options.
2784 (captured_main): Recognize and act upon the presence of the new
2785 CLI options.
2786
2787 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2788 Pedro Alves <palves@redhat.com>
2789
2790 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2791 * configure: Regenerate.
2792 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2793 "fork-inferior.o".
2794 (i[34567]86-*-lynxos*): Likewise.
2795 (spu*-*-*): Likewise.
2796 * fork-child.c: New file.
2797 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2798 and "environ.h".
2799 (linux_ptrace_fun): New function.
2800 (linux_create_inferior): Adjust function prototype to reflect
2801 change on "target.h". Adjust function code to use
2802 "fork_inferior".
2803 (linux_request_interrupt): Delete "signal_pid".
2804 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2805 (lynx_ptrace_fun): New function.
2806 (lynx_create_inferior): Adjust function prototype to reflect
2807 change on "target.h". Adjust function code to use
2808 "fork_inferior".
2809 * nto-low.c (nto_create_inferior): Adjust function prototype and
2810 code to reflect change on "target.h". Update comments.
2811 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2812 "common-terminal.h" and "environ.h".
2813 (terminal_fd): Moved to fork-child.c.
2814 (old_foreground_pgrp): Likewise.
2815 (restore_old_foreground_pgrp): Likewise.
2816 (last_status): Make it global.
2817 (last_ptid): Likewise.
2818 (our_environ): New variable.
2819 (startup_with_shell): Likewise.
2820 (program_name): Likewise.
2821 (program_argv): Rename to...
2822 (program_args): ...this.
2823 (wrapper_argv): New variable.
2824 (start_inferior): Delete function.
2825 (get_exec_wrapper): New function.
2826 (get_exec_file): Likewise.
2827 (get_environ): Likewise.
2828 (prefork_hook): Likewise.
2829 (post_fork_inferior): Likewise.
2830 (postfork_hook): Likewise.
2831 (postfork_child_hook): Likewise.
2832 (handle_v_run): Update code to deal with arguments coming from the
2833 remote host. Update calls from "start_inferior" to
2834 "create_inferior".
2835 (captured_main): Likewise. Initialize environment variable. Call
2836 "have_job_control".
2837 * server.h (post_fork_inferior): New prototype.
2838 (get_environ): Likewise.
2839 (last_status): Declare.
2840 (last_ptid): Likewise.
2841 (signal_pid): Likewise.
2842 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2843 (spu_ptrace_fun): New function.
2844 (spu_create_inferior): Adjust function prototype to reflect change
2845 on "target.h". Adjust function code to use "fork_inferior".
2846 * target.c (target_terminal_init): New function.
2847 (target_terminal_inferior): Likewise.
2848 (target_terminal_ours): Likewise.
2849 * target.h: Include <vector>.
2850 (struct target_ops) <create_inferior>: Update prototype.
2851 (create_inferior): Update macro.
2852 * utils.c (gdb_flush_out_err): New function.
2853 * win32-low.c (win32_create_inferior): Adjust function prototype
2854 and code to reflect change on "target.h".
2855
2856 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2857
2858 * inferiors.c (switch_to_thread): New function.
2859
2860 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2861
2862 * Makefile.in (SFILE): Add "common/job-control.c".
2863 (OBS): Add "job-control.o".
2864
2865 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2866
2867 * Makefile: Remove "@host_makefile_frag@".
2868
2869 2017-05-05 Pedro Alves <palves@redhat.com>
2870
2871 * configure: Regenerate.
2872
2873 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2874
2875 * configure: Regenerate.
2876
2877 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2878
2879 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2880 software_single_step change of return type to
2881 std::vector<CORE_ADDR>.
2882 * linux-low.c (install_software_single_step_breakpoints):
2883 Likewise.
2884 * linux-low.h (install_software_single_step_breakpoints):
2885 Likewise.
2886
2887 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2888
2889 * remote-utils.c: Include "gdb_termios.h" instead of
2890 "terminal.h".
2891 * terminal.h: Delete file.
2892
2893 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2894
2895 * server.c: Include <vector>.
2896 <program_argv, wrapper_argv>: Convert to std::vector.
2897 (start_inferior): Rewrite function to use C++.
2898 (handle_v_run): Likewise. Update code that calculates the argv
2899 based on the vRun packet; use C++.
2900 (captured_main): Likewise.
2901
2902 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2903
2904 * server.c (handle_v_cont): Initialize thread_resume::thread
2905 with null_ptid.
2906
2907 2017-04-05 Pedro Alves <palves@redhat.com>
2908
2909 * configure: Regenerate.
2910
2911 2017-04-05 Pedro Alves <palves@redhat.com>
2912
2913 * gdbreplay.c (sync_error): Constify.
2914 * linux-x86-low.c (push_opcode): Constify.
2915
2916 2017-04-05 Pedro Alves <palves@redhat.com>
2917
2918 * win32-low.c (get_child_debug_event)
2919 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2920 Report TARGET_WAITKIND_SPURIOUS instead.
2921
2922 2017-04-05 Pedro Alves <palves@redhat.com>
2923
2924 * remote-utils.c (remote_prepare, remote_open): Constify.
2925 * remote-utils.h (remote_prepare, remote_open): Constify.
2926 * server.c (captured_main): Constify 'port' handling.
2927
2928 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2929
2930 * Makefile.in (clean): Clear .deps.
2931
2932 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2933
2934 * .gitignore: Remove generated files, replace with wildcard.
2935 * (clean): Replace removal of generated files with wildcard.
2936 (version.c): Replace with...
2937 (version-generated.c): ...this.
2938 (xml-builtin.c): Replace with...
2939 (xml-builtin-generated.c): ...this.
2940 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2941 (%.c: *regformats*): Replace with...
2942 (%-generated.c: *regformats*): ...this.
2943
2944 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2945
2946 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2947 (xtensa_fill_gregset): Call collect_register_by_name for
2948 threadptr register.
2949 (xtensa_store_gregset): Call supply_register_by_name for
2950 threadptr register.
2951
2952 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2953
2954 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2955 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2956 (xtensa_store_gregset): Call supply_register for all registers in
2957 a0_regnum..a0_regnum + C0_NREGS range.
2958
2959 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2960
2961 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2962 (ax-ipa.o: ax.c): Remove.
2963 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2964 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2965 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2966 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2967 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2968
2969 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2970
2971 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2972 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2973 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2974 (errors-ipa.o: ../common/errors.c): Remove.
2975 (format-ipa.o: ../common/format.c): Remove.
2976 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2977
2978 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2979
2980 * Makefile.in (%-ipa.o: %.c): New rule.
2981 (tracepoint-ipa.o: tracepoint.c): Remove.
2982 (utils-ipa.o: utils.c): Remove.
2983 (remote-utils-ipa.o: remote-utils.c): Remove.
2984 (regcache-ipa.o: regcache.c): Remove.
2985 (i386-linux-ipa.o: i386-linux.c): Remove.
2986 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2987 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2988 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2989 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2990 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2991 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2992 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2993 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2994 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2995 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2996 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2997 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2998 (aarch64-ipa.o: aarch64.c): Remove.
2999 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3000 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3001 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3002 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3003 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3004 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3005 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3006 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3007 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3008 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3009 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3010 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3011 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3012 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3013 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3014 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3015 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3016 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3017 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3018 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3019 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3020 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3021 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3022 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3023 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3024 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3025 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3026 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3027 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3028 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3029 (tdesc-ipa.o: tdesc.c): Remove.
3030 (x32-linux-ipa.o: x32-linux.c): Remove.
3031 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3032 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3033
3034 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3035
3036 * Makefile.in (%.o: ../arch/%.c): New rule.
3037 (arm.o: ../arch/arm.c): Remove.
3038 (arm-linux.o: ../arch/arm-linux.c): Remove.
3039 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3040 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3041
3042 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3043
3044 * Makefile.in (%.o: ../nat/%.c): New rule.
3045 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3046 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3047 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3048 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3049 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3050 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3051 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3052 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3053 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3054 (linux-personality.o: ../nat/linux-personality.c): Remove.
3055 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3056 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3057 (x86-linux.o: ../nat/x86-linux.c): Remove.
3058 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3059 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3060
3061 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3062
3063 * Makefile.in (%.o: ../common/%.c): New rule.
3064 (signals.o: ../common/signals.c): Remove.
3065 (print-utils.o: ../common/print-utils.c): Remove.
3066 (rsp-low.o: ../common/rsp-low.c): Remove.
3067 (common-utils.o: ../common/common-utils.c): Remove.
3068 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3069 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3070 (vec.o: ../common/vec.c): Remove.
3071 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3072 (xml-utils.o: ../common/xml-utils.c): Remove.
3073 (ptid.o: ../common/ptid.c): Remove.
3074 (buffer.o: ../common/buffer.c): Remove.
3075 (format.o: ../common/format.c): Remove.
3076 (filestuff.o: ../common/filestuff.c): Remove.
3077 (agent.o: ../common/agent.c): Remove.
3078 (errors.o: ../common/errors.c): Remove.
3079 (environ.o: ../common/environ.c): Remove.
3080 (common-debug.o: ../common/common-debug.c): Remove.
3081 (cleanups.o: ../common/cleanups.c): Remove.
3082 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3083 (fileio.o: ../common/fileio.c): Remove.
3084 (common-regcache.o: ../common/common-regcache.c): Remove.
3085 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3086 (new-op.o: ../common/new-op.c): Remove.
3087 (btrace-common.o: ../common/btrace-common.c): Remove.
3088
3089 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3090
3091 * Makefile.in (%.o: ../target/%.c): New rule.
3092 (waitstatus.o: ../target/waitstatus.c): Remove.
3093
3094 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3095
3096 * Makefile.in
3097 (%.c: ../regformats/%.dat,
3098 (%.c: ../regformats/arm/%.dat,
3099 (%.c: ../regformats/i386/%.dat,
3100 (%.c: ../regformats/rs6000/%.dat): New rules.
3101 (aarch64.c): Remove.
3102 (reg-arm.c): Remove.
3103 (arm-with-iwmmxt.c): Remove.
3104 (arm-with-vfpv2.c): Remove.
3105 (arm-with-vfpv3.c): Remove.
3106 (arm-with-neon.c): Remove.
3107 (reg-bfin.c): Remove.
3108 (reg-cris.c): Remove.
3109 (reg-crisv32.c): Remove.
3110 (i386.c): Remove.
3111 (i386-linux.c): Remove.
3112 (i386-avx.c): Remove.
3113 (i386-avx-linux.c): Remove.
3114 (i386-avx-avx512.c): Remove.
3115 (i386-avx-avx512-linux.c): Remove.
3116 (i386-mpx.c): Remove.
3117 (i386-mpx-linux.c): Remove.
3118 (i386-avx-mpx-avx512-pku.c): Remove.
3119 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3120 (i386-avx-mpx.c): Remove.
3121 (i386-avx-mpx-linux.c): Remove.
3122 (i386-mmx.c): Remove.
3123 (i386-mmx-linux.c): Remove.
3124 (reg-ia64.c): Remove.
3125 (reg-m32r.c): Remove.
3126 (reg-m68k.c): Remove.
3127 (reg-cf.c): Remove.
3128 (mips-linux.c): Remove.
3129 (mips-dsp-linux.c): Remove.
3130 (mips64-linux.c): Remove.
3131 (mips64-dsp-linux.c): Remove.
3132 (nios2-linux.c): Remove.
3133 (powerpc-32.c): Remove.
3134 (powerpc-32l.c): Remove.
3135 (powerpc-altivec32l.c): Remove.
3136 (powerpc-cell32l.c): Remove.
3137 (powerpc-vsx32l.c): Remove.
3138 (powerpc-isa205-32l.c): Remove.
3139 (powerpc-isa205-altivec32l.c): Remove.
3140 (powerpc-isa205-vsx32l.c): Remove.
3141 (powerpc-e500l.c): Remove.
3142 (powerpc-64l.c): Remove.
3143 (powerpc-altivec64l.c): Remove.
3144 (powerpc-cell64l.c): Remove.
3145 (powerpc-vsx64l.c): Remove.
3146 (powerpc-isa205-64l.c): Remove.
3147 (powerpc-isa205-altivec64l.c): Remove.
3148 (powerpc-isa205-vsx64l.c): Remove.
3149 (s390-linux32.c): Remove.
3150 (s390-linux32v1.c): Remove.
3151 (s390-linux32v2.c): Remove.
3152 (s390-linux64.c): Remove.
3153 (s390-linux64v1.c): Remove.
3154 (s390-linux64v2.c): Remove.
3155 (s390-te-linux64.c): Remove.
3156 (s390-vx-linux64.c): Remove.
3157 (s390-tevx-linux64.c): Remove.
3158 (s390x-linux64.c): Remove.
3159 (s390x-linux64v1.c): Remove.
3160 (s390x-linux64v2.c): Remove.
3161 (s390x-te-linux64.c): Remove.
3162 (s390x-vx-linux64.c): Remove.
3163 (s390x-tevx-linux64.c): Remove.
3164 (tic6x-c64xp-linux.c): Remove.
3165 (tic6x-c64x-linux.c): Remove.
3166 (tic6x-c62x-linux.c): Remove.
3167 (reg-sh.c): Remove.
3168 (reg-sparc64.c): Remove.
3169 (reg-spu.c): Remove.
3170 (amd64.c): Remove.
3171 (amd64-linux.c): Remove.
3172 (amd64-avx.c): Remove.
3173 (amd64-avx-linux.c): Remove.
3174 (amd64-avx-avx512.c): Remove.
3175 (amd64-avx-avx512-linux.c): Remove.
3176 (amd64-mpx.c): Remove.
3177 (amd64-mpx-linux.c): Remove.
3178 (amd64-avx-mpx-avx512-pku.c): Remove.
3179 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3180 (amd64-avx-mpx.c): Remove.
3181 (amd64-avx-mpx-linux.c): Remove.
3182 (x32.c): Remove.
3183 (x32-linux.c): Remove.
3184 (x32-avx.c): Remove.
3185 (x32-avx-linux.c): Remove.
3186 (x32-avx-avx512.c): Remove.
3187 (x32-avx-avx512-linux.c): Remove.
3188 (reg-xtensa.c): Remove.
3189 (reg-tilegx.c): Remove.
3190 (reg-tilegx32.c): Remove.
3191
3192 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3193
3194 * Makefile.in (SFILES): Add "common/environ.c".
3195 (OBJS): Add "common/environ.h".
3196
3197 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3198
3199 * configure.ac: Check if the fs_base and gs_base members of
3200 `struct user_regs_struct' exist.
3201 * config.in: Regenerated.
3202 * configure: Likewise.
3203
3204 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3205
3206 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3207 target_read_memory.
3208 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3209 (get_next_pcs_syscall_next_pc): Likewise.
3210
3211 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3212
3213 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3214 * nto-x86-low.c: Likewise.
3215
3216 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3217
3218 * Makefile.in: Include disable-implicit-rules.mk.
3219
3220 2016-11-23 Pedro Alves <palves@redhat.com>
3221
3222 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3223 (debug_vprintf): Use std::chrono::steady_clock instead of
3224 gettimeofday. Use '.' instead of ':'.
3225 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3226 (get_timestamp): Use std::chrono::steady_clock instead of
3227 gettimeofday.
3228
3229 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3230
3231 * Makefile.in: Fix whitespace formatting.
3232
3233 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3234
3235 * Makefile.in (SFILES, OBS): Flatten list and order
3236 alphabetically.
3237
3238 2016-11-23 Pedro Alves <palves@redhat.com>
3239
3240 * event-loop.c (handle_file_event): Use warning.
3241 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3242 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3243 Use warning.
3244
3245 2016-11-23 Pedro Alves <palves@redhat.com>
3246
3247 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3248 output.
3249 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3250 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3251 debug_printf and debug_flush for debug output.
3252 * server.c (handle_general_set): Likewise.
3253 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3254 output.
3255
3256 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3257
3258 * Makefile.in (.c.o): Replace rule with ...
3259 (%.o: %.c): ... this one.
3260
3261 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3262
3263 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3264 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3265 make.
3266 * configure.ac: Remove checks for the make program.
3267 * configure: Re-generate.
3268
3269 2016-10-28 Pedro Alves <palves@redhat.com>
3270
3271 * Makefile.in (CXX_DIALECT): Get from configure.
3272 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3273 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3274 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3275 * config.in: Regenerate.
3276 * configure: Regenerate.
3277
3278 2016-10-27 Yao Qi <yao.qi@linaro.org>
3279
3280 * linux-low.c (linux_supports_range_stepping): Return true if
3281 can_software_single_step return true.
3282
3283 2016-10-27 Yao Qi <yao.qi@linaro.org>
3284
3285 * inferiors.c (find_inferior_in_random): New function.
3286 * inferiors.h (find_inferior_in_random): Declare.
3287 * linux-low.c (linux_wait_for_event_filtered): Call
3288 find_inferior_in_random instead of find_inferior.
3289
3290 2016-10-27 Yao Qi <yao.qi@linaro.org>
3291
3292 * linux-low.c (linux_wait_1): If single-step breakpoints are
3293 inserted, remove them.
3294
3295 2016-10-26 Pedro Alves <palves@redhat.com>
3296
3297 * linux-low.c (handle_extended_wait): Link parent/child fork
3298 threads.
3299 (linux_wait_1): Unlink them.
3300 (linux_set_resume_request): Ignore resume requests for
3301 already-resumed and unhandled fork child threads.
3302 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3303 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3304 New functions.
3305 (handle_v_requests) <vCont>: Don't call require_running.
3306 * server.h (in_queued_stop_replies): New declaration.
3307
3308 2016-10-24 Yao Qi <yao.qi@linaro.org>
3309
3310 PR server/20733
3311 * linux-aarch64-low.c (append_insns): Cast the return value to
3312 'uint32_t *'.
3313
3314 2016-10-10 Yao Qi <yao.qi@linaro.org>
3315
3316 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3317
3318 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3319
3320 * target.c (target_supports_multi_process): New function, moved
3321 from...
3322 * target.h (target_supports_multi_process): ... here. Remove
3323 macro.
3324
3325 2016-10-05 Tom Tromey <tom@tromey.com>
3326
3327 PR remote/20655:
3328 * tracepoint.c (handle_tracepoint_bkpts): Check
3329 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3330
3331 2016-10-05 Yao Qi <yao.qi@linaro.org>
3332
3333 * configure.srv: Update the path of arm-*.xml files.
3334
3335 2016-10-05 Terry Guo <terry.guo@arm.com>
3336 Yao Qi <yao.qi@linaro.org>
3337
3338 * Makefile.in: Adjust the path of rules.
3339 * configure.srv: Update the path of xml files.
3340 * regformats/arm-with-iwmmxt.dat: Regenerated.
3341 * regformats/arm-with-neon.dat: Likewise.
3342 * regformats/arm-with-vfpv2.dat: Likewise.
3343 * regformats/arm-with-vfpv3.dat Likewise.
3344
3345 2016-09-30 Yao Qi <yao.qi@linaro.org>
3346
3347 PR gdbserver/20627
3348 * target.c (target_stop_and_wait): Don't call
3349 target_continue_no_signal, use resume_stop instead.
3350
3351 2016-09-26 Yao Qi <yao.qi@linaro.org>
3352
3353 * linux-low.c (linux_wait_1): Call debug_exit.
3354
3355 2016-09-23 Pedro Alves <palves@redhat.com>
3356
3357 * Makefile.in (SFILES): Add common/new-op.c.
3358 (OBS): Add common/new-op.o.
3359 (new-op.o): New rule.
3360
3361 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3362
3363 * .gitinore: Ignore more files.
3364
3365 2016-09-21 Yao Qi <yao.qi@linaro.org>
3366
3367 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3368 23.
3369
3370 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3371
3372 * server.c (start_inferior): Call target_mourn_inferior instead of
3373 mourn_inferior; pass ptid_t argument to it.
3374 (resume): Likewise.
3375 (handle_target_event): Likewise.
3376 * target.c (target_mourn_inferior): New function.
3377 * target.h (mourn_inferior): Delete macro.
3378
3379 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3380
3381 * linux-low.c (lwp_is_stepping): New function.
3382
3383 2016-09-06 Carl Love <cel@us.ibm.com>
3384
3385 * server.c (start_inferior): Fixed comment, requested comment change
3386 didn't get updated correctly. Removed reference to ptrace () call as
3387 it is only true on Linux systems.
3388
3389 2016-09-06 Carl Love <cel@us.ibm.com>
3390
3391 * server.c (start_inferior): Do not call
3392 function target_post_create_inferior () if the
3393 inferior process has already exited.
3394
3395 2016-09-05 Pedro Alves <palves@redhat.com>
3396
3397 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3398 (COMPILE.pre, CC_LD): Use CXX directly.
3399 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3400 * acinclude.m4: Don't include build-with-cxx.m4.
3401 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3402 * configure: Regenerate.
3403
3404 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3405
3406 PR gdb/19495
3407 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3408 call writing data to own_buf.
3409
3410 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3411
3412 * target.c (mywait): Call target_wait instead of
3413 the_target->wait.
3414 (target_wait): New function.
3415
3416 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3417
3418 * server.c (start_inferior): New variable 'ptid'. Replace calls
3419 to the_target->resume by target_continue{,_no_signal}, depending
3420 on the case.
3421 * target.c (target_stop_and_wait): Call target_continue_no_signal
3422 instead of the_target->resume.
3423 (target_continue): New function.
3424
3425 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3426
3427 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3428
3429 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3430
3431 PR server/20491
3432 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3433 ps_prochandle.
3434 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3435 * linux-arm-low.c (ps_get_thread_area): Likewise.
3436 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3437 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3438 * linux-mips-low.c (ps_get_thread_area): Likewise.
3439 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3440 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3441 * linux-x86-low.c (ps_get_thread_area): Likewise.
3442 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3443
3444 2016-08-19 Pedro Alves <palves@redhat.com>
3445
3446 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3447
3448 2016-08-19 Pedro Alves <palves@redhat.com>
3449
3450 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3451 comment. Use memcpy instead of casting through unsigned long.
3452
3453 2016-08-19 Pedro Alves <palves@redhat.com>
3454
3455 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3456 allocating around 0x80000000.
3457
3458 2016-08-19 Pedro Alves <palves@redhat.com>
3459
3460 PR gdb/20415
3461 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3462 (x32-avx512-linux-ipa.o): New rules.
3463 * configure.ac (x86_64-*-linux*): New x32 check.
3464 * configure.srv (ipa_x32_linux_regobj): New.
3465 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3466 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3467 descriptions.
3468 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3469 descriptions.
3470 * configure: Regenerate.
3471
3472 2016-08-09 Pedro Alves <palves@redhat.com>
3473
3474 PR gdb/18653
3475 * Makefile.in (OBS): Add signals-state-save-restore.o.
3476 (signals-state-save-restore.o): New rule.
3477 * config.in: Regenerate.
3478 * configure: Regenerate.
3479 * linux-low.c: Include "signals-state-save-restore.h".
3480 (linux_create_inferior): Call
3481 restore_original_signals_state.
3482 * server.c: Include "dispositions-save-restore.h".
3483 (captured_main): Call save_original_signals_state.
3484
3485 2016-08-05 Pedro Alves <palves@redhat.com>
3486
3487 * configure: Regenerate.
3488
3489 2016-08-04 Yao Qi <yao.qi@linaro.org>
3490
3491 * linux-low.c (regsets_fetch_inferior_registers): Check
3492 errno is ESRCH or not.
3493
3494 2016-08-02 Yao Qi <yao.qi@linaro.org>
3495
3496 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3497 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3498 (thread_db_load_search): Update.
3499 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3500 td_ta_set_event and td_ta_event_getmsg.
3501
3502 2016-07-26 Pedro Alves <palves@redhat.com>
3503
3504 PR server/20414
3505 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3506 of unsigned long for 64-bit registers and use uint32_t instead of
3507 unsigned int for 32-bit registers.
3508
3509 2016-07-26 Pedro Alves <palves@redhat.com>
3510
3511 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3512 to 'ptrace'.
3513
3514 2016-07-21 Tom Tromey <tom@tromey.com>
3515
3516 * configure: Rebuild.
3517
3518 2016-07-21 Yao Qi <yao.qi@linaro.org>
3519
3520 * mem-break.c (find_gdb_breakpoint): Cast bp to
3521 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3522
3523 2016-07-21 Yao Qi <yao.qi@linaro.org>
3524
3525 * server.c (handle_v_requests): Support s and S actions
3526 if target_supports_software_single_step return true.
3527
3528 2016-07-21 Yao Qi <yao.qi@linaro.org>
3529
3530 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3531 is resume_step, call maybe_hw_step.
3532 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3533 and unstop them.
3534 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3535 breakpoints or not.
3536 (proceed_one_lwp): If resume request is resume_step, install
3537 reinsert breakpoints and call maybe_hw_step.
3538
3539 2016-07-21 Yao Qi <yao.qi@linaro.org>
3540
3541 * linux-low.c (proceed_one_lwp): Declare.
3542 (linux_resume_one_thread): Remove local variable 'step'.
3543 Lift code enqueue signal. Call proceed_one_lwp instead of
3544 linux_resume_one_lwp.
3545
3546 2016-07-21 Yao Qi <yao.qi@linaro.org>
3547
3548 * linux-low.c (linux_resume_one_thread): Call
3549 enqueue_pending_signal.
3550
3551 2016-07-21 Yao Qi <yao.qi@linaro.org>
3552
3553 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3554 * inferiors.c (do_restore_current_thread_cleanup): New function.
3555 (make_cleanup_restore_current_thread): Likewise.
3556 * linux-low.c (install_software_single_step_breakpoints): Call
3557 make_cleanup_restore_current_thread. Switch current_thread to
3558 thread.
3559
3560 2016-07-21 Yao Qi <yao.qi@linaro.org>
3561
3562 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3563 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3564 (clone_one_breakpoint): Likewise.
3565 (delete_reinsert_breakpoints): Change parameter to thread.
3566 Callers updated.
3567 (has_reinsert_breakpoints): Likewise.
3568 (uninsert_reinsert_breakpoints): Likewise.
3569 (reinsert_reinsert_breakpoints): Likewise.
3570 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3571 (delete_reinsert_breakpoints): Likewise.
3572 (reinsert_reinsert_breakpoints): Likewise.
3573 (uninsert_reinsert_breakpoints): Likewise.
3574 (has_reinsert_breakpoints): Likewise.
3575
3576 2016-07-21 Yao Qi <yao.qi@linaro.org>
3577
3578 * inferiors.c (get_thread_process): Make parameter const.
3579 * inferiors.h (get_thread_process): Update declaration.
3580 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3581 Add new parameters child_thread and parent_thread. Callers
3582 updated.
3583 * mem-break.h (clone_all_breakpoints): Update declaration.
3584
3585 2016-07-21 Yao Qi <yao.qi@linaro.org>
3586
3587 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3588 <command_list, handler>: Remove.
3589 (struct gdb_breakpoint): New.
3590 (struct other_breakpoint): New.
3591 (struct reinsert_breakpoint): New.
3592 (is_gdb_breakpoint): New function.
3593 (any_persistent_commands): Update command_list if
3594 is_gdb_breakpoint returns true.
3595 (set_breakpoint): Create breakpoints according to their types.
3596 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3597 (set_gdb_breakpoint_1): Likewise.
3598 (set_gdb_breakpoint): Likewise.
3599 (clear_breakpoint_conditions): Change parameter type to
3600 'struct gdb_breakpoint *'.
3601 (clear_breakpoint_commands): Likewise.
3602 (clear_breakpoint_conditions_and_commands): Likewise.
3603 (add_condition_to_breakpoint): Likewise.
3604 (add_breakpoint_condition): Likewise.
3605 (add_commands_to_breakpoint): Likewise.
3606 (check_breakpoints): Check other_breakpoint.
3607 (clone_one_breakpoint): Clone breakpopint according to its type.
3608 * mem-break.h (struct gdb_breakpoint): Declare.
3609 (set_gdb_breakpoint): Update declaration.
3610 (clear_breakpoint_conditions_and_commands): Likewise.
3611 (add_breakpoint_condition): Likewise.
3612 (add_breakpoint_commands): Likewise.
3613 * server.c (process_point_options): Change parameter type to
3614 'struct gdb_breakpoint *'.
3615
3616 2016-07-21 Yao Qi <yao.qi@linaro.org>
3617
3618 * mem-break.c (set_breakpoint_at): Rename it to ...
3619 (set_breakpoint_type_at): ... it.
3620 (set_breakpoint_at): Call set_breakpoint_type_at.
3621 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3622 * mem-break.h (set_breakpoint_at): Update comments.
3623
3624 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3625
3626 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3627 to buf parameter.
3628 (nios2_store_gregset): Likewise.
3629
3630 2016-07-01 Pedro Alves <palves@redhat.com>
3631 Antoine Tremblay <antoine.tremblay@ericsson.com>
3632
3633 * linux-low.c: Change interface to take the target lwp_info
3634 pointer directly and return void. Handle detaching from a zombie
3635 thread.
3636 (linux_detach_lwp_callback): New function.
3637 (linux_detach): Detach from the leader thread after detaching from
3638 the clone threads.
3639
3640 2016-06-28 Yao Qi <yao.qi@linaro.org>
3641
3642 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3643 for variable new_offset.
3644 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3645 (aarch64_ftrace_insn_reloc_cb): Likewise.
3646 (aarch64_ftrace_insn_reloc_tb): Likewise.
3647 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3648 PRIx64 instead of PRIx32.
3649
3650 2016-06-28 Yao Qi <yao.qi@linaro.org>
3651
3652 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3653 (the_low_target): Install arm_get_syscall_trapinfo.
3654
3655 2016-06-28 Yao Qi <yao.qi@linaro.org>
3656
3657 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3658 function.
3659 (the_low_target): Install aarch64_get_syscall_trapinfo.
3660
3661 2016-06-28 Yao Qi <yao.qi@linaro.org>
3662
3663 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3664 Callers updated.
3665 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3666 Remove parameter sysno.
3667 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3668 sysret.
3669
3670 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3671
3672 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3673 (s390_emit_ne_goto): Likewise.
3674 (s390_emit_lt_goto): Likewise.
3675 (s390_emit_le_goto): Likewise.
3676 (s390_emit_gt_goto): Likewise.
3677 (s390_emit_ge_goto): Likewise.
3678 (s390x_emit_eq_goto): Likewise.
3679 (s390x_emit_ne_goto): Likewise.
3680 (s390x_emit_lt_goto): Likewise.
3681 (s390x_emit_le_goto): Likewise.
3682 (s390x_emit_gt_goto): Likewise.
3683 (s390x_emit_ge_goto): Likewise.
3684 (s390_emit_ops_impl): Mark variable static.
3685 (s390x_emit_ops): Likewise.
3686
3687 2016-06-17 Yao Qi <yao.qi@linaro.org>
3688
3689 * linux-low.c (handle_extended_wait): Call
3690 uninsert_reinsert_breakpoints for the parent process. Remove
3691 reinsert breakpoints from the child process. Reinsert them to
3692 the parent process when vfork is done.
3693 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3694 (reinsert_reinsert_breakpoints): New function.
3695 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3696 (reinsert_reinsert_breakpoints): Declare.
3697
3698 2016-06-17 Yao Qi <yao.qi@linaro.org>
3699
3700 * linux-low.c (handle_extended_wait): If the parent is doing
3701 step-over, remove the reinsert breakpoints from the forked child.
3702
3703 2016-06-17 Yao Qi <yao.qi@linaro.org>
3704
3705 * linux-low.c (unsuspend_all_lwps): Declare.
3706 (linux_low_filter_event): If thread exited, call finish_step_over.
3707 If step-over is finished, unsuspend other threads.
3708
3709 2016-06-17 Yao Qi <yao.qi@linaro.org>
3710
3711 * linux-low.c (linux_resume_one_lwp_throw): Assert
3712 has_reinsert_breakpoints returns false.
3713 * mem-break.c (delete_disabled_breakpoints): Assert
3714 bp type isn't reinsert_breakpoint.
3715
3716 2016-06-17 Yao Qi <yao.qi@linaro.org>
3717
3718 * linux-low.c (maybe_hw_step): New function.
3719 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3720 (finish_step_over): Switch current_thread to lwp temporarily,
3721 and assert has_reinsert_breakpoints returns true.
3722 (proceed_one_lwp): Call maybe_hw_step.
3723 * mem-break.c (has_reinsert_breakpoints): New function.
3724 * mem-break.h (has_reinsert_breakpoints): Declare.
3725
3726 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3727
3728 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3729
3730 2016-05-17 Yao Qi <yao.qi@linaro.org>
3731
3732 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3733 instead of find_inferior.
3734
3735 2016-05-05 Yao Qi <yao.qi@linaro.org>
3736
3737 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3738 Initialize res to zero.
3739
3740 2016-05-05 Yao Qi <yao.qi@linaro.org>
3741
3742 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3743 to uint32_t.
3744
3745 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3746
3747 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3748 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3749 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3750
3751 2016-04-28 Par Olsson <par.olsson@windriver.com>
3752 Simon Marchi <simon.marchi@ericsson.com>
3753
3754 * tracepoint.c (write_inferior_int8): New function.
3755 (cmd_qtenable_disable): Write enable flag using
3756 write_inferior_int8.
3757
3758 2016-04-25 Yao Qi <yao.qi@linaro.org>
3759
3760 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3761 (need_step_over_p): Return zero if the LWP has pending signals
3762 can be delivered on software single step target.
3763
3764 2016-04-25 Yao Qi <yao.qi@linaro.org>
3765
3766 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3767 return instead of error.
3768
3769 2016-04-22 Yao Qi <yao.qi@linaro.org>
3770
3771 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3772 to 23.
3773
3774 2016-04-22 Yao Qi <yao.qi@linaro.org>
3775
3776 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3777 signal when stepping over breakpoint with software single
3778 step.
3779
3780 2016-04-21 Pedro Alves <palves@redhat.com>
3781
3782 * linux-s390-low.c (s390_collect_ptrace_register)
3783 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3784 add casts.
3785 (s390_check_regset): Use void * instead of gdb_byte *.
3786
3787 2016-04-20 Pedro Alves <palves@redhat.com>
3788
3789 * configure: Renegerate.
3790
3791 2016-04-20 Yao Qi <yao.qi@linaro.org>
3792
3793 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3794 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3795 number 16.
3796 (arm_store_gregset): Likewise.
3797
3798 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3799
3800 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3801 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3802 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3803 (amd64-avx-mpx-linux.c): New rules.
3804 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3805 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3806 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3807 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3808 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3809 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3810 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3811 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3812 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3813 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3814 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3815 * linux-x86-low.c (x86_linux_read_description): Add case for
3816 X86_XSTATE_AVX_MPX_MASK.
3817 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3818 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3819 init_registers_i386_avx_mpx_linux.
3820 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3821 (initialize_low_tracepoint): Call
3822 init_registers_i386_avx_mpx_linux.
3823 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3824 (initialize_low_tracepoint): Call
3825 init_registers_amd64_avx_mpx_linux.
3826 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3827 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3828 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3829 declarations.
3830
3831 2016-04-18 Pedro Alves <palves@redhat.com>
3832
3833 * configure: Regenerate.
3834
3835 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3836
3837 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3838 (aarch64_emit_sub): Likewise.
3839
3840 2016-04-12 Pedro Alves <palves@redhat.com>
3841
3842 * utils.c (prepare_to_throw_exception): Delete.
3843
3844 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3845
3846 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3847
3848 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3849
3850 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3851
3852 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3853
3854 * linux-aarch64-ipa.c: Add <elf.h> include.
3855 * linux-ppc-ipa.c: Add <elf.h> include.
3856 * linux-s390-ipa.c: Add <elf.h> include.
3857
3858 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3859
3860 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3861 (get_raw_reg_ptr): Likewise.
3862 (get_trace_state_variable_value_ptr): Likewise.
3863 (set_trace_state_variable_value_ptr): Likewise.
3864 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3865 char *.
3866
3867 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3868 Marcin Kościelnicki <koriakin@0x04.net>
3869
3870 PR/17221
3871 * linux-ppc-low.c (emit_insns): New function.
3872 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3873 (ppc_emit_prologue): New function.
3874 (ppc_emit_epilogue): New function.
3875 (ppc_emit_add): New function.
3876 (ppc_emit_sub): New function.
3877 (ppc_emit_mul): New function.
3878 (ppc_emit_lsh): New function.
3879 (ppc_emit_rsh_signed): New function.
3880 (ppc_emit_rsh_unsigned): New function.
3881 (ppc_emit_ext): New function.
3882 (ppc_emit_zero_ext): New function.
3883 (ppc_emit_log_not): New function.
3884 (ppc_emit_bit_and): New function.
3885 (ppc_emit_bit_or): New function.
3886 (ppc_emit_bit_xor): New function.
3887 (ppc_emit_bit_not): New function.
3888 (ppc_emit_equal): New function.
3889 (ppc_emit_less_signed): New function.
3890 (ppc_emit_less_unsigned): New function.
3891 (ppc_emit_ref): New function.
3892 (ppc_emit_const): New function.
3893 (ppc_emit_reg): New function.
3894 (ppc_emit_pop): New function.
3895 (ppc_emit_stack_flush): New function.
3896 (ppc_emit_swap): New function.
3897 (ppc_emit_stack_adjust): New function.
3898 (ppc_emit_call): New function.
3899 (ppc_emit_int_call_1): New function.
3900 (ppc_emit_void_call_2): New function.
3901 (ppc_emit_if_goto): New function.
3902 (ppc_emit_goto): New function.
3903 (ppc_emit_eq_goto): New function.
3904 (ppc_emit_ne_goto): New function.
3905 (ppc_emit_lt_goto): New function.
3906 (ppc_emit_le_goto): New function.
3907 (ppc_emit_gt_goto): New function.
3908 (ppc_emit_ge_goto): New function.
3909 (ppc_write_goto_address): New function.
3910 (ppc_emit_ops_impl): New static variable.
3911 (ppc64v1_emit_prologue): New function.
3912 (ppc64v2_emit_prologue): New function.
3913 (ppc64_emit_epilogue): New function.
3914 (ppc64_emit_add): New function.
3915 (ppc64_emit_sub): New function.
3916 (ppc64_emit_mul): New function.
3917 (ppc64_emit_lsh): New function.
3918 (ppc64_emit_rsh_signed): New function.
3919 (ppc64_emit_rsh_unsigned): New function.
3920 (ppc64_emit_ext): New function.
3921 (ppc64_emit_zero_ext): New function.
3922 (ppc64_emit_log_not): New function.
3923 (ppc64_emit_bit_and): New function.
3924 (ppc64_emit_bit_or): New function.
3925 (ppc64_emit_bit_xor): New function.
3926 (ppc64_emit_bit_not): New function.
3927 (ppc64_emit_equal): New function.
3928 (ppc64_emit_less_signed): New function.
3929 (ppc64_emit_less_unsigned): New function.
3930 (ppc64_emit_ref): New function.
3931 (ppc64_emit_const): New function.
3932 (ppc64v1_emit_reg): New function.
3933 (ppc64v2_emit_reg): New function.
3934 (ppc64_emit_pop): New function.
3935 (ppc64_emit_stack_flush): New function.
3936 (ppc64_emit_swap): New function.
3937 (ppc64v1_emit_call): New function.
3938 (ppc64v2_emit_call): New function.
3939 (ppc64v1_emit_int_call_1): New function.
3940 (ppc64v2_emit_int_call_1): New function.
3941 (ppc64v1_emit_void_call_2): New function.
3942 (ppc64v2_emit_void_call_2): New function.
3943 (ppc64_emit_if_goto): New function.
3944 (ppc64_emit_eq_goto): New function.
3945 (ppc64_emit_ne_goto): New function.
3946 (ppc64_emit_lt_goto): New function.
3947 (ppc64_emit_le_goto): New function.
3948 (ppc64_emit_gt_goto): New function.
3949 (ppc64_emit_ge_goto): New function.
3950 (ppc64v1_emit_ops_impl): New static variable.
3951 (ppc64v2_emit_ops_impl): New static variable.
3952 (ppc_emit_ops): New function.
3953 (linux_low_target): Wire in ppc_emit_ops.
3954
3955 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3956 Marcin Kościelnicki <koriakin@0x04.net>
3957
3958 PR/17221
3959 * Makefile.in: Add powerpc-*-ipa.o
3960 * configure.srv: Add ipa_obj for powerpc*-linux.
3961 * linux-ppc-ipa.c: New file.
3962 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3963 includes.
3964 (PPC_FIELD): New macro.
3965 (PPC_SEXT): New macro.
3966 (PPC_OP6): New macro.
3967 (PPC_BO): New macro.
3968 (PPC_LI): New macro.
3969 (PPC_BD): New macro.
3970 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3971 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3972 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3973 (ppc_get_thread_area): New function.
3974 (is_elfv2_inferior): New function.
3975 (gen_ds_form): New function.
3976 (GEN_STD): New macro.
3977 (GEN_STDU): New macro.
3978 (GEN_LD): New macro.
3979 (GEN_LDU): New macro.
3980 (gen_d_form): New function.
3981 (GEN_ADDI): New macro.
3982 (GEN_ADDIS): New macro.
3983 (GEN_LI): New macro.
3984 (GEN_LIS): New macro.
3985 (GEN_ORI): New macro.
3986 (GEN_ORIS): New macro.
3987 (GEN_LWZ): New macro.
3988 (GEN_STW): New macro.
3989 (GEN_STWU): New macro.
3990 (gen_xfx_form): New function.
3991 (GEN_MFSPR): New macro.
3992 (GEN_MTSPR): New macro.
3993 (GEN_MFCR): New macro.
3994 (GEN_MTCR): New macro.
3995 (GEN_SYNC): New macro.
3996 (GEN_LWSYNC): New macro.
3997 (gen_x_form): New function.
3998 (GEN_OR): New macro.
3999 (GEN_MR): New macro.
4000 (GEN_LWARX): New macro.
4001 (GEN_STWCX): New macro.
4002 (GEN_CMPW): New macro.
4003 (gen_md_form): New function.
4004 (GEN_RLDICL): New macro.
4005 (GEN_RLDICR): New macro.
4006 (gen_i_form): New function.
4007 (GEN_B): New macro.
4008 (GEN_BL): New macro.
4009 (gen_b_form): New function.
4010 (GEN_BNE): New macro.
4011 (GEN_LOAD): New macro.
4012 (GEN_STORE): New macro.
4013 (gen_limm): New function.
4014 (gen_atomic_xchg): New function.
4015 (gen_call): New function.
4016 (ppc_relocate_instruction): New function.
4017 (ppc_install_fast_tracepoint_jump_pad): New function.
4018 (ppc_get_min_fast_tracepoint_insn_len): New function.
4019 (ppc_get_ipa_tdesc_idx): New function.
4020 (the_low_target): Wire in the new functions.
4021 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4022 tdescs.
4023 * linux-ppc-tdesc.h: New file.
4024
4025 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4026
4027 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4028 (alloc_jump_pad_buffer): New function.
4029 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4030 (alloc_jump_pad_buffer): New function.
4031 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4032 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4033 (alloc_jump_pad_buffer): New function.
4034 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4035 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4036 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4037 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4038
4039 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4040
4041 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4042 * linux-amd64-ipa.c: Likewise.
4043 * linux-i386-ipa.c: Likewise.
4044 * linux-s390-ipa.c: Likewise.
4045 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4046 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4047 set_trace_state_variable_value_ptr.
4048 (struct ipa_sym_addresses): Likewise.
4049 (symbol_list): Likewise.
4050 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4051 accessing gdb_collect directly.
4052 (gdb_collect_ptr_type): New typedef.
4053 (get_raw_reg_ptr_type): New typedef.
4054 (get_trace_state_variable_value_ptr_type): New typedef.
4055 (set_trace_state_variable_value_ptr_type): New typedef.
4056 (gdb_collect_ptr): New global.
4057 (get_raw_reg_ptr): New global.
4058 (get_trace_state_variable_value_ptr): New global.
4059 (set_trace_state_variable_value_ptr): New global.
4060 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4061 accessing get_raw_reg directly.
4062 (get_get_tsv_func_addr): Likewise for
4063 get_trace_state_variable_value_ptr.
4064 (get_set_tsv_func_addr): Likewise for
4065 set_trace_state_variable_value_ptr.
4066 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4067
4068 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4069
4070 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4071
4072 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4073
4074 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4075 packets.
4076 (relocate_instruction): Remove own_buf.
4077 * server.c (own_buf): Make global.
4078 (handle_v_requests): Make global.
4079 * server.h (own_buf): New declaration.
4080 (handle_v_requests): New prototype.
4081
4082 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4083
4084 PR 18377
4085 * linux-s390-low.c (add_insns): New function.
4086 (s390_emit_prologue): New function.
4087 (s390_emit_epilogue): New function.
4088 (s390_emit_add): New function.
4089 (s390_emit_sub): New function.
4090 (s390_emit_mul): New function.
4091 (s390_emit_lsh): New function.
4092 (s390_emit_rsh_signed): New function.
4093 (s390_emit_rsh_unsigned): New function.
4094 (s390_emit_ext): New function.
4095 (s390_emit_log_not): New function.
4096 (s390_emit_bit_and): New function.
4097 (s390_emit_bit_or): New function.
4098 (s390_emit_bit_xor): New function.
4099 (s390_emit_bit_not): New function.
4100 (s390_emit_equal): New function.
4101 (s390_emit_less_signed): New function.
4102 (s390_emit_less_unsigned): New function.
4103 (s390_emit_ref): New function.
4104 (s390_emit_if_goto): New function.
4105 (s390_emit_goto): New function.
4106 (s390_write_goto_address): New function.
4107 (s390_emit_litpool): New function.
4108 (s390_emit_const): New function.
4109 (s390_emit_call): New function.
4110 (s390_emit_reg): New function.
4111 (s390_emit_pop): New function.
4112 (s390_emit_stack_flush): New function.
4113 (s390_emit_zero_ext): New function.
4114 (s390_emit_swap): New function.
4115 (s390_emit_stack_adjust): New function.
4116 (s390_emit_set_r2): New function.
4117 (s390_emit_int_call_1): New function.
4118 (s390_emit_void_call_2): New function.
4119 (s390_emit_eq_goto): New function.
4120 (s390_emit_ne_goto): New function.
4121 (s390_emit_lt_goto): New function.
4122 (s390_emit_le_goto): New function.
4123 (s390_emit_gt_goto): New function.
4124 (s390_emit_ge_goto): New function.
4125 (s390x_emit_prologue): New function.
4126 (s390x_emit_epilogue): New function.
4127 (s390x_emit_add): New function.
4128 (s390x_emit_sub): New function.
4129 (s390x_emit_mul): New function.
4130 (s390x_emit_lsh): New function.
4131 (s390x_emit_rsh_signed): New function.
4132 (s390x_emit_rsh_unsigned): New function.
4133 (s390x_emit_ext): New function.
4134 (s390x_emit_log_not): New function.
4135 (s390x_emit_bit_and): New function.
4136 (s390x_emit_bit_or): New function.
4137 (s390x_emit_bit_xor): New function.
4138 (s390x_emit_bit_not): New function.
4139 (s390x_emit_equal): New function.
4140 (s390x_emit_less_signed): New function.
4141 (s390x_emit_less_unsigned): New function.
4142 (s390x_emit_ref): New function.
4143 (s390x_emit_if_goto): New function.
4144 (s390x_emit_const): New function.
4145 (s390x_emit_call): New function.
4146 (s390x_emit_reg): New function.
4147 (s390x_emit_pop): New function.
4148 (s390x_emit_stack_flush): New function.
4149 (s390x_emit_zero_ext): New function.
4150 (s390x_emit_swap): New function.
4151 (s390x_emit_stack_adjust): New function.
4152 (s390x_emit_int_call_1): New function.
4153 (s390x_emit_void_call_2): New function.
4154 (s390x_emit_eq_goto): New function.
4155 (s390x_emit_ne_goto): New function.
4156 (s390x_emit_lt_goto): New function.
4157 (s390x_emit_le_goto): New function.
4158 (s390x_emit_gt_goto): New function.
4159 (s390x_emit_ge_goto): New function.
4160 (s390_emit_ops): New function.
4161 (struct linux_target_ops): Fill in emit_ops hook.
4162
4163 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4164
4165 PR 18377
4166 * Makefile.in: Add s390 IPA files.
4167 * configure.srv: Build IPA for s390.
4168 * linux-s390-ipa.c: New file.
4169 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4170 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4171 (tdesc_s390_linux32): Likewise.
4172 (init_registers_s390_linux32v1): Likewise.
4173 (tdesc_s390_linux32v1): Likewise.
4174 (init_registers_s390_linux32v2): Likewise.
4175 (tdesc_s390_linux32v2): Likewise.
4176 (init_registers_s390_linux64): Likewise.
4177 (tdesc_s390_linux64): Likewise.
4178 (init_registers_s390_linux64v1): Likewise.
4179 (tdesc_s390_linux64v1): Likewise.
4180 (init_registers_s390_linux64v2): Likewise.
4181 (tdesc_s390_linux64v2): Likewise.
4182 (init_registers_s390_te_linux64): Likewise.
4183 (tdesc_s390_te_linux64): Likewise.
4184 (init_registers_s390_vx_linux64): Likewise.
4185 (tdesc_s390_vx_linux64): Likewise.
4186 (init_registers_s390_tevx_linux64): Likewise.
4187 (tdesc_s390_tevx_linux64): Likewise.
4188 (init_registers_s390x_linux64): Likewise.
4189 (tdesc_s390x_linux64): Likewise.
4190 (init_registers_s390x_linux64v1): Likewise.
4191 (tdesc_s390x_linux64v1): Likewise.
4192 (init_registers_s390x_linux64v2): Likewise.
4193 (tdesc_s390x_linux64v2): Likewise.
4194 (init_registers_s390x_te_linux64): Likewise.
4195 (tdesc_s390x_te_linux64): Likewise.
4196 (init_registers_s390x_vx_linux64): Likewise.
4197 (tdesc_s390x_vx_linux64): Likewise.
4198 (init_registers_s390x_tevx_linux64): Likewise.
4199 (tdesc_s390x_tevx_linux64): Likewise.
4200 (have_hwcap_s390_vx): New static variable.
4201 (s390_arch_setup): Fill have_hwcap_s390_vx.
4202 (s390_get_thread_area): New function.
4203 (s390_ft_entry_gpr_esa): New const.
4204 (s390_ft_entry_gpr_zarch): New const.
4205 (s390_ft_entry_misc): New const.
4206 (s390_ft_entry_fr): New const.
4207 (s390_ft_entry_vr): New const.
4208 (s390_ft_main_31): New const.
4209 (s390_ft_main_64): New const.
4210 (s390_ft_exit_fr): New const.
4211 (s390_ft_exit_vr): New const.
4212 (s390_ft_exit_misc): New const.
4213 (s390_ft_exit_gpr_esa): New const.
4214 (s390_ft_exit_gpr_zarch): New const.
4215 (append_insns): New function.
4216 (s390_relocate_instruction): New function.
4217 (s390_install_fast_tracepoint_jump_pad): New function.
4218 (s390_get_min_fast_tracepoint_insn_len): New function.
4219 (s390_get_ipa_tdesc_idx): New function.
4220 (struct linux_target_ops): Wire in the above functions.
4221 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4222 * linux-s390-tdesc.h: New file.
4223
4224 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4225
4226 * linux-s390-low.c (s390_supports_tracepoints): New function.
4227 (struct linux_target_ops): Fill supports_tracepoints hook.
4228
4229 2016-03-18 Yao Qi <yao.qi@linaro.org>
4230
4231 * linux-low.c (lwp_signal_can_be_delivered): New function.
4232 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4233
4234 2016-03-18 Yao Qi <yao.qi@linaro.org>
4235
4236 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4237 0 if signal is enqueued. Remove 'signal' from one debugging
4238 message. Move one debugging message to some lines below.
4239 Remove code setting 'signal' to 0.
4240
4241 2016-03-18 Yao Qi <yao.qi@linaro.org>
4242
4243 * linux-low.c (linux_low_filter_event): Remove redundant
4244 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4245
4246 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4247
4248 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4249 (struct linux_target_ops): Wire in the above.
4250
4251 2016-03-03 Yao Qi <yao.qi@linaro.org>
4252
4253 * linux-low.c: Update comments to start_step_over.
4254
4255 2016-03-03 Yao Qi <yao.qi@linaro.org>
4256
4257 PR server/19736
4258 * linux-low.c (handle_extended_wait): Set child suspended
4259 if event_lwp->bp_reinsert isn't zero.
4260
4261 2016-03-02 Yao Qi <yao.qi@linaro.org>
4262
4263 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4264 enqueue_pending_signal.
4265
4266 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4267
4268 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4269 is actually loaded.
4270
4271 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4272
4273 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4274 (s390_regmap_3264) [!__s390x__]: New global.
4275 (s390_collect_ptrace_register): Skip map entries containing -1.
4276 (s390_supply_ptrace_register): Ditto.
4277 (s390_fill_gprs_high): New function.
4278 (s390_store_gprs_high): New function.
4279 (s390_regsets): Add NT_S390_HIGH_GPRS.
4280 (s390_get_hwcap): Enable on 31-bit.
4281 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4282 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4283 Detect NT_S390_HIGH_GPRS.
4284 (s390_usrregs_info_3264): Enable on 31-bit.
4285 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4286 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4287
4288 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4289
4290 PR gdb/13808
4291 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4292 * configure.srv: Ditto.
4293 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4294 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4295 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4296 (init_registers_amd64_linux): Remove prototype.
4297 (tdesc_amd64_linux): Remove declaration.
4298 (get_ipa_tdesc): New function.
4299 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4300 initialize remaining tdescs.
4301 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4302 (init_registers_i386_linux): Remove prototype.
4303 (tdesc_i386_linux): Remove declaration.
4304 (get_ipa_tdesc): New function.
4305 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4306 initialize remaining tdescs.
4307 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4308 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4309 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4310 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4311 (x86_get_ipa_tdesc_idx): New function.
4312 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4313 * linux-x86-tdesc.h: New file.
4314 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4315 (target_get_ipa_tdesc_idx): New macro.
4316 * tracepoint.c (ipa_tdesc_idx): New macro.
4317 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4318 (symbol_list): Add ipa_tdesc_idx.
4319 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4320 (ipa_tdesc): Remove.
4321 (ipa_tdesc_idx): New variable.
4322 (get_context_regcache): Use get_ipa_tdesc.
4323 (gdb_collect): Ditto.
4324 (gdb_probe): Ditto.
4325 * tracepoint.h (get_ipa_tdesc): New prototype.
4326 (ipa_tdesc): Remove.
4327
4328 2016-02-24 Pedro Alves <palves@redhat.com>
4329
4330 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4331 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4332 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4333 Factor out common code between the USE_SIGTRAP_SIGINFO and
4334 !USE_SIGTRAP_SIGINFO blocks.
4335 (linux_low_filter_event): Call save_stop_reason instead of
4336 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4337 Update comments.
4338 (linux_wait_1): Update comments.
4339
4340 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4341
4342 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4343 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4344 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4345 ppc_insert_point, ppc_remove_point.
4346
4347 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4348
4349 * linux-s390-low.c (s390_supports_z_point_type): New function.
4350 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4351
4352 2016-02-16 Yao Qi <yao.qi@linaro.org>
4353
4354 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4355 PC. Get pc from regcache_read_pc.
4356
4357 2016-02-12 Yao Qi <yao.qi@linaro.org>
4358
4359 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4360 or linux_get_pc_32bit.
4361 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4362
4363 2016-02-12 Yao Qi <yao.qi@linaro.org>
4364
4365 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4366 arm_linux_get_next_pcs_fixup.
4367
4368 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4369
4370 * tracepoint.c (x_tracepoint_action_download): Change
4371 write_inferior_data_ptr to write_inferior_data_pointer.
4372 (cmd_qtstart): Likewise.
4373 (write_inferior_data_ptr): Remove.
4374 (download_agent_expr): Change write_inferior_data_ptr to
4375 write_inferior_data_pointer.
4376 (download_tracepoint_1): Likewise.
4377 (download_tracepoint): Likewise.
4378 (download_trace_state_variables): Likewise.
4379
4380 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4381 Marcin Kościelnicki <koriakin@0x04.net>
4382
4383 * tracepoint.c (struct tracepoint_action_ops): Remove.
4384 (struct tracepoint_action): Remove ops.
4385 (m_tracepoint_action_download, r_tracepoint_action_download)
4386 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4387 size and offset accordingly.
4388 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4389 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4390 (tracepoint_action_send, tracepoint_action_download): New functions.
4391 Helpers for trace action handlers.
4392 (add_tracepoint_action): Remove setup actions ops.
4393 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4394
4395 2016-02-10 Yao Qi <yao.qi@linaro.org>
4396
4397 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4398
4399 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4400
4401 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4402 to AC_OUTPUT.
4403 * configure: Regenerate.
4404
4405 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4406
4407 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4408 void * to gdb_byte *.
4409 * linux-low.c (siginfo_fixup): Likewise.
4410 (linux_xfer_siginfo): Likewise.
4411 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4412 Likewise.
4413 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4414
4415 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4416
4417 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4418 to srv_tgtobj.
4419 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4420 to srv_tgtobj.
4421 * linux-x86-low.c [__x86_64__]: Include
4422 "nat/amd64-linux-siginfo.h".
4423 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4424 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4425 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4426 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4427 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4428 (cpt_si_fd, si_timerid, si_overrun): Move from
4429 nat/amd64-linux-siginfo.c.
4430 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4431
4432 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4433
4434 * server.c (skip_to_semicolon): Remove.
4435 (process_point_options): Use strchrnul instead of
4436 skip_to_semicolon.
4437
4438 2016-01-26 Yao Qi <yao.qi@linaro.org>
4439
4440 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4441 * linux-low.c (install_software_single_step_breakpoints): Don't
4442 call regcache_read_pc.
4443 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4444 argument pc.
4445
4446 2016-01-26 Yao Qi <yao.qi@linaro.org>
4447
4448 * linux-low.c (install_software_single_step_breakpoints): Call
4449 regcache_read_pc instead of get_pc.
4450
4451 2016-01-26 Yao Qi <yao.qi@linaro.org>
4452
4453 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4454 (unblock_async_io): Rename to ...
4455 (block_unblock_async_io): ... it. New function.
4456 (enable_async_io): Don't install SIGIO handler. Unblock it
4457 instead.
4458 (disable_async_io): Don't ignore SIGIO. Block it instead.
4459 (initialize_async_io): Install SIGIO handler. Don't call
4460 unblock_async_io.
4461
4462 2016-01-26 Yao Qi <yao.qi@linaro.org>
4463
4464 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4465 first character is '\003', call *the_target->request_interrupt.
4466
4467 2016-01-25 Yao Qi <yao.qi@linaro.org>
4468
4469 * remote-utils.c (new_thread_notify): Remove.
4470 (dead_thread_notify): Likewise.
4471 * remote-utils.h (new_thread_notify): Remove declaration.
4472 (dead_thread_notify): Likewise.
4473
4474 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4475
4476 * gdb.trace/pending.exp: Fix expected message on continue.
4477
4478 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4479
4480 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4481 it works properly on big-endian machines where sizeof (CORE_ADDR)
4482 != sizeof (void *).
4483
4484 2016-01-21 Pedro Alves <palves@redhat.com>
4485
4486 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4487 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4488 * configure: Regenerate.
4489
4490 2016-01-21 Yao Qi <yao.qi@linaro.org>
4491
4492 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4493 is_thumb and set it according to CPSR saved on the stack.
4494 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4495 arm_sigreturn_next_pc.
4496
4497 2016-01-18 Yao Qi <yao.qi@linaro.org>
4498
4499 * linux-low.c (linux_set_pc_64bit): New function.
4500 (linux_get_pc_64bit): New function.
4501 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4502 Declare.
4503 * linux-sparc-low.c (debug_threads): Remove declaration.
4504 (sparc_get_pc): Remove.
4505 (the_low_target): Use linux_get_pc_64bit instead of
4506 sparc_get_pc.
4507 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4508 (the_low_target): Use linux_get_pc_64bit and
4509 linux_set_pc_64bit.
4510
4511 2016-01-18 Yao Qi <yao.qi@linaro.org>
4512
4513 * linux-arm-low.c (debug_threads): Remove declaration.
4514 (arm_get_pc, arm_set_pc): Remove.
4515 (the_low_target): Use linux_get_pc_32bit and
4516 linux_set_pc_32bit.
4517 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4518 (the_low_target): Use linux_get_pc_32bit and
4519 linux_set_pc_32bit.
4520 * linux-cris-low.c (debug_threads): Remove declaration.
4521 (cris_get_pc, cris_set_pc,): Remove.
4522 (the_low_target): Use linux_get_pc_32bit and
4523 linux_set_pc_32bit.
4524 * linux-crisv32-low.c (debug_threads): Remove declaration.
4525 (cris_get_pc, cris_set_pc): Remove.
4526 (the_low_target): Use linux_get_pc_32bit and
4527 linux_set_pc_32bit.
4528 * linux-low.c: Include inttypes.h.
4529 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4530 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4531 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4532 (the_low_target): Use linux_get_pc_32bit and
4533 linux_set_pc_32bit.
4534 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4535 (the_low_target): Use linux_get_pc_32bit and
4536 linux_set_pc_32bit.
4537 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4538 (the_low_target): Use linux_get_pc_32bit and
4539 linux_set_pc_32bit.
4540 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4541 (the_low_target): Use linux_get_pc_32bit and
4542 linux_set_pc_32bit.
4543 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4544 (the_low_target): Use linux_get_pc_32bit and
4545 linux_set_pc_32bit.
4546
4547 2016-01-18 Gary Benson <gbenson@redhat.com>
4548
4549 * configure.ac (AC_FUNC_FORK): New check.
4550 * config.in: Regenerate.
4551 * configure: Likewise.
4552
4553 2016-01-14 Yao Qi <yao.qi@linaro.org>
4554
4555 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4556 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4557 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4558 arm_get_next_pcs_ctor.
4559
4560 2016-01-12 Josh Stone <jistone@redhat.com>
4561 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4562
4563 * inferiors.h: Include "gdb_vecs.h".
4564 (struct process_info): Add syscalls_to_catch.
4565 * inferiors.c (remove_process): Free syscalls_to_catch.
4566 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4567 syscall_return stops.
4568 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4569 * server.c (handle_general_set): Handle QCatchSyscalls.
4570 (handle_query): Report support for QCatchSyscalls.
4571 * target.h (struct target_ops): Add supports_catch_syscall.
4572 (target_supports_catch_syscall): New macro.
4573 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4574 (struct lwp_info): Add syscall_state.
4575 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4576 Maintain syscall_state and syscalls_to_catch across exec.
4577 (get_syscall_trapinfo): New function, proxy to the_low_target.
4578 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4579 (linux_low_filter_event): Toggle syscall_state entry/return for
4580 syscall traps, and set it ignored for all others.
4581 (gdb_catching_syscalls_p): New function.
4582 (gdb_catch_this_syscall_p): New function.
4583 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4584 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4585 (linux_supports_catch_syscall): New function.
4586 (linux_target_ops): Install it.
4587 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4588 (the_low_target): Install it.
4589
4590 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4591
4592 * acinclude.m4: Include new ../warning.m4 file.
4593 * configure: Regenerated.
4594 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4595
4596 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4597
4598 * ax.c (is_goto_target): Mark static.
4599 * linux-low.c (register_addr): Likewise.
4600 (linux_fetch_registers, linux_store_registers): Likewise.
4601 * mem-break.c (any_persistent_commands): Fix old prototype.
4602 (add_commands_to_breakpoint): Mark static.
4603 * regcache.c (find_register_by_name): Delete unused func.
4604 * remote-utils.c (hex_or_minus_one): Mark static.
4605 * server.c (monitor_show_help): Mark static.
4606 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4607 handle_v_requests): Likewise.
4608
4609 2016-01-12 Pedro Alves <palves@redhat.com>
4610
4611 Remove use of the registered trademark symbol throughout.
4612
4613 2016-01-08 Yao Qi <yao.qi@linaro.org>
4614
4615 * remote-utils.c (getpkt): If c is '\003', call target hook
4616 request_interrupt.
4617
4618 2016-01-06 Yao Qi <yao.qi@linaro.org>
4619
4620 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4621 linux-aarch32-low.c.
4622 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4623 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4624 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4625 (thumb2_breakpoint): Declare.
4626 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4627 linux-aarch32-low.h.
4628 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4629 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4630 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4631
4632 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4633
4634 * gdbreplay.c (gdbreplay_version): Change copyright year in
4635 version message.
4636 * server.c (gdbserver_version): Likewise.
4637
4638 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4639
4640 * server.c (crc32_table): Delete.
4641 (crc32): Use libiberty's xcrc32 function.
4642
4643 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4644
4645 * lynx-low.c (lynx_delete_thread_callback): New function.
4646 (lynx_mourn): Properly delete our process and all of its
4647 threads. Remove call to clear_inferiors.
4648
4649 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4650
4651 * target.c (thread_search_callback): Add check that
4652 the thread_stopped target callback is not NULL before
4653 calling it.
4654
4655 2015-12-21 Yao Qi <yao.qi@linaro.org>
4656
4657 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4658 arm breakpoint.
4659
4660 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4661
4662 * server.c (handle_query): Call target_supports_software_single_step.
4663
4664 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4665
4666 * linux-low.c (single_step): New function.
4667 (linux_resume_one_lwp_throw): Call single_step.
4668 (start_step_over): Likewise.
4669
4670 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4671
4672 * Makefile.in (SFILES): Append arch/arm-linux.c,
4673 arch/arm-get-next-pcs.c.
4674 (arm-linux.o): New rule.
4675 (arm-get-next-pcs.o): New rule.
4676 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4677 arm-linux.o.
4678 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4679 to linux-aarch32-low.c.
4680 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4681 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4682 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4683 (thumb2_breakpoint_len): Likewise.
4684 (arm_is_thumb_mode): Make non-static.
4685 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4686 from linux-aarch32-low.c.
4687 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4688 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4689 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4690 (thumb2_breakpoint_len): Likewise.
4691 (arm_is_thumb_mode): New declaration.
4692 * linux-arm-low.c: Include arch/arm-linux.h
4693 aarch/arm-get-next-pcs.h, sys/syscall.h.
4694 (get_next_pcs_ops): New struct.
4695 (get_next_pcs_addr_bits_remove): New function.
4696 (get_next_pcs_is_thumb): New function.
4697 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4698 (arm_sigreturn_next_pc): Likewise.
4699 (get_next_pcs_syscall_next_pc): Likewise.
4700 (arm_gdbserver_get_next_pcs): Likewise.
4701 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4702 Initialize.
4703 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4704 * server.h: Include gdb_vecs.h.
4705
4706 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4707
4708 * Makefile.in (SFILES): Append common/common-regcache.c.
4709 (OBS): Append common-regcache.o.
4710 (common-regcache.o): New rule.
4711 * regcache.c (init_register_cache): Initialize cache to
4712 REG_UNAVAILABLE.
4713 (regcache_raw_read_unsigned): New function.
4714 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4715 register_status enum.
4716
4717 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4718
4719 * linux-aarch64-low.c (the_low_targets): Rename
4720 breakpoint_reinsert_addr to get_next_pcs.
4721 * linux-arm-low.c (the_low_targets): Likewise.
4722 * linux-bfin-low.c (the_low_targets): Likewise.
4723 * linux-cris-low.c (the_low_targets): Likewise.
4724 * linux-crisv32-low.c (the_low_targets): Likewise.
4725 * linux-low.c (can_software_single_step): Likewise.
4726 (install_software_single_step_breakpoints): New function.
4727 (start_step_over): Use install_software_single_step_breakpoints.
4728 * linux-low.h: New CORE_ADDR vector.
4729 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4730 get_next_pcs.
4731 * linux-mips-low.c (the_low_targets): Likewise.
4732 * linux-nios2-low.c (the_low_targets): Likewise.
4733 * linux-sparc-low.c (the_low_targets): Likewise.
4734
4735 2015-12-17 Pedro Alves <palves@redhat.com>
4736
4737 * linux-low.c (linux_kill_one_lwp): Remove references to
4738 LinuxThreads.
4739 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4740 to 'kill'.
4741 (linux_init_signals): Delete.
4742 (initialize_low): Adjust.
4743 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4744
4745 2015-12-16 Pedro Alves <palves@redhat.com>
4746
4747 * configure.ac (compiler warning flags): When testing a
4748 -Wno-foo option, check whether -Wfoo works instead.
4749 * configure: Regenerate.
4750
4751 2015-12-11 Don Breazeal <donb@codesourcery.com>
4752
4753 * server.c (process_serial_event): Don't exit from gdbserver
4754 in remote mode if there are still active inferiors.
4755
4756 2015-12-11 Yao Qi <yao.qi@linaro.org>
4757
4758 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4759 arm_breakpoint_at if the process is 32-bit.
4760
4761 2015-12-11 Yao Qi <yao.qi@linaro.org>
4762
4763 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4764 arm breakpoint.
4765
4766 2015-12-07 Yao Qi <yao.qi@linaro.org>
4767
4768 * configure.srv: Append arm.o to srv_tgtobj for
4769 aarch64*-*-linux* target.
4770 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4771 from linux-arm-low.c.
4772 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4773 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4774 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4775 (thumb2_breakpoint_len): Likewise.
4776 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4777 (arm_breakpoint_kinds): Likewise.
4778 (arm_breakpoint_kind_from_pc): Likewise.
4779 (arm_sw_breakpoint_from_kind): Likewise.
4780 (arm_breakpoint_kind_from_current_state): Likewise.
4781 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4782 (arm_sw_breakpoint_from_kind): Declare.
4783 (arm_breakpoint_kind_from_current_state): Declare.
4784 (arm_breakpoint_at): Declare.
4785 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4786 arm_sw_breakpoint_from_kind if process is 32-bit.
4787 (aarch64_breakpoint_kind_from_pc): New function.
4788 (aarch64_breakpoint_kind_from_current_state): New function.
4789 (the_low_target): Initialize fields breakpoint_kind_from_pc
4790 and breakpoint_kind_from_current_state.
4791 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4792 linux-aarch32-low.c.
4793 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4794 (arm_breakpoint, arm_breakpoint_len): Likewise.
4795 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4796 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4797 (arm_is_thumb_mode): Likewise.
4798 (arm_breakpoint_at): Likewise.
4799 (arm_breakpoint_kind_from_pc): Likewise.
4800 (arm_sw_breakpoint_from_kind): Likewise.
4801 (arm_breakpoint_kind_from_current_state): Likewise.
4802
4803 Revert:
4804 2015-08-04 Yao Qi <yao.qi@linaro.org>
4805
4806 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4807 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4808 * server.c (extended_protocol): Remove "static".
4809 * server.h (extended_protocol): Declare it.
4810
4811 2015-12-04 Josh Stone <jistone@redhat.com>
4812
4813 * target.h (struct target_ops) <arch_setup>: Rename to ...
4814 (struct target_ops) <post_create_inferior>: ... this.
4815 (target_arch_setup): Rename to ...
4816 (target_post_create_inferior): ... this, calling post_create_inferior.
4817 * server.c (start_inferior): Update target_arch_setup calls to
4818 target_post_create_inferior.
4819 * linux-low.c (linux_low_ptrace_options): Forward declare.
4820 (linux_arch_setup): Update its comment for general use.
4821 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4822 (struct linux_target_ops): Use linux_post_create_inferior.
4823 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4824 to post_create_inferior.
4825 * nto-low.c (struct nto_target_ops): Likewise.
4826 * spu-low.c (struct spu_target_ops): Likewise.
4827 * win32-low.c (struct win32_target_ops): Likewise.
4828
4829 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4830
4831 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4832
4833 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4834
4835 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4836 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4837 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4838 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4839 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4840 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4841 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4842 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4843 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4844 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4845 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4846 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4847
4848 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4849
4850 * linux-low.c (linux_look_up_symbols): Don't call
4851 linux_supports_traceclone.
4852 * linux-low.h (thread_db_init): Remove use_events argument.
4853 * thread-db.c (thread_db_use_event): Remove global variable.
4854 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4855 (struct thread_db) <td_create_bp>: Remove field.
4856 (thread_db_create_event): Remove function.
4857 (thread_db_enable_reporting): Likewise.
4858 (find_one_thread): Don't check for thread_db_use_events.
4859 (attach_thread): Likewise.
4860 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4861 (try_thread_db_load_1): Don't check for thread_db_use_events.
4862 (thread_db_init): Remove use_events argument and thread events
4863 handling.
4864 (remove_thread_event_breakpoints): Remove function.
4865 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4866
4867 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4868
4869 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4870 New function.
4871 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4872 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4873 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4874 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4875 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4876 Initialize.
4877 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4878 New function.
4879 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4880 * linux-low.c (can_hardware_single_step): Use
4881 supports_hardware_single_step.
4882 (can_software_single_step): New function.
4883 (start_step_over): Call can_software_single_step.
4884 (linux_supports_hardware_single_step): New function.
4885 (struct target_ops) <supports_software_single_step>: Initialize.
4886 * linux-low.h (struct linux_target_ops)
4887 <supports_hardware_single_step>: Initialize.
4888 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4889 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4890 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4891 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4892 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4893 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4894 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4895 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4896 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4897 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4898 Initialize.
4899 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4900 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4901 Initialize.
4902 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4903 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4904 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4905 New function.
4906 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4907 * target.h (struct target_ops): <supports_software_single_step>:
4908 New field.
4909 (target_supports_software_single_step): New macro.
4910
4911 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4912
4913 * linux-low.c (linux_wait_1): Fix pc advance condition.
4914 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4915 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4916
4917 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4918
4919 * linux-arm-low.c (arm_is_thumb_mode): New function.
4920 (arm_breakpoint_at): Use arm_is_thumb_mode.
4921 (arm_breakpoint_kind_from_current_state): New function.
4922 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4923 Initialize.
4924 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4925 (linux_breakpoint_kind_from_current_state): New function.
4926 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4927 * linux-low.h (struct linux_target_ops)
4928 <breakpoint_kind_from_current_state>: New field.
4929 * target.h (struct target_ops): Likewise.
4930 (target_breakpoint_kind_from_current_state): New macro.
4931
4932 2015-11-30 Pedro Alves <palves@redhat.com>
4933
4934 * linux-low.c (linux_resume): Wake up the event loop before
4935 returning.
4936
4937 2015-11-30 Pedro Alves <palves@redhat.com>
4938
4939 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4940 check.
4941 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4942 to -1.
4943 * target.c (struct thread_search): New structure.
4944 (thread_search_callback): New function.
4945 (prev_general_thread): New global.
4946 (prepare_to_access_memory, done_accessing_memory): New functions.
4947 * target.h (prepare_to_access_memory, done_accessing_memory):
4948 Replace macros with function declarations.
4949
4950 2015-11-30 Pedro Alves <palves@redhat.com>
4951
4952 PR 14618
4953 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4954 report TARGET_WAITKIND_NO_RESUMED.
4955 * remote-utils.c (prepare_resume_reply): Handle
4956 TARGET_WAITKIND_NO_RESUMED.
4957 * server.c (report_no_resumed): New global.
4958 (handle_query) <qSupported>: Handle "no-resumed+". Report
4959 "no-resumed+" support.
4960 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4961 return error if the client doesn't support no-resumed events.
4962 (push_stop_notification): New function.
4963 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4964 events if the client supports them.
4965
4966 2015-11-30 Pedro Alves <palves@redhat.com>
4967
4968 * linux-low.c (thread_still_has_status_pending_p): Don't check
4969 vCont;t here.
4970 (lwp_resumed): New function.
4971 (status_pending_p_callback): Return early if the LWP is not
4972 supposed to be resumed.
4973
4974 2015-11-30 Pedro Alves <palves@redhat.com>
4975
4976 * linux-low.c (handle_extended_wait): Assert that the LWP's
4977 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4978 thread create events, leave the new child's status pending.
4979 (linux_low_filter_event): If GDB wants to hear about thread exit
4980 events, leave the LWP marked dead and don't delete it.
4981 (linux_wait_for_event_filtered): Don't check for thread exit.
4982 (filter_exit_event): New function.
4983 (linux_wait_1): Use it, when returning an exit event.
4984 (linux_resume_one_lwp_throw): Assert that the LWP's
4985 waitstatus is TARGET_WAITKIND_IGNORE.
4986 * remote-utils.c (prepare_resume_reply): Handle
4987 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4988 * server.c (report_thread_events): New global.
4989 (handle_general_set): Handle QThreadEvents.
4990 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4991 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4992 TARGET_WAITKIND_THREAD_EXITED.
4993 * server.h (report_thread_events): Declare.
4994
4995 2015-11-30 Pedro Alves <palves@redhat.com>
4996
4997 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4998 the thread's last_resume_kind was resume_stop.
4999
5000 2015-11-30 Pedro Alves <palves@redhat.com>
5001
5002 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5003 before returning.
5004
5005 2015-11-30 Pedro Alves <palves@redhat.com>
5006
5007 * server.c (handle_v_requests): Handle vCtrlC.
5008
5009 2015-11-30 Pedro Alves <palves@redhat.com>
5010
5011 * gdbthread.h (find_any_thread_of_pid): Declare.
5012 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5013 functions.
5014 * server.c (handle_query): If current_thread is NULL, look for
5015 another thread of the selected process.
5016
5017 2015-11-26 Daniel Colascione <dancol@dancol.org>
5018 Simon Marchi <simon.marchi@ericsson.com>
5019
5020 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5021 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5022 name in reply.
5023 * target.h (struct target_ops) <thread_name>: New field.
5024 (target_thread_name): New macro.
5025
5026 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5027
5028 * regcache.h (regcache_invalidate_pid): Add declaration.
5029 * regcache.c (regcache_invalidate_pid): New function, extracted
5030 from regcache_invalidate.
5031 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5032 Add trivial documentation comment.
5033 * lynx-low.c: Use regcache_invalidate_pid instead of
5034 regcache_invalidate.
5035
5036 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5037
5038 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5039 and Elf64_auxv_t if the target is Android.
5040
5041 2015-11-22 Doug Evans <xdje42@gmail.com>
5042
5043 * target.h: #include <sys/types.h>.
5044
5045 2015-11-19 Pedro Alves <palves@redhat.com>
5046
5047 * linux-low.c (linux_process_qsupported): Change prototype.
5048 Adjust.
5049 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5050 Change prototype.
5051 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5052 and adjust to loop over all features.
5053 * server.c (handle_query) <qSupported>: Adjust to call
5054 target_process_qsupported once, passing it a vector of unprocessed
5055 features.
5056 * target.h (struct target_ops) <process_qsupported>: Change
5057 prototype.
5058 (target_process_qsupported): Adjust.
5059
5060 2015-11-19 Pedro Alves <palves@redhat.com>
5061
5062 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5063 mode.
5064 * configure: Regenerate.
5065
5066 2015-11-19 Pedro Alves <palves@redhat.com>
5067
5068 * configure: Regenerate.
5069
5070 2015-11-19 Yao Qi <yao.qi@linaro.org>
5071
5072 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5073 type to uint32_t.
5074
5075 2015-11-19 Yao Qi <yao.qi@linaro.org>
5076
5077 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5078 (struct aarch64_operand): Move enum out.
5079
5080 2015-11-19 Yao Qi <yao.qi@linaro.org>
5081
5082 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5083 struct user_fpsimd_state *.
5084 (aarch64_store_fpregset): Likewise.
5085
5086 2015-11-19 Yao Qi <yao.qi@linaro.org>
5087
5088 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5089 struct user_pt_regs *.
5090 (aarch64_store_gregset): Likewise.
5091
5092 2015-11-18 Pedro Alves <palves@redhat.com>
5093
5094 * Makefile.in (all_object_files): Add $IPA_OBJS.
5095
5096 2015-11-17 Pedro Alves <palves@redhat.com>
5097
5098 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5099 GDB_SIGNAL_0 and gdb_signal_to_string.
5100
5101 2015-11-17 Pedro Alves <palves@redhat.com>
5102
5103 * win32-low.c (handle_output_debug_string): Remove parameter.
5104 (win32_kill): Remove our_status local and adjust call to
5105 handle_output_debug_string.
5106 (get_child_debug_event): Adjust call to
5107 handle_output_debug_string.
5108
5109 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5110
5111 * linux-mips-low.c (mips_fill_gregset): Add cast.
5112 (mips_store_gregset): Likewise.
5113 (mips_fill_fpregset): Likewise.
5114 (mips_store_fpregset): Likewise.
5115
5116 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5117
5118 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5119 priv.
5120
5121 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5122
5123 * linux-mips-low.c (mips_linux_new_thread): Change type of
5124 watch_type to enum target_hw_bp_type.
5125
5126 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5127
5128 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5129 Change return type to arm_hwbp_type.
5130
5131 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5132
5133 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5134 (arm_store_gregset): Likewise.
5135 * linux-arm-low.c (arm_get_hwcap): Likewise.
5136 (arm_read_description): Likewise.
5137
5138 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5139
5140 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5141
5142 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5143
5144 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5145 (ppc_fill_vsxregset): Likewise.
5146 (ppc_store_vsxregset): Likewise.
5147 (ppc_fill_vrregset): Likewise.
5148 (ppc_store_vrregset): Likewise.
5149 (ppc_fill_evrregset): Likewise.
5150 (ppc_store_evrregset): Likewise.
5151
5152 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5153
5154 * linux-ppc-low.c (ppc_usrregs_info): Remove
5155 forward-declaration.
5156 (ppc_arch_setup): Move lower in file.
5157
5158 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5159
5160 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5161 (ps_pdwrite): Likewise.
5162
5163 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5164
5165 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5166 to after assert checks.
5167
5168 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5169
5170 * proc-service.c (ps_pdread): Add/adjust casts.
5171 (ps_pdwrite): Add/adjust casts.
5172
5173 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5174
5175 * server.c (handle_search_memory_1): Cast return value of
5176 memmem.
5177
5178 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5179
5180 * server.c (write_qxfer_response): Change type of data to
5181 gdb_byte *.
5182
5183 2015-10-29 Pedro Alves <palves@redhat.com>
5184
5185 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5186
5187 2015-10-29 Pedro Alves <palves@redhat.com>
5188
5189 * tracepoint.c (clear_installed_tracepoints): Add casts.
5190
5191 2015-10-29 Pedro Alves <palves@redhat.com>
5192
5193 * server.c (handle_v_cont, process_serial_event): Add enum
5194 gdb_signal casts to signal parsing code.
5195
5196 2015-10-29 Pedro Alves <palves@redhat.com>
5197
5198 * linux-low.h (NULL_REGSET): Define.
5199 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5200 * linux-arm-low.c (arm_regsets): Likewise.
5201 * linux-crisv32-low.c (cris_regsets): Likewise.
5202 * linux-m68k-low.c (m68k_regsets): Likewise.
5203 * linux-mips-low.c (mips_regsets): Likewise.
5204 * linux-nios2-low.c (nios2_regsets): Likewise.
5205 * linux-ppc-low.c (ppc_regsets): Likewise.
5206 * linux-s390-low.c (s390_regsets): Likewise.
5207 * linux-sh-low.c (sh_regsets): Likewise.
5208 * linux-sparc-low.c (sparc_regsets): Likewise.
5209 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5210 * linux-tile-low.c (tile_regsets): Likewise.
5211 * linux-x86-low.c (x86_regsets): Likewise.
5212 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5213
5214 2015-10-29 Pedro Alves <palves@redhat.com>
5215
5216 * linux-low.h (NULL_REGSET): Define.
5217 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5218 * linux-arm-low.c (arm_regsets): Likewise.
5219 * linux-crisv32-low.c (cris_regsets): Likewise.
5220 * linux-m68k-low.c (m68k_regsets): Likewise.
5221 * linux-mips-low.c (mips_regsets): Likewise.
5222 * linux-nios2-low.c (nios2_regsets): Likewise.
5223 * linux-ppc-low.c (ppc_regsets): Likewise.
5224 * linux-s390-low.c (s390_regsets): Likewise.
5225 * linux-sh-low.c (sh_regsets): Likewise.
5226 * linux-sparc-low.c (sparc_regsets): Likewise.
5227 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5228 * linux-tile-low.c (tile_regsets): Likewise.
5229 * linux-x86-low.c (x86_regsets): Likewise.
5230 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5231
5232 2015-10-26 Doug Evans <dje@google.com>
5233
5234 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5235
5236 2015-10-26 Doug Evans <dje@google.com>
5237
5238 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5239
5240 2015-10-26 Doug Evans <dje@google.com>
5241
5242 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5243 for debug_printf.
5244 (attach_thread, find_new_threads_callback): Ditto.
5245
5246 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5247
5248 * mem-break.h (set_breakpoint_data): Remove.
5249
5250 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5251
5252 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5253 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5254 (initialize_low): Remove set_breakpoint_data call.
5255 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5256 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5257 (initialize_low): Remove set_breakpoint_data call.
5258 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5259 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5260 (initialize_low): Remove set_breakpoint_data call.
5261
5262 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5263
5264 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5265 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5266 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5267 * target.h (target_breakpoint_kind_from_pc): New macro.
5268
5269 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5270
5271 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5272 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5273 the default breakpoint kind.
5274
5275 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5276
5277 * linux-arm-low.c (arm_supports_z_point_type): Add software
5278 breakpoint support.
5279
5280 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5281
5282 * linux-arm-low.c: Refactor breakpoint definitions.
5283 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5284 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5285
5286 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5287
5288 * Makefile.in: Add arm.c/o.
5289 * configure.srv: Likewise.
5290 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5291 (arm_breakpoint_kind_from_pc): New function.
5292 (arm_sw_breakpoint_from_kind): Return proper kind.
5293 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5294
5295 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5296
5297 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5298 removal.
5299 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5300 (struct raw_breakpoint) <size>: Remove.
5301 (struct raw_breakpoint) <kind>: Add.
5302 (bp_size): New function.
5303 (bp_opcode): Likewise.
5304 (find_raw_breakpoint_at): Adjust for kind.
5305 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5306 (remove_memory_breakpoint): Adjust for kind call bp_size.
5307 (set_raw_breakpoint_at): Adjust for kind.
5308 (set_breakpoint): Likewise.
5309 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5310 (delete_raw_breakpoint): Adjust for kind.
5311 (delete_breakpoint): Likewise.
5312 (find_gdb_breakpoint): Likewise.
5313 (set_gdb_breakpoint_1): Likewise.
5314 (set_gdb_breakpoint): Likewise.
5315 (delete_gdb_breakpoint_1): Likewise.
5316 (delete_gdb_breakpoint): Likewise.
5317 (uninsert_raw_breakpoint): Likewise.
5318 (reinsert_raw_breakpoint): Likewise.
5319 (set_breakpoint_data): Remove.
5320 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5321 (check_mem_read): Adjust for kind call bp_size.
5322 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5323 (clone_one_breakpoint): Adjust for kind.
5324 * mem-break.h (set_gdb_breakpoint): Likewise.
5325 (delete_gdb_breakpoint): Likewise.
5326 * server.c (process_serial_event): Likewise.
5327
5328 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5329
5330 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5331 (struct linux_target_ops) <breakpoint>: Remove.
5332 (struct linux_target_ops) <breakpoint_len>: Remove.
5333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5334 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5335 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5336 (arm_sw_breakpoint_from_kind): New function.
5337 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5338 (struct linux_target_ops) <breakpoint>: Remove.
5339 (struct linux_target_ops) <breakpoint_len>: Remove.
5340 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5341 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5342 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5343 (struct linux_target_ops) <breakpoint>: Remove.
5344 (struct linux_target_ops) <breakpoint_len>: Remove.
5345 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5346 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5347 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5348 (struct linux_target_ops) <breakpoint>: Remove.
5349 (struct linux_target_ops) <breakpoint_len>: Remove.
5350 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5351 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5352 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5353 and sw_breakpoint_from_kind to increment the pc.
5354 (linux_breakpoint_kind_from_pc): New function.
5355 (linux_sw_breakpoint_from_kind): New function.
5356 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5357 (initialize_low): Call breakpoint_kind_from_pc and
5358 sw_breakpoint_from_kind to replace breakpoint_data/len.
5359 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5360 New field.
5361 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5362 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5363 (struct linux_target_ops) <breakpoint>: Remove.
5364 (struct linux_target_ops) <breakpoint_len>: Remove.
5365 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5366 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5367 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5368 (struct linux_target_ops) <breakpoint>: Remove.
5369 (struct linux_target_ops) <breakpoint_len>: Remove.
5370 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5371 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5372 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5373 (struct linux_target_ops) <breakpoint>: Remove.
5374 (struct linux_target_ops) <breakpoint_len>: Remove.
5375 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5376 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5377 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5378 (struct linux_target_ops) <breakpoint>: Remove.
5379 (struct linux_target_ops) <breakpoint_len>: Remove.
5380 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5381 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5382 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5383 (struct linux_target_ops) <breakpoint>: Remove.
5384 (struct linux_target_ops) <breakpoint_len>: Remove.
5385 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5386 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5387 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5388 (struct linux_target_ops) <breakpoint>: Remove.
5389 (struct linux_target_ops) <breakpoint_len>: Remove.
5390 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5391 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5392 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5393 (struct linux_target_ops) <breakpoint>: Remove.
5394 (struct linux_target_ops) <breakpoint_len>: Remove.
5395 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5396 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5397 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5398 (struct linux_target_ops) <breakpoint>: Remove.
5399 (struct linux_target_ops) <breakpoint_len>: Remove.
5400 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5401 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5402 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5403 (struct linux_target_ops) <breakpoint>: Remove.
5404 (struct linux_target_ops) <breakpoint_len>: Remove.
5405 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5406 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5407 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5408 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5409 (struct linux_target_ops) <breakpoint>: Remove.
5410 (struct linux_target_ops) <breakpoint_len>: Remove.
5411 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5412 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5413 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5414 (struct linux_target_ops) <breakpoint>: Remove.
5415 (struct linux_target_ops) <breakpoint_len>: Remove.
5416 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5417 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5418
5419 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5420
5421 * linux-cris-low.c (cris_get_pc): Remove void arg.
5422
5423 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5424
5425 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5426 variable name.
5427
5428 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5429
5430 * inferiors.c (thread_pid_matches_callback): New function.
5431 (find_thread_process): New function.
5432 (remove_thread): Reset current_thread.
5433 (remove_process): Assert threads have been removed first.
5434
5435 2015-10-15 Yao Qi <yao.qi@linaro.org>
5436
5437 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5438 if it is 3.
5439 (aarch64_remove_point): Likewise.
5440 * regcache.c (regcache_register_size): New function.
5441
5442 2015-10-12 Yao Qi <yao.qi@linaro.org>
5443
5444 * linux-aarch64-low.c: Update all callers as emit_load_store
5445 is renamed to aarch64_emit_load_store.
5446
5447 2015-10-12 Yao Qi <yao.qi@linaro.org>
5448
5449 * linux-aarch64-low.c: Update all callers of function renaming
5450 from emit_insn to aarch64_emit_insn.
5451
5452 2015-10-12 Yao Qi <yao.qi@linaro.org>
5453
5454 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5455 arch/aarch64-insn.h.
5456 (struct aarch64_memory_operand): Likewise.
5457 (ENCODE): Likewise.
5458 (emit_insn): Move to arch/aarch64-insn.c.
5459 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5460 (emit_load_store): Move to arch/aarch64-insn.c.
5461 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5462 (can_encode_int32): Remove.
5463
5464 2015-10-12 Yao Qi <yao.qi@linaro.org>
5465
5466 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5467 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5468 (aarch64_relocate_instruction): Likewise.
5469 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5470 (struct aarch64_insn_visitor): Likewise.
5471
5472 2015-10-12 Yao Qi <yao.qi@linaro.org>
5473
5474 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5475 (struct aarch64_insn_visitor): New.
5476 (struct aarch64_insn_relocation_data): New.
5477 (aarch64_ftrace_insn_reloc_b): New function.
5478 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5479 (aarch64_ftrace_insn_reloc_cb): Likewise.
5480 (aarch64_ftrace_insn_reloc_tb): Likewise.
5481 (aarch64_ftrace_insn_reloc_adr): Likewise.
5482 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5483 (aarch64_ftrace_insn_reloc_others): Likewise.
5484 (visitor): New.
5485 (aarch64_relocate_instruction): Use visitor.
5486
5487 2015-10-12 Yao Qi <yao.qi@linaro.org>
5488
5489 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5490 int. Add argument buf.
5491 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5492 aarch64_relocate_instruction.
5493
5494 2015-10-12 Yao Qi <yao.qi@linaro.org>
5495
5496 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5497 argument insn. Remove local variable insn. Don't call
5498 target_read_uint32.
5499 (aarch64_install_fast_tracepoint_jump_pad): Call
5500 target_read_uint32.
5501
5502 2015-09-30 Yao Qi <yao.qi@linaro.org>
5503
5504 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5505 (emit_load_store_pair): Likewise.
5506
5507 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5508
5509 * dll.c (match_dll): Add cast(s).
5510 (unloaded_dll): Likewise.
5511 * linux-low.c (second_thread_of_pid_p): Likewise.
5512 (delete_lwp_callback): Likewise.
5513 (count_events_callback): Likewise.
5514 (select_event_lwp_callback): Likewise.
5515 (linux_set_resume_request): Likewise.
5516 * server.c (accumulate_file_name_length): Likewise.
5517 (emit_dll_description): Likewise.
5518 (handle_qxfer_threads_worker): Likewise.
5519 (visit_actioned_threads): Likewise.
5520 * thread-db.c (any_thread_of): Likewise.
5521 * tracepoint.c (same_process_p): Likewise.
5522 (match_blocktype): Likewise.
5523 (build_traceframe_info_xml): Likewise.
5524
5525 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5526
5527 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5528 assignment.
5529 (gdb_unparse_agent_expr): Likewise.
5530 * hostio.c (require_data): Likewise.
5531 (handle_pread): Likewise.
5532 * linux-low.c (disable_regset): Likewise.
5533 (fetch_register): Likewise.
5534 (store_register): Likewise.
5535 (get_dynamic): Likewise.
5536 (linux_qxfer_libraries_svr4): Likewise.
5537 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5538 (set_fast_tracepoint_jump): Likewise.
5539 (uninsert_fast_tracepoint_jumps_at): Likewise.
5540 (reinsert_fast_tracepoint_jumps_at): Likewise.
5541 (validate_inserted_breakpoint): Likewise.
5542 (clone_agent_expr): Likewise.
5543 * regcache.c (init_register_cache): Likewise.
5544 * remote-utils.c (putpkt_binary_1): Likewise.
5545 (decode_M_packet): Likewise.
5546 (decode_X_packet): Likewise.
5547 (look_up_one_symbol): Likewise.
5548 (relocate_instruction): Likewise.
5549 (monitor_output): Likewise.
5550 * server.c (handle_search_memory): Likewise.
5551 (handle_qxfer_exec_file): Likewise.
5552 (handle_qxfer_libraries): Likewise.
5553 (handle_qxfer): Likewise.
5554 (handle_query): Likewise.
5555 (handle_v_cont): Likewise.
5556 (handle_v_run): Likewise.
5557 (captured_main): Likewise.
5558 * target.c (write_inferior_memory): Likewise.
5559 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5560 * tracepoint.c (init_trace_buffer): Likewise.
5561 (add_tracepoint_action): Likewise.
5562 (add_traceframe): Likewise.
5563 (add_traceframe_block): Likewise.
5564 (cmd_qtdpsrc): Likewise.
5565 (cmd_qtdv): Likewise.
5566 (cmd_qtstatus): Likewise.
5567 (response_source): Likewise.
5568 (response_tsv): Likewise.
5569 (cmd_qtnotes): Likewise.
5570 (gdb_collect): Likewise.
5571 (initialize_tracepoint): Likewise.
5572
5573 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5574
5575 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5576 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5577 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5578 <NOP>: New.
5579 (enum aarch64_condition_codes): New enum.
5580 (w0): New static global.
5581 (fp): Likewise.
5582 (lr): Likewise.
5583 (struct aarch64_memory_operand) <type>: New
5584 MEMORY_OPERAND_POSTINDEX type.
5585 (postindex_memory_operand): New helper function.
5586 (emit_ret): New function.
5587 (emit_load_store_pair): New function, factored out of emit_stp
5588 with support for MEMORY_OPERAND_POSTINDEX.
5589 (emit_stp): Rewrite using emit_load_store_pair.
5590 (emit_ldp): New function.
5591 (emit_load_store): Likewise.
5592 (emit_ldr): Mention post-index instruction in comment.
5593 (emit_ldrh): New function.
5594 (emit_ldrb): New function.
5595 (emit_ldrsw): Mention post-index instruction in comment.
5596 (emit_str): Likewise.
5597 (emit_subs): New function.
5598 (emit_cmp): Likewise.
5599 (emit_and): Likewise.
5600 (emit_orr): Likewise.
5601 (emit_orn): Likewise.
5602 (emit_eor): Likewise.
5603 (emit_mvn): Likewise.
5604 (emit_lslv): Likewise.
5605 (emit_lsrv): Likewise.
5606 (emit_asrv): Likewise.
5607 (emit_mul): Likewise.
5608 (emit_sbfm): Likewise.
5609 (emit_sbfx): Likewise.
5610 (emit_ubfm): Likewise.
5611 (emit_ubfx): Likewise.
5612 (emit_csinc): Likewise.
5613 (emit_cset): Likewise.
5614 (emit_nop): Likewise.
5615 (emit_ops_insns): New helper function.
5616 (emit_pop): Likewise.
5617 (emit_push): Likewise.
5618 (aarch64_emit_prologue): New function.
5619 (aarch64_emit_epilogue): Likewise.
5620 (aarch64_emit_add): Likewise.
5621 (aarch64_emit_sub): Likewise.
5622 (aarch64_emit_mul): Likewise.
5623 (aarch64_emit_lsh): Likewise.
5624 (aarch64_emit_rsh_signed): Likewise.
5625 (aarch64_emit_rsh_unsigned): Likewise.
5626 (aarch64_emit_ext): Likewise.
5627 (aarch64_emit_log_not): Likewise.
5628 (aarch64_emit_bit_and): Likewise.
5629 (aarch64_emit_bit_or): Likewise.
5630 (aarch64_emit_bit_xor): Likewise.
5631 (aarch64_emit_bit_not): Likewise.
5632 (aarch64_emit_equal): Likewise.
5633 (aarch64_emit_less_signed): Likewise.
5634 (aarch64_emit_less_unsigned): Likewise.
5635 (aarch64_emit_ref): Likewise.
5636 (aarch64_emit_if_goto): Likewise.
5637 (aarch64_emit_goto): Likewise.
5638 (aarch64_write_goto_address): Likewise.
5639 (aarch64_emit_const): Likewise.
5640 (aarch64_emit_call): Likewise.
5641 (aarch64_emit_reg): Likewise.
5642 (aarch64_emit_pop): Likewise.
5643 (aarch64_emit_stack_flush): Likewise.
5644 (aarch64_emit_zero_ext): Likewise.
5645 (aarch64_emit_swap): Likewise.
5646 (aarch64_emit_stack_adjust): Likewise.
5647 (aarch64_emit_int_call_1): Likewise.
5648 (aarch64_emit_void_call_2): Likewise.
5649 (aarch64_emit_eq_goto): Likewise.
5650 (aarch64_emit_ne_goto): Likewise.
5651 (aarch64_emit_lt_goto): Likewise.
5652 (aarch64_emit_le_goto): Likewise.
5653 (aarch64_emit_gt_goto): Likewise.
5654 (aarch64_emit_ge_got): Likewise.
5655 (aarch64_emit_ops_impl): New static global variable.
5656 (aarch64_emit_ops): New target function, return
5657 &aarch64_emit_ops_impl.
5658 (struct linux_target_ops): Install it.
5659
5660 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5661
5662 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5663 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5664 aarch64-ipa.o.
5665 * linux-aarch64-ipa.c: New file.
5666 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5667 and endian.h.
5668 (aarch64_get_thread_area): New target method.
5669 (extract_signed_bitfield): New helper function.
5670 (aarch64_decode_ldr_literal): New function.
5671 (enum aarch64_opcodes): New enum.
5672 (struct aarch64_register): New struct.
5673 (struct aarch64_operand): New struct.
5674 (x0): New static global.
5675 (x1): Likewise.
5676 (x2): Likewise.
5677 (x3): Likewise.
5678 (x4): Likewise.
5679 (w2): Likewise.
5680 (ip0): Likewise.
5681 (sp): Likewise.
5682 (xzr): Likewise.
5683 (aarch64_register): New helper function.
5684 (register_operand): Likewise.
5685 (immediate_operand): Likewise.
5686 (struct aarch64_memory_operand): New struct.
5687 (offset_memory_operand): New helper function.
5688 (preindex_memory_operand): Likewise.
5689 (enum aarch64_system_control_registers): New enum.
5690 (ENCODE): New macro.
5691 (emit_insn): New helper function.
5692 (emit_b): New function.
5693 (emit_bcond): Likewise.
5694 (emit_cb): Likewise.
5695 (emit_tb): Likewise.
5696 (emit_blr): Likewise.
5697 (emit_stp): Likewise.
5698 (emit_ldp_q_offset): Likewise.
5699 (emit_stp_q_offset): Likewise.
5700 (emit_load_store): Likewise.
5701 (emit_ldr): Likewise.
5702 (emit_ldrsw): Likewise.
5703 (emit_str): Likewise.
5704 (emit_ldaxr): Likewise.
5705 (emit_stxr): Likewise.
5706 (emit_stlr): Likewise.
5707 (emit_data_processing_reg): Likewise.
5708 (emit_data_processing): Likewise.
5709 (emit_add): Likewise.
5710 (emit_sub): Likewise.
5711 (emit_mov): Likewise.
5712 (emit_movk): Likewise.
5713 (emit_mov_addr): Likewise.
5714 (emit_mrs): Likewise.
5715 (emit_msr): Likewise.
5716 (emit_sevl): Likewise.
5717 (emit_wfe): Likewise.
5718 (append_insns): Likewise.
5719 (can_encode_int32_in): New helper function.
5720 (aarch64_relocate_instruction): New function.
5721 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5722 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5723 (struct linux_target_ops): Install aarch64_get_thread_area,
5724 aarch64_install_fast_tracepoint_jump_pad and
5725 aarch64_get_min_fast_tracepoint_insn_len.
5726
5727 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5728
5729 * Makefile.in (aarch64-insn.o): New rule.
5730 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5731
5732 2015-09-21 Yao Qi <yao.qi@linaro.org>
5733
5734 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5735
5736 2015-09-21 Yao Qi <yao.qi@linaro.org>
5737
5738 * tracepoint.c (max_jump_pad_size): Remove.
5739
5740 2015-09-18 Yao Qi <yao.qi@linaro.org>
5741
5742 * linux-aarch64-low.c: Don't include sys/uio.h.
5743 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5744
5745 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5746
5747 * tracepoint.c (eval_result_type): Change prototype.
5748 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5749
5750 2015-09-15 Pedro Alves <palves@redhat.com>
5751
5752 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5753 Check whether to report exec events instead of checking whether
5754 multiprocess is enabled.
5755
5756 2015-09-15 Pedro Alves <palves@redhat.com>
5757
5758 PR remote/18965
5759 * remote-utils.c (prepare_resume_reply): Merge
5760 TARGET_WAITKIND_VFORK_DONE switch case with the
5761 TARGET_WAITKIND_FORKED case.
5762
5763 2015-09-15 Yao Qi <yao.qi@linaro.org>
5764
5765 * server.c (handle_query): Check string comparison using
5766 "else if" instead of "if".
5767
5768 2015-09-15 Yao Qi <yao.qi@linaro.org>
5769
5770 * server.c (vCont_supported): New global variable.
5771 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5772 matches. Append ";vContSupported+" to own_buf.
5773 (handle_v_requests): Append ";s;S" to own_buf if target supports
5774 hardware single step or vCont_supported is false.
5775 (capture_main): Set vCont_supported to zero.
5776
5777 2015-09-15 Yao Qi <yao.qi@linaro.org>
5778
5779 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5780 it to ...
5781 (linux_supports_hardware_single_step): ... New function.
5782 (linux_target_ops): Update.
5783 * lynx-low.c (lynx_target_ops): Set field
5784 supports_hardware_single_step to target_can_do_hardware_single_step.
5785 * nto-low.c (nto_target_ops): Likewise.
5786 * spu-low.c (spu_target_ops): Likewise.
5787 * win32-low.c (win32_target_ops): Likewise.
5788 * target.c (target_can_do_hardware_single_step): New function.
5789 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5790 Remove. <supports_hardware_single_step>: New field.
5791 (target_supports_conditional_breakpoints): Remove.
5792 (target_supports_hardware_single_step): New macro.
5793 (target_can_do_hardware_single_step): Declare.
5794 * server.c (handle_query): Use target_supports_hardware_single_step
5795 instead of target_supports_conditional_breakpoints.
5796
5797 2015-09-15 Yao Qi <yao.qi@linaro.org>
5798
5799 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5800 function.
5801 (struct linux_target_ops the_low_target): Install
5802 aarch64_linux_siginfo_fixup.
5803
5804 2015-09-11 Don Breazeal <donb@codesourcery.com>
5805 Luis Machado <lgustavo@codesourcery.com>
5806
5807 * linux-low.c (linux_mourn): Static declaration.
5808 (linux_arch_setup): Move in front of
5809 handle_extended_wait.
5810 (linux_arch_setup_thread): New function.
5811 (handle_extended_wait): Handle exec events. Call
5812 linux_arch_setup_thread. Make event_lwp argument a
5813 pointer-to-a-pointer.
5814 (check_zombie_leaders): Do not check stopped threads.
5815 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5816 (linux_low_filter_event): Add lwp and thread for exec'ing
5817 non-leader thread if leader thread has been deleted.
5818 Refactor code into linux_arch_setup_thread and call it.
5819 Pass child lwp pointer by reference to handle_extended_wait.
5820 (linux_wait_for_event_filtered): Update comment.
5821 (linux_wait_1): Prevent clobbering exec event status.
5822 (linux_supports_exec_events): New function.
5823 (linux_target_ops) <supports_exec_events>: Initialize new member.
5824 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5825 new member.
5826 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5827 * server.c (report_exec_events): New global variable.
5828 (handle_query): Handle qSupported query for exec-events feature.
5829 (captured_main): Initialize report_exec_events.
5830 * server.h (report_exec_events): Declare new global variable.
5831 * target.h (struct target_ops) <supports_exec_events>: New
5832 member.
5833 (target_supports_exec_events): New macro.
5834 * win32-low.c (win32_target_ops) <supports_exec_events>:
5835 Initialize new member.
5836
5837 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5838
5839 * linux-low.c (linux_low_enable_btrace): Remove.
5840 (linux_target_ops): Replace linux_low_enable_btrace with
5841 linux_enable_btrace.
5842
5843 2015-09-03 Yao Qi <yao.qi@linaro.org>
5844
5845 * linux-aarch64-low.c (aarch64_insert_point): Call
5846 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5847 returns true.
5848
5849 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5850
5851 * linux-low.c (check_stopped_by_breakpoint): Use
5852 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5853
5854 2015-08-27 Pedro Alves <palves@redhat.com>
5855
5856 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5857
5858 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5859
5860 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5861 the XNEW-family equivalent.
5862 (compile_bytecodes): Likewise.
5863 * dll.c (loaded_dll): Likewise.
5864 * event-loop.c (append_callback_event): Likewise.
5865 (create_file_handler): Likewise.
5866 (create_file_event): Likewise.
5867 * hostio.c (handle_open): Likewise.
5868 * inferiors.c (add_thread): Likewise.
5869 (add_process): Likewise.
5870 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5871 * linux-arm-low.c (arm_new_process): Likewise.
5872 (arm_new_thread): Likewise.
5873 * linux-low.c (add_to_pid_list): Likewise.
5874 (linux_add_process): Likewise.
5875 (handle_extended_wait): Likewise.
5876 (add_lwp): Likewise.
5877 (enqueue_one_deferred_signal): Likewise.
5878 (enqueue_pending_signal): Likewise.
5879 (linux_resume_one_lwp_throw): Likewise.
5880 (linux_resume_one_thread): Likewise.
5881 (linux_read_memory): Likewise.
5882 (linux_write_memory): Likewise.
5883 * linux-mips-low.c (mips_linux_new_process): Likewise.
5884 (mips_linux_new_thread): Likewise.
5885 (mips_add_watchpoint): Likewise.
5886 * linux-x86-low.c (initialize_low_arch): Likewise.
5887 * lynx-low.c (lynx_add_process): Likewise.
5888 * mem-break.c (set_raw_breakpoint_at): Likewise.
5889 (set_breakpoint): Likewise.
5890 (add_condition_to_breakpoint): Likewise.
5891 (add_commands_to_breakpoint): Likewise.
5892 (clone_agent_expr): Likewise.
5893 (clone_one_breakpoint): Likewise.
5894 * regcache.c (new_register_cache): Likewise.
5895 * remote-utils.c (look_up_one_symbol): Likewise.
5896 * server.c (queue_stop_reply): Likewise.
5897 (start_inferior): Likewise.
5898 (queue_stop_reply_callback): Likewise.
5899 (handle_target_event): Likewise.
5900 * spu-low.c (fetch_ppc_memory): Likewise.
5901 (store_ppc_memory): Likewise.
5902 * target.c (set_target_ops): Likewise.
5903 * thread-db.c (thread_db_load_search): Likewise.
5904 (try_thread_db_load_1): Likewise.
5905 * tracepoint.c (add_tracepoint): Likewise.
5906 (add_tracepoint_action): Likewise.
5907 (create_trace_state_variable): Likewise.
5908 (cmd_qtdpsrc): Likewise.
5909 (cmd_qtro): Likewise.
5910 (add_while_stepping_state): Likewise.
5911 * win32-low.c (child_add_thread): Likewise.
5912 (get_image_name): Likewise.
5913
5914 2015-08-25 Yao Qi <yao.qi@linaro.org>
5915
5916 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5917
5918 2015-08-25 Yao Qi <yao.qi@linaro.org>
5919
5920 * Makefile.in (aarch64-linux.o): New rule.
5921 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5922 srv_tgtobj.
5923 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5924 (aarch64_init_debug_reg_state): Make it extern.
5925 (aarch64_linux_prepare_to_resume): Remove.
5926
5927 2015-08-25 Yao Qi <yao.qi@linaro.org>
5928
5929 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5930 lwp_arch_private_info and ptid_of_lwp.
5931
5932 2015-08-25 Yao Qi <yao.qi@linaro.org>
5933
5934 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5935 Find proc_info by find_process_pid. All callers updated.
5936
5937 2015-08-25 Yao Qi <yao.qi@linaro.org>
5938
5939 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5940 Remove.
5941 (debug_reg_change_callback): Remove.
5942 (aarch64_notify_debug_reg_change): Remove.
5943
5944 2015-08-25 Yao Qi <yao.qi@linaro.org>
5945
5946 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5947 Call current_lwp_ptid.
5948
5949 2015-08-25 Yao Qi <yao.qi@linaro.org>
5950
5951 * linux-aarch64-low.c (debug_reg_change_callback): Use
5952 debug_printf.
5953
5954 2015-08-25 Yao Qi <yao.qi@linaro.org>
5955
5956 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5957
5958 2015-08-25 Yao Qi <yao.qi@linaro.org>
5959
5960 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5961
5962 2015-08-25 Yao Qi <yao.qi@linaro.org>
5963
5964 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5965 the code.
5966
5967 2015-08-25 Yao Qi <yao.qi@linaro.org>
5968
5969 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5970 Remove.
5971 (debug_reg_change_callback): Remove argument entry and add argument
5972 lwp. Remove local variable thread. Don't print thread id in the
5973 debugging output. Don't check whether pid of thread equals to pid.
5974 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5975 iterate_over_lwps instead find_inferior.
5976
5977 2015-08-24 Pedro Alves <palves@redhat.com>
5978
5979 * inferiors.c (get_first_process): New function.
5980 * inferiors.h (get_first_process): New declaration.
5981 * remote-utils.c (read_ptid): Default to the first process in the
5982 list, instead of to the current thread's process.
5983
5984 2015-08-24 Pedro Alves <palves@redhat.com>
5985
5986 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5987 * event-loop.c: Likewise.
5988 * remote-utils.c: Likewise.
5989 * tracepoint.c: Likewise.
5990
5991 2015-08-24 Pedro Alves <palves@redhat.com>
5992
5993 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5994 ptid_get_lwp.
5995
5996 2015-08-21 Pedro Alves <palves@redhat.com>
5997
5998 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5999 instead of literal 1.
6000
6001 2015-08-21 Pedro Alves <palves@redhat.com>
6002
6003 * tdesc.c (default_description): Explicitly zero-initialize.
6004
6005 2015-08-21 Pedro Alves <palves@redhat.com>
6006
6007 PR gdb/18749
6008 * inferiors.c (remove_thread): Discard any pending stop reply for
6009 this thread.
6010 * server.c (remove_all_on_match_pid): Rename to ...
6011 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6012 instead of a pid.
6013 (discard_queued_stop_replies): Change parameter to a ptid. Now
6014 extern.
6015 (handle_v_kill, kill_inferior_callback, captured_main)
6016 (process_serial_event): Adjust.
6017 * server.h (discard_queued_stop_replies): Declare.
6018
6019 2015-08-21 Pedro Alves <palves@redhat.com>
6020
6021 * linux-low.c (wait_for_sigstop): Always switch to no thread
6022 selected if the previously current thread dies.
6023 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6024 process instead of the current thread's.
6025 * remote-utils.c (input_interrupt): Don't check if there's no
6026 current thread.
6027 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6028 current thread to the general thread fails, error out.
6029 (handle_qxfer_auxv, handle_qxfer_libraries)
6030 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6031 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6032 (handle_query): Check if there's a thread selected instead of
6033 checking whether there's any thread in the thread list.
6034 (handle_qxfer_threads, handle_qxfer_btrace)
6035 (handle_qxfer_btrace_conf): Don't error out early if there's no
6036 thread in the thread list.
6037 (handle_v_cont, myresume): Don't set the current thread to the
6038 continue thread.
6039 (process_serial_event) <Hg handling>: Also set thread_id if the
6040 previous general thread is still alive.
6041 (process_serial_event) <g/G handling>: If setting the current
6042 thread to the general thread fails, error out.
6043 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6044 thread's lwp instead of the current thread's.
6045 * target.c (set_desired_thread): If the desired thread was not
6046 found, leave the current thread pointing to NULL. Return an int
6047 (boolean) indicating success.
6048 * target.h (set_desired_thread): Change return type to int.
6049
6050 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6051
6052 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6053 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6054 #includes.
6055 (ps_get_thread_area): New function.
6056
6057 2015-08-19 Gary Benson <gbenson@redhat.com>
6058
6059 * hostio.c (handle_pread): Do not attempt to read more data
6060 than hostio_reply_with_data can fit in a packet.
6061
6062 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6063
6064 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6065
6066 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6067
6068 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6069
6070 2015-08-06 Pedro Alves <palves@redhat.com>
6071
6072 * tracepoint.c (expr_eval_result): Now an int.
6073
6074 2015-08-06 Pedro Alves <palves@redhat.com>
6075
6076 * gdbthread.h (struct regcache): Forward declare.
6077 (struct thread_info) <regcache_data>: Now a struct regcache
6078 pointer.
6079 * inferiors.c (inferior_regcache_data)
6080 (set_inferior_regcache_data): Now work with struct regcache
6081 pointers.
6082 * inferiors.h (struct regcache): Forward declare.
6083 (inferior_regcache_data, set_inferior_regcache_data): Now work
6084 with struct regcache pointers.
6085 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6086 (free_register_cache_thread): Remove struct regcache pointer
6087 casts.
6088
6089 2015-08-06 Pedro Alves <palves@redhat.com>
6090
6091 * server.c (captured_main): On error, print the exception message
6092 to stderr, and if run_once is set, throw a quit.
6093
6094 2015-08-06 Pedro Alves <palves@redhat.com>
6095
6096 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6097 the current thread.
6098
6099 2015-08-06 Pedro Alves <palves@redhat.com>
6100
6101 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6102 reading beyond the passed in buffer length.
6103
6104 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6105
6106 * tracepoint.c (symbol_list) <required>: Remove.
6107
6108 2015-08-06 Pedro Alves <palves@redhat.com>
6109
6110 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6111 count if stopping and suspending threads.
6112 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6113 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6114 (linux_detach): Complete an ongoing step-over.
6115 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6116 throughout.
6117 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6118 (linux_wait_1): If passing a signal to the inferior after
6119 finishing a step-over, unsuspend and re-resume all lwps. If we
6120 see a single-step event but the thread should be continuing, don't
6121 pass the trap to gdb.
6122 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6123 internal_error instead of gdb_assert.
6124 (enqueue_pending_signal): New function.
6125 (check_ptrace_stopped_lwp_gone): Add debug output.
6126 (start_step_over): Use internal_error instead of gdb_assert.
6127 (complete_ongoing_step_over): New function.
6128 (linux_resume_one_thread): Don't resume a suspended thread.
6129 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6130 it stepping.
6131
6132 2015-08-06 Pedro Alves <palves@redhat.com>
6133
6134 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6135 (linux_thread_alive): Use lwp_is_marked_dead.
6136 (extended_event_reported): Delete.
6137 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6138 instead of extended_event_reported.
6139 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6140 as well.
6141 (lwp_is_marked_dead): New function.
6142 (lwp_running): Use lwp_is_marked_dead.
6143 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6144 comment.
6145
6146 2015-08-06 Pedro Alves <palves@redhat.com>
6147
6148 * linux-low.c (linux_wait_1): Move fork event output out of the
6149 !report_to_gdb check. Pass event_child->waitstatus to
6150 target_waitstatus_to_string instead of ourstatus.
6151
6152 2015-08-04 Yao Qi <yao.qi@linaro.org>
6153
6154 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6155 if current_thread is 32 bit.
6156
6157 2015-08-04 Yao Qi <yao.qi@linaro.org>
6158
6159 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6160 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6161 * server.c (extended_protocol): Remove "static".
6162 * server.h (extended_protocol): Declare it.
6163
6164 2015-08-04 Yao Qi <yao.qi@linaro.org>
6165
6166 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6167 both aarch64 and aarch32.
6168 (aarch64_set_pc): Likewise.
6169
6170 2015-08-04 Yao Qi <yao.qi@linaro.org>
6171
6172 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6173 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6174 arm-with-neon.xml to srv_xmlfiles.
6175 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6176 (is_64bit_tdesc): New function.
6177 (aarch64_linux_read_description): New function.
6178 (aarch64_arch_setup): Call aarch64_linux_read_description.
6179 (regs_info): Rename to regs_info_aarch64.
6180 (aarch64_regs_info): Return right regs_info.
6181 (initialize_low_arch): Call initialize_low_arch_aarch32.
6182
6183 2015-08-04 Yao Qi <yao.qi@linaro.org>
6184
6185 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6186 * linux-aarch32-low.c: New file.
6187 * linux-aarch32-low.h: New file.
6188 * linux-arm-low.c (arm_fill_gregset): Move it to
6189 linux-aarch32-low.c.
6190 (arm_store_gregset): Likewise.
6191 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6192 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6193 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6194 (regs_info): Rename to regs_info_arm.
6195 (arm_regs_info): Return regs_info_aarch32 if
6196 have_ptrace_getregset is 1 and target description is
6197 arm_with_neon or arm_with_vfpv3.
6198 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6199 Call initialize_low_arch_aarch32 instead.
6200
6201 2015-08-04 Yao Qi <yao.qi@linaro.org>
6202
6203 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6204 * linux-low.c: ... here.
6205 * linux-low.h (have_ptrace_getregset): Declare it.
6206
6207 2015-08-04 Pedro Alves <palves@redhat.com>
6208
6209 * thread-db.c (struct thread_db): Use new typedefs.
6210 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6211 CHK calls.
6212 (disable_thread_event_reporting): Cast result of dlsym to
6213 destination function pointer type.
6214 (thread_db_mourn): Use td_ta_delete_ftype.
6215
6216 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6217
6218 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6219 arch variant.
6220 (CDX_BREAKPOINT): Define for R2.
6221 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6222 (the_low_target): Add comments.
6223
6224 2015-07-30 Yao Qi <yao.qi@linaro.org>
6225
6226 * linux-arm-low.c (arm_hwcap): Remove it.
6227 (arm_read_description): New local variable arm_hwcap. Don't
6228 set arm_hwcap to zero.
6229
6230 2015-07-30 Yao Qi <yao.qi@linaro.org>
6231
6232 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6233 Use regcache->tdesc instead.
6234 (arm_store_wmmxregset): Likewise.
6235 (arm_fill_vfpregset): Likewise.
6236 (arm_store_vfpregset): Likewise.
6237
6238 2015-07-30 Yao Qi <yao.qi@linaro.org>
6239
6240 * linux-arm-low.c: Include arch/arm.h.
6241 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6242 (arm_store_gregset): Likewise.
6243
6244 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6245
6246 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6247 ptrace's 4th parameter.
6248
6249 2015-07-27 Yao Qi <yao.qi@linaro.org>
6250
6251 * configure.srv (case aarch64*-*-linux*): Don't set
6252 srv_linux_usrregs.
6253
6254 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6255
6256 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6257 sys/ptrace.h.
6258 * linux-arm-low.c: Likewise.
6259 * linux-cris-low.c: Likewise.
6260 * linux-crisv32-low.c: Likewise.
6261 * linux-low.c: Likewise.
6262 * linux-m68k-low.c: Likewise.
6263 * linux-mips-low.c: Likewise.
6264 * linux-nios2-low.c: Likewise.
6265 * linux-s390-low.c: Likewise.
6266 * linux-sparc-low.c: Likewise.
6267 * linux-tic6x-low.c: Likewise.
6268 * linux-tile-low.c: Likewise.
6269 * linux-x86-low.c: Likewise.
6270
6271 2015-07-24 Pedro Alves <palves@redhat.com>
6272
6273 * config.in: Regenerate.
6274 * configure: Regenerate.
6275
6276 2015-07-24 Pedro Alves <palves@redhat.com>
6277
6278 * acinclude.m4: Include ../ptrace.m4.
6279 * configure.ac: Call GDB_AC_PTRACE.
6280 * config.in, configure: Regenerate.
6281
6282 2015-07-24 Yao Qi <yao.qi@linaro.org>
6283
6284 * linux-low.c (linux_create_inferior): Remove setting to
6285 proc->priv->new_inferior.
6286 (linux_attach): Likewise.
6287 (linux_low_filter_event): Likewise.
6288 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6289
6290 2015-07-24 Yao Qi <yao.qi@linaro.org>
6291
6292 * linux-low.c (linux_arch_setup): New function.
6293 (linux_low_filter_event): If proc->tdesc is NULL and
6294 proc->attached is true, call the_low_target.arch_setup.
6295 Otherwise, keep status pending, and return.
6296 (linux_resume_one_lwp_throw): Don't call get_pc if
6297 thread->while_stepping isn't NULL. Don't call
6298 get_thread_regcache if proc->tdesc is NULL.
6299 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6300 (linux_target_ops): Install arch_setup.
6301 * server.c (start_inferior): Call the_target->arch_setup.
6302 * target.h (struct target_ops) <arch_setup>: New field.
6303 (target_arch_setup): New marco.
6304 * lynx-low.c (lynx_target_ops): Update.
6305 * nto-low.c (nto_target_ops): Update.
6306 * spu-low.c (spu_target_ops): Update.
6307 * win32-low.c (win32_target_ops): Update.
6308
6309 2015-07-24 Yao Qi <yao.qi@linaro.org>
6310
6311 * linux-low.c (linux_add_process): Don't set
6312 proc->priv->new_inferior.
6313 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6314 (linux_attach): Likewise.
6315
6316 2015-07-24 Yao Qi <yao.qi@linaro.org>
6317
6318 * server.c (start_inferior): Code refactor.
6319
6320 2015-07-24 Yao Qi <yao.qi@linaro.org>
6321
6322 * server.c (process_serial_event): Set general_thread.
6323
6324 2015-07-21 Yao Qi <yao.qi@linaro.org>
6325
6326 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6327 aarch64_linux_get_debug_reg_capacity.
6328
6329 2015-07-17 Yao Qi <yao.qi@linaro.org>
6330
6331 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6332 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6333 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6334 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6335 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6336 (AARCH64_HWP_ALIGNMENT): Likewise.
6337 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6338 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6339 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6340 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6341 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6342 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6343 (struct aarch64_debug_reg_state): Likewise.
6344 (struct arch_lwp_info): Likewise.
6345 (aarch64_align_watchpoint): Likewise.
6346 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6347 (aarch64_watchpoint_length): Likewise.
6348 (aarch64_point_encode_ctrl_reg): Likewise
6349 (aarch64_point_is_aligned): Likewise.
6350 (aarch64_align_watchpoint): Likewise.
6351 (aarch64_linux_set_debug_regs):
6352 (aarch64_dr_state_insert_one_point): Likewise.
6353 (aarch64_dr_state_remove_one_point): Likewise.
6354 (aarch64_handle_breakpoint): Likewise.
6355 (aarch64_handle_aligned_watchpoint): Likewise.
6356 (aarch64_handle_unaligned_watchpoint): Likewise.
6357 (aarch64_handle_watchpoint): Likewise.
6358
6359 2015-07-17 Yao Qi <yao.qi@linaro.org>
6360
6361 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6362 and don't aarch64_get_debug_reg_state. All callers update.
6363 (aarch64_handle_aligned_watchpoint): Likewise.
6364 (aarch64_handle_unaligned_watchpoint): Likewise.
6365 (aarch64_handle_watchpoint): Likewise.
6366 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6367 (aarch64_remove_point): Likewise.
6368
6369 2015-07-17 Yao Qi <yao.qi@linaro.org>
6370
6371 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6372 debug_printf.
6373 (aarch64_handle_unaligned_watchpoint): Likewise.
6374
6375 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6376
6377 Revert the previous 3 commits:
6378 Move gdb_regex* to common/
6379 Move linux_find_memory_regions_full & co.
6380 gdbserver build-id attribute generator
6381
6382 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6383 Jan Kratochvil <jan.kratochvil@redhat.com>
6384
6385 gdbserver build-id attribute generator.
6386 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6387 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6388 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6389 (find_phdr): New.
6390 (get_dynamic): Use find_pdhr to traverse program headers.
6391 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6392 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6393 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6394 (get_hex_build_id): New.
6395 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6396 to reply XML document.
6397
6398 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6399 Jan Kratochvil <jan.kratochvil@redhat.com>
6400
6401 * target.c: Include target/target-utils.h and fcntl.h.
6402 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6403 (target_fileio_read_stralloc): New functions.
6404
6405 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6406
6407 * Makefile.in (OBS): Add gdb_regex.o.
6408 (gdb_regex.o): New.
6409 * config.in: Rebuilt.
6410 * configure: Rebuilt.
6411
6412 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6413 Jan Kratochvil <jan.kratochvil@redhat.com>
6414
6415 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6416 * Makefile.in (OBS): Add target-utils.o.
6417 (linux-maps.o, target-utils.o): New.
6418 * configure.srv (srv_linux_obj): Add linux-maps.o.
6419
6420 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6421
6422 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6423 function, return 1.
6424 (the_low_target): Install it.
6425
6426 2015-07-14 Pedro Alves <palves@redhat.com>
6427
6428 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6429 Instead, ignore ECHILD, and throw an error for other errnos.
6430
6431 2015-07-10 Pedro Alves <palves@redhat.com>
6432
6433 * event-loop.c (struct callback_event) <data>: Change type to
6434 gdb_client_data instance instead of gdb_client_data pointer.
6435 (append_callback_event): Adjust.
6436
6437 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6438
6439 * linux-aarch64-low.c: Add comments for each linux_target_ops
6440 method. Remove comments already covered in target_ops and
6441 linux_target_ops definitions.
6442 (the_low_target): Add comments for each unimplemented method.
6443
6444 2015-07-09 Yao Qi <yao.qi@linaro.org>
6445
6446 * linux-aarch64-low.c (aarch64_regmap): Remove.
6447 (aarch64_usrregs_info): Remove.
6448 (regs_info): Set field usrregs to NULL.
6449
6450 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6451
6452 * linux-low.c: Include "rsp-low.h"
6453 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6454 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6455 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6456 (handle_btrace_enable_pt): New.
6457 (handle_btrace_general_set): Support "pt".
6458 (handle_btrace_conf_general_set): Support "pt:size".
6459
6460 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6461
6462 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6463 Z_PACKET_SW_BP.
6464
6465 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6466
6467 * linux-aarch64-low.c: Remove comment about endianness.
6468 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6469 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6470 memcmp.
6471
6472 2015-06-24 Gary Benson <gbenson@redhat.com>
6473
6474 * linux-i386-ipa.c (stdint.h): Do not include.
6475 * lynx-i386-low.c (stdint.h): Likewise.
6476 * lynx-ppc-low.c (stdint.h): Likewise.
6477 * mem-break.c (stdint.h): Likewise.
6478 * thread-db.c (stdint.h): Likewise.
6479 * tracepoint.c (stdint.h): Likewise.
6480 * win32-low.c (stdint.h): Likewise.
6481
6482 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6483
6484 * server.c (write_qxfer_response): Update call to
6485 remote_escape_output.
6486
6487 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6488 Jan Kratochvil <jan.kratochvil@redhat.com>
6489
6490 Merge multiple hex conversions.
6491 * gdbreplay.c (tohex): Rename to 'fromhex'.
6492 (logchar): Use fromhex.
6493
6494 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6495
6496 * server.c (handle_qxfer_libraries): Set `version' attribute for
6497 <library-list>.
6498
6499 2015-06-10 Gary Benson <gbenson@redhat.com>
6500
6501 * target.h (struct target_ops) <multifs_open>: New field.
6502 <multifs_unlink>: Likewise.
6503 <multifs_readlink>: Likewise.
6504 * linux-low.c (nat/linux-namespaces.h): New include.
6505 (linux_target_ops): Initialize the_target->multifs_open,
6506 the_target->multifs_unlink and the_target->multifs_readlink.
6507 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6508 * hostio.c (hostio_fs_pid): New static variable.
6509 (hostio_handle_new_gdb_connection): New function.
6510 (handle_setfs): Likewise.
6511 (handle_open): Use the_target->multifs_open as appropriate.
6512 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6513 (handle_readlink): Use the_target->multifs_readlink as
6514 appropriate.
6515 (handle_vFile): Handle vFile:setfs packets.
6516 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6517 after target_handle_new_gdb_connection.
6518
6519 2015-06-10 Gary Benson <gbenson@redhat.com>
6520
6521 * configure.ac (AC_CHECK_FUNCS): Add setns.
6522 * config.in: Regenerate.
6523 * configure: Likewise.
6524 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6525 (linux-namespaces.o): New rule.
6526 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6527
6528 2015-06-09 Gary Benson <gbenson@redhat.com>
6529
6530 * hostio.c (handle_open): Process mode argument with
6531 fileio_to_host_mode.
6532
6533 2015-06-01 Yao Qi <yao.qi@linaro.org>
6534
6535 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6536 * linux-x86-low.c: Likewise.
6537
6538 2015-05-28 Don Breazeal <donb@codesourcery.com>
6539
6540 * linux-low.c (handle_extended_wait): Initialize
6541 thread_info.last_resume_kind for new fork children.
6542
6543 2015-05-15 Pedro Alves <palves@redhat.com>
6544
6545 * target.h (target_handle_new_gdb_connection): Rewrite using if
6546 wrapped in do/while.
6547
6548 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6549
6550 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6551 * configure, config.in: Regenerate.
6552 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6553 Declare typedef.
6554
6555 2015-05-12 Don Breazeal <donb@codesourcery.com>
6556
6557 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6558 PTRACE_EVENT_VFORK_DONE.
6559 (linux_low_ptrace_options, extended_event_reported): Add vfork
6560 events.
6561 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6562 and "vforkdone" for RSP 'T' Stop Reply Packet.
6563 * server.h (report_vfork_events): Declare
6564 global variable.
6565
6566 2015-05-12 Don Breazeal <donb@codesourcery.com>
6567
6568 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6569 (the_low_target) <new_fork>: Initialize new member.
6570 * linux-arm-low.c (arm_new_fork): New function.
6571 (the_low_target) <new_fork>: Initialize new member.
6572 * linux-low.c (handle_extended_wait): Call new target function
6573 new_fork.
6574 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6575 * linux-mips-low.c (mips_add_watchpoint): New function
6576 extracted from mips_insert_point.
6577 (the_low_target) <new_fork>: Initialize new member.
6578 (mips_linux_new_fork): New function.
6579 (mips_insert_point): Call mips_add_watchpoint.
6580 * linux-x86-low.c (x86_linux_new_fork): New function.
6581 (the_low_target) <new_fork>: Initialize new member.
6582
6583 2015-05-12 Don Breazeal <donb@codesourcery.com>
6584
6585 * linux-low.c (handle_extended_wait): Implement return value,
6586 rename argument 'event_child' to 'event_lwp', handle
6587 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6588 (linux_low_ptrace_options): New function.
6589 (linux_low_filter_event): Call linux_low_ptrace_options,
6590 use different argument fo linux_enable_event_reporting,
6591 use return value from handle_extended_wait.
6592 (extended_event_reported): New function.
6593 (linux_wait_1): Call extended_event_reported and set
6594 status to report fork events.
6595 (linux_write_memory): Add pid to debug message.
6596 (reset_lwp_ptrace_options_callback): New function.
6597 (linux_handle_new_gdb_connection): New function.
6598 (linux_target_ops): Initialize new structure member.
6599 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6600 * lynx-low.c: Initialize new structure member.
6601 * remote-utils.c (prepare_resume_reply): Implement stop reason
6602 "fork" for "T" stop message.
6603 * server.c (handle_query): Call handle_new_gdb_connection.
6604 * server.h (report_fork_events): Declare global flag.
6605 * target.h (struct target_ops) <handle_new_gdb_connection>:
6606 New member.
6607 (target_handle_new_gdb_connection): New macro.
6608 * win32-low.c: Initialize new structure member.
6609
6610 2015-05-12 Don Breazeal <donb@codesourcery.com>
6611
6612 * mem-break.c (APPEND_TO_LIST): Define macro.
6613 (clone_agent_expr): New function.
6614 (clone_one_breakpoint): New function.
6615 (clone_all_breakpoints): New function.
6616 * mem-break.h: Declare new functions.
6617
6618 2015-05-12 Don Breazeal <donb@codesourcery.com>
6619
6620 * linux-low.c (linux_supports_fork_events): New function.
6621 (linux_supports_vfork_events): New function.
6622 (linux_target_ops): Initialize new structure members.
6623 (initialize_low): Call linux_check_ptrace_features.
6624 * lynx-low.c (lynx_target_ops): Initialize new structure
6625 members.
6626 * server.c (report_fork_events, report_vfork_events):
6627 New global flags.
6628 (handle_query): Add new features to qSupported packet and
6629 response.
6630 (captured_main): Initialize new global variables.
6631 * target.h (struct target_ops) <supports_fork_events>:
6632 New member.
6633 <supports_vfork_events>: New member.
6634 (target_supports_fork_events): New macro.
6635 (target_supports_vfork_events): New macro.
6636 * win32-low.c (win32_target_ops): Initialize new structure
6637 members.
6638
6639 2015-05-12 Gary Benson <gbenson@redhat.com>
6640
6641 * server.c (handle_qxfer_exec_file): Use current process
6642 if annex is empty.
6643
6644 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6645
6646 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6647 Remove HAVE_PTRACE_GETREGS conditionals.
6648 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6649 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6650
6651 2015-05-08 Yao Qi <yao.qi@linaro.org>
6652
6653 * linux-low.c (linux_supports_conditional_breakpoints): New
6654 function.
6655 (linux_target_ops): Install new target method.
6656 * lynx-low.c (lynx_target_ops): Install NULL hook for
6657 supports_conditional_breakpoints.
6658 * nto-low.c (nto_target_ops): Likewise.
6659 * spu-low.c (spu_target_ops): Likewise.
6660 * win32-low.c (win32_target_ops): Likewise.
6661 * server.c (handle_query): Check
6662 target_supports_conditional_breakpoints.
6663 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6664 New field.
6665 (target_supports_conditional_breakpoints): New macro.
6666
6667 2015-05-06 Pedro Alves <palves@redhat.com>
6668
6669 PR server/18081
6670 * server.c (start_inferior): If the process exits, mourn it.
6671
6672 2015-04-21 Gary Benson <gbenson@redhat.com>
6673
6674 * hostio.c (fileio_open_flags_to_host): Factored out to
6675 fileio_to_host_openflags in common/fileio.c. Single use
6676 updated.
6677
6678 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6679
6680 * linux-xtensa-low.c (xtensa_fill_gregset)
6681 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6682 XCHAL_HAVE_LOOP.
6683
6684 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6685
6686 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6687 (regs_info): Replace usrregs pointer with NULL.
6688
6689 2015-04-17 Gary Benson <gbenson@redhat.com>
6690
6691 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6692 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6693 * server.c (handle_qxfer_exec_file): New function.
6694 (qxfer_packets): Add exec-file entry.
6695 (handle_query): Report qXfer:exec-file:read as supported packet.
6696
6697 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6698
6699 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6700
6701 2015-04-09 Gary Benson <gbenson@redhat.com>
6702
6703 * hostio-errno.c (errno_to_fileio_error): Remove function.
6704 Update caller to use remote_fileio_to_fio_error.
6705
6706 2015-04-09 Yao Qi <yao.qi@linaro.org>
6707
6708 * linux-low.c (linux_insert_point): Call
6709 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6710 (linux_remove_point): Call remove_memory_breakpoint if type is
6711 raw_bkpt_type_sw.
6712 * linux-x86-low.c (x86_insert_point): Don't call
6713 insert_memory_breakpoint.
6714 (x86_remove_point): Don't call remove_memory_breakpoint.
6715
6716 2015-04-01 Pedro Alves <palves@redhat.com>
6717 Cleber Rosa <crosa@redhat.com>
6718
6719 * server.c (gdbserver_usage): Reorganize and extend the usage
6720 message.
6721
6722 2015-03-24 Pedro Alves <palves@redhat.com>
6723
6724 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6725 output. Also dump TRAP_TRACE.
6726 (linux_low_filter_event): In debug output, distinguish a
6727 resume_stop SIGSTOP from a delayed SIGSTOP.
6728
6729 2015-03-24 Gary Benson <gbenson@redhat.com>
6730
6731 * linux-x86-low.c (x86_linux_new_thread): Moved to
6732 nat/x86-linux.c.
6733 (x86_linux_prepare_to_resume): Likewise.
6734
6735 2015-03-24 Gary Benson <gbenson@redhat.com>
6736
6737 * Makefile.in (x86-linux-dregs.o): New rule.
6738 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6739 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6740 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6741 (x86_linux_dr_get): Likewise.
6742 (x86_linux_dr_set): Likewise.
6743 (update_debug_registers_callback): Likewise.
6744 (x86_linux_dr_set_addr): Likewise.
6745 (x86_linux_dr_get_addr): Likewise.
6746 (x86_linux_dr_set_control): Likewise.
6747 (x86_linux_dr_get_control): Likewise.
6748 (x86_linux_dr_get_status): Likewise.
6749 (x86_linux_update_debug_registers): Likewise.
6750
6751 2015-03-24 Gary Benson <gbenson@redhat.com>
6752
6753 * linux-x86-low.c (x86_linux_update_debug_registers):
6754 New function, factored out from...
6755 (x86_linux_prepare_to_resume): ...this.
6756
6757 2015-03-24 Gary Benson <gbenson@redhat.com>
6758
6759 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6760 (x86_linux_dr_set): Likewise.
6761 (update_debug_registers_callback): Likewise.
6762 (x86_linux_dr_set_addr): Likewise.
6763 (x86_linux_dr_get_addr): Likewise.
6764 (x86_linux_dr_set_control): Likewise.
6765 (x86_linux_dr_get_control): Likewise.
6766 (x86_linux_dr_get_status): Likewise.
6767 (x86_linux_prepare_to_resume): Likewise.
6768
6769 2015-03-24 Gary Benson <gbenson@redhat.com>
6770
6771 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6772 Use perror_with_name. Pass string through gettext.
6773 (x86_linux_dr_set): Likewise.
6774
6775 2015-03-24 Gary Benson <gbenson@redhat.com>
6776
6777 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6778 (x86_linux_dr_set_addr): ...this.
6779 (x86_dr_low_get_addr): Rename to...
6780 (x86_linux_dr_get_addr): ...this.
6781 (x86_dr_low_set_control): Rename to...
6782 (x86_linux_dr_set_control): ...this.
6783 (x86_dr_low_get_control): Rename to...
6784 (x86_linux_dr_get_control): ...this.
6785 (x86_dr_low_get_status): Rename to...
6786 (x86_linux_dr_get_status): ...this.
6787 (x86_dr_low): Update with new function names.
6788
6789 2015-03-24 Gary Benson <gbenson@redhat.com>
6790
6791 * Makefile.in (x86-linux.o): New rule.
6792 * configure.srv: Add x86-linux.o to relevant targets.
6793 * linux-low.c (lwp_set_arch_private_info): New function.
6794 (lwp_arch_private_info): Likewise.
6795 * linux-x86-low.c: Include nat/x86-linux.h.
6796 (arch_lwp_info): Removed structure.
6797 (update_debug_registers_callback):
6798 Use lwp_set_debug_registers_changed.
6799 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6800 and lwp_set_debug_registers_changed.
6801 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6802
6803 2015-03-24 Gary Benson <gbenson@redhat.com>
6804
6805 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6806 * linux-arm-low.c (arm_new_thread): Likewise.
6807 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6808 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6809 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6810 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6811
6812 2015-03-24 Gary Benson <gbenson@redhat.com>
6813
6814 * linux-low.c (ptid_of_lwp): New function.
6815 (lwp_is_stopped): Likewise.
6816 (lwp_stop_reason): Likewise.
6817 * linux-x86-low.c (update_debug_registers_callback):
6818 Use lwp_is_stopped.
6819 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6820 lwp_stop_reason.
6821
6822 2015-03-24 Gary Benson <gbenson@redhat.com>
6823
6824 * linux-low.h (linux_stop_lwp): Remove declaration.
6825
6826 2015-03-24 Gary Benson <gbenson@redhat.com>
6827
6828 * linux-low.h: Include nat/linux-nat.h.
6829 * linux-low.c (iterate_over_lwps_args): New structure.
6830 (iterate_over_lwps_filter): New function.
6831 (iterate_over_lwps): Likewise.
6832 * linux-x86-low.c (update_debug_registers_callback):
6833 Update signature to what iterate_over_lwps expects.
6834 Remove PID check that iterate_over_lwps now performs.
6835 (x86_dr_low_set_addr): Use iterate_over_lwps.
6836 (x86_dr_low_set_control): Likewise.
6837
6838 2015-03-24 Gary Benson <gbenson@redhat.com>
6839
6840 * linux-x86-low.c (x86_debug_reg_state): New function.
6841 (x86_linux_prepare_to_resume): Use the above.
6842
6843 2015-03-24 Gary Benson <gbenson@redhat.com>
6844
6845 * linux-low.c (current_lwp_ptid): New function.
6846 * linux-x86-low.c: Include nat/linux-nat.h.
6847 (x86_dr_low_get_addr): Use current_lwp_ptid.
6848 (x86_dr_low_get_control): Likewise.
6849 (x86_dr_low_get_status): Likewise.
6850
6851 2015-03-20 Pedro Alves <palves@redhat.com>
6852
6853 * tracepoint.c (cmd_qtstatus): Make "str" const.
6854
6855 2015-03-20 Pedro Alves <palves@redhat.com>
6856
6857 * server.c (handle_general_set): Make "req_str" const.
6858
6859 2015-03-19 Pedro Alves <palves@redhat.com>
6860
6861 * linux-low.c (linux_resume_one_lwp): Rename to ...
6862 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6863 instead call perror_with_name.
6864 (check_ptrace_stopped_lwp_gone): New function.
6865 (linux_resume_one_lwp): Reimplement as wrapper around
6866 linux_resume_one_lwp_throw that swallows errors if the LWP is
6867 gone.
6868
6869 2015-03-19 Pedro Alves <palves@redhat.com>
6870
6871 * linux-low.c (count_events_callback, select_event_lwp_callback):
6872 No longer check whether the thread has resume_stop as last resume
6873 kind.
6874
6875 2015-03-19 Pedro Alves <palves@redhat.com>
6876
6877 * linux-low.c (count_events_callback, select_event_lwp_callback):
6878 Use the lwp's status_pending_p field, not the thread's.
6879
6880 2015-03-19 Pedro Alves <palves@redhat.com>
6881
6882 * linux-low.c (select_event_lwp_callback): Update comments to
6883 no longer mention SIGTRAP.
6884
6885 2015-03-18 Gary Benson <gbenson@redhat.com>
6886
6887 * server.c (handle_query): Do not report vFile:fstat as supported.
6888
6889 2015-03-11 Gary Benson <gbenson@redhat.com>
6890
6891 * hostio.c (sys/types.h): New include.
6892 (sys/stat.h): Likewise.
6893 (common-remote-fileio.h): Likewise.
6894 (handle_fstat): New function.
6895 (handle_vFile): Handle vFile:fstat packets.
6896
6897 2015-03-11 Gary Benson <gbenson@redhat.com>
6898
6899 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6900 struct stat.st_blocks and struct stat.st_blksize.
6901 * configure: Regenerate.
6902 * config.in: Likewise.
6903 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6904 (OBS): Add common-remote-fileio.o.
6905 (common-remote-fileio.o): New rule.
6906
6907 2015-03-09 Pedro Alves <palves@redhat.com>
6908
6909 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6910 'struct sockaddr' pointer in 'accept' call.
6911
6912 2015-03-09 Pedro Alves <palves@redhat.com>
6913
6914 Revert:
6915 2015-03-07 Pedro Alves <palves@redhat.com>
6916 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6917 or <winsock2.h> here. Instead include "gdb_socket.h".
6918 (remote_open): Use union gdb_sockaddr_u.
6919 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6920 or <winsock2.h> here. Instead include "gdb_socket.h".
6921 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6922 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6923 or <sys/un.h>.
6924 (init_named_socket, gdb_agent_helper_thread): Use union
6925 gdb_sockaddr_u.
6926
6927 2015-03-07 Pedro Alves <palves@redhat.com>
6928
6929 * configure.ac (build_warnings): Move
6930 -Wdeclaration-after-statement to the C-specific set.
6931 * configure: Regenerate.
6932
6933 2015-03-07 Pedro Alves <palves@redhat.com>
6934
6935 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6936 or <winsock2.h> here. Instead include "gdb_socket.h".
6937 (remote_open): Use union gdb_sockaddr_u.
6938 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6939 or <winsock2.h> here. Instead include "gdb_socket.h".
6940 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6941 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6942 or <sys/un.h>.
6943 (init_named_socket, gdb_agent_helper_thread): Use union
6944 gdb_sockaddr_u.
6945
6946 2015-03-07 Pedro Alves <palves@redhat.com>
6947
6948 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6949 instead.
6950
6951 2015-03-06 Yao Qi <yao.qi@linaro.org>
6952
6953 * linux-aarch64-low.c (aarch64_insert_point): Use
6954 show_debug_regs as a boolean.
6955 (aarch64_remove_point): Likewise.
6956
6957 2015-03-05 Pedro Alves <palves@redhat.com>
6958
6959 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6960 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6961 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6962 * nto-low.c (nto_target_ops): Likewise.
6963 * spu-low.c (spu_target_ops): Likewise.
6964 * win32-low.c (win32_target_ops): Likewise.
6965
6966 2015-03-04 Pedro Alves <palves@redhat.com>
6967
6968 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6969 Decide whether a breakpoint triggered based on the SIGTRAP's
6970 siginfo.si_code.
6971 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6972 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6973 (linux_low_filter_event): Check for breakpoints before checking
6974 watchpoints.
6975 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6976 siginfo.si_code.
6977 (linux_stopped_by_sw_breakpoint)
6978 (linux_supports_stopped_by_sw_breakpoint)
6979 (linux_stopped_by_hw_breakpoint)
6980 (linux_supports_stopped_by_hw_breakpoint): New functions.
6981 (linux_target_ops): Install new target methods.
6982
6983 2015-03-04 Pedro Alves <palves@redhat.com>
6984
6985 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6986 * server.c (swbreak_feature, hwbreak_feature): New globals.
6987 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6988 (captured_main): Clear swbreak_feature and hwbreak_feature.
6989 * server.h (swbreak_feature, hwbreak_feature): Declare.
6990 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6991 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6992 supports_stopped_by_hw_breakpoint>: New fields.
6993 (target_supports_stopped_by_sw_breakpoint)
6994 (target_stopped_by_sw_breakpoint)
6995 (target_supports_stopped_by_hw_breakpoint)
6996 (target_stopped_by_hw_breakpoint): Declare.
6997
6998 2015-03-04 Pedro Alves <palves@redhat.com>
6999
7000 enum lwp_stop_reason -> enum target_stop_reason
7001 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7002 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7003 (linux_wait_1, stuck_in_jump_pad_callback)
7004 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7005 (linux_stopped_by_watchpoint):
7006 * linux-low.h (enum lwp_stop_reason): Delete.
7007 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7008 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7009
7010 2015-03-04 Yao Qi <yao.qi@linaro.org>
7011
7012 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7013
7014 2015-03-03 Gary Benson <gbenson@redhat.com>
7015
7016 * hostio.c (handle_vFile): Fix prefix lengths.
7017
7018 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7019
7020 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7021 ptr_bits.
7022
7023 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7024
7025 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7026 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7027 (clean): Add "rm -f" for above C files.
7028 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7029 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7030 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7031 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7032 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7033 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7034 (init_registers_s390x_vx_linux64)
7035 (init_registers_s390x_tevx_linux64)
7036 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7037 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7038 declarations.
7039 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7040 (s390_store_vxrs_high): New functions.
7041 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7042 NT_S390_VXRS_HIGH.
7043 (s390_arch_setup): Add logic for selecting one of the new target
7044 descriptions. Activate the new vector regsets if applicable.
7045 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7046 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7047 and init_registers_s390x_tevx_linux64.
7048
7049 2015-03-01 Pedro Alves <palves@redhat.com>
7050
7051 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7052 parameter.
7053
7054 2015-02-27 Pedro Alves <palves@redhat.com>
7055
7056 * linux-x86-low.c (u_debugreg_offset): New function.
7057 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7058
7059 2015-02-27 Pedro Alves <palves@redhat.com>
7060
7061 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7062 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7063 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7064 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7065 (ps_lsetfpregs, ps_getpid)
7066 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7067 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7068 (ps_lsetxregs, ps_plog): Declare.
7069
7070 2015-02-27 Pedro Alves <palves@redhat.com>
7071
7072 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7073 IP_AGENT_EXPORT_FUNC.
7074 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7075 IP_AGENT_EXPORT_FUNC.
7076 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7077 (IP_AGENT_EXPORT): Delete.
7078 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7079 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7080 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7081 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7082 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7083 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7084 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7085 (traceframe_read_count, traceframe_write_count)
7086 (traceframes_created, trace_state_variables, get_raw_reg)
7087 (get_trace_state_variable_value, set_trace_state_variable_value)
7088 (ust_loaded, helper_thread_id, cmd_buf): Use
7089 IPA_SYM_EXPORTED_NAME.
7090 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7091 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7092 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7093 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7094 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7095 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7096 EXTERN_C_PUSH/EXTERN_C_POP.
7097 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7098 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7099 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7100 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7101 (traceframe_write_count, traceframe_read_count)
7102 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7103 (about_to_request_buffer_space, get_trace_state_variable_value)
7104 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7105 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7106 EXTERN_C_PUSH/EXTERN_C_POP.
7107 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7108 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7109 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7110 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7111 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7112 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7113 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7114 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7115 Define.
7116 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7117 (IP_AGENT_EXPORT_VAR_DECL): Define.
7118 (tracing): Declare.
7119 (gdb_agent_get_raw_reg): Declare.
7120
7121 2015-02-27 Tom Tromey <tromey@redhat.com>
7122 Pedro Alves <palves@redhat.com>
7123
7124 Rename symbols whose names are reserved C++ keywords throughout.
7125
7126 2015-02-27 Pedro Alves <palves@redhat.com>
7127
7128 * Makefile.in (COMPILER): New, get it from autoconf.
7129 (CXX): Get from autoconf instead.
7130 (COMPILE.pre): Use COMPILER.
7131 (CC-LD): Rename to ...
7132 (CC_LD): ... this. Use COMPILER.
7133 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7134 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7135 * acinclude.m4: Include build-with-cxx.m4.
7136 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7137 Disable -Werror by default if building in C++ mode.
7138 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7139 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7140 the C++ compiler. Save/restore CXXFLAGS too.
7141 * configure: Regenerate.
7142
7143 2015-02-27 Pedro Alves <palves@redhat.com>
7144
7145 * acinclude.m4: Include libiberty.m4.
7146 * configure.ac: Call libiberty_INIT.
7147 * config.in, configure: Regenerate.
7148
7149 2015-02-26 Pedro Alves <palves@redhat.com>
7150
7151 * linux-low.c (linux_wait_1): When incrementing the PC past a
7152 program breakpoint always use the_low_target.breakpoint_len as
7153 increment, rather than the maximum between that and
7154 the_low_target.decr_pc_after_break.
7155
7156 2015-02-23 Pedro Alves <palves@redhat.com>
7157
7158 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7159 thread was doing a step-over; always adjust the PC if
7160 we stepped over a permanent breakpoint.
7161 (linux_wait_1): If we stepped over breakpoint that was on top of a
7162 permanent breakpoint, manually advance the PC past it.
7163
7164 2015-02-23 Pedro Alves <palves@redhat.com>
7165
7166 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7167 modes.
7168 (x86_fill_gregset, x86_store_gregset): Use it when handling
7169 $orig_eax.
7170
7171 2015-02-20 Pedro Alves <palves@redhat.com>
7172
7173 * thread-db.c: Include "nat/linux-procfs.h".
7174 (thread_db_init): Skip listing new threads if the kernel supports
7175 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7176
7177 2015-02-20 Pedro Alves <palves@redhat.com>
7178
7179 * linux-low.c (status_pending_p_callback): Use ptid_match.
7180
7181 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7182
7183 PR breakpoints/16812
7184 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7185 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7186 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7187
7188 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7189
7190 PR breakpoints/15956
7191 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7192
7193 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7194
7195 * linux-low.c (linux_low_btrace_conf): Print size.
7196 * server.c (handle_btrace_conf_general_set): New.
7197 (hanle_general_set): Call handle_btrace_conf_general_set.
7198 (handle_query): Report Qbtrace-conf:bts:size as supported.
7199
7200 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7201
7202 * linux-low.c (linux_low_enable_btrace): Update parameters.
7203 (linux_low_btrace_conf): New.
7204 (linux_target_ops)<to_btrace_conf>: Initialize.
7205 * server.c (current_btrace_conf): New.
7206 (handle_btrace_enable): Rename to ...
7207 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7208 to target_enable_btrace. Update comment. Update users.
7209 (handle_qxfer_btrace_conf): New.
7210 (qxfer_packets): Add btrace-conf entry.
7211 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7212 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7213 (target_ops)<read_btrace_conf>: New.
7214 (target_enable_btrace): Update parameters.
7215 (target_read_btrace_conf): New.
7216
7217 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7218
7219 * server.c (handle_btrace_general_set): Remove call to
7220 target_supports_btrace.
7221 (supported_btrace_packets): New.
7222 (handle_query): Call supported_btrace_packets.
7223 * target.h: include btrace-common.h.
7224 (btrace_target_info): Removed.
7225 (supports_btrace, target_supports_btrace): Update parameters.
7226
7227 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7228
7229 * Makefile.in (SFILES): Add common/btrace-common.c.
7230 (OBS): Add common/btrace-common.o.
7231 (btrace-common.o): Add build rules.
7232 * linux-low: Include btrace-common.h.
7233 (linux_low_read_btrace): Use struct btrace_data. Call
7234 btrace_data_init and btrace_data_fini.
7235
7236 2015-02-06 Pedro Alves <palves@redhat.com>
7237
7238 * thread-db.c (find_new_threads_callback): Add debug output.
7239
7240 2015-02-04 Pedro Alves <palves@redhat.com>
7241
7242 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7243 (resume_stopped_resumed_lwps): New function.
7244 (linux_wait_for_event_filtered): Use it.
7245
7246 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7247
7248 * Makefile.in (SFILES): Add linux-personality.c.
7249 (linux-personality.o): New rule.
7250 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7251 list of objects to be built.
7252 * linux-low.c: Include nat/linux-personality.h.
7253 (linux_create_inferior): Remove code to disable address space
7254 randomization (moved to ../nat/linux-personality.c). Create
7255 cleanup to disable address space randomization.
7256
7257 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7258
7259 * Makefile.in (posix-strerror.o): New rule.
7260 (mingw-strerror.o): Likewise.
7261 * configure: Regenerated.
7262 * configure.ac: Source file ../common/common.host. Initialize new
7263 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7264
7265 2015-01-14 Yao Qi <yao@codesourcery.com>
7266
7267 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7268 (ppc-linux.o): New rule.
7269 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7270 * configure.ac: AC_CHECK_FUNCS(getauxval).
7271 * config.in: Re-generated.
7272 * configure: Re-generated.
7273 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7274 ppc64_64bit_inferior_p
7275
7276 2015-01-14 Yao Qi <yao@codesourcery.com>
7277
7278 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7279 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7280 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7281 (PT_ORIG_R3, PT_TRAP): Likewise.
7282 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7283 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7284 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7285
7286 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7287
7288 * i387-fp.c (i387_cache_to_xsave): In look over
7289 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7290 zmmh_low_space field by use of zmmh_high_space.
7291
7292 2015-01-09 Pedro Alves <palves@redhat.com>
7293
7294 * linux-low.c (step_over_bkpt): Move higher up in the file.
7295 (handle_extended_wait): Don't store the stop_pc here.
7296 (get_stop_pc): Adjust comments and rename to ...
7297 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7298 stopped for a software breakpoint or hardware breakpoint.
7299 (thread_still_has_status_pending_p): New function.
7300 (status_pending_p_callback): Use
7301 thread_still_has_status_pending_p. If the event is no longer
7302 interesting, resume the LWP.
7303 (handle_tracepoints): Add assert.
7304 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7305 (wstatus_maybe_breakpoint): New function.
7306 (cancel_breakpoint): Delete function.
7307 (check_stopped_by_watchpoint): New function, factored out from
7308 linux_low_filter_event.
7309 (lp_status_maybe_breakpoint): Delete function.
7310 (linux_low_filter_event): Remove filter_ptid argument.
7311 Leave thread group exits pending here. Store the LWP's stop PC.
7312 Always leave events pending.
7313 (linux_wait_for_event_filtered): Pull all events out of the
7314 kernel, and leave them all pending.
7315 (count_events_callback, select_event_lwp_callback): Consider all
7316 events.
7317 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7318 (select_event_lwp): Only give preference to the stepping LWP in
7319 all-stop mode. Adjust comments.
7320 (ignore_event): New function.
7321 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7322 references to cancel_breakpoints. Adjust to renames. Also give
7323 equal priority to all LWPs that have had events in non-stop mode.
7324 If reporting a software breakpoint event, unadjust the LWP's PC.
7325 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7326 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7327 Adjust.
7328 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7329 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7330 (linux_stopped_by_watchpoint): Adjust.
7331 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7332 * linux-low.h (enum lwp_stop_reason): New.
7333 (struct lwp_info) <stop_pc>: Adjust comment.
7334 <stopped_by_watchpoint>: Delete field.
7335 <stop_reason>: New field.
7336 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7337 * mem-break.c (software_breakpoint_inserted_here)
7338 (hardware_breakpoint_inserted_here): New function.
7339 * mem-break.h (software_breakpoint_inserted_here)
7340 (hardware_breakpoint_inserted_here): Declare.
7341 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7342 (cancel_breakpoints): Delete.
7343 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7344 (upload_fast_traceframes): Remove references to
7345 cancel_breakpoints.
7346
7347 2015-01-09 Pedro Alves <palves@redhat.com>
7348
7349 * thread-db.c (find_new_threads_callback): Ignore thread if the
7350 kernel thread ID is -1.
7351
7352 2015-01-09 Pedro Alves <palves@redhat.com>
7353
7354 * linux-low.c (linux_attach_fail_reason_string): Move to
7355 nat/linux-ptrace.c, and rename.
7356 (linux_attach_lwp): Update comment.
7357 (attach_proc_task_lwp_callback): New function.
7358 (linux_attach): Adjust to rename and use
7359 linux_proc_attach_tgid_threads.
7360 (linux_attach_fail_reason_string): Delete declaration.
7361
7362 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7363
7364 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7365 * server.c (gdbserver_version): Likewise.
7366
7367 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7368
7369 * remote-utils.c: Include ctype.h.
7370 (input_interrupt): Explicitly handle the case when the char
7371 received is the NUL byte. Improve the printing of non-ASCII
7372 characters.
7373
7374 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7375
7376 * linux-low.c (linux_low_filter_event): Update call to
7377 linux_enable_event_reporting following the addition of
7378 a new parameter to that function.
7379
7380 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7381
7382 PR server/17457
7383 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7384 (AARCH64_FPCR_REGNO): Likewise.
7385 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7386 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7387 (aarch64_store_fpregset): Likewise.
7388
7389 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7390
7391 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7392 Remove FIXME comment about assumption about N.
7393
7394 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7395
7396 * configure.ac: If large-file support is disabled in GDBserver,
7397 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7398 * configure: Regenerate.
7399
7400 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7401
7402 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7403 warning upon ENODATA from ptrace.
7404 * linux-s390-low.c (s390_store_tdb): New.
7405 (s390_regsets): Add regset for NT_S390_TDB.
7406
7407 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7408
7409 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7410 without a fill_function.
7411 * linux-s390-low.c (s390_fill_last_break): Remove.
7412 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7413 (s390_arch_setup): Use regset's size instead of fill_function for
7414 loop end condition.
7415
7416 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7417
7418 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7419 the regset's store function when ptrace returned an error.
7420 * regcache.c (get_thread_regcache): Invalidate register cache
7421 before fetching inferior's registers.
7422
7423 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7424
7425 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7426 while-loop as for-loop.
7427 (regsets_store_inferior_registers): Likewise.
7428
7429 2014-11-28 Yao Qi <yao@codesourcery.com>
7430
7431 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7432 * config.in, configure: Re-generate.
7433 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7434 is defined.
7435
7436 2014-11-21 Yao Qi <yao@codesourcery.com>
7437
7438 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7439 (AC_CHECK_HEADERS): Remove malloc.h.
7440 * configure: Re-generated.
7441 * config.in: Re-generated.
7442 * server.h: Don't include alloca.h and malloc.h.
7443 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7444 Don't include malloc.h.
7445
7446 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7447
7448 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7449 corresponding ERRNO check in same block.
7450
7451 2014-11-12 Pedro Alves <palves@redhat.com>
7452
7453 * server.c (cont_thread): Update comment.
7454 (start_inferior, attach_inferior): No longer clear cont_thread.
7455 (handle_v_cont): No longer set cont_thread.
7456 (captured_main): Clear cont_thread each time a GDB connects.
7457
7458 2014-11-12 Pedro Alves <palves@redhat.com>
7459
7460 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7461 thread, and don't resume all threads if the Hc thread has exited.
7462
7463 2014-11-12 Pedro Alves <palves@redhat.com>
7464
7465 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7466 the process group instead of to a specific LWP.
7467
7468 2014-10-15 Pedro Alves <palves@redhat.com>
7469
7470 PR server/17487
7471 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7472 parameter.
7473 (arm_set_thread_context): Delete.
7474 (the_low_target): Adjust.
7475 * win32-i386-low.c (debug_registers_changed)
7476 (debug_registers_used): Delete.
7477 (update_debug_registers_callback): New function.
7478 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7479 needing to update their debug registers.
7480 (win32_get_current_dr): New function.
7481 (x86_dr_low_get_addr, x86_dr_low_get_control)
7482 (x86_dr_low_get_status): Fetch the debug register from the thread
7483 record's context.
7484 (i386_initial_stuff): Adjust.
7485 (i386_get_thread_context): Remove current_event parameter. Don't
7486 clear debug_registers_changed nor copy DR values to
7487 debug_reg_state.
7488 (i386_set_thread_context): Delete.
7489 (i386_prepare_to_resume): New function.
7490 (i386_thread_added): Mark the thread as needing to update irs
7491 debug registers.
7492 (the_low_target): Remove i386_set_thread_context and install
7493 i386_prepare_to_resume.
7494 * win32-low.c (win32_get_thread_context): Adjust.
7495 (win32_set_thread_context): Use SetThreadContext
7496 directly.
7497 (win32_prepare_to_resume): New function.
7498 (win32_require_context): New function, factored out from ...
7499 (thread_rec): ... this.
7500 (continue_one_thread): Call win32_prepare_to_resume on each thread
7501 we're about to continue.
7502 (win32_resume): Call win32_prepare_to_resume on the event thread.
7503 * win32-low.h (struct win32_thread_info)
7504 <debug_registers_changed>: New field.
7505 (struct win32_target_ops): Change prototype of set_thread_context,
7506 delete set_thread_context and add prepare_to_resume.
7507 (win32_require_context): New declaration.
7508
7509 2014-10-08 Gary Benson <gbenson@redhat.com>
7510
7511 * server.h: Do not include common-exceptions.h.
7512
7513 2014-10-08 Gary Benson <gbenson@redhat.com>
7514
7515 * server.h: Do not include cleanups.h.
7516
7517 2014-09-30 James Hogan <james.hogan@imgtec.com>
7518
7519 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7520 mips64-dsp-linux.c.
7521
7522 2014-09-23 Yao Qi <yao@codesourcery.com>
7523
7524 * linux-low.c (lp_status_maybe_breakpoint): New function.
7525 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7526 (count_events_callback): Likewise.
7527 (select_event_lwp_callback): Likewise.
7528 (cancel_breakpoints_callback): Likewise.
7529
7530 2014-09-19 Don Breazeal <donb@codesourcery.com>
7531
7532 * linux-low.c (handle_extended_wait): Call
7533 linux_ptrace_get_extended_event.
7534 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7535 linux_is_extended_waitstatus.
7536
7537 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7538
7539 * Makefile.in (CPPFLAGS): Define.
7540 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7541 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7542
7543 2014-09-16 Gary Benson <gbenson@redhat.com>
7544
7545 * inferiors.h (current_inferior): Renamed as...
7546 (current_thread): New variable. All uses updated.
7547 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7548 (maybe_move_out_of_jump_pad): Likewise.
7549 (cancel_breakpoint): Likewise.
7550 (linux_low_filter_event): Likewise.
7551 (wait_for_sigstop): Likewise.
7552 (linux_resume_one_lwp): Likewise.
7553 (need_step_over_p): Likewise.
7554 (start_step_over): Likewise.
7555 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7556 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7557 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7558 and save_inferior as saved_thread.
7559 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7560 saved_thread.
7561 (regcache_invalidate_thread): Likewise.
7562 * remote-utils.c (prepare_resume_reply): Likewise.
7563 * thread-db.c (thread_db_get_tls_address): Likewise.
7564 (disable_thread_event_reporting): Likewise.
7565 (remove_thread_event_breakpoints): Likewise.
7566 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7567 as saved_thread.
7568 * target.h (set_desired_inferior): Renamed as...
7569 (set_desired_thread): New declaration. All uses updated.
7570 * server.c (myresume): Updated comment to reference thread instead
7571 of inferior.
7572 (handle_serial_event): Likewise.
7573 (handle_target_event): Likewise.
7574
7575 2014-09-12 Tom Tromey <tromey@redhat.com>
7576 Gary Benson <gbenson@redhat.com>
7577
7578 * regcache.h: Include common-regcache.h.
7579 (regcache_read_pc): Don't declare.
7580 * regcache.c (get_thread_regcache_for_ptid): New function.
7581
7582 2014-09-11 Tom Tromey <tromey@redhat.com>
7583 Gary Benson <gbenson@redhat.com>
7584
7585 * symbol.c: New file.
7586 * Makefile.in (SFILES): Add symbol.c.
7587 (OBS): Add symbol.o.
7588
7589 2014-09-11 Gary Benson <gbenson@redhat.com>
7590
7591 * target.c (target_stop_ptid, target_continue_ptid): New
7592 functions.
7593
7594 2014-09-11 Tom Tromey <tromey@redhat.com>
7595 Gary Benson <gbenson@redhat.com>
7596
7597 * target.h: Include target/target.h.
7598 * target.c (target_read_memory, target_read_uint32)
7599 (target_write_memory): New functions.
7600
7601 2014-09-11 Gary Benson <gbenson@redhat.com>
7602
7603 * server.h (debug_hw_points): Don't declare.
7604 * server.c (debug_hw_points): Don't define. Replace all uses
7605 with show_debug_regs.
7606 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7607 all uses with show_debug_regs.
7608
7609 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7610
7611 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7612 endianness into account.
7613 (ppc_supply_ptrace_register): Likewise.
7614
7615 2014-09-03 James Hogan <james.hogan@imgtec.com>
7616
7617 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7618 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7619
7620 2014-09-03 Gary Benson <gbenson@redhat.com>
7621
7622 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7623 ALL_DEBUG_ADDRESS_REGISTERS.
7624
7625 2014-09-02 Gary Benson <gbenson@redhat.com>
7626
7627 * i386-low.h: Renamed as...
7628 * x86-low.h: New file. All type, function and variable name
7629 prefixes changed from "i386_" to "x86_". All references updated.
7630 * i386-low.c: Renamed as...
7631 * x86-low.c: New file. All type, function and variable name
7632 prefixes changed from "i386_" to "x86_". All references updated.
7633
7634 2014-09-02 Gary Benson <gbenson@redhat.com>
7635
7636 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7637 (x86_linux_new_thread): Likewise.
7638
7639 2014-08-29 Gary Benson <gbenson@redhat.com>
7640
7641 * server.h (setjmp.h): Do not include.
7642 (toplevel): Do not declare.
7643 (common-exceptions.h): Include.
7644 (cleanups.h): Likewise.
7645 * server.c (toplevel): Do not define.
7646 (exit_code): New static global.
7647 (detach_or_kill_for_exit_cleanup): New function.
7648 (main): New function. Original main renamed to...
7649 (captured_main): New function.
7650 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7651
7652 2014-08-29 Gary Benson <gbenson@redhat.com>
7653
7654 * Makefile.in (SFILES): Add common/common-exceptions.c.
7655 (OBS): Add common-exceptions.o.
7656 (common-exceptions.o): New rule.
7657 * utils.c (prepare_to_throw_exception): New function.
7658
7659 2014-08-29 Gary Benson <gbenson@redhat.com>
7660
7661 * config.in: Regenerate.
7662 * configure: Likewise.
7663
7664 2014-08-29 Gary Benson <gbenson@redhat.com>
7665
7666 * Makefile.in (SFILES): Add common/cleanups.c.
7667 (OBS): cleanups.o.
7668 (cleanups.o): New rule.
7669
7670 2014-08-29 Gary Benson <gbenson@redhat.com>
7671
7672 * utils.c (internal_vwarning): New function.
7673
7674 2014-08-28 Gary Benson <gbenson@redhat.com>
7675
7676 * utils.h (fatal): Remove declaration.
7677 * utils.c (fatal): Remove function.
7678
7679 2014-08-28 Gary Benson <gbenson@redhat.com>
7680
7681 * tracepoint.c (gdb_agent_init): Replace fatal with
7682 perror_with_name.
7683 (initialize_tracepoint): Likewise.
7684
7685 2014-08-28 Gary Benson <gbenson@redhat.com>
7686
7687 * remote-utils.c (remote_prepare): Replace fatal with error.
7688
7689 2014-08-28 Gary Benson <gbenson@redhat.com>
7690
7691 * linux-low.c (linux_async): Replace fatal with warning.
7692 Tidy up and return.
7693 (linux_start_non_stop): Return -1 if linux_async failed.
7694
7695 2014-08-28 Gary Benson <gbenson@redhat.com>
7696
7697 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7698 gdb_assert.
7699 (i386_dr_low_get_addr): Remove vague comment.
7700 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7701 gdb_assert.
7702
7703 2014-08-28 Gary Benson <gbenson@redhat.com>
7704
7705 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7706 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7707 internal_error.
7708 (linux_resume_one_lwp): Likewise.
7709 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7710 gdb_assert.
7711 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7712 with internal_error.
7713 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7714 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7715 (find_register_by_name): Replace fatal with internal_error.
7716 (find_regno): Likewise.
7717 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7718 * thread-db.c (thread_db_create_event): Likewise.
7719 (thread_db_load_search): Likewise.
7720 (try_thread_db_load_1): Likewise.
7721 * tracepoint.c (get_jump_space_head): Replace fatal with
7722 internal_error.
7723 (claim_trampoline_space): Likewise.
7724 (have_fast_tracepoint_trampoline_buffer): Likewise.
7725 (cmd_qtstart): Likewise.
7726 (stop_tracing): Likewise.
7727 (fast_tracepoint_collecting): Likewise.
7728 (target_malloc): Likewise.
7729 (download_tracepoint): Likewise.
7730 (download_trace_state_variables): Replace check with gdb_assert.
7731 (upload_fast_traceframes): Replace fatal with internal_error.
7732
7733 2014-08-19 Tom Tromey <tromey@redhat.com>
7734 Gary Benson <gbenson@redhat.com>
7735
7736 * Makefile.in (SFILES): Add common/common-debug.c.
7737 (OBS): Add common-debug.o.
7738 (common-debug.o): New rule.
7739 * debug.h (debug_printf): Don't declare.
7740 * debug.c (debug_printf): Renamed and rewritten as...
7741 (debug_vprintf): New function.
7742
7743 2014-08-19 Gary Benson <gbenson@redhat.com>
7744
7745 * utils.h: Do not include print-utils.h.
7746
7747 2014-08-19 Tom Tromey <tromey@redhat.com>
7748 Gary Benson <gbenson@redhat.com>
7749
7750 * server.h: Add static assertion.
7751 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7752
7753 2014-08-19 Tom Tromey <tromey@redhat.com>
7754 Gary Benson <gbenson@redhat.com>
7755
7756 * Makefile.in (SFILES): Add common/errors.c.
7757 (OBS): Add errors.o.
7758 (IPA_OBS): Add errors-ipa.o.
7759 (errors.o): New rule.
7760 (errors-ipa.o): Likewise.
7761 * utils.h (perror_with_name, error, warning): Don't declare.
7762 * utils.c (warning): Renamed and rewritten as...
7763 (vwarning): New function.
7764 (error): Renamed and rewritten as...
7765 (verror): New function.
7766 (internal_error): Renamed and rewritten as...
7767 (internal_verror): New function.
7768
7769 2014-08-07 Gary Benson <gbenson@redhat.com>
7770
7771 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7772 * configure: Regenerate.
7773 * config.in: Likewise.
7774 * server.h: Do not include errno.h.
7775 * event-loop.c: Likewise.
7776 * hostio-errno.c: Likewise.
7777 * linux-low.c: Likewise.
7778 * remote-utils.c: Likewise.
7779 * spu-low.c: Likewise.
7780 * utils.c: Likewise.
7781 * gdbreplay.c: Unconditionally include errno.h.
7782
7783 2014-08-07 Gary Benson <gbenson@redhat.com>
7784
7785 * server.h: Do not include string.h.
7786 * event-loop.c: Likewise.
7787 * linux-low.c: Likewise.
7788 * regcache.c: Likewise.
7789 * remote-utils.c: Likewise.
7790 * spu-low.c: Likewise.
7791 * utils.c: Likewise.
7792
7793 2014-08-07 Gary Benson <gbenson@redhat.com>
7794
7795 * server.h: Do not include gdb_assert.h.
7796
7797 2014-08-07 Gary Benson <gbenson@redhat.com>
7798
7799 * server.h: Do not include common-utils.h.
7800
7801 2014-08-07 Gary Benson <gbenson@redhat.com>
7802
7803 * server.h: Do not include ptid.h.
7804 * notif.h: Likewise.
7805
7806 2014-08-07 Gary Benson <gbenson@redhat.com>
7807
7808 * server.h: Do not include gdb_locale.h.
7809
7810 2014-08-07 Gary Benson <gbenson@redhat.com>
7811
7812 * server.h: Do not include gdb/signals.h.
7813 * win32-low.c: Likewise.
7814
7815 2014-08-07 Gary Benson <gbenson@redhat.com>
7816
7817 * server.h: Do not include pathmax.h.
7818
7819 2014-08-07 Gary Benson <gbenson@redhat.com>
7820
7821 * server.h: Do not include libiberty.h.
7822 * linux-bfin-low.c: Likewise.
7823
7824 2014-08-07 Gary Benson <gbenson@redhat.com>
7825
7826 * server.h: Do not include ansidecl.h.
7827
7828 2014-08-07 Gary Benson <gbenson@redhat.com>
7829
7830 * linux-x86-low.c: Do not include stddef.h.
7831 * lynx-ppc-low.c: Likewise.
7832 * tracepoint.c: Likewise.
7833
7834 2014-08-07 Gary Benson <gbenson@redhat.com>
7835
7836 * server.h: Do not include stdarg.h.
7837 * nto-low.c: Likewise.
7838
7839 2014-08-07 Gary Benson <gbenson@redhat.com>
7840
7841 * server.h: Do not include stdlib.h.
7842 * inferiors.c: Likewise.
7843 * linux-low.c: Likewise.
7844 * regcache.c: Likewise.
7845 * spu-low.c: Likewise.
7846 * tracepoint.c: Likewise.
7847 * utils.c: Likewise.
7848
7849 2014-08-07 Gary Benson <gbenson@redhat.com>
7850
7851 * server.h: Do not include stdio.h.
7852 * linux-low.c: Likewise.
7853 * remote-utils.c: Likewise.
7854 * spu-low.c: Likewise.
7855 * utils.c: Likewise.
7856 * wincecompat.c: Likewise.
7857
7858 2014-08-06 Gary Benson <gbenson@redhat.com>
7859
7860 * regcache.c (init_register_cache): Move conditionals inside if.
7861
7862 2014-08-06 Gary Benson <gbenson@redhat.com>
7863
7864 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7865
7866 2014-07-31 Gary Benson <gbenson@redhat.com>
7867
7868 * ax.h: Do not include server.h.
7869 * gdbthread.h: Likewise.
7870 * lynx-low.h: Likewise.
7871 * notif.h: Likewise.
7872
7873 2014-07-30 Gary Benson <gbenson@redhat.com>
7874
7875 * server.h: Include common-defs.h.
7876 Do not include config.h or build-gnulib-gdbserver/config.h.
7877
7878 2014-07-30 Gary Benson <gbenson@redhat.com>
7879
7880 * hostio-errno.c: Move server.h to top of includes list.
7881 * inferiors.c: Likewise.
7882 * linux-x86-low.c: Likewise.
7883 * notif.c: Include server.h.
7884
7885 2014-07-24 Tom Tromey <tromey@redhat.com>
7886 Gary Benson <gbenson@redhat.com>
7887
7888 * server.h (CORE_ADDR): Now unsigned.
7889
7890 2014-07-16 Pedro Alves <palves@redhat.com>
7891
7892 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7893
7894 2014-07-15 Pedro Alves <palves@redhat.com>
7895
7896 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7897 copy.
7898
7899 2014-07-11 Pedro Alves <palves@redhat.com>
7900
7901 * linux-low.c (kill_wait_lwp): New function, based on
7902 kill_one_lwp_callback, but use my_waitpid directly.
7903 (kill_one_lwp_callback, linux_kill): Use it.
7904
7905 2014-06-23 Pedro Alves <palves@redhat.com>
7906
7907 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7908 before setting DR0..DR3.
7909
7910 2014-06-20 Gary Benson <gbenson@redhat.com>
7911
7912 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7913 * configure: Regenerated.
7914 * config.in: Likewise.
7915
7916 2014-06-20 Gary Benson <gbenson@redhat.com>
7917
7918 * Makefile.in (SFILES): Update locations for files moved
7919 from common to nat.
7920 (object file files): Reordered.
7921
7922 2014-06-20 Gary Benson <gbenson@redhat.com>
7923
7924 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7925 (i386_dr_low_set_addr): Likewise.
7926 (i386_dr_low_get_addr): Likewise.
7927 (i386_dr_low_can_set_control): Likewise.
7928 (i386_dr_low_set_control): Likewise.
7929 (i386_dr_low_get_control): Likewise.
7930 (i386_dr_low_get_status): Likewise.
7931 (i386_get_debug_register_length): Likewise.
7932 * linux-x86-low.c (i386_dr_low_set_addr):
7933 Changed signature. Made static.
7934 (i386_dr_low_get_addr): Likewise.
7935 (i386_dr_low_set_control): Likewise.
7936 (i386_dr_low_get_control): Likewise.
7937 (i386_dr_low_get_status): Likewise.
7938 (i386_dr_low): New global variable.
7939 * win32-i386-low.c (i386_dr_low_set_addr):
7940 Changed signature. Made static.
7941 (i386_dr_low_get_addr): Likewise.
7942 (i386_dr_low_set_control): Likewise.
7943 (i386_dr_low_get_control): Likewise.
7944 (i386_dr_low_get_status): Likewise.
7945 (i386_dr_low): New global variable.
7946
7947 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7948
7949 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7950 * Makefile.in (AR, AR_FLAGS): Define.
7951 * configure: Regenerate.
7952
7953 2014-06-19 Gary Benson <gbenson@redhat.com>
7954
7955 * Makefile.in (i386-dregs.o): New rule.
7956 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7957 * i386-low.c (target.h): Remove include.
7958 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7959 (DR_CONTROL_SHIFT): Likewise.
7960 (DR_CONTROL_SIZE): Likewise.
7961 (DR_RW_EXECUTE): Likewise.
7962 (DR_RW_WRITE): Likewise.
7963 (DR_RW_READ): Likewise.
7964 (DR_RW_IORW): Likewise.
7965 (DR_LEN_1): Likewise.
7966 (DR_LEN_2): Likewise.
7967 (DR_LEN_4): Likewise.
7968 (DR_LEN_8): Likewise.
7969 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7970 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7971 (DR_ENABLE_SIZE): Likewise.
7972 (DR_LOCAL_SLOWDOWN): Likewise.
7973 (DR_GLOBAL_SLOWDOWN): Likewise.
7974 (DR_CONTROL_RESERVED): Likewise.
7975 (I386_DR_CONTROL_MASK): Likewise.
7976 (I386_DR_VACANT): Likewise.
7977 (I386_DR_LOCAL_ENABLE): Likewise.
7978 (I386_DR_GLOBAL_ENABLE): Likewise.
7979 (I386_DR_DISABLE): Likewise.
7980 (I386_DR_SET_RW_LEN): Likewise.
7981 (I386_DR_GET_RW_LEN): Likewise.
7982 (I386_DR_WATCH_HIT): Likewise.
7983 (i386_wp_op_t): Likewise.
7984 (i386_show_dr): Likewise.
7985 (i386_length_and_rw_bits): Likewise.
7986 (i386_insert_aligned_watchpoint): Likewise.
7987 (i386_remove_aligned_watchpoint): Likewise.
7988 (i386_handle_nonaligned_watchpoint): Likewise.
7989 i386_update_inferior_debug_regs(): Likewise.
7990 (i386_dr_insert_watchpoint): Likewise.
7991 (i386_dr_remove_watchpoint): Likewise.
7992 (i386_dr_region_ok_for_watchpoint): Likewise.
7993 (i386_dr_stopped_data_address): Likewise.
7994 (i386_dr_stopped_by_watchpoint): Likewise.
7995
7996 2014-06-19 Gary Benson <gbenson@redhat.com>
7997
7998 * i386-low.c (i386_dr_show): Renamed to
7999 i386_show_dr and made static. All uses updated.
8000 (i386_dr_length_and_rw_bits): Renamed to
8001 i386_length_and_rw_bits and made static.
8002 All uses updated.
8003 (i386_dr_insert_aligned_watchpoint): Renamed to
8004 i386_insert_aligned_watchpoint and made static.
8005 All uses updated.
8006 (i386_dr_remove_aligned_watchpoint): Renamed to
8007 i386_remove_aligned_watchpoint and made static.
8008 All uses updated.
8009 (i386_dr_update_inferior_debug_regs): Renamed to
8010 i386_update_inferior_debug_regs and made static.
8011 All uses updated.
8012
8013 2014-06-18 Gary Benson <gbenson@redhat.com>
8014
8015 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8016 (i386_dr_low_can_set_control): Likewise.
8017 (i386_get_debug_register_length): Likewise.
8018 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8019 (i386_dr_low_can_set_control): Likewise.
8020 (i386_get_debug_register_length): Likewise.
8021
8022 2014-06-17 Gary Benson <gbenson@redhat.com>
8023
8024 * i386-low.h (i386-dregs.h): New include.
8025 (DR_FIRSTADDR): Now in i386-dregs.h.
8026 (DR_LASTADDR): Likewise.
8027 (DR_NADDR): Likewise.
8028 (DR_STATUS): Likewise.
8029 (DR_CONTROL): Likewise.
8030 (i386_debug_reg_state): Likewise.
8031 (i386_dr_insert_watchpoint): Likewise.
8032 (i386_dr_remove_watchpoint): Likewise.
8033 (i386_dr_region_ok_for_watchpoint): Likewise.
8034 (i386_dr_stopped_data_address): Likewise.
8035 (i386_dr_stopped_by_watchpoint): Likewise.
8036 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8037
8038 2014-06-18 Gary Benson <gbenson@redhat.com>
8039
8040 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8041 i386_dr_insert_watchpoint.
8042 (i386_low_remove_watchpoint): Renamed to
8043 i386_dr_remove_watchpoint.
8044 (i386_low_region_ok_for_watchpoint): Renamed to
8045 i386_dr_region_ok_for_watchpoint.
8046 (i386_low_stopped_data_address): Renamed to
8047 i386_dr_stopped_data_address.
8048 (i386_low_stopped_by_watchpoint): Renamed to
8049 i386_dr_stopped_by_watchpoint.
8050 * i386-low.c (i386_show_dr): Renamed to
8051 i386_dr_show and made nonstatic. All uses updated.
8052 (i386_length_and_rw_bits): Renamed to
8053 i386_dr_length_and_rw_bits and made nonstatic.
8054 All uses updated.
8055 (i386_insert_aligned_watchpoint): Renamed to
8056 i386_dr_insert_aligned_watchpoint and made nonstatic.
8057 All uses updated.
8058 (i386_remove_aligned_watchpoint): Renamed to
8059 i386_dr_remove_aligned_watchpoint and made nonstatic.
8060 All uses updated.
8061 (i386_update_inferior_debug_regs): Renamed to
8062 i386_dr_update_inferior_debug_regs and made nonstatic.
8063 All uses updated.
8064 (i386_low_insert_watchpoint): Renamed to
8065 i386_dr_insert_watchpoint. All uses updated.
8066 (i386_low_remove_watchpoint): Renamed to
8067 i386_dr_remove_watchpoint. All uses updated.
8068 (i386_low_region_ok_for_watchpoint): Renamed to
8069 i386_dr_region_ok_for_watchpoint. All uses updated.
8070 (i386_low_stopped_data_address): Renamed to
8071 i386_dr_stopped_data_address. All uses updated.
8072 (i386_low_stopped_by_watchpoint): Renamed to
8073 i386_dr_stopped_by_watchpoint. All uses updated.
8074
8075 2014-06-18 Gary Benson <gbenson@redhat.com>
8076
8077 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8078 (i386_dr_low_can_set_control): Likewise.
8079 (i386_insert_aligned_watchpoint): New check.
8080
8081 2014-06-18 Gary Benson <gbenson@redhat.com>
8082
8083 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8084 Renamed to state.
8085
8086 2014-06-18 Gary Benson <gbenson@redhat.com>
8087
8088 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8089 instead of fatal and error.
8090 (i386_handle_nonaligned_watchpoint): Likewise.
8091
8092 2014-06-18 Gary Benson <gbenson@redhat.com>
8093
8094 * i386-low.c (i386_get_debug_register_length): New macro.
8095 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8096 (i386_show_dr): Use debug_printf instead of fprintf. Use
8097 phex to format values.
8098
8099 2014-06-18 Gary Benson <gbenson@redhat.com>
8100
8101 * i386-low.h: Comment changes.
8102 * i386-low.c: Likewise.
8103
8104 2014-06-18 Gary Benson <gbenson@redhat.com>
8105
8106 * i386-low.c: Whitespace changes.
8107
8108 2014-06-12 Tom Tromey <tromey@redhat.com>
8109
8110 * utils.c (freeargv): Remove.
8111
8112 2014-06-12 Tom Tromey <tromey@redhat.com>
8113
8114 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8115 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8116 (parse_debug_format_options): Likewise.
8117 (gdbserver_usage): Likewise.
8118 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8119 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8120 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8121 against libiberty.
8122 ($(LIBGNU)): Depend on libiberty.
8123 (all-lib): Recurse into all subdirs.
8124 (install-only): Invoke "install" target in subdirs.
8125 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8126 targets.
8127 * configure: Rebuild.
8128 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8129 for vasprintf, vsnprintf, or gettimeofday.
8130 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8131 srv_tgtobj.
8132
8133 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8134
8135 * development.sh: Delete.
8136 * Makefile.in (config.status): Adjust dependency on development.sh.
8137 * configure.ac: Adjust development.sh source call.
8138 * configure: Regenerate.
8139
8140 2014-06-02 Pedro Alves <palves@redhat.com>
8141
8142 * ax.c (gdb_free_agent_expr): New function.
8143 * ax.h (gdb_free_agent_expr): New declaration.
8144 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8145 list.
8146 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8147 static.
8148 (clear_breakpoint_conditions_and_commands): New function.
8149 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8150 (clear_breakpoint_conditions_and_commands): New declaration.
8151
8152 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8153
8154 * linux-aarch64-low.c (asm/ptrace.h): Include.
8155
8156 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8157
8158 Fix TLS access for -static -pthread.
8159 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8160 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8161 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8162
8163 2014-05-20 Pedro Alves <palves@redhat.com>
8164
8165 * linux-aarch64-low.c (aarch64_insert_point)
8166 (aarch64_remove_point): No longer check whether the type is
8167 supported here. Adjust to new interface.
8168 (the_low_target): Install aarch64_supports_z_point_type as
8169 supports_z_point_type method.
8170 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8171 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8172 instead of a Z packet char. Adjust.
8173 (arm_supports_z_point_type): New function.
8174 (arm_insert_point, arm_remove_point): Adjust to new interface.
8175 (the_low_target): Install arm_supports_z_point_type.
8176 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8177 (cris_insert_point, cris_remove_point): Adjust to new interface.
8178 Don't check whether the type is supported here.
8179 (the_low_target): Install cris_supports_z_point_type.
8180 * linux-low.c (linux_supports_z_point_type): New function.
8181 (linux_insert_point, linux_remove_point): Adjust to new interface.
8182 * linux-low.h (struct linux_target_ops) <insert_point,
8183 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8184 raw_breakpoint pointer parameter.
8185 <supports_z_point_type>: New method.
8186 * linux-mips-low.c (mips_supports_z_point_type): New function.
8187 (mips_insert_point, mips_remove_point): Adjust to new interface.
8188 Use mips_supports_z_point_type.
8189 (the_low_target): Install mips_supports_z_point_type.
8190 * linux-ppc-low.c (the_low_target): Install NULL as
8191 supports_z_point_type method.
8192 * linux-s390-low.c (the_low_target): Install NULL as
8193 supports_z_point_type method.
8194 * linux-sparc-low.c (the_low_target): Install NULL as
8195 supports_z_point_type method.
8196 * linux-x86-low.c (x86_supports_z_point_type): New function.
8197 (x86_insert_point): Adjust to new insert_point interface. Use
8198 insert_memory_breakpoint. Adjust to new
8199 i386_low_insert_watchpoint interface.
8200 (x86_remove_point): Adjust to remove_point interface. Use
8201 remove_memory_breakpoint. Adjust to new
8202 i386_low_remove_watchpoint interface.
8203 (the_low_target): Install x86_supports_z_point_type.
8204 * lynx-low.c (lynx_target_ops): Install NULL as
8205 supports_z_point_type callback.
8206 * nto-low.c (nto_supports_z_point_type): New.
8207 (nto_insert_point, nto_remove_point): Adjust to new interface.
8208 (nto_target_ops): Install nto_supports_z_point_type.
8209 * mem-break.c: Adjust intro comment.
8210 (struct raw_breakpoint) <raw_type, size>: New fields.
8211 <inserted>: Update comment.
8212 <shlib_disabled>: Delete field.
8213 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8214 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8215 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8216 (raw_bkpt_type_to_target_hw_bp_type): New function.
8217 (find_enabled_raw_code_breakpoint_at): New function.
8218 (find_raw_breakpoint_at): New type and size parameters. Use them.
8219 (insert_memory_breakpoint): New function, based off
8220 set_raw_breakpoint_at.
8221 (remove_memory_breakpoint): New function.
8222 (set_raw_breakpoint_at): Reimplement.
8223 (set_breakpoint): New, based on set_breakpoint_at.
8224 (set_breakpoint_at): Reimplement.
8225 (delete_raw_breakpoint): Go through the_target->remove_point
8226 instead of assuming memory breakpoints.
8227 (find_gdb_breakpoint_at): Delete.
8228 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8229 (find_gdb_breakpoint): New function.
8230 (set_gdb_breakpoint_at): Delete.
8231 (z_type_supported): New function.
8232 (set_gdb_breakpoint_1): New function, loosely based off
8233 set_gdb_breakpoint_at.
8234 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8235 (delete_gdb_breakpoint_at): Delete.
8236 (delete_gdb_breakpoint_1): New function, loosely based off
8237 delete_gdb_breakpoint_at.
8238 (delete_gdb_breakpoint): New function.
8239 (clear_gdb_breakpoint_conditions): Rename to ...
8240 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8241 breakpoint.
8242 (add_condition_to_breakpoint): Make static.
8243 (add_breakpoint_condition): Take a struct breakpoint pointer
8244 instead of an address. Adjust.
8245 (gdb_condition_true_at_breakpoint): Rename to ...
8246 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8247 z_type parameter.
8248 (gdb_condition_true_at_breakpoint): Reimplement.
8249 (add_breakpoint_commands): Take a struct breakpoint pointer
8250 instead of an address. Adjust.
8251 (gdb_no_commands_at_breakpoint): Rename to ...
8252 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8253 parameter. Return true if no breakpoint was found. Change debug
8254 output.
8255 (gdb_no_commands_at_breakpoint): Reimplement.
8256 (run_breakpoint_commands): Rename to ...
8257 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8258 and change return type to boolean.
8259 (run_breakpoint_commands): New function.
8260 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8261 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8262 breakpoint. Go through the_target->remove_point instead of
8263 assuming memory breakpoint.
8264 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8265 software and hardware breakpoints.
8266 (reinsert_raw_breakpoint): Go through the_target->insert_point
8267 instead of assuming memory breakpoint.
8268 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8269 software and hardware breakpoints.
8270 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8271 Check both software and hardware breakpoints.
8272 (validate_inserted_breakpoint): Assert the breakpoint is a
8273 software breakpoint. Set the inserted flag to -1 instead of
8274 setting shlib_disabled.
8275 (delete_disabled_breakpoints): Adjust.
8276 (validate_breakpoints): Only validate software breakpoints.
8277 Adjust to inserted flag change.
8278 (check_mem_read, check_mem_write): Skip breakpoint types other
8279 than software breakpoints. Adjust to inserted flag change.
8280 * mem-break.h (enum raw_bkpt_type): New enum.
8281 (raw_breakpoint, struct process_info): Forward declare.
8282 (Z_packet_to_target_hw_bp_type): Delete declaration.
8283 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8284 (set_gdb_breakpoint, delete_gdb_breakpoint)
8285 (clear_breakpoint_conditions): New declarations.
8286 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8287 (breakpoint_inserted_here): Update comment.
8288 (add_breakpoint_condition, add_breakpoint_commands): Replace
8289 address parameter with a breakpoint pointer parameter.
8290 (gdb_breakpoint_here): Update comment.
8291 (delete_gdb_breakpoint_at): Delete.
8292 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8293 * server.c (process_point_options): Take a struct breakpoint
8294 pointer instead of an address. Adjust.
8295 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8296 delete_gdb_breakpoint.
8297 * spu-low.c (spu_target_ops): Install NULL as
8298 supports_z_point_type method.
8299 * target.h: Include mem-break.h.
8300 (struct target_ops) <prepare_to_access_memory>: Update comment.
8301 <supports_z_point_type>: New field.
8302 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8303 instead of a char. Also take a raw breakpoint pointer.
8304 * win32-arm-low.c (the_low_target): Install NULL as
8305 supports_z_point_type.
8306 * win32-i386-low.c (i386_supports_z_point_type): New function.
8307 (i386_insert_point, i386_remove_point): Adjust to new interface.
8308 (the_low_target): Install i386_supports_z_point_type.
8309 * win32-low.c (win32_supports_z_point_type): New function.
8310 (win32_insert_point, win32_remove_point): Adjust to new interface.
8311 (win32_target_ops): Install win32_supports_z_point_type.
8312 * win32-low.h (struct win32_target_ops):
8313 <supports_z_point_type>: New method.
8314 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8315 instead of a char. Also take a raw breakpoint pointer.
8316
8317 2014-05-20 Pedro Alves <palves@redhat.com>
8318
8319 * mem-break.h: Include break-common.h.
8320 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8321 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8322 (Z_packet_to_target_hw_bp_type): New declaration.
8323 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8324 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8325 (Z_PACKET_ACCESS_WP): Delete macros.
8326 (Z_packet_to_hw_type): Delete function.
8327 * i386-low.h: Don't include break-common.h here.
8328 (Z_packet_to_hw_type): Delete declaration.
8329 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8330 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8331 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8332 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8333 * linux-aarch64-low.c: Don't include break-common.h here.
8334 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8335 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8336 (Z_packet_to_target_hw_bp_type): Delete function.
8337 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8338 function.
8339 (mips_insert_point, mips_remove_point): Use
8340 Z_packet_to_target_hw_bp_type.
8341
8342 2014-05-20 Pedro Alves <palves@redhat.com>
8343
8344 * linux-aarch64-low.c: Include break-common.h.
8345 (enum target_point_type): Delete.
8346 (Z_packet_to_point_type): Rename to ...
8347 (Z_packet_to_target_hw_bp_type): ... this, and return a
8348 target_hw_bp_type instead.
8349 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8350 instead of an enum target_point_type.
8351 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8352 breakpoint type.
8353 (aarch64_dr_state_insert_one_point)
8354 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8355 (aarch64_handle_aligned_watchpoint)
8356 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8357 Take an enum target_hw_bp_type instead of an enum
8358 target_point_type.
8359 (aarch64_supports_z_point_type): New function.
8360 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8361 use Z_packet_to_target_hw_bp_type.
8362
8363 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8364
8365 * configure.ac: Only use -Werror by default when DEVELOPMENT
8366 is true.
8367 * configure: Regenerate.
8368
8369 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8370
8371 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8372 * linux-x86-low.c (X86_64_USER_REGS): New.
8373 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8374
8375 2014-04-28 Yao Qi <yao@codesourcery.com>
8376
8377 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8378 name.
8379
8380 2014-04-25 Pedro Alves <palves@redhat.com>
8381
8382 PR server/16255
8383 * linux-low.c (linux_attach_fail_reason_string): New function.
8384 (linux_attach_lwp): Delete.
8385 (linux_attach_lwp_1): Rename to ...
8386 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8387 argument. Remove "initial" parameter. Return int instead of
8388 void. Don't error or warn here.
8389 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8390 failure to attach to the tgid. Call warning when failing to
8391 attach to an lwp.
8392 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8393 argument. Remove "initial" parameter. Return int instead of
8394 void. Don't error or warn here.
8395 (linux_attach_fail_reason_string): New declaration.
8396 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8397 interface change. Use linux_attach_fail_reason_string.
8398
8399 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8400 Walfred Tedeschi <walfred.tedeschi@intel.com>
8401
8402 * Makefile.in: Added rules to handle new files
8403 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8404 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8405 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8406 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8407 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8408 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8409 x32-avx512-linux.o.
8410 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8411 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8412 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8413 i386/x32-avx512.xml.
8414 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8415 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8416 i386/x32-avx512-linux.xml.
8417 * i387-fp.c (num_avx512_k_registers): New constant for number
8418 of K registers.
8419 (num_avx512_zmmh_low_registers): New constant for number of
8420 lower ZMM registers (0-15).
8421 (num_avx512_zmmh_high_registers): New constant for number of
8422 higher ZMM registers (16-31).
8423 (num_avx512_ymmh_registers): New contant for number of higher
8424 YMM registers (ymm16-31 added by avx521 on x86_64).
8425 (num_avx512_xmm_registers): New constant for number of higher
8426 XMM registers (xmm16-31 added by AVX512 on x86_64).
8427 (struct i387_xsave): Add space for AVX512 registers.
8428 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8429 Add code to handle AVX512 registers.
8430 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8431 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8432 prototypei from generated file.
8433 (tdesc_amd64_avx512_linux): Likewise.
8434 (init_registers_x32_avx512_linux): Likewise.
8435 (tdesc_x32_avx512_linux): Likewise.
8436 (init_registers_i386_avx512_linux): Likewise.
8437 (tdesc_i386_avx512_linux): Likewise.
8438 (x86_64_regmap): Add AVX512 registers.
8439 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8440 mask.
8441 (initialize_low_arch): Add code to initialize AVX512 registers.
8442
8443 2014-04-23 Pedro Alves <palves@redhat.com>
8444
8445 * mem-break.c (find_gdb_breakpoint_at): Make static.
8446 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8447
8448 2014-04-23 Pedro Alves <palves@redhat.com>
8449
8450 * i386-low.c: Don't include break-common.h here.
8451 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8452 prototype to take target_hw_bp_type as argument instead of a Z
8453 packet char.
8454 * i386-low.h: Include break-common.h here.
8455 (Z_packet_to_hw_type): Declare.
8456 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8457 prototypes.
8458 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8459 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8460 (x86_remove_point): Convert the packet number to a
8461 target_hw_bp_type before calling i386_low_remove_watchpoint.
8462 * win32-i386-low.c (i386_insert_point): Convert the packet number
8463 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8464 (i386_remove_point): Convert the packet number to a
8465 target_hw_bp_type before calling i386_low_remove_watchpoint.
8466
8467 2014-04-23 Pedro Alves <palves@redhat.com>
8468
8469 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8470
8471 2014-04-10 Pedro Alves <palves@redhat.com>
8472
8473 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8474 Check if the condition or command is NULL before checking if the
8475 breakpoint is known. On success, return true.
8476 * mem-break.h (add_breakpoint_condition): Document return.
8477 (add_breakpoint_commands): Add describing comment.
8478 * server.c (skip_to_semicolon): New function.
8479 (process_point_options): Use it.
8480
8481 2014-04-09 Pedro Alves <palves@redhat.com>
8482
8483 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8484 to lwpid_of.
8485
8486 2014-02-27 Pedro Alves <palves@redhat.com>
8487
8488 PR 12702
8489 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8490 macros.
8491 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8492 output.
8493 (last_thread_of_process_p): Take a PID argument instead of a
8494 thread pointer.
8495 (linux_wait_for_lwp): Delete.
8496 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8497 functions.
8498 (linux_low_filter_event): New function, party factored out from
8499 linux_wait_for_event.
8500 (linux_wait_for_event): Rename to ...
8501 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8502 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8503 sigsuspend. Check for zombie leaders.
8504 (linux_wait_for_event): Reimplement as wrapper around
8505 linux_wait_for_event_filtered.
8506 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8507 a normal or signal exit is seen, it's the whole process exiting.
8508 (wait_for_sigstop): No longer a for_each_inferior callback.
8509 Rewrite on top of linux_wait_for_event_filtered.
8510 (stop_all_lwps): Call wait_for_sigstop directly.
8511 * server.c (resume, handle_target_event): Handle
8512 TARGET_WAITKIND_NO_RESUMED.
8513
8514 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8515
8516 * win32-low.c (psapi_get_dll_name,
8517 * win32_CreateToolhelp32Snapshot): Delete.
8518 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8519 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8520 Delete.
8521 (handle_load_dll): Add function description.
8522 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8523
8524 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8525
8526 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8527 Add comment.
8528 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8529 base address when calling win32_add_one_solib.
8530 (handle_load_dll): Delete local variable load_addr.
8531 Remove 0x1000 offset applied to DLL base address when calling
8532 win32_add_one_solib.
8533 (handle_unload_dll): Add comment.
8534
8535 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8536
8537 * win32-low.c (win32_add_all_dlls): Renames
8538 win32_ensure_ntdll_loaded. Rewrite function documentation.
8539 Adjust implementation to always load all DLLs.
8540 Add 0x1000 offset to DLL base address when calling
8541 win32_add_one_solib.
8542 (child_initialization_done): New static global.
8543 (do_initial_child_stuff): Set child_initialization_done to
8544 zero during child initialization, and 1 after. Replace call
8545 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8546 Add comment.
8547 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8548 (handle_unload_dll): Add function documentation.
8549 (get_child_debug_event): Ignore load and unload DLL events
8550 during child initialization.
8551
8552 2014-02-20 Doug Evans <dje@google.com>
8553
8554 Remove global all_lwps.
8555 * inferiors.h (ptid_of): Move here from linux-low.h.
8556 (pid_of, lwpid_of): Ditto.
8557 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8558 parameter is a struct thread_info * now.
8559 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8560 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8561 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8562 directly.
8563 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8564 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8565 * linux-arm-low.c (update_registers_callback): Update, "entry"
8566 parameter is a struct thread_info * now.
8567 Fetch lwpid from current_inferior directly.
8568 (arm_insert_point): Pass &all_threads to find_inferior instead of
8569 &all_lwps.
8570 (arm_remove_point): Ditto.
8571 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8572 (arm_prepare_to_resume): Fetch pid from thread.
8573 (arm_read_description): Fetch lwpid from current_inferior directly.
8574 * linux-low.c (all_lwps): Delete.
8575 (delete_lwp): Delete call to remove_inferior.
8576 (handle_extended_wait): Fetch lwpid from thread.
8577 (add_lwp): Don't set lwp->entry.id. Remove call to
8578 add_inferior_to_list.
8579 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8580 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8581 (kill_one_lwp_callback): Ditto.
8582 (linux_kill): Don't dereference NULL pointer.
8583 Fetch ptid,lwpid from thread.
8584 (get_detach_signal): Fetch ptid from thread.
8585 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8586 Simplify call to regcache_invalidate_thread.
8587 (delete_lwp_callback): Update, "entry" parameter is a
8588 struct thread_info * now. Fetch pid from thread.
8589 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8590 (status_pending_p_callback): Update, "entry" parameter is a
8591 struct thread_info * now. Fetch ptid from thread.
8592 (find_lwp_pid): Update, "entry" parameter is a
8593 struct thread_info * now.
8594 (linux_wait_for_lwp): Fetch pid from thread.
8595 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8596 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8597 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8598 (dequeue_one_deferred_signal): Ditto.
8599 (cancel_breakpoint): Fetch ptid from current_inferior.
8600 (linux_wait_for_event): Pass &all_threads to find_inferior,
8601 not &all_lwps. Fetch ptid, lwpid from thread.
8602 (count_events_callback): Update, "entry" parameter is a
8603 struct thread_info * now.
8604 (select_singlestep_lwp_callback): Ditto.
8605 (select_event_lwp_callback): Ditto.
8606 (cancel_breakpoints_callback): Ditto.
8607 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8608 not &all_lwps.
8609 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8610 (unsuspend_one_lwp): Update, "entry" parameter is a
8611 struct thread_info * now.
8612 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8613 not &all_lwps.
8614 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8615 Fetch lwpid from thread, not lwp.
8616 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8617 Pass &all_threads to find_inferior, not &all_lwps.
8618 (send_sigstop): Fetch lwpid from thread, not lwp.
8619 (send_sigstop_callback): Update, "entry" parameter is a
8620 struct thread_info * now.
8621 (suspend_and_send_sigstop_callback): Ditto.
8622 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8623 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8624 struct thread_info * now.
8625 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8626 from thread, lwp.
8627 (lwp_running): Update, "entry" parameter is a
8628 struct thread_info * now.
8629 (stop_all_lwps): Fetch ptid from thread.
8630 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8631 (linux_resume_one_lwp): Fetch lwpid from thread.
8632 (linux_set_resume_request): Update, "entry" parameter is a
8633 struct thread_info * now. Fetch pid, lwpid from thread.
8634 (resume_status_pending_p): Update, "entry" parameter is a
8635 struct thread_info * now.
8636 (need_step_over_p): Ditto. Fetch lwpid from thread.
8637 (start_step_over): Fetch lwpid from thread.
8638 (linux_resume_one_thread): Update, "entry" parameter is a
8639 struct thread_info * now. Fetch lwpid from thread.
8640 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8641 (proceed_one_lwp): Update, "entry" parameter is a
8642 struct thread_info * now. Fetch lwpid from thread.
8643 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8644 struct thread_info * now.
8645 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8646 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8647 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8648 directly.
8649 (regsets_store_inferior_registers): Ditto.
8650 (fetch_register, store_register): Ditto.
8651 (linux_read_memory, linux_write_memory): Ditto.
8652 (linux_request_interrupt): Ditto.
8653 (linux_read_auxv): Ditto.
8654 (linux_xfer_siginfo): Ditto.
8655 (linux_qxfer_spu): Ditto.
8656 (linux_qxfer_libraries_svr4): Ditto.
8657 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8658 moved to inferiors.h.
8659 (get_lwp): Delete.
8660 (get_thread_lwp): Update.
8661 (struct lwp_info): Delete member "entry". Simplify comment for
8662 member "thread".
8663 (all_lwps): Delete.
8664 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8665 current_inferior directly.
8666 (update_watch_registers_callback): Update, "entry" parameter is a
8667 struct thread_info * now. Fetch pid from thread.
8668 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8669 (mips_insert_point): Fetch lwpid from current_inferior.
8670 Pass &all_threads to find_inferior, not &all_lwps.
8671 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8672 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8673 directly.
8674 (mips_stopped_data_address): Ditto.
8675 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8676 directly.
8677 * linux-tile-low.c (tile_arch_setup): Ditto.
8678 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8679 (update_debug_registers_callback): Update, "entry" parameter is a
8680 struct thread_info * now. Fetch pid from thread.
8681 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8682 Pass &all_threads to find_inferior, not &all_lwps.
8683 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8684 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8685 Pass &all_threads to find_inferior, not &all_lwps.
8686 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8687 (i386_dr_low_get_status): Ditto.
8688 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8689 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8690 (x86_linux_read_description): Ditto.
8691 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8692
8693 2014-02-20 Doug Evans <dje@google.com>
8694
8695 * inferiors.c (get_first_inferior): Fix buglet.
8696
8697 2014-02-19 Doug Evans <dje@google.com>
8698
8699 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8700 * inferiors.c (add_thread): Change result type to struct thread_info *.
8701 All callers updated.
8702 (add_lwp): Call add_thread here instead of in callers.
8703 All callers updated.
8704 * linux-low.h (get_lwp_thread): Rewrite.
8705 (struct lwp_info): New member "thread".
8706
8707 2014-02-19 Doug Evans <dje@google.com>
8708
8709 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8710 All callers updated.
8711
8712 2014-02-19 Doug Evans <dje@google.com>
8713
8714 * inferiors.c (add_thread): Fix whitespace.
8715
8716 2014-02-19 Doug Evans <dje@google.com>
8717
8718 * dll.c (clear_dlls): Replace accessing list implemention details
8719 with API function.
8720 * gdbthread.h (get_first_thread): Declare.
8721 * inferiors.c (for_each_inferior_with_data): New function.
8722 (get_first_thread): New function.
8723 (find_thread_ptid): Simplify.
8724 (get_first_inferior): New function.
8725 (clear_list): Delete.
8726 (one_inferior_p): New function.
8727 (clear_inferior_list): New function.
8728 (clear_inferiors): Update.
8729 * inferiors.h (for_each_inferior_with_data): Declare.
8730 (clear_inferior_list): Declare.
8731 (one_inferior_p): Declare.
8732 (get_first_inferior): Declare.
8733 * linux-low.c (linux_wait_for_event): Replace accessing list
8734 implemention details with API function.
8735 * server.c (target_running): Ditto.
8736 (accumulate_file_name_length): New function.
8737 (emit_dll_description): New function.
8738 (handle_qxfer_libraries): Replace accessing list implemention
8739 details with API function.
8740 (handle_qxfer_threads_worker): New function.
8741 (handle_qxfer_threads_proper): Replace accessing list implemention
8742 details with API function.
8743 (handle_query): Ditto.
8744 (visit_actioned_threads_callback_ftype): New typedef.
8745 (visit_actioned_threads_data): New struct.
8746 (visit_actioned_threads): Rewrite to be find_inferior callback.
8747 (resume): Call find_inferior.
8748 (handle_status): Replace accessing list implemention
8749 details with API function.
8750 (process_serial_event): Replace accessing list implemention details
8751 with API function.
8752 * target.c (set_desired_inferior): Replace accessing list implemention
8753 details with API function.
8754 * tracepoint.c (same_process_p): New function.
8755 (gdb_agent_about_to_close): Replace accessing list implemention
8756 details with API function.
8757 * win32-low.c (child_delete_thread): Replace accessing list
8758 implemention details with API function.
8759 (match_dll_by_basename): New function.
8760 (dll_is_loaded_by_basename): New function.
8761 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8762 details call to dll_is_loaded_by_basename.
8763
8764 2014-02-19 Doug Evans <dje@google.com>
8765
8766 * dll.h (struct dll_info): Add comment.
8767 * gdbthread.h (struct thread_info): Add comment.
8768 (current_ptid): Simplify.
8769 * inferiors.c (add_process): Update.
8770 (remove_process): Update.
8771 * inferiors.h (struct process_info): Rename member "head" to "entry".
8772 * linux-low.c (delete_lwp): Update.
8773 (add_lwp): Update.
8774 (last_thread_of_process_p): Update.
8775 (kill_one_lwp_callback, linux_kill): Update.
8776 (status_pending_p_callback): Update.
8777 (wait_for_sigstop): Update. Simplify read of ptid.
8778 (start_step_over): Update.
8779 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8780 (get_lwp_thread): Update.
8781 (struct lwp_info): Rename member "head" to "entry".
8782 * regcache.h (inferior_list_entry): Delete.
8783 * server.c (kill_inferior_callback): Update.
8784 (detach_or_kill_inferior_callback): Update.
8785 (print_started_pid): Update.
8786 (print_attached_pid): Update.
8787 (process_serial_event): Simplify read of ptid.
8788 * thread-db.c (thread_db_create_event): Update.
8789 (thread_db_get_tls_address): Update.
8790 * win32-low.c (current_inferior_ptid): Simplify.
8791
8792 2014-02-19 Tom Tromey <tromey@redhat.com>
8793
8794 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8795 argument.
8796 (target_supports_btrace): Update.
8797
8798 2014-02-14 Yao Qi <yao@codesourcery.com>
8799
8800 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8801 (rsp-low-ipa.o): New target.
8802
8803 2014-02-12 Tom Tromey <tromey@redhat.com>
8804
8805 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8806 convert_ascii_to_int.
8807 * regcache.c (registers_to_string): Likewise.
8808 * remote-utils.c (decode_M_packet): Likewise.
8809 * server.c (process_serial_event): Likewise.
8810
8811 2014-02-12 Tom Tromey <tromey@redhat.com>
8812
8813 * server.c (handle_query, handle_v_run): Use hex2bin, not
8814 unhexify.
8815 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8816
8817 2014-02-12 Tom Tromey <tromey@redhat.com>
8818
8819 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8820 convert_int_to_ascii.
8821 * regcache.c (registers_to_string, collect_register_as_string):
8822 Likewise.
8823 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8824 Likewise.
8825 * server.c (process_serial_event): Likewise.
8826 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8827 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8828
8829 2014-02-12 Tom Tromey <tromey@redhat.com>
8830
8831 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8832 bin2hex, not hexify.
8833 * tracepoint.c (cmd_qtstatus): Likewise.
8834
8835 2014-02-12 Tom Tromey <tromey@redhat.com>
8836
8837 * remote-utils.c (monitor_output): Pass explicit length to
8838 hexify.
8839
8840 2014-02-12 Tom Tromey <tromey@redhat.com>
8841
8842 * tracepoint.c: Include rsp-low.h.
8843 * server.c: Include rsp-low.h.
8844 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8845 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8846 declare.
8847 * remote-utils.c: Include rsp-low.h.
8848 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8849 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8850 (convert_int_to_ascii, convert_ascii_to_int): Move to
8851 common/rsp-low.c.
8852 * regcache.c: Include rsp-low.h.
8853 * ax.c: Include rsp-low.h.
8854 * Makefile.in (SFILES): Add common/rsp-low.c.
8855 (OBS): Add rsp-low.o.
8856 (rsp-low.o): New target.
8857
8858 2014-02-12 Tom Tromey <tromey@redhat.com>
8859
8860 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8861 Include print-utils.h.
8862 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8863 (plongest, thirty_two, phex_nz): Remove.
8864 * Makefile.in (SFILES): Add common/print-utils.c.
8865 (OBS): Add print-utils.o.
8866 (print-utils-ipa.o): New target.
8867 (print-utils.o): New target.
8868 (IPA_OBJS): Add print-utils-ipa.o.
8869
8870 2014-02-06 Tom Tromey <tromey@redhat.com>
8871
8872 * Makefile.in (SFILES): Fix indentation.
8873
8874 2014-02-05 Doug Evans <dje@google.com>
8875
8876 * linux-low.c (linux_wait_for_event): Improve comment.
8877 (linux_wait_1): Keep current_inferior in sync with event_child.
8878
8879 2014-01-22 Doug Evans <dje@google.com>
8880
8881 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8882
8883 2014-01-22 Doug Evans <dje@google.com>
8884
8885 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8886 * configure: Regenerate.
8887 * config.in: Regenerate.
8888 * Makefile.in (SFILES): Add debug.c.
8889 (OBS): Add debug.o.
8890 * debug.c: New file.
8891 * debug.h: New file.
8892 * linux-aarch64-low.c (*): Update all debugging printfs to use
8893 debug_printf instead of fprintf.
8894 * linux-arm-low.c (*): Ditto.
8895 * linux-cris-low.c (*): Ditto.
8896 * linux-crisv32-low.c (*): Ditto.
8897 * linux-m32r-low.c (*): Ditto.
8898 * linux-sparc-low.c (*): Ditto.
8899 * linux-x86.c (*): Ditto.
8900 * linux-low.c (*): Ditto.
8901 (linux_wait_1): Add calls to debug_enter, debug_exit.
8902 (linux_wait): Remove redundant debugging printf.
8903 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8904 (linux_resume, unstop_all_lwps): Ditto.
8905 * mem-break.c (*): Update all debugging printfs to use
8906 debug_printf instead of fprintf.
8907 * remote-utils.c (*): Ditto.
8908 * thread-db.c (*): Ditto.
8909 * server.c #include <ctype.h>, "gdb_vecs.h".
8910 (debug_threads): Moved to debug.c.
8911 (*): Update all debugging printfs to use debug_printf instead of
8912 fprintf.
8913 (start_inferior): Replace call to fflush with call to debug_flush.
8914 (monitor_show_help): Mention set debug-format.
8915 (parse_debug_format_options): New function.
8916 (handle_monitor_command): Handle "monitor set debug-format".
8917 (gdbserver_usage): Mention --debug-format.
8918 (main): Parse --debug-format.
8919 * server.h (debug_threads): Declaration moved to debug.h.
8920 #include "debug.h".
8921 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8922 trace_debug_1 that uses debug_printf.
8923 (tracepoint_look_up_symbols): Update all debugging printfs to use
8924 debug_printf instead of fprintf.
8925
8926 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8927
8928 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8929 sys/ptrace.h.
8930
8931 2014-01-17 Pedro Alves <palves@redhat.com>
8932
8933 PR build/16445
8934 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8935 defined after including gdb_proc_service.h.
8936
8937 2014-01-16 Doug Evans <dje@google.com>
8938
8939 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8940 (match_dll): Use it.
8941
8942 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8943
8944 * target.h (target_ops) <read_btrace>: Change parameters and
8945 return type to allow error reporting.
8946 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8947 trace reading errors on.
8948 * linux-low.c (linux_low_read_btrace): Pass trace reading
8949 errors on.
8950 (linux_low_disable_btrace): New.
8951
8952 2014-01-15 Doug Evans <dje@google.com>
8953
8954 * inferiors.c (thread_id_to_gdb_id): Delete.
8955 * inferiors.h (thread_id_to_gdb_id): Delete.
8956
8957 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8958
8959 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8960 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8961 versions.
8962
8963 2014-01-08 Pedro Alves <palves@redhat.com>
8964
8965 * server.c (handle_status): Don't discard previous queued stop
8966 replies or thread's pending status here.
8967 (main) <disconnection>: Do it here instead.
8968
8969 2014-01-08 Pedro Alves <palves@redhat.com>
8970
8971 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8972 * server.c (visit_actioned_threads, handle_pending_status): New
8973 function.
8974 (handle_v_cont): Factor out parts to ...
8975 (resume): ... this new function. If in all-stop, and a thread
8976 being resumed has a pending status, report it without actually
8977 resuming.
8978 (myresume): Adjust to use the new 'resume' function.
8979 (clear_pending_status_callback, set_pending_status_callback)
8980 (find_status_pending_thread_callback): New functions.
8981 (handle_status): Handle the case of multiple threads having
8982 interesting statuses to report. Report threads' real last signal
8983 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8984 with an interesting thread to report the status for, instead of
8985 always reporting the status of the first thread.
8986
8987 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8988
8989 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8990 * gdbreplay.c (gdbreplay_version): Likewise.
8991
8992 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8993
8994 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8995 iov.iov_len with the real length in use.
8996
8997 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8998
8999 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9000 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9001 for all targets that use win32-low.c.
9002 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9003 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9004
9005 2013-12-13 Pedro Alves <palves@redhat.com>
9006
9007 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9008 if equal to TARGET_WAITKIND_LOADED.
9009 * win32-low.c (cached_status): New static global.
9010 (win32_wait): Add declaration.
9011 (do_initial_child_stuff): Flush all initial pending debug events
9012 up to the initial breakpoint.
9013 (win32_wait): If CACHED_STATUS was set, return that instead
9014 of doing a real wait. Remove the code resuming the execution
9015 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9016 during the initial phase. Also remove the code changing
9017 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9018 TARGET_WAITKIND_STOPPED.
9019
9020 2013-12-11 Yao Qi <yao@codesourcery.com>
9021
9022 * notif.c (handle_notif_ack): Return 0 if no notification
9023 matches.
9024
9025 2013-11-20 Doug Evans <dje@google.com>
9026
9027 * linux-low.c (linux_set_resume_request): Fix comment.
9028
9029 2013-11-20 Doug Evans <dje@google.com>
9030
9031 * linux-low.c (resume_status_pending_p): Tweak comment.
9032
9033 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9034
9035 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9036 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9037 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9038 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9039 (srv_amd64_regobj): Add amd64-mpx.o.
9040 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9041 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9042 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9043 * i387-fp.c (num_pl_bnd_register) Added constant.
9044 (num_pl_bnd_cfg_registers) Added constant.
9045 (struct i387_xsave) Added reserved area and MPX fields.
9046 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9047 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9048 function.
9049 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9050 (init_registers_amd64_mpx_linux): Declare new function.
9051 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9052 (x86_64_regmap): Add MPX registers.
9053 (x86_linux_read_description): Add MPX case.
9054 (initialize_low_arch): Initialize MPX targets.
9055
9056 2013-11-18 Tom Tromey <tromey@redhat.com>
9057
9058 * configure: Rebuild.
9059 * configure.ac: Don't check for stdlib.h.
9060 * gdbreplay.c: Unconditionally include stdlib.h.
9061
9062 2013-11-18 Tom Tromey <tromey@redhat.com>
9063
9064 * config.in: Rebuild.
9065 * configure: Rebuild.
9066 * configure.ac: Don't use AC_HEADER_DIRENT.
9067
9068 2013-11-18 Tom Tromey <tromey@redhat.com>
9069
9070 * server.h: Don't check HAVE_STRING_H.
9071 * gdbreplay.c: Don't check HAVE_STRING_H.
9072 * configure: Rebuild.
9073
9074 2013-11-18 Tom Tromey <tromey@redhat.com>
9075
9076 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9077 LIBGNU.
9078
9079 2013-11-08 Tom Tromey <tromey@redhat.com>
9080
9081 * configure, config.in: Rebuild.
9082 * configure.ac: Remove unused configury.
9083
9084 2013-11-08 Tom Tromey <tromey@redhat.com>
9085
9086 * acinclude.m4: Include common.m4, codeset.m4.
9087 * configure, config.in: Rebuild.
9088 * configure.ac: Use GDB_AC_COMMON.
9089
9090 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9091
9092 * linux-s390-low.c (HWCAP_S390_TE): New define.
9093 (s390_arch_setup): Consider the TE field in the HWCAP for
9094 determining 'have_regset_tdb'.
9095
9096 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9097
9098 PR gdb/16014
9099 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9100 call to sizeof.
9101
9102 2013-10-02 Pedro Alves <palves@redhat.com>
9103
9104 * server.c (process_serial_event): Don't output "GDBserver
9105 exiting" if GDB is connected through stdio.
9106 * target.c (mywait): Likewise, be silent if GDB is connected
9107 through stdio.
9108
9109 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9110
9111 * lynx-low.c (lynx_add_threads_after_attach): New function.
9112 (lynx_attach): Remove call to add_thread. Add call to
9113 lynx_add_threads_after_attach instead.
9114
9115 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9116
9117 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9118 * config.in, configure: Regenerated.
9119
9120 2013-09-18 Yao Qi <yao@codesourcery.com>
9121
9122 PR server/15959
9123 * server.c (start_inferior): Clear 'resume_info'.
9124
9125 2013-09-16 Jiong Wang <jiwang@tilera.com>
9126
9127 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9128 for each register.
9129
9130 2013-09-16 Jiong Wang <jiwang@tilera.com>
9131
9132 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9133 linux-tile-low.o to srv_tgtobj.
9134
9135 2013-09-16 Will Newton <will.newton@linaro.org>
9136
9137 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9138 out regs.
9139
9140 2013-09-06 Pedro Alves <palves@redhat.com>
9141
9142 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9143 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9144 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9145 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9146 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9147 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9148
9149 2013-09-06 Pedro Alves <palves@redhat.com>
9150
9151 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9152 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9153
9154 2013-09-06 Pedro Alves <palves@redhat.com>
9155
9156 * linux-amd64-ipa.c: Include tracepoint.h.
9157 * linux-i386-ipa.c: Include tracepoint.h.
9158
9159 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9160
9161 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9162 (ps_get_thread_area): New function.
9163
9164 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9165
9166 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9167 (initialize_low_arch): Call init_registers_crisv32 rather than
9168 init_register_crisv32.
9169
9170 2013-09-05 Pedro Alves <palves@redhat.com>
9171
9172 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9173 to ...
9174 * hostio.h: ... this new file.
9175 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9176 win32-low.c: Include hostio.h.
9177
9178 2013-09-05 Pedro Alves <palves@redhat.com>
9179
9180 * server.h (gdb_client_data, handler_func, callback_handler_func)
9181 (delete_file_handler, add_file_handler, append_callback_event)
9182 (delete_callback_event, start_event_loop, initialize_event_loop):
9183 Move to event-loop.h and include it.
9184 * event-loop.h: New file.
9185
9186 2013-09-05 Pedro Alves <palves@redhat.com>
9187
9188 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9189 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9190 (loaded_dll, unloaded_dll): Move to ...
9191 * dll.h: ... this new file.
9192 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9193
9194 2013-09-05 Pedro Alves <palves@redhat.com>
9195
9196 * server.h (current_process, get_thread_process, all_processes)
9197 (add_inferior_to_list, for_each_inferior, current_inferior)
9198 (remove_inferior, add_process, remove_process, find_process_pid)
9199 (have_started_inferiors_p, have_attached_inferiors_p)
9200 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9201 (clear_inferiors, find_inferior, find_inferior_id)
9202 (inferior_target_data, set_inferior_target_data)
9203 (inferior_regcache_data, set_inferior_regcache_data): Move to
9204 inferiors.h, and include it.
9205 * inferiors.h: New file.
9206
9207 2013-09-05 Pedro Alves <palves@redhat.com>
9208
9209 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9210 Move ...
9211 * ax.h: ... here.
9212
9213 2013-09-05 Pedro Alves <palves@redhat.com>
9214
9215 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9216 tracepoint.h.
9217 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9218 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9219 (handle_tracepoint_general_set, handle_tracepoint_query)
9220 (tracepoint_finished_step, tracepoint_was_hit)
9221 (release_while_stepping_state_list, current_traceframe)
9222 (in_readonly_region, traceframe_read_mem)
9223 (fetch_traceframe_registers, traceframe_read_sdata)
9224 (traceframe_read_info, struct fast_tpoint_collect_status)
9225 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9226 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9227 (supply_fast_tracepoint_registers)
9228 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9229 (ipa_tdesc, claim_trampoline_space)
9230 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9231 (agent_mem_read, agent_get_trace_state_variable_value)
9232 (agent_set_trace_state_variable_value, agent_tsv_read)
9233 (agent_mem_read_string, get_raw_reg_func_addr)
9234 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9235 * tracepoint.h: ... this new file.
9236
9237 2013-09-05 Pedro Alves <palves@redhat.com>
9238
9239 * server.h (perror_with_name, error, fatal, warning, paddress)
9240 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9241 include it.
9242 * utils.h: New file.
9243
9244 2013-09-05 Pedro Alves <palves@redhat.com>
9245
9246 * server.h (remote_debug, noack_mode, transport_is_reliable)
9247 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9248 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9249 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9250 (write_enn, initialize_async_io, enable_async_io)
9251 (disable_async_io, check_remote_input_interrupt_request)
9252 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9253 (dead_thread_notify, prepare_resume_reply)
9254 (decode_address_to_semicolon, decode_address, decode_m_packet)
9255 (decode_M_packet, decode_X_packet, decode_xfer_write)
9256 (decode_search_memory_packet, unhexify, hexify)
9257 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9258 (look_up_one_symbol, relocate_instruction)
9259 (monitor_output): Move to remote-utils.h, and include it.
9260 * remote-utils.h: New file.
9261
9262 2013-09-05 Pedro Alves <palves@redhat.com>
9263
9264 * server.h (_): Delete.
9265
9266 2013-09-02 Pedro Alves <palves@redhat.com>
9267
9268 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9269 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9270 allocated.
9271 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9272
9273 2013-09-02 Pierre Muller <muller@sourceware.org>
9274
9275 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9276 or WriteProcessMemory complete successfully and handle
9277 ERROR_PARTIAL_COPY error.
9278
9279 2013-09-02 Pedro Alves <palves@redhat.com>
9280
9281 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9282 error instead of EIO.
9283
9284 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9285
9286 PR server/15604
9287 * linux-low.c: Include filestuff.h.
9288 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9289 * lynx-low.c: Include filestuff.h.
9290 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9291 * server.c: Include filestuff.h.
9292 (main): Call notice_open_fds.
9293 * spu-low.c: Include filestuff.h.
9294 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9295
9296 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9297
9298 * Makefile.in: Explain why ../target and ../nat are not
9299 listed as include file search paths.
9300 (linux-waitpid.o): New object file rule.
9301 * configure.srv (srv_native_linux_obj): New variable.
9302 Replace all occurrences of linux native object files with
9303 $srv_native_linux_obj.
9304 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9305 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9306 (linux_enable_event_reporting): Remove declaration.
9307 (my_waitpid): Moved to common/linux-waitpid.c.
9308 (linux_wait_for_event): Pass ptid when calling
9309 linux_enable_event_reporting.
9310 (linux_supports_tracefork_flag): Remove.
9311 (linux_enable_event_reporting): Likewise.
9312 (linux_tracefork_grandchild): Remove.
9313 (STACK_SIZE): Moved to common/linux-ptrace.c.
9314 (linux_tracefork_child): Remove.
9315 (linux_test_for_tracefork): Remove.
9316 (linux_look_up_symbols): Call linux_supports_traceclone.
9317 (initialize_low): Remove call to linux_test_for_tracefork.
9318 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9319 common/linux-ptrace.h.
9320 (PTRACE_TYPE_ARG4): Likewise.
9321 Include linux-ptrace.h.
9322
9323 2013-08-21 Pedro Alves <palves@redhat.com>
9324
9325 * config.in: Renegerate.
9326
9327 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9328
9329 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9330 (SFILES): Remove $(srcdir)/common/target-common.c and
9331 add $(srcdir)/target/waitstatus.c.
9332 (OBS): Remove target-common.o and add waitstatus.o.
9333 (server_h): Remove $(srcdir)/../common/target-common.h and
9334 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9335 and $(srcdir)/../target/waitstatus.h.
9336 (target-common.o): Remove.
9337 (waitstatus.o): New target object file.
9338 * target.h: Do not include target-common.h and
9339 include target/resume.h, target/wait.h and
9340 target/waitstatus.h.
9341
9342 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9343
9344 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9345 to PTRACE_TYPE_ARG3.
9346 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9347 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9348 PTRACE_TYPE_ARG4.
9349 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9350 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9351
9352 2013-07-27 Jie Zhang <jie@codesourcery.com>
9353 Daniel Jacobowitz <dan@codesourcery.com>
9354 Yao Qi <yao@codesourcery.com>
9355
9356 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9357 (mips-linux-watch.o): New rule.
9358 (mips_linux_watch_h): New variable.
9359 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9360 srv_tgtobj.
9361 * linux-mips-low.c: Include mips-linux-watch.h.
9362 (struct arch_process_info, struct arch_lwp_info): New.
9363 (update_watch_registers_callback): New function.
9364 (mips_linux_new_process, mips_linux_new_thread) New functions.
9365 (mips_linux_prepare_to_resume, mips_insert_point): New
9366 functions.
9367 (mips_remove_point, mips_stopped_by_watchpoint): New
9368 functions.
9369 (rsp_bp_type_to_target_hw_bp_type): New function.
9370 (mips_stopped_data_address): New function.
9371 (the_low_target): Add watchpoint support functions.
9372
9373 2013-07-27 Yao Qi <yao@codesourcery.com>
9374
9375 * i386-low.c: Include break-common.h.
9376 (enum target_hw_bp_type): Remove.
9377
9378 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9379
9380 * Makefile.in (SFILES): /common/target-common.c.
9381 (OBS): Add target-common.o.
9382 (server_h): Add $(srcdir)/../common/target-common.h.
9383 (target-common.o): New target.
9384 * server.c (queue_stop_reply_callback): Free
9385 status string after use.
9386 * target.c (target_waitstatus_to_string): Remove.
9387 * target.h: Include target-common.h.
9388 (resume_kind): Likewise.
9389 (target_waitkind): Likewise.
9390 (target_waitstatus): Likewise.
9391 (TARGET_WNOHANG): Likewise.
9392
9393 2013-07-04 Yao Qi <yao@codesourcery.com>
9394
9395 * Makefile.in (host_alias): Use @host_noncanonical@.
9396 (target_alias): Use @target_noncanonical@.
9397 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9398 ACX_NONCANONICAL_HOST.
9399 * configure: Regenerated.
9400
9401 Revert:
9402 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9403
9404 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9405 * configure: Rebuild.
9406 * Makefile.in (version_host, version_target): Get from configure.
9407 (version.c): Use $(version_host) and $(version_target).
9408
9409 2013-07-03 Pedro Alves <palves@redhat.com>
9410
9411 * Makefile.in (config.status): Depend on development.sh.
9412 * acinclude.m4: Include libmcheck.m4.
9413 * configure: Regenerate.
9414
9415 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9416
9417 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9418 attribute inside the parentheses.
9419 (winapi_DebugSetProcessKillOnExit): Ditto.
9420 (winapi_DebugBreakProcess): Ditto.
9421 (winapi_GenerateConsoleCtrlEvent): Ditto.
9422
9423 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9424
9425 * notif.h (notif_event): Add a dummy member to avoid compiler
9426 errors.
9427
9428 2013-07-01 Pedro Alves <palves@redhat.com>
9429
9430 * hostio.c (HOSTIO_PATH_MAX): Define.
9431 (require_filename, handle_open, handle_unlink, handle_readlink):
9432 Use it.
9433
9434 2013-07-01 Pedro Alves <palves@redhat.com>
9435
9436 * server.h: Include "pathmax.h".
9437 * linux-low.c: Don't include sys/param.h.
9438 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9439 MAXPATHLEN.
9440 * win32-low.c: Don't include sys/param.h.
9441 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9442
9443 2013-07-01 Pedro Alves <palves@redhat.com>
9444
9445 * event-loop.c: Don't check HAVE_UNISTD_H before including
9446 <unistd.h>.
9447 * gdbreplay.c: Likewise.
9448 * remote-utils.c: Likewise.
9449 * server.c: Likewise.
9450 * configure.ac: Don't check for unistd.h.
9451 * configure: Regenerate.
9452
9453 2013-06-28 Tom Tromey <tromey@redhat.com>
9454
9455 * Makefile.in (version.c): Use version.in, not
9456 common/version.in.
9457
9458 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9459
9460 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9461 * configure: Rebuild.
9462 * Makefile.in (version_host, version_target): Get from configure.
9463 (version.c): Use $(version_host) and $(version_target).
9464
9465 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9466
9467 Fix trace-status to output user name without trailing colon.
9468 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9469
9470 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9471
9472 Fix trace-status to output proper start-time and stop-time.
9473 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9474 output start time and stop time in hex as gdb expects.
9475
9476 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9477
9478 * tracepoint.c (build_traceframe_info_xml): Output trace state
9479 variables present in the trace buffer.
9480
9481 2013-06-24 Tom Tromey <tromey@redhat.com>
9482
9483 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9484 create-version.sh.
9485 (version.o): Remove.
9486 * gdbreplay.c: Include version.h.
9487 (version, host_name): Don't declare.
9488 * server.h: Include version.h.
9489 (version, host_name): Don't declare.
9490
9491 2013-06-12 Pedro Alves <palves@redhat.com>
9492
9493 * linux-x86-low.c (linux_is_elf64): Delete global.
9494 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9495 with local linux_pid_exe_is_elf_64_file use.
9496
9497 2013-06-11 Pedro Alves <palves@redhat.com>
9498
9499 * linux-low.c (regset_disabled, disable_regset): New functions.
9500 (regsets_fetch_inferior_registers)
9501 (regsets_store_inferior_registers): Use them.
9502 (initialize_regsets_info); Don't allocate the disabled_regsets
9503 array here.
9504 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9505 comment.
9506
9507 2013-06-11 Pedro Alves <palves@redhat.com>
9508
9509 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9510 xmalloc.
9511
9512 2013-06-11 Pedro Alves <palves@redhat.com>
9513
9514 * linux-x86-low.c (initialize_low_arch): Call
9515 init_registers_x32_avx_linux.
9516
9517 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9518
9519 Fix compatibility with Android Bionic.
9520 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9521 it is not empty.
9522
9523 2013-06-07 Pedro Alves <palves@redhat.com>
9524
9525 PR server/14823
9526 * Makefile.in (OBS): Add tdesc.o.
9527 (IPA_OBJS): Add tdesc-ipa.o.
9528 (tdesc-ipa.o): New rule.
9529 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9530 interface.
9531 * linux-low.c (new_inferior): Delete.
9532 (disabled_regsets, num_regsets): Delete.
9533 (linux_add_process): Adjust to set the new per-process
9534 new_inferior flag.
9535 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9536 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9537 was a stop. When calling arch_setup, switch the current inferior
9538 to the thread that got an event.
9539 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9540 (regsets_fetch_inferior_registers)
9541 (regsets_store_inferior_registers): New regsets_info parameter.
9542 Adjust to use it.
9543 (linux_register_in_regsets): New regs_info parameter. Adjust to
9544 use it.
9545 (register_addr, fetch_register, store_register): New usrregs_info
9546 parameter. Adjust to use it.
9547 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9548 parameter regs_info. Adjust to use it.
9549 (linux_fetch_registers): Get the current inferior's regs_info, and
9550 adjust to use it.
9551 (linux_store_registers): Ditto.
9552 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9553 (initialize_low): Don't initialize the target_regsets here. Call
9554 initialize_low_arch.
9555 * linux-low.h (target_regsets): Delete declaration.
9556 (struct regsets_info): New.
9557 (struct usrregs_info): New.
9558 (struct regs_info): New.
9559 (struct process_info_private) <new_inferior>: New field.
9560 (struct linux_target_ops): Delete the num_regs, regmap, and
9561 regset_bitmap fields. New field regs_info.
9562 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9563 * i387-fp.c (num_xmm_registers): Delete.
9564 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9565 calls to new interface.
9566 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9567 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9568 Infer the number of xmm registers from the regcache's target
9569 description.
9570 * i387-fp.h (num_xmm_registers): Delete.
9571 * inferiors.c (add_thread): Don't install the thread's regcache
9572 here.
9573 * proc-service.c (gregset_info): Fetch the current inferior's
9574 regs_info. Adjust to use it.
9575 * regcache.c: Include tdesc.h.
9576 (register_bytes, reg_defs, num_registers)
9577 (gdbserver_expedite_regs): Delete.
9578 (get_thread_regcache): If the thread doesn't have a regcache yet,
9579 create one, instead of aborting gdbserver.
9580 (regcache_invalidate_one): Rename to ...
9581 (regcache_invalidate_thread): ... this.
9582 (regcache_invalidate_one): New.
9583 (regcache_invalidate): Only invalidate registers of the current
9584 process.
9585 (init_register_cache): Add target_desc parameter, and use it.
9586 (new_register_cache): Ditto. Assert the target description has a
9587 non zero registers_size.
9588 (regcache_cpy): Add assertions. Adjust.
9589 (realloc_register_cache, set_register_cache): Delete.
9590 (registers_to_string, registers_from_string): Adjust.
9591 (find_register_by_name, find_regno, find_register_by_number)
9592 (register_cache_size): Add target_desc parameter, and use it.
9593 (free_register_cache_thread, free_register_cache_thread_one)
9594 (regcache_release, register_cache_size): New.
9595 (register_size): Add target_desc parameter, and use it.
9596 (register_data, supply_register, supply_register_zeroed)
9597 (supply_regblock, supply_register_by_name, collect_register)
9598 (collect_register_as_string, collect_register_by_name): Adjust.
9599 * regcache.h (struct target_desc): Forward declare.
9600 (struct regcache) <tdesc>: New field.
9601 (init_register_cache, new_register_cache): Add target_desc
9602 parameter.
9603 (regcache_invalidate_thread): Declare.
9604 (regcache_invalidate_one): Delete declaration.
9605 (regcache_release): Declare.
9606 (find_register_by_number, register_cache_size, register_size)
9607 (find_regno): Add target_desc parameter.
9608 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9609 declarations.
9610 * remote-utils.c: Include tdesc.h.
9611 (outreg, prepare_resume_reply): Adjust.
9612 * server.c: Include tdesc.h.
9613 (gdbserver_xmltarget): Delete declaration.
9614 (get_features_xml, process_serial_event): Adjust.
9615 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9616 declare.
9617 (struct process_info) <tdesc>: New field.
9618 (ipa_tdesc): Declare.
9619 * tdesc.c: New file.
9620 * tdesc.h: New file.
9621 * tracepoint.c: Include tdesc.h.
9622 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9623 (get_context_regcache): Adjust to pass ipa_tdesc down.
9624 (do_action_at_tracepoint): Adjust to get the register cache size
9625 from the context regcache's description.
9626 (traceframe_walk_blocks): Adjust to get the register cache size
9627 from the current trace frame's description.
9628 (traceframe_get_pc): Adjust to get current trace frame's
9629 description and pass it down.
9630 (gdb_collect): Adjust to get the register cache size from the
9631 IPA's description.
9632 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9633 (gdbserver_xmltarget): Delete.
9634 (initialize_low_tracepoint): Set the ipa's target description.
9635 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9636 (initialize_low_tracepoint): Set the ipa's target description.
9637 * linux-x86-low.c: Include tdesc.h.
9638 [__x86_64__] (is_64bit_tdesc): New.
9639 (ps_get_thread_area, x86_get_thread_area): Use it.
9640 (i386_cannot_store_register): Rename to ...
9641 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9642 (i386_cannot_fetch_register): Rename to ...
9643 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9644 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9645 to new interface.
9646 (target_regsets): Rename to ...
9647 (x86_regsets): ... this.
9648 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9649 interface.
9650 (x86_siginfo_fixup): Use is_64bit_tdesc.
9651 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9652 (tdesc_x32_avx_linux, tdesc_x32_linux)
9653 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9654 Declare.
9655 (x86_linux_update_xmltarget): Delete.
9656 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9657 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9658 (AMD64_LINUX_USER64_CS): New.
9659 (x86_linux_read_description): New, based on
9660 x86_linux_update_xmltarget.
9661 (same_process_callback): New.
9662 (x86_arch_setup_process_callback): New.
9663 (x86_linux_update_xmltarget): New.
9664 (x86_regsets_info): New.
9665 (amd64_linux_regs_info): New.
9666 (i386_linux_usrregs_info): New.
9667 (i386_linux_regs_info): New.
9668 (x86_linux_regs_info): New.
9669 (x86_arch_setup): Reimplement.
9670 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9671 (x86_emit_ops): Ditto.
9672 (the_low_target): Adjust. Install x86_linux_regs_info,
9673 x86_cannot_fetch_register, and x86_cannot_store_register.
9674 (initialize_low_arch): New.
9675 * linux-ia64-low.c (tdesc_ia64): Declare.
9676 (ia64_fetch_register): Adjust.
9677 (ia64_usrregs_info, regs_info): New globals.
9678 (ia64_regs_info): New function.
9679 (the_low_target): Adjust.
9680 (initialize_low_arch): New function.
9681 * linux-sparc-low.c (tdesc_sparc64): Declare.
9682 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9683 Adjust.
9684 (sparc_arch_setup): New function.
9685 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9686 (the_low_target): Adjust.
9687 (initialize_low_arch): New function.
9688 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9689 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9690 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9691 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9692 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9693 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9694 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9695 (tdesc_powerpc_isa205_vsx64l): Declare.
9696 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9697 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9698 (ppc_set_pc, ppc_get_hwcap): Adjust.
9699 (ppc_usrregs_info): Forward declare.
9700 (!__powerpc64__) ppc_regmap_adjusted: New global.
9701 (ppc_arch_setup): Adjust to the current process'es target
9702 description.
9703 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9704 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9705 (ppc_store_evrregset): Adjust.
9706 (target_regsets): Rename to ...
9707 (ppc_regsets): ... this, and make static.
9708 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9709 (ppc_regs_info): New function.
9710 (the_low_target): Adjust.
9711 (initialize_low_arch): New function.
9712 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9713 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9714 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9715 (tdesc_s390x_linux64v2): Declare.
9716 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9717 (s390_fill_gregset, s390_store_last_break): Adjust.
9718 (target_regsets): Rename to ...
9719 (s390_regsets): ... this, and make static.
9720 (s390_get_pc, s390_set_pc): Adjust.
9721 (s390_get_hwcap): New target_desc parameter, and use it.
9722 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9723 (s390_arch_setup): Adjust to set the current process'es target
9724 description. Don't adjust the regmap.
9725 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9726 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9727 (regs_info_3264): New globals.
9728 (s390_regs_info): New function.
9729 (the_low_target): Adjust.
9730 (initialize_low_arch): New function.
9731 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9732 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9733 [__mips64] (init_registers_mips_linux)
9734 (init_registers_mips_dsp_linux): Delete defines.
9735 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9736 (have_dsp): New global.
9737 (mips_read_description): New, based on mips_arch_setup.
9738 (mips_arch_setup): Reimplement.
9739 (get_usrregs_info): New function.
9740 (mips_cannot_fetch_register, mips_cannot_store_register)
9741 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9742 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9743 (target_regsets): Rename to ...
9744 (mips_regsets): ... this, and make static.
9745 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9746 (dsp_regs_info, regs_info): New globals.
9747 (mips_regs_info): New function.
9748 (the_low_target): Adjust.
9749 (initialize_low_arch): New function.
9750 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9751 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9752 Declare.
9753 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9754 (arm_read_description): New, with bits factored from
9755 arm_arch_setup.
9756 (arm_arch_setup): Reimplement.
9757 (target_regsets): Rename to ...
9758 (arm_regsets): ... this, and make static.
9759 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9760 (arm_regs_info): New function.
9761 (the_low_target): Adjust.
9762 (initialize_low_arch): New function.
9763 * linux-m68k-low.c (tdesc_m68k): Declare.
9764 (target_regsets): Rename to ...
9765 (m68k_regsets): ... this, and make static.
9766 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9767 (m68k_regs_info): New function.
9768 (m68k_arch_setup): New function.
9769 (the_low_target): Adjust.
9770 (initialize_low_arch): New function.
9771 * linux-sh-low.c (tdesc_sharch): Declare.
9772 (target_regsets): Rename to ...
9773 (sh_regsets): ... this, and make static.
9774 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9775 (sh_regs_info, sh_arch_setup): New functions.
9776 (the_low_target): Adjust.
9777 (initialize_low_arch): New function.
9778 * linux-bfin-low.c (tdesc_bfin): Declare.
9779 (bfin_arch_setup): New function.
9780 (bfin_usrregs_info, regs_info): New globals.
9781 (bfin_regs_info): New function.
9782 (the_low_target): Adjust.
9783 (initialize_low_arch): New function.
9784 * linux-cris-low.c (tdesc_cris): Declare.
9785 (cris_arch_setup): New function.
9786 (cris_usrregs_info, regs_info): New globals.
9787 (cris_regs_info): New function.
9788 (the_low_target): Adjust.
9789 (initialize_low_arch): New function.
9790 * linux-cris-low.c (tdesc_crisv32): Declare.
9791 (cris_arch_setup): New function.
9792 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9793 (cris_regs_info): New function.
9794 (the_low_target): Adjust.
9795 (initialize_low_arch): New function.
9796 * linux-m32r-low.c (tdesc_m32r): Declare.
9797 (m32r_arch_setup): New function.
9798 (m32r_usrregs_info, regs_info): New globals.
9799 (m32r_regs_info): Adjust.
9800 (initialize_low_arch): New function.
9801 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9802 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9803 (tic6x_usrregs_info): Forward declare.
9804 (tic6x_read_description): New function, based on ...
9805 (tic6x_arch_setup): ... this. Reimplement.
9806 (target_regsets): Rename to ...
9807 (tic6x_regsets): ... this, and make static.
9808 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9809 (tic6x_regs_info): New function.
9810 (the_low_target): Adjust.
9811 (initialize_low_arch): New function.
9812 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9813 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9814 (target_regsets): Rename to ...
9815 (xtensa_regsets): ... this, and make static.
9816 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9817 globals.
9818 (xtensa_arch_setup, xtensa_regs_info): New functions.
9819 (the_low_target): Adjust.
9820 (initialize_low_arch): New function.
9821 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9822 (nios2_arch_setup): Set the current process'es tdesc.
9823 (target_regsets): Rename to ...
9824 (nios2_regsets): ... this.
9825 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9826 (nios2_regs_info): New function.
9827 (the_low_target): Adjust.
9828 (initialize_low_arch): New function.
9829 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9830 (aarch64_arch_setup): Set the current process'es tdesc.
9831 (target_regsets): Rename to ...
9832 (aarch64_regsets): ... this.
9833 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9834 (aarch64_regs_info): New function.
9835 (the_low_target): Adjust.
9836 (initialize_low_arch): New function.
9837 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9838 globals.
9839 (target_regsets): Rename to ...
9840 (tile_regsets): ... this.
9841 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9842 (tile_regs_info): New function.
9843 (tile_arch_setup): Set the current process'es tdesc.
9844 (the_low_target): Adjust.
9845 (initialize_low_arch): New function.
9846 * spu-low.c (tdesc_spu): Declare.
9847 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9848 * win32-arm-low.c (tdesc_arm): Declare.
9849 (arm_arch_setup): New function.
9850 (the_low_target): Install arm_arch_setup instead of
9851 init_registers_arm.
9852 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9853 (init_windows_x86): Rename to ...
9854 (i386_arch_setup): ... this. Set `win32_tdesc'.
9855 (the_low_target): Adjust.
9856 * win32-low.c (win32_tdesc): New global.
9857 (child_add_thread): Don't create the thread cache here.
9858 (do_initial_child_stuff): Set the new process'es tdesc.
9859 * win32-low.h (struct target_desc): Forward declare.
9860 (win32_tdesc): Declare.
9861 * lynx-i386-low.c (tdesc_i386): Declare global.
9862 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9863 * lynx-low.c (lynx_tdesc): New global.
9864 (lynx_add_process): Set the new process'es tdesc.
9865 * lynx-low.h (struct target_desc): Forward declare.
9866 (lynx_tdesc): Declare global.
9867 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9868 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9869 * nto-low.c (nto_tdesc): New global.
9870 (do_attach): Set the new process'es tdesc.
9871 * nto-low.h (struct target_desc): Forward declare.
9872 (nto_tdesc): Declare.
9873 * nto-x86-low.c (tdesc_i386): Declare.
9874 (nto_x86_arch_setup): Set `nto_tdesc'.
9875
9876 2013-06-04 Gary Benson <gbenson@redhat.com>
9877
9878 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9879 to qSupported response when appropriate.
9880 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9881 with nonzero-length annex.
9882 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9883 arguments supplied in annex.
9884
9885 2013-05-31 Doug Evans <dje@google.com>
9886
9887 PR server/15594
9888 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9889 64 bits in 64-cross-32 environment.
9890
9891 2013-05-28 Pedro Alves <palves@redhat.com>
9892
9893 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9894 (aarch64-without-fpu.c): Delete rule.
9895 * configure.srv (aarch64*-*-linux*): Remove references to
9896 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9897 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9898 declaration.
9899
9900 2013-05-24 Pedro Alves <palves@redhat.com>
9901
9902 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9903 instead of strchr/decode_address. Error if the range isn't split
9904 with a ','. Don't assume there's be a ':' in the action.
9905
9906 2013-05-23 Yao Qi <yao@codesourcery.com>
9907 Pedro Alves <palves@redhat.com>
9908
9909 * linux-low.c (lwp_in_step_range): New function.
9910 (linux_wait_1): If the thread was range stepping and stopped
9911 outside the stepping range, report the stop to GDB. Otherwise,
9912 continue stepping. Add range stepping debug output.
9913 (linux_set_resume_request): Copy the step range from the resume
9914 request to the lwp.
9915 (linux_supports_range_stepping): New.
9916 (linux_target_ops) <supports_range_stepping>: Set to
9917 linux_supports_range_stepping.
9918 * linux-low.h (struct linux_target_ops)
9919 <supports_range_stepping>: New field.
9920 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9921 * linux-x86-low.c (x86_supports_range_stepping): New.
9922 (the_low_target) <supports_range_stepping>: Set to
9923 x86_supports_range_stepping.
9924 * server.c (handle_v_cont): Handle 'r' action.
9925 (handle_v_requests): Append ";r" if the target supports range
9926 stepping.
9927 * target.h (struct thread_resume) <step_range_start,
9928 step_range_end>: New fields.
9929 (struct target_ops) <supports_range_stepping>:
9930 New field.
9931 (target_supports_range_stepping): New macro.
9932
9933 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9934
9935 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9936 confusion in comment.
9937
9938 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9939
9940 * lynx-low.c (struct process_info_private): New type.
9941 (lynx_add_process): New function.
9942 (lynx_create_inferior, lynx_attach): Replace calls to
9943 add_process by calls to lynx_add_process.
9944 (lynx_resume): If PTID is null, then try using
9945 current_process()->private->last_wait_event_ptid.
9946 Add comments.
9947 (lynx_clear_inferiors): Delete. The contents of that function
9948 has been inlined in lynx_mourn;
9949 (lynx_wait_1): Save the ptid in the process's private data.
9950 (lynx_mourn): Free the process' private data. Replace call
9951 to lynx_clear_inferiors by call to clear_inferiors.
9952
9953 2013-05-17 Yao Qi <yao@codesourcery.com>
9954
9955 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9956 the right place.
9957
9958 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9959
9960 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9961 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9962 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9963 PT_TEXT_END_ADDR guards. Update comments.
9964 (linux_target_op) <read_offsets>: Conditionally define to
9965 linux_read_offsets if the target is UCLIBC and if it defines
9966 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9967
9968 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9969 Andrew Jenner <andrew@codesourcery.com>
9970
9971 * Makefile.in (SFILES): Add linux-nios2-low.c.
9972 (clean): Add action to delete nios2-linux.c.
9973 (nios2-linux.c): New rule.
9974 * configure.srv: Add nios2*-*-linux*.
9975 * linux-nios2-low.c: New.
9976
9977 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9978
9979 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9980
9981 2013-04-25 Hui Zhu <hui@codesourcery.com>
9982
9983 PR gdb/15186
9984 * ax.c (ax_printf): Add fflush.
9985
9986 2013-04-22 Tom Tromey <tromey@redhat.com>
9987
9988 * Makefile.in (SFILES): Add filestuff.c.
9989 (OBS): Add filestuff.o.
9990 (filestuff.o): New target.
9991 * config.in, configure: Rebuild.
9992 * configure.ac: Check for fdwalk, pipe2.
9993
9994 2013-04-17 Pedro Alves <palves@redhat.com>
9995
9996 * configure.ac (USE_THREAD_DB): Delete variable.
9997 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9998 Don't AC_SUBST USE_THREAD_DB.
9999 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10000 * config.in, configure: Regenerate.
10001
10002 2013-04-16 Pedro Alves <palves@redhat.com>
10003
10004 * linux-low.h (struct lwp_info) <thread_known>: Move under
10005 the USE_THREAD_DB #ifdef.
10006
10007 2013-04-16 Pedro Alves <palves@redhat.com>
10008
10009 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10010 (linux-low.o): Delete rule.
10011 * linux-low.h: Always include "gdb_thread_db.h" instead of
10012 conditionally including thread_db.h.
10013 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10014 HAVE_THREAD_DB_H.
10015
10016 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10017
10018 * Makefile.in (install-only): Fix make install regression.
10019
10020 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10021
10022 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10023 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10024 installation.
10025 * gdbserver.1: Remove.
10026
10027 2013-03-22 Pedro Alves <palves@redhat.com>
10028
10029 * linux-low.c (handle_extended_wait): Don't call
10030 linux_enable_event_reporting.
10031
10032 2013-03-15 Tony Theodore <tonyt@logyst.com>
10033
10034 PR build/9098:
10035 * Makefile.in (SHELL): Use @SHELL@.
10036
10037 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10038
10039 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10040 compiler warning.
10041
10042 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10043
10044 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10045 Remove extraneous NULL element.
10046
10047 2013-03-13 Yao Qi <yao@codesourcery.com>
10048
10049 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10050 'V' block in trace frame.
10051
10052 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10053
10054 * target.h (struct target_ops): Add btrace ops.
10055 (target_supports_btrace): New macro.
10056 (target_enable_btrace): New macro.
10057 (target_disable_btrace): New macro.
10058 (target_read_btrace): New macro.
10059 * gdbthread.h (struct thread_info): Add btrace field.
10060 * server.c: Include btrace-common.h.
10061 (handle_btrace_general_set): New function.
10062 (handle_btrace_enable): New function.
10063 (handle_btrace_disable): New function.
10064 (handle_general_set): Call handle_btrace_general_set.
10065 (handle_qxfer_btrace): New function.
10066 (struct qxfer qxfer_packets[]): Add btrace entry.
10067 * inferiors.c (remove_thread): Disable btrace.
10068 * linux-low: Include linux-btrace.h.
10069 (linux_low_enable_btrace): New function.
10070 (linux_low_read_btrace): New function.
10071 (linux_target_ops): Add btrace ops.
10072 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10073 Add srv_linux_btrace=yes.
10074 (x86_64-*-linux*): Add linux-btrace.o.
10075 Add srv_linux_btrace=yes.
10076 * configure.ac: Define HAVE_LINUX_BTRACE.
10077 * config.in: Regenerated.
10078 * configure: Regenerated.
10079
10080 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10081
10082 * server.c (handle_qxfer): Preserve error message if -3 is
10083 returned.
10084 (qxfer): Document the -3 return value.
10085
10086 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10087
10088 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10089 (linux_btrace_h): New variable.
10090 (linux-btrace.o): New rule.
10091
10092 2013-03-08 Stan Shebs <stan@codesourcery.com>
10093 Hafiz Abid Qadeer <abidh@codesourcery.com>
10094
10095 * tracepoint.c (trace_buffer_size): New global.
10096 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10097 (init_trace_buffer): Change to one-argument function. Allocate
10098 trace buffer memory.
10099 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10100 handle QTBuffer:size packet.
10101 (cmd_bigqtbuffer_size): New function.
10102 (initialize_tracepoint): Call init_trace_buffer with
10103 DEFAULT_TRACE_BUFFER_SIZE.
10104 * server.c (handle_query): Add QTBuffer:size in the
10105 supported packets.
10106
10107 2013-03-07 Yao Qi <yao@codesourcery.com>
10108
10109 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10110 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10111 of -1.
10112 (cmd_qtsp): Adjust condition. Do post increment.
10113 Set cur_action and cur_step_action back to 0.
10114
10115 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10116
10117 PR server/15236
10118 * linux-low.c (linux_write_memory): Return early success if LEN is
10119 zero.
10120
10121 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10122
10123 * configure.srv: Add x86_64-*-cygwin* as target.
10124
10125 2013-02-28 Tom Tromey <tromey@redhat.com>
10126
10127 * configure.ac: Invoke AC_SYS_LARGEFILE.
10128 * configure, config.in: Rebuild.
10129
10130 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10131
10132 * win32-low.c: Throughout, fix format strings and casts of
10133 printf-like functions to avoid type related warnings on all
10134 platforms.
10135 (get_child_debug_event): Print dwDebugEventCode as hex since
10136 that's how it's usually documented.
10137
10138 2013-02-28 Yao Qi <yao@codesourcery.com>
10139
10140 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10141 pulongest.
10142
10143 2013-02-27 Jiong Wang <jiwang@tilera.com>
10144
10145 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10146 (reg-tilegx32.c): New rule.
10147 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10148 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10149 different register info initializer according to elf class.
10150 (init_registers_tilgx32): New function. The tilegx32 register info
10151 initializer.
10152 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10153 (tile_store_gregset): Likewise.
10154
10155 2013-02-27 Yao Qi <yao@codesourcery.com>
10156
10157 * server.c (process_point_options): Print debug message when
10158 debug_threads is true.
10159
10160 2013-02-26 Yao Qi <yao@codesourcery.com>
10161
10162 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10163
10164 2013-02-19 Pedro Alves <palves@redhat.com>
10165 Kai Tietz <ktietz@redhat.com>
10166
10167 PR gdb/15161
10168
10169 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10170 instead of strtoul to extract address from packet.
10171 (process_serial_event) <'z'>: Likewise.
10172
10173 2013-02-18 Yao Qi <yao@codesourcery.com>
10174
10175 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10176
10177 2013-02-14 Pedro Alves <palves@redhat.com>
10178
10179 Plug memory leak.
10180
10181 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10182 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10183
10184 2013-02-14 Pedro Alves <palves@redhat.com>
10185
10186 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10187
10188 2013-02-14 Pedro Alves <palves@redhat.com>
10189
10190 * tracepoint.c (save_string): Delete.
10191 (add_tracepoint_action): Use savestring instead of save_string.
10192
10193 2013-02-12 Pedro Alves <palves@redhat.com>
10194
10195 * linux-xtensa-low.c: Ditto.
10196 * xtensa-xtregs.c: Ditto.
10197
10198 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10199
10200 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10201 thread_db.
10202
10203 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10204
10205 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10206 aarch64_num_wp_regs and aarch64_num_bp_regs to
10207 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10208
10209 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10210
10211 * linux-aarch64-low.c (ps_get_thread_area): Replace
10212 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10213
10214 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10215 Marcus Shawcroft <marcus.shawcroft@arm.com>
10216 Nigel Stephens <nigel.stephens@arm.com>
10217 Yufeng Zhang <yufeng.zhang@arm.com>
10218
10219 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10220 (aarch64.c, aarch64-without-fpu.c): New targets.
10221 * configure.srv (aarch64*-*-linux*): New.
10222 * linux-aarch64-low.c: New file.
10223
10224 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10225
10226 * linux-low.c (handle_extended_wait, linux_create_inferior)
10227 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10228 (dequeue_one_deferred_signal, linux_resume_one_thread)
10229 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10230 (linux_tracefork_grandchild, linux_test_for_tracefork)
10231 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10232 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10233 where the argument is 0.
10234
10235 2013-01-25 Yao Qi <yao@codesourcery.com>
10236
10237 * event-loop.c: Include "queue.h".
10238 (gdb_event_p): New typedef.
10239 (struct gdb_event) <next_event>: Remove.
10240 (event_queue): Change to QUEUE(gdb_event_p).
10241 (async_queue_event): Remove.
10242 (gdb_event_xfree): New.
10243 (initialize_event_loop): New.
10244 (process_event): Use API from QUEUE.
10245 (wait_for_event): Likewise.
10246 * server.c (main): Call initialize_event_loop.
10247 * server.h (initialize_event_loop): Declare.
10248
10249 2013-01-18 Yao Qi <yao@codesourcery.com>
10250
10251 * ax.h (struct eval_agent_expr_context): New.
10252 (gdb_eval_agent_expr): Update declaration.
10253 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10254 TFRAME. Add new argument CTX.
10255 * server.h (struct eval_agent_expr_context): Declare.
10256 (agent_mem_read, agent_tsv_read): Update declaration.
10257 (agent_mem_read_string): Likewise.
10258 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10259 (add_traceframe_block): Add new argument TPOINT.
10260 Increase TPOINT->traceframe_usage.
10261 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10262 eval_tracepoint_agent_expr.
10263 (condition_true_at_tracepoint): Likewise.
10264 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10265 (agent_mem_read_string, agent_tsv_read): Likewise.
10266
10267 2013-01-16 Yao Qi <yao@codesourcery.com>
10268
10269 * linux-low.c (linux_resume_one_lwp): Don't check
10270 'lwp->bp_reinsert != 0'.
10271
10272 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10273 Pedro Alves <palves@redhat.com>
10274
10275 * lynx-low.c (ptrace_request_to_str): Define a temporary
10276 macro and use it to simplify this function's implementation.
10277
10278 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10279
10280 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10281 sets errno.
10282
10283 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10284
10285 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10286
10287 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10288
10289 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10290
10291 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10292
10293 * lynx-low.c (lynx_resume): Use the resume_info parameter
10294 to determine the ptid for the lynx_ptrace call, unless
10295 it is equal to minus_one_ptid, in which case we use the
10296 ptid of the current_inferior.
10297 (lynx_wait_1): After having received a thread create/exit
10298 event, resume the inferior's execution using the signaling
10299 thread's ptid, rather than the old ptid.
10300
10301 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10302
10303 * lynx-low.c (lynx_resume): Delete variable ret.
10304
10305 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10306
10307 * gdbreplay.c (gdbreplay_version): Update copyright year.
10308 * server.c (gdbserver_version): Likewise.
10309
10310 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10311
10312 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10313 new thread.
10314
10315 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10316
10317 * lynx-low.c (ptrace_request_to_str): Add handling for
10318 PTRACE_GETTRACESIG.
10319
10320 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10321
10322 * lynx-low.c (lynx_attach): Delete variable new_process.
10323
10324 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10325
10326 * lynx-low.c (lynx_create_inferior): Delete variable
10327 new_process.
10328
10329 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10330
10331 * lynx-low.c (ptrace_request_to_str): Do not handle
10332 PTRACE_GETTHREADLIST if this macro does not exist.
10333
10334 2012-12-15 Yao Qi <yao@codesourcery.com>
10335
10336 * Makefile.in (OBS): Add notif.o.
10337 * notif.c, notif.h: New.
10338 * server.c: Include "notif.h".
10339 (struct vstop_notif) <next>: Remove.
10340 <base>: New field.
10341 (queue_stop_reply): Update.
10342 (push_event, send_next_stop_reply): Remove.
10343 (discard_queued_stop_replies): Update.
10344 (notif_stop): New variable.
10345 (handle_v_stopped): Remove.
10346 (handle_v_requests): Don't call handle_v_stopped. Call
10347 handle_ack_notif instead.
10348 (queue_stop_reply_callback): Call notif_event_enque instead
10349 of queue_stop_reply.
10350 (handle_status): Don't call send_next_stop_reply, call
10351 notif_write_event instead.
10352 (kill_inferior_callback): Likewise.
10353 (detach_or_kill_inferior_callback): Likewise.
10354 (main): Call initialize_notif.
10355 (process_serial_event): Call QUEUE_is_empty.
10356 (handle_target_event): Call notif_push instead of push event.
10357 * server.h (push_event): Remove declaration.
10358
10359 2012-12-10 Tom Tromey <tromey@redhat.com>
10360
10361 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10362 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10363 macros.
10364 (.c.o): Rewrite.
10365 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10366 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10367 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10368 (amd64-linux-ipa.o, ax.o): Rewrite.
10369 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10370 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10371 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10372 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10373 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10374 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10375 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10376 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10377 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10378 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10379 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10380 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10381 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10382 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10383 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10384 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10385 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10386 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10387 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10388 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10389 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10390 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10391 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10392 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10393 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10394 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10395 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10396 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10397 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10398 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10399 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10400 (reg-tilegx.o): Remove.
10401 (all_object_files): New macro.
10402 Include .deps files.
10403 * aclocal.m4, configure: Rebuild.
10404 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10405 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10406 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10407
10408 2012-12-05 Tom Tromey <tromey@redhat.com>
10409
10410 PR gdb/14917:
10411 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10412
10413 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10414
10415 * configure.ac: Check for linux/perf_event.h.
10416 * config.in: Regenerated.
10417 * configure: Regenerated.
10418
10419 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10420
10421 * hostio.c (handle_readlink): Decrease buffer size
10422 parameter passed to readlink by one byte.
10423
10424 2012-11-26 Yao Qi <yao@codesourcery.com>
10425
10426 * configure.ac (build_warnings): Append '-Wempty-body'.
10427 * configure: Regenerated.
10428 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10429 body.
10430
10431 2012-11-15 Pierre Muller <muller@sourceware.org>
10432
10433 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10434 * config.in: Regenerate.
10435 * configure: Regenerate.
10436 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10437 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10438 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10439 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10440 header.
10441 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10442 instead of <sys/wait.h> header.
10443 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10444
10445 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10446
10447 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10448 (various make rules): Remove -DGDBSERVER
10449
10450 2012-11-09 Yao Qi <yao@codesourcery.com>
10451
10452 * spu-low.c (current_ptid): Move it to ..
10453 * gdbthread.h: ... here. New.
10454 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10455 * server.c (myresume, process_serial_event): Likewise.
10456 * thread-db.c (thread_db_find_new_threads): Likewise.
10457 * tracepoint.c (run_inferior_command): Likewise.
10458
10459 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10460
10461 * server.c (handle_search_memory_1): Include access length in
10462 warning message.
10463
10464 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10465
10466 * linux-crisv32-low.c: Fix compile errors.
10467
10468 2012-09-04 Yao Qi <yao@codesourcery.com>
10469
10470 * tracepoint.c (cmd_qtsv): Adjust debug message.
10471 Don't check CUR_TPOINT.
10472
10473 2012-08-28 Yao Qi <yao@codesourcery.com>
10474
10475 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10476 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10477 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10478 Remove declarations of xmalloc, xreallloc, xstrdup and
10479 freeargv.
10480 * Makefile.in (libiberty_h): New.
10481 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10482 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10483
10484 2012-08-23 Yao Qi <yao@codesourcery.com>
10485
10486 * server.h: Remove declaration of 'xsnprintf'.
10487
10488 2012-08-22 Keith Seitz <keiths@redhat.com>
10489
10490 * server.h: Include build-gnulib-gbserver/config.h.
10491 * gdbreplay.c: Likewise.
10492
10493 2012-08-08 Doug Evans <dje@google.com>
10494
10495 * Makefile.in (SFILES): Add gdb_vecs.c.
10496 (OBS): Add gdb_vecs.o.
10497 (gdb_vecs_h, host_defs_h): New variables.
10498 (thread-db.o): Add $(gdb_vecs_h) dependency.
10499 (gdb_vecs.o): New rule.
10500 * thread-db.c: #include "gdb_vecs.h".
10501 (thread_db_load_search): Use a vector to iterate over path elements.
10502 Handle text appearing after "$pdir".
10503
10504 * configure.ac: Add check for strstr.
10505 * config.in: Regenerate.
10506 * configure: Regenerate.
10507
10508 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10509
10510 * hostio.c (handle_pread): If pread fails, fall back to attempting
10511 lseek/read.
10512 (handle_pwrite): Likewise for pwrite.
10513
10514 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10515
10516 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10517 between unsupported TYPE and unimplementable ADDR/LEN combination.
10518 (arm_insert_point): Act on new return value.
10519
10520 2012-07-31 Pedro Alves <palves@redhat.com>
10521
10522 * server.c (process_point_options): Only skip tokens if we find
10523 one that is unrecognized. Don't treat 'X' specially while
10524 skipping unrecognized tokens.
10525
10526 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10527
10528 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10529 to 4-byte-align HW breakpoint addresses for Thumb.
10530
10531 2012-07-27 Yao Qi <yao@codesourcery.com>
10532
10533 PR remote/14161.
10534
10535 * server.h: Declare gdb_agent_about_to_close.
10536 * target.c (kill_inferior): Include "agent.h".
10537 New. Send command 'kill'.
10538 * target.h (kill_inferior): Removed macro.
10539 * tracepoint.c (gdb_agent_about_to_close): New.
10540 (gdb_agent_helper_thread): Handle command 'close'.
10541 Wait endlessly until the inferior stops.
10542 Install gdb_agent_remove_socket to atexit hook.
10543 (agent_socket_name): New static variable.
10544 (gdb_agent_socket_init): Replace local variable 'name' with
10545 'agent_socket_name'.
10546 (gdb_agent_remove_socket): New.
10547
10548 2012-07-27 Yao Qi <yao@codesourcery.com>
10549
10550 * server.c (process_point_options): Stop at 'X' when parsing.
10551
10552 2012-07-19 Michael Eager <eager@eagercon.com>
10553
10554 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10555 to hw_execute.
10556 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10557 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10558 hardware breakpoint.
10559
10560 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10561
10562 * gdbserver/linux-low.c (initialize_low): Call
10563 linux_ptrace_init_warnings.
10564
10565 2012-07-02 Doug Evans <dje@google.com>
10566
10567 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10568 pointer to int.
10569
10570 2012-07-02 Stan Shebs <stan@codesourcery.com>
10571
10572 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10573 (ax.o): Add it to build rule.
10574 (ax-ipa.o): Ditto.
10575 (OBS): Add format.o.
10576 (IPA_OBS): Add format.o.
10577 * server.c (handle_query): Claim support for breakpoint commands.
10578 (process_point_options): Add command case.
10579 (process_serial_event): Leave running if there are printfs in
10580 effect.
10581 * mem-break.h (any_persistent_commands): Declare.
10582 (add_breakpoint_commands): Declare.
10583 (gdb_no_commands_at_breakpoint): Declare.
10584 (run_breakpoint_commands): Declare.
10585 * mem-break.c (struct point_command_list): New struct.
10586 (struct breakpoint): New field command_list.
10587 (any_persistent_commands): New function.
10588 (add_commands_to_breakpoint): New function.
10589 (add_breakpoint_commands): New function.
10590 (gdb_no_commands_at_breakpoint): New function.
10591 (run_breakpoint_commands): New function.
10592 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10593 locally.
10594 * ax.c: Include format.h.
10595 (ax_printf): New function.
10596 (gdb_eval_agent_expr): Add printf opcode.
10597
10598 2012-06-13 Yao Qi <yao@codesourcery.com>
10599
10600 * server.c (start_inferior): Remove duplicated writes to fields
10601 'last_resume_kind' and 'last_status' of 'current_inferior'.
10602
10603 2012-06-12 Yao Qi <yao@codesourcery.com>
10604 Pedro Alves <palves@redhat.com>
10605
10606 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10607 comment.
10608 * server.c (handle_v_cont): Extend comment.
10609
10610 2012-06-11 Yao Qi <yao@codesourcery.com>
10611
10612 * linux-low.c (linux_attach): Add 'static'.
10613
10614 2012-06-06 Yao Qi <yao@codesourcery.com>
10615
10616 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10617
10618 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10619
10620 Fix gcc -flto compilation warning.
10621 * server.c (main): Make variable multi_mode and attach volatile.
10622
10623 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10624
10625 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10626 if the platform doesn't know about it.
10627
10628 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10629
10630 * Makefile.in (SFILES): Add linux-tile-low.c.
10631 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10632 * configure.srv: Handle tilegx-*-linux*.
10633 * linux-tile-low.c: New file.
10634
10635 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10636
10637 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10638
10639 2012-05-24 Pedro Alves <palves@redhat.com>
10640
10641 PR gdb/7205
10642
10643 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10644
10645 2012-05-24 Pedro Alves <palves@redhat.com>
10646
10647 PR gdb/7205
10648
10649 Replace target_signal with gdb_signal throughout.
10650
10651 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10652
10653 * linux-low.c (linux_store_registers): Avoid the copying sequence
10654 when no data has been retrieved by ptrace.
10655
10656 2012-05-22 Will Deacon <will.deacon@arm.com>
10657
10658 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10659 Include asm/ptrace.h.
10660 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10661 already defined.
10662
10663 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10664
10665 * linux-low.c (linux_store_registers): Don't re-retrieve data
10666 with ptrace that has already been obtained from /proc. Always
10667 copy any data retrieved with ptrace to the buffer supplied.
10668
10669 2012-05-11 Yao Qi <yao@codesourcery.com>
10670 Pedro Alves <palves@redhat.com>
10671
10672 * linux-low.c (enum stopping_threads_kind): New.
10673 (stopping_threads): Change type to `enum stopping_threads_kind'.
10674 (handle_extended_wait): If stopping and suspending threads, leave
10675 the new_lwp suspended too.
10676 (linux_wait_for_event): Adjust.
10677 (stop_all_lwps): Set `stopping_threads' to
10678 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10679 whether we're suspending threads or just stopping them. Assert no
10680 recursion happens.
10681
10682 2012-04-29 Yao Qi <yao@codesourcery.com>
10683
10684 * server.h: Move some code to ...
10685 * gdbthread.h: ... here. New.
10686 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10687 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10688 (nto-low.o, win32-low.o): Likewise.
10689 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10690 * regcache.c, remote-utils.c, server.c: Likewise.
10691 * target.c, tracepoint.c, win32-low.c: Likewise.
10692
10693 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10694
10695 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10696 (PTRACE_ARG4_TYPE): Likewise.
10697 (PTRACE_XFER_TYPE): Likewise.
10698 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10699 ptrace to PTRACE_ARG3_TYPE.
10700 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10701 (PTRACE_ARG4_TYPE): Likewise.
10702 (PTRACE_XFER_TYPE): Likewise.
10703 (linux_detach_one_lwp): Cast fourth argument of
10704 ptrace to long then PTRACE_ARG4_TYPE.
10705 (regsets_fetch_inferior_registers): Cast third argument of
10706 ptrace to long then PTRACE_ARG3_TYPE.
10707 (regsets_store_inferior_registers): Likewise.
10708
10709 2012-04-20 Pedro Alves <palves@redhat.com>
10710
10711 * configure: Regenerate.
10712
10713 2012-04-19 Pedro Alves <palves@redhat.com>
10714
10715 * Makefile.in (GNULIB_BUILDDIR): New.
10716 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10717 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10718 (all, install-only, uninstall, clean-info, all-lib, clean): No
10719 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10720 (maintainer-clean realclean distclean): Use subdir_do.
10721 (subdir_do): New.
10722 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10723 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10724 * acinclude.m4: Include acx_configure_dir.m4.
10725 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10726 calls. Call AC_PROG_RANLIB. Configure gnulib using
10727 ACX_CONFIGURE_DIR.
10728 (GNULIB): New.
10729 (GNULIB_STDINT_H): Adjust.
10730 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10731 * gdbreplay.c: Include build-gnulib/config.h.
10732 * server.h: Likewise.
10733 * aclocal.m4: Regenerate.
10734 * config.in: Regenerate.
10735 * configure: Regenerate.
10736
10737 2012-04-19 Pedro Alves <palves@redhat.com>
10738
10739 * Makefile.in (LIBGNU, INCGNU): Adjust.
10740 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10741 (all, install-only, uninstall, clean-info, all-lib, clean)
10742 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10743 * configure.ac: Adjust AC_OUTPUT output.
10744 * aclocal.m4: Regenerate.
10745 * configure: Regenerate.
10746
10747 2012-04-19 Pedro Alves <palves@redhat.com>
10748
10749 * Makefile.in (generated_files): New.
10750 (server_h): Remove the explicit dependency on config.h, and depend
10751 on $generated_files.
10752
10753 2012-04-19 Pedro Alves <palves@redhat.com>
10754
10755 * Makefile.in (INCGNU): Add -Ignulib.
10756
10757 2012-04-19 Pedro Alves <palves@redhat.com>
10758
10759 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10760 (INCGNU): ... this, and spell out -I here.
10761 (GNULIB_LIB): Rename to ...
10762 (LIBGNU): ... this.
10763 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10764
10765 2012-04-19 Pedro Alves <palves@redhat.com>
10766
10767 * config.in: Regenerate.
10768
10769 2012-04-19 Pedro Alves <palves@redhat.com>
10770
10771 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10772 * server.h (memmem): Remove declaration.
10773 * config.in: Regenerate.
10774 * configure: Regenerate.
10775
10776 2012-04-19 Yao Qi <yao@codesourcery.com>
10777
10778 * Makefile.in (SFILES): Add common/vec.c.
10779 (OBS): Add vec.o.
10780 (vec.o): New rule.
10781
10782 2012-04-19 Yao Qi <yao@codesourcery.com>
10783
10784 * remote-utils.c (prepare_resume_reply): Replace with macro
10785 target_core_of_thread.
10786 * server.c (handle_qxfer_threads_proper): Likewise.
10787 * target.h (traget_core_of_thread): New macro.
10788
10789 2012-04-18 Pedro Alves <palves@redhat.com>
10790
10791 * aclocal.m4: Regenerate.
10792 * configure: Regenerate.
10793
10794 2012-04-16 Yao Qi <yao@codesourcery.com>
10795
10796 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10797 duplicated on address.
10798
10799 2012-04-16 Yao Qi <yao@codesourcery.com>
10800
10801 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10802 (struct tracepoint_action_ops) <send>: New field.
10803 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10804 (agent_expr_send, x_tracepoint_action_send): New.
10805 (l_tracepoint_action_send): New.
10806 (cmd_qtdp): Download and install tracepoint
10807 according to `use_agent'.
10808 (run_inferior_command): Add one more parameter `len'.
10809 Update callers.
10810 (tracepoint_send_agent): New.
10811 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10812
10813 2012-04-16 Yao Qi <yao@codesourcery.com>
10814
10815 * tracepoint.c (download_tracepoints): Moved to ...
10816 (cmd_qtstart): ... here.
10817
10818 2012-04-14 Yao Qi <yao@codesourcery.com>
10819
10820 * tracepoint.c: Include inttypes.h.
10821 (struct collect_memory_action): Use sized types.
10822 (struct tracepoint): Likewise.
10823 (cmd_qtdp, stop_tracing): Update print specifiers.
10824 (cmd_qtp, response_tracepoint): Likewise.
10825 (collect_data_at_tracepoint): Likewise.
10826 (collect_data_at_step): Likewise.
10827
10828 2012-04-14 Yao Qi <yao@codesourcery.com>
10829
10830 Import gnulib module inttypes.
10831 * aclocal.m4, config.in, configure: Regenerated.
10832
10833 2012-04-14 Yao Qi <yao@codesourcery.com>
10834
10835 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10836 Makefile and config.status at last.
10837
10838 2012-04-13 Yao Qi <yao@codesourcery.com>
10839
10840 * tracepoint.c: Include stdint.h unconditionally.
10841
10842 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10843
10844 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10845 on BFD_HAVE_SYS_PROCFS_TYPE.
10846 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10847 * configure: Regenerate.
10848 * config.in: Likewise.
10849
10850 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10851
10852 * Makefile.in (clean): Also remove x32.c x32-linux.c
10853 x32-avx.c x32-avx-linux.c.
10854 (x32.o): New target.
10855 (x32.c): Likewise.
10856 (x32-linux.o): Likewise.
10857 (x32-linux.c): Likewise.
10858 (x32-avx.o): Likewise.
10859 (x32-avx.c): Likewise.
10860 (x32-avx-linux.o): Likewise.
10861 (x32-avx-linux.c): Likewise.
10862
10863 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10864 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10865 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10866 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10867 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10868 i386/x32-avx-linux.xml.
10869
10870 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10871 (init_registers_x32_avx_linux): Likwise.
10872 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10873 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10874
10875 2012-04-13 Pedro Alves <palves@redhat.com>
10876
10877 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10878 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10879 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10880 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10881 the sub-make.
10882
10883 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10884
10885 * linux-x86-low.c (compat_x32_clock_t): New.
10886 (compat_x32_siginfo_t): Likewise.
10887 (compat_x32_siginfo_from_siginfo): Likewise.
10888 (siginfo_from_compat_x32_siginfo): Likewise.
10889 (linux_is_elf64): Likewise.
10890 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10891 and siginfo_from_compat_x32_siginfo for x32.
10892 (x86_arch_setup): Set linux_is_elf64.
10893
10894 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10895
10896 PR gdb/13969
10897 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10898 e_machine field.
10899 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10900 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10901 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10902 compatible with process.
10903
10904 2012-04-12 Yao Qi <yao@codesourcery.com>
10905
10906 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10907 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10908 (install-only, install-info, clean): Handle sub dir gnulib.
10909 (all-lib, am--refresh): New targets.
10910 (memmem.o): Remove target.
10911 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10912 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10913 (AC_REPLACE_FUNCS): Remove memmem.
10914 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10915 (AC_OUTPUT): Generate Makefile in gnulib/.
10916 * aclocal.m4, config.in, configure: Regenerated.
10917
10918 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10919
10920 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10921
10922 2012-04-05 Pedro Alves <palves@redhat.com>
10923
10924 -Werror=strict-aliasing
10925
10926 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10927 pointer.
10928
10929 2012-04-04 Pedro Alves <palves@redhat.com>
10930
10931 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10932 (sparc_store_gregset_from_stack, sparc_store_gregset)
10933 (sparc_breakpoint_at): Fix formatting.
10934
10935 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10936
10937 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10938 are available.
10939 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10940 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10941 * config.in: Regenerate.
10942 * configure: Likewise.
10943
10944 2012-03-29 Pedro Alves <palves@redhat.com>
10945
10946 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10947 Correct ptrace arguments.
10948
10949 2012-03-28 Pedro Alves <palves@redhat.com>
10950
10951 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10952 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10953 (IA64_FR1_REGNUM): New defines.
10954 (ia64_fetch_register): New.
10955 (the_low_target): Install it.
10956 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10957 field.
10958 * linux-low.c (linux_fetch_registers): Try the
10959 the_low_target.fetch_register hook first.
10960
10961 * linux-arm-low.c (the_low_target): Adjust.
10962 * linux-bfin-low.c (the_low_target): Adjust.
10963 * linux-cris-low.c (the_low_target): Adjust.
10964 * linux-crisv32-low.c (the_low_target): Adjust.
10965 * linux-m32r-low.c (the_low_target): Adjust.
10966 * linux-m68k-low.c (the_low_target): Adjust.
10967 * linux-mips-low.c (the_low_target): Adjust.
10968 * linux-ppc-low.c (the_low_target): Adjust.
10969 * linux-s390-low.c (the_low_target): Adjust.
10970 * linux-sh-low.c (the_low_target): Adjust.
10971 * linux-sparc-low.c (the_low_target): Adjust.
10972 * linux-tic6x-low.c (the_low_target): Adjust.
10973 * linux-x86-low.c (the_low_target): Adjust.
10974 * linux-xtensa-low.c (the_low_target): Adjust.
10975
10976 2012-03-26 Pedro Alves <palves@redhat.com>
10977
10978 * server.c (handle_qxfer_libraries): Don't bail early if
10979 the_target->qxfer_libraries_svr4 is not NULL.
10980
10981 2012-03-26 Pedro Alves <palves@redhat.com>
10982
10983 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10984
10985 2012-03-23 Pedro Alves <palves@redhat.com>
10986
10987 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10988 "library-list-svr4" element's start tag when the the DSO list is
10989 empty.
10990
10991 2012-03-23 Pedro Alves <palves@redhat.com>
10992
10993 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10994 a variable whose type size is the same as the inferior's pointer
10995 size.
10996
10997 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10998
10999 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11000 struct siginfo.
11001 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11002 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11003 * linux-low.h: Include <signal.h>.
11004 (struct siginfo): Remove forward declaration.
11005 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11006 struct siginfo.
11007
11008 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11009
11010 * .gitignore: Ignore more files.
11011
11012 2012-03-19 Pedro Alves <palves@redhat.com>
11013 Jan Kratochvil <jan.kratochvil@redhat.com>
11014
11015 * server.c (cont_thread, general_thread): Add describing comments.
11016 (start_inferior): Clear `cont_thread'.
11017 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11018 of a process.
11019
11020 2012-03-15 Yao Qi <yao@codesourcery.com>
11021
11022 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11023 handling to ...
11024 (cmd_qtdp): ... here.
11025
11026 2012-03-15 Yao Qi <yao@codesourcery.com>
11027
11028 * tracepoint.c (struct tracepoint_action_ops): New.
11029 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11030 (m_tracepoint_action_download): New.
11031 (r_tracepoint_action_download): New.
11032 (x_tracepoint_action_download): New.
11033 (l_tracepoint_action_download): New.
11034 (add_tracepoint_action): Install `action->ops' according type.
11035 (download_tracepoint_1): Move code `download' function pointer
11036 of various tracepoint_action_ops.
11037
11038 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11039
11040 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11041 linux_ptrace_attach_warnings.
11042
11043 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11044
11045 * Makefile.in (linux-ptrace.o): New.
11046 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11047 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11048 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11049 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11050 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11051 of these targets.
11052 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11053
11054 2012-03-08 Yao Qi <yao@codesourcery.com>
11055 Pedro Alves <palves@redhat.com>
11056
11057 Fix PR server/13392.
11058 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11059 offset of JMP insn.
11060 * tracepoint.c (remove_tracepoint): New.
11061 (cmd_qtdp): Call remove_tracepoint when failed to install.
11062
11063 2012-03-07 Pedro Alves <palves@redhat.com>
11064
11065 * linux-low.c (get_detach_signal): New.
11066 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11067 Pass on pending signals to PTRACE_DETACH. Check the result of the
11068 ptrace call.
11069 * server.c (program_signals, program_signals_p): New.
11070 (handle_general_set): Handle QProgramSignals.
11071 * server.h (program_signals, program_signals_p): Declare.
11072
11073 2012-03-05 Pedro Alves <palves@redhat.com>
11074 Jan Kratochvil <jan.kratochvil@redhat.com>
11075
11076 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11077 New comment why.
11078
11079 2012-03-03 Yao Qi <yao@codesourcery.com>
11080
11081 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11082 agent_look_up_symbols.
11083
11084 2012-03-03 Yao Qi <yao@codesourcery.com>
11085
11086 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11087 (linux-x86-low.o): Likewise.
11088 * server.h: Remove in_process_agent_loaded.
11089 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11090 common/agent.c.
11091 Update callers.
11092
11093 2012-03-03 Yao Qi <yao@codesourcery.com>
11094
11095 * tracepoint.c (gdb_agent_capability): New global.
11096 (in_process_agent_loaded_ust): Renamed to
11097 `in_process_agent_supports_ust'.
11098 Update callers.
11099 (in_process_agent_supports_ust): Call agent_capability_check.
11100 (clear_installed_tracepoints): Assert that agent supports
11101 agent.
11102
11103 2012-03-03 Yao Qi <yao@codesourcery.com>
11104
11105 * linux-low.c (linux_supports_agent): New.
11106 (linux_target_ops): Initialize field `supports_agent' with
11107 linux_supports_agent.
11108 * target.h (struct target_ops) <supports_agent>: New.
11109 (target_supports_agent): New macro.
11110 * server.c (handle_general_set): Handle packet 'QAgent'.
11111 (handle_query): Send `QAgent+'.
11112 * Makefile.in (server.o): Depends on agent.h.
11113
11114 2012-03-03 Yao Qi <yao@codesourcery.com>
11115
11116 * Makefile.in (OBS): Add agent.o.
11117 Add new rule for agent.o.
11118 Track dependence of tracepoint.c on agent.h.
11119 * tracepoint.c (run_inferior_command_1):
11120 (run_inferior_command): Call agent_run_command.
11121 (gdb_ust_connect_sync_socket): Deleted. Move it to
11122 common/agent.c.
11123 (resume_thread, stop_thread): Likewise.
11124 (gdb_ust_socket_init): Renamed to ...
11125 (gdb_agent_socket_init): ... New.
11126 (gdb_ust_thread): Renamed to ...
11127 (gdb_agent_helper_thread): ... New.
11128 (gdb_ust_init): Move some code to ...
11129 (gdb_agent_init): ... here. New.
11130 [HAVE_UST]: Call gdb_ust_init.
11131 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11132 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11133 * config.in, configure: Regenerated.
11134
11135 2012-03-02 Pedro Alves <palves@redhat.com>
11136
11137 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11138 * linux-low.c (struct simple_pid_list): New.
11139 (stopped_pids): New a struct simple_pid_list pointer.
11140 (add_to_pid_list, pull_pid_from_list): New.
11141 (handle_extended_wait): Don't assume the first signal new children
11142 report is SIGSTOP. Adjust call to pull_pid_from_list.
11143 (linux_wait_for_lwp): Adjust.
11144
11145 2012-03-02 Yao Qi <yao@codesourcery.com>
11146
11147 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11148 debug log.
11149
11150 2012-03-02 Yao Qi <yao@codesourcery.com>
11151
11152 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11153 `stop_pc' and `tpoint'. Update caller.
11154
11155 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11156
11157 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11158 * linux-low.c (use_linux_regsets): New macro.
11159 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11160 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11161 (linux_register_in_regsets): New function.
11162 (usr_fetch_inferior_registers): Skip registers covered by
11163 regsets.
11164 (usr_store_inferior_registers): Likewise.
11165 (usr_fetch_inferior_registers): New macro.
11166 (usr_store_inferior_registers): Likewise.
11167 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11168 (linux_store_registers): Likewise.
11169 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11170 prototype.
11171 (init_registers_mips64_dsp_linux): Likewise.
11172 (init_registers_mips_linux): New macro.
11173 (init_registers_mips_dsp_linux): Likewise.
11174 (mips_dsp_num_regs): Likewise.
11175 (DSP_BASE, DSP_CONTROL): New fallback macros.
11176 (mips_base_regs): New macro.
11177 (mips_regmap): Use it. Fix the size.
11178 (mips_dsp_regmap): New variable.
11179 (mips_dsp_regset_bitmap): Likewise.
11180 (mips_arch_setup): New function.
11181 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11182 than mips_regmap.
11183 (mips_cannot_store_register): Likewise.
11184 (the_low_target): Update .arch_setup, .num_regs and .regmap
11185 initializers. Add .regset_bitmap initializer.
11186 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11187 initializer.
11188 * linux-bfin-low.c (the_low_target): Likewise.
11189 * linux-cris-low.c (the_low_target): Likewise.
11190 * linux-crisv32-low.c (the_low_target): Likewise.
11191 * linux-ia64-low.c (the_low_target): Likewise.
11192 * linux-m32r-low.c (the_low_target): Likewise.
11193 * linux-m68k-low.c (the_low_target): Likewise.
11194 * linux-ppc-low.c (the_low_target): Likewise.
11195 * linux-s390-low.c (the_low_target): Likewise.
11196 * linux-sh-low.c (the_low_target): Likewise.
11197 * linux-sparc-low.c (the_low_target): Likewise.
11198 * linux-tic6x-low.c (the_low_target): Likewise.
11199 * linux-x86-low.c (the_low_target): Likewise.
11200 * linux-xtensa-low.c (the_low_target): Likewise.
11201 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11202 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11203 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11204 srv_xmlfiles.
11205 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11206 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11207
11208 2012-02-29 Yao Qi <yao@codesourcery.com>
11209 Pedro Alves <palves@redhat.com>
11210
11211 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11212 `step_over_finished' is true.
11213
11214 2012-02-27 Pedro Alves <palves@redhat.com>
11215
11216 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11217 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11218
11219 2012-02-27 Pedro Alves <palves@redhat.com>
11220
11221 PR server/9684
11222 * linux-low.c (pid_is_stopped): New.
11223 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11224
11225 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11226
11227 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11228 of conditions.
11229
11230 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11231
11232 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11233
11234 2012-02-24 Luis Machado <lgustavo@codesourcery>
11235
11236 * server.c (handle_query): Advertise support for target-side
11237 breakpoint condition evaluation.
11238 (process_point_options): New function.
11239 (process_serial_event): When inserting a breakpoint, check for
11240 a target-side condition that should be evaluated.
11241
11242 * mem-break.c: Include regcache.h and ax.h.
11243 (point_cond_list_t): New data structure.
11244 (breakpoint) <cond_list>: New field.
11245 (find_gdb_breakpoint_at): Make non-static.
11246 (delete_gdb_breakpoint_at): Clear any target-side
11247 conditions.
11248 (clear_gdb_breakpoint_conditions): New function.
11249 (add_condition_to_breakpoint): Likewise.
11250 (add_breakpoint_condition): Likewise.
11251 (gdb_condition_true_at_breakpoint): Likewise.
11252 (gdb_breakpoint_here): Return result directly instead
11253 of going through a local variable.
11254
11255 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11256 (clear_gdb_breakpoint_conditions): Likewise.
11257 (add_breakpoint_condition): Likewise.
11258 (gdb_condition_true_at_breakpoint): Likewise.
11259
11260 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11261 (need_step_over_p): Take target-side breakpoint condition into
11262 consideration.
11263
11264 2012-02-24 Luis Machado <lgustavo@codesourcery>
11265
11266 * server.h: Include tracepoint.h.
11267 (agent_mem_read, agent_get_trace_state_variable_value,
11268 agent_set_trace_state_variable_value,
11269 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11270 get_set_tsv_func_addr): New prototypes.
11271
11272 * ax.h: New include file.
11273 * ax.c: New source file.
11274
11275 * tracepoint.c: Include ax.h.
11276 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11277 agent_expr, eval_result_type): Move to ax.h.
11278 (parse_agent_expr): Rename to ...
11279 (gdb_parse_agent_expr): ... this, make it non-static and move
11280 to ax.h.
11281 (unparse_agent_expr) Rename to ...
11282 (gdb_unparse_agent_expr): ... this, make it non-static and move
11283 to ax.h.
11284 (eval_agent_expr): Rename to ...
11285 (eval_tracepoint_agent_expr): ... this.
11286 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11287 forward declarations.
11288 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11289 (agent_get_trace_state_variable_value): New function.
11290 (agent_set_trace_state_variable_value): New function.
11291 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11292 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11293 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11294 (condition_true_at_tracepoint): Likewise.
11295 (parse_agent_expr): Rename to ...
11296 (gdb_parse_agent_expr): ... this and move to ax.c.
11297 (unparse_agent_expr): Rename to ...
11298 (gdb_unparse_agent_expr): ... this and move to ax.c.
11299 (gdb_agent_op_name): Move to ax.c.
11300 (eval_agent_expr): Rename to ...
11301 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11302 and move to ax.c.
11303 (eval_tracepoint_agent_expr): New function.
11304 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11305 non-static.
11306 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11307 ax.c.
11308 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11309 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11310 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11311 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11312 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11313 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11314 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11315 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11316 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11317 (compile_bytecodes): Remove forward declaration.
11318 (is_goto_target): Move to ax.c.
11319 (compile_bytecodes): Move to ax.c and call
11320 agent_get_trace_state_variable_value (...) and
11321 agent_set_trace_state_variable_value (...).
11322
11323 * Makefile.in: Update ax.c and IPA dependencies.
11324
11325 2012-02-24 Pedro Alves <palves@redhat.com>
11326
11327 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11328 (cmd_bigqtbuffer_circular): ... this. Only handle
11329 'QTBuffer:circular:'.
11330 (handle_tracepoint_general_set): Adjust.
11331
11332 2012-02-16 Yao Qi <yao@codesourcery.com>
11333
11334 * inferiors.c: Move code to ...
11335 * dll.c: .... here. New.
11336 * server.h: Declare clear_dlls.
11337 * Makefile.in (SFILES): Add dll.c.
11338 (OBS): Add dll.o
11339 (dll.o): New rule.
11340
11341 2012-02-11 Yao Qi <yao@codesourcery.com>
11342
11343 * server.c: (handle_monitor_command): Add a new parameter
11344 `own_buf'.
11345 (handle_query): Update caller.
11346
11347 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11348
11349 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11350 * configure, config.in: Regenerate.
11351 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11352 is not defined.
11353
11354 2012-02-02 Pedro Alves <palves@redhat.com>
11355
11356 Try SIGKILL first, then PTRACE_KILL.
11357 * linux-low.c (linux_kill_one_lwp): New.
11358 (linux_kill_one_lwp): Rename to ...
11359 (kill_one_lwp_callback): ... this. Use the new
11360 linux_kill_one_lwp.
11361
11362 2012-02-02 Pedro Alves <palves@redhat.com>
11363
11364 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11365 inferior.
11366
11367 2012-01-27 Pedro Alves <palves@redhat.com>
11368
11369 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11370 (elf_64_file_p): Make static.
11371 (linux_pid_exe_is_elf_64_file): New.
11372 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11373 Delete declarations.
11374 (linux_pid_exe_is_elf_64_file): Declare.
11375 * linux-x86-low.c (x86_arch_setup): Use
11376 linux_pid_exe_is_elf_64_file.
11377
11378 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11379
11380 * linux-low.c (linux_wait_for_event_1): Rename to ...
11381 (linux_wait_for_event): ... here and merge it with former
11382 linux_wait_for_event - new variable wait_ptid, use it.
11383 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11384
11385 2012-01-23 Pedro Alves <palves@redhat.com>
11386
11387 * server.c (main): Avoid yet another case of infinite loop while
11388 detaching/killing after a longjmp.
11389
11390 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11391
11392 Code cleanup.
11393 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11394
11395 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11396
11397 * hostio.c (handle_readlink): New function.
11398 (handle_vFile): Call it to handle "vFile:readlink" packets.
11399
11400 2012-01-20 Pedro Alves <palves@redhat.com>
11401 Ulrich Weigand <ulrich.weigand@linaro.org>
11402
11403 * server.c (handle_v_requests): Only support vAttach and vRun to
11404 start multiple processes when in extended protocol mode.
11405
11406 2012-01-17 Pedro Alves <palves@redhat.com>
11407
11408 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11409 memalign plus mprotect to allocate the scratch buffer.
11410
11411 2012-01-13 Pedro Alves <palves@redhat.com>
11412
11413 * server.c (attach_inferior): Clear `cont_thread'.
11414
11415 2012-01-13 Pedro Alves <palves@redhat.com>
11416
11417 * server.c (main): Avoid infinite loop while detaching/killing
11418 after a longjmp.
11419
11420 2012-01-09 Doug Evans <dje@google.com>
11421
11422 * server.c (start_inferior): Set last_ptid in --wrapper case.
11423
11424 2012-01-06 Yao Qi <yao@codesourcery.com>
11425
11426 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11427 defined.
11428 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11429
11430 2012-01-04 Yao Qi <yao@codesourcery.com>
11431
11432 * tracepoint.c (cmd_qtdp): Print debug message
11433 for static tracepoint.
11434
11435 2012-01-04 Yao Qi <yao@codesourcery.com>
11436
11437 * tracepoint.c (trace_vdebug): Differentiate debug message
11438 between gdbserver and IPA.
11439
11440 2012-01-03 Yao Qi <yao@codesourcery.com>
11441
11442 * tracepoint.c (tracepoint_was_hit): Don't collect for
11443 static tracepoint.
11444
11445 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11446
11447 * terminal.h: Reformat copyright header.
11448
11449 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11450
11451 * server.c (gdbserver_version): Update copyright year.
11452 * gdbreplay.c (gdbreplay_version): Likewise.
11453
11454 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11455
11456 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11457
11458 Revert:
11459 2011-12-18 Hui Zhu <teawater@gmail.com>
11460 * linux-low.c (linux_create_inferior): Save return value to ret.
11461
11462 2011-12-18 Hui Zhu <teawater@gmail.com>
11463
11464 * linux-low.c (linux_create_inferior): Save return value to ret.
11465
11466 2011-12-16 Doug Evans <dje@google.com>
11467
11468 * linux-low.c (linux_create_inferior): If stdio connection,
11469 redirect stdin from /dev/null, stdout to stderr.
11470 * remote-utils.c (remote_is_stdio): New static global.
11471 (remote_connection_is_stdio): New function.
11472 (remote_prepare): Handle stdio connection.
11473 (remote_open): Ditto.
11474 (remote_close): Don't close stdin for stdio connections.
11475 (read_prim,write_prim): New functions. Replace all calls to
11476 read/write to these.
11477 * server.c (main): Watch for "-" argument. Move call to
11478 remote_prepare before start_inferior.
11479 * server.h (STDIO_CONNECTION_NAME): New macro.
11480 (remote_connection_is_stdio): Declare.
11481
11482 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11483 in debugging output.
11484
11485 2011-12-15 Yao Qi <yao@codesourcery.com>
11486
11487 * tracepoint.c: Include sys/syscall.h.
11488 (gdb_ust_thread): Remove preprocessor conditional.
11489
11490 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11491
11492 * linux-low.c (linux_detach_one_lwp): Call
11493 the_low_target.prepare_to_resume before detaching.
11494
11495 2011-12-14 Yao Qi <yao@codesourcery.com>
11496
11497 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11498 of write.
11499
11500 2011-12-14 Yao Qi <yao@codesourcery.com>
11501
11502 * i386-low.c (i386_low_stopped_data_address): Initialize local
11503 variable `control'.
11504
11505 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11506
11507 PR remote/13492
11508
11509 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11510 DR_CONTROL unless necessary. Extend comments.
11511 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11512 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11513
11514 2011-12-13 Yao Qi <yao@codesourcery.com>
11515
11516 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11517 macros.
11518 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11519
11520 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11521
11522 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11523 Print new debug message for such case.
11524
11525 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11526
11527 Fix overlapping memcpy.
11528 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11529 the read_inferior_memory transfer.
11530 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11531 write_inferior_memory transfer.
11532 (set_fast_tracepoint_jump): New variable buf. Use it for the
11533 read_inferior_memory and write_inferior_memory transfers.
11534 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11535 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11536 Use it for the write_inferior_memory transfer.
11537 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11538 buffers.
11539
11540 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11541
11542 * linux-low.c (fetch_register, store_register): Make code
11543 consistent, fix formatting.
11544
11545 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11546
11547 * linux-low.c (usr_store_inferior_registers): Factor out code
11548 to handle individual registers into...
11549 (store_register): ... this new function.
11550
11551 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11552
11553 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11554 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11555 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11556 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11557 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11558 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11559 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11560 (srv_xmlfiles): Add new XML files.
11561
11562 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11563 and <sys/uio.h>.
11564 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11565 (init_registers_s390_linux32v1): Add prototype.
11566 (init_registers_s390_linux32v2): Likewise.
11567 (init_registers_s390_linux64v1): Likewise.
11568 (init_registers_s390_linux64v2): Likewise.
11569 (init_registers_s390x_linux64v1): Likewise.
11570 (init_registers_s390x_linux64v2): Likewise.
11571 (s390_num_regs): Increment to 52.
11572 (s390_regmap): Add orig_r2 register.
11573 (s390_num_regs_3264): Increment to 68.
11574 (s390_regmap_3264): Add orig_r2 register.
11575 (s390_collect_ptrace_register): Handle orig_r2 register.
11576 (s390_supply_ptrace_register): Likewise.
11577 (s390_fill_last_break): New function.
11578 (s390_store_last_break): Likewise.
11579 (s390_fill_system_call): New function.
11580 (s390_store_system_call): Likewise.
11581 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11582 register sets.
11583 (s390_check_regset): New function.
11584 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11585 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11586 Update target_regsets for available register sets.
11587
11588 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11589 Jan Kratochvil <jan.kratochvil@redhat.com>
11590
11591 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11592 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11593 New.
11594 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11595 * linux-low.h (struct process_info_private): New member r_debug.
11596 * server.c (handle_qxfer_libraries): Call
11597 the_target->qxfer_libraries_svr4.
11598 (handle_qxfer_libraries_svr4): New function.
11599 (qxfer_packets): New entry "libraries-svr4".
11600 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11601 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11602 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11603 PACKET_qXfer_libraries_svr4.
11604
11605 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11606
11607 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11608 PSW address/mask between 8-byte and 16-byte formats.
11609 (s390_supply_ptrace_register): Likewise.
11610 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11611 basic addressing mode bit.
11612
11613 2011-11-24 Stan Shebs <stan@codesourcery.com>
11614
11615 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11616
11617 2011-11-17 Stan Shebs <stan@codesourcery.com>
11618
11619 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11620 (tracing_start_time): New global.
11621 (tracing_stop_time): New global.
11622 (tracing_user_name): New global.
11623 (tracing_notes): New global.
11624 (tracing_stop_note): New global.
11625 (cmd_qtstart): Set traceframe_usage, start_time.
11626 (stop_tracing): Set stop_time.
11627 (cmd_qtstatus): Report additional status.
11628 (cmd_qtp): New function.
11629 (handle_tracepoint_query): Call it.
11630 (cmd_qtnotes): New function.
11631 (handle_tracepoint_general_set): Call it.
11632 (get_timestamp): Rename from tsv_get_timestamp.
11633
11634 2011-11-14 Stan Shebs <stan@codesourcery.com>
11635 Kwok Cheung Yeung <kcy@codesourcery.com>
11636
11637 * linux-x86-low.c (small_jump_insn): New.
11638 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11639 trampoline and error message, build a trampoline and issue a small
11640 jump instruction to it.
11641 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11642 trampoline and error message.
11643 (x86_get_min_fast_tracepoint_insn_len): New.
11644 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11645 * linux-low.h (struct linux_target_ops): Add arguments to
11646 install_fast_tracepoint_jump_pad operation, add new operation.
11647 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11648 arguments.
11649 (linux_get_min_fast_tracepoint_insn_len): New function.
11650 (linux_target_op): Add new operation.
11651 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11652 (gdb_trampoline_buffer_end): Ditto.
11653 (gdb_trampoline_buffer_error): Ditto.
11654 (struct ipa_sym_addresses): Add fields for new IPA variables.
11655 (symbol_list): Add entries for new IPA variables.
11656 (struct tracepoint): Add fields to hold the address range of the
11657 trampoline used by the tracepoint.
11658 (trampoline_buffer_head): New static variable.
11659 (trampoline_buffer_tail): Ditto.
11660 (claim_trampoline_space): New function.
11661 (have_fast_tracepoint_trampoline_buffer): New function.
11662 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11663 structure.
11664 (install_fast_tracepoint): Ditto, also add error buffer argument.
11665 (cmd_qtminftpilen): New function.
11666 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11667 (fast_tracepoint_from_trampoline_address): New function.
11668 (fast_tracepoint_collecting): Handle trampoline as part of jump
11669 pad space.
11670 (set_trampoline_buffer_space): New function.
11671 (initialize_tracepoint): Initialize new IPA variables.
11672 * target.h (struct target_ops): Add arguments to
11673 install_fast_tracepoint_jump_pad operation, add new
11674 get_min_fast_tracepoint_insn_len operation.
11675 (target_get_min_fast_tracepoint_insn_len): New.
11676 (install_fast_tracepoint_jump_pad): Add arguments.
11677 * server.h (IPA_BUFSIZ): Define.
11678 * linux-i386-ipa.c: Include extra header files.
11679 (initialize_fast_tracepoint_trampoline_buffer): New function.
11680 (initialize_low_tracepoint): Call it.
11681 * server.h (set_trampoline_buffer_space): Declare.
11682 (claim_trampoline_space): Ditto.
11683 (have_fast_tracepoint_trampoline_buffer): Ditto.
11684
11685 2011-11-14 Yao Qi <yao@codesourcery.com>
11686
11687 * server.c (handle_query): Handle InstallInTrace for qSupported.
11688 * tracepoint.c (add_tracepoint): Sort list.
11689 (install_tracepoint, download_tracepoint): New.
11690 (cmd_qtdp): Call them to install and download tracepoints.
11691 (sort_tracepoints): Removed.
11692 (cmd_qtstart): Update.
11693
11694 2011-11-14 Yao Qi <yao@codesourcery.com>
11695
11696 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11697 * mem-break.h: Declare.
11698 * tracepoint.c (cmd_qtstart): Move some code to ...
11699 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11700 New.
11701 (download_tracepoints): Move some code to ...
11702 (download_tracepoint_1): ... here. New.
11703
11704 2011-11-08 Yao Qi <yao@codesourcery.com>
11705
11706 * remote-utils.c (relocate_instruction): A comment fix.
11707
11708 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11709
11710 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11711 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11712 dr_status_mirror and dr_control_mirror from debug_reg_state.
11713 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11714 (i386_initial_stuff): Remove use of deleted globals.
11715 (i386_get_thread_context, i386_set_thread_context,
11716 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11717 from debug_reg_state.
11718
11719 2011-11-05 Yao Qi <yao@codesourcery.com>
11720
11721 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11722 address as TPOINT's.
11723
11724 2011-11-02 Stan Shebs <stan@codesourcery.com>
11725
11726 * tracepoint.c (agent_mem_read_string): New function.
11727 (eval_agent_expr): Call it for tracenz.
11728 * server.c (handle_query): Report support for tracenz.
11729
11730 2011-11-02 Yao Qi <yao@codesourcery.com>
11731
11732 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11733
11734 2011-11-02 Yao Qi <yao@codesourcery.com>
11735
11736 * target.h: Fix a typo in comment.
11737
11738 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11739
11740 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11741 clobber the breakpoints' shadows with fast tracepoint jumps.
11742 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11743 * target.c (write_inferior_memory): Also pass MYADDR down to
11744 check_mem_write.
11745
11746 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11747
11748 * configure.ac: Check support for personality routine.
11749 * configure: Regenerate.
11750 * config.in: Likewise.
11751 * linux-low.c: Include <sys/personality.h>.
11752 Define ADDR_NO_RANDOMIZE if necessary.
11753 (linux_create_inferior): Disable address space randomization when
11754 forking inferior, if requested.
11755 (linux_supports_disable_randomization): New function.
11756 (linux_target_ops): Install it.
11757 * server.h (disable_randomization): Declare.
11758 * server.c (disable_randomization): New global variable.
11759 (handle_general_set): Handle QDisableRandomization.
11760 (handle_query): Likewise for qSupported.
11761 (main): Support --disable-randomization and --no-disable-randomization
11762 command line arguments.
11763 * target.h (struct target_ops): Add supports_disable_randomization.
11764 (target_supports_disable_randomization): New macro.
11765
11766 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11767
11768 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11769 ifdef check.
11770 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11771 [!PT_GETDSBT] (target_loadmap): New definition.
11772 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11773 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11774 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11775 and PT_GETDSBT to LINUX_LOADMAP.
11776 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11777 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11778
11779 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11780
11781 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11782 (arm_linux_hwbp_cap): New static variable.
11783 (arm_linux_get_hwbp_cap): Replace by ...
11784 (arm_linux_init_hwbp_cap): ... this new function.
11785 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11786 (arm_linux_get_hw_watchpoint_count): Likewise.
11787 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11788 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11789 (arm_prepare_to_resume): Use perror_with_name instead of error.
11790
11791 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11792
11793 * linux-arm-low.c: Include <signal.h>.
11794 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11795 (struct arm_linux_hwbp_cap): New data type.
11796 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11797 (struct arm_linux_hw_breakpoint): New data type.
11798 (MAX_BPTS, MAX_WPTS): Define.
11799 (struct arch_process_info, struct arch_lwp_info): New data types.
11800 (arm_linux_get_hwbp_cap): New function.
11801 (arm_linux_get_hw_breakpoint_count): Likewise.
11802 (arm_linux_get_hw_watchpoint_count): Likewise.
11803 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11804 (arm_hwbp_control_initialize): Likewise.
11805 (arm_hwbp_control_is_enabled): Likewise.
11806 (arm_hwbp_control_is_initialized): Likewise.
11807 (arm_hwbp_control_disable): Likewise.
11808 (arm_linux_hw_breakpoint_equal): Likewise.
11809 (arm_linux_hw_point_initialize): Likewise.
11810 (struct update_registers_data): New data structure.
11811 (update_registers_callback: New function.
11812 (arm_insert_point): Likewise.
11813 (arm_remove_point): Likewise.
11814 (arm_stopped_by_watchpoint): Likewise.
11815 (arm_stopped_data_address): Likewise.
11816 (arm_new_process): Likewise.
11817 (arm_new_thread): Likewise.
11818 (arm_prepare_to_resume): Likewise.
11819 (the_low_target): Register arm_insert_point, arm_remove_point,
11820 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11821 arm_new_thread, and arm_prepare_to_resume.
11822
11823 2011-09-15 Stan Shebs <stan@codesourcery.com>
11824
11825 * server.h (struct emit_ops): Add compare-goto fields.
11826 * tracepoint.c (gdb_agent_op_sizes): New table.
11827 (emit_eq_goto): New function.
11828 (emit_ne_goto): New function.
11829 (emit_lt_goto): New function.
11830 (emit_le_goto): New function.
11831 (emit_gt_goto): New function.
11832 (emit_ge_goto): New function.
11833 (is_goto_target): New function.
11834 (compile_bytecodes): Recognize special cases of compare-goto
11835 combinations and call specialized emitters for them.
11836 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11837 (amd64_emit_ne_goto): New function.
11838 (amd64_emit_lt_goto): New function.
11839 (amd64_emit_le_goto): New function.
11840 (amd64_emit_gt_goto): New function.
11841 (amd64_emit_ge_goto): New function.
11842 (amd64_emit_ops): Add the new functions.
11843 (i386_emit_eq_goto): New function.
11844 (i386_emit_ne_goto): New function.
11845 (i386_emit_lt_goto): New function.
11846 (i386_emit_le_goto): New function.
11847 (i386_emit_gt_goto): New function.
11848 (i386_emit_ge_goto): New function.
11849 (i386_emit_ops): Add the new functions.
11850
11851 2011-09-08 Stan Shebs <stan@codesourcery.com>
11852
11853 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11854 (i386_emit_epilogue): Restore %ebx.
11855
11856 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11857
11858 * server.c (step_thread): Remove definition.
11859 (process_serial_event): Don't handle Hs.
11860 * server.h (step_thread): Remove declaration.
11861 * target.c (set_desired_inferior): Remove use of step_thread.
11862
11863 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11864
11865 * linux-low.c: Include linux-procfs.h.
11866 (linux_attach_lwp_1): Update comments.
11867 (linux_attach): Scan for existing threads when attaching to a
11868 process that is the tgid.
11869 * Makefile.in: Update dependencies.
11870
11871 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11872
11873 * configure.srv: Add linux-procfs.o dependencies.
11874
11875 2011-08-14 Yao Qi <yao@codesourcery.com>
11876
11877 * target.h (struct target_ops): Fix indent.
11878 * win32-low.c (win32_target_ops): Fix comment.
11879
11880 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11881 Yao Qi <yao@codesourcery.com>
11882
11883 * Makefile.in (clean): Remove tic6x-*.c files.
11884 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11885 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11886 (tic6x-c64xp-linux.c): Likewise.
11887 * configure.srv: Add support for tic6x-*-uclinux.
11888 * linux-tic6x-low.c: New.
11889 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11890
11891 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11892 Yao Qi <yao@codesourcery.com>
11893
11894 * target.h (struct target_ops): Add read_loadmap.
11895 * linux-low.c (struct target_loadseg): New type.
11896 (struct target_loadmap): New type.
11897 (linux_read_loadmap): New function.
11898 (linux_target_ops): Add linux_read_loadmap.
11899 * server.c (handle_query): Support qXfer:fdpic:read packet.
11900 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11901 to NULL.
11902
11903 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11904
11905 * win32-low.c: Include <stdint.h>.
11906
11907 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11908
11909 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11910 to the inferior here.
11911 (i386_remove_aligned_watchpoint): Ditto.
11912 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11913 fit part of the watchpoint in the debug registers.
11914 (i386_update_inferior_debug_regs): New.
11915 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11916 registers, and only update the inferior on success.
11917 (i386_low_remove_watchpoint): Ditto.
11918
11919 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11920
11921 * linux-low.c (compare_ints, unique, list_threads, show_process,
11922 linux_core_of_thread): Delete.
11923 (linux_target_ops): Change linux_core_of_thread to
11924 linux_common_core_of_thread.
11925 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11926 * utils.c (malloc_failure): Change type of argument.
11927 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11928 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11929 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11930 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11931 (IPA_OBJS): Add common-utils-ipa.o.
11932 (ptid_h, linux_osdata_h): New macros.
11933 (server_h): Add common/common-utils.h, common/xml-utils.h,
11934 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11935 common/ptid.h.
11936 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11937 ptid.o, buffer.o): New rules.
11938 (linux-low.o): Add common/linux-osdata.h as a dependency.
11939 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11940 * configure.ac: Add AC_HEADER_DIRENT check.
11941 * config.in: Regenerate.
11942 * configure: Regenerate.
11943 * remote-utils.c (xml_escape_text): Delete.
11944 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11945 buffer_xml_printf): Move to common/buffer.c.
11946 * server.c (main): Remove call to initialize_inferiors.
11947 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11948 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11949 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11950 internal_error, gdb_assert, gdb_assert_fail): Delete.
11951 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11952 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11953 common/buffer.h.
11954 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11955 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11956 initialize_inferiors): Delete.
11957
11958 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11959
11960 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11961 symbol error.
11962
11963 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11964
11965 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11966 assertion.
11967 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11968
11969 2011-05-26 Yao Qi <yao@codesourcery.com>
11970
11971 * Makefile.in (thread-db.o): Track dependence to
11972 common/gdb_thread_db.h.
11973 * thread-db.c: include gdb_thread_db.h from right place.
11974
11975 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11976
11977 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11978 __FILE__ and __LINE__ to internal_error.
11979
11980 2011-05-13 Doug Evans <dje@google.com>
11981
11982 * thread-db.c (try_thread_db_load_from_sdir): New function.
11983 (try_thread_db_load_from_dir): New function.
11984 (thread_db_load_search): Handle $sdir, ignore $pdir.
11985 Remove trying of system directories if search of
11986 libthread-db-search-path fails, that is now done via $sdir.
11987
11988 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11989
11990 * server.c (handle_query): Add EnableDisableTracepoints to the list
11991 of supported features.
11992 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11993 tracepoints.
11994 (cmd_qtenable_disable): New.
11995 (cmd_qtstart): Install tracepoints even if disabled.
11996 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11997 receiving a QTEnable or QTDisable packet.
11998 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11999 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12000 tracepoints.
12001 (gdb_probe): Skip data collection if static tracepoint is disabled.
12002
12003 2011-05-10 Doug Evans <dje@google.com>
12004
12005 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12006
12007 2011-05-04 Doug Evans <dje@google.com>
12008
12009 * linux-low.c (linux_join): Skip process lookup.
12010 * spu-low.c (spu_join): Ditto.
12011 * server.c (join_inferiors_callback): Delete.
12012 (process_serial_event): For 'D' packet (detach) call join_inferior
12013 directly.
12014
12015 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12016
12017 * README: Don't mention xscale*-*-linux*.
12018 * configure.srv (xscale*-*-linux*): Don't handle target.
12019
12020 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12021
12022 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12023 casting pointers.
12024 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12025 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12026 (i386_emit_void_call_2): Likewise.
12027
12028 2011-04-26 Yao Qi <yao@codesourcery.com>
12029
12030 * linux-low.c: Move common macros to linux-ptrace.h.
12031 Include linux-ptrace.h.
12032 * Makefile.in (linux_ptrace_h): New.
12033 (linux-low.o): Depends on linux-ptrace.h.
12034
12035 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12036
12037 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12038 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12039 (remote_prepare): New function with most of the TCP code from ...
12040 (remote_open): ... here. Detect PORT here unconditionally. Move also
12041 setting transport_is_reliable.
12042 * server.c (run_once): New variable.
12043 (gdbserver_usage): Document it.
12044 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12045 the first run if RUN_ONCE.
12046 * server.h (run_once, remote_prepare): New declarations.
12047
12048 2011-04-19 Tom Tromey <tromey@redhat.com>
12049
12050 * win32-low.c (handle_load_dll): Remove duplicate "the".
12051
12052 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12053
12054 Remove support for old Cygwin 1.5 versions.
12055 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12056 function to avoid warning.
12057 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12058 warning.
12059
12060 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12061
12062 * gdbserver/server.h (Macro _): Define it if not available.
12063
12064 2011-03-14 Michael Snyder <msnyder@vmware.com>
12065
12066 * hostio.c (handle_close): Remove unnecessary null test.
12067
12068 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12069
12070 * Makefile.in (maintainer-clean realclean distclean): Remove
12071 "make ... subdir_do" command.
12072
12073 2011-03-10 Michael Snyder <msnyder@vmware.com>
12074
12075 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12076
12077 * server.c (handle_v_run): Free alloced buffer on early return.
12078
12079 2011-03-09 Yao Qi <yao@codesourcery.com>
12080
12081 Revert:
12082 2011-03-04 Yao Qi <yao@codesourcery.com>
12083
12084 * Makefile.in: Remove GNU make feature --directory.
12085
12086 2011-03-05 Yao Qi <yao@codesourcery.com>
12087
12088 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12089 (subdir_do): New make target. Copied from gdb/Makefile.
12090 (maintainer-clean, realclean, distclean, clean): Call corresponding
12091 make targets in common/Makefile.
12092
12093 2011-02-11 Yao Qi <yao@codesourcery.com>
12094
12095 * configure.ac: Call AC_PROG_RANLIB.
12096 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12097 * configure: Regenerate.
12098
12099 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12100
12101 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12102
12103 2011-03-06 Yao Qi <yao@codesourcery.com>
12104
12105 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12106
12107 2011-03-05 Yao Qi <yao@codesourcery.com>
12108
12109 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12110 (subdir_do): New make target. Copied from gdb/Makefile.
12111 (maintainer-clean, realclean, distclean, clean): Call corresponding
12112 make targets in common/Makefile.
12113
12114 2011-03-04 Yao Qi <yao@codesourcery.com>
12115
12116 * Makefile.in: Remove GNU make feature --directory.
12117
12118 2011-03-04 Michael Snyder <msnyder@vmware.com>
12119
12120 * server.c (queue_stop_reply): Call xmalloc not malloc.
12121
12122 2011-03-02 Michael Snyder <msnyder@vmware.com>
12123
12124 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12125
12126 2011-02-28 Michael Snyder <msnyder@vmware.com>
12127
12128 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12129 (cmd_qtframe): Ditto.
12130 (cmd_qtbuffer): Ditto.
12131 (cmd_bigqtbuffer): Ditto.
12132
12133 * utils.c (decimal2str): Initialize 'width' to nine, then
12134 don't mess with it.
12135
12136 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12137
12138 * hostio.c (require_data): Free *data, not data.
12139
12140 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12141
12142 * hostio.c (require_data): Use free, not xfree.
12143
12144 2011-02-27 Michael Snyder <msnyder@vmware.com>
12145
12146 * server.c (handle_query): Discard unused value.
12147
12148 * hostio.c (require_data): Free malloc memory before returning
12149 error.
12150
12151 2011-02-26 Michael Snyder <msnyder@vmware.com>
12152
12153 * linux-low.c (list_threads): Call closedir for dirent.
12154
12155 2011-02-27 Michael Snyder <msnyder@vmware.com>
12156
12157 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12158 a case statement falls through.
12159
12160 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12161
12162 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12163 in comparison.
12164
12165 2011-02-26 Michael Snyder <msnyder@vmware.com>
12166
12167 * utils.c (decimal2str): Eliminate dead code and dead param.
12168 (pulongest): Drop dead param from call to decimal2str.
12169 (plongest): Ditto.
12170
12171 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12172
12173 Revert the following patch (not approved yet):
12174 2011-02-21 Hui Zhu <teawater@gmail.com>
12175 * tracepoint.c (tp_printf): New function.
12176 (eval_agent_expr): Handle gdb_agent_op_printf.
12177
12178 2011-02-21 Hui Zhu <teawater@gmail.com>
12179
12180 * tracepoint.c (tp_printf): New function.
12181 (eval_agent_expr): Handle gdb_agent_op_printf.
12182
12183 2011-02-18 Tom Tromey <tromey@redhat.com>
12184
12185 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12186 (tracepoint.o): Likewise.
12187 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12188 (gdb_agent_op_names): Likewise.
12189
12190 2011-02-18 Tom Tromey <tromey@redhat.com>
12191
12192 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12193 gdb_agent_op_rot>: New constants.
12194 (gdb_agent_op_names): Add pick and roll.
12195 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12196 cases.
12197
12198 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12199
12200 * aclocal.m4: Regenerated with aclocal-1.11.1.
12201
12202 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12203
12204 * server.c (handle_qxfer_traceframe_info): New.
12205 (qxfer_packets): Register "traceframe-info".
12206 (handle_query): Report support for qXfer:traceframe-info:read+.
12207 * tracepoint.c (match_blocktype): New.
12208 (traceframe_find_block_type): Rename to ...
12209 (traceframe_walk_blocks): ... this. Add callback filter argument,
12210 and use it.
12211 (traceframe_find_block_type): New, reimplemented on top of
12212 traceframe_walk_blocks.
12213 (build_traceframe_info_xml): New.
12214 (traceframe_read_info): New.
12215 * server.h (traceframe_read_info): Declare.
12216
12217 2011-02-11 Yao Qi <yao@codesourcery.com>
12218
12219 * configure.ac: Call AC_PROG_RANLIB.
12220 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12221 * configure: Regenerate.
12222
12223 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12224
12225 * server.c (gdb_read_memory): Change return semantics to allow
12226 partial transfers.
12227 (handle_search_memory_1): Adjust.
12228 (process_serial_event) <'m' packet>: Handle partial transfers.
12229 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12230
12231 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12232
12233 * regcache.c (init_register_cache): Initialize
12234 regcache->register_status.
12235 (free_register_cache): Release regcache->register_status.
12236 (regcache_cpy): Copy register_status.
12237 (registers_to_string): Print 'x's for unavailable registers.
12238 (supply_register): Mark the register's status valid or
12239 unavailable, depending on whether a buffer was passed in or not.
12240 (supply_register_zeroed): New.
12241 (supply_regblock): Mark the registers' status valid or
12242 unavailable, depending on whether a buffer was passed in or not.
12243 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12244 (struct regcache): New `register_status' field.
12245 (supply_register_zeroed): Declare.
12246 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12247 supply_register_zeroed, rather than passing a NULL buffer to
12248 supply_register.
12249 * tracepoint.c (fetch_traceframe_registers): Update comment.
12250
12251 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12252
12253 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12254 buffer explicit.
12255
12256 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12257
12258 * server.h (decode_xfer_write): Change prototype.
12259 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12260 and don't extract the annex here.
12261 * server.c (decode_xfer_read): Remove `annex' parameter,
12262 and don't extract the annex here.
12263 (decode_xfer): New.
12264 (struct qxfer): New.
12265 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12266 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12267 (handle_qxfer_statictrace): New functions, abstracted out from
12268 handle_query, and made to use the struct qxfer interface.
12269 (handle_threads_qxfer_proper): Rename to ...
12270 (handle_qxfer_threads_proper): ... this.
12271 (handle_threads_qxfer): Rename to ...
12272 (handle_qxfer_threads): ... this. Adjust.
12273 (qxfer_packets): New array.
12274 (handle_qxfer): New function.
12275 (handle_query): Use handle_qxfer.
12276
12277 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12278
12279 * gdbreplay.c: Shorten lines of >= 80 columns.
12280 * linux-low.c: Ditto.
12281 * linux-ppc-low.c: Ditto.
12282 * linux-s390-low.c: Ditto.
12283 * linux-sparc-low.c: Ditto.
12284 * linux-x86-low.c: Ditto.
12285 * linux-xtensa-low.c: Ditto.
12286 * mem-break.c: Ditto.
12287 * nto-low.c: Ditto.
12288 * regcache.h: Ditto.
12289 * remote-utils.c: Ditto.
12290 * server.c: Ditto.
12291 * server.h: Ditto.
12292 * thread-db.c: Ditto.
12293 * tracepoint.c: Ditto.
12294 * utils.c: Ditto.
12295 * win32-low.h: Ditto.
12296
12297 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12298
12299 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12300 update.
12301
12302 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12303
12304 * server.c (gdbserver_version): Update copyright year in version
12305 output.
12306 * gdbreplay.c (gdbreplay_version): Ditto.
12307
12308 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12309
12310 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12311 * linux-bfin-low.c: New file.
12312 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12313 PT_DATA_ADDR for BFIN targets.
12314 * Makefile.in (SFILES): Add linux-bfin-low.c.
12315 (clean): Remove reg-bfin.c.
12316 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12317 * README: Mention supported Blackfin targets.
12318
12319 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12320
12321 * .gitignore: New file.
12322
12323 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12324
12325 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12326
12327 2010-10-22 Jie Zhang <jie@codesourcery.com>
12328
12329 * Makefile.in: Add FLAGS_TO_PASS variable.
12330 (install): Remove dependency of install-only and recursively
12331 invoke make for install-only.
12332
12333 2010-10-04 Doug Evans <dje@google.com>
12334
12335 * Makefile.in (uninstall): Use $(DESTDIR).
12336
12337 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12338
12339 PR gdb/11842
12340
12341 * linux-x86-low.c (compat_siginfo_from_siginfo)
12342 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12343 si_code is < 0. Check for si_code == SI_TIMER before checking for
12344 si_code < 0.
12345
12346 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12347
12348 * lynx-i386-low.c: New file.
12349 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12350
12351 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12352
12353 * lynx-low.c (ptrace_request_to_str): Remove handling for
12354 request values that have been removed in LynxOS 5.x.
12355
12356 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12357
12358 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12359 <ptrace.h>
12360
12361 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12362
12363 * configure.ac: Add --enable-inprocess-agent option.
12364 * configure: Rebuilt.
12365
12366 2010-09-06 Yao Qi <yao@codesourcery.com>
12367
12368 * linux-low.c (linux_kill): Remove unused variable.
12369 (linux_stabilize_threads): Likewise.
12370 * server.c (start_inferior): Likewise.
12371 (queue_stop_reply_callback): Likewise.
12372 * tracepoint.c (do_action_at_tracepoint): Likewise.
12373
12374 2010-09-06 Yao Qi <yao@codesourcery.com>
12375
12376 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12377 on return.
12378
12379 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12380
12381 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12382
12383 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12384
12385 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12386 "$(IPA_DEPFILES)".
12387
12388 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12389
12390 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12391 gdbserver/lynx-ppc-low.c: New files.
12392 * Makefile.in (lynx_low_h): New variable.
12393 (lynx-low.o, lynx-ppc-low.o): New rules.
12394 * configure.ac: On LynxOS, link with -lnetinet.
12395 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12396 * configure: regenerate.
12397
12398 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12399
12400 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12401 * configure.ac: Add check for vasprintf and vsnprintf.
12402 * configure, config.in: Regenerate.
12403 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12404
12405 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12406
12407 * gdbreplay.c: Move include of alloca.h up, next to include of
12408 malloc.h.
12409 * server.h: Add include of malloc.h.
12410 * mem-break.c: Remove include of malloc.h.
12411 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12412
12413 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12414
12415 * Makefile.in (memmem.o): Build with -Wno-error.
12416
12417 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12418
12419 * utils.c (xsnprintf): Make non-static.
12420 * server.h: Add xsnprintf declaration.
12421 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12422 replace calls to snprintf by calls to xsnprintf throughout.
12423
12424 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12425
12426 * configure.ac: Add configure check for alloca.
12427 * configure, config.in: Regenerate.
12428 * server.h: Include alloca.h if it exists.
12429 * gdbreplay.c: Include alloca.h if it exists.
12430
12431 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12432
12433 * linux-low.c (__SIGRTMIN): Define if not already defined.
12434 (linux_create_inferior): Check for __ANDROID__ rather than
12435 __SIGRTMIN.
12436 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12437 are already deferred.
12438 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12439 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12440 stopped and already has a pending signal to report.
12441 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12442 a pending signal to report or is moving out of a jump pad.
12443 (linux_init_signals): Check for __ANDROID__ rather than
12444 __SIGRTMIN.
12445
12446 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12447
12448 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12449 debug_threads check. Avoid a linear search when not doing debug
12450 output.
12451
12452 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12453
12454 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12455 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12456 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12457 (process_event): Change local fd's type to gdb_fildes_t.
12458 (create_file_handler): Adjust prototype.
12459 (delete_file_handler): Adjust prototype.
12460 (handle_file_event): Adjust prototype. Use pfildes.
12461 (create_file_event): Adjsut prototype.
12462 * remote-utils.c (remote_desc, listen_desc): Change type to
12463 gdb_fildes_t.
12464 * server.h: New gdb_fildes_t typedef.
12465 [USE_WIN32API]: Include winsock2.h.
12466 (delete_file_handler, add_file_handler): Adjust prototypes.
12467 (pfildes): Declare.
12468 * utils.c (pfildes): New.
12469
12470 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12471
12472 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12473 * configure: Regenerate.
12474
12475 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12476
12477 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12478 (linux_done_accessing_memory): ... this.
12479 (linux_target_ops): Adjust.
12480 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12481 * nto-low.c (nto_target_ops): Adjust comment.
12482 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12483 * spu-low.c (spu_target_ops): Adjust comment.
12484 * target.h (target_ops): Rename unprepare_to_access_memory field
12485 to done_accessing_memory.
12486 (unprepare_to_access_memory): Rename to ...
12487 (done_accessing_memory): ... this.
12488
12489 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12490
12491 * linux-low.c (linux_prepare_to_access_memory): New.
12492 (linux_unprepare_to_access_memory): New.
12493 (linux_target_ops): Install them.
12494 * server.c (read_memory): Rename to ...
12495 (gdb_read_memory): ... this. Use
12496 prepare_to_access_memory/prepare_to_access_memory.
12497 (write_memory): Rename to ...
12498 (gdb_write_memory): ... this. Use
12499 prepare_to_access_memory/prepare_to_access_memory.
12500 (handle_search_memory_1): Adjust.
12501 (process_serial_event): Adjust.
12502 * target.h (struct target_ops): New fields
12503 prepare_to_access_memory and unprepare_to_access_memory.
12504 (prepare_to_access_memory, unprepare_to_access_memory): New.
12505 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12506 prepare_to_access_memory/prepare_to_access_memory.
12507 * nto-low.c (nto_target_ops): Adjust.
12508 * spu-low.c (spu_target_ops): Adjust.
12509 * win32-low.c (win32_target_ops): Adjust.
12510
12511 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12512
12513 * Makefile.in (WARN_CFLAGS): Get it from configure.
12514 (WERROR_CFLAGS): New.
12515 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12516 * configure.ac: Introduce --enable-werror, which adds -Werror to
12517 the compiler command line. Enabled by default. Disable with
12518 --disable-werror. Add -Wdeclaration-after-statement
12519 Wpointer-arith and -Wformat-nonliteral to warning flags.
12520 * configure: Regenerate.
12521
12522 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12523
12524 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12525
12526 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12527
12528 * gdbreplay.c (remote_error): New.
12529 (gdbchar): New.
12530 (expect): Use gdbchar. Check for error reading from GDB.
12531 Clarify sync error output.
12532 (play): Check for errors writing to GDB.
12533 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12534 * remote-utils.c (getpkt): Check for errors writing to the remote
12535 descriptor.
12536
12537 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12538
12539 * linux-low.c (linux_wait_1): Move non-debugging code out of
12540 `debug_threads' control.
12541
12542 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12543
12544 * linux-low.c (linux_wait_1): Don't set last_status here.
12545 * server.c (push_event, queue_stop_reply_callback): Assert we're
12546 not pushing a TARGET_WAITKIND_IGNORE event.
12547 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12548 (myresume, handle_target_event): Set the thread's last_resume_kind
12549 and last_status from the target returned status.
12550
12551 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12552
12553 PR threads/10729
12554
12555 * linux-x86-low.c (update_debug_registers_callback): New.
12556 (i386_dr_low_set_addr): Use it.
12557 (i386_dr_low_get_addr): New.
12558 (i386_dr_low_set_control): Use update_debug_registers_callback.
12559 (i386_dr_low_get_control): New.
12560 (i386_dr_low_get_status): Adjust.
12561 * linux-low.c (linux_stop_lwp): New.
12562 * linux-low.h (linux_stop_lwp): Declare.
12563
12564 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12565 argument instead of a i386_debug_reg_state.
12566 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12567 a i386_debug_reg_state.
12568 (i386_insert_aligned_watchpoint): Adjust.
12569 (i386_remove_aligned_watchpoint): Adjust.
12570 (i386_low_stopped_data_address): Read the debug registers from the
12571 inferior instead of from the mirrors.
12572 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12573 (i386_dr_low_get_addr): Declare.
12574 (i386_dr_low_get_control): Declare.
12575 (i386_dr_low_get_status): Change prototype.
12576
12577 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12578 (i386_dr_low_get_addr): New.
12579 (i386_dr_low_get_control): New.
12580 (i386_dr_low_get_status): Adjust prototype. Return
12581 dr_status_mirror.
12582 (i386_initial_stuff): Clear dr_status_mirror and
12583 dr_control_mirror.
12584 (i386_get_thread_context): Adjust.
12585 (i386_set_thread_context): Adjust.
12586 (i386_thread_added): Adjust.
12587
12588 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12589
12590 * linux-low.h (linux_thread_area): Delete declaration.
12591
12592 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12593
12594 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12595 after its termination.
12596
12597 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12598
12599 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12600 (gdb_wants_all_stopped): Delete.
12601 (linux_wait_1): Don't call them.
12602 * server.c (handle_v_cont): Tag all threads as want-stopped.
12603 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12604 stopped as "client-wants-stopped".
12605
12606 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12607
12608 * Makefile.in (signals_h): New.
12609 (server_h): Depend on it.
12610 (server.o): Don't depend on $(signals_def).
12611 (signals.o): Depend on $(signals_def).
12612
12613 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12614
12615 * Makefile.in (signals_def): New.
12616 (server_h): Append include/gdb/signals.h and signals_def.
12617 (server.o): Append signals_def.
12618
12619 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12620
12621 * server.c (handle_target_event): Use target_signal_to_host for
12622 resume_info.sig initialization.
12623 * target.h (struct thread_resume) <sig>: New comment.
12624
12625 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12626
12627 * server.c (handle_query): strcpy() the returned string from paddress()
12628 instead of sprintf().
12629 * utils.c (paddress): Return phex_nz().
12630
12631 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12632
12633 * server.c (handle_v_cont): Call mourn_inferior if process
12634 just exited.
12635 (myresume): Likewise.
12636
12637 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12638
12639 Static tracepoints, and integration with UST.
12640
12641 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12642 * mem-break.c (uninsert_all_breakpoints)
12643 (reinsert_all_breakpoints): New.
12644 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12645 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12646 (gdb_agent_ust_loaded, helper_thread_id)
12647 (gdb_agent_helper_thread_id): New macros.
12648 (struct ipa_sym_addresses): Add addr_ust_loaded,
12649 addr_helper_thread_id, addr_cmd_buf.
12650 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12651 (in_process_agent_loaded_ust): New.
12652 (write_e_ust_not_loaded): New.
12653 (maybe_write_ipa_ust_not_loaded): New.
12654 (struct collect_static_trace_data_action): New.
12655 (enum tracepoint_type) <static_tracepoint>: New.
12656 (struct tracepoint) <handle>: Mention static tracepoints.
12657 (struct static_tracepoint_ctx): New.
12658 (CMD_BUF_SIZE): New.
12659 (add_tracepoint_action): Handle static tracepoint actions.
12660 (unprobe_marker_at): New.
12661 (clear_installed_tracepoints): Handle static tracepoints.
12662 (cmd_qtdp): Handle static tracepoints.
12663 (probe_marker_at): New.
12664 (cmd_qtstart): Handle static tracepoints.
12665 (response_tracepoint): Handle static tracepoints.
12666 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12667 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12668 (get_context_regcache): Handle static tracepoints.
12669 (do_action_at_tracepoint): Handle static tracepoint actions.
12670 (traceframe_find_block_type): Handle static trace data blocks.
12671 (traceframe_read_sdata): New.
12672 (download_tracepoints): Download static tracepoint actions.
12673 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12674 (GDB_PROBE_NAME): New.
12675 (ust_ops): New.
12676 (GET_UST_SYM): New.
12677 (USTF): New.
12678 (dlsym_ust): New.
12679 (ust_marker_to_static_tracepoint): New.
12680 (gdb_probe): New.
12681 (collect_ust_data_at_tracepoint): New.
12682 (gdb_ust_probe): New.
12683 (UNIX_PATH_MAX, SOCK_DIR): New.
12684 (gdb_ust_connect_sync_socket): New.
12685 (resume_thread, stop_thread): New.
12686 (run_inferior_command): New.
12687 (init_named_socket): New.
12688 (gdb_ust_socket_init): New.
12689 (cstr_to_hexstr): New.
12690 (next_st): New.
12691 (first_marker, next_marker): New.
12692 (response_ust_marker): New.
12693 (cmd_qtfstm, cmd_qtsstm): New.
12694 (unprobe_marker_at, probe_marker_at): New.
12695 (cmd_qtstmat, gdb_ust_thread): New.
12696 (gdb_ust_init): New.
12697 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12698 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12699 (ST_REGENTRY): New.
12700 (x86_64_st_collect_regmap): New.
12701 (X86_64_NUM_ST_COLLECT_GREGS): New.
12702 (AMD64_RIP_REGNUM): New.
12703 (supply_static_tracepoint_registers): New.
12704 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12705 (ST_REGENTRY): New.
12706 (i386_st_collect_regmap): New.
12707 (i386_NUM_ST_COLLECT_GREGS): New.
12708 (supply_static_tracepoint_registers): New.
12709 * server.c (handle_query): Handle qXfer:statictrace:read.
12710 <qSupported>: Report support for StaticTracepoints, and
12711 qXfer:statictrace:read features.
12712 * server.h (traceframe_read_sdata)
12713 (supply_static_tracepoint_registers): Declare.
12714 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12715 (unpack_varlen_hex): Include in IPA build.
12716 * Makefile.in (ustlibs, ustinc): New.
12717 (IPA_OBJS): Add remote-utils-ipa.o.
12718 ($(IPA_LIB)): Link -ldl and -lpthread.
12719 (UST_CFLAGS): New.
12720 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12721 * config.in, configure: Regenerate.
12722
12723 2010-06-20 Ian Lance Taylor <iant@google.com>
12724 Pedro Alves <pedro@codesourcery.com>
12725
12726 * linux-x86-low.c (always_true): Delete.
12727 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12728 trying to fool the compiler with always_true.
12729
12730 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12731
12732 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12733 conditions in gdbserver.
12734
12735 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12736
12737 * spu-low.c (spu_read_memory): Wrap around local store limit.
12738 (spu_write_memory): Likewise.
12739
12740 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12741
12742 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12743 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12744 LONGEST uses.
12745 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12746 uses.
12747 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12748 uses with LONGEST uses.
12749
12750 2010-06-14 Stan Shebs <stan@codesourcery.com>
12751 Pedro Alves <pedro@codesourcery.com>
12752
12753 Bytecode compiler.
12754
12755 * linux-x86-low.c: Include limits.h.
12756 (add_insns): New.
12757 (always_true): New.
12758 (EMIT_ASM): New.
12759 (EMIT_ASM32): New.
12760 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12761 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12762 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12763 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12764 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12765 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12766 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12767 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12768 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12769 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12770 (amd64_emit_void_call_2): New.
12771 (amd64_emit_ops): New.
12772 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12773 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12774 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12775 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12776 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12777 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12778 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12779 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12780 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12781 (i386_emit_stack_adjust, i386_emit_int_call_1)
12782 (i386_emit_void_call_2): New.
12783 (i386_emit_ops): New.
12784 (x86_emit_ops): New.
12785 (the_low_target): Install x86_emit_ops.
12786 * server.h (struct emit_ops): New.
12787 (get_raw_reg_func_addr): Declare.
12788 (current_insn_ptr, emit_error): Declare.
12789 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12790 (set_trace_state_variable_value): New defines.
12791 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12792 addr_get_trace_state_variable_value and
12793 addr_set_trace_state_variable_value.
12794 (symbol_list): New fields for get_raw_reg,
12795 get_trace_state_variable_value and set_trace_state_variable_value.
12796 (condfn): New typedef.
12797 (struct tracepoint): New field `compiled_cond'.
12798 (do_action_at_tracepoint): Clear compiled_cond.
12799 (get_trace_state_variable_value, set_trace_state_variable_value):
12800 Export in the IPA.
12801 (condition_true_at_tracepoint): If there's a compiled condition,
12802 run that.
12803 (current_insn_ptr, emit_error): New globals.
12804 (struct bytecode_address): New.
12805 (get_raw_reg_func_addr): New.
12806 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12807 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12808 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12809 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12810 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12811 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12812 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12813 (compile_tracepoint_condition, compile_bytecodes): New.
12814 * target.h (emit_ops): Forward declare.
12815 (struct target_ops): New field emit_ops.
12816 (target_emit_ops): New.
12817 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12818 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12819 * linux-low.c (linux_emit_ops): New.
12820 (linux_target_ops): Install it.
12821 * linux-low.h (struct linux_target_ops): New field emit_ops.
12822
12823 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12824
12825 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12826 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12827
12828 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12829 Stan Shebs <stan@codesourcery.com>
12830
12831 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12832 (all): Depend on $(extra_libraries).
12833 (install-only): Install the IPA.
12834 (IPA_OBJS, IPA_LIB): New.
12835 (clean): Remove the IPA lib.
12836 (IPAGENT_CFLAGS): New.
12837 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12838 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12839 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12840 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12841 * configure.ac: Check for atomic builtins support in the compiler.
12842 (IPA_DEPFILES, extra_libraries): Define.
12843 * configure.srv (ipa_obj): Add description.
12844 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12845 (i[34567]86-*-linux*): Set ipa_obj.
12846 (x86_64-*-linux*): Set ipa_obj.
12847 * linux-low.c (stabilizing_threads): New.
12848 (supports_fast_tracepoints): New.
12849 (linux_detach): Stabilize threads before detaching.
12850 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12851 the lwp is either not stabilizing, or is moving out of a jump pad.
12852 (linux_fast_tracepoint_collecting): New.
12853 (maybe_move_out_of_jump_pad): New.
12854 (enqueue_one_deferred_signal): New.
12855 (dequeue_one_deferred_signal): New.
12856 (linux_wait_for_event_1): If moving out of a jump pad, defer
12857 pending signals to later.
12858 (linux_stabilize_threads): New.
12859 (linux_wait_1): Check if threads need moving out of jump pads, and
12860 do it if so.
12861 (stuck_in_jump_pad_callback): New.
12862 (move_out_of_jump_pad_callback): New.
12863 (lwp_running): New.
12864 (linux_resume_one_lwp): Handle moving out of jump pads.
12865 (linux_set_resume_request): Dequeue deferred signals.
12866 (need_step_over_p): Also step over fast tracepoint jumps.
12867 (start_step_over): Also uninsert fast tracepoint jumps.
12868 (finish_step_over): Also reinsert fast tracepoint jumps.
12869 (linux_install_fast_tracepoint_jump): New.
12870 (linux_target_ops): Install linux_stabilize_threads and
12871 linux_install_fast_tracepoint_jump_pad.
12872 * linux-low.h (linux_target_ops) <get_thread_area,
12873 install_fast_tracepoint_jump_pad>: New fields.
12874 (struct lwp_info) <collecting_fast_tracepoint,
12875 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12876 (linux_get_thread_area): Declare.
12877 * linux-x86-low.c (jump_insn): New.
12878 (x86_get_thread_area): New.
12879 (append_insns): New.
12880 (push_opcode): New.
12881 (amd64_install_fast_tracepoint_jump_pad): New.
12882 (i386_install_fast_tracepoint_jump_pad): New.
12883 (x86_install_fast_tracepoint_jump_pad): New.
12884 (the_low_target): Install x86_get_thread_area and
12885 x86_install_fast_tracepoint_jump_pad.
12886 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12887 (struct fast_tracepoint_jump): New.
12888 (fast_tracepoint_jump_insn): New.
12889 (fast_tracepoint_jump_shadow): New.
12890 (find_fast_tracepoint_jump_at): New.
12891 (fast_tracepoint_jump_here): New.
12892 (delete_fast_tracepoint_jump): New.
12893 (set_fast_tracepoint_jump): New.
12894 (uninsert_fast_tracepoint_jumps_at): New.
12895 (reinsert_fast_tracepoint_jumps_at): New.
12896 (set_breakpoint_at): Use write_inferior_memory.
12897 (uninsert_raw_breakpoint): Use write_inferior_memory.
12898 (check_mem_read): Mask out fast tracepoint jumps.
12899 (check_mem_write): Mask out fast tracepoint jumps.
12900 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12901 (set_fast_tracepoint_jump): Declare.
12902 (delete_fast_tracepoint_jump)
12903 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12904 (reinsert_fast_tracepoint_jumps_at): Declare.
12905 * regcache.c: Don't compile many functions when building the
12906 in-process agent library.
12907 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12908 the register buffer in the heap.
12909 (free_register_cache): If the register buffer isn't owned by the
12910 regcache, don't free it.
12911 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12912 pre-existing register caches.
12913 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12914 type.
12915 (convert_ascii_to_int): : Constify `from' parameter type.
12916 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12917 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12918 the needed buffer in-place.
12919 (relocate_instruction): New.
12920 * server.c (handle_query) <qSymbols>: If the target supports
12921 tracepoints, give it a chance of looking up symbols. Report
12922 support for fast tracepoints.
12923 (handle_status): Stabilize threads.
12924 (process_serial_event): Adjust.
12925 * server.h (struct fast_tracepoint_jump): Forward declare.
12926 (struct process_info) <fast_tracepoint_jumps>: New field.
12927 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12928 (decode_X_packet, decode_M_packet): Adjust.
12929 (relocate_instruction): Declare.
12930 (in_process_agent_loaded): Declare.
12931 (tracepoint_look_up_symbols): Declare.
12932 (struct fast_tpoint_collect_status): Declare.
12933 (fast_tracepoint_collecting): Declare.
12934 (force_unlock_trace_buffer): Declare.
12935 (handle_tracepoint_bkpts): Declare.
12936 (initialize_low_tracepoint)
12937 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12938 * target.h (struct target_ops) <stabilize_threads,
12939 install_fast_tracepoint_jump_pad>: New fields.
12940 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12941 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12942 [HAVE_STDINT_H]: Include stdint.h.
12943 (trace_debug_1): Rename to ...
12944 (trace_vdebug): ... this.
12945 (trace_debug): Rename to ...
12946 (trace_debug_1): ... this. Add `level' parameter.
12947 (trace_debug): New.
12948 (ATTR_USED, ATTR_NOINLINE): New.
12949 (IP_AGENT_EXPORT): New.
12950 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12951 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12952 (about_to_request_buffer_space, trace_buffer_is_full)
12953 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12954 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12955 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12956 (traceframe_write_count, traceframes_created)
12957 (trace_state_variables)
12958 New renaming defines.
12959 (struct ipa_sym_addresses): New.
12960 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12961 (symbol_list): New.
12962 (ipa_sym_addrs): New.
12963 (all_tracepoint_symbols_looked_up): New.
12964 (in_process_agent_loaded): New.
12965 (write_e_ipa_not_loaded): New.
12966 (maybe_write_ipa_not_loaded): New.
12967 (tracepoint_look_up_symbols): New.
12968 (debug_threads) [IN_PROCESS_AGENT]: New.
12969 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12970 (UNKNOWN_SIDE_EFFECTS): New.
12971 (stop_tracing): New.
12972 (flush_trace_buffer): New.
12973 (stop_tracing_bkpt): New.
12974 (flush_trace_buffer_bkpt): New.
12975 (read_inferior_integer): New.
12976 (read_inferior_uinteger): New.
12977 (read_inferior_data_pointer): New.
12978 (write_inferior_data_pointer): New.
12979 (write_inferior_integer): New.
12980 (write_inferior_uinteger): New.
12981 (struct collect_static_trace_data_action): Delete.
12982 (enum tracepoint_type): New.
12983 (struct tracepoint) <type>: New field `type'.
12984 <actions_str, step_actions, step_actions_str>: Only include in
12985 GDBserver.
12986 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12987 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12988 (tracepoints): Use IP_AGENT_EXPORT.
12989 (last_tracepoint): Don't include in the IPA.
12990 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12991 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12992 (alloced_trace_state_variables): New.
12993 (trace_state_variables): Use IP_AGENT_EXPORT.
12994 (traceframe_t): Delete unused variable.
12995 (circular_trace_buffer): Don't include in the IPA.
12996 (trace_buffer_start): Delete.
12997 (struct trace_buffer_control): New.
12998 (trace_buffer_free): Delete.
12999 (struct ipa_trace_buffer_control): New.
13000 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13001 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13002 New.
13003 (trace_buffer_ctrl): New.
13004 (TRACE_BUFFER_CTRL_CURR): New.
13005 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13006 Reimplement as macros.
13007 (trace_buffer_wrap): Delete.
13008 (traceframe_write_count, traceframe_read_count)
13009 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13010 (struct tracepoint_hit_ctx) <type>: New field.
13011 (struct fast_tracepoint_ctx): New.
13012 (memory_barrier): New.
13013 (cmpxchg): New.
13014 (record_tracepoint_error): Update atomically in the IPA.
13015 (clear_inferior_trace_buffer): New.
13016 (about_to_request_buffer_space): New.
13017 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13018 updating the same buffer.
13019 (add_tracepoint): Default the tracepoint's type to trap
13020 tracepoint, and orig_size to -1.
13021 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13022 internal variables.
13023 (create_trace_state_variable): New parameter `gdb'. Handle it.
13024 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13025 (cmd_qtdp): Handle fast tracepoints.
13026 (cmd_qtdv): Adjust.
13027 (max_jump_pad_size): New.
13028 (gdb_jump_pad_head): New.
13029 (get_jump_space_head): New.
13030 (claim_jump_space): New.
13031 (sort_tracepoints): New.
13032 (MAX_JUMP_SIZE): New.
13033 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13034 IPA.
13035 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13036 support. Upload fast traceframes, and delete internal IPA
13037 breakpoints.
13038 (stop_tracing_handler): New.
13039 (flush_trace_buffer_handler): New.
13040 (cmd_qtstop): Upload fast tracepoints.
13041 (response_tracepoint): Handle fast tracepoints.
13042 (tracepoint_finished_step): Upload fast traceframes. Set the
13043 tracepoint hit context's tracepoint type.
13044 (handle_tracepoint_bkpts): New.
13045 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13046 type. Add comment about fast tracepoints.
13047 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13048 non-existing action_str field.
13049 (get_context_regcache): Handle fast tracepoints.
13050 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13051 to the regcache.
13052 (fast_tracepoint_from_jump_pad_address): New.
13053 (fast_tracepoint_from_ipa_tpoint_address): New.
13054 (collecting_t): New.
13055 (force_unlock_trace_buffer): New.
13056 (fast_tracepoint_collecting): New.
13057 (collecting): New.
13058 (gdb_collect): New.
13059 (write_inferior_data_ptr): New.
13060 (target_tp_heap): New.
13061 (target_malloc): New.
13062 (download_agent_expr): New.
13063 (UALIGN): New.
13064 (download_tracepoints): New.
13065 (download_trace_state_variables): New.
13066 (upload_fast_traceframes): New.
13067 (IPA_FIRST_TRACEFRAME): New.
13068 (IPA_NEXT_TRACEFRAME_1): New.
13069 (IPA_NEXT_TRACEFRAME): New.
13070 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13071 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13072 (gdb_jump_pad_buffer_end): New.
13073 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13074 (initialize_tracepoint): Adjust.
13075 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13076 buffer. Initialize the low module.
13077 * utils.c (PREFIX, TOOLNAME): New.
13078 (malloc_failure): Use PREFIX.
13079 (error): In the IPA, an error causes an exit.
13080 (fatal, warning): Use PREFIX.
13081 (internal_error): Use TOOLNAME.
13082 (NUMCELLS): Increase to 10.
13083 * configure, config.in: Regenerate.
13084
13085 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13086
13087 * server.c (handle_query) <qSupported>: Do two passes over the
13088 qSupported string to avoid nesting strtok.
13089
13090 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13091
13092 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13093 (CDEPS): New.
13094 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13095 -Wl,--dynamic-list.
13096 * configure: Regenerate.
13097 * proc-service.list: New.
13098
13099 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13100
13101 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13102 New comment.
13103
13104 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13105
13106 * gdbreplay.c (remote_open): Check error return from socket() call by
13107 its equality to -1 not by it being negative.
13108 * remote-utils.c (remote_open): Likewise.
13109
13110 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13111
13112 * config.h: Regenerate.
13113
13114 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13115
13116 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13117 doesn't provide PTRACE_GET_THREAD_AREA.
13118
13119 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13120
13121 * linux-m68k-low.c: Include <asm/ptrace.h>
13122 (ps_get_thread_area): Implement.
13123
13124 2010-05-03 Doug Evans <dje@google.com>
13125
13126 * event-loop.c (struct callback_event): New struct.
13127 (callback_list): New global.
13128 (append_callback_event, delete_callback_event): New functions.
13129 (process_callback): New function.
13130 (start_event_loop): Call it.
13131 * remote-utils.c (NOT_SCHEDULED): Define.
13132 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13133 moved out of readchar.
13134 (readchar): Rewrite. Call reschedule before returning.
13135 (reset_readchar): New function.
13136 (remote_close): Call it.
13137 (process_remaining, reschedule): New functions.
13138 * server.h (callback_handler_func): New typedef.
13139 (append_callback_event, delete_callback_event): Declare.
13140
13141 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13142
13143 * proc-service.c (ps_pglobal_lookup): Use
13144 thread_db_look_up_one_symbol.
13145 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13146 parameter. Use it instead of all_symbols_looked_up.
13147 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13148 field.
13149 (all_symbols_looked_up): Don't declare.
13150 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13151 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13152 field.
13153 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13154 Set all_symbols_looked_up here.
13155 (thread_db_look_up_one_symbol): New.
13156 (thread_db_get_tls_address): Adjust.
13157 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13158 thread_db object on the heap, and tentatively set it in the
13159 process structure.
13160 (thread_db_init): Don't set all_symbols_looked_up here.
13161 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13162
13163 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13164
13165 * linux-low.c (linux_kill, linux_detach): Adjust.
13166 (status_pending_p_callback): Remove redundant statement. Check
13167 for !TARGET_WAITIKIND_IGNORE, instead of
13168 TARGET_WAITKIND_STOPPED.
13169 (handle_tracepoints): Make sure LWP is locked. Adjust.
13170 (linux_wait_for_event_1): Adjust.
13171 (linux_cancel_breakpoints): New.
13172 (unsuspend_one_lwp): New.
13173 (unsuspend_all_lwps): New.
13174 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13175 (send_sigstop_callback): Change return type to int, add new
13176 `except' parameter and handle it.
13177 (suspend_and_send_sigstop_callback): New.
13178 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13179 pass them down. If SUSPEND, also increment the lwp's suspend
13180 count.
13181 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13182 (need_step_over_p): Don't consider suspended LWPs.
13183 (start_step_over): Adjust.
13184 (proceed_one_lwp): Change return type to int, add new `except'
13185 parameter and handle it.
13186 (unsuspend_and_proceed_one_lwp): New.
13187 (proceed_all_lwps): Use find_inferior instead of
13188 for_each_inferior.
13189 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13190 also decrement the suspend count of LWPs. Pass `except' down,
13191 instead of hacking its suspend count.
13192 (linux_pause_all): Add `freeze' parameter. Adjust.
13193 (linux_unpause_all): New.
13194 (linux_target_ops): Install linux_unpause_all.
13195 * server.c (handle_status): Adjust.
13196 * target.h (struct target_ops): New fields `unpause_all' and
13197 `cancel_breakpoints'. Add new parameter to `pause_all'.
13198 (pause_all): Add new `freeze' parameter.
13199 (unpause_all): New.
13200 (cancel_breakpoints): New.
13201 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13202 cancel breakpoints.
13203 (cmd_qtstart): Pause threads.
13204 (stop_tracing): Pause threads, and cancel breakpoints.
13205 * win32-low.c (win32_target_ops): Adjust.
13206
13207 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13208
13209 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13210 the inferior right away from here...
13211 (linux_wait_1): ... to here, and adjust to check the thread's
13212 last_resume_kind instead of the lwp's step or stop_expected flags.
13213
13214 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13215
13216 * README: Use consistent `GDB' and `GDBserver' spellings.
13217
13218 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13219
13220 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13221 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13222 (linux_detach_one_lwp): Assume the lwp is stopped.
13223 (any_thread_of): Delete.
13224 (linux_detach): Stop all lwps here. Don't blindly delete all
13225 breakpoints.
13226 (delete_lwp_callback): New.
13227 (linux_mourn): Delete all lwps of the process that is gone.
13228 (linux_wait_1): Don't delete the last lwp of the process here.
13229 * mem-break.h (mark_breakpoints_out): Declare.
13230 * mem-break.c (mark_breakpoints_out): New.
13231 (free_all_breakpoints): Use it.
13232 * server.c (handle_target_event): If the process is gone, mark
13233 breakpoints out.
13234 * thread-db.c (struct thread_db) <create_bp>: New field.
13235 (thread_db_enable_reporting): Fix prototype. Store a thread event
13236 breakpoint reference in the thread_db struct.
13237 (thread_db_load_search): Clear the thread_db object.
13238 (try_thread_db_load_1): Ditto.
13239 (switch_to_process): New.
13240 (disable_thread_event_reporting): Use it.
13241 (remove_thread_event_breakpoints): New.
13242 (thread_db_detach, thread_db_mourn): Use it.
13243
13244 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13245
13246 * linux-low.c (linux_enable_event_reporting): New.
13247 (linux_wait_for_event_1, handle_extended_wait): Use it.
13248
13249 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13250
13251 * linux-low.c (linux_kill_one_lwp, linux_kill)
13252 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13253 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13254 SIGSTOP even if the LWP is stopped.
13255 (send_sigstop_callback): New.
13256 (stop_all_lwps): Use send_sigstop_callback instead.
13257 (linux_resume_one_thread): Adjust.
13258 (proceed_one_lwp): Still proceed an LWP that the client has
13259 requested to stop, if we haven't reported it as stopped yet. Make
13260 sure that LWPs the client want stopped, have a pending SIGSTOP.
13261
13262 2010-04-26 Doug Evans <dje@google.com>
13263
13264 * server.c (handle_general_set): Make static.
13265
13266 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13267 Print received char after testing for error/eof instead of before.
13268 (input_interrupt): Tweak comment.
13269
13270 2010-04-23 Doug Evans <dje@google.com>
13271
13272 * server.c (start_inferior): Print inferior argv if --debug.
13273
13274 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13275
13276 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13277 * nto-x86-low.c: Include server.h
13278
13279 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13280
13281 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13282 be consistent with other sources of this directory.
13283 (init_registers_amd64): Correct name of source file of this function
13284 in the comment.
13285
13286 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13287
13288 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13289 64-bit executables.
13290
13291 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13292
13293 * win32-i386-low.c: Add 64-bit support.
13294 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13295 (init_registers_amd64): Declare.
13296 (mappings): Add 64-bit version of array.
13297 (init_windows_x86): New function.
13298 (the_low_target): Change init_arch field to init_windows_x86.
13299
13300 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13301
13302 * win32-low.c: Adapt to support also 64-bit architecture.
13303 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13304 (get_image_name): Use SIZE_T type for local variable `done'.
13305 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13306 (toolhelp_get_dll_name): Idem.
13307 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13308 Use uintptr_t typecast to avoid warning.
13309 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13310 (handle_exception): Use phex_nz to avoid warning.
13311 (win32_wait): Remove unused local variable `process'.
13312
13313 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13314
13315 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13316 `amd64-avx.o'.
13317
13318 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13319
13320 * configure.ac: Use `ws2_32' library for srv_mingw.
13321 * configure: Regenerate.
13322 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13323 * remote-utils.c: Likewise.
13324
13325 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13326
13327 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13328 if __x86_64__ is defined.
13329
13330 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13331
13332 * configure: Regenerate.
13333
13334 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13335
13336 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13337 * target.h (target_ops): New get_tib_address field.
13338 * win32-low.h (win32_thread_info): Add thread_local_base field.
13339 * win32-low.c (child_add_thread): Add tlb argument.
13340 Set thread_local_base field to TLB.
13341 (get_child_debug_event): Adapt to child_add_thread change.
13342 (win32_get_tib_address): New function.
13343 (win32_target_ops): Set get_tib_address field to
13344 win32_get_tib_address.
13345 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13346
13347 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13348
13349 * linux-low.c (linux_mourn): Also remove the process.
13350 * server.c (handle_target_event): Don't remove the process here.
13351 * nto-low.c (nto_mourn): New.
13352 (nto_target_ops): Install it.
13353 * spu-low.c (spu_mourn): New.
13354 (spu_target_ops): Install it.
13355 * win32-low.c (win32_mourn): New.
13356 (win32_target_ops): Install it.
13357
13358 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13359
13360 * server.h (buffer_xml_printf): Remove redundant `;'.
13361
13362 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13363
13364 * regcache.c (set_register_cache): Invalidate regcaches before
13365 changing the register cache layout.
13366 (regcache_invalidate_one): Allow a NULL regcache.
13367 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13368 regcaches before changing the register cache layout or the target
13369 regsets.
13370
13371 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13372
13373 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13374 variable warning on Linux/x86-64.
13375
13376 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13377
13378 GDBserver disconnected tracing support.
13379
13380 * linux-low.c (linux_remove_process): Delete.
13381 (add_lwp): Don't set last_resume_kind here.
13382 (linux_kill): Use `mourn'.
13383 (linux_detach): Use `thread_db_detach', and `mourn'.
13384 (linux_mourn): New.
13385 (linux_attach_lwp_1): Adjust comment.
13386 (linux_attach): last_resume_kind moved the thread_info; adjust.
13387 (status_pending_p_callback): Adjust.
13388 (linux_wait_for_event_1): Adjust.
13389 (count_events_callback, select_singlestep_lwp_callback)
13390 (select_event_lwp_callback, cancel_breakpoints_callback)
13391 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13392 (proceed_one_lwp): Adjust.
13393 (linux_async): Add debug output.
13394 (linux_thread_stopped): New.
13395 (linux_pause_all): New.
13396 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13397 linux_pause_all.
13398 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13399 (thread_db_free): Delete declaration.
13400 (thread_db_detach, thread_db_mourn): Declare.
13401 * thread-db.c (thread_db_init): Use thread_db_mourn.
13402 (thread_db_free): Delete, split in two.
13403 (disable_thread_event_reporting): New.
13404 (thread_db_detach): New.
13405 (thread_db_mourn): New.
13406
13407 * server.h (struct thread_info) <last_resume_kind>: New field.
13408 <attached>: Add comment.
13409 <gdb_detached>: New field.
13410 (handler_func): Change return type to int.
13411 (handle_serial_event, handle_target_event): Ditto.
13412 (gdb_connected): Declare.
13413 (tracing): Delete.
13414 (disconnected_tracing): Declare.
13415 (stop_tracing): Declare.
13416
13417 * server.c (handle_query) <qSupported>: Report support for
13418 disconnected tracing.
13419 (queue_stop_reply_callback): Account for running threads.
13420 (gdb_wants_thread_stopped): New.
13421 (gdb_wants_all_threads_stopped): New.
13422 (gdb_reattached_process): New.
13423 (handle_status): Clear the `gdb_detached' flag of all processes.
13424 In all-stop, stop all threads.
13425 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13426 (process_serial_event): If the remote connection breaks, or if an
13427 exit was forced with "monitor exit", force an event loop exit.
13428 Handle disconnected tracing on detach.
13429 (handle_serial_event): Adjust.
13430 (handle_target_event): If GDB isn't connected, forward events back
13431 to the inferior, unless the last process exited, in which case,
13432 exit gdbserver. Adjust interface.
13433
13434 * remote-utils.c (remote_open): Don't block in accept. Instead
13435 register an event loop source on the listen socket file
13436 descriptor. Refactor bits into ...
13437 (listen_desc): ... this new global.
13438 (gdb_connected): ... this new function.
13439 (enable_async_notification): ... this new function.
13440 (handle_accept_event): ... this new function.
13441 (remote_close): Clear remote_desc.
13442
13443 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13444
13445 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13446 New fields.
13447 (mourn_inferior): Define.
13448 (target_process_qsupported): Avoid the dangling else problem.
13449 (thread_stopped): Define.
13450 (pause_all): Define.
13451 (target_waitstatus_to_string): Declare.
13452 * target.c (target_waitstatus_to_string): New.
13453
13454 * tracepoint.c (tracing): Make extern.
13455 (disconnected_tracing): New.
13456 (stop_tracing): Make extern. Handle tracing stops due to GDB
13457 disconnecting.
13458 (cmd_qtdisconnected): New.
13459 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13460 (handle_tracepoint_general_set): Handle QTDisconnected.
13461
13462 * event-loop.c (event_handler_func): Change return type to int.
13463 (process_event): Bail out if the event handler wants the event
13464 loop to stop.
13465 (handle_file_event): Ditto.
13466 (start_event_loop): Bail out if the event handler wants the event
13467 loop to stop.
13468
13469 * nto-low.c (nto_target_ops): Adjust.
13470 * spu-low.c (spu_wait): Don't remove the process here.
13471 (spu_target_ops): Adjust.
13472 * win32-low.c (win32_wait): Don't remove the process here.
13473 (win32_target_ops): Adjust.
13474
13475 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13476
13477 * regcache.c (realloc_register_cache): Invalidate inferior's
13478 regcache before recreating it.
13479
13480 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13481
13482 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13483
13484 2010-04-09 Stan Shebs <stan@codesourcery.com>
13485 Pedro Alves <pedro@codesourcery.com>
13486
13487 * server.h (LONGEST): New.
13488 (struct thread_info) <while_stepping>: New field.
13489 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13490 Declare.
13491 (initialize_tracepoint, handle_tracepoint_general_set)
13492 (handle_tracepoint_query, tracepoint_finished_step)
13493 (tracepoint_was_hit, release_while_stepping_state_list):
13494 (current_traceframe): Declare.
13495 * server.c (handle_general_set): Handle tracepoint packets.
13496 (read_memory): New.
13497 (write_memory): New.
13498 (handle_search_memory_1): Use read_memory.
13499 (handle_query): Report support for conditional tracepoints, trace
13500 state variables, and tracepoint sources. Handle tracepoint
13501 queries.
13502 (main): Initialize the tracepoints module.
13503 (process_serial_event): Handle traceframe reads/writes.
13504
13505 * linux-low.c (handle_tracepoints): New.
13506 (linux_wait_1): Call it.
13507 (linux_resume_one_lwp): Handle while-stepping.
13508 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13509 (linux_target_ops): Install them.
13510 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13511 New field.
13512 * linux-x86-low.c (x86_supports_tracepoints): New.
13513 (the_low_target). Install it.
13514
13515 * mem-break.h (delete_breakpoint): Declare.
13516 * mem-break.c (delete_breakpoint): Make external.
13517
13518 * target.h (struct target_ops): Add `supports_tracepoints',
13519 `read_pc', and `write_pc' fields.
13520 (target_supports_tracepoints): Define.
13521 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13522 (phex_nz): New.
13523
13524 * regcache.h (struct regcache) <registers_owned>: New field.
13525 (init_register_cache, regcache_cpy): Declare.
13526 (regcache_read_pc, regcache_write_pc): Declare.
13527 (register_cache_size): Declare.
13528 (supply_regblock): Declare.
13529 * regcache.c (init_register_cache): New.
13530 (new_register_cache): Use it.
13531 (regcache_cpy): New.
13532 (register_cache_size): New.
13533 (supply_regblock): New.
13534 (regcache_read_pc, regcache_write_pc): New.
13535
13536 * tracepoint.c: New.
13537
13538 * Makefile.in (OBS): Add tracepoint.o.
13539 (tracepoint.o): New rule.
13540
13541 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13542
13543 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13544 (i386-mmx.o): New.
13545 (i386-mmx.c): Likewise.
13546 (i386-mmx-linux.o): Likewise.
13547 (i386-mmx-linux.c): Likewise.
13548
13549 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13550 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13551 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13552 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13553
13554 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13555 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13556 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13557
13558 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13559
13560 * Makefile.in (clean): Updated.
13561 (i386-avx.o): New.
13562 (i386-avx.c): Likewise.
13563 (i386-avx-linux.o): Likewise.
13564 (i386-avx-linux.c): Likewise.
13565 (amd64-avx.o): Likewise.
13566 (amd64-avx.c): Likewise.
13567 (amd64-avx-linux.o): Likewise.
13568 (amd64-avx-linux.c): Likewise.
13569
13570 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13571 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13572 (srv_amd64_regobj): Add amd64-avx.o.
13573 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13574 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13575 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13576 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13577 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13578 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13579 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13580
13581 * i387-fp.c: Include "i386-xstate.h".
13582 (i387_xsave): New.
13583 (i387_cache_to_xsave): Likewise.
13584 (i387_xsave_to_cache): Likewise.
13585 (x86_xcr0): Likewise.
13586
13587 * i387-fp.h (i387_cache_to_xsave): Likewise.
13588 (i387_xsave_to_cache): Likewise.
13589 (x86_xcr0): Likewise.
13590
13591 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13592 * linux-crisv32-low.c (target_regsets): Likewise.
13593 * linux-m68k-low.c (target_regsets): Likewise.
13594 * linux-mips-low.c (target_regsets): Likewise.
13595 * linux-ppc-low.c (target_regsets): Likewise.
13596 * linux-s390-low.c (target_regsets): Likewise.
13597 * linux-sh-low.c (target_regsets): Likewise.
13598 * linux-sparc-low.c (target_regsets): Likewise.
13599 * linux-xtensa-low.c (target_regsets): Likewise.
13600
13601 * linux-low.c: Include <sys/uio.h>.
13602 (regsets_fetch_inferior_registers): Support nt_type.
13603 (regsets_store_inferior_registers): Likewise.
13604 (linux_process_qsupported): New.
13605 (linux_target_ops): Add linux_process_qsupported.
13606
13607 * linux-low.h (regset_info): Add nt_type.
13608 (linux_target_ops): Add process_qsupported.
13609
13610 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13611 and <sys/uio.h>.
13612 (init_registers_i386_avx_linux): New.
13613 (init_registers_amd64_avx_linux): Likewise.
13614 (xmltarget_i386_linux_no_xml): Likewise.
13615 (xmltarget_amd64_linux_no_xml): Likewise.
13616 (PTRACE_GETREGSET): Likewise.
13617 (PTRACE_SETREGSET): Likewise.
13618 (x86_fill_xstateregset): Likewise.
13619 (x86_store_xstateregset): Likewise.
13620 (use_xml): Likewise.
13621 (x86_linux_update_xmltarget): Likewise.
13622 (x86_linux_process_qsupported): Likewise.
13623 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13624 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13625 init_registers_i386_linux here. Call
13626 x86_linux_update_xmltarget.
13627 (the_low_target): Add x86_linux_process_qsupported.
13628
13629 * server.c (handle_query): Call target_process_qsupported.
13630
13631 * target.h (target_ops): Add process_qsupported.
13632 (target_process_qsupported): New.
13633
13634 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13635
13636 * inferiors.c (add_thread): Set last_status kind to
13637 TARGET_WAITKIND_IGNORE.
13638 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13639 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13640 (linux_wait_1): Move `thread' local definition to block that uses
13641 it. Don't NULL initialize `event_child'.
13642 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13643 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13644 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13645
13646 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13647
13648 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13649 an extended waitstatus, or by a watchpoint.
13650 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13651 thread was stepping or has been stopped by a watchpoint.
13652
13653 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13654
13655 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13656 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13657 of another, then delete the previous, and validate all
13658 breakpoints.
13659 (validate_inserted_breakpoint): New.
13660 (delete_disabled_breakpoints): New.
13661 (validate_breakpoints): New.
13662 (check_mem_read): Validate breakpoints before trusting their
13663 shadow. Delete disabled breakpoints.
13664 (check_mem_write): Validate breakpoints before trusting they
13665 should be inserted. Delete disabled breakpoints.
13666 * mem-break.h (validate_breakpoints):
13667 * server.c (handle_query): Validate breakpoints when we see a
13668 qSymbol query.
13669
13670 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13671
13672 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13673 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13674 if we could tell there's a GDB breakpoint at stop_pc.
13675 (need_step_over_p): Don't do a step over if we find a GDB
13676 breakpoint at the resume PC.
13677
13678 * mem-break.c (struct raw_breakpoint): New.
13679 (enum bkpt_type): New type `gdb_breakpoint'.
13680 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13681 fields. New field `raw'.
13682 (find_raw_breakpoint_at): New.
13683 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13684 breakpoint instead.
13685 (set_breakpoint_at): Adjust.
13686 (delete_raw_breakpoint): New.
13687 (release_breakpoint): New.
13688 (delete_breakpoint): Rename to...
13689 (delete_breakpoint_1): ... this. Add proc parameter. Use
13690 release_breakpoint. Return ENOENT.
13691 (delete_breakpoint): Reimplement.
13692 (find_breakpoint_at): Delete.
13693 (find_gdb_breakpoint_at): New.
13694 (delete_breakpoint_at): Delete.
13695 (set_gdb_breakpoint_at): New.
13696 (delete_gdb_breakpoint_at): New.
13697 (gdb_breakpoint_here): New.
13698 (set_reinsert_breakpoint): Use release_breakpoint.
13699 (uninsert_breakpoint): Rename to ...
13700 (uninsert_raw_breakpoint): ... this.
13701 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13702 (reinsert_raw_breakpoint): Change parameter type to
13703 raw_breakpoint.
13704 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13705 instead.
13706 (check_breakpoints): Adjust. Use release_breakpoint.
13707 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13708 (breakpoint_inserted_here): Ditto.
13709 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13710 Don't trust the breakpoint's shadow if it is not inserted.
13711 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13712 (delete_all_breakpoints): Adjust.
13713 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13714 use delete_breakpoint_1.
13715
13716 * mem-break.h (breakpoints_supported): Delete declaration.
13717 (set_gdb_breakpoint_at): Declare.
13718 (gdb_breakpoint_here): Declare.
13719 (delete_breakpoint_at): Delete.
13720 (delete_gdb_breakpoint_at): Declare.
13721
13722 * server.h (struct raw_breakpoint): Forward declare.
13723 (struct process_info): New field `raw_breakpoints'.
13724
13725 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13726 breakpoints.
13727
13728 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13729
13730 * linux-low.c (status_pending_p_callback): Fix comment.
13731 (linux_wait_for_event_1): Move most of the internal breakpoint
13732 handling from here...
13733 (linux_wait_1): ... to here.
13734 (count_events_callback): New.
13735 (select_singlestep_lwp_callback): New.
13736 (select_event_lwp_callback): New.
13737 (cancel_breakpoints_callback): New.
13738 (select_event_lwp): New.
13739 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13740 priority to all LWPs that have had events that should be reported
13741 to the client. Cancel breakpoints when about to reporting the
13742 event to the client, not while stopping lwps. No longer cancel
13743 finished single-steps here.
13744 (cancel_finished_single_step): Delete.
13745 (cancel_finished_single_steps): Delete.
13746
13747 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13748
13749 * mem-break.c (enum bkpt_type): New.
13750 (struct breakpoint): New field `type'.
13751 (set_breakpoint_at): Change return type to struct breakpoint
13752 pointer. Set type to `other_breakpoint' by default.
13753 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13754 in the breakpoint list.
13755 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13756 (reinsert_breakpoint): Rename to ...
13757 (reinsert_raw_breakpoint): ... this.
13758 (reinsert_breakpoints_at): Adjust.
13759 * mem-break.h (struct breakpoint): Declare.
13760 (set_breakpoint_at): Change return type to struct breakpoint
13761 pointer.
13762
13763 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13764
13765 * server.c (handle_query): Assign, not compare.
13766
13767 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13768
13769 Teach linux gdbserver to step-over-breakpoints.
13770
13771 * linux-low.c (can_hardware_single_step): New.
13772 (supports_breakpoints): New.
13773 (handle_extended_wait): If stopping threads, read the stop pc of
13774 the new cloned LWP.
13775 (get_pc): New.
13776 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13777 low target doesn't support retrieving the PC.
13778 (add_lwp): Set last_resume_kind to resume_continue.
13779 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13780 (linux_attach): Don't clear stop_expected. Set the lwp's
13781 last_resume_kind to resume_stop.
13782 (linux_detach_one_lwp): Don't check for removed breakpoints.
13783 (check_removed_breakpoint): Delete.
13784 (status_pending_p): Rename to ...
13785 (status_pending_p_callback): ... this. Don't check for removed
13786 breakpoints. Don't consider threads that are stopped from GDB's
13787 perspective.
13788 (linux_wait_for_lwp): Always read the stop_pc here.
13789 (cancel_breakpoint): New.
13790 (step_over_bkpt): New global.
13791 (linux_wait_for_event_1): Implement stepping over breakpoints.
13792 (gdb_wants_lwp_stopped): New.
13793 (gdb_wants_all_stopped): New.
13794 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13795 single-step traps here. Store the thread's last reported target
13796 wait status.
13797 (send_sigstop): Don't clear stop_expected. Always set it,
13798 instead.
13799 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13800 (cancel_finished_single_step): New.
13801 (cancel_finished_single_steps): New.
13802 (wait_for_sigstop): Don't cancel finished single-step traps here.
13803 (linux_resume_one_lwp): Don't check for removed breakpoints.
13804 Don't set `step' on non-hardware step archs.
13805 (linux_set_resume_request): Ignore resume_stop requests if already
13806 stopping or stopped. Set the lwp's last_resume_kind.
13807 (resume_status_pending_p): Don't check for removed breakpoints.
13808 (need_step_over_p): New.
13809 (start_step_over): New.
13810 (finish_step_over): New.
13811 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13812 requests. Clear the thread's last reported target waitstatus.
13813 Don't use the `suspended' flag. Don't consider pending breakpoints.
13814 (linux_resume): Start a step-over if necessary.
13815 (proceed_one_lwp): New.
13816 (proceed_all_lwps): New.
13817 (unstop_all_lwps): New.
13818 * linux-low.h (struct lwp_info): Rewrite comment for the
13819 `suspended' flag. Add the `stop_pc' field. Delete the
13820 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13821 Add `'last_resume_kind' and `need_step_over' fields.
13822 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13823 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13824 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13825 (set_raw_breakpoint_at): New.
13826 (set_breakpoint_at): Rewrite to use it.
13827 (reinsert_breakpoint_handler): Delete.
13828 (set_reinsert_breakpoint): New.
13829 (reinsert_breakpoint_by_bp): Delete.
13830 (delete_reinsert_breakpoints): New.
13831 (uninsert_breakpoint): Rewrite.
13832 (uninsert_breakpoints_at): New.
13833 (reinsert_breakpoint): Rewrite.
13834 (reinsert_breakpoints_at): New.
13835 (check_breakpoints): Rewrite.
13836 (breakpoint_here): New.
13837 (breakpoint_inserted_here): New.
13838 (check_mem_read): Adjust.
13839 * mem-break.h (breakpoints_supported, breakpoint_here)
13840 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13841 (reinsert_breakpoint_by_bp): Delete declaration.
13842 (delete_reinsert_breakpoints): Declare.
13843 (reinsert_breakpoint): Delete declaration.
13844 (reinsert_breakpoints_at): Declare.
13845 (uninsert_breakpoint): Delete declaration.
13846 (uninsert_breakpoints_at): Declare.
13847 (check_breakpoints): Adjust prototype.
13848 * server.h: Adjust include order.
13849 (struct thread_info): Declare here. Add a `last_status' field.
13850
13851 2010-03-23 Michael Snyder <msnyder@vmware.com>
13852
13853 * server.c (crc32): New function.
13854 (handle_query): Add handling for 'qCRC:' request.
13855
13856 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13857
13858 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13859 lwp had been stopped by a watchpoint.
13860
13861 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13862
13863 * server.h (internal_error): Declare.
13864 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13865 * utils.c (internal_error): New function.
13866
13867 2010-03-15 Andreas Schwab <schwab@redhat.com>
13868
13869 * configure.srv: Fix typo setting srv_regobj.
13870
13871 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13872
13873 * linux-low.c (fetch_register): Avoid passing a non string literal
13874 format to `error'.
13875 (usr_store_inferior_registers): Ditto.
13876
13877 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13878
13879 * linux-low.c (linux_write_memory): Bail out early if peeking
13880 memory failed.
13881
13882 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13883
13884 * linux-low.h (struct lwp_info): New fields
13885 `stopped_by_watchpoint' and `stopped_data_address'.
13886 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13887 here, and cache them in the lwp object.
13888 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13889 directly.
13890 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13891 field.
13892 (linux_stopped_by_watchpoint): Rewrite.
13893 (linux_stopped_data_address): Rewrite.
13894
13895 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13896
13897 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13898 switching the current inferior, not before.
13899
13900 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13901
13902 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13903 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13904 i386-linux.c and amd64-linux.c.
13905 (reg-i386.o): Removed.
13906 (reg-i386.c): Likewise.
13907 (reg-i386-linux.o): Likewise.
13908 (reg-i386-linux.c): Likewise.
13909 (reg-x86-64.o): Likewise.
13910 (reg-x86-64.c): Likewise.
13911 (reg-x86-64-linux.o): Likewise.
13912 (reg-x86-64-linux.c): Likewise.
13913 (i386.o): New.
13914 (i386.c): Likewise.
13915 (i386-linux.o): Likewise.
13916 (i386-linux.c): Likewise.
13917 (amd64.o): Likewise.
13918 (amd64.c): Likewise.
13919 (amd64-linux.o): Likewise.
13920 (amd64-linux.c): Likewise.
13921
13922 * configure.srv (srv_i386_regobj): New.
13923 (srv_i386_linux_regobj): Likewise.
13924 (srv_amd64_regobj): Likewise.
13925 (srv_amd64_linux_regobj): Likewise.
13926 (srv_i386_32bit_xmlfiles): Likewise.
13927 (srv_i386_64bit_xmlfiles): Likewise.
13928 (srv_i386_xmlfiles): Likewise.
13929 (srv_amd64_xmlfiles): Likewise.
13930 (srv_i386_linux_xmlfiles): Likewise.
13931 (srv_amd64_linux_xmlfiles): Likewise.
13932 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13933 srv_xmlfiles to $srv_i386_xmlfiles.
13934 (i[34567]86-*-mingw32ce*): Likewise.
13935 (i[34567]86-*-mingw*): Likewise.
13936 (i[34567]86-*-nto*): Likewise.
13937 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13938 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13939 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13940 (x86_64-*-linux*): Likewise.
13941
13942 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13943 (init_registers_amd64_linux): New.
13944 (x86_arch_setup): Replace init_registers_x86_64_linux with
13945 init_registers_amd64_linux.
13946
13947 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13948
13949 * configure.ac: Check for libdl. If it is not available link against
13950 static libthread_db.
13951 * configure: Regenerate.
13952
13953 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13954
13955 PR9605
13956
13957 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13958 handing a read watchpoint.
13959 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13960
13961 2010-02-12 Doug Evans <dje@google.com>
13962
13963 * linux-low.c (linux_supports_tracefork_flag): Document.
13964 (linux_look_up_symbols): Add comment.
13965
13966 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13967
13968 * regcache.c (supply_register): Clear regcache if buf is NULL.
13969
13970 2010-02-02 Nicolas Roche <roche@sourceware.org>
13971 Joel Brobecker <brobecker@adacore.com>
13972
13973 * inferiors.c (find_inferior): Add function documentation.
13974 (unloaded_dll): Handle the case where the unloaded dll has not
13975 been previously registered in the dll list.
13976
13977 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13978
13979 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13980 (thumb2_breakpoint): New.
13981 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13982
13983 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13984
13985 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13986 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13987 breakpoints.
13988
13989 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13990
13991 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13992
13993 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13994
13995 * linux-s390-low.c (s390_collect_ptrace_register)
13996 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13997
13998 2010-01-21 Doug Evans <dje@google.com>
13999
14000 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14001 (PTRACE_ARG4_TYPE): New macro.
14002 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14003 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14004 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14005 (usr_store_inferior_registers): Ditto.
14006 (linux_read_memory, linux_write_memory): Ditto.
14007 (linux_test_for_tracefork): Ditto.
14008
14009 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14010 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14011
14012 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14013
14014 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14015 target.
14016
14017 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14018
14019 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14020 prototype to take a regcache. Adjust.
14021
14022 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14023
14024 * regcache.h (struct thread_info): Forward declare.
14025 (struct regcache): New.
14026 (new_register_cache): Adjust prototype.
14027 (get_thread_regcache): Declare.
14028 (free_register_cache): Adjust prototype.
14029 (registers_to_string, registers_from_string): Ditto.
14030 (supply_register, supply_register_by_name, collect_register)
14031 (collect_register_as_string, collect_register_by_name): Ditto.
14032 * regcache.c (struct inferior_regcache_data): Delete.
14033 (get_regcache): Rename to ...
14034 (get_thread_regcache): ... this. Adjust. Switch inferior before
14035 fetching registers.
14036 (regcache_invalidate_one): Adjust.
14037 (regcache_invalidate): Fix prototype.
14038 (new_register_cache): Return the new register cache.
14039 (free_register_cache): Change prototype.
14040 (realloc_register_cache): Adjust.
14041 (registers_to_string): Change prototype to take a regcache. Adjust.
14042 (registers_from_string): Ditto.
14043 (register_data): Ditto.
14044 (supply_register): Ditto.
14045 (supply_register_by_name): Ditto.
14046 (collect_register): Ditto.
14047 (collect_register_as_string): Ditto.
14048 (collect_register_by_name): Ditto.
14049 * server.c (process_serial_event): Adjust.
14050 * linux-low.h (regset_fill_func, regset_store_func): Change
14051 prototype.
14052 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14053 Change prototype.
14054 * linux-low.c (get_stop_pc): Adjust.
14055 (check_removed_breakpoint): Adjust.
14056 (linux_wait_for_event): Adjust.
14057 (linux_resume_one_lwp): Adjust.
14058 (fetch_register): Add regcache parameter. Adjust.
14059 (usr_store_inferior_registers): Ditto.
14060 (regsets_fetch_inferior_registers): Ditto.
14061 (regsets_store_inferior_registers): Ditto.
14062 (linux_fetch_registers, linux_store_registers): Ditto.
14063 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14064 regcache. Adjust.
14065 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14066 Ditto.
14067 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14068 prototype to take a regcache.
14069 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14070 * remote-utils.c (convert_ascii_to_int, outreg)
14071 (prepare_resume_reply): Change prototype to take a regcache.
14072 Adjust.
14073 * target.h (struct target_ops) <fetch_registers, store_registers>:
14074 Change prototype to take a regcache.
14075 (fetch_inferior_registers, store_inferior_registers): Change
14076 prototype to take a regcache. Adjust.
14077 * proc-service.c (ps_lgetregs): Adjust.
14078 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14079 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14080 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14081 take a regcache. Adjust.
14082 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14083 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14084 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14085 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14086 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14087 (cris_cannot_fetch_register):
14088 (cris_breakpoint_at): Change prototype to take a regcache.
14089 Adjust.
14090 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14091 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14092 to take a regcache. Adjust.
14093 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14094 Adjust.
14095 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14096 take a regcache. Adjust.
14097 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14098 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14099 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14100 * linux-mips-low.c (mips_get_pc):
14101 (mips_set_pc): Change prototype to take a regcache. Adjust.
14102 (mips_reinsert_addr): Adjust.
14103 (mips_collect_register): Change prototype to take a regcache.
14104 Adjust.
14105 (mips_supply_register):
14106 (mips_collect_register_32bit, mips_supply_register_32bit)
14107 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14108 (mips_store_fpregset): Ditto.
14109 * linux-ppc-low.c (ppc_supply_ptrace_register)
14110 (ppc_supply_ptrace_register): Ditto.
14111 (parse_spufs_run): Adjust.
14112 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14113 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14114 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14115 take a regcache. Adjust.
14116 * linux-s390-low.c (s390_collect_ptrace_register)
14117 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14118 (s390_set_pc): Change prototype to take a regcache. Adjust.
14119 (s390_arch_setup): Adjust.
14120 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14121 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14122 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14123 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14124 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14125 regcache. Adjust.
14126 (sparc_breakpoint_at): Adjust.
14127 * linux-xtensa-low.c (xtensa_fill_gregset):
14128 (xtensa_store_gregset):
14129 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14130 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14131 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14132 prototype to take a regcache. Adjust.
14133 * win32-arm-low.c (arm_fetch_inferior_register)
14134 (arm_store_inferior_register): Change prototype to take a
14135 regcache. Adjust.
14136 * win32-i386-low.c (i386_fetch_inferior_register)
14137 (i386_store_inferior_register): Change prototype to take a
14138 regcache. Adjust.
14139 * win32-low.c (child_fetch_inferior_registers)
14140 (child_store_inferior_registers): Change prototype to take a
14141 regcache. Adjust.
14142 (win32_wait): Adjust.
14143 (win32_fetch_inferior_registers): Change prototype to take a
14144 regcache. Adjust.
14145 (win32_store_inferior_registers): Adjust.
14146 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14147 store_inferior_register>: Change prototype to take a regcache.
14148
14149 2010-01-20 Doug Evans <dje@google.com>
14150
14151 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14152 #ifdef.
14153 (linux_wait_for_event1, linux_init_signals): Ditto.
14154 (W_STOPCODE): Provide definition if missing.
14155
14156 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14157
14158 * linux-low.c (linux_core_of_thread): New.
14159 (compare_ints, show_process, list_threads): New.
14160 (linux_qxfer_osdata): Report threads and cores.
14161 (linux_target_op): Register linux_core_of_thread.
14162 * remote-utils.c (prepare_resume_reply): Report the core.
14163 (buffer_xml_printf): Support %d specifier.
14164 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14165 New.
14166 (handle_query): Handle qXfer:threads. Announce availability
14167 thereof.
14168 * target.h (struct target_ops): New field core_of_thread.
14169
14170 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14171
14172 * Makefile.in (clean): Remove new generated files.
14173 (reg-s390.o, reg-s390.c): Remove rules.
14174 (reg-s390x.o, reg-s390x.c): Likewise.
14175 (s390-linux32.o, s390-linux32.c): Add rules.
14176 (s390-linux64.o, s390-linux64.c): Likewise.
14177 (s390x-linux64.o, s390x-linux64.c): Likewise.
14178 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14179 * linux-s390-low.c: Include <elf.h>.
14180 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14181 (init_registers_s390): Remove prototype.
14182 (init_registers_s390x): Likewise.
14183 (init_registers_s390_linux32): Add prototype.
14184 (init_registers_s390_linux64): Likewise.
14185 (init_registers_s390x_linux64): Likewise.
14186 (s390_num_regs_3264): New define.
14187 (s390_regmap_3264): New global variable.
14188 (s390_cannot_fetch_register): Remove obsolete check.
14189 (s390_cannot_store_register): Likewise.
14190 (s390_collect_ptrace_register): Handle upper/lower register halves.
14191 (s390_supply_ptrace_register): Likewise.
14192 (s390_fill_gregset): Update to register number changes.
14193 (s390_get_hwcap): New routine.
14194 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14195 Install appropriate regmap and register set.
14196
14197 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14198
14199 * server.c (gdbserver_version): Update copyright year to 2010.
14200 * gdbreplay.c (gdbreplay_version): Likewise.
14201
14202 2009-12-28 Doug Evans <dje@google.com>
14203
14204 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14205 elf/external.h. Include <elf.h> instead but only if necessary.
14206
14207 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14208
14209 * linux-low.c (linux_remove_process): Remove `detaching'
14210 parameter. Don't release/detach from thread_db here.
14211 (linux_kill): Release/detach from thread_db here, ...
14212 (linux_detach): ... and here, before actually detaching.
14213 (linux_wait_1): ... and here, when a process exits.
14214 * thread-db.c (any_thread_of): New.
14215 (thread_db_free): Switch the current inferior to a thread of the
14216 passed in process.
14217
14218 2009-12-21 Doug Evans <dje@google.com>
14219
14220 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14221
14222 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14223 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14224 warning ifndef __NR_tkill. Move setting of errno there too.
14225 Delete unnecessary resetting of errno after syscall.
14226 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14227
14228 * configure.ac: Check for dladdr.
14229 * config.in: Regenerate.
14230 * configure: Regenerate.
14231 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14232 (try_thread_db_load): Update.
14233
14234 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14235
14236 2009-12-18 Doug Evans <dje@google.com>
14237
14238 * event-loop.c: Include unistd.h if it exists.
14239
14240 * linux-low.c (my_waitpid): Move definition away from being in
14241 between linux_tracefork_child/linux_test_for_tracefork.
14242
14243 * gdb_proc_service.h (psaddr_t): Fix type.
14244 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14245 signature to match glibc.
14246
14247 2009-12-16 Doug Evans <dje@google.com>
14248
14249 * linux-low.c (linux_read_memory): Fix argument to read.
14250
14251 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14252
14253 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14254 events, don't leave current_inferior pointing at null.
14255
14256 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14257
14258 * win32-low.c (LOG): Delete.
14259 (OUTMSG): Output to stderr.
14260 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14261 on compile time LOG macro.
14262 (win32_wait): Fix debug output.
14263
14264 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14265
14266 * win32-low.c (win32_add_one_solib): If the dll name is
14267 "ntdll.dll", prepend the system directory to the dll path.
14268
14269 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14270
14271 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14272
14273 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14274 Vladimir Prus <vladimir@codesourcery.com>
14275
14276 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14277 * configure.ac: Check for __mcoldfire__ and set
14278 gdb_cv_m68k_is_coldfire.
14279 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14280 reg-cf.o and reg-m68k.o.
14281 * configure: Regenerated.
14282
14283 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14284
14285 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14286 Pass it to thread_db_free.
14287 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14288 proper `detaching' argument to linux_remove_process.
14289 * linux-low.h (thread_db_free): Add `detaching' parameter.
14290 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14291 to thread_db_free.
14292 (thread_db_free): Add `detaching' parameter. Only
14293 call td_ta_clear_event if detaching from process.
14294
14295 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14296
14297 * thread-db.c (thread_db_free): Fix typo.
14298
14299 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14300
14301 PR gdb/10838
14302 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14303
14304 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14305
14306 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14307 with an i686 compiler.
14308 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14309 needed.
14310 * configure: Rebuilt.
14311
14312 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14313
14314 PR gdb/10783
14315
14316 * server.c (handle_search_memory_1): Correct read_addr initialization
14317 in loop for searching subsequent chunks.
14318
14319 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14320
14321 * configure.ac: New --with-libthread-db option.
14322 * thread-db.c: Allow direct dependence on libthread_db.
14323 (thread_db_free): Adjust.
14324 * config.in: Regenerate.
14325 * configure: Likewise.
14326
14327 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14328
14329 PR gdb/10757
14330 * thread-db.c (attach_thread): New function.
14331 (maybe_attach_thread): Return success/failure.
14332 (find_new_threads_callback): Adjust.
14333 (thread_db_find_new_threads): Loop until no new threads.
14334
14335 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14336
14337 * proc-service.c (ps_lgetregs): Formatting.
14338
14339 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14340
14341 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14342 * configure.ac: Adjust.
14343 * linux-low.h (struct process_info_private): Move members to struct
14344 thread_db.
14345 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14346 * linux-low.c (linux_remove_process): Adjust.
14347 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14348 * server.c (handle_query): Move code ...
14349 (handle_monitor_command): ... here. New function.
14350 * target.h (struct target_ops): New member.
14351 * thread-db.c (struct thread_db): New.
14352 (libthread_db_search_path): New variable.
14353 (thread_db_create_event, thread_db_enable_reporting)
14354 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14355 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14356 (try_thread_db_load_1, dladdr_to_soname): New functions.
14357 (try_thread_db_load, thread_db_load_search): New functions.
14358 (thread_db_init): Search for libthread_db.
14359 (thread_db_free): New function.
14360 (thread_db_handle_monitor_command): Likewise.
14361 * config.in: Regenerate.
14362 * configure: Regenerate.
14363
14364 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14365
14366 * spu-low.c (spu_kill): Wait for inferior to terminate.
14367 Call clear_inferiors.
14368 (spu_detach): Call clear_inferiors.
14369
14370 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14371
14372 * aclocal.m4: Regenerate.
14373 * config.in: Likewise.
14374 * configure: Likewise.
14375
14376 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14377
14378 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14379 (parse_spufs_run): New function.
14380 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14381 (ppc_breakpoint_at): Handle SPU breakpoints.
14382
14383 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14384
14385 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14386 (SPUFS_MAGIC): Define.
14387 (spu_enumerate_spu_ids): New function.
14388 (linux_qxfer_spu): New function.
14389 (linux_target_ops): Install linux_qxfer_spu.
14390
14391 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14392
14393 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14394 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14395 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14396 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14397 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14398 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14399 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14400 (init_registers_powerpc_cell32l): Add prototype.
14401 (init_registers_powerpc_cell64l): Likewise.
14402 (ppc_arch_setup): Detect Cell/B.E. architecture.
14403
14404 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14405
14406 * Makefile.in (datarootdir): New variable.
14407
14408 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14409
14410 * linux-low.c (linux_write_memory): Update debugging output.
14411 * Makefile.in (clean): Add new descriptions.
14412 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14413 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14414 * configure.srv: Add new files for arm*-*-linux*.
14415 * linux-arm-low.c: Add new declarations.
14416 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14417 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14418 (HWCAP_VFPv3D16): New.
14419 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14420 instead of __IWMMXT__.
14421 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14422 (arm_arch_setup): New.
14423 (target_regsets): Remove #ifdef. Add VFP regset.
14424 (the_low_target): Use arm_arch_setup.
14425
14426 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14427
14428 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14429 the main thread again.
14430
14431 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14432
14433 Adding Neutrino gdbserver.
14434 * configure: Regenerated.
14435 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14436 * configure.srv (i[34567]86-*-nto*): New target.
14437 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14438 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14439 (nto_comctrl) [__QNX__]: New function.
14440 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14441
14442 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14443
14444 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14445 srv_tgtobj.
14446
14447 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14448 Pedro Alves <pedro@codesourcery.com>
14449
14450 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14451 don't support CONTEXT_EXTENDED_REGISTERS.
14452 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14453 (the_low_target): Install them.
14454 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14455 failing with ERROR_PIPE_NOT_CONNECTED.
14456
14457 2009-06-30 Doug Evans <dje@google.com>
14458 Pierre Muller <muller@ics.u-strasbg.fr>
14459
14460 Add h/w watchpoint support to x86-linux, win32-i386.
14461 * Makefile.in (SFILES): Add i386-low.c
14462 (i386_low_h): Define.
14463 (i386-low.o): Add dependencies.
14464 (linux-x86-low.o): Add i386-low.h dependency.
14465 (win32-i386-low.o): Ditto.
14466 * i386-low.c: New file.
14467 * i386-low.h: New file.
14468 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14469 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14470 * linux-low.c (linux_add_process): Initialize arch_private.
14471 (linux_remove_process): Free arch_private.
14472 (add_lwp): Initialize arch_private.
14473 (delete_lwp): Free arch_private.
14474 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14475 provided.
14476 * linux-low.h (process_info_private): New member arch_private.
14477 (lwp_info): New member arch_private.
14478 (linux_target_ops): New members new_process, new_thread,
14479 prepare_to_resume.
14480 (ptid_of): New macro.
14481 * linux-x86-low.c: Include stddef.h, i386-low.h.
14482 (arch_process_info): New struct.
14483 (arch_lwp_info): New struct.
14484 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14485 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14486 (i386_dr_low_get_status): New function.
14487 (x86_insert_point, x86_remove_point): New functions.
14488 (x86_stopped_by_watchpoint): New function.
14489 (x86_stopped_data_address): New function.
14490 (x86_linux_new_process, x86_linux_new_thread): New functions.
14491 (x86_linux_prepare_to_resume): New function.
14492 (the_low_target): Add entries for insert_point, remove_point,
14493 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14494 prepare_to_resume.
14495 * server.c (debug_hw_points): New global.
14496 (monitor_show_help): Document set debug-hw-points.
14497 (handle_query): Process "set debug-hw-points".
14498 * server.h (debug_hw_points): Declare.
14499 (paddress): Declare.
14500 * utils.c (NUMCELLS, CELLSIZE): New macros.
14501 (get_sell, xsnprintf, paddress): New functions.
14502 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14503 remove_point, stopped_by_watchpoint, stopped_data_address.
14504 * win32-i386-low.c: Include i386-low.h.
14505 (debug_reg_state): Replaces dr.
14506 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14507 (i386_dr_low_get_status): New function.
14508 (i386_insert_point, i386_remove_point): New functions.
14509 (i386_stopped_by_watchpoint): New function.
14510 (i386_stopped_data_address): New function.
14511 (i386_initial_stuff): Update.
14512 (get_thread_context,set_thread_context,i386_thread_added): Update.
14513 (the_low_target): Add entries for insert_point,
14514 remove_point, stopped_by_watchpoint, stopped_data_address.
14515 * win32-low.c (win32_insert_watchpoint): New function.
14516 (win32_remove_watchpoint): New function.
14517 (win32_stopped_by_watchpoint): New function.
14518 (win32_stopped_data_address): New function.
14519 (win32_target_ops): Add entries for insert_watchpoint,
14520 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14521 * win32-low.h (win32_target_ops): New members insert_point,
14522 remove_point, stopped_by_watchpoint, stopped_data_address.
14523
14524 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14525
14526 * server.c (process_serial_event): Re-return unsupported, not
14527 error, if the type isn't recognized. Re-allow supporting only
14528 insert or remove packets. Also call require_running for
14529 breakpoints. Add missing break statement to default case. Tidy.
14530 * target.h (struct target_ops): Rename insert_watchpoint to
14531 insert_point, and remove_watchpoint to remove_point.
14532
14533 * linux-low.h (struct linux_target_ops): Likewise.
14534 * linux-low.c (linux_insert_watchpoint): Rename to ...
14535 (linux_insert_point): ... this. Adjust.
14536 (linux_remove_watchpoint): Rename to ...
14537 (linux_remove_point): ... this. Adjust.
14538 (linux_target_ops): Adjust.
14539 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14540 (cris_insert_point): ... this.
14541 (cris_remove_watchpoint): Rename to ...
14542 (cris_remove_point): ... this.
14543 (the_low_target): Adjust.
14544
14545 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14546
14547 * server.c (handle_v_kill): Pass signal_pid to
14548 kill_inferior if multi_process is zero.
14549
14550 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14551
14552 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14553 * target.h (target_ops): Comment for *_watchpoint to make it clear
14554 the functions can get types '0' and '1'.
14555
14556 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14557
14558 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14559 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14560 * regcache.c (get_regcache): Likewise.
14561 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14562 * win32-low.c (child_fetch_inferior_registers): Remove check for
14563 regno 0.
14564
14565 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14566 Pedro Alves <pedro@codesourcery.com>
14567
14568 * target.h (struct target_ops) <supports_multi_process>: New
14569 callback.
14570 (target_supports_multi_process): New.
14571 * server.c (handle_query): Even if GDB reports support, only
14572 enable multi-process if the target also supports it. Report
14573 multi-process support only if the target backend supports it.
14574 * linux-low.c (linux_supports_multi_process): New function.
14575 (linux_target_ops): Install it as target_supports_multi_process
14576 callback.
14577
14578 2009-05-24 Doug Evans <dje@google.com>
14579
14580 Global renaming of find_thread_pid to find_thread_ptid.
14581 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14582 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14583 All callers updated.
14584
14585 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14586 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14587 directly.
14588
14589 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14590 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14591 (linux_resume_one_lwp): Ditto.
14592
14593 2009-05-23 Doug Evans <dje@google.com>
14594
14595 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14596 from struct inferior_list_entry * to struct lwp_info *.
14597 All callers updated.
14598
14599 2009-05-13 Doug Evans <dje@google.com>
14600
14601 * linux-x86-low.c: Don't include assert.h.
14602 (x86_siginfo_fixup): Use fatal, not assert.
14603 (x86_arch_setup): Fix comment.
14604
14605 2009-05-12 Doug Evans <dje@google.com>
14606
14607 Biarch support for i386/amd64 gdbserver.
14608 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14609 Add linux-x86-low.c.
14610 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14611 (linux-x86-low.o): Add.
14612 * linux-x86-64-low.c: Delete.
14613 * linux-i386-low.c: Delete.
14614 * linux-x86-low.c: New file.
14615 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14616 linux-x86-low.o.
14617 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14618 linux-x86-low.o.
14619 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14620 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14621 (linux_child_pid_to_exec_file): New function.
14622 (elf_64_header_p, elf_64_file_p): New functions.
14623 (siginfo_fixup): New function.
14624 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14625 give target a chance to convert layout.
14626 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14627 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14628
14629 2009-05-07 Doug Evans <dje@google.com>
14630
14631 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14632 (regsets_store_inferior_registers): Ditto.
14633
14634 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14635
14636 PR server/10048
14637
14638 * linux-low.c (must_set_ptrace_flags): Delete.
14639 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14640 of the global.
14641 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14642 `lwp->must_set_ptrace_flags' instead.
14643 (linux_wait_for_event_1): Set ptrace options here.
14644 (linux_wait_1): ... not here.
14645
14646 2009-04-30 Doug Evans <dje@google.com>
14647
14648 * inferiors.c (started_inferior_callback): New function.
14649 (attached_inferior_callback): New function.
14650 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14651 * server.c (print_started_pid, print_attached_pid): New functions.
14652 (detach_or_kill_for_exit): New function.
14653 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14654 * server.h (have_started_inferiors_p): Declare.
14655 (have_attached_inferiors_p): Declare.
14656
14657 * inferiors.c (remove_process): Fix memory leak, free process.
14658 * linux-low.c (linux_remove_process): New function.
14659 (linux_kill): Call it instead of remove_process.
14660 (linux_detach, linux_wait_1): Ditto.
14661
14662 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14663
14664 * configure.srv: Add x86 Windows CE target.
14665
14666 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14667
14668 * inferiors.c (get_thread_process): Make global.
14669 * server.h (get_thread_process): Add prototype.
14670 * thread-db.c (find_one_thread): Use get_thread_process
14671 instead of current_process.
14672 (thread_db_get_tls_address): Do not crash if called when
14673 thread layer is not yet initialized.
14674
14675 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14676
14677 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14678 * spu-low.c (current_tid): Rename to ...
14679 (current_ptid): ... this.
14680 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14681 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14682 ptid_get_lwp (current_ptid) instead of current_tid.
14683 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14684 instead of current_tid. Use find_process_pid to verify pid
14685 argument is valid. Pass proper argument to remove_process.
14686 (spu_thread_alive): Compare current_ptid instead of current_tid.
14687 (spu_resume): Likewise.
14688
14689 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14690
14691 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14692 variable.
14693
14694 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14695
14696 Implement the multiprocess extensions, and add linux multiprocess
14697 support.
14698
14699 * server.h (ULONGEST): Declare.
14700 (struct ptid, ptid_t): New.
14701 (minus_one_ptid, null_ptid): Declare.
14702 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14703 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14704 (struct inferior_list_entry): Change `id' type from unsigned from
14705 to ptid_t.
14706 (struct sym_cache, struct breakpoint, struct
14707 process_info_private): Forward declare.
14708 (struct process_info): Declare.
14709 (current_process): Declare.
14710 (all_processes): Declare.
14711 (initialize_inferiors): Declare.
14712 (add_thread): Adjust to use ptid_t.
14713 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14714 (add_process, remove_process, find_thread_pid): Declare.
14715 (find_inferior_id): Adjust to use ptid_t.
14716 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14717 (multi_process): Declare.
14718 (push_event): Adjust to use ptid_t.
14719 (read_ptid, write_ptid): Declare.
14720 (prepare_resume_reply): Adjust to use ptid_t.
14721 (clear_symbol_cache): Declare.
14722 * inferiors.c (all_processes): New.
14723 (null_ptid, minus_one_ptid): New.
14724 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14725 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14726 (add_thread): Change unsigned long to ptid. Remove gdb_id
14727 parameter. Adjust.
14728 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14729 (gdb_id_to_thread): Rename to ...
14730 (find_thread_pid): ... this. Change unsigned long to ptid.
14731 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14732 (loaded_dll, pull_pid_from_list): Adjust.
14733 (add_process, remove_process, find_process_pid)
14734 (get_thread_process, current_process, initialize_inferiors): New.
14735 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14736 (struct target_waitstatus) <related_pid>: Ditto.
14737 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14738 return type to int.
14739 (struct target_ops) <join>: Add `pid' argument.
14740 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14741 (struct target_ops) <wait>: Add `ptid' field. Change return type
14742 to ptid.
14743 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14744 (mywait): Add `ptid' argument. Change return type to ptid_t.
14745 (target_pid_to_str): Declare.
14746 * target.c (set_desired_inferior): Adjust to use ptids.
14747 (mywait): Add new `ptid' argument. Adjust.
14748 (target_pid_to_str): New.
14749 * mem-break.h (free_all_breakpoints): Declare.
14750 * mem-break.c (breakpoints): Delelete.
14751 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14752 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14753 to use per-process breakpoint list.
14754 (free_all_breakpoints): New.
14755 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14756 (symbol_cache, all_symbols_looked_up): Delete.
14757 (hexchars): New.
14758 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14759 read_ptid): New.
14760 (prepare_resume_reply): Change ptid argument's type from unsigned
14761 long to ptid_t. Adjust. Implement W;process and X;process.
14762 (free_sym_cache, clear_symbol_cache): New.
14763 (look_up_one_symbol): Adjust to per-process symbol cache. *
14764 * server.c (cont_thread, general_thread, step_thread): Change type
14765 to ptid_t.
14766 (attached): Delete.
14767 (multi_process): New.
14768 (last_ptid): Change type to ptid_t.
14769 (struct vstop_notif) <ptid>: Change type to ptid_t.
14770 (queue_stop_reply, push_event): Change `ptid' argument's type to
14771 ptid_t.
14772 (discard_queued_stop_replies): Add `pid' argument.
14773 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14774 changes. Don't reference the `attached' global.
14775 (attach_inferior): Adjust to mywait interface changes.
14776 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14777 features. Handle and report "multiprocess+". Handle
14778 "qAttached:PID".
14779 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14780 changes.
14781 (handle_v_kill): New.
14782 (handle_v_stopped): Adjust to use target_pid_to_str.
14783 (handle_v_requests): Allow multiple attaches and runs when
14784 multiprocess extensions are in effect. Handle "vKill".
14785 (myresume): Adjust to use ptids.
14786 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14787 (handle_status): Adjust to discard_queued_stop_replies interface
14788 change.
14789 (first_thread_of, kill_inferior_callback)
14790 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14791 (main): Call initialize_inferiors. Adjust to use ptids, killing
14792 and detaching from all inferiors. Handle multiprocess packet
14793 variants.
14794 * linux-low.h: Include gdb_proc_service.h.
14795 (struct process_info_private): New.
14796 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14797 <lwpid_of>: Use ptid_get_lwp.
14798 (get_lwp_thread): Adjust.
14799 (struct lwp_info): Add `dead' member.
14800 (find_lwp_pid): Declare.
14801 * linux-low.c (thread_db_active): Delete.
14802 (new_inferior): Adjust comment.
14803 (inferior_pid): Delete.
14804 (linux_add_process): New.
14805 (handle_extended_wait): Adjust.
14806 (add_lwp): Change unsigned long to ptid.
14807 (linux_create_inferior): Add process to processes table. Adjust
14808 to use ptids. Don't set new_inferior here.
14809 (linux_attach_lwp): Rename to ...
14810 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14811 it. Adjust to use ptids.
14812 (linux_attach_lwp): New.
14813 (linux_attach): Add process to processes table. Don't set
14814 new_inferior here.
14815 (struct counter): New.
14816 (second_thread_of_pid_p, last_thread_of_process_p): New.
14817 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14818 multiple processes.
14819 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14820 processes. Remove process from process table.
14821 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14822 to multiple processes.
14823 (any_thread_of): New.
14824 (linux_detach): Add `pid' argument, and handle it. Remove process
14825 from processes table.
14826 (linux_join): Add `pid' argument. Handle it.
14827 (linux_thread_alive): Change unsighed long argument to ptid_t.
14828 Consider dead lwps as not being alive.
14829 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14830 threads we're not interested in.
14831 (same_lwp, find_lwp_pid): New.
14832 (linux_wait_for_lwp): Change `pid' argument's type from int to
14833 ptid_t. Adjust.
14834 (linux_wait_for_event): Rename to ...
14835 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14836 from int to ptid_t. Adjust.
14837 (linux_wait_for_event): New.
14838 (linux_wait_1): Add `ptid' argument. Change return type to
14839 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14840 that exit from the process table.
14841 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14842 Adjust.
14843 (mark_lwp_dead): New.
14844 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14845 stopping all threads, mark its main lwp as dead.
14846 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14847 ptids.
14848 (fetch_register, usr_store_inferior_registers)
14849 (regsets_fetch_inferior_registers)
14850 (regsets_store_inferior_registers, linux_read_memory)
14851 (linux_write_memory): Inline `inferior_pid'.
14852 (linux_look_up_symbols): Adjust to use per-process
14853 `thread_db_active'.
14854 (linux_request_interrupt): Adjust to use ptids.
14855 (linux_read_auxv): Inline `inferior_pid'.
14856 (initialize_low): Don't reference thread_db_active.
14857 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14858 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14859 (ps_getpid): Return the pid of the current inferior.
14860 * thread-db.c (proc_handle, thread_agent): Delete.
14861 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14862 per-process data.
14863 (find_one_thread): Change argument type to ptid_t. Adjust to
14864 per-process data.
14865 (maybe_attach_thread): Adjust to per-process data and ptids.
14866 (thread_db_find_new_threads): Ditto.
14867 (thread_db_init): Ditto.
14868 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14869 processes table. Adjust to use ptids.
14870 (spu_kill, spu_detach): Adjust interface. Remove process from
14871 processes table.
14872 (spu_join, spu_thread_alive): Adjust interface.
14873 (spu_wait): Adjust interface. Remove process from processes
14874 table. Adjust to use ptids.
14875 * win32-low.c (current_inferior_tid): Delete.
14876 (current_inferior_ptid): New.
14877 (debug_event_ptid): New.
14878 (thread_rec): Take a ptid. Adjust.
14879 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14880 (child_delete_thread): Ditto.
14881 (do_initial_child_stuff): Add `attached' argument. Add process to
14882 processes table.
14883 (child_fetch_inferior_registers, child_store_inferior_registers):
14884 Adjust.
14885 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14886 (win32_attach): Pass 1 to do_initial_child_stuff.
14887 (win32_kill): Adjust interface. Remove process from processes
14888 table.
14889 (win32_detach): Ditto.
14890 (win32_join): Adjust interface.
14891 (win32_thread_alive): Take a ptid.
14892 (win32_resume): Adjust to use ptids.
14893 (get_child_debug_event): Ditto.
14894 (win32_wait): Adjust interface. Remove exiting process from
14895 processes table.
14896
14897 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14898
14899 Non-stop mode support.
14900
14901 * server.h (non_stop): Declare.
14902 (gdb_client_data, handler_func): Declare.
14903 (delete_file_handler, add_file_handler, start_event_loop):
14904 Declare.
14905 (handle_serial_event, handle_target_event, push_event)
14906 (putpkt_notif): Declare.
14907 * target.h (enum resume_kind): New.
14908 (struct thread_resume): Replace `step' field by `kind' field.
14909 (TARGET_WNOHANG): Define.
14910 (struct target_ops) <wait>: Add `options' argument.
14911 <supports_non_stop, async, start_non_stop>: New fields.
14912 (target_supports_non_stop, target_async): New.
14913 (start_non_stop): Declare.
14914 (mywait): Add `options' argument.
14915 * target.c (mywait): Add `options' argument. Print child exit
14916 notifications here.
14917 (start_non_stop): New.
14918 * server.c (non_stop, own_buf, mem_buf): New globals.
14919 (struct vstop_notif): New.
14920 (notif_queue): New global.
14921 (queue_stop_reply, push_event, discard_queued_stop_replies)
14922 (send_next_stop_reply): New.
14923 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14924 interface changes.
14925 (attach_inferior): In non-stop mode, don't wait for the target
14926 here.
14927 (handle_general_set): Handle QNonStop.
14928 (handle_query): When handling qC, return the current general
14929 thread, instead of the first thread of the list.
14930 (handle_query): If the backend supports non-stop mode, include
14931 QNonStop+ in the qSupported query response.
14932 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14933 and non-stop mode.
14934 (handle_v_attach, handle_v_run): Handle non-stop mode.
14935 (handle_v_stopped): New.
14936 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14937 (myresume): Adjust to use resume_kind. Handle non-stop.
14938 (queue_stop_reply_callback): New.
14939 (handle_status): Handle non-stop mode.
14940 (main): Clear non_stop flag on reconnection. Use the event-loop.
14941 Refactor serial protocol handling from here ...
14942 (process_serial_event): ... to this new function. When GDB
14943 selects any thread, select one here. In non-stop mode, wait until
14944 GDB acks all pending events before exiting.
14945 (handle_serial_event, handle_target_event): New.
14946 * remote-utils.c (remote_open): Install remote_desc in the event
14947 loop.
14948 (remote_close): Remove remote_desc from the event loop.
14949 (putpkt_binary): Rename to...
14950 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14951 (putpkt_binary): New as wrapper around putpkt_binary_1.
14952 (putpkt_notif): New.
14953 (prepare_resume_reply): In non-stop mode, don't change the
14954 general_thread.
14955 * event-loop.c: New.
14956 * Makefile.in (OBJ): Add event-loop.o.
14957 (event-loop.o): New rule.
14958
14959 * linux-low.h (pid_of): Moved here.
14960 (lwpid_of): New.
14961 (get_lwp_thread): Use lwpid_of.
14962 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14963 * linux-low.c (pid_of): Delete.
14964 (inferior_pid): Use lwpid_of.
14965 (linux_event_pipe): New.
14966 (target_is_async_p): New.
14967 (delete_lwp): New.
14968 (handle_extended_wait): Use lwpid_of.
14969 (add_lwp): Don't set lwpid field.
14970 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14971 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14972 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14973 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14974 first. Adjust to linux_wait_for_event interface changes. Use
14975 lwpid_of.
14976 (linux_detach): Don't delete the main lwp here.
14977 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14978 (status_pending_p): Don't consider explicitly suspended lwps.
14979 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14980 pointer. Add OPTIONS argument. Change return type to int. Use
14981 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14982 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14983 pointer. Add status pointer argument. Return a pid instead of a
14984 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14985 changes. In non-stop mode, don't switch to a random thread.
14986 (linux_wait): Rename to...
14987 (linux_wait_1): ... this. Add target_options argument, and handle
14988 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14989 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14990 clean exit and signal exit code. Don't stop all threads in
14991 non-stop mode. In all-stop mode, only stop all threads when
14992 reporting a stop to GDB. Handle explicit thread stop requests.
14993 (async_file_flush, async_file_mark): New.
14994 (linux_wait): New.
14995 (send_sigstop): Use lwpid_of.
14996 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14997 interface changes. In non-stop mode, don't switch to a random
14998 thread.
14999 (linux_resume_one_lwp): Use lwpid_of.
15000 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15001 (linux_resume_one_thread): ... this. Handle resume_stop. In
15002 non-stop mode, don't look for pending flag in all threads.
15003 (resume_status_pending_p): Don't consider explicitly suspended
15004 threads.
15005 (my_waitpid): Reimplement. Emulate __WALL.
15006 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15007 Use lwpid_of.
15008 (sigchld_handler, linux_supports_non_stop, linux_async)
15009 (linux_start_non_stop): New.
15010 (linux_target_ops): Register linux_supports_non_stop, linux_async
15011 and linux_start_non_stop.
15012 (initialize_low): Install SIGCHLD handler.
15013 * thread-db.c (thread_db_create_event, find_one_thread)
15014 (thread_db_get_tls_address): Use lwpid_of.
15015 * win32-low.c (win32_detach): Adjust to use resume_kind.
15016 (win32_wait): Add `options' argument.
15017 * spu-low.c (spu_resume): Adjust to use resume_kind.
15018 (spu_wait): Add `options' argument.
15019
15020 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15021
15022 Decouple target code from remote protocol.
15023
15024 * target.h (enum target_waitkind): New.
15025 (struct target_waitstatus): New.
15026 (struct target_ops) <wait>: Return an unsigned long. Take a
15027 target_waitstatus pointer instead of a char pointer.
15028 (mywait): Likewise.
15029 * target.c (mywait): Change prototype to return an unsigned long.
15030 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15031 * server.h (thread_from_wait, old_thread_from_wait): Delete
15032 declarations.
15033 (prepare_resume_reply): Change prototype to take a
15034 target_waitstatus.
15035 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15036 (last_status, last_ptid): New.
15037 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15038 pid instead of a signal.
15039 (attach_inferior): Remove "status" and "signal" parameters.
15040 Adjust.
15041 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15042 not as an address.
15043 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15044 (handle_v_requests, myresume): Remove "status" and "signal"
15045 parameters. Adjust.
15046 (handle_status): New.
15047 (main): Delete local `status'. Adjust.
15048 * remote-utils.c: Include target.h.
15049 (prepare_resume_reply): Change prototype to take a
15050 target_waitstatus. Adjust.
15051
15052 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15053 interface.
15054 * spu-low.c (spu_wait): Adjust.
15055 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15056 Delete.
15057 (win32_wait): Adjust.
15058
15059 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15060
15061 * target.h (struct thread_resume): Delete leave_stopped member.
15062 (struct target_ops): Add a `n' argument to the `resume' callback.
15063 * server.c (start_inferior): Adjust.
15064 (handle_v_cont, myresume): Adjust.
15065 * linux-low.c (check_removed_breakpoint): Adjust to resume
15066 interface change, and to removed leave_stopped field.
15067 (resume_ptr): Delete.
15068 (struct thread_resume_array): New.
15069 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15070 resume interface change.
15071 (linux_continue_one_thread, linux_queue_one_thread)
15072 (resume_status_pending_p): Check if the resume field is NULL
15073 instead of checking the leave_stopped member.
15074 (linux_resume): Adjust to the target resume interface change.
15075 * spu-low.c (spu_resume): Adjust to the target resume interface
15076 change.
15077 * win32-low.c (win32_detach, win32_resume): Ditto.
15078
15079 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15080
15081 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15082 flag.
15083 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15084 pending.
15085 (linux_continue_one_thread): Only preserve the stepping flag if
15086 there's a pending breakpoint.
15087
15088 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15089
15090 * server.c (main): After the inferior having exited, call
15091 remote_close before exiting gdbserver.
15092
15093 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15094
15095 Fix size of FPSCR in Power 7 processors.
15096 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15097 (PPC_FEATURE_HAS_DFP): New #define.
15098 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15099 size of the FPSCR.
15100
15101 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15102
15103 * server.c (handle_query) Whitespace and formatting.
15104
15105 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15106
15107 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15108 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15109 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15110 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15111 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15112 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15113 Makefile.in, configure.ac: Fix whitespace throughout.
15114 * configure: Regenerate.
15115
15116 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15117
15118 * inferiors.c (find_inferior): Make it safe for the callback
15119 function to delete the currently iterated inferior.
15120
15121 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15122
15123 * Makefile.in (linuw_low_h): Move higher.
15124 (thread-db.o): Depend on $(linux_low_h).
15125
15126 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15127
15128 Rename "process" to "lwp" throughout.
15129
15130 * linux-low.c (all_processes): Rename to...
15131 (all_lwps): ... this.
15132 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15133 (add_process): Rename to ...
15134 (add_lwp): ... this. Adjust.
15135 (linux_create_inferior): Adjust.
15136 (linux_attach_lwp): Adjust.
15137 (linux_attach): Adjust.
15138 (linux_kill_one_process): Rename to ...
15139 (linux_kill_one_lwp): ... this. Adjust.
15140 (linux_kill): Adjust.
15141 (linux_detach_one_process): Rename to ...
15142 (linux_detach_one_lwp): ... this. Adjust.
15143 (linux_detach): Adjust.
15144 (check_removed_breakpoint): Adjust.
15145 (status_pending_p): Adjust.
15146 (linux_wait_for_process): Rename to ...
15147 (linux_wait_for_lwp): ... this. Adjust.
15148 (linux_wait_for_event): Adjust.
15149 (send_sigstop): Adjust.
15150 (wait_for_sigstop): Adjust.
15151 (stop_all_processes): Rename to ...
15152 (stop_all_lwps): ... this.
15153 (linux_resume_one_process): Rename to ...
15154 (linux_resume_one_lwp): ... this. Adjust.
15155 (linux_set_resume_request, linux_continue_one_thread)
15156 (linux_queue_one_thread, resume_status_pending_p)
15157 (usr_store_inferior_registers, regsets_store_inferior_registers)
15158 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15159 Adjust.
15160 * linux-low.h (get_process): Rename to ...
15161 (get_lwp): ... this. Adjust.
15162 (get_thread_process): Rename to ...
15163 (get_thread_lwp): ... this. Adjust.
15164 (get_process_thread): Rename to ...
15165 (get_lwp_thread): ... this. Adjust.
15166 (struct process_info): Rename to ...
15167 (struct lwp_info): ... this.
15168 (all_processes): Rename to ...
15169 (all_lwps): ... this.
15170 * proc-service.c (ps_lgetregs): Adjust.
15171 * thread-db.c (thread_db_create_event, find_one_thread)
15172 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15173
15174 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15175
15176 * server.c (handle_query): Handle "qAttached".
15177
15178 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15179
15180 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15181 GPLv3, update license URL.
15182
15183 2009-03-01 Doug Evans <dje@google.com>
15184
15185 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15186 (server_h): Add gdb_signals.h.
15187 (signals.o): Update.
15188 * server.h (target_signal_from_host,target_signal_to_host_p)
15189 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15190
15191 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15192
15193 * remote-utils.c (getpkt): Also generate remote-debug
15194 information if noack_mode is set.
15195
15196 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15197
15198 * server.c (handle_query): Report qXfer:siginfo:read and
15199 qXfer:siginfo:write as supported and handle them.
15200 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15201 * linux-low.c (linux_xfer_siginfo): New.
15202 (linux_target_ops): Set it.
15203
15204 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15205
15206 * server.c (gdbserver_usage): Mention --remote-debug.
15207 (main): Accept '--remote-debug' switch.
15208
15209 2009-01-18 Doug Evans <dje@google.com>
15210
15211 * regcache.c (new_register_cache): No need to check result of xcalloc.
15212 * server.c (handle_search_memory): Back out calls to xmalloc,
15213 result is checked and error is returned to user upon failure.
15214 (handle_query): Ditto. Add more checks for result of malloc.
15215 (handle_v_cont): Check result of malloc, report error back to
15216 user upon failure.
15217 (handle_v_run): Ditto. Call freeargv.
15218 * server.h (freeargv): Declare.
15219 * utils.c (freeargv): New fn.
15220
15221 2009-01-15 Doug Evans <dje@google.com>
15222
15223 * gdbreplay.c (perror_with_name): Make arg const char *.
15224 * server.h (target_signal_to_name): Make return type const char *.
15225 * thread-db.c (thread_db_err_str): Make return type const char *.
15226 * utils.c (perror_with_name): Make arg const char *.
15227
15228 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15229
15230 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15231 when handling a EXIT_PROCESS_DEBUG_EVENT.
15232
15233 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15234
15235 * gdbreplay.c (gdbreplay_version): Update copyright year.
15236 * server.c (gdbserver_version): Likewise.
15237
15238 2009-01-05 Doug Evans <dje@google.com>
15239
15240 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15241 (handle_extended_wait): Improve comment.
15242
15243 2008-12-13 Doug Evans <dje@google.com>
15244
15245 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15246 * server.h (ATTR_MALLOC): New macro.
15247 (xmalloc,xcalloc,xstrdup): Declare.
15248 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15249 * inferiors.c: Ditto.
15250 * linux-low.c: Ditto.
15251 * mem-break.c: Ditto.
15252 * regcache.c: Ditto.
15253 * remote-utils.c: Ditto.
15254 * server.c: Ditto.
15255 * target.c: Ditto.
15256 * win32-low.c: Ditto.
15257
15258 2008-12-12 Doug Evans <dje@google.com>
15259
15260 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15261 in debugging printf.
15262
15263 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15264
15265 2008-12-09 Doug Evans <dje@google.com>
15266
15267 * linux-low.h (struct process_info): Delete member tid, unused.
15268 * thread-db.c (find_one_thread): Update.
15269 (maybe_attach_thread): Update.
15270
15271 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15272
15273 * target.h (struct target_ops): Add qxfer_osdata member.
15274 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15275 and dirent.h.
15276 (linux_qxfer_osdata): New functions.
15277 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15278 callback.
15279 * server.c (handle_query): Handle "qXfer:osdata:read:".
15280 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15281 (buffer_xml_printf): New functions.
15282 * server.h (struct buffer): New.
15283 (buffer_grow_str, buffer_grow_str0): New macros.
15284 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15285 (buffer_xml_printf): Declare.
15286
15287 2008-11-24 Doug Evans <dje@google.com>
15288
15289 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15290
15291 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15292
15293 * server.c (handle_v_run): Always use the supplied argument list.
15294
15295 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15296
15297 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15298 (xtensa_regmap_table): Add entry for scompare1.
15299
15300 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15301
15302 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15303 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15304 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15305 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15306 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15307 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15308 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15309 XML target descriptions.
15310 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15311 when inferior is running on an ISA 2.05 or later processor. Add
15312 special case to return offset for full 64-bit slot of FPSCR when
15313 in 32-bits.
15314
15315 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15316
15317 * Makefile.in (SFILES, clean): Added sparc64 files.
15318 (reg-sparc64.o, reg-sparc64.c): New.
15319 * configure.srv (sparc*-*-linux*): New configuration.
15320 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15321 syscall arguments for SPARC.
15322 (regsets_store_inferior_registers): Likewise.
15323 * linux-sparc-low.c: New file.
15324
15325 2008-10-21 Doug Evans <dje@google.com>
15326
15327 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15328 (READLINE_DIR,READLINE_DEP): Delete.
15329 (INTERNAL_CFLAGS): Update.
15330 (LINTFLAGS): Update.
15331
15332 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15333
15334 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15335 whole argv from the last run, not just argv[0].
15336
15337 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15338
15339 * regcache.c (new_register_cache): Return NULL if the register
15340 cache size isn't known yet.
15341 (free_register_cache): Avoid dereferencing a NULL regcache.
15342
15343 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15344
15345 * configure.srv: Merge MIPS and MIPS64.
15346
15347 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15348
15349 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15350
15351 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15352
15353 * Makefile.in: Add required vsx dependencies.
15354
15355 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15356 Declare init_registers_powerpc_vsx32l.
15357 Declare init_registers_powerpc_vsx64l.
15358 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15359 (ppc_arch_setup): Check for VSX in hwcap.
15360 (ppc_fill_vsxregset): New function.
15361 (ppc_store_vsxregset): New function.
15362 Add new VSX entry in regset_info target_regsets.
15363
15364 * configure.srv: Add new VSX dependencies.
15365
15366 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15367
15368 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15369 (remote_open): Set or clear transport_is_reliable.
15370 (putpkt_binary): Don't expect acks in noack mode.
15371 (getpkt): Don't send ack/nac in noack mode.
15372 * server.c (handle_general_set): Handle QStartNoAckMode.
15373 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15374 qSupported.
15375 (main): Reset noack_mode on every connection.
15376 * server.h (noack_mode): Declare.
15377
15378 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15379
15380 * Makefile.in (GDBREPLAY_OBS): New variable.
15381 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15382
15383 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15384 Daniel Jacobowitz <dan@codesourcery.com>
15385
15386 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15387 (usr_store_inferior_registers): Likewise.
15388 (regsets_store_inferior_registers): Likewise.
15389
15390 2008-07-31 Rolf Jansen <rj@surtec.com>
15391 Pedro Alves <pedro@codesourcery.com>
15392
15393 * configure.ac: Check for memmem declaration.
15394 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15395 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15396 (disable_packet_qfThreadInfo): Unconditionally compile.
15397 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15398 * configure, config.in: Regenerate.
15399
15400 2008-07-28 Doug Kwan <dougkwan@google.com>
15401
15402 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15403 (linux_write_memory): Remove declaration of errno.
15404
15405 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15406
15407 * linux-low.c (handle_extended_wait): Do not use "status"
15408 variable uninitialized.
15409
15410 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15411
15412 * server.c (handle_v_attach): Inhibit reporting dll changes.
15413
15414 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15415
15416 * remote-utils.c (prepare_resume_reply): If requested, don't
15417 output "thread:TID" in the T stop reply.
15418
15419 * server.c (disable_packet_vCont, disable_packet_Tthread)
15420 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15421 (handle_query): If requested, disable support for qC, qfThreadInfo
15422 and qsThreadInfo.
15423 (handle_v_requests): If requested, disable support for vCont.
15424 (gdbserver_show_disableable): New.
15425 (main): Handle --disable-packet and --disable-packet=LIST.
15426
15427 * server.h (disable_packet_vCont, disable_packet_Tthread)
15428 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15429
15430 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15431
15432 * server.c (gdbserver_usage): Mention --version.
15433
15434 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15435
15436 * Makefile.in (gdbreplay.o): New rule.
15437
15438 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15439
15440 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15441 message, not gdbserver.
15442
15443 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15444 Nathan Sidwell <nathan@codesourcery.com>
15445 Joseph Myers <joseph@codesourcery.com>
15446
15447 * acinclude.m4: Include ../../config/acx.m4.
15448 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15449 * configure, config.in: Regenerate.
15450 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15451 * server.c (gdbserver_version): Print PKGVERSION.
15452 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15453 (main): Adjust gdbserver_usage calls.
15454 * gdbreplay.c (version, host_name): Add declarations.
15455 (gdbreplay_version, gdbreplay_usage): New.
15456 (main): Accept --version and --help options.
15457
15458 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15459
15460 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15461 (arm_breakpoint_at): Handle Thumb.
15462 (the_low_target): Add comment.
15463
15464 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15465
15466 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15467
15468 2008-05-09 Doug Evans <dje@google.com>
15469
15470 * server.h (decode_search_memory_packet): Declare.
15471 * remote-utils.c (decode_search_memory_packet): New fn.
15472 * server.c (handle_search_memory_1): New fn.
15473 (handle_search_memory): New fn.
15474 (handle_query): Process qSearch:memory packets.
15475
15476 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15477
15478 * regcache.c (registers_length): Remove.
15479 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15480 full register packet.
15481 * regcache.h (registers_length): Remove prototype.
15482 * server.h (PBUFSIZ): Define to 16384.
15483
15484 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15485
15486 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15487 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15488 powerpc-64l.o, and powerpc-altivec64l.o.
15489 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15490 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15491 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15492 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15493 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15494 to srv_xmlfiles.
15495
15496 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15497 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15498 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15499 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15500 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15501 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15502 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15503 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15504 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15505 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15506 (clean): Update.
15507
15508 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15509 (init_registers_powerpc_32l): ... this new prototype.
15510 (init_registers_powerpc_32): Remove, replace by ...
15511 (init_registers_powerpc_altivec32l): ... this new prototype.
15512 (init_registers_powerpc_e500): Remove, replace by ...
15513 (init_registers_powerpc_e500l): ... this new prototype.
15514 (init_registers_ppc64): Remove, replace by ...
15515 (init_registers_powerpc_64l): ... this new prototype.
15516 (init_registers_powerpc_64): Remove, replace by ...
15517 (init_registers_powerpc_altivec64l): ... this new prototype.
15518 (ppc_num_regs): Set to 73.
15519 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15520 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15521 (ppc_cannot_store_register): Handle orig_r3 and trap.
15522 (ppc_arch_setup): Update init_registers_... calls.
15523 (ppc_fill_gregset): Handle orig_r3 and trap.
15524
15525 * inferiors.c (clear_inferiors): Reset current_inferior.
15526
15527 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15528
15529 * acinclude.m4: Add override.m4.
15530 * configure: Regenerate.
15531
15532 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15533
15534 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15535 initial call to init_register_ppc64.
15536
15537 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15538
15539 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15540 single powerpc*-*-linux* case.
15541 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15542
15543 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15544
15545 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15546 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15547 from reg_xmlfiles.
15548 * linux-ppc-low.c: Include <elf.h>.
15549 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15550 (ppc_hwcap): New global variable.
15551 (ppc_regmap): Remove __SPE__ #ifdef sections.
15552 (ppc_regmap_e500): New global variable.
15553 (ppc_cannot_store_register): Update __SPE__ special case.
15554 (ppc_get_hwcap): New function.
15555 (ppc_arch_setup): Use it to determine whether inferior supports
15556 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15557 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15558 Do not access registers if target does not support AltiVec.
15559 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15560 Do not access registers if target does not support SPE.
15561 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15562
15563 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15564
15565 * linux-low.c (disabled_regsets, num_regsets): New.
15566 (use_regsets_p): Delete.
15567 (linux_wait_for_process): Clear disabled_regsets.
15568 (regsets_fetch_inferior_registers): Check and set it.
15569 (regsets_store_inferior_registers): Likewise.
15570 (linux_fetch_registers, linux_store_registers): Do not use
15571 use_regsets_p.
15572 (initialize_low): Allocate disabled_regsets.
15573
15574 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15575
15576 * Makefile.in (LIBOBJS): New.
15577 (OBS): Use LIBOBJS.
15578 (memmem.o): New rule.
15579 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15580 * configure: Regenerated.
15581
15582 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15583
15584 * server.c (handle_query): Never return "unsupported" for
15585 qXfer:features:read queries.
15586
15587 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15588
15589 * server.c (get_features_xml): Fix inverted condition.
15590 (handle_query): Always support qXfer:feature:read.
15591
15592 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15593
15594 * server.c (wrapper_argv): New.
15595 (start_inferior): Handle wrapper_argv. If set, expect an extra
15596 trap.
15597 (gdbserver_usage): Document --wrapper.
15598 (main): Parse --wrapper.
15599
15600 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15601
15602 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15603 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15604 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15605 (ppc_set_pc): Likewise.
15606 (ppc_arch_setup): New function.
15607 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15608 of collect_register.
15609 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15610
15611 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15612
15613 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15614 instead of linux-ppc64-low.o.
15615 * linux-ppc64-low.c: Remove file.
15616 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15617 (linux-ppc64-low.o): Remove rule.
15618
15619 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15620 (init_registers_powerpc_64): Likewise.
15621 (ppc_regmap): Conditionally define depending on __powerpc64__.
15622 (ppc_cannot_store_register): Do not special-case "fpscr" when
15623 compiled on __powerpc64__.
15624 (ppc_collect_ptrace_register): New function.
15625 (ppc_supply_ptrace_register): New function.
15626 (ppc_breakpoint): Change type to "unsigned int".
15627 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15628 (the_low_target): Conditionally provide initializers for the
15629 arch_setup member depending on __powerpc64__. Install
15630 collect_ptrace_register and supply_ptrace_register members.
15631
15632 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15633
15634 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15635 * server.c (gdbserver_xmltarget): Define.
15636 (get_features_xml): Use it to replace "target.xml" and arch_string.
15637
15638 * configure.srv: Remove srv_xmltarget. Add XML files that were
15639 mentioned there to srv_xmlfiles instead. Remove conditional tests
15640 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15641 srv_xmlfiles and srv_regobj to include all possible choices.
15642 * configure.ac (srv_xmltarget): Remove.
15643 (srv_xmlfiles): Do not add "target.xml".
15644 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15645 checks for supplementary target information.
15646 * configure: Regenerate.
15647 * Makefile.in (XML_TARGET): Remove.
15648 (target.xml): Remove rule.
15649 (clean): Do not clean up target.xml.
15650 (.PRECIOUS): Do not mention target.xml.
15651
15652 * target.h (struct target_ops): Remove arch_string member.
15653 * linux-low.c (linux_arch_string): Remove.
15654 (linux_target_ops): Remove arch_string initializer.
15655 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15656 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15657 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15658 * spu-low.c (spu_arch_string): Remove.
15659 (spu_target_ops): Remove arch_string initializer.
15660 * win32-low.c (win32_arch_string): Remove.
15661 (win32_target_ops): Remove arch_string initializer.
15662 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15663 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15664 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15665
15666 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15667
15668 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15669 by collect_ptrace_register and supply_ptrace_register hooks.
15670 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15671 instead of checking for the_low_target.left_pad_xfer.
15672 (usr_store_inferior_registers): Use collect_ptrace_register callback
15673 instead of checking for the_low_target.left_pad_xfer.
15674
15675 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15676 (s390_supply_ptrace_register): Likewise.
15677 (s390_fill_gregset): Call s390_collect_ptrace_register.
15678 (the_low_target): Update.
15679
15680 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15681 (ppc_supply_ptrace_register): Likewise.
15682 (the_low_target): Update.
15683
15684 * linux-i386-low.c (the_low_target): Update.
15685 * linux-x86-64-low.c (the_low_target): Update.
15686
15687 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15688
15689 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15690 reg-s390.o and reg-s390x.o.
15691
15692 * linux-low.c (new_inferior): New global variable.
15693 (linux_create_inferior, linux_attach): Set it.
15694 (linux_wait_for_process): Call the_low_target.arch_setup after the
15695 target has stopped for the first time.
15696 (initialize_low): Do not call the_low_target.arch_setup.
15697
15698 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15699 (s390_set_pc): Likewise.
15700 (s390_arch_setup): New function.
15701 (the_low_target): Use s390_arch_setup as arch_setup routine.
15702
15703 * regcache.c (realloc_register_cache): New function.
15704 (set_register_cache): Call it for each existing regcache.
15705
15706 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15707
15708 * server.h (init_registers): Remove prototype.
15709
15710 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15711 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15712 instead of init_registers ().
15713 * linux-arm-low.c (init_registers_arm): Add prototype.
15714 (init_registers_arm_with_iwmmxt): Likewise.
15715 (the_low_target): Add initializer for arch_setup field.
15716 * linux-cris-low.c (init_registers_cris): Add prototype.
15717 (the_low_target): Add initializer for arch_setup field.
15718 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15719 (the_low_target): Add initializer for arch_setup field.
15720 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15721 (the_low_target): Add initializer for arch_setup field.
15722 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15723 (the_low_target): Add initializer for arch_setup field.
15724 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15725 (the_low_target): Add initializer for arch_setup field.
15726 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15727 (the_low_target): Add initializer for arch_setup field.
15728 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15729 (init_registers_mips64_linux): Likewise.
15730 (the_low_target): Add initializer for arch_setup field.
15731 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15732 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15733 (the_low_target): Add initializer for arch_setup field.
15734 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15735 (init_registers_powerpc_64): Likewise.
15736 (the_low_target): Add initializer for arch_setup field.
15737 * linux-s390-low.c (init_registers_s390): Add prototype.
15738 (init_registers_s390x): Likewise.
15739 (the_low_target): Add initializer for arch_setup field.
15740 * linux-sh-low.c (init_registers_sh): Add prototype.
15741 (the_low_target): Add initializer for arch_setup field.
15742 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15743 (the_low_target): Add initializer for arch_setup field.
15744 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15745 (the_low_target): Add initializer for arch_setup field.
15746
15747 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15748 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15749 instead of init_registers ().
15750 * win32-arm-low.c (init_registers_arm): Add prototype.
15751 (the_low_target): Add initializer for arch_setup field.
15752 * win32-i386-low.c (init_registers_i386): Add prototype.
15753 (the_low_target): Add initializer for arch_setup field.
15754
15755 * spu-low.c (init_registers_spu): Add prototype.
15756 (initialize_low): Call initialie_registers_spu () instead of
15757 initialize_registers ().
15758
15759 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15760
15761 * server.c (handle_v_requests): When handling the vRun and vAttach
15762 packets, if already debugging a process, don't kill it. Return an
15763 error instead.
15764
15765 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15766
15767 * server.c (handle_query): Correct length check.
15768
15769 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15770
15771 * win32-low.c (do_initial_child_stuff): Add process handle
15772 parameter. Set current_process_handle and current_process_id from the
15773 parameters. Clear globals.
15774 (win32_create_inferior): Don't set current_process_handle and
15775 current_process_id here. Instead pass them on the call to
15776 do_initial_child_stuff.
15777 (win32_attach): Likewise.
15778 (win32_clear_inferiors): New.
15779 (win32_kill): Don't close the current process handle or the
15780 current thread handle here. Instead call win32_clear_inferiors.
15781 (win32_detach): Don't open a new handle to the process. Call
15782 win32_clear_inferiors.
15783 (win32_join): Don't rely on current_process_handle; open a new
15784 handle using the process id.
15785 (win32_wait): Call win32_clear_inferiors when the inferior process
15786 has exited.
15787
15788 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15789
15790 * server.c (monitor_show_help): Add "exit".
15791
15792 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15793
15794 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15795 (clean): Add reg-xtensa.c.
15796 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15797 * configure.srv (xtensa*-*-linux*) New target.
15798 * linux-xtensa-low.c: New.
15799 * xtensa-xtregs.c: New.
15800
15801 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15802
15803 * hostio.c: Don't include errno.h.
15804 (errno_to_fileio_errno): Move to hostio-errno.
15805 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15806 error number outputting to the target->hostio_last_error callback.
15807 (hostio_packet_error): Use FILEIO_EINVAL directly.
15808 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15809 calls to hostio_error.
15810 * hostio-errno.c: New.
15811 * server.h (hostio_last_error_from_errno): Declare.
15812 * target.h (target_ops): Add hostio_last_error member.
15813 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15814 as hostio_last_error handler.
15815 * spu-low.c (spu_target_ops): Likewise.
15816 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15817 (wince_hostio_last_error): New functions.
15818 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15819 as hostio_last_error handler.
15820 (win32_target_ops) [!_WIN32_WCE]: Register
15821 hostio_last_error_from_errno as hostio_last_error handler.
15822 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15823 (hostio-errno.o): New rule.
15824 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15825 * configure.srv (srv_hostio_err_objs): New variable. Default to
15826 hostio-errno.o.
15827 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15828 * configure: Regenerate.
15829
15830 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15831
15832 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15833 (linux_kill, linux_detach): Clean up the process list.
15834 * remote-utils.c (remote_open): Improve port number parsing.
15835 (putpkt_binary, input_interrupt): Only send interrupts if the target
15836 is running.
15837 * server.c (extended_protocol): Make static.
15838 (attached): Define earlier.
15839 (exit_requested, response_needed, program_argv): New variables.
15840 (target_running): New.
15841 (start_inferior): Clear attached here.
15842 (attach_inferior): Set attached here.
15843 (require_running): Define.
15844 (handle_query): Use require_running and target_running. Implement
15845 "monitor exit".
15846 (handle_v_attach, handle_v_run): New.
15847 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15848 (gdbserver_usage): Update.
15849 (main): Redo argument parsing. Handle --debug and --multi. Handle
15850 --attach along with other options or after the port. Save
15851 program_argv. Support no initial program. Resynchronize
15852 communication with GDB after an error. Handle "monitor exit".
15853 Use require_running and target_running. Always allow the extended
15854 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15855 restart in extended mode.
15856 * README: Refer to the GDB manual. Update --attach usage.
15857
15858 2007-12-20 Andreas Schwab <schwab@suse.de>
15859
15860 * linux-low.c (STACK_SIZE): Define.
15861 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15862 (linux_test_for_tracefork): Likewise.
15863
15864 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15865
15866 * linux-low.c (linux_wait_for_event): Update messages. Do not
15867 reinsert auto-delete breakpoints.
15868 * mem-break.c (struct breakpoint): Change return type of handler to
15869 int.
15870 (set_breakpoint_at): Update handler type.
15871 (reinsert_breakpoint_handler): Return 1 instead of calling
15872 delete_breakpoint.
15873 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15874 setting a new one.
15875 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15876 * mem-break.h (set_breakpoint_at): Update handler type.
15877 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15878 * win32-low.c (auto_delete_breakpoint): New.
15879 (get_child_debug_event): Use it.
15880
15881 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15882
15883 * configure.ac: Check for pread and pwrite.
15884 * hostio.c (handle_pread): Fall back to lseek and read.
15885 (handle_pwrite): Fall back to lseek and write.
15886 * config.in, configure: Regenerated.
15887
15888 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15889
15890 * server.c (myresume): Add own_buf argument.
15891 (main): Update calls.
15892
15893 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15894
15895 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15896 * remote-utils.c (remote_open): Do not call disable_async_io.
15897 (block_async_io): Delete.
15898 (unblock_async_io): Make static.
15899 (initialize_async_io): New.
15900 * server.c (handle_v_cont): Handle async I/O here.
15901 (myresume): Likewise. Move other common resume tasks here...
15902 (main): ... from here. Call initialize_async_io. Disable async
15903 I/O before the main loop.
15904 * server.h (initialize_async_io): Declare.
15905 (block_async_io, unblock_async_io): Delete prototypes.
15906 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15907
15908 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15909
15910 * remote-utils.c (readchar): Allow binary data in received messages.
15911
15912 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15913
15914 * win32-low.c (attaching): New global.
15915 (win32_create_inferior): Clear the `attaching' global.
15916 (win32_attach): Set the `attaching' global.
15917 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15918 attaching. Only set a breakpoint at the entry point if not
15919 attaching.
15920
15921 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15922
15923 * server.c (main): Don't report dll events on the initial
15924 connection on attaches.
15925
15926 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15927
15928 * server.c (main): Relax numerical bases supported for the pid of
15929 the --attach command line argument.
15930
15931 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15932
15933 * win32-low.c (win32_attach): Call OpenProcess before
15934 DebugActiveProcess, not after. Add last error output to error
15935 call.
15936
15937 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15938
15939 * win32-low.c (win32_get_thread_context)
15940 (win32_set_thread_context): New functions.
15941 (thread_rec): Use win32_get_thread_context.
15942 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15943 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15944 field.
15945
15946 2007-12-03 Leo Zayas
15947 Pedro Alves <pedro_alves@portugalmail.pt>
15948
15949 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15950 global variables.
15951 (child_add_thread): Minor cleanup.
15952 (child_continue): Resume artificially suspended threads before
15953 calling ContinueDebugEvent.
15954 (suspend_one_thread): New.
15955 (fake_breakpoint_event): New.
15956 (get_child_debug_event): Change return type to int. Check here if
15957 gdb sent an interrupt request. If a soft interrupt was requested,
15958 fake a breakpoint event. Return 0 if there is no event to handle,
15959 and 1 otherwise.
15960 (win32_wait): Don't check here if gdb sent an interrupt request.
15961 Ensure there is a valid event to handle.
15962 (win32_request_interrupt): Add soft interruption method as last
15963 resort.
15964
15965 2007-12-03 Leo Zayas
15966 Pedro Alves <pedro_alves@portugalmail.pt>
15967
15968 * win32-low.h (win32_thread_info): Add descriptions to the
15969 structure members. Replace `suspend_count' counter by a
15970 `suspended' flag.
15971 * win32-low.c (thread_rec): Update condition of when to get the
15972 context from the inferior. Rely on ContextFlags being set if it
15973 has already been retrieved. Only suspend the inferior thread if
15974 we haven't already. Warn if that fails.
15975 (continue_one_thread): s/suspend_count/suspended/. Only call
15976 ResumeThread once. Warn if that fails.
15977
15978 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15979
15980 * win32-low.c (win32_wait): Don't read from the inferior when it
15981 has already exited.
15982
15983 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15984
15985 * Makefile.in (win32_low_h): New variable.
15986 (win32-low.o): Add dependency on $(win32_low_h).
15987 (win32-arm-low.o, win32-i386-low.o): New rules.
15988
15989 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15990
15991 * hostio.c: Correct copyright year.
15992
15993 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15994
15995 * Makefile.in (OBS): Add hostio.o.
15996 (hostio.o): New rule.
15997 * server.h (handle_vFile): Declare.
15998 * hostio.c: New file.
15999 * server.c (handle_v_requests): Take packet_len and new_packet_len
16000 for binary packets. Call handle_vFile.
16001 (main): Update call to handle_v_requests.
16002
16003 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16004
16005 * linux-low.c: Include <sched.h>.
16006
16007 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16008
16009 * linux-low.c (linux_tracefork_grandchild): New.
16010 (linux_tracefork_child): Use clone.
16011 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16012
16013 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16014
16015 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16016
16017 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16018
16019 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16020
16021 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16022
16023 * inferiors.c (change_inferior_id): Delete.
16024 (add_pid_to_list, pull_pid_from_list): New.
16025 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16026 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16027 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16028 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16029 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16030 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16031 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16032 (using_threads): Always set to 1.
16033 (handle_extended_wait): New.
16034 (add_process): Do not set TID.
16035 (linux_create_inferior): Set must_set_ptrace_flags.
16036 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16037 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16038 (linux_thread_alive): Rename TID argument to LWPID.
16039 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16040 (linux_wait_for_event): Do not use TID or check using_threads. Update
16041 call to dead_thread_notify. Call handle_extended_wait.
16042 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16043 (send_sigstop): Delete sigstop_sent.
16044 (wait_for_sigstop): Avoid TID.
16045 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16046 (linux_test_for_tracefork): New.
16047 (linux_lookup_signals): Use thread_db_active and
16048 linux_supports_tracefork_flag.
16049 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16050 * linux-low.h (get_process_thread): Avoid TID.
16051 (struct process_ifo): Move thread_known and tid to the end. Remove
16052 sigstop_sent.
16053 (linux_attach_lwp, thread_db_init): Update prototypes.
16054 * server.h (change_inferior_id): Delete prototype.
16055 (add_pid_to_list, pull_pid_from_list): New prototypes.
16056 * thread-db.c (thread_db_use_events): New.
16057 (find_first_thread): Rename to...
16058 (find_one_thread): ...this. Update callers and messages. Do not
16059 call fatal. Check thread_db_use_events. Do not call
16060 change_inferior_id or new_thread_notify.
16061 (maybe_attach_thread): Update. Do not call new_thread_notify.
16062 (thread_db_init): Set thread_db_use_events. Check use_events.
16063 * utils.c (fatal, warning): Correct message prefix.
16064
16065 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16066
16067 * Makefile.in (clean): Remove new files.
16068 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16069 (powerpc-64.o, powerpc-64.c): New rules.
16070 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16071 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16072 with SPE.
16073 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16074 SPE targets.
16075 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16076 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16077 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16078 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16079 (target_regsets): Add AltiVec and SPE register sets.
16080 * configure.ac: Check for AltiVec and SPE.
16081 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16082 (ppc_fill_vrregset, ppc_store_vrregset): New.
16083 (target_regsets): Add AltiVec register set.
16084 * configure: Regenerated.
16085
16086 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16087
16088 * linux-low.c (O_LARGEFILE): Define.
16089 (linux_read_memory): Use /proc/PID/mem.
16090 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16091 * configure, config.in: Regenerated.
16092
16093 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16094
16095 * linux-low.c (linux_wait_for_event): Do not pass signals while
16096 single-stepping.
16097
16098 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16099
16100 * win32-low.c (create_process): New.
16101 (win32_create_inferior): Use create_process instead of
16102 CreateProcess. If create_process failed retry appending an ".exe"
16103 suffix. Store the GetLastError result immediatelly after
16104 create_process calls and use it on the call to error.
16105
16106 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16107
16108 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16109
16110 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16111
16112 * configure.ac: Switch license to GPLv3.
16113
16114 2007-08-01 Michael Snyder <msnyder@access-company.com>
16115
16116 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16117
16118 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16119
16120 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16121 typedef.
16122 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16123 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16124 CloseToolhelp32Snapshot.
16125 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16126 CloseToolhelp32Snapshot.
16127
16128 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16129
16130 * server.c (main): Check for inferior exit before main loop.
16131
16132 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16133
16134 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16135 instead of on tmp_desc.
16136
16137 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16138 Daniel Jacobowitz <dan@codesourcery.com>
16139
16140 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16141 (add_thread): Minor cleanups.
16142 (clear_inferiors): Move lower in the file. Clear the DLL
16143 list.
16144 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16145 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16146 (xml_escape_text): New.
16147 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16148 for qSupported.
16149 (handle_v_cont): Report errors.
16150 (gdbserver_version): Update.
16151 (main): Correct size of own_buf. Do not report initial DLL events.
16152 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16153 (unloaded_dll, xml_escape_text): New.
16154 * win32-low.c (enum target_waitkind): Update comments.
16155 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16156 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16157 (win32_EnumProcessModules, win32_GetModuleInformation)
16158 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16159 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16160 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16161 (win32_Module32First, win32_Module32Next, load_toolhelp)
16162 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16163 (get_child_debug_event): Handle DLL events.
16164 (win32_wait): Likewise.
16165
16166 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16167
16168 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16169 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16170
16171 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16172
16173 * win32-low.c (handle_output_debug_string): Ignore event if not
16174 waiting.
16175
16176 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16177
16178 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16179
16180 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16181
16182 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16183
16184 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16185
16186 * inferiors.c (change_inferior_id): Add comment.
16187 * linux-low.c (check_removed_breakpoint): Add an early
16188 prototype. Improve debug output.
16189 (linux_attach): Doc update.
16190 (linux_detach_one_process, linux_detach): Clean up before releasing
16191 each process.
16192 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16193 * linux-low.h (struct process_info): Doc improvement.
16194 * mem-break.c (delete_all_breakpoints): New.
16195 * mem-break.h (delete_all_breakpoints): New prototype.
16196 * thread-db.c (find_first_thread): New.
16197 (thread_db_create_event): Call it instead of
16198 thread_db_find_new_threads. Clean up unused variables.
16199 (maybe_attach_thread): Remove first thread handling.
16200 (thread_db_find_new_threads): Use find_first_thread.
16201 (thread_db_get_tls_address): Likewise.
16202
16203 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16204
16205 * thread-db.c (thread_db_find_new_threads): Add prototype.
16206 (thread_db_create_event): Check for the main thread before adding
16207 a new thread.
16208 (maybe_attach_thread): Only enable event reporting if TID == 0.
16209 (thread_db_get_tls_address): Check for new threads.
16210
16211 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16212
16213 * linux-low.c (linux_create_inferior): Try execv before execvp.
16214 * spu-low.c (spu_create_inferior): Likewise.
16215
16216 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16217
16218 * linux-low.c (linux_create_inferior): Change execv to execvp.
16219 * spu-low.c (spu_create_inferior): Likewies.
16220
16221 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16222
16223 * Makefile.in (clean): Clean new files instead of deleted ones.
16224 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16225 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16226 rules.
16227 * configure.srv: Specify XML files and new regformats for MIPS and
16228 MIPS64 GNU/Linux.
16229 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16230 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16231 an entry for the restart register.
16232 (mips_cannot_fetch_register, mips_cannot_store_register)
16233 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16234 register names to match the XML descriptions.
16235 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16236 restart register instead of $0.
16237
16238 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16239 Markus Deuling <deuling@de.ibm.com>
16240
16241 * remote-utils.c (decode_xfer_write): New function.
16242 * server.h (decode_xfer_write): Add prototype.
16243 * server.c (handle_query): Add PACKET_LEN argument. Support
16244 qXfer:spu:read and qXfer:spu:write packets.
16245 (main): Pass packet_len to handle_query.
16246 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16247 * target.h (target_ops): Add qxfer_spu.
16248
16249 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16250
16251 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16252 accessing non-seekable spufs files.
16253
16254 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16255
16256 * server.c (handle_query): Add reply for qC packet.
16257
16258 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16259 Leo Zayas <lerele@champenstudios@com>
16260
16261 * server.h (check_remote_input_interrupt_request): New function.
16262 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16263 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16264 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16265 (check_remote_input_interrupt_request): New function.
16266 * server.h (check_remote_input_interrupt_request): Declare.
16267 * win32-low.c (winapi_DebugBreakProcess,
16268 winapi_GenerateConsoleCtrlEvent): New typedefs.
16269 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16270 to 250 ms.
16271 (win32_wait): Check for remote interrupt request
16272 with check_remote_input_interrupt_request.
16273 (win32_request_interrupt): New function.
16274 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16275
16276 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16277
16278 * win32-low.c (debug_registers_changed,
16279 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16280 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16281 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16282 (thread_rec): Get context using the low target.
16283 (child_add_thread): Call thread_added on the low target,
16284 which does the same thing.
16285 (regptr): Delete.
16286 (do_initial_child_stuff): Remove debug registers references.
16287 Set context using the low target. Resume threads after
16288 setting the contexts.
16289 (child_continue): Remove dead variable. Remove debug
16290 registers references.
16291 (child_fetch_inferior_registers): Go through the low target.
16292 (do_child_store_inferior_registers): Remove.
16293 (child_store_inferior_registers): Go through the low target.
16294 (win32_resume): Remove debug registers references.
16295 Set context using the low target.
16296 (handle_exception): Change return type to void. Don't record
16297 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16298 first chance exception.
16299 (get_child_debug_event): Change return type to void. Remove
16300 goto loop. Always return after waiting for debug event.
16301 (win32_wait): Convert to switch statement. Handle spurious
16302 events.
16303
16304 * win32-i386-low.c (debug_registers_changed,
16305 debug_registers_used): New.
16306 (initial_stuff): Rename to ...
16307 (i386_initial_stuff): ... this. Clear debug registers
16308 state variables.
16309 (store_debug_registers): Delete.
16310 (i386_get_thread_context): New.
16311 (load_debug_registers): Delete.
16312 (i386_set_thread_context): New.
16313 (i386_thread_added): New.
16314 (single_step): Rename to ...
16315 (i386_single_step): ... this.
16316 (do_fetch_inferior_registers): Rename to ...
16317 (i386_fetch_inferior_register): ... this.
16318 (i386_store_inferior_register): New.
16319 (the_low_target): Adapt to new interface.
16320
16321 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16322 (arm_get_thread_context): New.
16323 (arm_set_thread_context): New.
16324 (regptr): New.
16325 (do_fetch_inferior_registers): Rename to ...
16326 (arm_fetch_inferior_register): ... this.
16327 (arm_store_inferior_register): New.
16328 (arm_wince_breakpoint): Reimplement as unsigned long.
16329 (arm_wince_breakpoint_len): Define.
16330 (the_low_target): Adapt to new interface.
16331
16332 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16333 load_debug_registers. Add get_thread_context, set_thread_context,
16334 thread_added and store_inferior_register. Rename
16335 fetch_inferior_registers to fetch_inferior_register.
16336 (regptr): Remove declaration.
16337
16338 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16339
16340 * linux-low.c (linux_detach): Change return type to int. Return 0.
16341 * spu-low.c (spu_detach): Likewise.
16342
16343 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16344
16345 * target.h (target_ops): Change return type of detach to int.
16346 Add join.
16347 (join_inferior): New.
16348 * server.c (main): Don't skip detach support on mingw32.
16349 If the inferior doesn't support detaching return error.
16350 Call join_inferior instead of using waitpid.
16351 * linux-low.c (linux_join): New.
16352 (linux_target_op): Add linux_join.
16353 * spu-low.c (spu_join): New.
16354 (spu_target_ops): Add spu_join.
16355 * win32-low.c (win32_detach): Adapt to new interface.
16356 Reopen current_process_handle before detaching. Issue a child
16357 resume before detaching.
16358 (win32_join): New.
16359 (win32_target_op): Add win32_join.
16360
16361 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16362
16363 * win32-low.c (win32-attach): Fix return value.
16364 * target.h (target_ops): Describe ATTACH return values.
16365
16366 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16367
16368 * win32-low.c (GETPROCADDRESS): Define.
16369 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16370 (winapi_DebugSetProcessKillOnExit): Likewise.
16371 (win32_create_inferior): Force usage of ansi CreateProcessA.
16372 (win32_attach): Use GETPROCADDRESS.
16373 (win32_detach): Likewise.
16374
16375 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16376
16377 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16378
16379 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16380
16381 * win32-low.c: Commit leftover changes from 2007-03-29.
16382
16383 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16384
16385 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16386 fields short instead of int. Add explicit padding.
16387 (i387_cache_to_fsave): Remove unnecessary casts.
16388 (i387_fsave_to_cache): Doc fix.
16389 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16390
16391 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16392
16393 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16394 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16395
16396 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16397
16398 * configure.srv (arm*-*-mingw32ce*): Move near the other
16399 arm targets.
16400
16401 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16402
16403 * configure.ac: Add errno checking.
16404 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16405 sys/file.h and malloc.h.
16406 (AC_CHECK_DECLS): Add perror.
16407 (srv_mingwce): Handle.
16408 * configure.srv (i[34567]86-*-cygwin*): Add
16409 win32-i386-low.o to srv_tgtobj.
16410 (i[34567]86-*-mingw*): Likewise.
16411 (arm*-*-mingw32ce*): Add case.
16412 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16413 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16414 [__MINGW32CE__] (strerror): New function.
16415 [__MINGW32CE__] (errno): Define to GetLastError.
16416 [__MINGW32CE__] (COUNTOF): New macro.
16417 (remote_open): Remove extra close call.
16418 * mem-break.c (delete_breakpoint_at): New function.
16419 * mem-break.h (delete_breakpoint_at): Declare.
16420 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16421 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16422 [USE_WIN32API] (read, write): Add char* casts.
16423 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16424 * server.h: Include wincecompat.h on Windows CE.
16425 [HAVE_ERRNO_H]: Check.
16426 (perror): Declare if not declared.
16427 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16428 (perror_with_name): Remove errno declaration.
16429 * wincecompat.h: New.
16430 * wincecompat.c: New.
16431 * win32-low.h: New.
16432 * win32-arm-low.c: New.
16433 * win32-i386-low.c: New.
16434 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16435 (OUTMSG2): Make it safe.
16436 (_T): New macro.
16437 (COUNTOF): New macro.
16438 (NUM_REGS): Get it from the low target.
16439 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16440 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16441 (thread_rec): Let low target handle debug registers.
16442 (child_add_thread): Likewise.
16443 (child_init_thread_list): Likewise.
16444 (continue_one_thread): Likewise.
16445 (regptr): New.
16446 (do_child_fetch_inferior_registers): Move to ...
16447 * win32-i386-low.c: ... here, and rename to ...
16448 (do_fetch_inferior_registers): ... this.
16449 * win32-low.c (child_fetch_inferior_registers):
16450 Go through the low target.
16451 (do_child_store_inferior_registers): Use regptr.
16452 (strwinerror): New function.
16453 (win32_create_inferior): Handle Windows CE.
16454 Use strwinerror instead of strerror on Windows error
16455 codes. Add program to the error output.
16456 Don't close the main thread handle on Windows CE.
16457 (win32_attach): Use coredll.dll on Windows CE.
16458 (win32_kill): Close current process and current
16459 thread handles.
16460 (win32_detach): Use coredll.dll on Windows CE.
16461 (win32_resume): Let low target handle debug registers, and
16462 step request.
16463 (handle_exception): Add/Remove initial breakpoint. Avoid
16464 non-existant WSTOPSIG on Windows CE.
16465 (win32_read_inferior_memory): Cast to remove warning.
16466 (win32_arch_string): Go through the low target.
16467 (initialize_low): Call set_breakpoint_data with the low
16468 target's breakpoint.
16469 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16470 FOP_REGNUM, mappings): Move to ...
16471 * win32-i386-low.c: ... here.
16472 * win32-low.c (win32_thread_info): Move to ...
16473 * win32-low.h: ... here.
16474 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16475 win32-arm-low.c and wincecompat.c.
16476 (all:): Add $EXEEXT.
16477 (install-only:): Likewise.
16478 (gdbserver:): Likewise.
16479 (gdbreplay:): Likewise.
16480 * config.in: Regenerate.
16481 * configure: Regenerate.
16482
16483 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16484
16485 * win32-low.c: Rename typedef thread_info to
16486 win32_thread_info throughout.
16487
16488 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16489
16490 * win32-i386-low.c: Rename to ...
16491 * win32-low.c: ... this.
16492 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16493 * Makefile.in: Likewise.
16494
16495 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16496
16497 * remote-utils.c (monitor_output): Constify msg parameter.
16498 * server.h (monitor_output): Likewise.
16499 * win32-i386-low.c (handle_output_debug_string): New.
16500 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16501 handle_output_debug_string.
16502 (get_child_debug_event): Likewise.
16503
16504 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16505
16506 * server.c (main): Correct strtoul check.
16507
16508 2007-03-27 Jon Ringle <jon@ringle.org>
16509
16510 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16511
16512 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16513
16514 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16515
16516 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16517
16518 * terminal.h: Check HAVE_SGTTY_H.
16519
16520 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16521
16522 * remote-utils.c (remote_open): Print out the assigned port number.
16523
16524 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16525
16526 * remote-utils.c (monitor_output): New function.
16527 * server.c (debug_threads): Define here.
16528 (monitor_show_help): New function.
16529 (handle_query): Handle qRcmd.
16530 (main): Do not handle 'd' packet.
16531 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16532 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16533 of debug_threads.
16534
16535 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16536
16537 * Makefile.in (EXEEXT): New.
16538 (clean): Use $(EXEEXT).
16539
16540 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16541
16542 * target.h (target_ops): Rename send_signal to request_interrupt,
16543 and remove enum target_signal parameter.
16544 * linux-low.c (linux_request_interrupt): Rename from
16545 linux_send_signal, and always send SIGINT.
16546 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16547 and always send SIGINT.
16548 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16549 of send_signal.
16550 (input_interrupt): Likewise.
16551
16552 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16553
16554 * server.c (get_features_xml): Check if target implemented
16555 arch_string.
16556 * win32-i386-low.c (win32_arch_string): New.
16557 (win32_target_ops): Add win32_arch_string as arch_string member.
16558
16559 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16560
16561 * spu-low.c (spu_arch_string): New.
16562 (spu_target_ops): Add spu_arch_string.
16563
16564 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16565
16566 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16567 * configure.ac: Do not check for terminal.h.
16568 * configure, config.in: Regenerated.
16569
16570 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16571
16572 * Makefile.in (OBS): Add $(XML_BUILTIN).
16573 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16574 (clean): Update.
16575 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16576 (arm-with-iwmmxt.c): New.
16577 * config.in, configure: Regenerate.
16578 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16579 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16580 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16581 (arm*-*-linux*): Add iWMMXt and regset support.
16582 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16583 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16584 (arm_store_wmmxregset, target_regsets): New.
16585 * server.c (get_features_xml): Take annex argument. Check builtin
16586 XML documents.
16587 (handle_query): Handle multiple annexes.
16588
16589 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16590
16591 * remote-utils.c [USE_WIN32API] (read, write): Define.
16592 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16593 write.
16594
16595 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16596
16597 * linux-i386-low.c (the_low_target): Set arch_string.
16598 * linux-x86-64-low.c (the_low_target): Likewise.
16599 * linux-low.c (linux_arch_string): New.
16600 (linux_target_ops): Add it.
16601 * linux-low.h (struct linux_target_ops): Add arch_string.
16602 * server.c (write_qxfer_response): Use const void * for DATA.
16603 (get_features_xml): New.
16604 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16605 * target.h (struct target_ops): Add arch_string method.
16606
16607 2007-01-03 Denis Pilat <denis.pilat@st.com>
16608 Daniel Jacobowitz <dan@codesourcery.com>
16609
16610 * linux-low.c (linux_kill): Handle being called with no threads.
16611 * win32-i386-low.c (win32_kill): Likewise.
16612 (get_child_debug_event): Clear current_process_handle.
16613
16614 2006-12-30 Denis PILAT <denis.pilat@st.com>
16615 Daniel Jacobowitz <dan@codesourcery.com>
16616
16617 * remote-utils.c (remote_open): Check the type of specified
16618 serial port devices before opening them.
16619 * server.c (main): Kill the inferior if an error occurs during
16620 the first remote_open.
16621
16622 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16623
16624 * README: Update supported targets.
16625
16626 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16627
16628 * Makefile.in (clean): Remove reg-mips64.c.
16629 (reg-mips64.c, reg-mips64.o): New rules.
16630 * configure.srv: Handle mips64. Include regset support for mips.
16631 * linux-mips-low.c (union mips_register): New.
16632 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16633 (mips_breakpoint, mips_breakpoint_at): Use int.
16634 (mips_collect_register, mips_supply_register)
16635 (mips_collect_register_32bit, mips_supply_register_32bit)
16636 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16637 (mips_store_fpregset, target_regsets): New.
16638 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16639
16640 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16641
16642 * configure.srv: Add target "spu*-*-*".
16643 * Makefile.in (clean): Remove reg-spu.c.
16644 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16645 * spu-low.c: New file.
16646
16647 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16648
16649 * configure.ac: Correct td_thr_tls_get_addr test.
16650 * configure: Regenerated.
16651
16652 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16653
16654 * linux-low.c (linux_wait_for_event): Reformat. Use the
16655 pass_signals array.
16656 * remote-utils.c (decode_address_to_semicolon): New.
16657 * server.c (pass_signals, handle_general_set): New.
16658 (handle_query): Mention QPassSignals for qSupported.
16659 (main): Call handle_general_set.
16660 * server.h (pass_signals, decode_address_to_semicolon): New.
16661
16662 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16663
16664 * server.c (handle_query): Correct error handling for read_auxv.
16665
16666 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16667
16668 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16669 and srv_linux_thread_db to yes.
16670 * linux-s390-low.c (s390_fill_gregset): New function.
16671 (target_regsets): Define data structure.
16672
16673 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16674
16675 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16676 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16677 * config.in, configure: Regenerated.
16678 * inferiors.c (gdb_id_to_thread): New function.
16679 (gdb_id_to_thread_id): Use it.
16680 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16681 * linux-low.h (struct process_info): Add th member.
16682 (thread_db_get_tls_address): New prototype.
16683 * remote-utils.c (decode_address): Make non-static.
16684 * server.c (handle_query): Handle qGetTLSAddr.
16685 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16686 * target.h (struct target_ops): Add get_tls_address.
16687 * thread-db.c (maybe_attach_thread): Save the thread handle.
16688 (thread_db_get_tls_address): New.
16689
16690 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16691
16692 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16693 (linux_resume_one_process): Take a siginfo_t *. Update all
16694 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16695 (struct pending_signals): Add a siginfo_t.
16696 (linux_wait_for_process): Always set last_status.
16697 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16698 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16699 * linux-low.h (struct process_info): Add last_status.
16700
16701 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16702
16703 * remote-utils.c (try_rle): New function.
16704 (putpkt_binary): Use it.
16705
16706 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16707
16708 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16709 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16710 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16711 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16712 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16713 point registers.
16714
16715 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16716
16717 * server.c (terminal_fd): New variable.
16718 (old_foreground_pgrp): Likewise.
16719 (restore_old_foreground_pgrp): New function.
16720 (start_inferior): Record the terminal file descriptor in terminal_fd
16721 and its original foreground group in old_foreground_pgrp. Register
16722 restore_old_foreground_pgrp with atexit().
16723
16724 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16725
16726 * server.c (handle_query): Correct qPart to qXfer.
16727
16728 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16729
16730 * configure.ac: Check for more headers which are missing on
16731 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16732 * configure.srv: Add Cygwin and mingw32.
16733 * remote-utils.c: Don't include headers unconditionally which
16734 are missing on mingw32. Include <winsock.h> for mingw32.
16735 (remote_open): Adjust for mingw32 support. Flush
16736 standard error after writing to it.
16737 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16738 (unblock_async_io, enable_async_io, disable_async_io)
16739 (readchar, getpkt): Update for Winsock support.
16740 (prepare_resume_reply): Expect a protocol signal number.
16741 * server.c: Disable <sys/wait.h> on mingw32.
16742 (start_inferior): Adjust for mingw32 support. Flush
16743 standard error after writing to it.
16744 (attach_inferior): Likewise. Use protocol signal
16745 numbers.
16746 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16747 and names.
16748 * win32-i386-low.c: New file.
16749 * Makefile.in (XM_CLIBS): Set.
16750 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16751 (win32-i386-low.o): New dependency rule.
16752 * linux-low.c (linux_wait): Use target signal numbers.
16753 * target.h (struct target_ops): Doc fix.
16754 * server.h (target_signal_to_name): New prototype.
16755 * gdbreplay.c: Don't include headers unconditionally which
16756 are missing on mingw32. Include <winsock.h> for mingw32.
16757 (remote_close, remote_open): Adjust for Winsock support.
16758 * configure, config.in: Regenerated.
16759
16760 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16761
16762 * server.c (decode_xfer_read, write_qxfer_response): New.
16763 (handle_query): Take a packet length argument. Handle
16764 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16765 the qSupported response.
16766 (main): Update call to handle_query.
16767
16768 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16769
16770 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16771 (putpkt_binary): Renamed from putpkt and adjusted for binary
16772 data.
16773 (putpkt): New wrapper for putpkt_binary.
16774 (readchar): Don't mask off the high bit.
16775 (decode_X_packet): New function.
16776 * server.c (main): Call putpkt_binary if a handler sets the packet
16777 length. Save the length of the incoming packet. Handle 'X'.
16778 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16779
16780 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16781
16782 * server.c (handle_query): Handle qSupported.
16783
16784 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16785
16786 * remote-utils.c (all_symbols_looked_up): New variable.
16787 (look_up_one_symbol): Check it.
16788 * server.h (look_up_one_symbol): New declaration.
16789 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16790
16791 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16792
16793 * Makefile.in (linux-arm-low.o): Update dependencies.
16794 * linux-arm-low.c: Include "gdb_proc_service.h".
16795 (PTRACE_GET_THREAD_AREA): Define.
16796 (ps_get_thread_area): New function.
16797
16798 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16799
16800 * configure.srv (m68k*-*-uclinux*): New target.
16801 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16802 (linux_resume_one_process): Remove extraneous cast.
16803 (linux_read_offsets): New.
16804 (linux_target_op): Add linux_read_offsets on mmuless systems.
16805 * server.c (handle_query): Add qOffsets logic.
16806 * target.h (struct target_ops): Add read_offsets.
16807
16808 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16809
16810 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16811 (PTRACE_GET_THREAD_AREA): Define.
16812 (ps_get_thread_area): New function.
16813 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16814 (linux-x86-64-low.o): Update.
16815
16816 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16817
16818 * configure.ac: Remove checks for prfpregset_t.
16819 * gdb_proc_service.h: New file.
16820 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16821 new "gdb_proc_service.h".
16822 * proc-service.c: Likewise.
16823 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16824 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16825 * Makefile.in (gdb_proc_service_h): Updated.
16826 * configure, config.in: Regenerated.
16827
16828 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16829
16830 * remote-utils.c (prepare_resume_reply): Move declaration
16831 of gdb_id_from_wait to the top of the block.
16832
16833 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16834
16835 * linux-low.c (regsets_store_inferior_registers): Read the regset
16836 from the target before filling it.
16837
16838 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16839
16840 * server.c (attach_inferior): Return SIGTRAP for a successful
16841 attach.
16842
16843 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16844
16845 * Makefile.in (OBS): Add version.o.
16846 (STAGESTUFF): Delete.
16847 (version.o): Add dependencies.
16848 (version.c): Replace rule.
16849 (clean): Remove version.c.
16850 * server.c (gdbserver_version): New.
16851 (gdbserver_usage): Use printf.
16852 (main): Handle --version and --help.
16853 * server.h (version, host_name): Add declarations.
16854
16855 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16856
16857 * linux-arm-low.c:
16858 * linux-arm-low.c:
16859 * inferiors.c:
16860 * i387-fp.h:
16861 * i387-fp.c:
16862 * gdbreplay.c:
16863 * regcache.c:
16864 * proc-service.c:
16865 * mem-break.h:
16866 * mem-break.c:
16867 * linux-x86-64-low.c:
16868 * linux-sh-low.c:
16869 * linux-s390-low.c:
16870 * linux-ppc64-low.c:
16871 * linux-ppc-low.c:
16872 * linux-mips-low.c:
16873 * linux-m68k-low.c:
16874 * linux-m32r-low.c:
16875 * linux-low.h:
16876 * linux-low.c:
16877 * linux-ia64-low.c:
16878 * linux-i386-low.c:
16879 * linux-crisv32-low.c:
16880 * thread-db.c:
16881 * terminal.h:
16882 * target.h:
16883 * target.c:
16884 * server.h:
16885 * server.c:
16886 * remote-utils.c:
16887 * regcache.h:
16888 * utils.c:
16889 * Makefile.in:
16890 * configure.ac:
16891 * gdbserver.1: Add (C) after Copyright. Update the FSF
16892 address.
16893
16894 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16895
16896 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16897 (arm_breakpoint_at): Recognize both breakpoints.
16898 (the_low_target): Use the correct breakpoint instruction.
16899
16900 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16901
16902 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16903 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16904 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16905 (the_low_target): Update.
16906
16907 2005-10-25 Andreas Schwab <schwab@suse.de>
16908
16909 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16910
16911 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16912 (ia64_num_regs): Reduce to 462.
16913
16914 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16915
16916 * acinclude.m4: Correct quoting.
16917 * aclocal.m4: Regenerated.
16918
16919 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16920 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16921 (thread_db_init): Call thread_db_err_str.
16922 * configure.ac: Check for TD_VERSION.
16923 * config.in, configure: Regenerated.
16924
16925 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16926
16927 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16928
16929 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16930
16931 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16932 is not available. Define HAVE_PTRACE_GETREGS if it is.
16933 * config.in, configure: Regenerated.
16934 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16935 * linux-i386-low.c, linux-m68k-low.c: Update to use
16936 HAVE_PTRACE_GETREGS.
16937 * linux-low.c (regsets_fetch_inferior_registers)
16938 (regsets_store_inferior_registers): Only return 0 if we processed
16939 GENERAL_REGS.
16940 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16941 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16942
16943 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16944
16945 * inferiors.c (struct thread_info): Add gdb_id.
16946 (add_thread): Add gdb_id argument.
16947 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16948 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16949 calls to add_thread.
16950 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16951 * server.c (handle_query): Use thread_to_gdb_id.
16952 (handle_v_cont, main): Use gdb_id_to_thread_id.
16953 * server.h (add_thread): Update prototype.
16954 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16955 prototypes.
16956
16957 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16958
16959 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16960 left-padded registers.
16961 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16962 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16963
16964 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16965
16966 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16967 * configure: Regenerate.
16968 * config.in: Regenerate.
16969 * server.h (NEED_DECLARATION_STRERROR):
16970 Replace with !HAVE_DECL_STRERROR.
16971
16972 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16973
16974 * linux-low.c (linux_wait, linux_send_signal): Don't test
16975 an unsigned long variable for > 0 if it could be MAX_ULONG.
16976 * server.c (myresume): Likewise.
16977 * target.c (set_desired_inferior): Likewise.
16978
16979 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16980
16981 * configure.ac: Simplify and improve check for socklen_t.
16982 * configure, config.in: Regenerate.
16983
16984 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16985
16986 * acconfig.h: Remove.
16987 * configure.ac: Add a test for socklen_t. Use three-argument
16988 AC_DEFINE throughout.
16989 * config.in: Regenerated using autoheader 2.59.
16990 * configure: Regenerated.
16991
16992 * gdbreplay.c (socklen_t): Provide a default.
16993 (remote_open): Use socklen_t.
16994 * remote-utils.c (socklen_t): Provide a default.
16995 (remote_open): Use socklen_t.
16996 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16997 unsigned char.
16998
16999 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17000 char for buffers.
17001 * linux-low.c (linux_read_memory, linux_write_memory)
17002 (linux_read_auxv): Likewise.
17003 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17004 (check_mem_write): Likewise.
17005 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17006 Likewise.
17007 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17008 (registers_from_string, register_data): Likewise.
17009 * server.c (handle_query, main): Likewise.
17010 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17011 (decode_M_packet): Likewise.
17012 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17013 * target.h (struct target_ops): Update read_memory, write_memory,
17014 and read_auxv.
17015 (read_inferior_memory, write_inferior_memory): Update.
17016 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17017 to unsigned char *.
17018 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17019 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17020 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17021 linux-s390-low.c, linux-sh-low.c: Update for changes in
17022 read_inferior_memory and the_low_target->breakpoint.
17023
17024 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17025
17026 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17027 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17028 * configure.srv: Add powerpc64-*-linux*.
17029 * linux-ppc64-low.c: New file.
17030
17031 2005-05-23 Orjan Friberg <orjanf@axis.com>
17032
17033 * linux-cris-low.c: New file with support for CRIS.
17034 * linux-crisv32-low.c: Ditto for CRISv32.
17035 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17036 (clean): Add reg-cris.c and reg-crisv32.c.
17037 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17038 reg-crisv32.o, and reg-crisv32.c to make rules.
17039 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17040 recognized targets.
17041
17042 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17043
17044 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17045 of sizeof (PTRACE_XFER_TYPE).
17046 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17047
17048 2005-05-12 Orjan Friberg <orjanf@axis.com>
17049
17050 * target.h (struct target_ops): Add insert_watchpoint,
17051 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17052 pointers for hardware watchpoint support.
17053 * linux-low.h (struct linux_target_ops): Ditto.
17054 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17055 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17056 to linux_target_ops.
17057 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17058 reply packet.
17059 * server.c (main): Recognize 'Z' and 'z' packets.
17060
17061 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17062
17063 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17064 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17065 (the_low_target): Add new members.
17066
17067 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17068
17069 * proc-service.c (ps_lgetregs): Search all_processes instead of
17070 all_threads.
17071
17072 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17073
17074 * server.c (start_inferior): Change return type to int.
17075 (attach_inferior): Change sigptr to int *.
17076 (handle_v_cont, handle_v_requests): Change signal to int *.
17077 (main): Change signal to int.
17078
17079 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17080
17081 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17082 * configure.srv: Add m32r*-*-linux*.
17083 * linux-m32r-low.c: New file.
17084
17085 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17086
17087 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17088
17089 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17090
17091 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17092 Take unsigned long arguments for PIDs.
17093 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17094 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17095 (wait_for_sigstop, linux_resume_one_process)
17096 (regsets_fetch_inferior_registers, linux_send_signal)
17097 (linux_read_auxv): Likewise. Update the types of variables holding
17098 PIDs. Update format string specifiers.
17099 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17100 * remote-utils.c (prepare_resume_reply): Likewise.
17101 * server.c (cont_thread, general_thread, step_thread)
17102 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17103 unsigned long.
17104 (handle_query): Update format specifiers.
17105 (handle_v_cont, main): Use strtoul for thread IDs.
17106 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17107 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17108 (general_thread, step_thread, thread_from_wait)
17109 (old_thread_from_wait): Update.
17110 * target.h (struct thread_resume): Use unsigned long for THREAD.
17111 (struct target_ops): Use unsigned long for arguments to attach and
17112 thread_alive.
17113
17114 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17115
17116 * acinclude.m4: Include bfd/bfd.m4 directly.
17117 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17118 <agriffis@toolchain.org>.
17119 * aclocal.m4, configure: Regenerated.
17120
17121 2005-01-07 Andrew Cagney <cagney@gnu.org>
17122
17123 * configure.ac: Rename configure.in, require autoconf 2.59.
17124 * configure: Re-generate.
17125
17126 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17127
17128 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17129 LIBS when finished.
17130 * aclocal.m4: Regenerated.
17131 * configure: Regenerated.
17132
17133 2004-11-21 Andreas Schwab <schwab@suse.de>
17134
17135 * linux-m68k-low.c (m68k_num_gregs): Define.
17136 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17137 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17138 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17139 (m68k_breakpoint_at): New. Add to the_low_target.
17140
17141 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17142 srv_linux_thread_db to yes.
17143
17144 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17145
17146 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17147 (ARCH_SET_FS): Likewise.
17148 (ARCH_GET_FS): Likewise.
17149 (ARCH_GET_GS): Likewise.
17150
17151 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17152
17153 * linux-i386-low.c (ps_get_thread_area): New.
17154 * linux-x86-64-low.c (ps_get_thread_area): New.
17155 * linux-low.c: Include <sys/syscall.h>.
17156 (linux_kill_one_process): Don't kill the first thread here.
17157 (linux_kill): Kill the first thread here.
17158 (kill_lwp): New function.
17159 (send_sigstop, linux_send_signal): Use it.
17160 * proc-service.c: Clean up #ifdefs.
17161 (fpregset_info): Delete.
17162 (ps_lgetregs): Update and enable implementation.
17163 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17164 implementations.
17165 * remote-utils.c (struct sym_cache, symbol_cache): New.
17166 (input_interrupt): Print a clearer message.
17167 (async_io_enabled): New variable.
17168 (enable_async_io, disable_async_io): Use it. Update comments.
17169 (look_up_one_symbol): Use the symbol cache.
17170 * thread-db.c (thread_db_look_up_symbols): New function.
17171 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17172
17173 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17174
17175 * configure.in: Test for -rdynamic.
17176 * configure: Regenerated.
17177 * Makefile (INTERNAL_LDFLAGS): New.
17178 (gdbserver, gdbreplay): Use it.
17179
17180 2004-09-02 Andrew Cagney <cagney@gnu.org>
17181
17182 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17183
17184 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17185
17186 * linux-low.c (linux_wait): Clear all_processes list also.
17187
17188 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17189
17190 * linux-low.c: Include <errno.h>. Remove extern declaration of
17191 errno.
17192
17193 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17194
17195 * gdbreplay.c, server.h, utils.c: Update copyright years.
17196
17197 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17198
17199 * server.c (main): Print child status or termination signal from
17200 variable 'signal', not 'sig'.
17201
17202 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17203
17204 * linux-low.c (linux_read_memory): Change return type to
17205 int. Check for and return error from ptrace().
17206 * target.c (read_inferior_memory): Change return type to int. Pass
17207 back return status from the_target->read_memory().
17208 * target.h (struct target_ops): Adapt *read_memory() prototype.
17209 Update comment.
17210 (read_inferior_memory): Adapt prototype.
17211 * server.c (main): Return an error packet if
17212 read_inferior_memory() returns an error.
17213
17214 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17215
17216 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17217 Unify with other clean targets.
17218
17219 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17220
17221 * server.c (handle_v_cont): Call set_desired_inferior.
17222
17223 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17224
17225 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17226
17227 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17228
17229 * linux-low.c (linux_wait): Unblock async I/O.
17230 (linux_resume): Block and enable async I/O.
17231 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17232 * server.h (block_async_io, unblock_async_io): Add prototypes.
17233
17234 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17235
17236 * remote-utils.c (remote_open): Print a status notice after
17237 opening a TCP port.
17238 * server.c (attach_inferior): Print a status notice after
17239 attaching.
17240
17241 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17242
17243 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17244
17245 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17246
17247 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17248 error packet.
17249 * server.c, target.h: Update copyright years.
17250
17251 2004-02-25 Roland McGrath <roland@redhat.com>
17252
17253 * target.h (struct target_ops): New member `read_auxv'.
17254 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17255 * linux-low.c (linux_read_auxv): New function.
17256 (linux_target_ops): Initialize `read_auxv' member to that.
17257
17258 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17259
17260 Committed by Jim Blandy <jimb@redhat.com>.
17261
17262 * linux-s390-low.c (s390_num_regs): Update.
17263 (s390_regmap): Remove control registers. Use __s390x__ predefine
17264 instead of GPR_SIZE to distiguish s390 and s390x targets.
17265
17266 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17267
17268 * linux-low.c: Update copyright year.
17269 (check_removed_breakpoint): Clear pending_is_breakpoint.
17270 (linux_set_resume_request, linux_queue_one_thread)
17271 (resume_status_pending_p): New functions.
17272 (linux_continue_one_thread): Use process->resume.
17273 (linux_resume): Only resume threads if there are no pending events.
17274 * linux-low.h (struct process_info): Add resume request
17275 pointer.
17276
17277 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17278
17279 * regcache.c (new_register_cache): Clear the allocated register
17280 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17281
17282 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17283
17284 * linux-low.c (linux_resume): Take a struct thread_resume *
17285 argument.
17286 (linux_wait): Update call.
17287 (resume_ptr): New static variable.
17288 (linux_continue_one_thread): Renamed from
17289 linux_continue_one_process. Use resume_ptr.
17290 (linux_resume): Use linux_continue_one_thread.
17291 * server.c (handle_v_cont, handle_v_requests): New functions.
17292 (myresume): New function.
17293 (main): Handle 'v' case.
17294 * target.h (struct thread_resume): New type.
17295 (struct target_ops): Change argument of "resume" to struct
17296 thread_resume *.
17297 (myresume): Delete macro.
17298
17299 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17300
17301 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17302 (uninstall): Support DESTDIR.
17303
17304 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17305
17306 * configure.srv: Add xscale*linux copy of arm*linux entry.
17307
17308 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17309
17310 * linux-arm-low.c (arm_reinsert_addr): New function.
17311 (the_low_target): Add arm_reinsert_addr.
17312
17313 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17314
17315 * mem-break.c: Remove whitespace at end of file.
17316
17317 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17318
17319 * configure.in: Check whether we need to prototype strerror.
17320 * server.h: Optionally prototype strerror.
17321 * gdbreplay.c (perror_with_name): Use strerror.
17322 * linux-low.c (linux_attach_lwp): Use strerror.
17323 * utils.c (perror_with_name): Use strerror.
17324 * config.in, configure: Regenerated.
17325
17326 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17327
17328 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17329 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17330
17331 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17332
17333 * Makefile.in (SFILES): Update.
17334 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17335 low-sun3.c: Remove files.
17336
17337 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17338
17339 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17340 (linux_detach_one_process, linux_detach): New functions.
17341 (linux_target_ops): Add linux_detach.
17342 * server.c (main): Handle 'D' packet.
17343 * target.h (struct target_ops): Add "detach" member.
17344 (detach_inferior): Define.
17345
17346 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17347
17348 From Kelley Cook <kelleycook@wideopenwest.com>:
17349 * configure.srv: Accept i[34567]86 variants.
17350
17351 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17352
17353 * linux-low.c (linux_wait_for_event): Correct comment typos.
17354 (linux_resume_one_process): Call check_removed_breakpoint.
17355 (linux_send_signal): New function.
17356 (linux_target_ops): Add linux_send_signal.
17357 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17358 of kill.
17359 * target.h (struct target_ops): Add send_signal.
17360
17361 2003-05-29 Jim Blandy <jimb@redhat.com>
17362
17363 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17364 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17365 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17366 away part of the register's value.
17367
17368 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17369
17370 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17371 (linux_wait_for_event, linux_init_signals): Likewise.
17372
17373 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17374
17375 * configure.in: Check for stdlib.h.
17376 * configure: Regenerated.
17377 * config.in: Regenerated.
17378
17379 2003-01-04 Andreas Schwab <schwab@suse.de>
17380
17381 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17382
17383 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17384
17385 * Makefile.in: Remove obsolete code.
17386
17387 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17388
17389 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17390 defined(PT_FPR0_HI).
17391
17392 2002-11-17 Stuart Hughes <seh@zee2.com>
17393
17394 * linux-arm-low.c (arm_num_regs): Increase.
17395 (arm_regmap): Include status register.
17396
17397 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17398
17399 * linux-low.c (register_addr): Remove incorrect -1 check.
17400
17401 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17402
17403 * linux-low.c (linux_create_inferior): Call setpgid. Return
17404 the new PID.
17405 (unstopped_p, linux_signal_pid): Remove.
17406 (linux_target_ops): Remove linux_signal_pid.
17407 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17408 global instead of target method.
17409 * target.h (struct target_ops): Remove signal_pid. Update comment
17410 for create_inferior.
17411 * server.c (signal_pid): New variable.
17412 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17413 gdbserver. Set the child to be the foreground process group.
17414 (attach_inferior): Set signal_pid.
17415
17416 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17417
17418 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17419
17420 2002-08-20 Jim Blandy <jimb@redhat.com>
17421
17422 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17423 default for this.
17424
17425 2002-08-01 Andrew Cagney <cagney@redhat.com>
17426
17427 * Makefile.in: Make chill references obsolete.
17428
17429 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17430
17431 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17432 * configure: Regenerate.
17433 * config.in: Regenerate.
17434
17435 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17436
17437 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17438 (perror_with_name, remote_close, remote_open, expect, play): Static.
17439
17440 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17441
17442 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17443 byte offsets instead of an array of indexes.
17444 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17445
17446 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17447
17448 * regcache.c: Add comment.
17449
17450 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17451
17452 * thread-db.c: New file.
17453 * proc-service.c: New file.
17454 * acinclude.m4: New file.
17455 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17456 proc-service.o, and thread-db.o.
17457 (linux-low.o): Add USE_THREAD_DB.
17458 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17459 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17460 * aclocal.m4: Regenerated.
17461 * config.in: Regenerated.
17462 * configure: Regenerated.
17463 * configure.in: Check for proc_service.h, sys/procfs.h,
17464 thread_db.h, and linux/elf.h headrs.
17465 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17466 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17467 Check for -lthread_db and thread support.
17468 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17469 PowerPC, and SuperH.
17470 * i387-fp.c: Constify arguments.
17471 * i387-fp.h: Likewise.
17472 * inferiors.c: (struct thread_info): Renamed from
17473 `struct inferior_info'. Remove PID member. Use generic inferior
17474 list header. All uses updated.
17475 (inferiors, signal_pid): Removed.
17476 (all_threads): New variable.
17477 (get_thread): Define.
17478 (add_inferior_to_list): New function.
17479 (for_each_inferior): New function.
17480 (change_inferior_id): New function.
17481 (add_inferior): Removed.
17482 (remove_inferior): New function.
17483 (add_thread): New function.
17484 (free_one_thread): New function.
17485 (remove_thread): New function.
17486 (clear_inferiors): Use for_each_inferior and free_one_thread.
17487 (find_inferior): New function.
17488 (find_inferior_id): New function.
17489 (inferior_target_data): Update argument type.
17490 (set_inferior_target_data): Likewise.
17491 (inferior_regcache_data): Likewise.
17492 (set_inferior_regcache_data): Likewise.
17493 * linux-low.c (linux_bp_reinsert): Remove.
17494 (all_processes, stopping_threads, using_thrads)
17495 (struct pending_signals, debug_threads, pid_of): New.
17496 (inferior_pid): Replace with macro.
17497 (struct inferior_linux_data): Remove.
17498 (get_stop_pc, add_process): New functions.
17499 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17500 Use add_process and add_thread.
17501 (linux_attach_lwp): New function, based on old linux_attach. Use
17502 add_process and add_thread. Set stop_expected for new threads.
17503 (linux_attach): New function.
17504 (linux_kill_one_process): New function.
17505 (linux_kill): Kill all LWPs.
17506 (linux_thread_alive): Use find_inferior_id.
17507 (check_removed_breakpoints, status_pending_p): New functions.
17508 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17509 Update. Use WNOHANG. Wait for cloned processes also. Update process
17510 struct for the found process.
17511 (linux_wait_for_event): New function.
17512 (linux_wait): Use it. Support LWPs.
17513 (send_sigstop, wait_for_sigstop, stop_all_processes)
17514 (linux_resume_one_process, linux_continue_one_process): New functions.
17515 (linux_resume): Support LWPs.
17516 (REGISTER_RAW_SIZE): Remove.
17517 (fetch_register): Use register_size instead. Call supply_register.
17518 (usr_store_inferior_registers): Likewise. Call collect_register.
17519 Fix recursive case.
17520 (regsets_fetch_inferior_registers): Improve error message.
17521 (regsets_store_inferior_registers): Add debugging.
17522 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17523 (unstopped_p, linux_signal_pid): New functions.
17524 (linux_target_ops): Add linux_signal_pid.
17525 (linux_init_signals): New function.
17526 (initialize_low): Call it. Initialize using_threads.
17527 * regcache.c (inferior_regcache_data): Add valid
17528 flag.
17529 (get_regcache): Fetch registers lazily. Add fetch argument
17530 and update all callers.
17531 (regcache_invalidate_one, regcache_invalidate): New
17532 functions.
17533 (new_register_cache): Renamed from create_register_cache.
17534 Return the new regcache.
17535 (free_register_cache): Change argument to a void *.
17536 (registers_to_string, registers_from_string): Call get_regcache
17537 with fetch flag set.
17538 (register_data): Make static. Pass fetch flag to get_regcache.
17539 (supply_register): Call get_regcache with fetch flag clear.
17540 (collect_register): Call get_regcache with fetch flag set.
17541 (collect_register_as_string): New function.
17542 * regcache.h: Update.
17543 * remote-utils.c (putpkt): Flush after debug output and use
17544 stderr.
17545 Handle input interrupts while waiting for an ACK.
17546 (input_interrupt): Use signal_pid method.
17547 (getpkt): Flush after debug output and use stderr.
17548 (outreg): Use collect_register_as_string.
17549 (new_thread_notify, dead_thread_notify): New functions.
17550 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17551 and general_thread.
17552 (look_up_one_symbol): Flush after debug output.
17553 * server.c (step_thread, server_waiting): New variables.
17554 (start_inferior): Don't use signal_pid. Update call to mywait.
17555 (attach_inferior): Update call to mywait.
17556 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17557 (main): Don't fetch/store registers explicitly. Use
17558 set_desired_inferior. Support proposed ``Hs'' packet. Update
17559 calls to mywait.
17560 * server.h: Update.
17561 (struct inferior_list, struct_inferior_list_entry): New.
17562 * target.c (set_desired_inferior): New.
17563 (write_inferior_memory): Constify.
17564 (mywait): New function.
17565 * target.h: Update.
17566 (struct target_ops): New signal_pid method.
17567 (mywait): Removed macro, added prototype.
17568
17569 * linux-low.h (regset_func): Removed.
17570 (regset_fill_func, regset_store_func): New.
17571 (enum regset_type): New.
17572 (struct regset_info): Add type field. Use new operation types.
17573 (struct linux_target_ops): stop_pc renamed to get_pc.
17574 Add decr_pc_after_break and breakpoint_at.
17575 (get_process, get_thread_proess, get_process_thread)
17576 (strut process_info, all_processes, linux_attach_lwp)
17577 (thread_db_init): New.
17578
17579 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17580 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17581 (the_low_target): Add new members.
17582 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17583 (i386_store_fpxregset): Constify.
17584 (target_regsets): Add new kind identifier.
17585 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17586 (i386_set_pc): Add debugging.
17587 (i386_breakpoint_at): New function.
17588 (the_low_target): Add new members.
17589 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17590 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17591 (mips_breakpoint_at): New.
17592 (the_low_target): Add new members.
17593 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17594 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17595 (the_low_target): Add new members.
17596 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17597 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17598 (the_low_target): Add new members.
17599 * linux-x86-64-low.c (target_regsets): Add new kind
17600 identifier.
17601
17602 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17603
17604 From Martin Pool <mbp@samba.org>:
17605 * server.c (gdbserver_usage): New function.
17606 (main): Call it.
17607
17608 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17609
17610 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17611 stop_at -> stop_pc.
17612
17613 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17614
17615 * Makefile.in: Remove obsolete code.
17616
17617 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17618
17619 * linux-low.c (regsets_fetch_inferior_registers),
17620 (regsets_store_inferior_registers): Removed cast to int from
17621 ptrace() calls.
17622 * regcache.h: Added declaration of struct inferior_info.
17623
17624 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17625
17626 * inferiors.c (struct inferior_info): Add regcache_data.
17627 (add_inferior): Call create_register_cache.
17628 (clear_inferiors): Call free_register_cache.
17629 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17630 * regcache.c (struct inferior_regcache_data): New.
17631 (registers): Remove.
17632 (get_regcache): New function.
17633 (create_register_cache, free_register_cache): New functions.
17634 (set_register_cache): Don't initialize the register cache here.
17635 (registers_to_string, registers_from_string, register_data): Call
17636 get_regcache.
17637 * regcache.h: Add prototypes.
17638 * server.h: Likewise.
17639
17640 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17641
17642 * mem-break.c: New file.
17643 * mem-break.h: New file.
17644 * Makefile.in: Add mem-break.o rule; update server.h
17645 dependencies.
17646 * inferiors.c (struct inferior_info): Add target_data
17647 member.
17648 (clear_inferiors): Free target_data member if set.
17649 (inferior_target_data, set_inferior_target_data): New functions.
17650 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17651 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17652 * linux-low.c (linux_bp_reinsert): New variable.
17653 (struct inferior_linux_data): New.
17654 (linux_create_inferior): Use set_inferior_target_data.
17655 (linux_attach): Likewise. Call add_inferior.
17656 (linux_wait_for_one_inferior): New function.
17657 (linux_wait): Call it.
17658 (linux_write_memory): Add const.
17659 (initialize_low): Call set_breakpoint_data.
17660 * linux-low.h (struct linux_target_ops): Add breakpoint
17661 handling members.
17662 * server.c (attach_inferior): Remove extra add_inferior
17663 call.
17664 * server.h: Include mem-break.h. Update inferior.c
17665 prototypes.
17666 * target.c (read_inferior_memory)
17667 (write_inferior_memory): New functions.
17668 * target.h (read_inferior_memory)
17669 (write_inferior_memory): Change macros to prototypes.
17670 (struct target_ops): Update comments. Add const to write_memory
17671 definition.
17672
17673 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17674
17675 * linux-low.c (usr_store_inferior_registers): Support
17676 registers which are allowed to fail to store.
17677 * linux-low.h (linux_target_ops): Likewise.
17678 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17679 (ppc_cannot_store_register): FPSCR may not be storable.
17680
17681 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17682
17683 * server.h: Include <string.h> if HAVE_STRING_H.
17684 * ChangeLog: Correct paths in last ChangeLog entry.
17685
17686 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17687
17688 * linux-low.h: Remove obsolete prototypes.
17689 (struct linux_target_ops): New.
17690 (extern the_low_target): New.
17691 * linux-low.c (num_regs, regmap): Remove declarations.
17692 (register_addr): Use the_low_target explicitly.
17693 (fetch_register): Likewise.
17694 (usr_fetch_inferior_registers): Likewise.
17695 (usr_store_inferior_registers): Likewise.
17696 * linux-arm-low.c (num_regs): Remove.
17697 (arm_num_regs): Define.
17698 (arm_regmap): Renamed from regmap, made static.
17699 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17700 made static.
17701 (arm_cannot_store_register): Renamed from cannot_store_register,
17702 made static.
17703 (the_low_target): New.
17704 * linux-i386-low.c (num_regs): Remove.
17705 (i386_num_regs): Define.
17706 (i386_regmap): Renamed from regmap, made static.
17707 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17708 made static.
17709 (i386_cannot_store_register): Renamed from cannot_store_register,
17710 made static.
17711 (the_low_target): New.
17712 * linux-ia64-low.c (num_regs): Remove.
17713 (ia64_num_regs): Define.
17714 (ia64_regmap): Renamed from regmap, made static.
17715 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17716 made static.
17717 (ia64_cannot_store_register): Renamed from cannot_store_register,
17718 made static.
17719 (the_low_target): New.
17720 * linux-m68k-low.c (num_regs): Remove.
17721 (m68k_num_regs): Define.
17722 (m68k_regmap): Renamed from regmap, made static.
17723 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17724 made static.
17725 (m68k_cannot_store_register): Renamed from cannot_store_register,
17726 made static.
17727 (the_low_target): New.
17728 * linux-mips-low.c (num_regs): Remove.
17729 (mips_num_regs): Define.
17730 (mips_regmap): Renamed from regmap, made static.
17731 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17732 made static.
17733 (mips_cannot_store_register): Renamed from cannot_store_register,
17734 made static.
17735 (the_low_target): New.
17736 * linux-ppc-low.c (num_regs): Remove.
17737 (ppc_num_regs): Define.
17738 (ppc_regmap): Renamed from regmap, made static.
17739 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17740 made static.
17741 (ppc_cannot_store_register): Renamed from cannot_store_register,
17742 made static.
17743 (the_low_target): New.
17744 * linux-s390-low.c (num_regs): Remove.
17745 (s390_num_regs): Define.
17746 (s390_regmap): Renamed from regmap, made static.
17747 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17748 made static.
17749 (s390_cannot_store_register): Renamed from cannot_store_register,
17750 made static.
17751 (the_low_target): New.
17752 * linux-sh-low.c (num_regs): Remove.
17753 (sh_num_regs): Define.
17754 (sh_regmap): Renamed from regmap, made static.
17755 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17756 made static.
17757 (sh_cannot_store_register): Renamed from cannot_store_register,
17758 made static.
17759 (the_low_target): New.
17760 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17761 (the_low_target): New.
17762
17763 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17764
17765 * Makefile.in: Add stamp-h target.
17766 * configure.in: Create stamp-h.
17767 * configure: Regenerated.
17768
17769 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17770
17771 * inferiors.c: New file.
17772 * target.c: New file.
17773 * target.h: New file.
17774 * Makefile.in: Add target.o and inferiors.o. Update
17775 dependencies.
17776 * linux-low.c (inferior_pid): New static variable,
17777 moved from server.c.
17778 (linux_create_inferior): Renamed from create_inferior.
17779 Call add_inferior. Return 0 on success instead of a PID.
17780 (linux_attach): Renamed from myattach.
17781 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17782 (linux_thread_alive): Renamed from mythread_alive.
17783 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17784 child dies.
17785 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17786 (regsets_store_inferior_registers): Correct error message.
17787 Add missing ``return 0''.
17788 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17789 (linux_store_registers): Renamed from store_inferior_registers.
17790 (linux_read_memory): Renamed from read_inferior_memory.
17791 (linux_write_memory): Renamed from write_inferior_memory.
17792 (linux_target_ops): New structure.
17793 (initialize_low): Call set_target_ops ().
17794 * remote-utils.c (unhexify): New function.
17795 (hexify): New function.
17796 (input_interrupt): Send signals to ``signal_pid''.
17797 * server.c (inferior_pid): Remove.
17798 (start_inferior): Update create_inferior call.
17799 (attach_inferior): Call add_inferior.
17800 (handle_query): New function.
17801 (main): Call handle_query for `q' packets.
17802 * server.h: Include "target.h". Remove obsolete prototypes.
17803 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17804
17805 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17806
17807 * Makefile.in: Add WARN_CFLAGS. Update configury
17808 dependencies.
17809 * configure.in: Check for <string.h>
17810 * configure: Regenerate.
17811 * config.in: Regenerate.
17812 * gdbreplay.c: Include needed system headers.
17813 (remote_open): Remove strchr prototype.
17814 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17815 * regcache.c (supply_register): Change buf argument to const void *.
17816 (supply_register_by_name): Likewise.
17817 (collect_register): Change buf argument to void *.
17818 (collect_register_by_name): Likewise.
17819 * regcache.h: Add missing prototypes.
17820 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17821 * server.c (handle_query): New function.
17822 (attached): New static variable, moved out of main.
17823 (main): Quiet longjmp clobber warnings.
17824 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17825 * utils.c (error): Remove NORETURN.
17826 (fatal): Likewise.
This page took 0.721889 seconds and 5 git commands to generate.