Consolidate definition of USE_WIN32API
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2020-01-14 Tom Tromey <tom@tromey.com>
2
3 * configure.ac (LIBS): Use WIN32APILIBS.
4 (USE_WIN32API): Don't define.
5 * configure: Rebuild.
6
7 2020-01-14 Tom Tromey <tom@tromey.com>
8
9 * configure: Rebuild.
10
11 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
12
13 * Makefile.in (%-generated.c): Remove rule for files from
14 regformats/i386.
15
16 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
17
18 * configure: Re-generate.
19
20 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
21
22 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
23 Define to static.
24 * tracepoint.c (stop_tracing, flush_trace_buffer,
25 about_to_request_buffer_space, get_trace_state_variable_value,
26 set_trace_state_variable_value, gdb_collect): Add declaration.
27
28 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
29
30 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
31 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
32 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
33 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
34 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
35 static.
36
37 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
38
39 * inferiors.c: Include gdbsupport/common-inferior.h.
40
41 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
42
43 * hostio-errno.c: Include hostio.h.
44
45 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
46
47 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
48 prerequisite.
49
50 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
51
52 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
53 * linux-arm-tdesc.h: Include arch/arm.h.
54
55 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
56
57 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
58
59 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
60
61 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
62 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
63
64 2020-01-10 Pedro Alves <palves@redhat.com>
65
66 * fork-child.c (post_fork_inferior): Pass target down to
67 startup_inferior.
68 * inferiors.c (switch_to_thread): Add process_stratum_target
69 parameter.
70 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
71 * nto-low.c (nto_target_ops): Now a process_stratum_target.
72 * linux-low.c (linux_target_ops): Now a process_stratum_target.
73 * remote-utils.c (prepare_resume_reply): Pass the target to
74 switch_to_thread.
75 * target.c (the_target): Now a process_stratum_target.
76 (done_accessing_memory): Pass the target to switch_to_thread.
77 (set_target_ops): Ajust to use process_stratum_target.
78 * target.h (struct target_ops): Rename to ...
79 (struct process_stratum_target): ... this.
80 (the_target, set_target_ops): Adjust.
81 (prepare_to_access_memory): Adjust comment.
82 * win32-low.c (child_xfer_memory): Adjust to use
83 process_stratum_target.
84 (win32_target_ops): Now a process_stratum_target.
85
86 2020-01-06 Eli Zaretskii <eliz@gnu.org>
87 Pedro Alves <palves@redhat.com>
88
89 * win32-low.c (get_child_debug_event): Extract the fatal exception
90 from the exit status and convert to the equivalent Posix signal
91 number.
92 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
93 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
94
95 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
96
97 * Makefile.in: Use INSTALL_PROGRAM_ENV.
98
99 2020-01-01 Joel Brobecker <brobecker@adacore.com>
100
101 * server.c (gdbserver_version): Change copyright year to 2020.
102 * gdbreplay.c (gdbreplay_version): Likewise.
103
104 2019-12-19 Christian Biesinger <cbiesinger@google.com>
105
106 * configure: Regenerate.
107 * configure.ac: Quote variable arguments of test.
108
109 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
110
111 * Makefile.in: Fix build with GNU Make 3.81
112
113 2019-12-16 Tom Tromey <tromey@adacore.com>
114
115 * server.c (get_exec_file): Constify result.
116
117 2019-12-10 Christian Biesinger <cbiesinger@google.com>
118
119 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
120 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
121 * config.in: Regenerate.
122 * configure: Regenerate.
123 * configure.ac: Don't check for strerror.
124 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
125 Call safe_strerror instead of strerror.
126 * server.h (strerror): Remove this now-unnecessary declaration.
127 * tracepoint.c (init_named_socket): Call safe_strerror instead of
128 strerror.
129 (gdb_agent_helper_thread): Likewise.
130 * utils.c (perror_with_name): Likewise.
131
132 2019-11-26 Tom Tromey <tom@tromey.com>
133
134 * configure, config.in: Rebuild.
135
136 2019-11-26 Tom Tromey <tom@tromey.com>
137
138 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
139 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
140 gdb_sigmask.
141 * configure, config.in: Rebuild.
142
143 2019-11-26 Tom Tromey <tom@tromey.com>
144
145 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
146 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
147 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
148 * acinclude.m4: Include ax_pthread.m4.
149 * config.in, configure: Rebuild.
150
151 2019-11-26 Christian Biesinger <cbiesinger@google.com>
152
153 * debug.c (debug_set_output): Call safe_strerror instead of
154 strerror.
155 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
156 (linux_kill_one_lwp): Likewise.
157 (linux_detach_one_lwp): Likewise.
158 (linux_wait_for_event_filtered): Likewise.
159 (store_register): Likewise.
160 * lynx-low.c (lynx_attach): Likewise.
161 * mem-break.c (insert_memory_breakpoint): Likewise.
162 (remove_memory_breakpoint): Likewise.
163 (delete_fast_tracepoint_jump): Likewise.
164 (set_fast_tracepoint_jump): Likewise.
165 (uninsert_fast_tracepoint_jumps_at): Likewise.
166 (reinsert_fast_tracepoint_jumps_at): Likewise.
167 * nto-low.c (nto_xfer_memory): Likewise.
168 (nto_resume): Likewise.
169
170 2019-11-20 Luis Machado <luis.machado@linaro.org>
171
172 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
173 instead of register count.
174 * tdesc.c (tdesc_contains_feature): New function.
175 * tdesc.h (tdesc_contains_feature): New prototype.
176
177 2019-11-15 Christian Biesinger <cbiesinger@google.com>
178
179 * Makefile.in: Add safe-strerror.c.
180 * configure: Regenerate.
181 * configure.ac: Don't source common.host.
182
183 2019-11-15 Christian Biesinger <cbiesinger@google.com>
184
185 * config.in: Regenerate.
186 * configure: Regenerate.
187
188 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
189
190 * ax.c (ax_printf): Handle size_t_arg.
191
192 2019-11-06 Christian Biesinger <cbiesinger@google.com>
193
194 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
195 * mi/mi-main.c (output_cores): Likewise.
196 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
197 (linux_xfer_osdata_modules): Likewise.
198 * remote.c (register_remote_support_xml): Likewise.
199 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
200 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
201
202 2019-11-01 Christian Biesinger <cbiesinger@google.com>
203
204 * configure: Regenerate.
205 * configure.ac: Remove check for strerror_r.
206
207 2019-10-31 Christian Biesinger <cbiesinger@google.com>
208
209 * config.in: Regenerate.
210 * configure: Regenerate.
211 * configure.ac: Also check for strerror_r.
212
213 2019-10-31 Christian Biesinger <cbiesinger@google.com>
214
215 * ax.h (debug_agent): Remove duplicate declaration.
216
217 2019-10-26 Tom de Vries <tdevries@suse.de>
218
219 * linux-aarch64-low.c: Fix typos in comments.
220 * linux-arm-low.c: Same.
221 * linux-low.c: Same.
222 * linux-ppc-low.c: Same.
223 * proc-service.c: Same.
224 * regcache.h: Same.
225 * server.c: Same.
226 * tracepoint.c: Same.
227 * win32-low.c: Same.
228
229 2019-10-25 Tom Tromey <tromey@adacore.com>
230
231 * utils.c (xstrdup): Remove.
232
233 2019-10-23 Tom Tromey <tom@tromey.com>
234
235 * configure, config.in: Rebuild.
236
237 2019-10-23 Tom Tromey <tom@tromey.com>
238
239 * configure: Rebuild.
240 * acinclude.m4: Use m4_include, not sinclude.
241
242 2019-10-17 Tom Tromey <tromey@adacore.com>
243
244 * configure: Rebuild.
245 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
246 in AC_CONFIG_FILES invocation.
247 * Makefile.in (stamp-h, Makefile): Use new-style config.status
248 invocation.
249
250 2019-10-16 Christian Biesinger <cbiesinger@google.com>
251
252 * server.c: Include xml-builtin.h.
253 (get_xml_features): Don't declare xml_builtins here.
254
255 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
256
257 * Makefile.in: Remove references to vec-ipa.o.
258
259 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
260
261 * Makefile.in: Remove references to vec.c.
262
263 2019-10-02 Christian Biesinger <cbiesinger@google.com>
264
265 * server.c (server_waiting): Change to bool.
266 (extended_protocol): Likewise.
267 (response_needed): Likewise.
268 (exit_requested): Likewise.
269 (run_once): Likewise.
270 (report_no_resumed): Likewise.
271 (non_stop): Likewise.
272 (disable_packet_vCont): Likewise.
273 (disable_packet_Tthread): Likewise.
274 (disable_packet_qC): Likewise.
275 (disable_packet_qfThreadInfo): Likewise.
276 (handle_general_set): Update.
277 (handle_detach): Update.
278 (handle_monitor_command): Update.
279 (handle_query): Update.
280 (captured_main): Update.
281 (process_serial_event): Update.
282 * server.h (server_waiting): Change to bool.
283 (disable_packet_vCont): Likewise.
284 (disable_packet_Tthread): Likewise.
285 (disable_packet_qC): Likewise.
286 (disable_packet_qfThreadInfo): Likewise.
287 (run_once): Likewise.
288 (non_stop): Likewise.
289 * target.c (target_stop_and_wait): Update.
290
291 2019-10-02 Tom Tromey <tromey@adacore.com>
292
293 * Makefile.in (SFILES): Add common-inferior.c.
294 (OBS): Add common-inferior.o.
295 * server.c (startup_with_shell): Don't define.
296
297 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
298
299 * linux-low.c (linux_low_read_btrace): Update for change to
300 std::vector.
301
302 2019-09-20 Christian Biesinger <cbiesinger@google.com>
303
304 * debug.c (debug_threads): Remove comment in favor of the header.
305 * debug.h (using_threads): Add declaration.
306 (debug_threads): Add comment.
307 * linux-aarch64-low.c: Include debug.h and remove declaration of
308 debug_threads.
309 * nto-low.c: Likewise.
310 * remote-utils.c: Likewise.
311 * thread-db.c: Likewise.
312
313 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
314
315 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
316 and powerpc-cell64l-ipa.o.
317 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
318 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
319 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
320 (spu*-*-*): Remove.
321
322 * spu-low.c: Remove file.
323
324 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
325 (parse_spufs_run): Remove.
326 (ppc_get_pc): Remove Cell/B.E. support.
327 (ppc_set_pc): Likewise.
328 (ppc_breakpoint_at): Likewise.
329 (ppc_arch_setup): Likewise.
330 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
331 tdesc_powerpc_cell32l.
332 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
333 or init_registers_powerpc_cell32l.
334 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
335 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
336 or init_registers_powerpc_cell32l.
337 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
338 (init_registers_powerpc_cell32l): Remove prototype.
339 (init_registers_powerpc_cell64l): Likewise.
340
341 * target.h (struct target_ops): Remove qxfer_spu member.
342 * server.c (handle_qxfer_spu): Remove.
343 (qxfer_packets): Remove entry for "spu".
344 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
345 * linux-low.c (SPUFS_MAGIC): Remove.
346 (spu_enumerate_spu_ids): Remove.
347 (linux_qxfer_spu): Remove.
348 (linux_target_ops): Remove qxfer_spu member.
349 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
350 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
351 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
352
353 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
354
355 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
356 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
357 * config.in: Regenerate.
358 * configure: Regenerate.
359
360 2019-08-15 Tom Tromey <tromey@adacore.com>
361
362 * target.c (target_write_memory): Use gdb::byte_vector.
363
364 2019-08-15 Tom Tromey <tromey@adacore.com>
365
366 * tracepoint.c (write_inferior_data_pointer)
367 (write_inferior_integer, write_inferior_int8)
368 (write_inferior_uinteger, m_tracepoint_action_download)
369 (r_tracepoint_action_download, x_tracepoint_action_download)
370 (l_tracepoint_action_download, clear_inferior_trace_buffer)
371 (download_agent_expr, download_tracepoint_1)
372 (download_trace_state_variables, upload_fast_traceframes): Update.
373 * server.c (gdb_write_memory): Update.
374 * remote-utils.c (relocate_instruction): Update.
375 * proc-service.c (ps_pdwrite): Update.
376 * mem-break.c (remove_memory_breakpoint)
377 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
378 (uninsert_fast_tracepoint_jumps_at)
379 (reinsert_fast_tracepoint_jumps_at): Update.
380 * linux-x86-low.c (append_insns)
381 (i386_install_fast_tracepoint_jump_pad)
382 (amd64_write_goto_address, i386_write_goto_address): Update.
383 * linux-s390-low.c (append_insns, s390_write_goto_address):
384 Update.
385 * linux-ppc-low.c (ppc_relocate_instruction)
386 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
387 (ppc_write_goto_address): Update.
388 * linux-aarch64-low.c (append_insns): Update.
389 * target.h (struct target_ops): Update.
390 (write_inferior_memory): Don't declare.
391 * target.c (target_write_memory): Rename from
392 write_inferior_memory. Remove old target_write_memory.
393
394 2019-08-15 Tom Tromey <tromey@adacore.com>
395
396 * target.c (write_inferior_memory): Use std::vector.
397
398 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
399
400 PR build/24886
401 * configure.ac: Drop enable-libmcheck support.
402 * configure, config.in: Rebuild.
403 * acinclude.m4: Don't include it.
404
405 2019-07-19 Alan Hayward <alan.hayward@arm.com>
406
407 * configure.srv: Remove Arm xml files.
408
409 2019-07-19 Alan Hayward <alan.hayward@arm.com>
410
411 * configure.srv: Add new files. Remove xml generated files.
412 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
413 registers.
414 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
415 * linux-aarch32-tdesc.c: New file.
416 * linux-aarch32-tdesc.h: New file.
417 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
418 * linux-arm-low.c (init_registers_arm, tdesc_arm)
419 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
420 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
421 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
422 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
423 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
424 (arm_read_description): Call arm_linux_read_description.
425 (initialize_low_arch): Don't init registers.
426 * linux-arm-tdesc.c: New file.
427 * linux-arm-tdesc.h: New file.
428
429 2019-07-10 Alan Hayward <alan.hayward@arm.com>
430
431 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
432 Move counter inside for.
433 (arm_read_description): Check ptrace earlier.
434 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
435
436 2019-07-09 Tom Tromey <tom@tromey.com>
437
438 * configure: Rebuild.
439 * configure.ac: Change common to gdbsupport.
440 * acinclude.m4: Change common to gdbsupport.
441 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
442 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
443 common to gdbsupport.
444 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
445 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
446 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
447 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
448 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
449 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
450 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
451 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
452 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
453 common to gdbsupport.
454
455 2019-07-04 Alan Hayward <alan.hayward@arm.com>
456
457 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
458 defines.
459 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
460
461 2019-07-04 Alan Hayward <alan.hayward@arm.com>
462
463 * configure.srv: Remove legacy xml.
464 * linux-aarch64-low.c (initialize_low_arch): Remove
465 initialize_low_tdesc call.
466 * linux-aarch64-tdesc-selftest.c: Remove file.
467 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
468 * linux-x86-low.c (initialize_low_arch): Remove
469 initialize_low_tdesc call.
470 * linux-x86-tdesc-selftest.c: Remove file.
471 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
472
473 2019-06-20 Tom de Vries <tdevries@suse.de>
474
475 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
476 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
477
478 2019-06-19 Tom de Vries <tdevries@suse.de>
479
480 * debug.h (debug_write): Change return type to ssize_t.
481 * debug.c (debug_write): Same.
482
483 2019-06-14 Tom Tromey <tom@tromey.com>
484
485 * configure.ac: Use new path to gnulib.
486 * configure: Rebuild.
487 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
488 to gnulib.
489
490 2019-06-11 Tom Tromey <tom@tromey.com>
491
492 * Makefile.in (SFILES): Add alloc.c.
493 (OBS): Add alloc.o.
494 (IPA_OBJS): Add alloc-ipa.o.
495 (alloc-ipa.o): New target.
496 (%.o: ../%.c): New pattern rule.
497
498 2019-06-10 Tom Tromey <tromey@adacore.com>
499
500 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
501 end warning with a newline.
502 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
503 newline.
504 * thread-db.c (attach_thread): Don't end warning with a newline.
505 (thread_db_notice_clone): Likewise.
506 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
507 newline.
508 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
509 end warning with a newline.
510
511 2019-06-04 Pedro Alves <palves@redhat.com>
512
513 * server.c (captured_main): Use make_unique_xstrdup.
514
515 2019-06-02 Tom Tromey <tom@tromey.com>
516
517 * gdbreplay.c (fromhex): Remove.
518 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
519
520 2019-05-29 Tom Tromey <tromey@adacore.com>
521
522 * configure: Rebuild.
523
524 2019-05-06 Kevin Buettner <kevinb@redhat.com>
525
526 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
527 sign extension code on 32-bit builds.
528
529 2019-05-03 Eli Zaretskii <eliz@gnu.org>
530
531 * remote-utils.c:
532 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
533
534 2019-04-19 Tom Tromey <tom@tromey.com>
535
536 * server.c (struct vstop_notif): Derive from notif_event.
537 <base>: Remove.
538 (queue_stop_reply): Update.
539 (remove_all_on_match_ptid): Change type. Rewrite.
540 (discard_queued_stop_replies): Rewrite.
541 (in_queued_stop_replies_ptid): Change type.
542 (in_queued_stop_replies): Rewrite.
543 (notif_stop): Update.
544 (queue_stop_reply_callback): Update.
545 (captured_main): Don't call initialize_notif.
546 (push_stop_notification): Update.
547 * notif.c (notif_write_event, handle_notif_ack)
548 (notif_event_enque, notif_push): Update.
549 (notif_event_xfree, initialize_notif): Remove.
550 * notif.h (struct notif_event): Include <list>, not
551 "common/queue.h".
552 (struct notif_server) <queue>: Now a std::list.
553 (notif_event_p): Remove typedef.
554 (initialize_notif): Don't declare.
555 (struct notif_event): Add virtual destructor.
556
557 2019-04-17 Alan Hayward <alan.hayward@arm.com>
558
559 * ax.c (ax_vdebug): Call debug_printf.
560 * debug.c (debug_write): New function.
561 * debug.h (debug_write): New declaration.
562 * linux-low.c (sigchld_handler): Call debug_write.
563
564 2019-04-17 Alan Hayward <alan.hayward@arm.com>
565
566 * debug.c (debug_set_output): New function.
567 (debug_vprintf): Send output to debug_file.
568 (debug_flush): Likewise.
569 * debug.h (debug_set_output): New declaration.
570 * server.c (handle_monitor_command): Add debug-file option.
571 (captured_main): Likewise.
572
573 2019-04-17 Alan Hayward <alan.hayward@arm.com>
574
575 * debug.c (remote_debug): Add definition.
576 * debug.h (remote_debug): Add declaration.
577 * hostio.c (remote_debug): Remove declaration.
578 * remote-utils.c (struct ui_file): Likewise.
579 (remote_debug): Likewise.
580 * remote-utils.h (remote_debug): Likewise,
581 * server.c (remote_debug): Remove definition.
582
583 2019-04-10 Kevin Buettner <kevinb@redhat.com>
584
585 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
586 when using a 64-bit gdbserver.
587
588 2019-04-09 Tom Tromey <tromey@adacore.com>
589
590 * linux-low.c (select_event_lwp): Use find_thread_in_random.
591
592 2019-04-08 Tom Tromey <tom@tromey.com>
593
594 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
595 throw.
596 (linux_resume_one_lwp): Likewise.
597
598 2019-04-08 Tom Tromey <tom@tromey.com>
599
600 * gdbreplay.c: Update.
601 * linux-low.c: Update.
602 * server.c: Update.
603
604 2019-04-08 Tom Tromey <tom@tromey.com>
605
606 * server.c: Use C++ exception handling.
607 * linux-low.c: Use C++ exception handling.
608 * gdbreplay.c: Use C++ exception handling.
609
610 2019-04-08 Tom Tromey <tom@tromey.com>
611
612 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
613 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
614 (captured_main, main): Update.
615 * gdbreplay.c (main): Update.
616
617 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
618
619 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
620 value in argument pointer, return 1 if the entry is found and 0
621 otherwise. Move comment.
622 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
623 * linux-low.h (linux_get_auxv): Declare.
624 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
625
626 2019-04-05 Tom Tromey <tromey@adacore.com>
627
628 * server.c (gdbserver_usage): Use upper-case for metasyntactic
629 variables.
630
631 2019-03-28 Alan Hayward <alan.hayward@arm.com>
632
633 * linux-low.c (AT_HWCAP2): Add define if not already included.
634
635 2019-03-26 Alan Hayward <alan.hayward@arm.com>
636
637 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
638 (aarch64_arch_setup): Call linux_get_hwcap.
639 * linux-arm-low.c (arm_get_hwcap): Remove function.
640 (arm_read_description): Call linux_get_hwcap.
641 * linux-low.c (linux_get_auxv): New function.
642 (linux_get_hwcap): Likewise.
643 (linux_get_hwcap2): Likewise.
644 * linux-low.h (linux_get_hwcap): New declaration.
645 (linux_get_hwcap2): Likewise.
646 * linux-ppc-low.c (ppc_get_auxv): Remove function.
647 (ppc_arch_setup): Call linux_get_hwcap.
648 * linux-s390-low.c (s390_get_hwcap): Remove function.
649 (s390_arch_setup): Call linux_get_hwcap.
650
651 2019-03-22 Alan Hayward <alan.hayward@arm.com>
652 Jiong Wang <jiong.wang@arm.com>
653
654 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
655 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
656 to fail.
657 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
658
659 2019-03-22 Alan Hayward <alan.hayward@arm.com>
660 Jiong Wang <jiong.wang@arm.com>
661
662 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
663 (aarch64_get_hwcap): New function.
664 (aarch64_arch_setup): Read APIA hwcap.
665
666 2019-03-22 Alan Hayward <alan.hayward@arm.com>
667 Jiong Wang <jiong.wang@arm.com>
668
669 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
670 (initialize_low_tracepoint): Likewise.
671 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
672 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
673 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
674 (aarch64_linux_read_description): Likewise.
675 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
676
677 2019-03-12 John Baldwin <jhb@FreeBSD.org>
678
679 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
680 i386_create_target_description for 'segments' parameter.
681 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
682 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
683 * win32-i386-low.c (i386_arch_setup): Likewise.
684
685 2019-03-12 Tom Tromey <tromey@adacore.com>
686
687 * linux-low.c (iterate_over_lwps): Update.
688
689 2019-03-06 Tom Tromey <tom@tromey.com>
690
691 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
692 (captured_main): Use SCOPE_EXIT.
693
694 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
695
696 * configure.srv: Use '$enable_unittest' instead of '$development'
697 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
698 case.
699
700 2019-02-27 Tom Tromey <tromey@adacore.com>
701
702 * gdbreplay.c (logchar): Handle \r\n.
703
704 2019-02-07 Alan Hayward <alan.hayward@arm.com>
705
706 * linux-low.c (linux_attach): Add process before lwp.
707 * server.c (attach_inferior): Check if already attached.
708
709 2019-02-07 Tom Tromey <tom@tromey.com>
710
711 * x86-tdesc.h: Rename include guard.
712 * x86-low.h: Add include guard.
713 * wincecompat.h: Rename include guard.
714 * win32-low.h: Add include guard.
715 * utils.h: Rename include guard.
716 * tracepoint.h: Rename include guard.
717 * tdesc.h: Rename include guard.
718 * target.h: Rename include guard.
719 * server.h: Rename include guard.
720 * remote-utils.h: Rename include guard.
721 * regcache.h: Rename include guard.
722 * nto-low.h: Rename include guard.
723 * notif.h: Add include guard.
724 * mem-break.h: Rename include guard.
725 * lynx-low.h: Add include guard.
726 * linux-x86-tdesc.h: Add include guard.
727 * linux-s390-tdesc.h: Add include guard.
728 * linux-ppc-tdesc-init.h: Add include guard.
729 * linux-low.h: Add include guard.
730 * linux-aarch64-tdesc.h: Add include guard.
731 * linux-aarch32-low.h: Add include guard.
732 * inferiors.h: Rename include guard.
733 * i387-fp.h: Rename include guard.
734 * hostio.h: Rename include guard.
735 * gdbthread.h: Rename include guard.
736 * gdb_proc_service.h: Rename include guard.
737 * event-loop.h: Rename include guard.
738 * dll.h: Rename include guard.
739 * debug.h: Rename include guard.
740 * ax.h: Rename include guard.
741
742 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
743
744 PR gdb/23985
745 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
746 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
747
748 2019-01-25 Tom Tromey <tom@tromey.com>
749
750 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
751
752 2019-01-25 Tom Tromey <tom@tromey.com>
753
754 * win32-low.c: Fix common/ includes.
755 * win32-i386-low.c: Fix common/ includes.
756 * tracepoint.c: Fix common/ includes.
757 * thread-db.c: Fix common/ includes.
758 * target.h: Fix common/ includes.
759 * symbol.c: Fix common/ includes.
760 * spu-low.c: Fix common/ includes.
761 * server.h: Fix common/ includes.
762 * server.c: Fix common/ includes.
763 * remote-utils.c: Fix common/ includes.
764 * regcache.h: Fix common/ includes.
765 * regcache.c: Fix common/ includes.
766 * nto-x86-low.c: Fix common/ includes.
767 * notif.h: Fix common/ includes.
768 * mem-break.h: Fix common/ includes.
769 * lynx-low.c: Fix common/ includes.
770 * lynx-i386-low.c: Fix common/ includes.
771 * linux-x86-tdesc-selftest.c: Fix common/ includes.
772 * linux-x86-low.c: Fix common/ includes.
773 * linux-low.c: Fix common/ includes.
774 * inferiors.h: Fix common/ includes.
775 * i387-fp.c: Fix common/ includes.
776 * hostio.c: Fix common/ includes.
777 * hostio-errno.c: Fix common/ includes.
778 * gdbthread.h: Fix common/ includes.
779 * gdbreplay.c: Fix common/ includes.
780 * fork-child.c: Fix common/ includes.
781 * event-loop.c: Fix common/ includes.
782 * ax.c:
783 (enum gdb_agent_op): Fix common/ includes.
784
785 2019-01-21 Tom Tromey <tom@tromey.com>
786
787 * tracepoint.c: Fix includes.
788 * remote-utils.c: Fix includes.
789 * linux-x86-low.c: Fix includes.
790
791 2019-01-01 Joel Brobecker <brobecker@adacore.com>
792
793 * gdbreplay.c (gdbreplay_version): Update copyright year in
794 version message.
795 * server.c (gdbserver_version): Likewise.
796
797 2018-12-05 Alan Hayward <alan.hayward@arm.com>
798
799 * linux-low.c (add_lwp): Switch ordering.
800
801 2018-11-29 Tom Tromey <tom@tromey.com>
802
803 * win32-low.c (win32_join): Take pid, not process.
804 * target.h (struct target_ops) <join>: Change argument type.
805 (join_inferior): Change argument name.
806 * spu-low.c (spu_join): Take pid, not process.
807 * server.c (handle_detach): Preserve pid before destroying
808 process.
809 * lynx-low.c (lynx_join): Take pid, not process.
810 * linux-low.c (linux_join): Take pid, not process.
811
812 2018-11-23 Alan Hayward <alan.hayward@arm.com>
813
814 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
815 (aarch64_cannot_fetch_register): Likewise.
816 (struct linux_target_ops): Update references.
817
818 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
819
820 * linux-ppc-low.c: Include nat/linux-ptrace.h.
821
822 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
823
824 * configure.srv (ipa_ppc_linux_regobj): Add
825 powerpc-isa207-htm-vsx32l-ipa.o and
826 powerpc-isa207-htm-vsx64l-ipa.o.
827 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
828 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
829 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
830 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
831 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
832 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
833 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
834 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
835 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
836 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
837 (init_registers_powerpc_isa207_htm_vsx32l)
838 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
839 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
840 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
841 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
842 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
843 (ppc_store_tm_ctarregset): New functions.
844 (ppc_regsets): Add entries for HTM regsets.
845 (ppc_arch_setup): Set htm in features struct when needed. Set
846 sizes for the HTM regsets.
847 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
848 (initialize_low_arch): Call
849 init_registers_powerpc_isa207_htm_vsx32l and
850 init_registers_powerpc_isa207_htm_vsx64l.
851 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
852 PPC_TDESC_ISA207_HTM_VSX.
853 (initialize_low_tracepoint): Call
854 init_registers_powerpc_isa207_htm_vsx32l and
855 init_registers_powerpc_isa207_htm_vsx64l.
856
857 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
858
859 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
860 rs6000/power-linux-pmu.xml to srv_xmlfiles.
861 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
862 (ppc_store_pmuregset): New functions.
863 (ppc_regsets): Add entries for ebb and pmu regsets.
864 (ppc_arch_setup): Set isa207 in features struct if the ebb and
865 pmu regsets are available. Set sizes for these regsets.
866
867 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
868
869 * configure.srv (ipa_ppc_linux_regobj): Add
870 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
871 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
872 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
873 rs6000/powerpc-isa207-vsx32l.xml, and
874 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
875 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
876 <PPC_TDESC_ISA207_VSX>: New enum value.
877 (init_registers_powerpc_isa207_vsx32l): Declare.
878 (init_registers_powerpc_isa207_vsx64l): Declare.
879 * linux-ppc-low.c (ppc_fill_tarregset): New function.
880 (ppc_store_tarregset): New function.
881 (ppc_regsets): Add entry for the TAR regset.
882 (ppc_arch_setup): Set isa207 in features struct when needed. Set
883 size for the TAR regsets.
884 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
885 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
886 and init_registers_powerpc_isa207_vsx64l.
887 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
888 (initialize_low_tracepoint): Call
889 init_registers_powerpc_isa207_vsx32l and
890 init_registers_powerpc_isa207_vsx64l.
891
892 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
893 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
894
895 * configure.srv (ipa_ppc_linux_regobj): Add
896 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
897 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
898 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
899 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
900 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
901 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
902 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
903 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
904 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
905 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
906 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
907 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
908 (ppc_hwcap): Add comment.
909 (ppc_hwcap2): New global.
910 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
911 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
912 (ppc_regsets): Add entries for the DSCR and PPR regsets.
913 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
914 when needed. Set sizes for the the DSCR and PPR regsets.
915 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
916 (initialize_low_arch): Call
917 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
918 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
919 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
920 PPC_TDESC_ISA205_PPR_DSCR_VSX.
921 (initialize_low_tracepoint): Call
922 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
923 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
924
925 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
926
927 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
928
929 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
930 Simon Marchi <simark@simark.ca>
931
932 * acinclude.m4: Include "../selftest.m4".
933 * configure: Regenerate.
934 * configure.ac: Use "GDB_AC_SELFTEST".
935 * configure.srv: Use "$enable_unittests" instead of
936 "$development" when checking whether unit tests have been
937 enabled.
938 * server.c (captured_main): Update message informing that
939 selftests have been disabled.
940
941 2018-10-04 Tom Tromey <tom@tromey.com>
942
943 * configure: Rebuild.
944
945 2018-10-04 Tom Tromey <tom@tromey.com>
946
947 * server.c (handle_status): Rename inner "thread".
948 (process_serial_event): Declare "res" in 'm' case.
949 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
950 (iterate_over_lwps): Rename inner "thread".
951 (linux_qxfer_libraries_svr4): Rename inner "len".
952 * gdbthread.h (find_thread_in_random): Rename inner "thread".
953
954 2018-10-01 Gary Benson <gbenson@redhat.com>
955
956 * gdb_proc_service.h: Moved common code to
957 common/gdb_proc_service.h.
958
959 2018-10-01 Gary Benson <gbenson@redhat.com>
960
961 * gdb_proc_service.h: Synchronize comments and whitespace with
962 GDB's version of this file.
963
964 2018-09-25 Tom Tromey <tom@tromey.com>
965
966 * configure: Rebuild.
967 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
968
969 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
970
971 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
972 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
973 ($(IPA_LIB)): Sort IPA_OBJS.
974
975 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
976
977 * Makefile.in: Remove references to $(ADD_DEPS).
978
979 2018-09-16 Tom Tromey <tom@tromey.com>
980
981 * remote-utils.c (remote_open): Use GNU style for metasyntactic
982 variables.
983 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
984 variables.
985
986 2018-09-05 Tom Tromey <tom@tromey.com>
987
988 * configure: Rebuild.
989
990 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
991
992 PR build/23399
993 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
994
995 2018-08-27 Tom Tromey <tom@tromey.com>
996
997 PR build/23087:
998 * configure: Rebuild.
999
1000 2018-08-27 Tom Tromey <tom@tromey.com>
1001
1002 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1003 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1004 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1005 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1006 (s390x_emit_stack_adjust): Add casts to unsigned char.
1007
1008 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1009
1010 PR gdb/23374
1011 PR gdb/23375
1012 * server.h (struct client_state) <disable_randomization>:
1013 Initialize to 1.
1014
1015 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1016
1017 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1018 variable.
1019 (mips_supply_ptrace_register): Likewise.
1020
1021 2018-07-22 Tom Tromey <tom@tromey.com>
1022
1023 * configure: Rebuild.
1024
1025 2018-07-22 Tom Tromey <tom@tromey.com>
1026
1027 * win32-low.c (win32_create_inferior): Remove unused variables.
1028 * gdbreplay.c (remote_open): Remove unused variable.
1029 * remote-utils.c (remote_prepare): Remove unused variable.
1030 * x86-tdesc.h (X86_TDESC_H): Define.
1031 (amd64_expedite_regs): Define conditionally.
1032 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1033 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1034 * remote-utils.c (readchar): Remove unused variable.
1035
1036 2018-07-13 Pedro Alves <palves@redhat.com>
1037
1038 * linux-low.c (linux_kill): Change parameter to process_info
1039 pointer instead of pid. Adjust.
1040 * lynx-low.c (lynx_kill): Likewise.
1041 * nto-low.c (nto_kill): Likewise.
1042 * spu-low.c (spu_kill): Likewise.
1043 * win32-low.c (win32_kill): Likewise.
1044 * server.c (handle_v_kill, kill_inferior_callback)
1045 (detach_or_kill_for_exit): Adjust.
1046 * target.c (kill_inferior): Change parameter to process_info
1047 pointer instead of pid. Adjust.
1048 * target.h (struct target_ops) <kill>: Change parameter to
1049 process_info pointer instead of pid. Adjust all implementations
1050 and callers.
1051 (kill_inferior): Likewise.
1052
1053 2018-07-13 Pedro Alves <palves@redhat.com>
1054
1055 * linux-low.c (linux_detach, linux_join): Change parameter to
1056 process_info pointer instead of pid. Adjust.
1057 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1058 * nto-low.c (nto_detach): Likewise.
1059 * spu-low.c (spu_detach, spu_join): Likewise.
1060 * win32-low.c (win32_detach, win32_join): Likewise.
1061 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1062 * target.h (struct target_ops) <detach, join>: Change parameter to
1063 process_info pointer instead of pid. Adjust all implementations
1064 and callers.
1065 (detach_inferior, join_inferior): Rename 'pid' parameter to
1066 'proc'.
1067
1068 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1069 Jan Kratochvil <jan.kratochvil@redhat.com>
1070 Paul Fertser <fercerpav@gmail.com>
1071 Tsutomu Seki <sekiriki@gmail.com>
1072
1073 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1074 (OBS): Add 'common/netstuff.o'.
1075 (GDBREPLAY_OBS): Likewise.
1076 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1077 (remote_open): Implement support for IPv6
1078 connections.
1079 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1080 and 'wspiapi.h'.
1081 (handle_accept_event): Accept connections from IPv6 sources.
1082 (remote_prepare): Handle IPv6-style hostnames; implement
1083 support for IPv6 connections.
1084 (remote_open): Implement support for printing connections from
1085 IPv6 sources.
1086
1087 2018-07-11 Pedro Alves <palves@redhat.com>
1088
1089 PR gdb/23377
1090 * mem-break.c (any_persistent_commands): Add process_info
1091 parameter and use it instead of relying on the current process.
1092 Change return type to bool.
1093 * mem-break.h (any_persistent_commands): Add process_info
1094 parameter and change return type to bool.
1095 * server.c (handle_detach): Remove require_running_or_return call.
1096 Look up the process_info for the process we're about to detach.
1097 If not found, return back error to GDB. Adjust
1098 any_persistent_commands call to pass down a process pointer.
1099
1100 2018-07-11 Pedro Alves <palves@redhat.com>
1101
1102 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1103 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1104 instead of collect_register_by_name.
1105 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1106 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1107
1108 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1109 Pedro Alves <palves@redhat.com>
1110
1111 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1112
1113 2018-07-03 Tom Tromey <tom@tromey.com>
1114
1115 * linux-low.c: Update.
1116 * lynx-low.c: Update.
1117 * mem-break.c: Update.
1118 * nto-low.c: Update.
1119 * remote-utils.c: Update.
1120 * server.c: Update.
1121 * spu-low.c: Update.
1122 * target.c: Update.
1123 * win32-low.c: Update.
1124
1125 2018-07-03 Tom Tromey <tom@tromey.com>
1126
1127 * server.c: Update.
1128
1129 2018-07-03 Tom Tromey <tom@tromey.com>
1130
1131 * linux-low.c: Update.
1132
1133 2018-07-03 Tom Tromey <tom@tromey.com>
1134
1135 * target.c: Update.
1136
1137 2018-07-03 Tom Tromey <tom@tromey.com>
1138
1139 * linux-low.c: Update.
1140 * linux-mips-low.c: Update.
1141 * lynx-low.c: Update.
1142 * nto-low.c: Update.
1143 * remote-utils.c: Update.
1144 * server.c: Update.
1145 * spu-low.c: Update.
1146 * target.c: Update.
1147 * thread-db.c: Update.
1148
1149 2018-07-03 Tom Tromey <tom@tromey.com>
1150
1151 * linux-low.c: Update.
1152 * linux-mips-low.c: Update.
1153 * lynx-low.c: Update.
1154 * mem-break.c: Update.
1155 * nto-low.c: Update.
1156 * remote-utils.c: Update.
1157 * server.c: Update.
1158 * spu-low.c: Update.
1159 * target.c: Update.
1160 * tracepoint.c: Update.
1161
1162 2018-07-03 Tom Tromey <tom@tromey.com>
1163
1164 * linux-low.c: Update.
1165 * linux-ppc-low.c: Update.
1166 * linux-x86-low.c: Update.
1167 * proc-service.c: Update.
1168 * server.c: Update.
1169 * spu-low.c: Update.
1170 * thread-db.c: Update.
1171 * win32-low.c: Update.
1172
1173 2018-07-03 Tom Tromey <tom@tromey.com>
1174
1175 * linux-low.c: Update.
1176 * lynx-low.c: Update.
1177 * nto-low.c: Update.
1178 * remote-utils.c: Update.
1179 * spu-low.c: Update.
1180 * thread-db.c: Update.
1181 * win32-low.c: Update.
1182
1183 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1184
1185 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1186 parameter in call to 'amd64_create_target_description'.
1187
1188 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1189
1190 * x86-tdesc.h: Remove executable permission flag.
1191
1192 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1193
1194 * configure.ac: Remove AC_PREREQ, add missing quoting.
1195 * configure: Re-generate.
1196 * config.in: Re-generate.
1197 * aclocal.m4: Re-generate.
1198
1199 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1200
1201 * tracepoint.h (current_traceframe): Remove declaration.
1202
1203 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1204
1205 * linux-aarch64-low.c (is_sve_tdesc): New function.
1206 (aarch64_sve_regs_copy_to_regcache): Likewise.
1207 (aarch64_sve_regs_copy_from_regcache): Likewise.
1208 (aarch64_regs_info): Add SVE checks.
1209 (initialize_low_arch): Initialize SVE.
1210
1211 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1212
1213 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1214
1215 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1216
1217 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1218 (initialize_low_tracepoint): Likewise
1219 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1220 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1221 param.
1222 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1223 checks.
1224 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1225
1226 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1227
1228 * server.h (PBUFSIZ): Increase size
1229
1230 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1231
1232 * regcache.c (regcache::raw_compare): New function.
1233 * regcache.h (regcache::raw_compare): New declaration.
1234
1235 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1236
1237 * regcache.c (new_register_cache): Use new.
1238 (free_register_cache): Use delete.
1239 (register_data): Use const.
1240 (supply_register): Move body inside regcache.
1241 (regcache::raw_supply): New override function.
1242 (collect_register): Move body inside regcache.
1243 (regcache::raw_collect): New override function.
1244 (regcache::get_register_status): New override function.
1245 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1246
1247 2018-06-09 Tom Tromey <tom@tromey.com>
1248
1249 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1250 declare queue.
1251 (event_queue): Use std::queue.
1252 (gdb_event_xfree): Remove.
1253 (initialize_event_loop, process_event, wait_for_event): Update.
1254
1255 2018-06-08 Stan Cox <scox@redhat.com>
1256
1257 * win32-low.c (win32_create_inferior): last_ptid and last_status
1258 moved to client_state.
1259
1260 2018-06-08 Pedro Alves <palves@redhat.com>
1261
1262 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1263 common/common-exceptions.o, common/common-utils.o,
1264 common/errors.o, common/print-utils.o and utils.o.
1265 * gdbreplay.c: Include "common-defs.h" instead of the two
1266 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1267 string.h or alloca.h.
1268 (perror_with_name): Delete.
1269 (remote_open): Use xstrdup instead of strdup.
1270 (main): Rename to ...
1271 (captured_main): ... this.
1272 (main): New.
1273
1274 2018-06-08 Tom Tromey <tom@tromey.com>
1275
1276 * linux-low.c (linux_low_read_btrace): Update.
1277
1278 2018-06-04 Stan Cox <scox@redhat.com>
1279
1280 * server.h (struct client_state): New.
1281 * server.c (cont_thread, general_thread, multi_process)
1282 (report_fork_events, report_vfork_events, report_exec_events)
1283 (report_thread_events, swbreak_feature, hwbreak_feature)
1284 (vCont_supported, disable_randomization, pass_signals)
1285 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1286 Moved to client_state.
1287 * remote-utils.c (remote_debug, noack_mode)
1288 (transport_is_reliable): Moved to client_state.
1289 * tracepoint.c (current_traceframe): Moved to client_state.
1290
1291 Update all callers.
1292 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1293 linux-low.c, remote-utils.h, target.c: Use client_state.
1294
1295 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1296
1297 * configure.srv: Add new c/h file.
1298
1299 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1300
1301 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1302 null VQ.
1303
1304 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1305
1306 * gdb.arch/mips-fpregset-core.exp: New test.
1307 * gdb.arch/mips-fpregset-core.c: New test source.
1308
1309 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1310
1311 PR server/23198
1312 * hostio.c (require_int): Do not report overflow for integers
1313 between 0xfffffff and 0x7fffffff.
1314
1315 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1316
1317 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1318 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1319 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1320 functions.
1321 (the_low_target): Wire them.
1322
1323 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1324
1325 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1326 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1327 mode. Call collect_register_by_name with vscr using
1328 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1329 (ppc_store_vrregset): Add and set vscr_offset variable as in
1330 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1331 vscr_offset.
1332
1333 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1334
1335 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1336 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1337 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1338
1339 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1340
1341 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1342 (ppc_store_vsxregset): Likewise.
1343 (ppc_fill_vrregset): Likewise.
1344 (ppc_store_vrregset): Likewise.
1345 (ppc_fill_evrregset): Likewise.
1346 (ppc_store_evrregset): Likewise.
1347 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1348 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1349 needed.
1350
1351 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1352
1353 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1354 wordsize of the inferior. Call ppc_linux_target_wordsize.
1355
1356 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1357
1358 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1359 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1360 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1361 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1362 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1363 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1364 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1365 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1366 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1367 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1368 (tdesc_powerpc_e500l): Remove.
1369 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1370 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1371 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1372 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1373 linux-ppc-tdesc.h.
1374 (ppc_arch_setup): Remove target description matching code. Fill a
1375 ppc_linux_features struct and call ppc_linux_match_description
1376 with it.
1377
1378 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1379
1380 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1381 width of the requested register exceeds the width of the
1382 `ptrace' data type.
1383 (mips_cannot_store_register): Likewise.
1384
1385 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1386
1387 * linux-mips-low.c (mips_fetch_register): New function. Update
1388 preceding comment.
1389 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1390 (the_low_target): Wire `mips_fetch_register'.
1391
1392 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1393
1394 * lynx-i386-low.c (LYNXOS_178): New macro.
1395 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1396 the layout on LynxOS-178.
1397 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1398 handle floating point registers that are not supported by
1399 LynxOS-178.
1400
1401 2018-05-10 Tom Tromey <tom@tromey.com>
1402
1403 * configure: Rebuild.
1404
1405 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1406
1407 PR server/23158:
1408 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1409 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1410 Use it to set the expedite_regs field in the given tdesc.
1411 * x86-tdesc.h: New file.
1412 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1413 Adjust following the addition of the new expedite_regs parameter
1414 to init_target_desc.
1415 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1416 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1417 (i386_linux_read_description, amd64_linux_read_description):
1418 Adjust following the addition of the new expedite_regs parameter
1419 to init_target_desc.
1420 * lynx-i386-low.c: #include "x86-tdesc.h".
1421 (lynx_i386_arch_setup): Adjust following the addition of the new
1422 expedite_regs parameter to init_target_desc.
1423 * nto-x86-low.c: #include "x86-tdesc.h".
1424 (nto_x86_arch_setup): Adjust following the addition of the new
1425 expedite_regs parameter to init_target_desc.
1426 * win32-i386-low.c: #include "x86-tdesc.h".
1427 (i386_arch_setup): Adjust following the addition of the new
1428 expedite_regs parameter to init_target_desc.
1429
1430 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1431
1432 PR server/23158:
1433 * win32-low.c (win32_create_inferior): Add call to my_wait
1434 setting last_status global.
1435
1436 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1437
1438 PR server/23158:
1439 * win32-low.c (create_process): Only call gdb_tilde_expand if
1440 inferior_cwd is not NULL.
1441
1442 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1443
1444 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1445 registers to the cache if their values have changed.
1446 (i387_xsave_to_cache): Provide default values for x87 control
1447 registers when these features are available, but disabled.
1448 * regcache.c (supply_register_by_name_zeroed): New function.
1449 * regcache.h (supply_register_by_name_zeroed): Declare new
1450 function.
1451
1452 2018-05-07 Tom Tromey <tom@tromey.com>
1453
1454 * configure: Rebuild.
1455
1456 2018-05-04 Tom Tromey <tom@tromey.com>
1457
1458 * configure: Rebuild.
1459
1460 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1461 Pedro Alves <palves@redhat.com>
1462
1463 * linux-aarch64-low.c (aarch64_stopped_data_address):
1464 Likewise.
1465
1466 2018-04-27 Tom Tromey <tom@tromey.com>
1467
1468 * configure: Rebuild.
1469
1470 2018-04-23 Tom Tromey <tom@tromey.com>
1471
1472 * configure: Rebuild.
1473
1474 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1475
1476 * Makefile.in (depcomp): Add "..".
1477 (all_deps_files): New and use it.
1478
1479 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1480
1481 * configure.srv (aarch64*-*-linux*): Don't include xml.
1482 (i[34567]86-*-cygwin*): Likewise.
1483 (i[34567]86-*-linux*): Likewise.
1484 (i[34567]86-*-lynxos*): Likewise.
1485 (i[34567]86-*-mingw32ce*): Likewise.
1486 (i[34567]86-*-mingw*): Likewise.
1487 (i[34567]86-*-nto*): Likewise.
1488 (tic6x-*-uclinux): Likewise.
1489 (x86_64-*-linux*): Likewise.
1490 (x86_64-*-mingw*): Likewise.
1491 (x86_64-*-cygwin*): Likewise.
1492
1493 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1494
1495 * tdesc.c: Remove xml parameter.
1496
1497 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1498
1499 * server.c (get_features_xml): Remove cast.
1500 * tdesc.c (void target_desc::accept): Fill in function.
1501 (tdesc_get_features_xml): Remove old xml creation.
1502 (print_xml_feature::visit_pre): Add xml vistor.
1503 * tdesc.h (struct target_desc): Make xmltarget mutable.
1504 (tdesc_get_features_xml): Remove declaration.
1505
1506 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1507
1508 * tdesc.c (tdesc_architecture_name): Add new function.
1509 (tdesc_osabi_name): Likewise.
1510 (tdesc_get_features_xml): Use new functions.
1511
1512 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1513
1514 * tdesc.c (tdesc_create_flags): Remove.
1515 (tdesc_add_flag): Likewise.
1516 (tdesc_named_type): Likewise.
1517 (tdesc_create_union): Likewise.
1518 (tdesc_create_struct): Likewise.
1519 (tdesc_create_vector): Likewise.
1520 (tdesc_add_bitfield): Likewise.
1521 (tdesc_add_field): Likewise.
1522 (tdesc_set_struct_size): Likewise.
1523
1524 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1525
1526 * tdesc.c (~target_desc): Remove implictly deleted items.
1527 (init_target_desc): Iterate all features.
1528 (tdesc_get_features_xml): Use vector.
1529 (tdesc_create_feature): Create feature.
1530 * tdesc.h (tdesc_feature) Remove
1531 (target_desc): Add features.
1532
1533 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1534
1535 * Makefile.in: Add common/tdesc.c
1536 * tdesc.c (init_target_desc): init all reg_defs from register
1537 vector.
1538 (tdesc_create_reg): Create tdesc_reg.
1539 * tdesc.h (tdesc_feature): Add register vector.
1540
1541 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1542
1543 * tdesc.h (struct target_desc) <features>: Change type to
1544 std::vector<std::string>.
1545 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1546 changes.
1547 (tdesc_get_features_xml): Likewise.
1548 (tdesc_create_feature): Likewise.
1549
1550 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1551
1552 * regcache.c (find_register_by_number): Return a ref.
1553 (find_regno): Use references.
1554 (register_size): Likewise.
1555 (register_data): Likewise.
1556 * tdesc.c (target_desc::~target_desc): Remove free calls.
1557 (target_desc::operator==): Use std::vector compare.
1558 (init_target_desc): Use reference.
1559 (tdesc_create_reg): Use reg constructors.
1560 * tdesc.h (struct target_desc): Replace pointer with object.
1561
1562 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1563
1564 * regcache.c (find_register_by_number): Make static.
1565 (find_regno): Use find_register_by_number
1566 * regcache.h (struct reg): Remove declaration.
1567
1568 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1569
1570 * tdesc.c (target_desc::~target_desc): Move to here.
1571 (target_desc::operator==): Likewise.
1572 * tdesc.h (target_desc::~target_desc): Move from here.
1573 (target_desc::operator==): Likewise.
1574
1575 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1576
1577 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1578
1579 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1580
1581 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1582 S390_TDESC_GS.
1583 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1584 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1585 and init_registers_s390_gs_linux64.
1586
1587 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1588
1589 * linux-s390-low.c (s390_fill_gs): Remove function.
1590 (s390_fill_gsbc): Remove function.
1591 (s390_regsets): Set fill functions for the guarded storage regsets
1592 to NULL.
1593
1594 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1595
1596 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1597 the word size. Add comment.
1598 (s390_get_wordsize): New function.
1599 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1600 pswm with it. Instead, use s390_get_wordsize to determine the
1601 word size first and derive the correct tdesc from that directly.
1602
1603 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1604
1605 * Makefile.in: Include silent-rules.mk.
1606 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1607 (COMPILE): Add ECHO_CXX.
1608 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1609 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1610 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1611 (version-generated.c): Add ECHO_GEN.
1612 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1613 (IPAGENT_COMPILE): Add ECHO_CXX.
1614 (%-generated.c): Add ECHO_REGDAT.
1615
1616 2018-03-14 Tom Tromey <tom@tromey.com>
1617
1618 PR cli/14977:
1619 * ax.c (ax_printf): Special case for NULL.
1620
1621 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1622
1623 * linux-low.c (linux_qxfer_libraries_svr4): Use
1624 xml_escape_text_append.
1625
1626 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1627
1628 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1629
1630 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1631
1632 * server.c (handle_general_set): Remove unnecessary xstrdup.
1633
1634 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1635
1636 * server.c (parse_debug_format_options): Adjust to
1637 delim_string_to_char_ptr_vec changes.
1638 * thread-db.c (thread_db_load_search): Adjust to
1639 dirnames_to_char_ptr_vec changes.
1640
1641 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1642
1643 * target.h (target_enable_btrace, target_disable_btrace)
1644 (target_read_btrace, target_read_btrace_conf): Turn macro into
1645 inline function. Throw error if target method is not defined.
1646 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1647 check for btrace target method. Be prepared to handle exceptions
1648 from btrace target methods.
1649
1650 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1651
1652 * server.c (captured_main): Change order of error message printed
1653 when the current working directory cannot be found.
1654
1655 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1656
1657 * server.c: Include "filenames.h" and "pathstuff.h".
1658 (program_name): Delete variable.
1659 (program_path): New anonymous class.
1660 (get_exec_wrapper): Use "program_path" instead of
1661 "program_name".
1662 (handle_v_run): Likewise.
1663 (captured_main): Likewise.
1664 (process_serial_event): Likewise.
1665
1666 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1667
1668 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1669 (OBJS): Add "pathstuff.o".
1670 * server.c (current_directory): New global variable.
1671 (captured_main): Initialize "current_directory".
1672
1673 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1674
1675 * tdesc.c: Use common/tdesc.h.
1676 * tdesc.h: Likewise.
1677
1678 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1679 Simon Marchi <simon.marchi@ericsson.com>
1680
1681 * Makefile.in: Switch order of make rules.
1682
1683 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1684
1685 * Makefile.in: Add common directory in build.
1686 * configure.ac: Add common reference.
1687 * configure: Regenerate.
1688
1689 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1690
1691 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1692 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1693 * spu-low.c (spu_target_ops): Likewise.
1694 * win32-low.c (win32_target_ops): Likewise.
1695 * server.c (supported_btrace_packets): Report packets unconditionally.
1696 * target.h (target_ops) <supports_btrace>: Remove.
1697 (target_supports_btrace): Remove.
1698
1699 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1700
1701 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1702 (handle_btrace_disable): Change return type to void. Use exceptions
1703 to report errors.
1704 (handle_btrace_general_set): Catch exception and copy message to
1705 return message.
1706
1707 2018-02-08 Tom Tromey <tom@tromey.com>
1708
1709 * linux-low.c (install_software_single_step_breakpoints): Use
1710 make_scoped_restore.
1711 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1712 (do_restore_current_thread_cleanup): Remove.
1713 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1714 declare.
1715
1716 2018-02-08 Tom Tromey <tom@tromey.com>
1717
1718 * mem-break.c (set_raw_breakpoint_at): Use
1719 gdb::unique_xmalloc_ptr.
1720
1721 2018-01-30 Pedro Alves <palves@redhat.com>
1722
1723 PR gdb/13211
1724 * target.c (target_terminal::terminal_state): Rename to ...
1725 (target_terminal::m_terminal_state): ... this.
1726
1727 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1728
1729 * linux-low.c (handle_extended_wait): Surround call to
1730 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1731
1732 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1733
1734 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1735 linux_ptrace_attach_fail_reason_string now returning an
1736 std::string.
1737 (linux_attach): Likewise.
1738 * thread-db.c (attach_thread): Likewise.
1739
1740 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1741
1742 PR gdb/21559
1743 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1744 checking for fs_base/gs_base fields in struct user_regs_struct.
1745 * configure: Regenerate.
1746
1747 2018-01-16 Yao Qi <yao.qi@linaro.org>
1748
1749 PR gdb/18749
1750 * linux-low.c (fetch_register): Call supply_register instead of
1751 error.
1752
1753 2018-01-08 Yao Qi <yao.qi@linaro.org>
1754 Simon Marchi <simon.marchi@ericsson.com>
1755
1756 * Makefile.in (OBS): Remove selftest.o.
1757 * configure.ac: Set srv_selftest_objs if $development is true.
1758 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1759 * configure: Re-generated.
1760 * server.c (captured_main): Wrap variable selftest_filter with
1761 GDB_SELF_TEST.
1762
1763 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1764
1765 * server.c (parse_debug_format_options): Return std::string.
1766 (handle_monitor_command, captured_main): Adjust.
1767
1768 2018-01-05 Pedro Alves <palves@redhat.com>
1769
1770 PR gdb/18653
1771 * server.c (captured_main): Pass quiet=false to
1772 save_original_signals_state.
1773
1774 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1775
1776 * gdbreplay.c (gdbreplay_version): Update copyright year in
1777 version message.
1778 * server.c (gdbserver_version): Likewise.
1779
1780 2017-12-08 Tom Tromey <tom@tromey.com>
1781
1782 * ax.c (ax_printf): Update.
1783
1784 2017-12-07 Yao Qi <yao.qi@linaro.org>
1785
1786 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1787 aarch64_linux_read_description.
1788 * linux-amd64-ipa.c (idx2mask): New array.
1789 (get_ipa_tdesc): Move idx2mask out.
1790 (initialize_low_tracepoint): Initialize target descriptions.
1791 * linux-i386-ipa.c (idx2mask): New array.
1792 (get_ipa_tdesc): Move idx2mask out.
1793 (initialize_low_tracepoint): Initialize target descriptions.
1794
1795 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1796
1797 * tdesc.c (struct tdesc_type): Change return type.
1798 (tdesc_add_flag): Change parameter type.
1799 (tdesc_add_bitfield): Likewise.
1800 (tdesc_add_field): Likewise.
1801 (tdesc_set_struct_size): Likewise.
1802
1803 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1804
1805 * regcache.c (registers_to_string): Remove unused variable.
1806
1807 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1808
1809 * inferiors.c (for_each_inferior_with_data): Remove.
1810 * inferiors.h (for_each_inferior_with_data): Remove.
1811 * server.c (handle_qxfer_threads_worker): Change parameter type.
1812 (handle_qxfer_threads_proper): Use for_each_thread.
1813
1814 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1815
1816 * inferiors.c (for_each_inferior): Remove.
1817 (clear_inferiors): Use for_each_thread.
1818 * inferiors.h (for_each_inferior): Remove.
1819 * linux-low.c (linux_wait_for_event_filtered): Use
1820 for_each_thread.
1821 (linux_stabilize_threads): Likewise.
1822 * regcache.c (regcache_release): Likewise.
1823 * server.c (gdb_wants_all_threads_stopped): Likewise.
1824 (clear_pending_status_callback): Remove.
1825 (handle_status): Use for_each_thread.
1826 (captured_main): Likewise.
1827 * win32-low.c (child_init_thread_list): Likewise.
1828 (win32_clear_inferiors): Likewise.
1829 (fake_breakpoint_event): Likewise.
1830
1831 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1832
1833 * inferiors.h (find_inferior): Remove.
1834 * inferiors.c (find_inferior): Remove.
1835
1836 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1837
1838 * linux-low.c (resume_status_pending_p): Update comment.
1839 (need_step_over_p): Update comment.
1840
1841 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1842
1843 * linux-low.c (proceed_one_lwp): Return void, change parameter
1844 type.
1845 (unsuspend_and_proceed_one_lwp): Likewise.
1846 (proceed_all_lwps): Use for_each_thread.
1847 (unstop_all_lwps): Likewise.
1848
1849 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1850
1851 * linux-low.c (linux_resume_one_thread): Return void, take
1852 parameter directly.
1853 (linux_resume): Use for_each_thread.
1854
1855 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1856
1857 * linux-low.c (send_sigstop_callback): Return void, change
1858 parameter type. Rename to...
1859 (send_sigstop): ... this.
1860 (suspend_and_send_sigstop_callback): Return void, change parameter
1861 type. Rename to...
1862 (suspend_and_send_sigstop): ... this.
1863 (stop_all_lwps): Use for_each_thread.
1864
1865 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1866
1867 * linux-low.c (lwp_running): Return bool, remove unused
1868 argument.
1869 (linux_stabilize_threads): Use find_thread.
1870
1871 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1872
1873 * linux-low.c (select_singlestep_lwp_callback): Remove.
1874 (count_events_callback): Remove.
1875 (select_event_lwp_callback): Remove.
1876 (select_event_lwp): Use find_thread/for_each_thread.
1877
1878 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1879
1880 * linux-low.c (not_stopped_callback): Return bool, take filter
1881 argument directly.
1882 (linux_wait_for_event_filtered): Use find_thread.
1883 (linux_wait_1): Likewise.
1884
1885 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1886
1887 * linux-low.c (same_lwp): Remove.
1888 (find_lwp_pid): Use find_thread.
1889
1890 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1891
1892 * linux-low.c (delete_lwp_callback): Remove.
1893 (linux_mourn): Use for_each_thread.
1894
1895 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1896
1897 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1898 args parameter, don't check for pid.
1899 (linux_detach): Use for_each_thread.
1900
1901 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1902
1903 * linux-low.c (struct counter): Remove.
1904 (second_thread_of_pid_p): Remove.
1905 (last_thread_of_process_p): Use find_thread.
1906
1907 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1908
1909 * inferiors.c (find_inferior_in_random): Remove.
1910 * inferiors.h (find_inferior_in_random): Remove.
1911 * linux-low.c (status_pending_p_callback): Return bool, accept
1912 parameter ptid directly.
1913 (linux_wait_for_event_filtered): Use find_thread_in_random.
1914 (linux_wait_1): Likewise.
1915
1916 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1917
1918 * inferiors.c (find_inferior_id): Remove.
1919 (find_thread_ptid): Move implemention from find_inferior_id to
1920 here.
1921 * inferiors.h (find_inferior_id): Remove.
1922 * server.c (handle_status): Use find_thread_ptid.
1923 (process_serial_event): Likewise.
1924 * thread-db.c (find_one_thread): Likewise.
1925 (thread_db_thread_handle): Likewise.
1926 * win32-low.c (thread_rec): Likewise.
1927 (child_delete_thread): Likewise.
1928 (win32_thread_alive): Likewise.
1929 (get_child_debug_event): Likewise.
1930
1931 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1932
1933 * linux-mips-low.c (update_watch_registers_callback): Return
1934 void, remove pid_p parameter, don't check for pid.
1935 (mips_insert_point, mips_remove_point): Use for_each_thread.
1936
1937 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1938
1939 * lynx.low (lynx_delete_thread_callback): Remove.
1940 (lynx_mourn): Use for_each_thread.
1941
1942 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1943
1944 * regcache.c (regcache_invalidate_one): Remove.
1945 (regcache_invalidate_pid): use for_each_thread.
1946
1947 2017-11-26 Tom Tromey <tom@tromey.com>
1948
1949 * linux-low.c (linux_create_inferior): Update.
1950
1951 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1952
1953 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1954
1955 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1956
1957 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1958 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1959 * linux-aarch64-tdesc-selftest.c: New file.
1960 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1961
1962 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1963
1964 * configure.srv: Add new file.
1965 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1966 * linux-aarch64-tdesc-selftest.c: New file.
1967 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1968
1969 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1970
1971 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1972 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1973 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1974
1975 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1976
1977 * configure.srv: Add new files.
1978 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1979 aarch64_linux_read_description.
1980 * linux-aarch64-low.c (aarch64_linux_read_description):
1981 Merge with aarch64_arch_setup.
1982 (aarch64_arch_setup): Call aarch64_linux_read_description.
1983 * linux-aarch64-tdesc.c: New file.
1984 * linux-aarch64-tdesc.h: New file.
1985
1986 2017-11-24 Yao Qi <yao.qi@linaro.org>
1987
1988 * configure.srv: Set $srv_regobj for tic6x-linux.
1989 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1990 (tic6x_read_description): Move some code to tic6x_arch_setup.
1991 (tic6x_tdesc_test): New function.
1992 (initialize_low_arch): Call selftests::register_test.
1993
1994 2017-11-22 Yao Qi <yao.qi@linaro.org>
1995
1996 * remote-utils.c (prepare_resume_reply): Use memcpy.
1997
1998 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1999
2000 * linux-low.c (kill_one_lwp_callback): Return void, take
2001 argument directly, don't filter on pid.
2002 (linux_kill): Use for_each_thread.
2003
2004 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2005
2006 * linux-low.c (need_step_over_p): Return bool, remove dummy
2007 argument.
2008 (linux_resume, proceed_all_lwps): Use find_thread.
2009
2010 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2011
2012 * linux-low.c (resume_status_pending_p): Return bool, remove
2013 flag_p argument.
2014 (linux_resume): Use find_thread.
2015
2016 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2017
2018 * linux-low.c (struct thread_resume_array): Remove.
2019 (linux_set_resume_request): Return void, take arguments
2020 directly.
2021 (linux_resume): Use for_each_thread.
2022
2023 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2024
2025 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2026 return bool, remove data argument.
2027 (linux_stabilize_threads): Use find_thread.
2028
2029 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2030
2031 * linux-low.c (unsuspend_one_lwp): Remove.
2032 (unsuspend_all_lwps): Use for_each_thread, inline code from
2033 unsuspend_one_lwp.
2034
2035 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2036
2037 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2038 * linux-low.c (struct iterate_over_lwps_args): Remove.
2039 (iterate_over_lwps_filter): Remove.
2040 (iterate_over_lwps): Use find_thread.
2041
2042 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2043
2044 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2045 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2046 code from reset_lwp_ptrace_options_callback.
2047
2048 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2049
2050 * linux-arm-low.c (struct update_registers_data): Remove.
2051 (update_registers_callback): Return void, take arguments
2052 directly, don't check thread's pid.
2053 (arm_insert_point, arm_remove_point): Use for_each_thread.
2054
2055 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2056
2057 * win32-low.c (continue_one_thread): Return void, take argument
2058 directly.
2059 (child_continue): Use for_each_thread.
2060
2061 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2062
2063 * win32-i386-low.c (update_debug_registers_callback): Rename
2064 to ...
2065 (update_debug_registers): ... this, return void, remove pid_p arg.
2066 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2067
2068 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2069
2070 * inferiors.h (struct process_info): Add constructor, initialize
2071 fields..
2072 <syscalls_to_catch>: Change type to std::vector<int>.
2073 * inferiors.c (add_process): Allocate process_info with new.
2074 (remove_process): Free process_info with delete.
2075 * linux-low.c (handle_extended_wait): Adjust.
2076 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2077 * server.c (handle_general_set): Adjust.
2078
2079 2017-11-16 Pedro Alves <palves@redhat.com>
2080
2081 * remote-utils.c (remote_close): Block SIGIO signals instead of
2082 uninstalling the SIGIO handler.
2083
2084 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2085
2086 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2087
2088 2017-11-16 Yao Qi <yao.qi@linaro.org>
2089
2090 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2091 (tic6x_store_gregset): Likewise.
2092 (tic6x_usrregs_info): Move it up.
2093
2094 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2095
2096 * Makefile.in: Update arch rules.
2097 * configure.srv: Explicitly mark arch/ files.
2098
2099 2017-11-13 Andreas Schwab <schwab@suse.de>
2100
2101 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2102 function.
2103 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2104
2105 2017-11-06 Pedro Alves <palves@redhat.com>
2106
2107 * config.in, configure: Regenerate.
2108
2109 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2110
2111 * target.c (struct thread_search): Remove.
2112 (thread_search_callback): Remove.
2113 (prepare_to_access_memory): Use for_each_thread instead of
2114 find_inferior. Inline code from thread_search_callback.
2115
2116 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2117
2118 * server.c (struct visit_actioned_threads_data): Remove.
2119 (visit_actioned_threads): Change prototype to take arguments
2120 directly.
2121 (resume): Use find_thread instead of find_inferior.
2122
2123 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2124
2125 * server.c (queue_stop_reply_callback): Change prototype, return
2126 void.
2127 (find_status_pending_thread_callback): Remove.
2128 (handle_status): Replace find_inferior with find_thread and
2129 for_each_thread.
2130
2131 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2132
2133 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2134 with REGNO.
2135 (aarch64_store_gregset): Likewise.
2136 (aarch64_fill_fpregset): Likewise.
2137 (aarch64_store_fpregset): Likewise.
2138
2139 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2140
2141 * gdbthread.h (find_thread, for_each_thread): New functions.
2142 * inferiors.c (thread_of_pid): Remove.
2143 (find_any_thread_of_pid): Use find_thread.
2144 * linux-low.c (num_lwps): Use for_each_thread.
2145
2146 2017-10-17 Yao Qi <yao.qi@linaro.org>
2147
2148 * Makefile.in: Remove one rule.
2149 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2150
2151 2017-10-17 Yao Qi <yao.qi@linaro.org>
2152
2153 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2154 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2155
2156 2017-10-17 Yao Qi <yao.qi@linaro.org>
2157
2158 * configure.srv: Rename arm.o with arch/arm.o.
2159
2160 2017-10-17 Yao Qi <yao.qi@linaro.org>
2161
2162 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2163 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2164 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2165 (arch-i386.o, arch-amd64.o): Remove rules.
2166 (arch/%.o): New rule.
2167 Update POSTCOMPILE and COMPILE.pre.
2168 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2169 * configure: Re-generated.
2170 * configure.srv: Replace arch-i386.o with arch/i386.o.
2171 Replace arch-amd64.o with arch/amd64.o.
2172
2173 2017-10-16 Yao Qi <yao.qi@linaro.org>
2174
2175 * configure: Regenerated.
2176
2177 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2178
2179 * inferiors.h: (struct inferior_list): Remove.
2180 (struct inferior_list_entry); Remove.
2181 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2182 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2183 get_first_inferior): Remove.
2184 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2185 find_inferior_id, find_inferior_in_random): Change signature.
2186 * inferiors.c (all_threads): Change type to
2187 std::list<thread_info *>.
2188 (get_thread): Remove macro.
2189 (find_inferior, find_inferior_id): Change signature, implement
2190 using find_thread.
2191 (find_inferior_in_random): Change signature, implement using
2192 find_thread_in_random.
2193 (for_each_inferior, for_each_inferior_with_data): Change
2194 signature, implement using for_each_thread.
2195 (add_inferior_to_list, remove_inferior): Remove.
2196 (add_thread, get_first_thread, thread_of_pid,
2197 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2198 (get_first_inferior, one_inferior_p, clear_inferior_list):
2199 Remove.
2200 (clear_inferiors, get_thread_process): Update.
2201 * gdbthread.h: Include <list>.
2202 (struct thread_info) <entry>: Remove field.
2203 <id>: New field.
2204 (all_threads): Change type to std::list<thread_info *>.
2205 (get_first_inferior): Add doc.
2206 (find_thread, for_each_thread, find_thread_in_random): New
2207 functions.
2208 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2209 * linux-arm-low.c (update_registers_callback): Update.
2210 * linux-low.c (second_thread_of_pid_p): Update.
2211 (kill_one_lwp_callback, linux_detach_lwp_callback,
2212 delete_lwp_callback, status_pending_p_callback, same_lwp,
2213 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2214 iterate_over_lwps, not_stopped_callback,
2215 resume_stopped_resumed_lwps, count_events_callback,
2216 select_singlestep_lwp_callback, select_event_lwp_callback,
2217 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2218 suspend_and_send_sigstop_callback, wait_for_sigstop,
2219 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2220 lwp_running, linux_set_resume_request, resume_status_pending_p,
2221 need_step_over_p, start_step_over, linux_resume_one_thread,
2222 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2223 reset_lwp_ptrace_options_callback): Update.
2224 * linux-mips-low.c (update_watch_registers_callback): Update.
2225 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2226 Update.
2227 (free_register_cache_thread_one): Remove.
2228 (regcache_release): Update.
2229 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2230 handle_qxfer_threads_worker): Update.
2231 (handle_query): Update, use list iterator.
2232 (visit_actioned_threads, handle_pending_status,
2233 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2234 clear_pending_status_callback, set_pending_status_callback,
2235 find_status_pending_thread_callback, handle_status,
2236 process_serial_event): Update.
2237 * target.c (thread_search_callback): Update.
2238 * thread-db.c (thread_db_get_tls_address): Update.
2239 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2240 Update.
2241 * win32-i386-low.c (update_debug_registers_callback): Update.
2242 * win32-low.c (delete_thread_info, child_delete_thread,
2243 continue_one_thread, suspend_one_thread,
2244 get_child_debug_event): Adjust.
2245
2246 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2247
2248 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2249 * inferiors.h: Include <list>.
2250 (struct process_info) <entry>: Remove field.
2251 <pid>: New field.
2252 (pid_of): Change macro to function.
2253 (ptid_of, lwpid_of): Remove macro.
2254 (all_processes): Change type to std::list<process_info *>.
2255 (ALL_PROCESSES): Remove macro.
2256 (for_each_process, find_process): New function.
2257 * inferiors.c (all_processes): Change type to
2258 std::list<process_info *>.
2259 (find_thread_process): Adjust.
2260 (add_process): Likewise.
2261 (remove_process): Likewise.
2262 (find_process_pid): Likewise.
2263 (get_first_process): Likewise.
2264 (started_inferior_callback): Remove.
2265 (have_started_inferiors_p): Adjust.
2266 (attached_inferior_callback): Remove.
2267 (have_attached_inferiors_p): Adjust.
2268 * linux-low.c (check_zombie_leaders): Likewise.
2269 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2270 (x86_linux_update_xmltarget): Adjust.
2271 * server.c (handle_query): Likewise.
2272 (gdb_reattached_process): Remove.
2273 (handle_status): Adjust.
2274 (kill_inferior_callback): Likewise.
2275 (detach_or_kill_inferior): Remove.
2276 (print_started_pid): Likewise.
2277 (print_attached_pid): Likewise.
2278 (detach_or_kill_for_exit): Update.
2279 (process_serial_event): Likewise.
2280 * linux-arm-low.c (arm_new_fork): Likewise.
2281
2282 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2283
2284 * dll.h: Include <list>.
2285 (struct dll_info): Add constructor.
2286 <entry>: Remove field.
2287 (all_dlls): Change type to std::list<dll_info>.
2288 * dll.c: Include <algorithm>.
2289 (get_dll): Remove macro.
2290 (all_dlls): Change type to std::list<dll_info *>.
2291 (free_one_dll): Remove.
2292 (match_dll): Likewise.
2293 (loaded_dll): Adjust.
2294 (unloaded_dll): Adjust to all_dlls type change, use
2295 std::find_if. Inline code from match_dll.
2296 (clear_dlls): Adjust to all_dlls type change.
2297 * server.c (emit_dll_description): Remove.
2298 (handle_qxfer_libraries): Adjust to all_dlls type change,
2299 integrate emit_dll_description's functionality.
2300
2301 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2302
2303 * linux-low.h (struct linux_target_ops) <delete_process>: New
2304 field.
2305 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2306 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2307 (struct linux_target_ops): Add delete_process callback.
2308 * linux-arm-low.c (arm_delete_process): New.
2309 (struct linux_target_ops): Add delete_process callback.
2310 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2311 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2312 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2313 * linux-mips-low.c (mips_linux_delete_process): New.
2314 (struct linux_target_ops): Add delete_process callback.
2315 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2316 * linux-s390-low.c (struct linux_target_ops): Likewise.
2317 * linux-sh-low.c (struct linux_target_ops): Likewise.
2318 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2319 * linux-tile-low.c (struct linux_target_ops): Likewise.
2320 * linux-x86-low.c (x86_linux_delete_process): New.
2321 (struct linux_target_ops): Add delete_process callback.
2322 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2323
2324 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2325
2326 * linux-aarch64-low.c (the_low_target): Add thread delete
2327 callback.
2328 * linux-arm-low.c (arm_delete_thread): New function.
2329 (the_low_target): Add thread delete callback.
2330 * linux-bfin-low.c (the_low_target): Likewise.
2331 * linux-crisv32-low.c (the_low_target): Likewise.
2332 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2333 set.
2334 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2335 field.
2336 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2337 * linux-mips-low.c (mips_linux_delete_thread): New function.
2338 (the_low_target): Add thread delete callback.
2339 * linux-ppc-low.c (the_low_target): Likewise.
2340 * linux-s390-low.c (the_low_target): Likewise.
2341 * linux-sh-low.c (the_low_target): Likewise.
2342 * linux-tic6x-low.c (the_low_target): Likewise.
2343 * linux-tile-low.c (the_low_target): Likewise.
2344 * linux-x86-low.c (the_low_target): Likewise.
2345 * linux-xtensa-low.c (the_low_target): Likewise.
2346
2347 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2348
2349 * win32-low.c: Include "common-inferior.h".
2350
2351 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2352
2353 * inferiors.c (set_inferior_cwd): New function.
2354 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2355 (handle_query): Inform that QSetWorkingDir is supported.
2356 * win32-low.c (create_process): Pass the inferior's cwd to
2357 CreateProcess.
2358
2359 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2360
2361 * inferiors.c (current_inferior_cwd): New global variable.
2362 (get_inferior_cwd): New function.
2363 * inferiors.h (struct process_info) <cwd>: New field.
2364
2365 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2366
2367 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2368 (OBS): Add gdb_tilde_expand.o.
2369
2370 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2371
2372 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2373 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2374
2375 2017-09-29 Pedro Alves <palves@redhat.com>
2376
2377 * ax.c (gdb_parse_agent_expr): Constify.
2378 * ax.h (gdb_parse_agent_expr): Constify.
2379 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2380 Constify.
2381 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2382 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2383 * remote-utils.h (read_ptid): Constify.
2384 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2385 (process_point_options, process_serial_event): Constify.
2386 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2387 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2388 (cmd_qtbuffer): Constify.
2389
2390 2017-09-29 Pedro Alves <palves@redhat.com>
2391
2392 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2393 fails.
2394
2395 2017-09-29 Pedro Alves <palves@redhat.com>
2396
2397 * linux-low.c (handle_extended_wait): Pass parent thread instead
2398 of process to thread_db_notice_clone.
2399 * linux-low.h (thread_db_notice_clone): Replace parent process
2400 parameter with parent thread parameter.
2401 * thread-db.c (find_one_thread): Add comment.
2402 (thread_db_notice_clone): Replace parent process parameter with
2403 parent thread parameter. Temporarily switch to the parent thread.
2404
2405 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2406
2407 * gdbthread.h: Include "common-gdbthread.h".
2408 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2409 "if" when validating the ptid.
2410 * remote-utils.c: Include "gdbthread.h".
2411 (prepare_resume_reply): Use "switch_to_thread".
2412 * target.c (done_accessing_memory): Likewise.
2413
2414 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2415
2416 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2417 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2418 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2419 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2420 s390x-gs-linux64-ipa.o to ipa_obj.
2421 * linux-s390-low.c (HWCAP_S390_GS): New define.
2422 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2423 New functions.
2424 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2425 (s390_arch_setup): Check for guarded-storage support and choose
2426 appropriate tdesc.
2427 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2428 init_registers_s390x_gs_linux64.
2429 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2430 enum value.
2431 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2432 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2433
2434 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2435
2436 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2437
2438 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2439
2440 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2441 (thread_db_thread_handle): Declare.
2442 * linux-low.c (linux_target_ops): Initialize thread_handle.
2443 * server.c (handle_qxfer_threads_worker): Add support for
2444 "handle" attribute.
2445 * target.h (struct target_ops): Add new function pointer,
2446 thread_handle.
2447 (target_thread_handle): Define.
2448 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2449 field in lwp.
2450 (thread_db_thread_handle): New function.
2451
2452 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2453
2454 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2455 * linux-low.h (thread_db_notice_clone): Declare.
2456 * thread-db.c (thread_db_notice_clone): New function.
2457
2458 2017-09-21 Pedro Alves <palves@redhat.com>
2459
2460 * server.c (gdb_read_memory, handle_status, process_serial_event)
2461 (handle_serial_event, handle_target_event): Adjust to
2462 set_desired_thread prototype change.
2463 * target.c (set_desired_thread): Remove 'use_general' parameter
2464 and adjust.
2465 * target.h (set_desired_thread): Remove 'use_general' parameter.
2466
2467 2017-09-20 Tom Tromey <tom@tromey.com>
2468
2469 * target.c (target_terminal::terminal_state): Define.
2470 (target_terminal::init): Rename from target_terminal_init.
2471 (target_terminal::inferior): Rename from
2472 target_terminal_inferior.
2473 (target_terminal::ours): Rename from target_terminal_ours.
2474 (target_terminal::ours_for_output, target_terminal::info): New.
2475
2476 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2477
2478 * server.c (accumulate_file_name_length): Remove.
2479 (emit_dll_description): Adjust to std::string change.
2480 (handle_qxfer_libraries): Use std::string to hold document.
2481
2482 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2483
2484 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2485 return type of xml_escape_text.
2486 * server.c (emit_dll_description): Likewise.
2487
2488 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2489
2490 * server.c (captured_main): Accept argument for --selftest.
2491 Update run_tests call.
2492 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2493 when registering selftests.
2494
2495 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2496
2497 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2498 instead of "VEC" for "target_desc.reg_defs".
2499 (regcache_cpy): Likewise.
2500 (registers_to_string): Likewise.
2501 (registers_from_string): Likewise.
2502 (find_regno): Likewise.
2503 (supply_regblock): Likewise.
2504 (regcache_raw_read_unsigned): Likewise.
2505 * tdesc.c (init_target_desc): Likewise.
2506 (tdesc_create_reg): Likewise.
2507 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2508 (struct target_desc) <reg_defs>: Convert to "std::vector".
2509 (target_desc): Do not initialize "reg_defs".
2510 (~target_desc): Update code to use "std::vector" instead of "VEC"
2511 for "target_desc.reg_defs".
2512 (operator==): Likewise.
2513
2514 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2515
2516 * inferiors.h (thread_to_gdb_id): Remove.
2517 * inferiors.c (thread_to_gdb_id): Remove.
2518 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2519 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2520 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2521 Likewise.
2522 * nto-low.c (nto_fetch_registers, nto_store_registers,
2523 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2524
2525 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2526
2527 * inferiors.h (gdb_id_to_thread_id): Remove.
2528 * inferiors.c (gdb_id_to_thread_id): Remove.
2529 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2530 removal. Move pid declaration closer to where it's used.
2531
2532 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2533
2534 * server.c (handle_detach): New function.
2535 (process_serial_event): Move code out, call handle_detach.
2536
2537 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2538
2539 * server.c (require_running): Rename to ...
2540 (require_running_or_return): ... this ...
2541 (require_running_or_break): ... and this.
2542 (handle_query, process_serial_event): Adjust.
2543
2544 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2545
2546 * linux-low.c (linux_set_resume_request): Remove unused
2547 variables.
2548
2549 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2550
2551 * server.c (first_thread_of): Remove.
2552 (process_serial_event): Replace usage of first_thread_of with
2553 find_any_thread_of_pid.
2554 * tracepoint.c (same_process_p): Remove.
2555 (gdb_agent_about_to_close): Replace usage of same_process_p with
2556 find_any_thread_of_pid.
2557 * linux-x86-low.c (same_process_callback): Remove.
2558 (x86_arch_setup_process_callback): Replace usage of
2559 same_process_callback with find_any_thread_of_pid.
2560 * thread-db.c (any_thread_of): Remove.
2561 (switch_to_process): Replace usage of any_thread_of with
2562 find_any_thread_of_pid.
2563 * inferiors.c (thread_pid_matches_callback): Remove.
2564 (find_thread_process): Adjust to use find_any_thread_of_pid.
2565
2566 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2567
2568 * regcache.c (get_thread_regcache): Guard calls to "memset"
2569 with "!VEC_empty".
2570
2571 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2572
2573 * linux-low.c (handle_extended_wait): Use
2574 "allocate_target_description" instead of "XNEW".
2575 * linux-x86-low.c (initialize_low_arch): Likewise.
2576
2577 2017-09-05 Yao Qi <yao.qi@linaro.org>
2578
2579 * configure.srv (srv_i386_regobj): Remove.
2580 (srv_amd64_regobj): Remove.
2581 (srv_regobj): Set it to "" for x86 non-linux targets.
2582 * linux-x86-tdesc.c (i386_linux_read_description):
2583 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2584 (init_registers_i386): Remove the declaration.
2585 (tdesc_i386): Remove the declaration.
2586 (lynx_i386_arch_setup): Call i386_create_target_description.
2587 * nto-x86-low.c: Likewise.
2588 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2589 [!__x86_64__]: include arch/i386.h.
2590 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2591
2592 2017-09-05 Yao Qi <yao.qi@linaro.org>
2593
2594 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2595 i386/amd64-XXX-linux from it.
2596
2597 2017-09-05 Yao Qi <yao.qi@linaro.org>
2598
2599 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2600 false.
2601 (ipa_amd64_linux_regobj): Remove.
2602 (ipa_x32_linux_regobj): Remove.
2603
2604 2017-09-05 Yao Qi <yao.qi@linaro.org>
2605
2606 * Makefile.in (arch-amd64.o): New rule.
2607 * configure.srv: Append arch-amd64.o.
2608 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2609 (get_ipa_tdesc): Call amd64_linux_read_description.
2610 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2611 and init_registers_amd64_XXX.
2612 * linux-x86-low.c (x86_linux_read_description): Call
2613 amd64_linux_read_description.
2614 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2615 (initialize_low_arch): Don't call init_registers_x32_XXX and
2616 init_registers_amd64_XXX.
2617 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2618 and tdesc_amd64_XXX.
2619 [__x86_64__] (amd64_tdesc_test): New function.
2620 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2621 and init_registers_amd64_XXX.
2622 * linux-x86-tdesc.c: Include arch/amd64.h.
2623 (xcr0_to_tdesc_idx): New function.
2624 (i386_linux_read_description): New function.
2625 (amd64_get_ipa_tdesc_idx): New function.
2626 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2627 (amd64_get_ipa_tdesc): Declare.
2628
2629 2017-09-05 Yao Qi <yao.qi@linaro.org>
2630
2631 * configure.srv (srv_i386_linux_xmlfiles): Remove
2632 i386/i386-XXX-linux.xml from it.
2633
2634 2017-09-05 Yao Qi <yao.qi@linaro.org>
2635
2636 * configure.srv: Set srv_i386_linux_regobj empty if $development
2637 is false.
2638 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2639 initialize_low_tdesc.
2640 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2641 with #if initialize_low_tdesc.
2642 * linux-x86-tdesc-selftest.c: New file.
2643 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2644
2645 2017-09-05 Yao Qi <yao.qi@linaro.org>
2646
2647 * Makefile.in (arch-i386.o): New rule.
2648 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2649 (x86_64-*-linux*): Likewise.
2650 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2651 include arch/i386.h.
2652 (i386_linux_read_description): Remove code and call
2653 i386_create_target_description.
2654 * tdesc.c (allocate_target_description): New function.
2655 * tdesc.h (set_tdesc_architecture): Remove declaration.
2656 (set_tdesc_osabi): Likewise.
2657
2658 2017-09-05 Yao Qi <yao.qi@linaro.org>
2659
2660 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2661 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2662 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2663 .xmltarget.
2664 * server.c (get_features_xml): Call tdesc_get_features_xml.
2665 * tdesc.c (set_tdesc_architecture): New function.
2666 (set_tdesc_osabi): New function.
2667 (tdesc_get_features_xml): New function.
2668 (tdesc_create_feature): Add an argument.
2669 * tdesc.h (struct target_desc) <features>: New field.
2670 <arch, osabi>: New field.
2671 (~target_desc): xfree features, arch, and osabi.
2672 (target_desc::oerator==): Don't compare .xmltarget.
2673 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2674 (set_tdesc_osabi): Likewise.
2675 (tdesc_get_features_xml): Likewise.
2676
2677 2017-09-05 Yao Qi <yao.qi@linaro.org>
2678
2679 * linux-x86-tdesc.c: Include selftest.h.
2680 (i386_tdesc_test): New function.
2681 (initialize_low_tdesc): Call selftests::register_test.
2682 * tdesc.h: Include regdef.h.
2683 (target_desc): Override operator == and !=.
2684
2685 2017-09-05 Yao Qi <yao.qi@linaro.org>
2686
2687 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2688 (ipa_obj): Likewise.
2689 * linux-i386-ipa.c: Include common/x86-xstate.h
2690 (get_ipa_tdesc): Call i386_linux_read_description.
2691 (initialize_low_tracepoint): Don't call init_registers_XXX
2692 functions, call initialize_low_tdesc instead.
2693 * linux-x86-low.c (x86_linux_read_description): Call
2694 i386_linux_read_description.
2695 (initialize_low_arch): Don't call init_registers_i386_XXX
2696 functions, call initialize_low_tdesc.
2697 * linux-x86-tdesc.c: New file.
2698 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2699 (i386_get_ipa_tdesc_idx): Declare.
2700 (i386_get_ipa_tdesc): Declare.
2701 (initialize_low_tdesc): Declare.
2702
2703 2017-09-05 Yao Qi <yao.qi@linaro.org>
2704
2705 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2706 instead of 0.
2707
2708 2017-09-05 Yao Qi <yao.qi@linaro.org>
2709
2710 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2711 * regcache.c (get_thread_regcache): Use VEC_length.
2712 (init_register_cache): Likewise.
2713 (regcache_cpy): Likewise.
2714 (registers_to_string): Iterate reg_defs via VEC_iterate.
2715 (find_regno): Likewise.
2716 (find_register_by_number): Use VEC_index.
2717 (register_size): Call find_register_by_number.
2718 (register_data): Call find_register_by_number.
2719 (supply_regblock): Use VEC_length.
2720 (regcache_raw_read_unsigned): Likewise.
2721 * tdesc.c (init_target_desc): Iterate reg_defs via
2722 VEC_iterate.
2723 (default_description): Update initializer.
2724 (copy_target_description): Don't update field num_registers.
2725 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2726 <num_registers>: Remove.
2727
2728 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2729
2730 * Makefile.in (.SECONDARY): Define target.
2731
2732 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2733
2734 * linux-low.c (linux_wait_1): Adjust.
2735 * server.c (queue_stop_reply_callback): Adjust.
2736
2737 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2738
2739 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2740 QEnvironmentUnset and QEnvironmentReset packets.
2741 (handle_query): Inform remote that QEnvironmentHexEncoded,
2742 QEnvironmentUnset and QEnvironmentReset are supported.
2743
2744 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2745
2746 * inferiors.h (inferior_target_data): Rename to ...
2747 (thread_target_data): ... this.
2748 (inferior_regcache_data): Rename to ...
2749 (thread_regcache_data): ... this.
2750 (set_inferior_regcache_data): Rename to ...
2751 (set_thread_regcache_data): ... this.
2752 * inferiors.c (inferior_target_data): Rename to ...
2753 (thread_target_data): ... this.
2754 (inferior_regcache_data): Rename to ...
2755 (thread_regcache_data): ... this.
2756 (set_inferior_regcache_data): Rename to ...
2757 (set_thread_regcache_data): ... this.
2758 (free_one_thread): Update.
2759 * linux-low.h (get_thread_lwp): Update.
2760 * regcache.c (get_thread_regcache): Update.
2761 (regcache_invalidate_thread): Update.
2762 (free_register_cache_thread): Update.
2763 * win32-i386-low.c (update_debug_registers_callback): Update.
2764 (win32_get_current_dr): Update.
2765 * win32-low.c (thread_rec): Update.
2766 (delete_thread_info): Update.
2767 (continue_one_thread): Update.
2768 (suspend_one_thread): Update.
2769
2770 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2771
2772 * inferiors.c (set_inferior_target_data): Remove.
2773 * inferiors.h (set_inferior_target_data): Remove.
2774
2775 2017-08-18 Yao Qi <yao.qi@linaro.org>
2776
2777 * Makefile.in (OBS): Add selftest.o.
2778 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2779 * configure, config.in: Re-generated.
2780 * server.c: Include common/sefltest.h.
2781 (captured_main): Handle option --selftest.
2782
2783 2017-08-09 Yao Qi <yao.qi@linaro.org>
2784
2785 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2786 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2787 i386-avx-mpx.o and i386-mmx.o.
2788 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2789 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2790 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2791 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2792 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2793 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2794 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2795 i386/amd64-avx-mpx.xml.
2796
2797 2017-08-09 Yao Qi <yao.qi@linaro.org>
2798
2799 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2800 and x32-avx-avx512.o.
2801 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2802 i386/x32-avx-avx512.xml.
2803
2804 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2805
2806 * tracepoint.h (enum class fast_tpoint_collect_result): New
2807 enumeration.
2808 (fast_tracepoint_collecting): Change return type to
2809 fast_tpoint_collect_result.
2810 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2811 * linux-low.h: Include tracepoint.h.
2812 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2813 fast_tpoint_collect_result.
2814 * linux-low.c (handle_tracepoints): Adjust.
2815 (linux_fast_tracepoint_collecting): Change return type to
2816 fast_tpoint_collect_result.
2817 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2818 linux_wait_1, stuck_in_jump_pad_callback,
2819 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2820 proceed_one_lwp): Adjust to type change.
2821
2822 2017-07-10 Yao Qi <yao.qi@linaro.org>
2823
2824 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2825
2826 2017-06-29 Yao Qi <yao.qi@linaro.org>
2827
2828 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2829 Remove.
2830 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2831
2832 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2833
2834 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2835
2836 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2837
2838 * linux-low.c (linux_create_inferior): Adjust code to access the
2839 environment information via 'gdb_environ' class.
2840 * lynx-low.c (lynx_create_inferior): Likewise.
2841 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2842 (get_environ): Return a pointer to 'our_environ'.
2843 (captured_main): Initialize 'our_environ'.
2844 * server.h (get_environ): Adjust prototype.
2845 * spu-low.c (spu_create_inferior): Adjust code to access the
2846 environment information via 'gdb_environ' class.
2847
2848 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2849
2850 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2851 usage of "register" keyword.
2852
2853 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2854
2855 * configure: Re-generate.
2856
2857 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2858
2859 * configure: Re-generate.
2860
2861 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2862
2863 * Makefile.in (COMPILE.pre): Add "-x c++".
2864
2865 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2866
2867 * fork-child.c: Conditionally include <signal.h>.
2868
2869 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2870
2871 * server.c (handle_general_set): Handle new packet
2872 "QStartupWithShell".
2873 (handle_query): Add "QStartupWithShell" to the list of supported
2874 packets.
2875 (gdbserver_usage): Add help text explaining the
2876 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2877 options.
2878 (captured_main): Recognize and act upon the presence of the new
2879 CLI options.
2880
2881 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2882 Pedro Alves <palves@redhat.com>
2883
2884 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2885 * configure: Regenerate.
2886 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2887 "fork-inferior.o".
2888 (i[34567]86-*-lynxos*): Likewise.
2889 (spu*-*-*): Likewise.
2890 * fork-child.c: New file.
2891 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2892 and "environ.h".
2893 (linux_ptrace_fun): New function.
2894 (linux_create_inferior): Adjust function prototype to reflect
2895 change on "target.h". Adjust function code to use
2896 "fork_inferior".
2897 (linux_request_interrupt): Delete "signal_pid".
2898 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2899 (lynx_ptrace_fun): New function.
2900 (lynx_create_inferior): Adjust function prototype to reflect
2901 change on "target.h". Adjust function code to use
2902 "fork_inferior".
2903 * nto-low.c (nto_create_inferior): Adjust function prototype and
2904 code to reflect change on "target.h". Update comments.
2905 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2906 "common-terminal.h" and "environ.h".
2907 (terminal_fd): Moved to fork-child.c.
2908 (old_foreground_pgrp): Likewise.
2909 (restore_old_foreground_pgrp): Likewise.
2910 (last_status): Make it global.
2911 (last_ptid): Likewise.
2912 (our_environ): New variable.
2913 (startup_with_shell): Likewise.
2914 (program_name): Likewise.
2915 (program_argv): Rename to...
2916 (program_args): ...this.
2917 (wrapper_argv): New variable.
2918 (start_inferior): Delete function.
2919 (get_exec_wrapper): New function.
2920 (get_exec_file): Likewise.
2921 (get_environ): Likewise.
2922 (prefork_hook): Likewise.
2923 (post_fork_inferior): Likewise.
2924 (postfork_hook): Likewise.
2925 (postfork_child_hook): Likewise.
2926 (handle_v_run): Update code to deal with arguments coming from the
2927 remote host. Update calls from "start_inferior" to
2928 "create_inferior".
2929 (captured_main): Likewise. Initialize environment variable. Call
2930 "have_job_control".
2931 * server.h (post_fork_inferior): New prototype.
2932 (get_environ): Likewise.
2933 (last_status): Declare.
2934 (last_ptid): Likewise.
2935 (signal_pid): Likewise.
2936 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2937 (spu_ptrace_fun): New function.
2938 (spu_create_inferior): Adjust function prototype to reflect change
2939 on "target.h". Adjust function code to use "fork_inferior".
2940 * target.c (target_terminal_init): New function.
2941 (target_terminal_inferior): Likewise.
2942 (target_terminal_ours): Likewise.
2943 * target.h: Include <vector>.
2944 (struct target_ops) <create_inferior>: Update prototype.
2945 (create_inferior): Update macro.
2946 * utils.c (gdb_flush_out_err): New function.
2947 * win32-low.c (win32_create_inferior): Adjust function prototype
2948 and code to reflect change on "target.h".
2949
2950 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2951
2952 * inferiors.c (switch_to_thread): New function.
2953
2954 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2955
2956 * Makefile.in (SFILE): Add "common/job-control.c".
2957 (OBS): Add "job-control.o".
2958
2959 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2960
2961 * Makefile: Remove "@host_makefile_frag@".
2962
2963 2017-05-05 Pedro Alves <palves@redhat.com>
2964
2965 * configure: Regenerate.
2966
2967 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2968
2969 * configure: Regenerate.
2970
2971 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2972
2973 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2974 software_single_step change of return type to
2975 std::vector<CORE_ADDR>.
2976 * linux-low.c (install_software_single_step_breakpoints):
2977 Likewise.
2978 * linux-low.h (install_software_single_step_breakpoints):
2979 Likewise.
2980
2981 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2982
2983 * remote-utils.c: Include "gdb_termios.h" instead of
2984 "terminal.h".
2985 * terminal.h: Delete file.
2986
2987 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2988
2989 * server.c: Include <vector>.
2990 <program_argv, wrapper_argv>: Convert to std::vector.
2991 (start_inferior): Rewrite function to use C++.
2992 (handle_v_run): Likewise. Update code that calculates the argv
2993 based on the vRun packet; use C++.
2994 (captured_main): Likewise.
2995
2996 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2997
2998 * server.c (handle_v_cont): Initialize thread_resume::thread
2999 with null_ptid.
3000
3001 2017-04-05 Pedro Alves <palves@redhat.com>
3002
3003 * configure: Regenerate.
3004
3005 2017-04-05 Pedro Alves <palves@redhat.com>
3006
3007 * gdbreplay.c (sync_error): Constify.
3008 * linux-x86-low.c (push_opcode): Constify.
3009
3010 2017-04-05 Pedro Alves <palves@redhat.com>
3011
3012 * win32-low.c (get_child_debug_event)
3013 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3014 Report TARGET_WAITKIND_SPURIOUS instead.
3015
3016 2017-04-05 Pedro Alves <palves@redhat.com>
3017
3018 * remote-utils.c (remote_prepare, remote_open): Constify.
3019 * remote-utils.h (remote_prepare, remote_open): Constify.
3020 * server.c (captured_main): Constify 'port' handling.
3021
3022 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3023
3024 * Makefile.in (clean): Clear .deps.
3025
3026 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3027
3028 * .gitignore: Remove generated files, replace with wildcard.
3029 * (clean): Replace removal of generated files with wildcard.
3030 (version.c): Replace with...
3031 (version-generated.c): ...this.
3032 (xml-builtin.c): Replace with...
3033 (xml-builtin-generated.c): ...this.
3034 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3035 (%.c: *regformats*): Replace with...
3036 (%-generated.c: *regformats*): ...this.
3037
3038 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3039
3040 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3041 (xtensa_fill_gregset): Call collect_register_by_name for
3042 threadptr register.
3043 (xtensa_store_gregset): Call supply_register_by_name for
3044 threadptr register.
3045
3046 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3047
3048 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3049 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3050 (xtensa_store_gregset): Call supply_register for all registers in
3051 a0_regnum..a0_regnum + C0_NREGS range.
3052
3053 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3054
3055 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3056 (ax-ipa.o: ax.c): Remove.
3057 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3058 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3059 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3060 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3061 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3062
3063 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3064
3065 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3066 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3067 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3068 (errors-ipa.o: ../common/errors.c): Remove.
3069 (format-ipa.o: ../common/format.c): Remove.
3070 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3071
3072 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3073
3074 * Makefile.in (%-ipa.o: %.c): New rule.
3075 (tracepoint-ipa.o: tracepoint.c): Remove.
3076 (utils-ipa.o: utils.c): Remove.
3077 (remote-utils-ipa.o: remote-utils.c): Remove.
3078 (regcache-ipa.o: regcache.c): Remove.
3079 (i386-linux-ipa.o: i386-linux.c): Remove.
3080 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3081 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3082 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3083 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3084 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3085 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3086 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3087 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3088 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3089 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3090 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3091 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3092 (aarch64-ipa.o: aarch64.c): Remove.
3093 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3094 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3095 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3096 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3097 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3098 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3099 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3100 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3101 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3102 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3103 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3104 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3105 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3106 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3107 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3108 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3109 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3110 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3111 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3112 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3113 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3114 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3115 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3116 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3117 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3118 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3119 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3120 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3121 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3122 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3123 (tdesc-ipa.o: tdesc.c): Remove.
3124 (x32-linux-ipa.o: x32-linux.c): Remove.
3125 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3126 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3127
3128 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3129
3130 * Makefile.in (%.o: ../arch/%.c): New rule.
3131 (arm.o: ../arch/arm.c): Remove.
3132 (arm-linux.o: ../arch/arm-linux.c): Remove.
3133 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3134 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3135
3136 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3137
3138 * Makefile.in (%.o: ../nat/%.c): New rule.
3139 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3140 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3141 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3142 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3143 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3144 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3145 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3146 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3147 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3148 (linux-personality.o: ../nat/linux-personality.c): Remove.
3149 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3150 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3151 (x86-linux.o: ../nat/x86-linux.c): Remove.
3152 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3153 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3154
3155 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3156
3157 * Makefile.in (%.o: ../common/%.c): New rule.
3158 (signals.o: ../common/signals.c): Remove.
3159 (print-utils.o: ../common/print-utils.c): Remove.
3160 (rsp-low.o: ../common/rsp-low.c): Remove.
3161 (common-utils.o: ../common/common-utils.c): Remove.
3162 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3163 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3164 (vec.o: ../common/vec.c): Remove.
3165 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3166 (xml-utils.o: ../common/xml-utils.c): Remove.
3167 (ptid.o: ../common/ptid.c): Remove.
3168 (buffer.o: ../common/buffer.c): Remove.
3169 (format.o: ../common/format.c): Remove.
3170 (filestuff.o: ../common/filestuff.c): Remove.
3171 (agent.o: ../common/agent.c): Remove.
3172 (errors.o: ../common/errors.c): Remove.
3173 (environ.o: ../common/environ.c): Remove.
3174 (common-debug.o: ../common/common-debug.c): Remove.
3175 (cleanups.o: ../common/cleanups.c): Remove.
3176 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3177 (fileio.o: ../common/fileio.c): Remove.
3178 (common-regcache.o: ../common/common-regcache.c): Remove.
3179 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3180 (new-op.o: ../common/new-op.c): Remove.
3181 (btrace-common.o: ../common/btrace-common.c): Remove.
3182
3183 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3184
3185 * Makefile.in (%.o: ../target/%.c): New rule.
3186 (waitstatus.o: ../target/waitstatus.c): Remove.
3187
3188 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3189
3190 * Makefile.in
3191 (%.c: ../regformats/%.dat,
3192 (%.c: ../regformats/arm/%.dat,
3193 (%.c: ../regformats/i386/%.dat,
3194 (%.c: ../regformats/rs6000/%.dat): New rules.
3195 (aarch64.c): Remove.
3196 (reg-arm.c): Remove.
3197 (arm-with-iwmmxt.c): Remove.
3198 (arm-with-vfpv2.c): Remove.
3199 (arm-with-vfpv3.c): Remove.
3200 (arm-with-neon.c): Remove.
3201 (reg-bfin.c): Remove.
3202 (reg-cris.c): Remove.
3203 (reg-crisv32.c): Remove.
3204 (i386.c): Remove.
3205 (i386-linux.c): Remove.
3206 (i386-avx.c): Remove.
3207 (i386-avx-linux.c): Remove.
3208 (i386-avx-avx512.c): Remove.
3209 (i386-avx-avx512-linux.c): Remove.
3210 (i386-mpx.c): Remove.
3211 (i386-mpx-linux.c): Remove.
3212 (i386-avx-mpx-avx512-pku.c): Remove.
3213 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3214 (i386-avx-mpx.c): Remove.
3215 (i386-avx-mpx-linux.c): Remove.
3216 (i386-mmx.c): Remove.
3217 (i386-mmx-linux.c): Remove.
3218 (reg-ia64.c): Remove.
3219 (reg-m32r.c): Remove.
3220 (reg-m68k.c): Remove.
3221 (reg-cf.c): Remove.
3222 (mips-linux.c): Remove.
3223 (mips-dsp-linux.c): Remove.
3224 (mips64-linux.c): Remove.
3225 (mips64-dsp-linux.c): Remove.
3226 (nios2-linux.c): Remove.
3227 (powerpc-32.c): Remove.
3228 (powerpc-32l.c): Remove.
3229 (powerpc-altivec32l.c): Remove.
3230 (powerpc-cell32l.c): Remove.
3231 (powerpc-vsx32l.c): Remove.
3232 (powerpc-isa205-32l.c): Remove.
3233 (powerpc-isa205-altivec32l.c): Remove.
3234 (powerpc-isa205-vsx32l.c): Remove.
3235 (powerpc-e500l.c): Remove.
3236 (powerpc-64l.c): Remove.
3237 (powerpc-altivec64l.c): Remove.
3238 (powerpc-cell64l.c): Remove.
3239 (powerpc-vsx64l.c): Remove.
3240 (powerpc-isa205-64l.c): Remove.
3241 (powerpc-isa205-altivec64l.c): Remove.
3242 (powerpc-isa205-vsx64l.c): Remove.
3243 (s390-linux32.c): Remove.
3244 (s390-linux32v1.c): Remove.
3245 (s390-linux32v2.c): Remove.
3246 (s390-linux64.c): Remove.
3247 (s390-linux64v1.c): Remove.
3248 (s390-linux64v2.c): Remove.
3249 (s390-te-linux64.c): Remove.
3250 (s390-vx-linux64.c): Remove.
3251 (s390-tevx-linux64.c): Remove.
3252 (s390x-linux64.c): Remove.
3253 (s390x-linux64v1.c): Remove.
3254 (s390x-linux64v2.c): Remove.
3255 (s390x-te-linux64.c): Remove.
3256 (s390x-vx-linux64.c): Remove.
3257 (s390x-tevx-linux64.c): Remove.
3258 (tic6x-c64xp-linux.c): Remove.
3259 (tic6x-c64x-linux.c): Remove.
3260 (tic6x-c62x-linux.c): Remove.
3261 (reg-sh.c): Remove.
3262 (reg-sparc64.c): Remove.
3263 (reg-spu.c): Remove.
3264 (amd64.c): Remove.
3265 (amd64-linux.c): Remove.
3266 (amd64-avx.c): Remove.
3267 (amd64-avx-linux.c): Remove.
3268 (amd64-avx-avx512.c): Remove.
3269 (amd64-avx-avx512-linux.c): Remove.
3270 (amd64-mpx.c): Remove.
3271 (amd64-mpx-linux.c): Remove.
3272 (amd64-avx-mpx-avx512-pku.c): Remove.
3273 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3274 (amd64-avx-mpx.c): Remove.
3275 (amd64-avx-mpx-linux.c): Remove.
3276 (x32.c): Remove.
3277 (x32-linux.c): Remove.
3278 (x32-avx.c): Remove.
3279 (x32-avx-linux.c): Remove.
3280 (x32-avx-avx512.c): Remove.
3281 (x32-avx-avx512-linux.c): Remove.
3282 (reg-xtensa.c): Remove.
3283 (reg-tilegx.c): Remove.
3284 (reg-tilegx32.c): Remove.
3285
3286 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3287
3288 * Makefile.in (SFILES): Add "common/environ.c".
3289 (OBJS): Add "common/environ.h".
3290
3291 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3292
3293 * configure.ac: Check if the fs_base and gs_base members of
3294 `struct user_regs_struct' exist.
3295 * config.in: Regenerated.
3296 * configure: Likewise.
3297
3298 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3299
3300 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3301 target_read_memory.
3302 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3303 (get_next_pcs_syscall_next_pc): Likewise.
3304
3305 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3306
3307 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3308 * nto-x86-low.c: Likewise.
3309
3310 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3311
3312 * Makefile.in: Include disable-implicit-rules.mk.
3313
3314 2016-11-23 Pedro Alves <palves@redhat.com>
3315
3316 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3317 (debug_vprintf): Use std::chrono::steady_clock instead of
3318 gettimeofday. Use '.' instead of ':'.
3319 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3320 (get_timestamp): Use std::chrono::steady_clock instead of
3321 gettimeofday.
3322
3323 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3324
3325 * Makefile.in: Fix whitespace formatting.
3326
3327 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3328
3329 * Makefile.in (SFILES, OBS): Flatten list and order
3330 alphabetically.
3331
3332 2016-11-23 Pedro Alves <palves@redhat.com>
3333
3334 * event-loop.c (handle_file_event): Use warning.
3335 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3336 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3337 Use warning.
3338
3339 2016-11-23 Pedro Alves <palves@redhat.com>
3340
3341 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3342 output.
3343 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3344 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3345 debug_printf and debug_flush for debug output.
3346 * server.c (handle_general_set): Likewise.
3347 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3348 output.
3349
3350 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3351
3352 * Makefile.in (.c.o): Replace rule with ...
3353 (%.o: %.c): ... this one.
3354
3355 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3356
3357 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3358 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3359 make.
3360 * configure.ac: Remove checks for the make program.
3361 * configure: Re-generate.
3362
3363 2016-10-28 Pedro Alves <palves@redhat.com>
3364
3365 * Makefile.in (CXX_DIALECT): Get from configure.
3366 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3367 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3368 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3369 * config.in: Regenerate.
3370 * configure: Regenerate.
3371
3372 2016-10-27 Yao Qi <yao.qi@linaro.org>
3373
3374 * linux-low.c (linux_supports_range_stepping): Return true if
3375 can_software_single_step return true.
3376
3377 2016-10-27 Yao Qi <yao.qi@linaro.org>
3378
3379 * inferiors.c (find_inferior_in_random): New function.
3380 * inferiors.h (find_inferior_in_random): Declare.
3381 * linux-low.c (linux_wait_for_event_filtered): Call
3382 find_inferior_in_random instead of find_inferior.
3383
3384 2016-10-27 Yao Qi <yao.qi@linaro.org>
3385
3386 * linux-low.c (linux_wait_1): If single-step breakpoints are
3387 inserted, remove them.
3388
3389 2016-10-26 Pedro Alves <palves@redhat.com>
3390
3391 * linux-low.c (handle_extended_wait): Link parent/child fork
3392 threads.
3393 (linux_wait_1): Unlink them.
3394 (linux_set_resume_request): Ignore resume requests for
3395 already-resumed and unhandled fork child threads.
3396 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3397 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3398 New functions.
3399 (handle_v_requests) <vCont>: Don't call require_running.
3400 * server.h (in_queued_stop_replies): New declaration.
3401
3402 2016-10-24 Yao Qi <yao.qi@linaro.org>
3403
3404 PR server/20733
3405 * linux-aarch64-low.c (append_insns): Cast the return value to
3406 'uint32_t *'.
3407
3408 2016-10-10 Yao Qi <yao.qi@linaro.org>
3409
3410 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3411
3412 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3413
3414 * target.c (target_supports_multi_process): New function, moved
3415 from...
3416 * target.h (target_supports_multi_process): ... here. Remove
3417 macro.
3418
3419 2016-10-05 Tom Tromey <tom@tromey.com>
3420
3421 PR remote/20655:
3422 * tracepoint.c (handle_tracepoint_bkpts): Check
3423 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3424
3425 2016-10-05 Yao Qi <yao.qi@linaro.org>
3426
3427 * configure.srv: Update the path of arm-*.xml files.
3428
3429 2016-10-05 Terry Guo <terry.guo@arm.com>
3430 Yao Qi <yao.qi@linaro.org>
3431
3432 * Makefile.in: Adjust the path of rules.
3433 * configure.srv: Update the path of xml files.
3434 * regformats/arm-with-iwmmxt.dat: Regenerated.
3435 * regformats/arm-with-neon.dat: Likewise.
3436 * regformats/arm-with-vfpv2.dat: Likewise.
3437 * regformats/arm-with-vfpv3.dat Likewise.
3438
3439 2016-09-30 Yao Qi <yao.qi@linaro.org>
3440
3441 PR gdbserver/20627
3442 * target.c (target_stop_and_wait): Don't call
3443 target_continue_no_signal, use resume_stop instead.
3444
3445 2016-09-26 Yao Qi <yao.qi@linaro.org>
3446
3447 * linux-low.c (linux_wait_1): Call debug_exit.
3448
3449 2016-09-23 Pedro Alves <palves@redhat.com>
3450
3451 * Makefile.in (SFILES): Add common/new-op.c.
3452 (OBS): Add common/new-op.o.
3453 (new-op.o): New rule.
3454
3455 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3456
3457 * .gitinore: Ignore more files.
3458
3459 2016-09-21 Yao Qi <yao.qi@linaro.org>
3460
3461 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3462 23.
3463
3464 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3465
3466 * server.c (start_inferior): Call target_mourn_inferior instead of
3467 mourn_inferior; pass ptid_t argument to it.
3468 (resume): Likewise.
3469 (handle_target_event): Likewise.
3470 * target.c (target_mourn_inferior): New function.
3471 * target.h (mourn_inferior): Delete macro.
3472
3473 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3474
3475 * linux-low.c (lwp_is_stepping): New function.
3476
3477 2016-09-06 Carl Love <cel@us.ibm.com>
3478
3479 * server.c (start_inferior): Fixed comment, requested comment change
3480 didn't get updated correctly. Removed reference to ptrace () call as
3481 it is only true on Linux systems.
3482
3483 2016-09-06 Carl Love <cel@us.ibm.com>
3484
3485 * server.c (start_inferior): Do not call
3486 function target_post_create_inferior () if the
3487 inferior process has already exited.
3488
3489 2016-09-05 Pedro Alves <palves@redhat.com>
3490
3491 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3492 (COMPILE.pre, CC_LD): Use CXX directly.
3493 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3494 * acinclude.m4: Don't include build-with-cxx.m4.
3495 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3496 * configure: Regenerate.
3497
3498 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3499
3500 PR gdb/19495
3501 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3502 call writing data to own_buf.
3503
3504 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3505
3506 * target.c (mywait): Call target_wait instead of
3507 the_target->wait.
3508 (target_wait): New function.
3509
3510 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3511
3512 * server.c (start_inferior): New variable 'ptid'. Replace calls
3513 to the_target->resume by target_continue{,_no_signal}, depending
3514 on the case.
3515 * target.c (target_stop_and_wait): Call target_continue_no_signal
3516 instead of the_target->resume.
3517 (target_continue): New function.
3518
3519 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3520
3521 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3522
3523 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3524
3525 PR server/20491
3526 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3527 ps_prochandle.
3528 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3529 * linux-arm-low.c (ps_get_thread_area): Likewise.
3530 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3531 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3532 * linux-mips-low.c (ps_get_thread_area): Likewise.
3533 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3534 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3535 * linux-x86-low.c (ps_get_thread_area): Likewise.
3536 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3537
3538 2016-08-19 Pedro Alves <palves@redhat.com>
3539
3540 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3541
3542 2016-08-19 Pedro Alves <palves@redhat.com>
3543
3544 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3545 comment. Use memcpy instead of casting through unsigned long.
3546
3547 2016-08-19 Pedro Alves <palves@redhat.com>
3548
3549 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3550 allocating around 0x80000000.
3551
3552 2016-08-19 Pedro Alves <palves@redhat.com>
3553
3554 PR gdb/20415
3555 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3556 (x32-avx512-linux-ipa.o): New rules.
3557 * configure.ac (x86_64-*-linux*): New x32 check.
3558 * configure.srv (ipa_x32_linux_regobj): New.
3559 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3560 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3561 descriptions.
3562 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3563 descriptions.
3564 * configure: Regenerate.
3565
3566 2016-08-09 Pedro Alves <palves@redhat.com>
3567
3568 PR gdb/18653
3569 * Makefile.in (OBS): Add signals-state-save-restore.o.
3570 (signals-state-save-restore.o): New rule.
3571 * config.in: Regenerate.
3572 * configure: Regenerate.
3573 * linux-low.c: Include "signals-state-save-restore.h".
3574 (linux_create_inferior): Call
3575 restore_original_signals_state.
3576 * server.c: Include "dispositions-save-restore.h".
3577 (captured_main): Call save_original_signals_state.
3578
3579 2016-08-05 Pedro Alves <palves@redhat.com>
3580
3581 * configure: Regenerate.
3582
3583 2016-08-04 Yao Qi <yao.qi@linaro.org>
3584
3585 * linux-low.c (regsets_fetch_inferior_registers): Check
3586 errno is ESRCH or not.
3587
3588 2016-08-02 Yao Qi <yao.qi@linaro.org>
3589
3590 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3591 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3592 (thread_db_load_search): Update.
3593 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3594 td_ta_set_event and td_ta_event_getmsg.
3595
3596 2016-07-26 Pedro Alves <palves@redhat.com>
3597
3598 PR server/20414
3599 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3600 of unsigned long for 64-bit registers and use uint32_t instead of
3601 unsigned int for 32-bit registers.
3602
3603 2016-07-26 Pedro Alves <palves@redhat.com>
3604
3605 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3606 to 'ptrace'.
3607
3608 2016-07-21 Tom Tromey <tom@tromey.com>
3609
3610 * configure: Rebuild.
3611
3612 2016-07-21 Yao Qi <yao.qi@linaro.org>
3613
3614 * mem-break.c (find_gdb_breakpoint): Cast bp to
3615 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3616
3617 2016-07-21 Yao Qi <yao.qi@linaro.org>
3618
3619 * server.c (handle_v_requests): Support s and S actions
3620 if target_supports_software_single_step return true.
3621
3622 2016-07-21 Yao Qi <yao.qi@linaro.org>
3623
3624 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3625 is resume_step, call maybe_hw_step.
3626 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3627 and unstop them.
3628 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3629 breakpoints or not.
3630 (proceed_one_lwp): If resume request is resume_step, install
3631 reinsert breakpoints and call maybe_hw_step.
3632
3633 2016-07-21 Yao Qi <yao.qi@linaro.org>
3634
3635 * linux-low.c (proceed_one_lwp): Declare.
3636 (linux_resume_one_thread): Remove local variable 'step'.
3637 Lift code enqueue signal. Call proceed_one_lwp instead of
3638 linux_resume_one_lwp.
3639
3640 2016-07-21 Yao Qi <yao.qi@linaro.org>
3641
3642 * linux-low.c (linux_resume_one_thread): Call
3643 enqueue_pending_signal.
3644
3645 2016-07-21 Yao Qi <yao.qi@linaro.org>
3646
3647 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3648 * inferiors.c (do_restore_current_thread_cleanup): New function.
3649 (make_cleanup_restore_current_thread): Likewise.
3650 * linux-low.c (install_software_single_step_breakpoints): Call
3651 make_cleanup_restore_current_thread. Switch current_thread to
3652 thread.
3653
3654 2016-07-21 Yao Qi <yao.qi@linaro.org>
3655
3656 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3657 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3658 (clone_one_breakpoint): Likewise.
3659 (delete_reinsert_breakpoints): Change parameter to thread.
3660 Callers updated.
3661 (has_reinsert_breakpoints): Likewise.
3662 (uninsert_reinsert_breakpoints): Likewise.
3663 (reinsert_reinsert_breakpoints): Likewise.
3664 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3665 (delete_reinsert_breakpoints): Likewise.
3666 (reinsert_reinsert_breakpoints): Likewise.
3667 (uninsert_reinsert_breakpoints): Likewise.
3668 (has_reinsert_breakpoints): Likewise.
3669
3670 2016-07-21 Yao Qi <yao.qi@linaro.org>
3671
3672 * inferiors.c (get_thread_process): Make parameter const.
3673 * inferiors.h (get_thread_process): Update declaration.
3674 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3675 Add new parameters child_thread and parent_thread. Callers
3676 updated.
3677 * mem-break.h (clone_all_breakpoints): Update declaration.
3678
3679 2016-07-21 Yao Qi <yao.qi@linaro.org>
3680
3681 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3682 <command_list, handler>: Remove.
3683 (struct gdb_breakpoint): New.
3684 (struct other_breakpoint): New.
3685 (struct reinsert_breakpoint): New.
3686 (is_gdb_breakpoint): New function.
3687 (any_persistent_commands): Update command_list if
3688 is_gdb_breakpoint returns true.
3689 (set_breakpoint): Create breakpoints according to their types.
3690 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3691 (set_gdb_breakpoint_1): Likewise.
3692 (set_gdb_breakpoint): Likewise.
3693 (clear_breakpoint_conditions): Change parameter type to
3694 'struct gdb_breakpoint *'.
3695 (clear_breakpoint_commands): Likewise.
3696 (clear_breakpoint_conditions_and_commands): Likewise.
3697 (add_condition_to_breakpoint): Likewise.
3698 (add_breakpoint_condition): Likewise.
3699 (add_commands_to_breakpoint): Likewise.
3700 (check_breakpoints): Check other_breakpoint.
3701 (clone_one_breakpoint): Clone breakpopint according to its type.
3702 * mem-break.h (struct gdb_breakpoint): Declare.
3703 (set_gdb_breakpoint): Update declaration.
3704 (clear_breakpoint_conditions_and_commands): Likewise.
3705 (add_breakpoint_condition): Likewise.
3706 (add_breakpoint_commands): Likewise.
3707 * server.c (process_point_options): Change parameter type to
3708 'struct gdb_breakpoint *'.
3709
3710 2016-07-21 Yao Qi <yao.qi@linaro.org>
3711
3712 * mem-break.c (set_breakpoint_at): Rename it to ...
3713 (set_breakpoint_type_at): ... it.
3714 (set_breakpoint_at): Call set_breakpoint_type_at.
3715 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3716 * mem-break.h (set_breakpoint_at): Update comments.
3717
3718 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3719
3720 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3721 to buf parameter.
3722 (nios2_store_gregset): Likewise.
3723
3724 2016-07-01 Pedro Alves <palves@redhat.com>
3725 Antoine Tremblay <antoine.tremblay@ericsson.com>
3726
3727 * linux-low.c: Change interface to take the target lwp_info
3728 pointer directly and return void. Handle detaching from a zombie
3729 thread.
3730 (linux_detach_lwp_callback): New function.
3731 (linux_detach): Detach from the leader thread after detaching from
3732 the clone threads.
3733
3734 2016-06-28 Yao Qi <yao.qi@linaro.org>
3735
3736 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3737 for variable new_offset.
3738 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3739 (aarch64_ftrace_insn_reloc_cb): Likewise.
3740 (aarch64_ftrace_insn_reloc_tb): Likewise.
3741 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3742 PRIx64 instead of PRIx32.
3743
3744 2016-06-28 Yao Qi <yao.qi@linaro.org>
3745
3746 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3747 (the_low_target): Install arm_get_syscall_trapinfo.
3748
3749 2016-06-28 Yao Qi <yao.qi@linaro.org>
3750
3751 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3752 function.
3753 (the_low_target): Install aarch64_get_syscall_trapinfo.
3754
3755 2016-06-28 Yao Qi <yao.qi@linaro.org>
3756
3757 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3758 Callers updated.
3759 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3760 Remove parameter sysno.
3761 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3762 sysret.
3763
3764 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3765
3766 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3767 (s390_emit_ne_goto): Likewise.
3768 (s390_emit_lt_goto): Likewise.
3769 (s390_emit_le_goto): Likewise.
3770 (s390_emit_gt_goto): Likewise.
3771 (s390_emit_ge_goto): Likewise.
3772 (s390x_emit_eq_goto): Likewise.
3773 (s390x_emit_ne_goto): Likewise.
3774 (s390x_emit_lt_goto): Likewise.
3775 (s390x_emit_le_goto): Likewise.
3776 (s390x_emit_gt_goto): Likewise.
3777 (s390x_emit_ge_goto): Likewise.
3778 (s390_emit_ops_impl): Mark variable static.
3779 (s390x_emit_ops): Likewise.
3780
3781 2016-06-17 Yao Qi <yao.qi@linaro.org>
3782
3783 * linux-low.c (handle_extended_wait): Call
3784 uninsert_reinsert_breakpoints for the parent process. Remove
3785 reinsert breakpoints from the child process. Reinsert them to
3786 the parent process when vfork is done.
3787 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3788 (reinsert_reinsert_breakpoints): New function.
3789 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3790 (reinsert_reinsert_breakpoints): Declare.
3791
3792 2016-06-17 Yao Qi <yao.qi@linaro.org>
3793
3794 * linux-low.c (handle_extended_wait): If the parent is doing
3795 step-over, remove the reinsert breakpoints from the forked child.
3796
3797 2016-06-17 Yao Qi <yao.qi@linaro.org>
3798
3799 * linux-low.c (unsuspend_all_lwps): Declare.
3800 (linux_low_filter_event): If thread exited, call finish_step_over.
3801 If step-over is finished, unsuspend other threads.
3802
3803 2016-06-17 Yao Qi <yao.qi@linaro.org>
3804
3805 * linux-low.c (linux_resume_one_lwp_throw): Assert
3806 has_reinsert_breakpoints returns false.
3807 * mem-break.c (delete_disabled_breakpoints): Assert
3808 bp type isn't reinsert_breakpoint.
3809
3810 2016-06-17 Yao Qi <yao.qi@linaro.org>
3811
3812 * linux-low.c (maybe_hw_step): New function.
3813 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3814 (finish_step_over): Switch current_thread to lwp temporarily,
3815 and assert has_reinsert_breakpoints returns true.
3816 (proceed_one_lwp): Call maybe_hw_step.
3817 * mem-break.c (has_reinsert_breakpoints): New function.
3818 * mem-break.h (has_reinsert_breakpoints): Declare.
3819
3820 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3821
3822 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3823
3824 2016-05-17 Yao Qi <yao.qi@linaro.org>
3825
3826 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3827 instead of find_inferior.
3828
3829 2016-05-05 Yao Qi <yao.qi@linaro.org>
3830
3831 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3832 Initialize res to zero.
3833
3834 2016-05-05 Yao Qi <yao.qi@linaro.org>
3835
3836 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3837 to uint32_t.
3838
3839 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3840
3841 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3842 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3843 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3844
3845 2016-04-28 Par Olsson <par.olsson@windriver.com>
3846 Simon Marchi <simon.marchi@ericsson.com>
3847
3848 * tracepoint.c (write_inferior_int8): New function.
3849 (cmd_qtenable_disable): Write enable flag using
3850 write_inferior_int8.
3851
3852 2016-04-25 Yao Qi <yao.qi@linaro.org>
3853
3854 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3855 (need_step_over_p): Return zero if the LWP has pending signals
3856 can be delivered on software single step target.
3857
3858 2016-04-25 Yao Qi <yao.qi@linaro.org>
3859
3860 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3861 return instead of error.
3862
3863 2016-04-22 Yao Qi <yao.qi@linaro.org>
3864
3865 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3866 to 23.
3867
3868 2016-04-22 Yao Qi <yao.qi@linaro.org>
3869
3870 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3871 signal when stepping over breakpoint with software single
3872 step.
3873
3874 2016-04-21 Pedro Alves <palves@redhat.com>
3875
3876 * linux-s390-low.c (s390_collect_ptrace_register)
3877 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3878 add casts.
3879 (s390_check_regset): Use void * instead of gdb_byte *.
3880
3881 2016-04-20 Pedro Alves <palves@redhat.com>
3882
3883 * configure: Renegerate.
3884
3885 2016-04-20 Yao Qi <yao.qi@linaro.org>
3886
3887 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3888 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3889 number 16.
3890 (arm_store_gregset): Likewise.
3891
3892 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3893
3894 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3895 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3896 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3897 (amd64-avx-mpx-linux.c): New rules.
3898 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3899 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3900 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3901 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3902 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3903 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3904 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3905 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3906 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3907 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3908 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3909 * linux-x86-low.c (x86_linux_read_description): Add case for
3910 X86_XSTATE_AVX_MPX_MASK.
3911 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3912 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3913 init_registers_i386_avx_mpx_linux.
3914 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3915 (initialize_low_tracepoint): Call
3916 init_registers_i386_avx_mpx_linux.
3917 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3918 (initialize_low_tracepoint): Call
3919 init_registers_amd64_avx_mpx_linux.
3920 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3921 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3922 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3923 declarations.
3924
3925 2016-04-18 Pedro Alves <palves@redhat.com>
3926
3927 * configure: Regenerate.
3928
3929 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3930
3931 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3932 (aarch64_emit_sub): Likewise.
3933
3934 2016-04-12 Pedro Alves <palves@redhat.com>
3935
3936 * utils.c (prepare_to_throw_exception): Delete.
3937
3938 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3939
3940 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3941
3942 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3943
3944 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3945
3946 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3947
3948 * linux-aarch64-ipa.c: Add <elf.h> include.
3949 * linux-ppc-ipa.c: Add <elf.h> include.
3950 * linux-s390-ipa.c: Add <elf.h> include.
3951
3952 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3953
3954 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3955 (get_raw_reg_ptr): Likewise.
3956 (get_trace_state_variable_value_ptr): Likewise.
3957 (set_trace_state_variable_value_ptr): Likewise.
3958 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3959 char *.
3960
3961 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3962 Marcin Kościelnicki <koriakin@0x04.net>
3963
3964 PR/17221
3965 * linux-ppc-low.c (emit_insns): New function.
3966 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3967 (ppc_emit_prologue): New function.
3968 (ppc_emit_epilogue): New function.
3969 (ppc_emit_add): New function.
3970 (ppc_emit_sub): New function.
3971 (ppc_emit_mul): New function.
3972 (ppc_emit_lsh): New function.
3973 (ppc_emit_rsh_signed): New function.
3974 (ppc_emit_rsh_unsigned): New function.
3975 (ppc_emit_ext): New function.
3976 (ppc_emit_zero_ext): New function.
3977 (ppc_emit_log_not): New function.
3978 (ppc_emit_bit_and): New function.
3979 (ppc_emit_bit_or): New function.
3980 (ppc_emit_bit_xor): New function.
3981 (ppc_emit_bit_not): New function.
3982 (ppc_emit_equal): New function.
3983 (ppc_emit_less_signed): New function.
3984 (ppc_emit_less_unsigned): New function.
3985 (ppc_emit_ref): New function.
3986 (ppc_emit_const): New function.
3987 (ppc_emit_reg): New function.
3988 (ppc_emit_pop): New function.
3989 (ppc_emit_stack_flush): New function.
3990 (ppc_emit_swap): New function.
3991 (ppc_emit_stack_adjust): New function.
3992 (ppc_emit_call): New function.
3993 (ppc_emit_int_call_1): New function.
3994 (ppc_emit_void_call_2): New function.
3995 (ppc_emit_if_goto): New function.
3996 (ppc_emit_goto): New function.
3997 (ppc_emit_eq_goto): New function.
3998 (ppc_emit_ne_goto): New function.
3999 (ppc_emit_lt_goto): New function.
4000 (ppc_emit_le_goto): New function.
4001 (ppc_emit_gt_goto): New function.
4002 (ppc_emit_ge_goto): New function.
4003 (ppc_write_goto_address): New function.
4004 (ppc_emit_ops_impl): New static variable.
4005 (ppc64v1_emit_prologue): New function.
4006 (ppc64v2_emit_prologue): New function.
4007 (ppc64_emit_epilogue): New function.
4008 (ppc64_emit_add): New function.
4009 (ppc64_emit_sub): New function.
4010 (ppc64_emit_mul): New function.
4011 (ppc64_emit_lsh): New function.
4012 (ppc64_emit_rsh_signed): New function.
4013 (ppc64_emit_rsh_unsigned): New function.
4014 (ppc64_emit_ext): New function.
4015 (ppc64_emit_zero_ext): New function.
4016 (ppc64_emit_log_not): New function.
4017 (ppc64_emit_bit_and): New function.
4018 (ppc64_emit_bit_or): New function.
4019 (ppc64_emit_bit_xor): New function.
4020 (ppc64_emit_bit_not): New function.
4021 (ppc64_emit_equal): New function.
4022 (ppc64_emit_less_signed): New function.
4023 (ppc64_emit_less_unsigned): New function.
4024 (ppc64_emit_ref): New function.
4025 (ppc64_emit_const): New function.
4026 (ppc64v1_emit_reg): New function.
4027 (ppc64v2_emit_reg): New function.
4028 (ppc64_emit_pop): New function.
4029 (ppc64_emit_stack_flush): New function.
4030 (ppc64_emit_swap): New function.
4031 (ppc64v1_emit_call): New function.
4032 (ppc64v2_emit_call): New function.
4033 (ppc64v1_emit_int_call_1): New function.
4034 (ppc64v2_emit_int_call_1): New function.
4035 (ppc64v1_emit_void_call_2): New function.
4036 (ppc64v2_emit_void_call_2): New function.
4037 (ppc64_emit_if_goto): New function.
4038 (ppc64_emit_eq_goto): New function.
4039 (ppc64_emit_ne_goto): New function.
4040 (ppc64_emit_lt_goto): New function.
4041 (ppc64_emit_le_goto): New function.
4042 (ppc64_emit_gt_goto): New function.
4043 (ppc64_emit_ge_goto): New function.
4044 (ppc64v1_emit_ops_impl): New static variable.
4045 (ppc64v2_emit_ops_impl): New static variable.
4046 (ppc_emit_ops): New function.
4047 (linux_low_target): Wire in ppc_emit_ops.
4048
4049 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4050 Marcin Kościelnicki <koriakin@0x04.net>
4051
4052 PR/17221
4053 * Makefile.in: Add powerpc-*-ipa.o
4054 * configure.srv: Add ipa_obj for powerpc*-linux.
4055 * linux-ppc-ipa.c: New file.
4056 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4057 includes.
4058 (PPC_FIELD): New macro.
4059 (PPC_SEXT): New macro.
4060 (PPC_OP6): New macro.
4061 (PPC_BO): New macro.
4062 (PPC_LI): New macro.
4063 (PPC_BD): New macro.
4064 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4065 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4066 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4067 (ppc_get_thread_area): New function.
4068 (is_elfv2_inferior): New function.
4069 (gen_ds_form): New function.
4070 (GEN_STD): New macro.
4071 (GEN_STDU): New macro.
4072 (GEN_LD): New macro.
4073 (GEN_LDU): New macro.
4074 (gen_d_form): New function.
4075 (GEN_ADDI): New macro.
4076 (GEN_ADDIS): New macro.
4077 (GEN_LI): New macro.
4078 (GEN_LIS): New macro.
4079 (GEN_ORI): New macro.
4080 (GEN_ORIS): New macro.
4081 (GEN_LWZ): New macro.
4082 (GEN_STW): New macro.
4083 (GEN_STWU): New macro.
4084 (gen_xfx_form): New function.
4085 (GEN_MFSPR): New macro.
4086 (GEN_MTSPR): New macro.
4087 (GEN_MFCR): New macro.
4088 (GEN_MTCR): New macro.
4089 (GEN_SYNC): New macro.
4090 (GEN_LWSYNC): New macro.
4091 (gen_x_form): New function.
4092 (GEN_OR): New macro.
4093 (GEN_MR): New macro.
4094 (GEN_LWARX): New macro.
4095 (GEN_STWCX): New macro.
4096 (GEN_CMPW): New macro.
4097 (gen_md_form): New function.
4098 (GEN_RLDICL): New macro.
4099 (GEN_RLDICR): New macro.
4100 (gen_i_form): New function.
4101 (GEN_B): New macro.
4102 (GEN_BL): New macro.
4103 (gen_b_form): New function.
4104 (GEN_BNE): New macro.
4105 (GEN_LOAD): New macro.
4106 (GEN_STORE): New macro.
4107 (gen_limm): New function.
4108 (gen_atomic_xchg): New function.
4109 (gen_call): New function.
4110 (ppc_relocate_instruction): New function.
4111 (ppc_install_fast_tracepoint_jump_pad): New function.
4112 (ppc_get_min_fast_tracepoint_insn_len): New function.
4113 (ppc_get_ipa_tdesc_idx): New function.
4114 (the_low_target): Wire in the new functions.
4115 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4116 tdescs.
4117 * linux-ppc-tdesc.h: New file.
4118
4119 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4120
4121 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4122 (alloc_jump_pad_buffer): New function.
4123 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4124 (alloc_jump_pad_buffer): New function.
4125 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4126 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4127 (alloc_jump_pad_buffer): New function.
4128 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4129 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4130 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4131 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4132
4133 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4134
4135 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4136 * linux-amd64-ipa.c: Likewise.
4137 * linux-i386-ipa.c: Likewise.
4138 * linux-s390-ipa.c: Likewise.
4139 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4140 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4141 set_trace_state_variable_value_ptr.
4142 (struct ipa_sym_addresses): Likewise.
4143 (symbol_list): Likewise.
4144 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4145 accessing gdb_collect directly.
4146 (gdb_collect_ptr_type): New typedef.
4147 (get_raw_reg_ptr_type): New typedef.
4148 (get_trace_state_variable_value_ptr_type): New typedef.
4149 (set_trace_state_variable_value_ptr_type): New typedef.
4150 (gdb_collect_ptr): New global.
4151 (get_raw_reg_ptr): New global.
4152 (get_trace_state_variable_value_ptr): New global.
4153 (set_trace_state_variable_value_ptr): New global.
4154 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4155 accessing get_raw_reg directly.
4156 (get_get_tsv_func_addr): Likewise for
4157 get_trace_state_variable_value_ptr.
4158 (get_set_tsv_func_addr): Likewise for
4159 set_trace_state_variable_value_ptr.
4160 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4161
4162 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4163
4164 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4165
4166 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4167
4168 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4169 packets.
4170 (relocate_instruction): Remove own_buf.
4171 * server.c (own_buf): Make global.
4172 (handle_v_requests): Make global.
4173 * server.h (own_buf): New declaration.
4174 (handle_v_requests): New prototype.
4175
4176 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4177
4178 PR 18377
4179 * linux-s390-low.c (add_insns): New function.
4180 (s390_emit_prologue): New function.
4181 (s390_emit_epilogue): New function.
4182 (s390_emit_add): New function.
4183 (s390_emit_sub): New function.
4184 (s390_emit_mul): New function.
4185 (s390_emit_lsh): New function.
4186 (s390_emit_rsh_signed): New function.
4187 (s390_emit_rsh_unsigned): New function.
4188 (s390_emit_ext): New function.
4189 (s390_emit_log_not): New function.
4190 (s390_emit_bit_and): New function.
4191 (s390_emit_bit_or): New function.
4192 (s390_emit_bit_xor): New function.
4193 (s390_emit_bit_not): New function.
4194 (s390_emit_equal): New function.
4195 (s390_emit_less_signed): New function.
4196 (s390_emit_less_unsigned): New function.
4197 (s390_emit_ref): New function.
4198 (s390_emit_if_goto): New function.
4199 (s390_emit_goto): New function.
4200 (s390_write_goto_address): New function.
4201 (s390_emit_litpool): New function.
4202 (s390_emit_const): New function.
4203 (s390_emit_call): New function.
4204 (s390_emit_reg): New function.
4205 (s390_emit_pop): New function.
4206 (s390_emit_stack_flush): New function.
4207 (s390_emit_zero_ext): New function.
4208 (s390_emit_swap): New function.
4209 (s390_emit_stack_adjust): New function.
4210 (s390_emit_set_r2): New function.
4211 (s390_emit_int_call_1): New function.
4212 (s390_emit_void_call_2): New function.
4213 (s390_emit_eq_goto): New function.
4214 (s390_emit_ne_goto): New function.
4215 (s390_emit_lt_goto): New function.
4216 (s390_emit_le_goto): New function.
4217 (s390_emit_gt_goto): New function.
4218 (s390_emit_ge_goto): New function.
4219 (s390x_emit_prologue): New function.
4220 (s390x_emit_epilogue): New function.
4221 (s390x_emit_add): New function.
4222 (s390x_emit_sub): New function.
4223 (s390x_emit_mul): New function.
4224 (s390x_emit_lsh): New function.
4225 (s390x_emit_rsh_signed): New function.
4226 (s390x_emit_rsh_unsigned): New function.
4227 (s390x_emit_ext): New function.
4228 (s390x_emit_log_not): New function.
4229 (s390x_emit_bit_and): New function.
4230 (s390x_emit_bit_or): New function.
4231 (s390x_emit_bit_xor): New function.
4232 (s390x_emit_bit_not): New function.
4233 (s390x_emit_equal): New function.
4234 (s390x_emit_less_signed): New function.
4235 (s390x_emit_less_unsigned): New function.
4236 (s390x_emit_ref): New function.
4237 (s390x_emit_if_goto): New function.
4238 (s390x_emit_const): New function.
4239 (s390x_emit_call): New function.
4240 (s390x_emit_reg): New function.
4241 (s390x_emit_pop): New function.
4242 (s390x_emit_stack_flush): New function.
4243 (s390x_emit_zero_ext): New function.
4244 (s390x_emit_swap): New function.
4245 (s390x_emit_stack_adjust): New function.
4246 (s390x_emit_int_call_1): New function.
4247 (s390x_emit_void_call_2): New function.
4248 (s390x_emit_eq_goto): New function.
4249 (s390x_emit_ne_goto): New function.
4250 (s390x_emit_lt_goto): New function.
4251 (s390x_emit_le_goto): New function.
4252 (s390x_emit_gt_goto): New function.
4253 (s390x_emit_ge_goto): New function.
4254 (s390_emit_ops): New function.
4255 (struct linux_target_ops): Fill in emit_ops hook.
4256
4257 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4258
4259 PR 18377
4260 * Makefile.in: Add s390 IPA files.
4261 * configure.srv: Build IPA for s390.
4262 * linux-s390-ipa.c: New file.
4263 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4264 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4265 (tdesc_s390_linux32): Likewise.
4266 (init_registers_s390_linux32v1): Likewise.
4267 (tdesc_s390_linux32v1): Likewise.
4268 (init_registers_s390_linux32v2): Likewise.
4269 (tdesc_s390_linux32v2): Likewise.
4270 (init_registers_s390_linux64): Likewise.
4271 (tdesc_s390_linux64): Likewise.
4272 (init_registers_s390_linux64v1): Likewise.
4273 (tdesc_s390_linux64v1): Likewise.
4274 (init_registers_s390_linux64v2): Likewise.
4275 (tdesc_s390_linux64v2): Likewise.
4276 (init_registers_s390_te_linux64): Likewise.
4277 (tdesc_s390_te_linux64): Likewise.
4278 (init_registers_s390_vx_linux64): Likewise.
4279 (tdesc_s390_vx_linux64): Likewise.
4280 (init_registers_s390_tevx_linux64): Likewise.
4281 (tdesc_s390_tevx_linux64): Likewise.
4282 (init_registers_s390x_linux64): Likewise.
4283 (tdesc_s390x_linux64): Likewise.
4284 (init_registers_s390x_linux64v1): Likewise.
4285 (tdesc_s390x_linux64v1): Likewise.
4286 (init_registers_s390x_linux64v2): Likewise.
4287 (tdesc_s390x_linux64v2): Likewise.
4288 (init_registers_s390x_te_linux64): Likewise.
4289 (tdesc_s390x_te_linux64): Likewise.
4290 (init_registers_s390x_vx_linux64): Likewise.
4291 (tdesc_s390x_vx_linux64): Likewise.
4292 (init_registers_s390x_tevx_linux64): Likewise.
4293 (tdesc_s390x_tevx_linux64): Likewise.
4294 (have_hwcap_s390_vx): New static variable.
4295 (s390_arch_setup): Fill have_hwcap_s390_vx.
4296 (s390_get_thread_area): New function.
4297 (s390_ft_entry_gpr_esa): New const.
4298 (s390_ft_entry_gpr_zarch): New const.
4299 (s390_ft_entry_misc): New const.
4300 (s390_ft_entry_fr): New const.
4301 (s390_ft_entry_vr): New const.
4302 (s390_ft_main_31): New const.
4303 (s390_ft_main_64): New const.
4304 (s390_ft_exit_fr): New const.
4305 (s390_ft_exit_vr): New const.
4306 (s390_ft_exit_misc): New const.
4307 (s390_ft_exit_gpr_esa): New const.
4308 (s390_ft_exit_gpr_zarch): New const.
4309 (append_insns): New function.
4310 (s390_relocate_instruction): New function.
4311 (s390_install_fast_tracepoint_jump_pad): New function.
4312 (s390_get_min_fast_tracepoint_insn_len): New function.
4313 (s390_get_ipa_tdesc_idx): New function.
4314 (struct linux_target_ops): Wire in the above functions.
4315 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4316 * linux-s390-tdesc.h: New file.
4317
4318 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4319
4320 * linux-s390-low.c (s390_supports_tracepoints): New function.
4321 (struct linux_target_ops): Fill supports_tracepoints hook.
4322
4323 2016-03-18 Yao Qi <yao.qi@linaro.org>
4324
4325 * linux-low.c (lwp_signal_can_be_delivered): New function.
4326 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4327
4328 2016-03-18 Yao Qi <yao.qi@linaro.org>
4329
4330 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4331 0 if signal is enqueued. Remove 'signal' from one debugging
4332 message. Move one debugging message to some lines below.
4333 Remove code setting 'signal' to 0.
4334
4335 2016-03-18 Yao Qi <yao.qi@linaro.org>
4336
4337 * linux-low.c (linux_low_filter_event): Remove redundant
4338 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4339
4340 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4341
4342 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4343 (struct linux_target_ops): Wire in the above.
4344
4345 2016-03-03 Yao Qi <yao.qi@linaro.org>
4346
4347 * linux-low.c: Update comments to start_step_over.
4348
4349 2016-03-03 Yao Qi <yao.qi@linaro.org>
4350
4351 PR server/19736
4352 * linux-low.c (handle_extended_wait): Set child suspended
4353 if event_lwp->bp_reinsert isn't zero.
4354
4355 2016-03-02 Yao Qi <yao.qi@linaro.org>
4356
4357 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4358 enqueue_pending_signal.
4359
4360 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4361
4362 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4363 is actually loaded.
4364
4365 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4366
4367 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4368 (s390_regmap_3264) [!__s390x__]: New global.
4369 (s390_collect_ptrace_register): Skip map entries containing -1.
4370 (s390_supply_ptrace_register): Ditto.
4371 (s390_fill_gprs_high): New function.
4372 (s390_store_gprs_high): New function.
4373 (s390_regsets): Add NT_S390_HIGH_GPRS.
4374 (s390_get_hwcap): Enable on 31-bit.
4375 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4376 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4377 Detect NT_S390_HIGH_GPRS.
4378 (s390_usrregs_info_3264): Enable on 31-bit.
4379 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4380 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4381
4382 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4383
4384 PR gdb/13808
4385 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4386 * configure.srv: Ditto.
4387 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4388 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4389 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4390 (init_registers_amd64_linux): Remove prototype.
4391 (tdesc_amd64_linux): Remove declaration.
4392 (get_ipa_tdesc): New function.
4393 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4394 initialize remaining tdescs.
4395 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4396 (init_registers_i386_linux): Remove prototype.
4397 (tdesc_i386_linux): Remove declaration.
4398 (get_ipa_tdesc): New function.
4399 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4400 initialize remaining tdescs.
4401 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4402 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4403 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4404 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4405 (x86_get_ipa_tdesc_idx): New function.
4406 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4407 * linux-x86-tdesc.h: New file.
4408 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4409 (target_get_ipa_tdesc_idx): New macro.
4410 * tracepoint.c (ipa_tdesc_idx): New macro.
4411 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4412 (symbol_list): Add ipa_tdesc_idx.
4413 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4414 (ipa_tdesc): Remove.
4415 (ipa_tdesc_idx): New variable.
4416 (get_context_regcache): Use get_ipa_tdesc.
4417 (gdb_collect): Ditto.
4418 (gdb_probe): Ditto.
4419 * tracepoint.h (get_ipa_tdesc): New prototype.
4420 (ipa_tdesc): Remove.
4421
4422 2016-02-24 Pedro Alves <palves@redhat.com>
4423
4424 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4425 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4426 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4427 Factor out common code between the USE_SIGTRAP_SIGINFO and
4428 !USE_SIGTRAP_SIGINFO blocks.
4429 (linux_low_filter_event): Call save_stop_reason instead of
4430 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4431 Update comments.
4432 (linux_wait_1): Update comments.
4433
4434 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4435
4436 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4437 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4438 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4439 ppc_insert_point, ppc_remove_point.
4440
4441 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4442
4443 * linux-s390-low.c (s390_supports_z_point_type): New function.
4444 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4445
4446 2016-02-16 Yao Qi <yao.qi@linaro.org>
4447
4448 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4449 PC. Get pc from regcache_read_pc.
4450
4451 2016-02-12 Yao Qi <yao.qi@linaro.org>
4452
4453 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4454 or linux_get_pc_32bit.
4455 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4456
4457 2016-02-12 Yao Qi <yao.qi@linaro.org>
4458
4459 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4460 arm_linux_get_next_pcs_fixup.
4461
4462 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4463
4464 * tracepoint.c (x_tracepoint_action_download): Change
4465 write_inferior_data_ptr to write_inferior_data_pointer.
4466 (cmd_qtstart): Likewise.
4467 (write_inferior_data_ptr): Remove.
4468 (download_agent_expr): Change write_inferior_data_ptr to
4469 write_inferior_data_pointer.
4470 (download_tracepoint_1): Likewise.
4471 (download_tracepoint): Likewise.
4472 (download_trace_state_variables): Likewise.
4473
4474 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4475 Marcin Kościelnicki <koriakin@0x04.net>
4476
4477 * tracepoint.c (struct tracepoint_action_ops): Remove.
4478 (struct tracepoint_action): Remove ops.
4479 (m_tracepoint_action_download, r_tracepoint_action_download)
4480 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4481 size and offset accordingly.
4482 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4483 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4484 (tracepoint_action_send, tracepoint_action_download): New functions.
4485 Helpers for trace action handlers.
4486 (add_tracepoint_action): Remove setup actions ops.
4487 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4488
4489 2016-02-10 Yao Qi <yao.qi@linaro.org>
4490
4491 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4492
4493 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4494
4495 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4496 to AC_OUTPUT.
4497 * configure: Regenerate.
4498
4499 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4500
4501 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4502 void * to gdb_byte *.
4503 * linux-low.c (siginfo_fixup): Likewise.
4504 (linux_xfer_siginfo): Likewise.
4505 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4506 Likewise.
4507 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4508
4509 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4510
4511 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4512 to srv_tgtobj.
4513 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4514 to srv_tgtobj.
4515 * linux-x86-low.c [__x86_64__]: Include
4516 "nat/amd64-linux-siginfo.h".
4517 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4518 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4519 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4520 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4521 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4522 (cpt_si_fd, si_timerid, si_overrun): Move from
4523 nat/amd64-linux-siginfo.c.
4524 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4525
4526 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4527
4528 * server.c (skip_to_semicolon): Remove.
4529 (process_point_options): Use strchrnul instead of
4530 skip_to_semicolon.
4531
4532 2016-01-26 Yao Qi <yao.qi@linaro.org>
4533
4534 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4535 * linux-low.c (install_software_single_step_breakpoints): Don't
4536 call regcache_read_pc.
4537 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4538 argument pc.
4539
4540 2016-01-26 Yao Qi <yao.qi@linaro.org>
4541
4542 * linux-low.c (install_software_single_step_breakpoints): Call
4543 regcache_read_pc instead of get_pc.
4544
4545 2016-01-26 Yao Qi <yao.qi@linaro.org>
4546
4547 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4548 (unblock_async_io): Rename to ...
4549 (block_unblock_async_io): ... it. New function.
4550 (enable_async_io): Don't install SIGIO handler. Unblock it
4551 instead.
4552 (disable_async_io): Don't ignore SIGIO. Block it instead.
4553 (initialize_async_io): Install SIGIO handler. Don't call
4554 unblock_async_io.
4555
4556 2016-01-26 Yao Qi <yao.qi@linaro.org>
4557
4558 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4559 first character is '\003', call *the_target->request_interrupt.
4560
4561 2016-01-25 Yao Qi <yao.qi@linaro.org>
4562
4563 * remote-utils.c (new_thread_notify): Remove.
4564 (dead_thread_notify): Likewise.
4565 * remote-utils.h (new_thread_notify): Remove declaration.
4566 (dead_thread_notify): Likewise.
4567
4568 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4569
4570 * gdb.trace/pending.exp: Fix expected message on continue.
4571
4572 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4573
4574 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4575 it works properly on big-endian machines where sizeof (CORE_ADDR)
4576 != sizeof (void *).
4577
4578 2016-01-21 Pedro Alves <palves@redhat.com>
4579
4580 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4581 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4582 * configure: Regenerate.
4583
4584 2016-01-21 Yao Qi <yao.qi@linaro.org>
4585
4586 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4587 is_thumb and set it according to CPSR saved on the stack.
4588 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4589 arm_sigreturn_next_pc.
4590
4591 2016-01-18 Yao Qi <yao.qi@linaro.org>
4592
4593 * linux-low.c (linux_set_pc_64bit): New function.
4594 (linux_get_pc_64bit): New function.
4595 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4596 Declare.
4597 * linux-sparc-low.c (debug_threads): Remove declaration.
4598 (sparc_get_pc): Remove.
4599 (the_low_target): Use linux_get_pc_64bit instead of
4600 sparc_get_pc.
4601 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4602 (the_low_target): Use linux_get_pc_64bit and
4603 linux_set_pc_64bit.
4604
4605 2016-01-18 Yao Qi <yao.qi@linaro.org>
4606
4607 * linux-arm-low.c (debug_threads): Remove declaration.
4608 (arm_get_pc, arm_set_pc): Remove.
4609 (the_low_target): Use linux_get_pc_32bit and
4610 linux_set_pc_32bit.
4611 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4612 (the_low_target): Use linux_get_pc_32bit and
4613 linux_set_pc_32bit.
4614 * linux-cris-low.c (debug_threads): Remove declaration.
4615 (cris_get_pc, cris_set_pc,): Remove.
4616 (the_low_target): Use linux_get_pc_32bit and
4617 linux_set_pc_32bit.
4618 * linux-crisv32-low.c (debug_threads): Remove declaration.
4619 (cris_get_pc, cris_set_pc): Remove.
4620 (the_low_target): Use linux_get_pc_32bit and
4621 linux_set_pc_32bit.
4622 * linux-low.c: Include inttypes.h.
4623 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4624 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4625 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4626 (the_low_target): Use linux_get_pc_32bit and
4627 linux_set_pc_32bit.
4628 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4629 (the_low_target): Use linux_get_pc_32bit and
4630 linux_set_pc_32bit.
4631 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4632 (the_low_target): Use linux_get_pc_32bit and
4633 linux_set_pc_32bit.
4634 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4635 (the_low_target): Use linux_get_pc_32bit and
4636 linux_set_pc_32bit.
4637 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4638 (the_low_target): Use linux_get_pc_32bit and
4639 linux_set_pc_32bit.
4640
4641 2016-01-18 Gary Benson <gbenson@redhat.com>
4642
4643 * configure.ac (AC_FUNC_FORK): New check.
4644 * config.in: Regenerate.
4645 * configure: Likewise.
4646
4647 2016-01-14 Yao Qi <yao.qi@linaro.org>
4648
4649 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4650 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4651 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4652 arm_get_next_pcs_ctor.
4653
4654 2016-01-12 Josh Stone <jistone@redhat.com>
4655 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4656
4657 * inferiors.h: Include "gdb_vecs.h".
4658 (struct process_info): Add syscalls_to_catch.
4659 * inferiors.c (remove_process): Free syscalls_to_catch.
4660 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4661 syscall_return stops.
4662 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4663 * server.c (handle_general_set): Handle QCatchSyscalls.
4664 (handle_query): Report support for QCatchSyscalls.
4665 * target.h (struct target_ops): Add supports_catch_syscall.
4666 (target_supports_catch_syscall): New macro.
4667 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4668 (struct lwp_info): Add syscall_state.
4669 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4670 Maintain syscall_state and syscalls_to_catch across exec.
4671 (get_syscall_trapinfo): New function, proxy to the_low_target.
4672 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4673 (linux_low_filter_event): Toggle syscall_state entry/return for
4674 syscall traps, and set it ignored for all others.
4675 (gdb_catching_syscalls_p): New function.
4676 (gdb_catch_this_syscall_p): New function.
4677 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4678 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4679 (linux_supports_catch_syscall): New function.
4680 (linux_target_ops): Install it.
4681 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4682 (the_low_target): Install it.
4683
4684 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4685
4686 * acinclude.m4: Include new ../warning.m4 file.
4687 * configure: Regenerated.
4688 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4689
4690 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4691
4692 * ax.c (is_goto_target): Mark static.
4693 * linux-low.c (register_addr): Likewise.
4694 (linux_fetch_registers, linux_store_registers): Likewise.
4695 * mem-break.c (any_persistent_commands): Fix old prototype.
4696 (add_commands_to_breakpoint): Mark static.
4697 * regcache.c (find_register_by_name): Delete unused func.
4698 * remote-utils.c (hex_or_minus_one): Mark static.
4699 * server.c (monitor_show_help): Mark static.
4700 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4701 handle_v_requests): Likewise.
4702
4703 2016-01-12 Pedro Alves <palves@redhat.com>
4704
4705 Remove use of the registered trademark symbol throughout.
4706
4707 2016-01-08 Yao Qi <yao.qi@linaro.org>
4708
4709 * remote-utils.c (getpkt): If c is '\003', call target hook
4710 request_interrupt.
4711
4712 2016-01-06 Yao Qi <yao.qi@linaro.org>
4713
4714 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4715 linux-aarch32-low.c.
4716 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4717 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4718 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4719 (thumb2_breakpoint): Declare.
4720 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4721 linux-aarch32-low.h.
4722 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4723 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4724 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4725
4726 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4727
4728 * gdbreplay.c (gdbreplay_version): Change copyright year in
4729 version message.
4730 * server.c (gdbserver_version): Likewise.
4731
4732 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4733
4734 * server.c (crc32_table): Delete.
4735 (crc32): Use libiberty's xcrc32 function.
4736
4737 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4738
4739 * lynx-low.c (lynx_delete_thread_callback): New function.
4740 (lynx_mourn): Properly delete our process and all of its
4741 threads. Remove call to clear_inferiors.
4742
4743 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4744
4745 * target.c (thread_search_callback): Add check that
4746 the thread_stopped target callback is not NULL before
4747 calling it.
4748
4749 2015-12-21 Yao Qi <yao.qi@linaro.org>
4750
4751 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4752 arm breakpoint.
4753
4754 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4755
4756 * server.c (handle_query): Call target_supports_software_single_step.
4757
4758 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4759
4760 * linux-low.c (single_step): New function.
4761 (linux_resume_one_lwp_throw): Call single_step.
4762 (start_step_over): Likewise.
4763
4764 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4765
4766 * Makefile.in (SFILES): Append arch/arm-linux.c,
4767 arch/arm-get-next-pcs.c.
4768 (arm-linux.o): New rule.
4769 (arm-get-next-pcs.o): New rule.
4770 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4771 arm-linux.o.
4772 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4773 to linux-aarch32-low.c.
4774 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4775 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4776 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4777 (thumb2_breakpoint_len): Likewise.
4778 (arm_is_thumb_mode): Make non-static.
4779 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4780 from linux-aarch32-low.c.
4781 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4782 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4783 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4784 (thumb2_breakpoint_len): Likewise.
4785 (arm_is_thumb_mode): New declaration.
4786 * linux-arm-low.c: Include arch/arm-linux.h
4787 aarch/arm-get-next-pcs.h, sys/syscall.h.
4788 (get_next_pcs_ops): New struct.
4789 (get_next_pcs_addr_bits_remove): New function.
4790 (get_next_pcs_is_thumb): New function.
4791 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4792 (arm_sigreturn_next_pc): Likewise.
4793 (get_next_pcs_syscall_next_pc): Likewise.
4794 (arm_gdbserver_get_next_pcs): Likewise.
4795 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4796 Initialize.
4797 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4798 * server.h: Include gdb_vecs.h.
4799
4800 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4801
4802 * Makefile.in (SFILES): Append common/common-regcache.c.
4803 (OBS): Append common-regcache.o.
4804 (common-regcache.o): New rule.
4805 * regcache.c (init_register_cache): Initialize cache to
4806 REG_UNAVAILABLE.
4807 (regcache_raw_read_unsigned): New function.
4808 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4809 register_status enum.
4810
4811 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4812
4813 * linux-aarch64-low.c (the_low_targets): Rename
4814 breakpoint_reinsert_addr to get_next_pcs.
4815 * linux-arm-low.c (the_low_targets): Likewise.
4816 * linux-bfin-low.c (the_low_targets): Likewise.
4817 * linux-cris-low.c (the_low_targets): Likewise.
4818 * linux-crisv32-low.c (the_low_targets): Likewise.
4819 * linux-low.c (can_software_single_step): Likewise.
4820 (install_software_single_step_breakpoints): New function.
4821 (start_step_over): Use install_software_single_step_breakpoints.
4822 * linux-low.h: New CORE_ADDR vector.
4823 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4824 get_next_pcs.
4825 * linux-mips-low.c (the_low_targets): Likewise.
4826 * linux-nios2-low.c (the_low_targets): Likewise.
4827 * linux-sparc-low.c (the_low_targets): Likewise.
4828
4829 2015-12-17 Pedro Alves <palves@redhat.com>
4830
4831 * linux-low.c (linux_kill_one_lwp): Remove references to
4832 LinuxThreads.
4833 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4834 to 'kill'.
4835 (linux_init_signals): Delete.
4836 (initialize_low): Adjust.
4837 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4838
4839 2015-12-16 Pedro Alves <palves@redhat.com>
4840
4841 * configure.ac (compiler warning flags): When testing a
4842 -Wno-foo option, check whether -Wfoo works instead.
4843 * configure: Regenerate.
4844
4845 2015-12-11 Don Breazeal <donb@codesourcery.com>
4846
4847 * server.c (process_serial_event): Don't exit from gdbserver
4848 in remote mode if there are still active inferiors.
4849
4850 2015-12-11 Yao Qi <yao.qi@linaro.org>
4851
4852 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4853 arm_breakpoint_at if the process is 32-bit.
4854
4855 2015-12-11 Yao Qi <yao.qi@linaro.org>
4856
4857 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4858 arm breakpoint.
4859
4860 2015-12-07 Yao Qi <yao.qi@linaro.org>
4861
4862 * configure.srv: Append arm.o to srv_tgtobj for
4863 aarch64*-*-linux* target.
4864 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4865 from linux-arm-low.c.
4866 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4867 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4868 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4869 (thumb2_breakpoint_len): Likewise.
4870 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4871 (arm_breakpoint_kinds): Likewise.
4872 (arm_breakpoint_kind_from_pc): Likewise.
4873 (arm_sw_breakpoint_from_kind): Likewise.
4874 (arm_breakpoint_kind_from_current_state): Likewise.
4875 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4876 (arm_sw_breakpoint_from_kind): Declare.
4877 (arm_breakpoint_kind_from_current_state): Declare.
4878 (arm_breakpoint_at): Declare.
4879 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4880 arm_sw_breakpoint_from_kind if process is 32-bit.
4881 (aarch64_breakpoint_kind_from_pc): New function.
4882 (aarch64_breakpoint_kind_from_current_state): New function.
4883 (the_low_target): Initialize fields breakpoint_kind_from_pc
4884 and breakpoint_kind_from_current_state.
4885 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4886 linux-aarch32-low.c.
4887 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4888 (arm_breakpoint, arm_breakpoint_len): Likewise.
4889 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4890 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4891 (arm_is_thumb_mode): Likewise.
4892 (arm_breakpoint_at): Likewise.
4893 (arm_breakpoint_kind_from_pc): Likewise.
4894 (arm_sw_breakpoint_from_kind): Likewise.
4895 (arm_breakpoint_kind_from_current_state): Likewise.
4896
4897 Revert:
4898 2015-08-04 Yao Qi <yao.qi@linaro.org>
4899
4900 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4901 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4902 * server.c (extended_protocol): Remove "static".
4903 * server.h (extended_protocol): Declare it.
4904
4905 2015-12-04 Josh Stone <jistone@redhat.com>
4906
4907 * target.h (struct target_ops) <arch_setup>: Rename to ...
4908 (struct target_ops) <post_create_inferior>: ... this.
4909 (target_arch_setup): Rename to ...
4910 (target_post_create_inferior): ... this, calling post_create_inferior.
4911 * server.c (start_inferior): Update target_arch_setup calls to
4912 target_post_create_inferior.
4913 * linux-low.c (linux_low_ptrace_options): Forward declare.
4914 (linux_arch_setup): Update its comment for general use.
4915 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4916 (struct linux_target_ops): Use linux_post_create_inferior.
4917 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4918 to post_create_inferior.
4919 * nto-low.c (struct nto_target_ops): Likewise.
4920 * spu-low.c (struct spu_target_ops): Likewise.
4921 * win32-low.c (struct win32_target_ops): Likewise.
4922
4923 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4924
4925 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4926
4927 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4928
4929 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4930 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4931 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4932 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4933 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4934 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4935 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4936 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4937 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4938 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4939 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4940 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4941
4942 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4943
4944 * linux-low.c (linux_look_up_symbols): Don't call
4945 linux_supports_traceclone.
4946 * linux-low.h (thread_db_init): Remove use_events argument.
4947 * thread-db.c (thread_db_use_event): Remove global variable.
4948 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4949 (struct thread_db) <td_create_bp>: Remove field.
4950 (thread_db_create_event): Remove function.
4951 (thread_db_enable_reporting): Likewise.
4952 (find_one_thread): Don't check for thread_db_use_events.
4953 (attach_thread): Likewise.
4954 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4955 (try_thread_db_load_1): Don't check for thread_db_use_events.
4956 (thread_db_init): Remove use_events argument and thread events
4957 handling.
4958 (remove_thread_event_breakpoints): Remove function.
4959 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4960
4961 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4962
4963 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4964 New function.
4965 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4966 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4967 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4968 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4969 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4970 Initialize.
4971 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4972 New function.
4973 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4974 * linux-low.c (can_hardware_single_step): Use
4975 supports_hardware_single_step.
4976 (can_software_single_step): New function.
4977 (start_step_over): Call can_software_single_step.
4978 (linux_supports_hardware_single_step): New function.
4979 (struct target_ops) <supports_software_single_step>: Initialize.
4980 * linux-low.h (struct linux_target_ops)
4981 <supports_hardware_single_step>: Initialize.
4982 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4983 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4984 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4985 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4986 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4987 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4988 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4989 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4990 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4991 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4992 Initialize.
4993 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4994 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4995 Initialize.
4996 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4997 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4998 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4999 New function.
5000 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5001 * target.h (struct target_ops): <supports_software_single_step>:
5002 New field.
5003 (target_supports_software_single_step): New macro.
5004
5005 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5006
5007 * linux-low.c (linux_wait_1): Fix pc advance condition.
5008 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5009 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5010
5011 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5012
5013 * linux-arm-low.c (arm_is_thumb_mode): New function.
5014 (arm_breakpoint_at): Use arm_is_thumb_mode.
5015 (arm_breakpoint_kind_from_current_state): New function.
5016 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5017 Initialize.
5018 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5019 (linux_breakpoint_kind_from_current_state): New function.
5020 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5021 * linux-low.h (struct linux_target_ops)
5022 <breakpoint_kind_from_current_state>: New field.
5023 * target.h (struct target_ops): Likewise.
5024 (target_breakpoint_kind_from_current_state): New macro.
5025
5026 2015-11-30 Pedro Alves <palves@redhat.com>
5027
5028 * linux-low.c (linux_resume): Wake up the event loop before
5029 returning.
5030
5031 2015-11-30 Pedro Alves <palves@redhat.com>
5032
5033 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5034 check.
5035 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5036 to -1.
5037 * target.c (struct thread_search): New structure.
5038 (thread_search_callback): New function.
5039 (prev_general_thread): New global.
5040 (prepare_to_access_memory, done_accessing_memory): New functions.
5041 * target.h (prepare_to_access_memory, done_accessing_memory):
5042 Replace macros with function declarations.
5043
5044 2015-11-30 Pedro Alves <palves@redhat.com>
5045
5046 PR 14618
5047 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5048 report TARGET_WAITKIND_NO_RESUMED.
5049 * remote-utils.c (prepare_resume_reply): Handle
5050 TARGET_WAITKIND_NO_RESUMED.
5051 * server.c (report_no_resumed): New global.
5052 (handle_query) <qSupported>: Handle "no-resumed+". Report
5053 "no-resumed+" support.
5054 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5055 return error if the client doesn't support no-resumed events.
5056 (push_stop_notification): New function.
5057 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5058 events if the client supports them.
5059
5060 2015-11-30 Pedro Alves <palves@redhat.com>
5061
5062 * linux-low.c (thread_still_has_status_pending_p): Don't check
5063 vCont;t here.
5064 (lwp_resumed): New function.
5065 (status_pending_p_callback): Return early if the LWP is not
5066 supposed to be resumed.
5067
5068 2015-11-30 Pedro Alves <palves@redhat.com>
5069
5070 * linux-low.c (handle_extended_wait): Assert that the LWP's
5071 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5072 thread create events, leave the new child's status pending.
5073 (linux_low_filter_event): If GDB wants to hear about thread exit
5074 events, leave the LWP marked dead and don't delete it.
5075 (linux_wait_for_event_filtered): Don't check for thread exit.
5076 (filter_exit_event): New function.
5077 (linux_wait_1): Use it, when returning an exit event.
5078 (linux_resume_one_lwp_throw): Assert that the LWP's
5079 waitstatus is TARGET_WAITKIND_IGNORE.
5080 * remote-utils.c (prepare_resume_reply): Handle
5081 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5082 * server.c (report_thread_events): New global.
5083 (handle_general_set): Handle QThreadEvents.
5084 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5085 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5086 TARGET_WAITKIND_THREAD_EXITED.
5087 * server.h (report_thread_events): Declare.
5088
5089 2015-11-30 Pedro Alves <palves@redhat.com>
5090
5091 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5092 the thread's last_resume_kind was resume_stop.
5093
5094 2015-11-30 Pedro Alves <palves@redhat.com>
5095
5096 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5097 before returning.
5098
5099 2015-11-30 Pedro Alves <palves@redhat.com>
5100
5101 * server.c (handle_v_requests): Handle vCtrlC.
5102
5103 2015-11-30 Pedro Alves <palves@redhat.com>
5104
5105 * gdbthread.h (find_any_thread_of_pid): Declare.
5106 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5107 functions.
5108 * server.c (handle_query): If current_thread is NULL, look for
5109 another thread of the selected process.
5110
5111 2015-11-26 Daniel Colascione <dancol@dancol.org>
5112 Simon Marchi <simon.marchi@ericsson.com>
5113
5114 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5115 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5116 name in reply.
5117 * target.h (struct target_ops) <thread_name>: New field.
5118 (target_thread_name): New macro.
5119
5120 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5121
5122 * regcache.h (regcache_invalidate_pid): Add declaration.
5123 * regcache.c (regcache_invalidate_pid): New function, extracted
5124 from regcache_invalidate.
5125 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5126 Add trivial documentation comment.
5127 * lynx-low.c: Use regcache_invalidate_pid instead of
5128 regcache_invalidate.
5129
5130 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5131
5132 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5133 and Elf64_auxv_t if the target is Android.
5134
5135 2015-11-22 Doug Evans <xdje42@gmail.com>
5136
5137 * target.h: #include <sys/types.h>.
5138
5139 2015-11-19 Pedro Alves <palves@redhat.com>
5140
5141 * linux-low.c (linux_process_qsupported): Change prototype.
5142 Adjust.
5143 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5144 Change prototype.
5145 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5146 and adjust to loop over all features.
5147 * server.c (handle_query) <qSupported>: Adjust to call
5148 target_process_qsupported once, passing it a vector of unprocessed
5149 features.
5150 * target.h (struct target_ops) <process_qsupported>: Change
5151 prototype.
5152 (target_process_qsupported): Adjust.
5153
5154 2015-11-19 Pedro Alves <palves@redhat.com>
5155
5156 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5157 mode.
5158 * configure: Regenerate.
5159
5160 2015-11-19 Pedro Alves <palves@redhat.com>
5161
5162 * configure: Regenerate.
5163
5164 2015-11-19 Yao Qi <yao.qi@linaro.org>
5165
5166 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5167 type to uint32_t.
5168
5169 2015-11-19 Yao Qi <yao.qi@linaro.org>
5170
5171 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5172 (struct aarch64_operand): Move enum out.
5173
5174 2015-11-19 Yao Qi <yao.qi@linaro.org>
5175
5176 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5177 struct user_fpsimd_state *.
5178 (aarch64_store_fpregset): Likewise.
5179
5180 2015-11-19 Yao Qi <yao.qi@linaro.org>
5181
5182 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5183 struct user_pt_regs *.
5184 (aarch64_store_gregset): Likewise.
5185
5186 2015-11-18 Pedro Alves <palves@redhat.com>
5187
5188 * Makefile.in (all_object_files): Add $IPA_OBJS.
5189
5190 2015-11-17 Pedro Alves <palves@redhat.com>
5191
5192 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5193 GDB_SIGNAL_0 and gdb_signal_to_string.
5194
5195 2015-11-17 Pedro Alves <palves@redhat.com>
5196
5197 * win32-low.c (handle_output_debug_string): Remove parameter.
5198 (win32_kill): Remove our_status local and adjust call to
5199 handle_output_debug_string.
5200 (get_child_debug_event): Adjust call to
5201 handle_output_debug_string.
5202
5203 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5204
5205 * linux-mips-low.c (mips_fill_gregset): Add cast.
5206 (mips_store_gregset): Likewise.
5207 (mips_fill_fpregset): Likewise.
5208 (mips_store_fpregset): Likewise.
5209
5210 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5211
5212 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5213 priv.
5214
5215 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5216
5217 * linux-mips-low.c (mips_linux_new_thread): Change type of
5218 watch_type to enum target_hw_bp_type.
5219
5220 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5221
5222 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5223 Change return type to arm_hwbp_type.
5224
5225 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5226
5227 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5228 (arm_store_gregset): Likewise.
5229 * linux-arm-low.c (arm_get_hwcap): Likewise.
5230 (arm_read_description): Likewise.
5231
5232 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5233
5234 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5235
5236 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5237
5238 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5239 (ppc_fill_vsxregset): Likewise.
5240 (ppc_store_vsxregset): Likewise.
5241 (ppc_fill_vrregset): Likewise.
5242 (ppc_store_vrregset): Likewise.
5243 (ppc_fill_evrregset): Likewise.
5244 (ppc_store_evrregset): Likewise.
5245
5246 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5247
5248 * linux-ppc-low.c (ppc_usrregs_info): Remove
5249 forward-declaration.
5250 (ppc_arch_setup): Move lower in file.
5251
5252 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5253
5254 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5255 (ps_pdwrite): Likewise.
5256
5257 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5258
5259 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5260 to after assert checks.
5261
5262 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5263
5264 * proc-service.c (ps_pdread): Add/adjust casts.
5265 (ps_pdwrite): Add/adjust casts.
5266
5267 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5268
5269 * server.c (handle_search_memory_1): Cast return value of
5270 memmem.
5271
5272 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5273
5274 * server.c (write_qxfer_response): Change type of data to
5275 gdb_byte *.
5276
5277 2015-10-29 Pedro Alves <palves@redhat.com>
5278
5279 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5280
5281 2015-10-29 Pedro Alves <palves@redhat.com>
5282
5283 * tracepoint.c (clear_installed_tracepoints): Add casts.
5284
5285 2015-10-29 Pedro Alves <palves@redhat.com>
5286
5287 * server.c (handle_v_cont, process_serial_event): Add enum
5288 gdb_signal casts to signal parsing code.
5289
5290 2015-10-29 Pedro Alves <palves@redhat.com>
5291
5292 * linux-low.h (NULL_REGSET): Define.
5293 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5294 * linux-arm-low.c (arm_regsets): Likewise.
5295 * linux-crisv32-low.c (cris_regsets): Likewise.
5296 * linux-m68k-low.c (m68k_regsets): Likewise.
5297 * linux-mips-low.c (mips_regsets): Likewise.
5298 * linux-nios2-low.c (nios2_regsets): Likewise.
5299 * linux-ppc-low.c (ppc_regsets): Likewise.
5300 * linux-s390-low.c (s390_regsets): Likewise.
5301 * linux-sh-low.c (sh_regsets): Likewise.
5302 * linux-sparc-low.c (sparc_regsets): Likewise.
5303 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5304 * linux-tile-low.c (tile_regsets): Likewise.
5305 * linux-x86-low.c (x86_regsets): Likewise.
5306 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5307
5308 2015-10-29 Pedro Alves <palves@redhat.com>
5309
5310 * linux-low.h (NULL_REGSET): Define.
5311 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5312 * linux-arm-low.c (arm_regsets): Likewise.
5313 * linux-crisv32-low.c (cris_regsets): Likewise.
5314 * linux-m68k-low.c (m68k_regsets): Likewise.
5315 * linux-mips-low.c (mips_regsets): Likewise.
5316 * linux-nios2-low.c (nios2_regsets): Likewise.
5317 * linux-ppc-low.c (ppc_regsets): Likewise.
5318 * linux-s390-low.c (s390_regsets): Likewise.
5319 * linux-sh-low.c (sh_regsets): Likewise.
5320 * linux-sparc-low.c (sparc_regsets): Likewise.
5321 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5322 * linux-tile-low.c (tile_regsets): Likewise.
5323 * linux-x86-low.c (x86_regsets): Likewise.
5324 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5325
5326 2015-10-26 Doug Evans <dje@google.com>
5327
5328 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5329
5330 2015-10-26 Doug Evans <dje@google.com>
5331
5332 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5333
5334 2015-10-26 Doug Evans <dje@google.com>
5335
5336 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5337 for debug_printf.
5338 (attach_thread, find_new_threads_callback): Ditto.
5339
5340 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5341
5342 * mem-break.h (set_breakpoint_data): Remove.
5343
5344 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5345
5346 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5347 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5348 (initialize_low): Remove set_breakpoint_data call.
5349 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5350 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5351 (initialize_low): Remove set_breakpoint_data call.
5352 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5353 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5354 (initialize_low): Remove set_breakpoint_data call.
5355
5356 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5357
5358 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5359 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5360 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5361 * target.h (target_breakpoint_kind_from_pc): New macro.
5362
5363 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5364
5365 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5366 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5367 the default breakpoint kind.
5368
5369 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5370
5371 * linux-arm-low.c (arm_supports_z_point_type): Add software
5372 breakpoint support.
5373
5374 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5375
5376 * linux-arm-low.c: Refactor breakpoint definitions.
5377 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5378 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5379
5380 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5381
5382 * Makefile.in: Add arm.c/o.
5383 * configure.srv: Likewise.
5384 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5385 (arm_breakpoint_kind_from_pc): New function.
5386 (arm_sw_breakpoint_from_kind): Return proper kind.
5387 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5388
5389 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5390
5391 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5392 removal.
5393 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5394 (struct raw_breakpoint) <size>: Remove.
5395 (struct raw_breakpoint) <kind>: Add.
5396 (bp_size): New function.
5397 (bp_opcode): Likewise.
5398 (find_raw_breakpoint_at): Adjust for kind.
5399 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5400 (remove_memory_breakpoint): Adjust for kind call bp_size.
5401 (set_raw_breakpoint_at): Adjust for kind.
5402 (set_breakpoint): Likewise.
5403 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5404 (delete_raw_breakpoint): Adjust for kind.
5405 (delete_breakpoint): Likewise.
5406 (find_gdb_breakpoint): Likewise.
5407 (set_gdb_breakpoint_1): Likewise.
5408 (set_gdb_breakpoint): Likewise.
5409 (delete_gdb_breakpoint_1): Likewise.
5410 (delete_gdb_breakpoint): Likewise.
5411 (uninsert_raw_breakpoint): Likewise.
5412 (reinsert_raw_breakpoint): Likewise.
5413 (set_breakpoint_data): Remove.
5414 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5415 (check_mem_read): Adjust for kind call bp_size.
5416 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5417 (clone_one_breakpoint): Adjust for kind.
5418 * mem-break.h (set_gdb_breakpoint): Likewise.
5419 (delete_gdb_breakpoint): Likewise.
5420 * server.c (process_serial_event): Likewise.
5421
5422 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5423
5424 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5425 (struct linux_target_ops) <breakpoint>: Remove.
5426 (struct linux_target_ops) <breakpoint_len>: Remove.
5427 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5428 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5429 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5430 (arm_sw_breakpoint_from_kind): New function.
5431 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5432 (struct linux_target_ops) <breakpoint>: Remove.
5433 (struct linux_target_ops) <breakpoint_len>: Remove.
5434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5436 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5437 (struct linux_target_ops) <breakpoint>: Remove.
5438 (struct linux_target_ops) <breakpoint_len>: Remove.
5439 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5441 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5442 (struct linux_target_ops) <breakpoint>: Remove.
5443 (struct linux_target_ops) <breakpoint_len>: Remove.
5444 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5445 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5446 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5447 and sw_breakpoint_from_kind to increment the pc.
5448 (linux_breakpoint_kind_from_pc): New function.
5449 (linux_sw_breakpoint_from_kind): New function.
5450 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5451 (initialize_low): Call breakpoint_kind_from_pc and
5452 sw_breakpoint_from_kind to replace breakpoint_data/len.
5453 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5454 New field.
5455 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5456 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5457 (struct linux_target_ops) <breakpoint>: Remove.
5458 (struct linux_target_ops) <breakpoint_len>: Remove.
5459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5461 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5462 (struct linux_target_ops) <breakpoint>: Remove.
5463 (struct linux_target_ops) <breakpoint_len>: Remove.
5464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5466 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5467 (struct linux_target_ops) <breakpoint>: Remove.
5468 (struct linux_target_ops) <breakpoint_len>: Remove.
5469 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5470 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5471 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5472 (struct linux_target_ops) <breakpoint>: Remove.
5473 (struct linux_target_ops) <breakpoint_len>: Remove.
5474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5476 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5477 (struct linux_target_ops) <breakpoint>: Remove.
5478 (struct linux_target_ops) <breakpoint_len>: Remove.
5479 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5480 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5481 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5482 (struct linux_target_ops) <breakpoint>: Remove.
5483 (struct linux_target_ops) <breakpoint_len>: Remove.
5484 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5485 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5486 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5487 (struct linux_target_ops) <breakpoint>: Remove.
5488 (struct linux_target_ops) <breakpoint_len>: Remove.
5489 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5490 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5491 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5492 (struct linux_target_ops) <breakpoint>: Remove.
5493 (struct linux_target_ops) <breakpoint_len>: Remove.
5494 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5495 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5496 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5497 (struct linux_target_ops) <breakpoint>: Remove.
5498 (struct linux_target_ops) <breakpoint_len>: Remove.
5499 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5500 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5501 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5502 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5503 (struct linux_target_ops) <breakpoint>: Remove.
5504 (struct linux_target_ops) <breakpoint_len>: Remove.
5505 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5506 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5507 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5508 (struct linux_target_ops) <breakpoint>: Remove.
5509 (struct linux_target_ops) <breakpoint_len>: Remove.
5510 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5511 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5512
5513 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5514
5515 * linux-cris-low.c (cris_get_pc): Remove void arg.
5516
5517 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5518
5519 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5520 variable name.
5521
5522 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5523
5524 * inferiors.c (thread_pid_matches_callback): New function.
5525 (find_thread_process): New function.
5526 (remove_thread): Reset current_thread.
5527 (remove_process): Assert threads have been removed first.
5528
5529 2015-10-15 Yao Qi <yao.qi@linaro.org>
5530
5531 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5532 if it is 3.
5533 (aarch64_remove_point): Likewise.
5534 * regcache.c (regcache_register_size): New function.
5535
5536 2015-10-12 Yao Qi <yao.qi@linaro.org>
5537
5538 * linux-aarch64-low.c: Update all callers as emit_load_store
5539 is renamed to aarch64_emit_load_store.
5540
5541 2015-10-12 Yao Qi <yao.qi@linaro.org>
5542
5543 * linux-aarch64-low.c: Update all callers of function renaming
5544 from emit_insn to aarch64_emit_insn.
5545
5546 2015-10-12 Yao Qi <yao.qi@linaro.org>
5547
5548 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5549 arch/aarch64-insn.h.
5550 (struct aarch64_memory_operand): Likewise.
5551 (ENCODE): Likewise.
5552 (emit_insn): Move to arch/aarch64-insn.c.
5553 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5554 (emit_load_store): Move to arch/aarch64-insn.c.
5555 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5556 (can_encode_int32): Remove.
5557
5558 2015-10-12 Yao Qi <yao.qi@linaro.org>
5559
5560 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5561 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5562 (aarch64_relocate_instruction): Likewise.
5563 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5564 (struct aarch64_insn_visitor): Likewise.
5565
5566 2015-10-12 Yao Qi <yao.qi@linaro.org>
5567
5568 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5569 (struct aarch64_insn_visitor): New.
5570 (struct aarch64_insn_relocation_data): New.
5571 (aarch64_ftrace_insn_reloc_b): New function.
5572 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5573 (aarch64_ftrace_insn_reloc_cb): Likewise.
5574 (aarch64_ftrace_insn_reloc_tb): Likewise.
5575 (aarch64_ftrace_insn_reloc_adr): Likewise.
5576 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5577 (aarch64_ftrace_insn_reloc_others): Likewise.
5578 (visitor): New.
5579 (aarch64_relocate_instruction): Use visitor.
5580
5581 2015-10-12 Yao Qi <yao.qi@linaro.org>
5582
5583 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5584 int. Add argument buf.
5585 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5586 aarch64_relocate_instruction.
5587
5588 2015-10-12 Yao Qi <yao.qi@linaro.org>
5589
5590 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5591 argument insn. Remove local variable insn. Don't call
5592 target_read_uint32.
5593 (aarch64_install_fast_tracepoint_jump_pad): Call
5594 target_read_uint32.
5595
5596 2015-09-30 Yao Qi <yao.qi@linaro.org>
5597
5598 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5599 (emit_load_store_pair): Likewise.
5600
5601 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5602
5603 * dll.c (match_dll): Add cast(s).
5604 (unloaded_dll): Likewise.
5605 * linux-low.c (second_thread_of_pid_p): Likewise.
5606 (delete_lwp_callback): Likewise.
5607 (count_events_callback): Likewise.
5608 (select_event_lwp_callback): Likewise.
5609 (linux_set_resume_request): Likewise.
5610 * server.c (accumulate_file_name_length): Likewise.
5611 (emit_dll_description): Likewise.
5612 (handle_qxfer_threads_worker): Likewise.
5613 (visit_actioned_threads): Likewise.
5614 * thread-db.c (any_thread_of): Likewise.
5615 * tracepoint.c (same_process_p): Likewise.
5616 (match_blocktype): Likewise.
5617 (build_traceframe_info_xml): Likewise.
5618
5619 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5620
5621 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5622 assignment.
5623 (gdb_unparse_agent_expr): Likewise.
5624 * hostio.c (require_data): Likewise.
5625 (handle_pread): Likewise.
5626 * linux-low.c (disable_regset): Likewise.
5627 (fetch_register): Likewise.
5628 (store_register): Likewise.
5629 (get_dynamic): Likewise.
5630 (linux_qxfer_libraries_svr4): Likewise.
5631 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5632 (set_fast_tracepoint_jump): Likewise.
5633 (uninsert_fast_tracepoint_jumps_at): Likewise.
5634 (reinsert_fast_tracepoint_jumps_at): Likewise.
5635 (validate_inserted_breakpoint): Likewise.
5636 (clone_agent_expr): Likewise.
5637 * regcache.c (init_register_cache): Likewise.
5638 * remote-utils.c (putpkt_binary_1): Likewise.
5639 (decode_M_packet): Likewise.
5640 (decode_X_packet): Likewise.
5641 (look_up_one_symbol): Likewise.
5642 (relocate_instruction): Likewise.
5643 (monitor_output): Likewise.
5644 * server.c (handle_search_memory): Likewise.
5645 (handle_qxfer_exec_file): Likewise.
5646 (handle_qxfer_libraries): Likewise.
5647 (handle_qxfer): Likewise.
5648 (handle_query): Likewise.
5649 (handle_v_cont): Likewise.
5650 (handle_v_run): Likewise.
5651 (captured_main): Likewise.
5652 * target.c (write_inferior_memory): Likewise.
5653 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5654 * tracepoint.c (init_trace_buffer): Likewise.
5655 (add_tracepoint_action): Likewise.
5656 (add_traceframe): Likewise.
5657 (add_traceframe_block): Likewise.
5658 (cmd_qtdpsrc): Likewise.
5659 (cmd_qtdv): Likewise.
5660 (cmd_qtstatus): Likewise.
5661 (response_source): Likewise.
5662 (response_tsv): Likewise.
5663 (cmd_qtnotes): Likewise.
5664 (gdb_collect): Likewise.
5665 (initialize_tracepoint): Likewise.
5666
5667 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5668
5669 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5670 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5671 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5672 <NOP>: New.
5673 (enum aarch64_condition_codes): New enum.
5674 (w0): New static global.
5675 (fp): Likewise.
5676 (lr): Likewise.
5677 (struct aarch64_memory_operand) <type>: New
5678 MEMORY_OPERAND_POSTINDEX type.
5679 (postindex_memory_operand): New helper function.
5680 (emit_ret): New function.
5681 (emit_load_store_pair): New function, factored out of emit_stp
5682 with support for MEMORY_OPERAND_POSTINDEX.
5683 (emit_stp): Rewrite using emit_load_store_pair.
5684 (emit_ldp): New function.
5685 (emit_load_store): Likewise.
5686 (emit_ldr): Mention post-index instruction in comment.
5687 (emit_ldrh): New function.
5688 (emit_ldrb): New function.
5689 (emit_ldrsw): Mention post-index instruction in comment.
5690 (emit_str): Likewise.
5691 (emit_subs): New function.
5692 (emit_cmp): Likewise.
5693 (emit_and): Likewise.
5694 (emit_orr): Likewise.
5695 (emit_orn): Likewise.
5696 (emit_eor): Likewise.
5697 (emit_mvn): Likewise.
5698 (emit_lslv): Likewise.
5699 (emit_lsrv): Likewise.
5700 (emit_asrv): Likewise.
5701 (emit_mul): Likewise.
5702 (emit_sbfm): Likewise.
5703 (emit_sbfx): Likewise.
5704 (emit_ubfm): Likewise.
5705 (emit_ubfx): Likewise.
5706 (emit_csinc): Likewise.
5707 (emit_cset): Likewise.
5708 (emit_nop): Likewise.
5709 (emit_ops_insns): New helper function.
5710 (emit_pop): Likewise.
5711 (emit_push): Likewise.
5712 (aarch64_emit_prologue): New function.
5713 (aarch64_emit_epilogue): Likewise.
5714 (aarch64_emit_add): Likewise.
5715 (aarch64_emit_sub): Likewise.
5716 (aarch64_emit_mul): Likewise.
5717 (aarch64_emit_lsh): Likewise.
5718 (aarch64_emit_rsh_signed): Likewise.
5719 (aarch64_emit_rsh_unsigned): Likewise.
5720 (aarch64_emit_ext): Likewise.
5721 (aarch64_emit_log_not): Likewise.
5722 (aarch64_emit_bit_and): Likewise.
5723 (aarch64_emit_bit_or): Likewise.
5724 (aarch64_emit_bit_xor): Likewise.
5725 (aarch64_emit_bit_not): Likewise.
5726 (aarch64_emit_equal): Likewise.
5727 (aarch64_emit_less_signed): Likewise.
5728 (aarch64_emit_less_unsigned): Likewise.
5729 (aarch64_emit_ref): Likewise.
5730 (aarch64_emit_if_goto): Likewise.
5731 (aarch64_emit_goto): Likewise.
5732 (aarch64_write_goto_address): Likewise.
5733 (aarch64_emit_const): Likewise.
5734 (aarch64_emit_call): Likewise.
5735 (aarch64_emit_reg): Likewise.
5736 (aarch64_emit_pop): Likewise.
5737 (aarch64_emit_stack_flush): Likewise.
5738 (aarch64_emit_zero_ext): Likewise.
5739 (aarch64_emit_swap): Likewise.
5740 (aarch64_emit_stack_adjust): Likewise.
5741 (aarch64_emit_int_call_1): Likewise.
5742 (aarch64_emit_void_call_2): Likewise.
5743 (aarch64_emit_eq_goto): Likewise.
5744 (aarch64_emit_ne_goto): Likewise.
5745 (aarch64_emit_lt_goto): Likewise.
5746 (aarch64_emit_le_goto): Likewise.
5747 (aarch64_emit_gt_goto): Likewise.
5748 (aarch64_emit_ge_got): Likewise.
5749 (aarch64_emit_ops_impl): New static global variable.
5750 (aarch64_emit_ops): New target function, return
5751 &aarch64_emit_ops_impl.
5752 (struct linux_target_ops): Install it.
5753
5754 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5755
5756 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5757 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5758 aarch64-ipa.o.
5759 * linux-aarch64-ipa.c: New file.
5760 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5761 and endian.h.
5762 (aarch64_get_thread_area): New target method.
5763 (extract_signed_bitfield): New helper function.
5764 (aarch64_decode_ldr_literal): New function.
5765 (enum aarch64_opcodes): New enum.
5766 (struct aarch64_register): New struct.
5767 (struct aarch64_operand): New struct.
5768 (x0): New static global.
5769 (x1): Likewise.
5770 (x2): Likewise.
5771 (x3): Likewise.
5772 (x4): Likewise.
5773 (w2): Likewise.
5774 (ip0): Likewise.
5775 (sp): Likewise.
5776 (xzr): Likewise.
5777 (aarch64_register): New helper function.
5778 (register_operand): Likewise.
5779 (immediate_operand): Likewise.
5780 (struct aarch64_memory_operand): New struct.
5781 (offset_memory_operand): New helper function.
5782 (preindex_memory_operand): Likewise.
5783 (enum aarch64_system_control_registers): New enum.
5784 (ENCODE): New macro.
5785 (emit_insn): New helper function.
5786 (emit_b): New function.
5787 (emit_bcond): Likewise.
5788 (emit_cb): Likewise.
5789 (emit_tb): Likewise.
5790 (emit_blr): Likewise.
5791 (emit_stp): Likewise.
5792 (emit_ldp_q_offset): Likewise.
5793 (emit_stp_q_offset): Likewise.
5794 (emit_load_store): Likewise.
5795 (emit_ldr): Likewise.
5796 (emit_ldrsw): Likewise.
5797 (emit_str): Likewise.
5798 (emit_ldaxr): Likewise.
5799 (emit_stxr): Likewise.
5800 (emit_stlr): Likewise.
5801 (emit_data_processing_reg): Likewise.
5802 (emit_data_processing): Likewise.
5803 (emit_add): Likewise.
5804 (emit_sub): Likewise.
5805 (emit_mov): Likewise.
5806 (emit_movk): Likewise.
5807 (emit_mov_addr): Likewise.
5808 (emit_mrs): Likewise.
5809 (emit_msr): Likewise.
5810 (emit_sevl): Likewise.
5811 (emit_wfe): Likewise.
5812 (append_insns): Likewise.
5813 (can_encode_int32_in): New helper function.
5814 (aarch64_relocate_instruction): New function.
5815 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5816 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5817 (struct linux_target_ops): Install aarch64_get_thread_area,
5818 aarch64_install_fast_tracepoint_jump_pad and
5819 aarch64_get_min_fast_tracepoint_insn_len.
5820
5821 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5822
5823 * Makefile.in (aarch64-insn.o): New rule.
5824 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5825
5826 2015-09-21 Yao Qi <yao.qi@linaro.org>
5827
5828 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5829
5830 2015-09-21 Yao Qi <yao.qi@linaro.org>
5831
5832 * tracepoint.c (max_jump_pad_size): Remove.
5833
5834 2015-09-18 Yao Qi <yao.qi@linaro.org>
5835
5836 * linux-aarch64-low.c: Don't include sys/uio.h.
5837 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5838
5839 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5840
5841 * tracepoint.c (eval_result_type): Change prototype.
5842 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5843
5844 2015-09-15 Pedro Alves <palves@redhat.com>
5845
5846 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5847 Check whether to report exec events instead of checking whether
5848 multiprocess is enabled.
5849
5850 2015-09-15 Pedro Alves <palves@redhat.com>
5851
5852 PR remote/18965
5853 * remote-utils.c (prepare_resume_reply): Merge
5854 TARGET_WAITKIND_VFORK_DONE switch case with the
5855 TARGET_WAITKIND_FORKED case.
5856
5857 2015-09-15 Yao Qi <yao.qi@linaro.org>
5858
5859 * server.c (handle_query): Check string comparison using
5860 "else if" instead of "if".
5861
5862 2015-09-15 Yao Qi <yao.qi@linaro.org>
5863
5864 * server.c (vCont_supported): New global variable.
5865 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5866 matches. Append ";vContSupported+" to own_buf.
5867 (handle_v_requests): Append ";s;S" to own_buf if target supports
5868 hardware single step or vCont_supported is false.
5869 (capture_main): Set vCont_supported to zero.
5870
5871 2015-09-15 Yao Qi <yao.qi@linaro.org>
5872
5873 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5874 it to ...
5875 (linux_supports_hardware_single_step): ... New function.
5876 (linux_target_ops): Update.
5877 * lynx-low.c (lynx_target_ops): Set field
5878 supports_hardware_single_step to target_can_do_hardware_single_step.
5879 * nto-low.c (nto_target_ops): Likewise.
5880 * spu-low.c (spu_target_ops): Likewise.
5881 * win32-low.c (win32_target_ops): Likewise.
5882 * target.c (target_can_do_hardware_single_step): New function.
5883 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5884 Remove. <supports_hardware_single_step>: New field.
5885 (target_supports_conditional_breakpoints): Remove.
5886 (target_supports_hardware_single_step): New macro.
5887 (target_can_do_hardware_single_step): Declare.
5888 * server.c (handle_query): Use target_supports_hardware_single_step
5889 instead of target_supports_conditional_breakpoints.
5890
5891 2015-09-15 Yao Qi <yao.qi@linaro.org>
5892
5893 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5894 function.
5895 (struct linux_target_ops the_low_target): Install
5896 aarch64_linux_siginfo_fixup.
5897
5898 2015-09-11 Don Breazeal <donb@codesourcery.com>
5899 Luis Machado <lgustavo@codesourcery.com>
5900
5901 * linux-low.c (linux_mourn): Static declaration.
5902 (linux_arch_setup): Move in front of
5903 handle_extended_wait.
5904 (linux_arch_setup_thread): New function.
5905 (handle_extended_wait): Handle exec events. Call
5906 linux_arch_setup_thread. Make event_lwp argument a
5907 pointer-to-a-pointer.
5908 (check_zombie_leaders): Do not check stopped threads.
5909 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5910 (linux_low_filter_event): Add lwp and thread for exec'ing
5911 non-leader thread if leader thread has been deleted.
5912 Refactor code into linux_arch_setup_thread and call it.
5913 Pass child lwp pointer by reference to handle_extended_wait.
5914 (linux_wait_for_event_filtered): Update comment.
5915 (linux_wait_1): Prevent clobbering exec event status.
5916 (linux_supports_exec_events): New function.
5917 (linux_target_ops) <supports_exec_events>: Initialize new member.
5918 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5919 new member.
5920 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5921 * server.c (report_exec_events): New global variable.
5922 (handle_query): Handle qSupported query for exec-events feature.
5923 (captured_main): Initialize report_exec_events.
5924 * server.h (report_exec_events): Declare new global variable.
5925 * target.h (struct target_ops) <supports_exec_events>: New
5926 member.
5927 (target_supports_exec_events): New macro.
5928 * win32-low.c (win32_target_ops) <supports_exec_events>:
5929 Initialize new member.
5930
5931 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5932
5933 * linux-low.c (linux_low_enable_btrace): Remove.
5934 (linux_target_ops): Replace linux_low_enable_btrace with
5935 linux_enable_btrace.
5936
5937 2015-09-03 Yao Qi <yao.qi@linaro.org>
5938
5939 * linux-aarch64-low.c (aarch64_insert_point): Call
5940 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5941 returns true.
5942
5943 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5944
5945 * linux-low.c (check_stopped_by_breakpoint): Use
5946 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5947
5948 2015-08-27 Pedro Alves <palves@redhat.com>
5949
5950 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5951
5952 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5953
5954 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5955 the XNEW-family equivalent.
5956 (compile_bytecodes): Likewise.
5957 * dll.c (loaded_dll): Likewise.
5958 * event-loop.c (append_callback_event): Likewise.
5959 (create_file_handler): Likewise.
5960 (create_file_event): Likewise.
5961 * hostio.c (handle_open): Likewise.
5962 * inferiors.c (add_thread): Likewise.
5963 (add_process): Likewise.
5964 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5965 * linux-arm-low.c (arm_new_process): Likewise.
5966 (arm_new_thread): Likewise.
5967 * linux-low.c (add_to_pid_list): Likewise.
5968 (linux_add_process): Likewise.
5969 (handle_extended_wait): Likewise.
5970 (add_lwp): Likewise.
5971 (enqueue_one_deferred_signal): Likewise.
5972 (enqueue_pending_signal): Likewise.
5973 (linux_resume_one_lwp_throw): Likewise.
5974 (linux_resume_one_thread): Likewise.
5975 (linux_read_memory): Likewise.
5976 (linux_write_memory): Likewise.
5977 * linux-mips-low.c (mips_linux_new_process): Likewise.
5978 (mips_linux_new_thread): Likewise.
5979 (mips_add_watchpoint): Likewise.
5980 * linux-x86-low.c (initialize_low_arch): Likewise.
5981 * lynx-low.c (lynx_add_process): Likewise.
5982 * mem-break.c (set_raw_breakpoint_at): Likewise.
5983 (set_breakpoint): Likewise.
5984 (add_condition_to_breakpoint): Likewise.
5985 (add_commands_to_breakpoint): Likewise.
5986 (clone_agent_expr): Likewise.
5987 (clone_one_breakpoint): Likewise.
5988 * regcache.c (new_register_cache): Likewise.
5989 * remote-utils.c (look_up_one_symbol): Likewise.
5990 * server.c (queue_stop_reply): Likewise.
5991 (start_inferior): Likewise.
5992 (queue_stop_reply_callback): Likewise.
5993 (handle_target_event): Likewise.
5994 * spu-low.c (fetch_ppc_memory): Likewise.
5995 (store_ppc_memory): Likewise.
5996 * target.c (set_target_ops): Likewise.
5997 * thread-db.c (thread_db_load_search): Likewise.
5998 (try_thread_db_load_1): Likewise.
5999 * tracepoint.c (add_tracepoint): Likewise.
6000 (add_tracepoint_action): Likewise.
6001 (create_trace_state_variable): Likewise.
6002 (cmd_qtdpsrc): Likewise.
6003 (cmd_qtro): Likewise.
6004 (add_while_stepping_state): Likewise.
6005 * win32-low.c (child_add_thread): Likewise.
6006 (get_image_name): Likewise.
6007
6008 2015-08-25 Yao Qi <yao.qi@linaro.org>
6009
6010 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6011
6012 2015-08-25 Yao Qi <yao.qi@linaro.org>
6013
6014 * Makefile.in (aarch64-linux.o): New rule.
6015 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6016 srv_tgtobj.
6017 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6018 (aarch64_init_debug_reg_state): Make it extern.
6019 (aarch64_linux_prepare_to_resume): Remove.
6020
6021 2015-08-25 Yao Qi <yao.qi@linaro.org>
6022
6023 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6024 lwp_arch_private_info and ptid_of_lwp.
6025
6026 2015-08-25 Yao Qi <yao.qi@linaro.org>
6027
6028 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6029 Find proc_info by find_process_pid. All callers updated.
6030
6031 2015-08-25 Yao Qi <yao.qi@linaro.org>
6032
6033 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6034 Remove.
6035 (debug_reg_change_callback): Remove.
6036 (aarch64_notify_debug_reg_change): Remove.
6037
6038 2015-08-25 Yao Qi <yao.qi@linaro.org>
6039
6040 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6041 Call current_lwp_ptid.
6042
6043 2015-08-25 Yao Qi <yao.qi@linaro.org>
6044
6045 * linux-aarch64-low.c (debug_reg_change_callback): Use
6046 debug_printf.
6047
6048 2015-08-25 Yao Qi <yao.qi@linaro.org>
6049
6050 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6051
6052 2015-08-25 Yao Qi <yao.qi@linaro.org>
6053
6054 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6055
6056 2015-08-25 Yao Qi <yao.qi@linaro.org>
6057
6058 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6059 the code.
6060
6061 2015-08-25 Yao Qi <yao.qi@linaro.org>
6062
6063 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6064 Remove.
6065 (debug_reg_change_callback): Remove argument entry and add argument
6066 lwp. Remove local variable thread. Don't print thread id in the
6067 debugging output. Don't check whether pid of thread equals to pid.
6068 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6069 iterate_over_lwps instead find_inferior.
6070
6071 2015-08-24 Pedro Alves <palves@redhat.com>
6072
6073 * inferiors.c (get_first_process): New function.
6074 * inferiors.h (get_first_process): New declaration.
6075 * remote-utils.c (read_ptid): Default to the first process in the
6076 list, instead of to the current thread's process.
6077
6078 2015-08-24 Pedro Alves <palves@redhat.com>
6079
6080 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6081 * event-loop.c: Likewise.
6082 * remote-utils.c: Likewise.
6083 * tracepoint.c: Likewise.
6084
6085 2015-08-24 Pedro Alves <palves@redhat.com>
6086
6087 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6088 ptid_get_lwp.
6089
6090 2015-08-21 Pedro Alves <palves@redhat.com>
6091
6092 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6093 instead of literal 1.
6094
6095 2015-08-21 Pedro Alves <palves@redhat.com>
6096
6097 * tdesc.c (default_description): Explicitly zero-initialize.
6098
6099 2015-08-21 Pedro Alves <palves@redhat.com>
6100
6101 PR gdb/18749
6102 * inferiors.c (remove_thread): Discard any pending stop reply for
6103 this thread.
6104 * server.c (remove_all_on_match_pid): Rename to ...
6105 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6106 instead of a pid.
6107 (discard_queued_stop_replies): Change parameter to a ptid. Now
6108 extern.
6109 (handle_v_kill, kill_inferior_callback, captured_main)
6110 (process_serial_event): Adjust.
6111 * server.h (discard_queued_stop_replies): Declare.
6112
6113 2015-08-21 Pedro Alves <palves@redhat.com>
6114
6115 * linux-low.c (wait_for_sigstop): Always switch to no thread
6116 selected if the previously current thread dies.
6117 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6118 process instead of the current thread's.
6119 * remote-utils.c (input_interrupt): Don't check if there's no
6120 current thread.
6121 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6122 current thread to the general thread fails, error out.
6123 (handle_qxfer_auxv, handle_qxfer_libraries)
6124 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6125 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6126 (handle_query): Check if there's a thread selected instead of
6127 checking whether there's any thread in the thread list.
6128 (handle_qxfer_threads, handle_qxfer_btrace)
6129 (handle_qxfer_btrace_conf): Don't error out early if there's no
6130 thread in the thread list.
6131 (handle_v_cont, myresume): Don't set the current thread to the
6132 continue thread.
6133 (process_serial_event) <Hg handling>: Also set thread_id if the
6134 previous general thread is still alive.
6135 (process_serial_event) <g/G handling>: If setting the current
6136 thread to the general thread fails, error out.
6137 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6138 thread's lwp instead of the current thread's.
6139 * target.c (set_desired_thread): If the desired thread was not
6140 found, leave the current thread pointing to NULL. Return an int
6141 (boolean) indicating success.
6142 * target.h (set_desired_thread): Change return type to int.
6143
6144 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6145
6146 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6147 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6148 #includes.
6149 (ps_get_thread_area): New function.
6150
6151 2015-08-19 Gary Benson <gbenson@redhat.com>
6152
6153 * hostio.c (handle_pread): Do not attempt to read more data
6154 than hostio_reply_with_data can fit in a packet.
6155
6156 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6157
6158 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6159
6160 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6161
6162 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6163
6164 2015-08-06 Pedro Alves <palves@redhat.com>
6165
6166 * tracepoint.c (expr_eval_result): Now an int.
6167
6168 2015-08-06 Pedro Alves <palves@redhat.com>
6169
6170 * gdbthread.h (struct regcache): Forward declare.
6171 (struct thread_info) <regcache_data>: Now a struct regcache
6172 pointer.
6173 * inferiors.c (inferior_regcache_data)
6174 (set_inferior_regcache_data): Now work with struct regcache
6175 pointers.
6176 * inferiors.h (struct regcache): Forward declare.
6177 (inferior_regcache_data, set_inferior_regcache_data): Now work
6178 with struct regcache pointers.
6179 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6180 (free_register_cache_thread): Remove struct regcache pointer
6181 casts.
6182
6183 2015-08-06 Pedro Alves <palves@redhat.com>
6184
6185 * server.c (captured_main): On error, print the exception message
6186 to stderr, and if run_once is set, throw a quit.
6187
6188 2015-08-06 Pedro Alves <palves@redhat.com>
6189
6190 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6191 the current thread.
6192
6193 2015-08-06 Pedro Alves <palves@redhat.com>
6194
6195 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6196 reading beyond the passed in buffer length.
6197
6198 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6199
6200 * tracepoint.c (symbol_list) <required>: Remove.
6201
6202 2015-08-06 Pedro Alves <palves@redhat.com>
6203
6204 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6205 count if stopping and suspending threads.
6206 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6207 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6208 (linux_detach): Complete an ongoing step-over.
6209 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6210 throughout.
6211 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6212 (linux_wait_1): If passing a signal to the inferior after
6213 finishing a step-over, unsuspend and re-resume all lwps. If we
6214 see a single-step event but the thread should be continuing, don't
6215 pass the trap to gdb.
6216 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6217 internal_error instead of gdb_assert.
6218 (enqueue_pending_signal): New function.
6219 (check_ptrace_stopped_lwp_gone): Add debug output.
6220 (start_step_over): Use internal_error instead of gdb_assert.
6221 (complete_ongoing_step_over): New function.
6222 (linux_resume_one_thread): Don't resume a suspended thread.
6223 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6224 it stepping.
6225
6226 2015-08-06 Pedro Alves <palves@redhat.com>
6227
6228 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6229 (linux_thread_alive): Use lwp_is_marked_dead.
6230 (extended_event_reported): Delete.
6231 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6232 instead of extended_event_reported.
6233 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6234 as well.
6235 (lwp_is_marked_dead): New function.
6236 (lwp_running): Use lwp_is_marked_dead.
6237 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6238 comment.
6239
6240 2015-08-06 Pedro Alves <palves@redhat.com>
6241
6242 * linux-low.c (linux_wait_1): Move fork event output out of the
6243 !report_to_gdb check. Pass event_child->waitstatus to
6244 target_waitstatus_to_string instead of ourstatus.
6245
6246 2015-08-04 Yao Qi <yao.qi@linaro.org>
6247
6248 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6249 if current_thread is 32 bit.
6250
6251 2015-08-04 Yao Qi <yao.qi@linaro.org>
6252
6253 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6254 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6255 * server.c (extended_protocol): Remove "static".
6256 * server.h (extended_protocol): Declare it.
6257
6258 2015-08-04 Yao Qi <yao.qi@linaro.org>
6259
6260 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6261 both aarch64 and aarch32.
6262 (aarch64_set_pc): Likewise.
6263
6264 2015-08-04 Yao Qi <yao.qi@linaro.org>
6265
6266 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6267 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6268 arm-with-neon.xml to srv_xmlfiles.
6269 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6270 (is_64bit_tdesc): New function.
6271 (aarch64_linux_read_description): New function.
6272 (aarch64_arch_setup): Call aarch64_linux_read_description.
6273 (regs_info): Rename to regs_info_aarch64.
6274 (aarch64_regs_info): Return right regs_info.
6275 (initialize_low_arch): Call initialize_low_arch_aarch32.
6276
6277 2015-08-04 Yao Qi <yao.qi@linaro.org>
6278
6279 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6280 * linux-aarch32-low.c: New file.
6281 * linux-aarch32-low.h: New file.
6282 * linux-arm-low.c (arm_fill_gregset): Move it to
6283 linux-aarch32-low.c.
6284 (arm_store_gregset): Likewise.
6285 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6286 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6287 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6288 (regs_info): Rename to regs_info_arm.
6289 (arm_regs_info): Return regs_info_aarch32 if
6290 have_ptrace_getregset is 1 and target description is
6291 arm_with_neon or arm_with_vfpv3.
6292 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6293 Call initialize_low_arch_aarch32 instead.
6294
6295 2015-08-04 Yao Qi <yao.qi@linaro.org>
6296
6297 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6298 * linux-low.c: ... here.
6299 * linux-low.h (have_ptrace_getregset): Declare it.
6300
6301 2015-08-04 Pedro Alves <palves@redhat.com>
6302
6303 * thread-db.c (struct thread_db): Use new typedefs.
6304 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6305 CHK calls.
6306 (disable_thread_event_reporting): Cast result of dlsym to
6307 destination function pointer type.
6308 (thread_db_mourn): Use td_ta_delete_ftype.
6309
6310 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6311
6312 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6313 arch variant.
6314 (CDX_BREAKPOINT): Define for R2.
6315 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6316 (the_low_target): Add comments.
6317
6318 2015-07-30 Yao Qi <yao.qi@linaro.org>
6319
6320 * linux-arm-low.c (arm_hwcap): Remove it.
6321 (arm_read_description): New local variable arm_hwcap. Don't
6322 set arm_hwcap to zero.
6323
6324 2015-07-30 Yao Qi <yao.qi@linaro.org>
6325
6326 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6327 Use regcache->tdesc instead.
6328 (arm_store_wmmxregset): Likewise.
6329 (arm_fill_vfpregset): Likewise.
6330 (arm_store_vfpregset): Likewise.
6331
6332 2015-07-30 Yao Qi <yao.qi@linaro.org>
6333
6334 * linux-arm-low.c: Include arch/arm.h.
6335 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6336 (arm_store_gregset): Likewise.
6337
6338 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6339
6340 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6341 ptrace's 4th parameter.
6342
6343 2015-07-27 Yao Qi <yao.qi@linaro.org>
6344
6345 * configure.srv (case aarch64*-*-linux*): Don't set
6346 srv_linux_usrregs.
6347
6348 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6349
6350 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6351 sys/ptrace.h.
6352 * linux-arm-low.c: Likewise.
6353 * linux-cris-low.c: Likewise.
6354 * linux-crisv32-low.c: Likewise.
6355 * linux-low.c: Likewise.
6356 * linux-m68k-low.c: Likewise.
6357 * linux-mips-low.c: Likewise.
6358 * linux-nios2-low.c: Likewise.
6359 * linux-s390-low.c: Likewise.
6360 * linux-sparc-low.c: Likewise.
6361 * linux-tic6x-low.c: Likewise.
6362 * linux-tile-low.c: Likewise.
6363 * linux-x86-low.c: Likewise.
6364
6365 2015-07-24 Pedro Alves <palves@redhat.com>
6366
6367 * config.in: Regenerate.
6368 * configure: Regenerate.
6369
6370 2015-07-24 Pedro Alves <palves@redhat.com>
6371
6372 * acinclude.m4: Include ../ptrace.m4.
6373 * configure.ac: Call GDB_AC_PTRACE.
6374 * config.in, configure: Regenerate.
6375
6376 2015-07-24 Yao Qi <yao.qi@linaro.org>
6377
6378 * linux-low.c (linux_create_inferior): Remove setting to
6379 proc->priv->new_inferior.
6380 (linux_attach): Likewise.
6381 (linux_low_filter_event): Likewise.
6382 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6383
6384 2015-07-24 Yao Qi <yao.qi@linaro.org>
6385
6386 * linux-low.c (linux_arch_setup): New function.
6387 (linux_low_filter_event): If proc->tdesc is NULL and
6388 proc->attached is true, call the_low_target.arch_setup.
6389 Otherwise, keep status pending, and return.
6390 (linux_resume_one_lwp_throw): Don't call get_pc if
6391 thread->while_stepping isn't NULL. Don't call
6392 get_thread_regcache if proc->tdesc is NULL.
6393 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6394 (linux_target_ops): Install arch_setup.
6395 * server.c (start_inferior): Call the_target->arch_setup.
6396 * target.h (struct target_ops) <arch_setup>: New field.
6397 (target_arch_setup): New marco.
6398 * lynx-low.c (lynx_target_ops): Update.
6399 * nto-low.c (nto_target_ops): Update.
6400 * spu-low.c (spu_target_ops): Update.
6401 * win32-low.c (win32_target_ops): Update.
6402
6403 2015-07-24 Yao Qi <yao.qi@linaro.org>
6404
6405 * linux-low.c (linux_add_process): Don't set
6406 proc->priv->new_inferior.
6407 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6408 (linux_attach): Likewise.
6409
6410 2015-07-24 Yao Qi <yao.qi@linaro.org>
6411
6412 * server.c (start_inferior): Code refactor.
6413
6414 2015-07-24 Yao Qi <yao.qi@linaro.org>
6415
6416 * server.c (process_serial_event): Set general_thread.
6417
6418 2015-07-21 Yao Qi <yao.qi@linaro.org>
6419
6420 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6421 aarch64_linux_get_debug_reg_capacity.
6422
6423 2015-07-17 Yao Qi <yao.qi@linaro.org>
6424
6425 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6426 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6427 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6428 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6429 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6430 (AARCH64_HWP_ALIGNMENT): Likewise.
6431 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6432 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6433 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6434 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6435 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6436 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6437 (struct aarch64_debug_reg_state): Likewise.
6438 (struct arch_lwp_info): Likewise.
6439 (aarch64_align_watchpoint): Likewise.
6440 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6441 (aarch64_watchpoint_length): Likewise.
6442 (aarch64_point_encode_ctrl_reg): Likewise
6443 (aarch64_point_is_aligned): Likewise.
6444 (aarch64_align_watchpoint): Likewise.
6445 (aarch64_linux_set_debug_regs):
6446 (aarch64_dr_state_insert_one_point): Likewise.
6447 (aarch64_dr_state_remove_one_point): Likewise.
6448 (aarch64_handle_breakpoint): Likewise.
6449 (aarch64_handle_aligned_watchpoint): Likewise.
6450 (aarch64_handle_unaligned_watchpoint): Likewise.
6451 (aarch64_handle_watchpoint): Likewise.
6452
6453 2015-07-17 Yao Qi <yao.qi@linaro.org>
6454
6455 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6456 and don't aarch64_get_debug_reg_state. All callers update.
6457 (aarch64_handle_aligned_watchpoint): Likewise.
6458 (aarch64_handle_unaligned_watchpoint): Likewise.
6459 (aarch64_handle_watchpoint): Likewise.
6460 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6461 (aarch64_remove_point): Likewise.
6462
6463 2015-07-17 Yao Qi <yao.qi@linaro.org>
6464
6465 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6466 debug_printf.
6467 (aarch64_handle_unaligned_watchpoint): Likewise.
6468
6469 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6470
6471 Revert the previous 3 commits:
6472 Move gdb_regex* to common/
6473 Move linux_find_memory_regions_full & co.
6474 gdbserver build-id attribute generator
6475
6476 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6477 Jan Kratochvil <jan.kratochvil@redhat.com>
6478
6479 gdbserver build-id attribute generator.
6480 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6481 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6482 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6483 (find_phdr): New.
6484 (get_dynamic): Use find_pdhr to traverse program headers.
6485 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6486 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6487 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6488 (get_hex_build_id): New.
6489 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6490 to reply XML document.
6491
6492 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6493 Jan Kratochvil <jan.kratochvil@redhat.com>
6494
6495 * target.c: Include target/target-utils.h and fcntl.h.
6496 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6497 (target_fileio_read_stralloc): New functions.
6498
6499 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6500
6501 * Makefile.in (OBS): Add gdb_regex.o.
6502 (gdb_regex.o): New.
6503 * config.in: Rebuilt.
6504 * configure: Rebuilt.
6505
6506 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6507 Jan Kratochvil <jan.kratochvil@redhat.com>
6508
6509 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6510 * Makefile.in (OBS): Add target-utils.o.
6511 (linux-maps.o, target-utils.o): New.
6512 * configure.srv (srv_linux_obj): Add linux-maps.o.
6513
6514 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6515
6516 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6517 function, return 1.
6518 (the_low_target): Install it.
6519
6520 2015-07-14 Pedro Alves <palves@redhat.com>
6521
6522 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6523 Instead, ignore ECHILD, and throw an error for other errnos.
6524
6525 2015-07-10 Pedro Alves <palves@redhat.com>
6526
6527 * event-loop.c (struct callback_event) <data>: Change type to
6528 gdb_client_data instance instead of gdb_client_data pointer.
6529 (append_callback_event): Adjust.
6530
6531 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6532
6533 * linux-aarch64-low.c: Add comments for each linux_target_ops
6534 method. Remove comments already covered in target_ops and
6535 linux_target_ops definitions.
6536 (the_low_target): Add comments for each unimplemented method.
6537
6538 2015-07-09 Yao Qi <yao.qi@linaro.org>
6539
6540 * linux-aarch64-low.c (aarch64_regmap): Remove.
6541 (aarch64_usrregs_info): Remove.
6542 (regs_info): Set field usrregs to NULL.
6543
6544 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6545
6546 * linux-low.c: Include "rsp-low.h"
6547 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6548 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6549 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6550 (handle_btrace_enable_pt): New.
6551 (handle_btrace_general_set): Support "pt".
6552 (handle_btrace_conf_general_set): Support "pt:size".
6553
6554 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6555
6556 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6557 Z_PACKET_SW_BP.
6558
6559 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6560
6561 * linux-aarch64-low.c: Remove comment about endianness.
6562 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6563 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6564 memcmp.
6565
6566 2015-06-24 Gary Benson <gbenson@redhat.com>
6567
6568 * linux-i386-ipa.c (stdint.h): Do not include.
6569 * lynx-i386-low.c (stdint.h): Likewise.
6570 * lynx-ppc-low.c (stdint.h): Likewise.
6571 * mem-break.c (stdint.h): Likewise.
6572 * thread-db.c (stdint.h): Likewise.
6573 * tracepoint.c (stdint.h): Likewise.
6574 * win32-low.c (stdint.h): Likewise.
6575
6576 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6577
6578 * server.c (write_qxfer_response): Update call to
6579 remote_escape_output.
6580
6581 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6582 Jan Kratochvil <jan.kratochvil@redhat.com>
6583
6584 Merge multiple hex conversions.
6585 * gdbreplay.c (tohex): Rename to 'fromhex'.
6586 (logchar): Use fromhex.
6587
6588 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6589
6590 * server.c (handle_qxfer_libraries): Set `version' attribute for
6591 <library-list>.
6592
6593 2015-06-10 Gary Benson <gbenson@redhat.com>
6594
6595 * target.h (struct target_ops) <multifs_open>: New field.
6596 <multifs_unlink>: Likewise.
6597 <multifs_readlink>: Likewise.
6598 * linux-low.c (nat/linux-namespaces.h): New include.
6599 (linux_target_ops): Initialize the_target->multifs_open,
6600 the_target->multifs_unlink and the_target->multifs_readlink.
6601 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6602 * hostio.c (hostio_fs_pid): New static variable.
6603 (hostio_handle_new_gdb_connection): New function.
6604 (handle_setfs): Likewise.
6605 (handle_open): Use the_target->multifs_open as appropriate.
6606 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6607 (handle_readlink): Use the_target->multifs_readlink as
6608 appropriate.
6609 (handle_vFile): Handle vFile:setfs packets.
6610 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6611 after target_handle_new_gdb_connection.
6612
6613 2015-06-10 Gary Benson <gbenson@redhat.com>
6614
6615 * configure.ac (AC_CHECK_FUNCS): Add setns.
6616 * config.in: Regenerate.
6617 * configure: Likewise.
6618 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6619 (linux-namespaces.o): New rule.
6620 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6621
6622 2015-06-09 Gary Benson <gbenson@redhat.com>
6623
6624 * hostio.c (handle_open): Process mode argument with
6625 fileio_to_host_mode.
6626
6627 2015-06-01 Yao Qi <yao.qi@linaro.org>
6628
6629 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6630 * linux-x86-low.c: Likewise.
6631
6632 2015-05-28 Don Breazeal <donb@codesourcery.com>
6633
6634 * linux-low.c (handle_extended_wait): Initialize
6635 thread_info.last_resume_kind for new fork children.
6636
6637 2015-05-15 Pedro Alves <palves@redhat.com>
6638
6639 * target.h (target_handle_new_gdb_connection): Rewrite using if
6640 wrapped in do/while.
6641
6642 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6643
6644 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6645 * configure, config.in: Regenerate.
6646 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6647 Declare typedef.
6648
6649 2015-05-12 Don Breazeal <donb@codesourcery.com>
6650
6651 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6652 PTRACE_EVENT_VFORK_DONE.
6653 (linux_low_ptrace_options, extended_event_reported): Add vfork
6654 events.
6655 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6656 and "vforkdone" for RSP 'T' Stop Reply Packet.
6657 * server.h (report_vfork_events): Declare
6658 global variable.
6659
6660 2015-05-12 Don Breazeal <donb@codesourcery.com>
6661
6662 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6663 (the_low_target) <new_fork>: Initialize new member.
6664 * linux-arm-low.c (arm_new_fork): New function.
6665 (the_low_target) <new_fork>: Initialize new member.
6666 * linux-low.c (handle_extended_wait): Call new target function
6667 new_fork.
6668 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6669 * linux-mips-low.c (mips_add_watchpoint): New function
6670 extracted from mips_insert_point.
6671 (the_low_target) <new_fork>: Initialize new member.
6672 (mips_linux_new_fork): New function.
6673 (mips_insert_point): Call mips_add_watchpoint.
6674 * linux-x86-low.c (x86_linux_new_fork): New function.
6675 (the_low_target) <new_fork>: Initialize new member.
6676
6677 2015-05-12 Don Breazeal <donb@codesourcery.com>
6678
6679 * linux-low.c (handle_extended_wait): Implement return value,
6680 rename argument 'event_child' to 'event_lwp', handle
6681 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6682 (linux_low_ptrace_options): New function.
6683 (linux_low_filter_event): Call linux_low_ptrace_options,
6684 use different argument fo linux_enable_event_reporting,
6685 use return value from handle_extended_wait.
6686 (extended_event_reported): New function.
6687 (linux_wait_1): Call extended_event_reported and set
6688 status to report fork events.
6689 (linux_write_memory): Add pid to debug message.
6690 (reset_lwp_ptrace_options_callback): New function.
6691 (linux_handle_new_gdb_connection): New function.
6692 (linux_target_ops): Initialize new structure member.
6693 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6694 * lynx-low.c: Initialize new structure member.
6695 * remote-utils.c (prepare_resume_reply): Implement stop reason
6696 "fork" for "T" stop message.
6697 * server.c (handle_query): Call handle_new_gdb_connection.
6698 * server.h (report_fork_events): Declare global flag.
6699 * target.h (struct target_ops) <handle_new_gdb_connection>:
6700 New member.
6701 (target_handle_new_gdb_connection): New macro.
6702 * win32-low.c: Initialize new structure member.
6703
6704 2015-05-12 Don Breazeal <donb@codesourcery.com>
6705
6706 * mem-break.c (APPEND_TO_LIST): Define macro.
6707 (clone_agent_expr): New function.
6708 (clone_one_breakpoint): New function.
6709 (clone_all_breakpoints): New function.
6710 * mem-break.h: Declare new functions.
6711
6712 2015-05-12 Don Breazeal <donb@codesourcery.com>
6713
6714 * linux-low.c (linux_supports_fork_events): New function.
6715 (linux_supports_vfork_events): New function.
6716 (linux_target_ops): Initialize new structure members.
6717 (initialize_low): Call linux_check_ptrace_features.
6718 * lynx-low.c (lynx_target_ops): Initialize new structure
6719 members.
6720 * server.c (report_fork_events, report_vfork_events):
6721 New global flags.
6722 (handle_query): Add new features to qSupported packet and
6723 response.
6724 (captured_main): Initialize new global variables.
6725 * target.h (struct target_ops) <supports_fork_events>:
6726 New member.
6727 <supports_vfork_events>: New member.
6728 (target_supports_fork_events): New macro.
6729 (target_supports_vfork_events): New macro.
6730 * win32-low.c (win32_target_ops): Initialize new structure
6731 members.
6732
6733 2015-05-12 Gary Benson <gbenson@redhat.com>
6734
6735 * server.c (handle_qxfer_exec_file): Use current process
6736 if annex is empty.
6737
6738 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6739
6740 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6741 Remove HAVE_PTRACE_GETREGS conditionals.
6742 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6743 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6744
6745 2015-05-08 Yao Qi <yao.qi@linaro.org>
6746
6747 * linux-low.c (linux_supports_conditional_breakpoints): New
6748 function.
6749 (linux_target_ops): Install new target method.
6750 * lynx-low.c (lynx_target_ops): Install NULL hook for
6751 supports_conditional_breakpoints.
6752 * nto-low.c (nto_target_ops): Likewise.
6753 * spu-low.c (spu_target_ops): Likewise.
6754 * win32-low.c (win32_target_ops): Likewise.
6755 * server.c (handle_query): Check
6756 target_supports_conditional_breakpoints.
6757 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6758 New field.
6759 (target_supports_conditional_breakpoints): New macro.
6760
6761 2015-05-06 Pedro Alves <palves@redhat.com>
6762
6763 PR server/18081
6764 * server.c (start_inferior): If the process exits, mourn it.
6765
6766 2015-04-21 Gary Benson <gbenson@redhat.com>
6767
6768 * hostio.c (fileio_open_flags_to_host): Factored out to
6769 fileio_to_host_openflags in common/fileio.c. Single use
6770 updated.
6771
6772 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6773
6774 * linux-xtensa-low.c (xtensa_fill_gregset)
6775 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6776 XCHAL_HAVE_LOOP.
6777
6778 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6779
6780 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6781 (regs_info): Replace usrregs pointer with NULL.
6782
6783 2015-04-17 Gary Benson <gbenson@redhat.com>
6784
6785 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6786 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6787 * server.c (handle_qxfer_exec_file): New function.
6788 (qxfer_packets): Add exec-file entry.
6789 (handle_query): Report qXfer:exec-file:read as supported packet.
6790
6791 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6792
6793 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6794
6795 2015-04-09 Gary Benson <gbenson@redhat.com>
6796
6797 * hostio-errno.c (errno_to_fileio_error): Remove function.
6798 Update caller to use remote_fileio_to_fio_error.
6799
6800 2015-04-09 Yao Qi <yao.qi@linaro.org>
6801
6802 * linux-low.c (linux_insert_point): Call
6803 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6804 (linux_remove_point): Call remove_memory_breakpoint if type is
6805 raw_bkpt_type_sw.
6806 * linux-x86-low.c (x86_insert_point): Don't call
6807 insert_memory_breakpoint.
6808 (x86_remove_point): Don't call remove_memory_breakpoint.
6809
6810 2015-04-01 Pedro Alves <palves@redhat.com>
6811 Cleber Rosa <crosa@redhat.com>
6812
6813 * server.c (gdbserver_usage): Reorganize and extend the usage
6814 message.
6815
6816 2015-03-24 Pedro Alves <palves@redhat.com>
6817
6818 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6819 output. Also dump TRAP_TRACE.
6820 (linux_low_filter_event): In debug output, distinguish a
6821 resume_stop SIGSTOP from a delayed SIGSTOP.
6822
6823 2015-03-24 Gary Benson <gbenson@redhat.com>
6824
6825 * linux-x86-low.c (x86_linux_new_thread): Moved to
6826 nat/x86-linux.c.
6827 (x86_linux_prepare_to_resume): Likewise.
6828
6829 2015-03-24 Gary Benson <gbenson@redhat.com>
6830
6831 * Makefile.in (x86-linux-dregs.o): New rule.
6832 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6833 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6834 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6835 (x86_linux_dr_get): Likewise.
6836 (x86_linux_dr_set): Likewise.
6837 (update_debug_registers_callback): Likewise.
6838 (x86_linux_dr_set_addr): Likewise.
6839 (x86_linux_dr_get_addr): Likewise.
6840 (x86_linux_dr_set_control): Likewise.
6841 (x86_linux_dr_get_control): Likewise.
6842 (x86_linux_dr_get_status): Likewise.
6843 (x86_linux_update_debug_registers): Likewise.
6844
6845 2015-03-24 Gary Benson <gbenson@redhat.com>
6846
6847 * linux-x86-low.c (x86_linux_update_debug_registers):
6848 New function, factored out from...
6849 (x86_linux_prepare_to_resume): ...this.
6850
6851 2015-03-24 Gary Benson <gbenson@redhat.com>
6852
6853 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6854 (x86_linux_dr_set): Likewise.
6855 (update_debug_registers_callback): Likewise.
6856 (x86_linux_dr_set_addr): Likewise.
6857 (x86_linux_dr_get_addr): Likewise.
6858 (x86_linux_dr_set_control): Likewise.
6859 (x86_linux_dr_get_control): Likewise.
6860 (x86_linux_dr_get_status): Likewise.
6861 (x86_linux_prepare_to_resume): Likewise.
6862
6863 2015-03-24 Gary Benson <gbenson@redhat.com>
6864
6865 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6866 Use perror_with_name. Pass string through gettext.
6867 (x86_linux_dr_set): Likewise.
6868
6869 2015-03-24 Gary Benson <gbenson@redhat.com>
6870
6871 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6872 (x86_linux_dr_set_addr): ...this.
6873 (x86_dr_low_get_addr): Rename to...
6874 (x86_linux_dr_get_addr): ...this.
6875 (x86_dr_low_set_control): Rename to...
6876 (x86_linux_dr_set_control): ...this.
6877 (x86_dr_low_get_control): Rename to...
6878 (x86_linux_dr_get_control): ...this.
6879 (x86_dr_low_get_status): Rename to...
6880 (x86_linux_dr_get_status): ...this.
6881 (x86_dr_low): Update with new function names.
6882
6883 2015-03-24 Gary Benson <gbenson@redhat.com>
6884
6885 * Makefile.in (x86-linux.o): New rule.
6886 * configure.srv: Add x86-linux.o to relevant targets.
6887 * linux-low.c (lwp_set_arch_private_info): New function.
6888 (lwp_arch_private_info): Likewise.
6889 * linux-x86-low.c: Include nat/x86-linux.h.
6890 (arch_lwp_info): Removed structure.
6891 (update_debug_registers_callback):
6892 Use lwp_set_debug_registers_changed.
6893 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6894 and lwp_set_debug_registers_changed.
6895 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6896
6897 2015-03-24 Gary Benson <gbenson@redhat.com>
6898
6899 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6900 * linux-arm-low.c (arm_new_thread): Likewise.
6901 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6902 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6903 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6904 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6905
6906 2015-03-24 Gary Benson <gbenson@redhat.com>
6907
6908 * linux-low.c (ptid_of_lwp): New function.
6909 (lwp_is_stopped): Likewise.
6910 (lwp_stop_reason): Likewise.
6911 * linux-x86-low.c (update_debug_registers_callback):
6912 Use lwp_is_stopped.
6913 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6914 lwp_stop_reason.
6915
6916 2015-03-24 Gary Benson <gbenson@redhat.com>
6917
6918 * linux-low.h (linux_stop_lwp): Remove declaration.
6919
6920 2015-03-24 Gary Benson <gbenson@redhat.com>
6921
6922 * linux-low.h: Include nat/linux-nat.h.
6923 * linux-low.c (iterate_over_lwps_args): New structure.
6924 (iterate_over_lwps_filter): New function.
6925 (iterate_over_lwps): Likewise.
6926 * linux-x86-low.c (update_debug_registers_callback):
6927 Update signature to what iterate_over_lwps expects.
6928 Remove PID check that iterate_over_lwps now performs.
6929 (x86_dr_low_set_addr): Use iterate_over_lwps.
6930 (x86_dr_low_set_control): Likewise.
6931
6932 2015-03-24 Gary Benson <gbenson@redhat.com>
6933
6934 * linux-x86-low.c (x86_debug_reg_state): New function.
6935 (x86_linux_prepare_to_resume): Use the above.
6936
6937 2015-03-24 Gary Benson <gbenson@redhat.com>
6938
6939 * linux-low.c (current_lwp_ptid): New function.
6940 * linux-x86-low.c: Include nat/linux-nat.h.
6941 (x86_dr_low_get_addr): Use current_lwp_ptid.
6942 (x86_dr_low_get_control): Likewise.
6943 (x86_dr_low_get_status): Likewise.
6944
6945 2015-03-20 Pedro Alves <palves@redhat.com>
6946
6947 * tracepoint.c (cmd_qtstatus): Make "str" const.
6948
6949 2015-03-20 Pedro Alves <palves@redhat.com>
6950
6951 * server.c (handle_general_set): Make "req_str" const.
6952
6953 2015-03-19 Pedro Alves <palves@redhat.com>
6954
6955 * linux-low.c (linux_resume_one_lwp): Rename to ...
6956 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6957 instead call perror_with_name.
6958 (check_ptrace_stopped_lwp_gone): New function.
6959 (linux_resume_one_lwp): Reimplement as wrapper around
6960 linux_resume_one_lwp_throw that swallows errors if the LWP is
6961 gone.
6962
6963 2015-03-19 Pedro Alves <palves@redhat.com>
6964
6965 * linux-low.c (count_events_callback, select_event_lwp_callback):
6966 No longer check whether the thread has resume_stop as last resume
6967 kind.
6968
6969 2015-03-19 Pedro Alves <palves@redhat.com>
6970
6971 * linux-low.c (count_events_callback, select_event_lwp_callback):
6972 Use the lwp's status_pending_p field, not the thread's.
6973
6974 2015-03-19 Pedro Alves <palves@redhat.com>
6975
6976 * linux-low.c (select_event_lwp_callback): Update comments to
6977 no longer mention SIGTRAP.
6978
6979 2015-03-18 Gary Benson <gbenson@redhat.com>
6980
6981 * server.c (handle_query): Do not report vFile:fstat as supported.
6982
6983 2015-03-11 Gary Benson <gbenson@redhat.com>
6984
6985 * hostio.c (sys/types.h): New include.
6986 (sys/stat.h): Likewise.
6987 (common-remote-fileio.h): Likewise.
6988 (handle_fstat): New function.
6989 (handle_vFile): Handle vFile:fstat packets.
6990
6991 2015-03-11 Gary Benson <gbenson@redhat.com>
6992
6993 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6994 struct stat.st_blocks and struct stat.st_blksize.
6995 * configure: Regenerate.
6996 * config.in: Likewise.
6997 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6998 (OBS): Add common-remote-fileio.o.
6999 (common-remote-fileio.o): New rule.
7000
7001 2015-03-09 Pedro Alves <palves@redhat.com>
7002
7003 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7004 'struct sockaddr' pointer in 'accept' call.
7005
7006 2015-03-09 Pedro Alves <palves@redhat.com>
7007
7008 Revert:
7009 2015-03-07 Pedro Alves <palves@redhat.com>
7010 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7011 or <winsock2.h> here. Instead include "gdb_socket.h".
7012 (remote_open): Use union gdb_sockaddr_u.
7013 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7014 or <winsock2.h> here. Instead include "gdb_socket.h".
7015 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7016 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7017 or <sys/un.h>.
7018 (init_named_socket, gdb_agent_helper_thread): Use union
7019 gdb_sockaddr_u.
7020
7021 2015-03-07 Pedro Alves <palves@redhat.com>
7022
7023 * configure.ac (build_warnings): Move
7024 -Wdeclaration-after-statement to the C-specific set.
7025 * configure: Regenerate.
7026
7027 2015-03-07 Pedro Alves <palves@redhat.com>
7028
7029 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7030 or <winsock2.h> here. Instead include "gdb_socket.h".
7031 (remote_open): Use union gdb_sockaddr_u.
7032 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7033 or <winsock2.h> here. Instead include "gdb_socket.h".
7034 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7035 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7036 or <sys/un.h>.
7037 (init_named_socket, gdb_agent_helper_thread): Use union
7038 gdb_sockaddr_u.
7039
7040 2015-03-07 Pedro Alves <palves@redhat.com>
7041
7042 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7043 instead.
7044
7045 2015-03-06 Yao Qi <yao.qi@linaro.org>
7046
7047 * linux-aarch64-low.c (aarch64_insert_point): Use
7048 show_debug_regs as a boolean.
7049 (aarch64_remove_point): Likewise.
7050
7051 2015-03-05 Pedro Alves <palves@redhat.com>
7052
7053 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7054 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7055 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7056 * nto-low.c (nto_target_ops): Likewise.
7057 * spu-low.c (spu_target_ops): Likewise.
7058 * win32-low.c (win32_target_ops): Likewise.
7059
7060 2015-03-04 Pedro Alves <palves@redhat.com>
7061
7062 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7063 Decide whether a breakpoint triggered based on the SIGTRAP's
7064 siginfo.si_code.
7065 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7066 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7067 (linux_low_filter_event): Check for breakpoints before checking
7068 watchpoints.
7069 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7070 siginfo.si_code.
7071 (linux_stopped_by_sw_breakpoint)
7072 (linux_supports_stopped_by_sw_breakpoint)
7073 (linux_stopped_by_hw_breakpoint)
7074 (linux_supports_stopped_by_hw_breakpoint): New functions.
7075 (linux_target_ops): Install new target methods.
7076
7077 2015-03-04 Pedro Alves <palves@redhat.com>
7078
7079 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7080 * server.c (swbreak_feature, hwbreak_feature): New globals.
7081 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7082 (captured_main): Clear swbreak_feature and hwbreak_feature.
7083 * server.h (swbreak_feature, hwbreak_feature): Declare.
7084 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7085 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7086 supports_stopped_by_hw_breakpoint>: New fields.
7087 (target_supports_stopped_by_sw_breakpoint)
7088 (target_stopped_by_sw_breakpoint)
7089 (target_supports_stopped_by_hw_breakpoint)
7090 (target_stopped_by_hw_breakpoint): Declare.
7091
7092 2015-03-04 Pedro Alves <palves@redhat.com>
7093
7094 enum lwp_stop_reason -> enum target_stop_reason
7095 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7096 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7097 (linux_wait_1, stuck_in_jump_pad_callback)
7098 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7099 (linux_stopped_by_watchpoint):
7100 * linux-low.h (enum lwp_stop_reason): Delete.
7101 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7102 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7103
7104 2015-03-04 Yao Qi <yao.qi@linaro.org>
7105
7106 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7107
7108 2015-03-03 Gary Benson <gbenson@redhat.com>
7109
7110 * hostio.c (handle_vFile): Fix prefix lengths.
7111
7112 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7113
7114 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7115 ptr_bits.
7116
7117 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7118
7119 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7120 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7121 (clean): Add "rm -f" for above C files.
7122 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7123 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7124 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7125 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7126 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7127 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7128 (init_registers_s390x_vx_linux64)
7129 (init_registers_s390x_tevx_linux64)
7130 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7131 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7132 declarations.
7133 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7134 (s390_store_vxrs_high): New functions.
7135 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7136 NT_S390_VXRS_HIGH.
7137 (s390_arch_setup): Add logic for selecting one of the new target
7138 descriptions. Activate the new vector regsets if applicable.
7139 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7140 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7141 and init_registers_s390x_tevx_linux64.
7142
7143 2015-03-01 Pedro Alves <palves@redhat.com>
7144
7145 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7146 parameter.
7147
7148 2015-02-27 Pedro Alves <palves@redhat.com>
7149
7150 * linux-x86-low.c (u_debugreg_offset): New function.
7151 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7152
7153 2015-02-27 Pedro Alves <palves@redhat.com>
7154
7155 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7156 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7157 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7158 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7159 (ps_lsetfpregs, ps_getpid)
7160 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7161 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7162 (ps_lsetxregs, ps_plog): Declare.
7163
7164 2015-02-27 Pedro Alves <palves@redhat.com>
7165
7166 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7167 IP_AGENT_EXPORT_FUNC.
7168 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7169 IP_AGENT_EXPORT_FUNC.
7170 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7171 (IP_AGENT_EXPORT): Delete.
7172 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7173 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7174 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7175 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7176 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7177 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7178 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7179 (traceframe_read_count, traceframe_write_count)
7180 (traceframes_created, trace_state_variables, get_raw_reg)
7181 (get_trace_state_variable_value, set_trace_state_variable_value)
7182 (ust_loaded, helper_thread_id, cmd_buf): Use
7183 IPA_SYM_EXPORTED_NAME.
7184 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7185 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7186 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7187 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7188 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7189 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7190 EXTERN_C_PUSH/EXTERN_C_POP.
7191 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7192 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7193 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7194 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7195 (traceframe_write_count, traceframe_read_count)
7196 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7197 (about_to_request_buffer_space, get_trace_state_variable_value)
7198 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7199 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7200 EXTERN_C_PUSH/EXTERN_C_POP.
7201 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7202 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7203 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7204 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7205 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7206 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7207 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7208 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7209 Define.
7210 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7211 (IP_AGENT_EXPORT_VAR_DECL): Define.
7212 (tracing): Declare.
7213 (gdb_agent_get_raw_reg): Declare.
7214
7215 2015-02-27 Tom Tromey <tromey@redhat.com>
7216 Pedro Alves <palves@redhat.com>
7217
7218 Rename symbols whose names are reserved C++ keywords throughout.
7219
7220 2015-02-27 Pedro Alves <palves@redhat.com>
7221
7222 * Makefile.in (COMPILER): New, get it from autoconf.
7223 (CXX): Get from autoconf instead.
7224 (COMPILE.pre): Use COMPILER.
7225 (CC-LD): Rename to ...
7226 (CC_LD): ... this. Use COMPILER.
7227 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7228 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7229 * acinclude.m4: Include build-with-cxx.m4.
7230 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7231 Disable -Werror by default if building in C++ mode.
7232 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7233 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7234 the C++ compiler. Save/restore CXXFLAGS too.
7235 * configure: Regenerate.
7236
7237 2015-02-27 Pedro Alves <palves@redhat.com>
7238
7239 * acinclude.m4: Include libiberty.m4.
7240 * configure.ac: Call libiberty_INIT.
7241 * config.in, configure: Regenerate.
7242
7243 2015-02-26 Pedro Alves <palves@redhat.com>
7244
7245 * linux-low.c (linux_wait_1): When incrementing the PC past a
7246 program breakpoint always use the_low_target.breakpoint_len as
7247 increment, rather than the maximum between that and
7248 the_low_target.decr_pc_after_break.
7249
7250 2015-02-23 Pedro Alves <palves@redhat.com>
7251
7252 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7253 thread was doing a step-over; always adjust the PC if
7254 we stepped over a permanent breakpoint.
7255 (linux_wait_1): If we stepped over breakpoint that was on top of a
7256 permanent breakpoint, manually advance the PC past it.
7257
7258 2015-02-23 Pedro Alves <palves@redhat.com>
7259
7260 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7261 modes.
7262 (x86_fill_gregset, x86_store_gregset): Use it when handling
7263 $orig_eax.
7264
7265 2015-02-20 Pedro Alves <palves@redhat.com>
7266
7267 * thread-db.c: Include "nat/linux-procfs.h".
7268 (thread_db_init): Skip listing new threads if the kernel supports
7269 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7270
7271 2015-02-20 Pedro Alves <palves@redhat.com>
7272
7273 * linux-low.c (status_pending_p_callback): Use ptid_match.
7274
7275 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7276
7277 PR breakpoints/16812
7278 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7279 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7280 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7281
7282 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7283
7284 PR breakpoints/15956
7285 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7286
7287 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7288
7289 * linux-low.c (linux_low_btrace_conf): Print size.
7290 * server.c (handle_btrace_conf_general_set): New.
7291 (hanle_general_set): Call handle_btrace_conf_general_set.
7292 (handle_query): Report Qbtrace-conf:bts:size as supported.
7293
7294 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7295
7296 * linux-low.c (linux_low_enable_btrace): Update parameters.
7297 (linux_low_btrace_conf): New.
7298 (linux_target_ops)<to_btrace_conf>: Initialize.
7299 * server.c (current_btrace_conf): New.
7300 (handle_btrace_enable): Rename to ...
7301 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7302 to target_enable_btrace. Update comment. Update users.
7303 (handle_qxfer_btrace_conf): New.
7304 (qxfer_packets): Add btrace-conf entry.
7305 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7306 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7307 (target_ops)<read_btrace_conf>: New.
7308 (target_enable_btrace): Update parameters.
7309 (target_read_btrace_conf): New.
7310
7311 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7312
7313 * server.c (handle_btrace_general_set): Remove call to
7314 target_supports_btrace.
7315 (supported_btrace_packets): New.
7316 (handle_query): Call supported_btrace_packets.
7317 * target.h: include btrace-common.h.
7318 (btrace_target_info): Removed.
7319 (supports_btrace, target_supports_btrace): Update parameters.
7320
7321 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7322
7323 * Makefile.in (SFILES): Add common/btrace-common.c.
7324 (OBS): Add common/btrace-common.o.
7325 (btrace-common.o): Add build rules.
7326 * linux-low: Include btrace-common.h.
7327 (linux_low_read_btrace): Use struct btrace_data. Call
7328 btrace_data_init and btrace_data_fini.
7329
7330 2015-02-06 Pedro Alves <palves@redhat.com>
7331
7332 * thread-db.c (find_new_threads_callback): Add debug output.
7333
7334 2015-02-04 Pedro Alves <palves@redhat.com>
7335
7336 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7337 (resume_stopped_resumed_lwps): New function.
7338 (linux_wait_for_event_filtered): Use it.
7339
7340 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7341
7342 * Makefile.in (SFILES): Add linux-personality.c.
7343 (linux-personality.o): New rule.
7344 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7345 list of objects to be built.
7346 * linux-low.c: Include nat/linux-personality.h.
7347 (linux_create_inferior): Remove code to disable address space
7348 randomization (moved to ../nat/linux-personality.c). Create
7349 cleanup to disable address space randomization.
7350
7351 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7352
7353 * Makefile.in (posix-strerror.o): New rule.
7354 (mingw-strerror.o): Likewise.
7355 * configure: Regenerated.
7356 * configure.ac: Source file ../common/common.host. Initialize new
7357 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7358
7359 2015-01-14 Yao Qi <yao@codesourcery.com>
7360
7361 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7362 (ppc-linux.o): New rule.
7363 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7364 * configure.ac: AC_CHECK_FUNCS(getauxval).
7365 * config.in: Re-generated.
7366 * configure: Re-generated.
7367 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7368 ppc64_64bit_inferior_p
7369
7370 2015-01-14 Yao Qi <yao@codesourcery.com>
7371
7372 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7373 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7374 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7375 (PT_ORIG_R3, PT_TRAP): Likewise.
7376 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7377 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7378 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7379
7380 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7381
7382 * i387-fp.c (i387_cache_to_xsave): In look over
7383 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7384 zmmh_low_space field by use of zmmh_high_space.
7385
7386 2015-01-09 Pedro Alves <palves@redhat.com>
7387
7388 * linux-low.c (step_over_bkpt): Move higher up in the file.
7389 (handle_extended_wait): Don't store the stop_pc here.
7390 (get_stop_pc): Adjust comments and rename to ...
7391 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7392 stopped for a software breakpoint or hardware breakpoint.
7393 (thread_still_has_status_pending_p): New function.
7394 (status_pending_p_callback): Use
7395 thread_still_has_status_pending_p. If the event is no longer
7396 interesting, resume the LWP.
7397 (handle_tracepoints): Add assert.
7398 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7399 (wstatus_maybe_breakpoint): New function.
7400 (cancel_breakpoint): Delete function.
7401 (check_stopped_by_watchpoint): New function, factored out from
7402 linux_low_filter_event.
7403 (lp_status_maybe_breakpoint): Delete function.
7404 (linux_low_filter_event): Remove filter_ptid argument.
7405 Leave thread group exits pending here. Store the LWP's stop PC.
7406 Always leave events pending.
7407 (linux_wait_for_event_filtered): Pull all events out of the
7408 kernel, and leave them all pending.
7409 (count_events_callback, select_event_lwp_callback): Consider all
7410 events.
7411 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7412 (select_event_lwp): Only give preference to the stepping LWP in
7413 all-stop mode. Adjust comments.
7414 (ignore_event): New function.
7415 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7416 references to cancel_breakpoints. Adjust to renames. Also give
7417 equal priority to all LWPs that have had events in non-stop mode.
7418 If reporting a software breakpoint event, unadjust the LWP's PC.
7419 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7420 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7421 Adjust.
7422 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7423 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7424 (linux_stopped_by_watchpoint): Adjust.
7425 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7426 * linux-low.h (enum lwp_stop_reason): New.
7427 (struct lwp_info) <stop_pc>: Adjust comment.
7428 <stopped_by_watchpoint>: Delete field.
7429 <stop_reason>: New field.
7430 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7431 * mem-break.c (software_breakpoint_inserted_here)
7432 (hardware_breakpoint_inserted_here): New function.
7433 * mem-break.h (software_breakpoint_inserted_here)
7434 (hardware_breakpoint_inserted_here): Declare.
7435 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7436 (cancel_breakpoints): Delete.
7437 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7438 (upload_fast_traceframes): Remove references to
7439 cancel_breakpoints.
7440
7441 2015-01-09 Pedro Alves <palves@redhat.com>
7442
7443 * thread-db.c (find_new_threads_callback): Ignore thread if the
7444 kernel thread ID is -1.
7445
7446 2015-01-09 Pedro Alves <palves@redhat.com>
7447
7448 * linux-low.c (linux_attach_fail_reason_string): Move to
7449 nat/linux-ptrace.c, and rename.
7450 (linux_attach_lwp): Update comment.
7451 (attach_proc_task_lwp_callback): New function.
7452 (linux_attach): Adjust to rename and use
7453 linux_proc_attach_tgid_threads.
7454 (linux_attach_fail_reason_string): Delete declaration.
7455
7456 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7457
7458 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7459 * server.c (gdbserver_version): Likewise.
7460
7461 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7462
7463 * remote-utils.c: Include ctype.h.
7464 (input_interrupt): Explicitly handle the case when the char
7465 received is the NUL byte. Improve the printing of non-ASCII
7466 characters.
7467
7468 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7469
7470 * linux-low.c (linux_low_filter_event): Update call to
7471 linux_enable_event_reporting following the addition of
7472 a new parameter to that function.
7473
7474 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7475
7476 PR server/17457
7477 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7478 (AARCH64_FPCR_REGNO): Likewise.
7479 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7480 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7481 (aarch64_store_fpregset): Likewise.
7482
7483 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7484
7485 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7486 Remove FIXME comment about assumption about N.
7487
7488 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7489
7490 * configure.ac: If large-file support is disabled in GDBserver,
7491 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7492 * configure: Regenerate.
7493
7494 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7495
7496 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7497 warning upon ENODATA from ptrace.
7498 * linux-s390-low.c (s390_store_tdb): New.
7499 (s390_regsets): Add regset for NT_S390_TDB.
7500
7501 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7502
7503 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7504 without a fill_function.
7505 * linux-s390-low.c (s390_fill_last_break): Remove.
7506 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7507 (s390_arch_setup): Use regset's size instead of fill_function for
7508 loop end condition.
7509
7510 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7511
7512 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7513 the regset's store function when ptrace returned an error.
7514 * regcache.c (get_thread_regcache): Invalidate register cache
7515 before fetching inferior's registers.
7516
7517 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7518
7519 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7520 while-loop as for-loop.
7521 (regsets_store_inferior_registers): Likewise.
7522
7523 2014-11-28 Yao Qi <yao@codesourcery.com>
7524
7525 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7526 * config.in, configure: Re-generate.
7527 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7528 is defined.
7529
7530 2014-11-21 Yao Qi <yao@codesourcery.com>
7531
7532 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7533 (AC_CHECK_HEADERS): Remove malloc.h.
7534 * configure: Re-generated.
7535 * config.in: Re-generated.
7536 * server.h: Don't include alloca.h and malloc.h.
7537 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7538 Don't include malloc.h.
7539
7540 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7541
7542 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7543 corresponding ERRNO check in same block.
7544
7545 2014-11-12 Pedro Alves <palves@redhat.com>
7546
7547 * server.c (cont_thread): Update comment.
7548 (start_inferior, attach_inferior): No longer clear cont_thread.
7549 (handle_v_cont): No longer set cont_thread.
7550 (captured_main): Clear cont_thread each time a GDB connects.
7551
7552 2014-11-12 Pedro Alves <palves@redhat.com>
7553
7554 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7555 thread, and don't resume all threads if the Hc thread has exited.
7556
7557 2014-11-12 Pedro Alves <palves@redhat.com>
7558
7559 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7560 the process group instead of to a specific LWP.
7561
7562 2014-10-15 Pedro Alves <palves@redhat.com>
7563
7564 PR server/17487
7565 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7566 parameter.
7567 (arm_set_thread_context): Delete.
7568 (the_low_target): Adjust.
7569 * win32-i386-low.c (debug_registers_changed)
7570 (debug_registers_used): Delete.
7571 (update_debug_registers_callback): New function.
7572 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7573 needing to update their debug registers.
7574 (win32_get_current_dr): New function.
7575 (x86_dr_low_get_addr, x86_dr_low_get_control)
7576 (x86_dr_low_get_status): Fetch the debug register from the thread
7577 record's context.
7578 (i386_initial_stuff): Adjust.
7579 (i386_get_thread_context): Remove current_event parameter. Don't
7580 clear debug_registers_changed nor copy DR values to
7581 debug_reg_state.
7582 (i386_set_thread_context): Delete.
7583 (i386_prepare_to_resume): New function.
7584 (i386_thread_added): Mark the thread as needing to update irs
7585 debug registers.
7586 (the_low_target): Remove i386_set_thread_context and install
7587 i386_prepare_to_resume.
7588 * win32-low.c (win32_get_thread_context): Adjust.
7589 (win32_set_thread_context): Use SetThreadContext
7590 directly.
7591 (win32_prepare_to_resume): New function.
7592 (win32_require_context): New function, factored out from ...
7593 (thread_rec): ... this.
7594 (continue_one_thread): Call win32_prepare_to_resume on each thread
7595 we're about to continue.
7596 (win32_resume): Call win32_prepare_to_resume on the event thread.
7597 * win32-low.h (struct win32_thread_info)
7598 <debug_registers_changed>: New field.
7599 (struct win32_target_ops): Change prototype of set_thread_context,
7600 delete set_thread_context and add prepare_to_resume.
7601 (win32_require_context): New declaration.
7602
7603 2014-10-08 Gary Benson <gbenson@redhat.com>
7604
7605 * server.h: Do not include common-exceptions.h.
7606
7607 2014-10-08 Gary Benson <gbenson@redhat.com>
7608
7609 * server.h: Do not include cleanups.h.
7610
7611 2014-09-30 James Hogan <james.hogan@imgtec.com>
7612
7613 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7614 mips64-dsp-linux.c.
7615
7616 2014-09-23 Yao Qi <yao@codesourcery.com>
7617
7618 * linux-low.c (lp_status_maybe_breakpoint): New function.
7619 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7620 (count_events_callback): Likewise.
7621 (select_event_lwp_callback): Likewise.
7622 (cancel_breakpoints_callback): Likewise.
7623
7624 2014-09-19 Don Breazeal <donb@codesourcery.com>
7625
7626 * linux-low.c (handle_extended_wait): Call
7627 linux_ptrace_get_extended_event.
7628 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7629 linux_is_extended_waitstatus.
7630
7631 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7632
7633 * Makefile.in (CPPFLAGS): Define.
7634 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7635 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7636
7637 2014-09-16 Gary Benson <gbenson@redhat.com>
7638
7639 * inferiors.h (current_inferior): Renamed as...
7640 (current_thread): New variable. All uses updated.
7641 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7642 (maybe_move_out_of_jump_pad): Likewise.
7643 (cancel_breakpoint): Likewise.
7644 (linux_low_filter_event): Likewise.
7645 (wait_for_sigstop): Likewise.
7646 (linux_resume_one_lwp): Likewise.
7647 (need_step_over_p): Likewise.
7648 (start_step_over): Likewise.
7649 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7650 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7651 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7652 and save_inferior as saved_thread.
7653 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7654 saved_thread.
7655 (regcache_invalidate_thread): Likewise.
7656 * remote-utils.c (prepare_resume_reply): Likewise.
7657 * thread-db.c (thread_db_get_tls_address): Likewise.
7658 (disable_thread_event_reporting): Likewise.
7659 (remove_thread_event_breakpoints): Likewise.
7660 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7661 as saved_thread.
7662 * target.h (set_desired_inferior): Renamed as...
7663 (set_desired_thread): New declaration. All uses updated.
7664 * server.c (myresume): Updated comment to reference thread instead
7665 of inferior.
7666 (handle_serial_event): Likewise.
7667 (handle_target_event): Likewise.
7668
7669 2014-09-12 Tom Tromey <tromey@redhat.com>
7670 Gary Benson <gbenson@redhat.com>
7671
7672 * regcache.h: Include common-regcache.h.
7673 (regcache_read_pc): Don't declare.
7674 * regcache.c (get_thread_regcache_for_ptid): New function.
7675
7676 2014-09-11 Tom Tromey <tromey@redhat.com>
7677 Gary Benson <gbenson@redhat.com>
7678
7679 * symbol.c: New file.
7680 * Makefile.in (SFILES): Add symbol.c.
7681 (OBS): Add symbol.o.
7682
7683 2014-09-11 Gary Benson <gbenson@redhat.com>
7684
7685 * target.c (target_stop_ptid, target_continue_ptid): New
7686 functions.
7687
7688 2014-09-11 Tom Tromey <tromey@redhat.com>
7689 Gary Benson <gbenson@redhat.com>
7690
7691 * target.h: Include target/target.h.
7692 * target.c (target_read_memory, target_read_uint32)
7693 (target_write_memory): New functions.
7694
7695 2014-09-11 Gary Benson <gbenson@redhat.com>
7696
7697 * server.h (debug_hw_points): Don't declare.
7698 * server.c (debug_hw_points): Don't define. Replace all uses
7699 with show_debug_regs.
7700 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7701 all uses with show_debug_regs.
7702
7703 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7704
7705 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7706 endianness into account.
7707 (ppc_supply_ptrace_register): Likewise.
7708
7709 2014-09-03 James Hogan <james.hogan@imgtec.com>
7710
7711 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7712 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7713
7714 2014-09-03 Gary Benson <gbenson@redhat.com>
7715
7716 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7717 ALL_DEBUG_ADDRESS_REGISTERS.
7718
7719 2014-09-02 Gary Benson <gbenson@redhat.com>
7720
7721 * i386-low.h: Renamed as...
7722 * x86-low.h: New file. All type, function and variable name
7723 prefixes changed from "i386_" to "x86_". All references updated.
7724 * i386-low.c: Renamed as...
7725 * x86-low.c: New file. All type, function and variable name
7726 prefixes changed from "i386_" to "x86_". All references updated.
7727
7728 2014-09-02 Gary Benson <gbenson@redhat.com>
7729
7730 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7731 (x86_linux_new_thread): Likewise.
7732
7733 2014-08-29 Gary Benson <gbenson@redhat.com>
7734
7735 * server.h (setjmp.h): Do not include.
7736 (toplevel): Do not declare.
7737 (common-exceptions.h): Include.
7738 (cleanups.h): Likewise.
7739 * server.c (toplevel): Do not define.
7740 (exit_code): New static global.
7741 (detach_or_kill_for_exit_cleanup): New function.
7742 (main): New function. Original main renamed to...
7743 (captured_main): New function.
7744 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7745
7746 2014-08-29 Gary Benson <gbenson@redhat.com>
7747
7748 * Makefile.in (SFILES): Add common/common-exceptions.c.
7749 (OBS): Add common-exceptions.o.
7750 (common-exceptions.o): New rule.
7751 * utils.c (prepare_to_throw_exception): New function.
7752
7753 2014-08-29 Gary Benson <gbenson@redhat.com>
7754
7755 * config.in: Regenerate.
7756 * configure: Likewise.
7757
7758 2014-08-29 Gary Benson <gbenson@redhat.com>
7759
7760 * Makefile.in (SFILES): Add common/cleanups.c.
7761 (OBS): cleanups.o.
7762 (cleanups.o): New rule.
7763
7764 2014-08-29 Gary Benson <gbenson@redhat.com>
7765
7766 * utils.c (internal_vwarning): New function.
7767
7768 2014-08-28 Gary Benson <gbenson@redhat.com>
7769
7770 * utils.h (fatal): Remove declaration.
7771 * utils.c (fatal): Remove function.
7772
7773 2014-08-28 Gary Benson <gbenson@redhat.com>
7774
7775 * tracepoint.c (gdb_agent_init): Replace fatal with
7776 perror_with_name.
7777 (initialize_tracepoint): Likewise.
7778
7779 2014-08-28 Gary Benson <gbenson@redhat.com>
7780
7781 * remote-utils.c (remote_prepare): Replace fatal with error.
7782
7783 2014-08-28 Gary Benson <gbenson@redhat.com>
7784
7785 * linux-low.c (linux_async): Replace fatal with warning.
7786 Tidy up and return.
7787 (linux_start_non_stop): Return -1 if linux_async failed.
7788
7789 2014-08-28 Gary Benson <gbenson@redhat.com>
7790
7791 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7792 gdb_assert.
7793 (i386_dr_low_get_addr): Remove vague comment.
7794 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7795 gdb_assert.
7796
7797 2014-08-28 Gary Benson <gbenson@redhat.com>
7798
7799 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7800 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7801 internal_error.
7802 (linux_resume_one_lwp): Likewise.
7803 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7804 gdb_assert.
7805 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7806 with internal_error.
7807 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7808 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7809 (find_register_by_name): Replace fatal with internal_error.
7810 (find_regno): Likewise.
7811 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7812 * thread-db.c (thread_db_create_event): Likewise.
7813 (thread_db_load_search): Likewise.
7814 (try_thread_db_load_1): Likewise.
7815 * tracepoint.c (get_jump_space_head): Replace fatal with
7816 internal_error.
7817 (claim_trampoline_space): Likewise.
7818 (have_fast_tracepoint_trampoline_buffer): Likewise.
7819 (cmd_qtstart): Likewise.
7820 (stop_tracing): Likewise.
7821 (fast_tracepoint_collecting): Likewise.
7822 (target_malloc): Likewise.
7823 (download_tracepoint): Likewise.
7824 (download_trace_state_variables): Replace check with gdb_assert.
7825 (upload_fast_traceframes): Replace fatal with internal_error.
7826
7827 2014-08-19 Tom Tromey <tromey@redhat.com>
7828 Gary Benson <gbenson@redhat.com>
7829
7830 * Makefile.in (SFILES): Add common/common-debug.c.
7831 (OBS): Add common-debug.o.
7832 (common-debug.o): New rule.
7833 * debug.h (debug_printf): Don't declare.
7834 * debug.c (debug_printf): Renamed and rewritten as...
7835 (debug_vprintf): New function.
7836
7837 2014-08-19 Gary Benson <gbenson@redhat.com>
7838
7839 * utils.h: Do not include print-utils.h.
7840
7841 2014-08-19 Tom Tromey <tromey@redhat.com>
7842 Gary Benson <gbenson@redhat.com>
7843
7844 * server.h: Add static assertion.
7845 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7846
7847 2014-08-19 Tom Tromey <tromey@redhat.com>
7848 Gary Benson <gbenson@redhat.com>
7849
7850 * Makefile.in (SFILES): Add common/errors.c.
7851 (OBS): Add errors.o.
7852 (IPA_OBS): Add errors-ipa.o.
7853 (errors.o): New rule.
7854 (errors-ipa.o): Likewise.
7855 * utils.h (perror_with_name, error, warning): Don't declare.
7856 * utils.c (warning): Renamed and rewritten as...
7857 (vwarning): New function.
7858 (error): Renamed and rewritten as...
7859 (verror): New function.
7860 (internal_error): Renamed and rewritten as...
7861 (internal_verror): New function.
7862
7863 2014-08-07 Gary Benson <gbenson@redhat.com>
7864
7865 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7866 * configure: Regenerate.
7867 * config.in: Likewise.
7868 * server.h: Do not include errno.h.
7869 * event-loop.c: Likewise.
7870 * hostio-errno.c: Likewise.
7871 * linux-low.c: Likewise.
7872 * remote-utils.c: Likewise.
7873 * spu-low.c: Likewise.
7874 * utils.c: Likewise.
7875 * gdbreplay.c: Unconditionally include errno.h.
7876
7877 2014-08-07 Gary Benson <gbenson@redhat.com>
7878
7879 * server.h: Do not include string.h.
7880 * event-loop.c: Likewise.
7881 * linux-low.c: Likewise.
7882 * regcache.c: Likewise.
7883 * remote-utils.c: Likewise.
7884 * spu-low.c: Likewise.
7885 * utils.c: Likewise.
7886
7887 2014-08-07 Gary Benson <gbenson@redhat.com>
7888
7889 * server.h: Do not include gdb_assert.h.
7890
7891 2014-08-07 Gary Benson <gbenson@redhat.com>
7892
7893 * server.h: Do not include common-utils.h.
7894
7895 2014-08-07 Gary Benson <gbenson@redhat.com>
7896
7897 * server.h: Do not include ptid.h.
7898 * notif.h: Likewise.
7899
7900 2014-08-07 Gary Benson <gbenson@redhat.com>
7901
7902 * server.h: Do not include gdb_locale.h.
7903
7904 2014-08-07 Gary Benson <gbenson@redhat.com>
7905
7906 * server.h: Do not include gdb/signals.h.
7907 * win32-low.c: Likewise.
7908
7909 2014-08-07 Gary Benson <gbenson@redhat.com>
7910
7911 * server.h: Do not include pathmax.h.
7912
7913 2014-08-07 Gary Benson <gbenson@redhat.com>
7914
7915 * server.h: Do not include libiberty.h.
7916 * linux-bfin-low.c: Likewise.
7917
7918 2014-08-07 Gary Benson <gbenson@redhat.com>
7919
7920 * server.h: Do not include ansidecl.h.
7921
7922 2014-08-07 Gary Benson <gbenson@redhat.com>
7923
7924 * linux-x86-low.c: Do not include stddef.h.
7925 * lynx-ppc-low.c: Likewise.
7926 * tracepoint.c: Likewise.
7927
7928 2014-08-07 Gary Benson <gbenson@redhat.com>
7929
7930 * server.h: Do not include stdarg.h.
7931 * nto-low.c: Likewise.
7932
7933 2014-08-07 Gary Benson <gbenson@redhat.com>
7934
7935 * server.h: Do not include stdlib.h.
7936 * inferiors.c: Likewise.
7937 * linux-low.c: Likewise.
7938 * regcache.c: Likewise.
7939 * spu-low.c: Likewise.
7940 * tracepoint.c: Likewise.
7941 * utils.c: Likewise.
7942
7943 2014-08-07 Gary Benson <gbenson@redhat.com>
7944
7945 * server.h: Do not include stdio.h.
7946 * linux-low.c: Likewise.
7947 * remote-utils.c: Likewise.
7948 * spu-low.c: Likewise.
7949 * utils.c: Likewise.
7950 * wincecompat.c: Likewise.
7951
7952 2014-08-06 Gary Benson <gbenson@redhat.com>
7953
7954 * regcache.c (init_register_cache): Move conditionals inside if.
7955
7956 2014-08-06 Gary Benson <gbenson@redhat.com>
7957
7958 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7959
7960 2014-07-31 Gary Benson <gbenson@redhat.com>
7961
7962 * ax.h: Do not include server.h.
7963 * gdbthread.h: Likewise.
7964 * lynx-low.h: Likewise.
7965 * notif.h: Likewise.
7966
7967 2014-07-30 Gary Benson <gbenson@redhat.com>
7968
7969 * server.h: Include common-defs.h.
7970 Do not include config.h or build-gnulib-gdbserver/config.h.
7971
7972 2014-07-30 Gary Benson <gbenson@redhat.com>
7973
7974 * hostio-errno.c: Move server.h to top of includes list.
7975 * inferiors.c: Likewise.
7976 * linux-x86-low.c: Likewise.
7977 * notif.c: Include server.h.
7978
7979 2014-07-24 Tom Tromey <tromey@redhat.com>
7980 Gary Benson <gbenson@redhat.com>
7981
7982 * server.h (CORE_ADDR): Now unsigned.
7983
7984 2014-07-16 Pedro Alves <palves@redhat.com>
7985
7986 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7987
7988 2014-07-15 Pedro Alves <palves@redhat.com>
7989
7990 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7991 copy.
7992
7993 2014-07-11 Pedro Alves <palves@redhat.com>
7994
7995 * linux-low.c (kill_wait_lwp): New function, based on
7996 kill_one_lwp_callback, but use my_waitpid directly.
7997 (kill_one_lwp_callback, linux_kill): Use it.
7998
7999 2014-06-23 Pedro Alves <palves@redhat.com>
8000
8001 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8002 before setting DR0..DR3.
8003
8004 2014-06-20 Gary Benson <gbenson@redhat.com>
8005
8006 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8007 * configure: Regenerated.
8008 * config.in: Likewise.
8009
8010 2014-06-20 Gary Benson <gbenson@redhat.com>
8011
8012 * Makefile.in (SFILES): Update locations for files moved
8013 from common to nat.
8014 (object file files): Reordered.
8015
8016 2014-06-20 Gary Benson <gbenson@redhat.com>
8017
8018 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8019 (i386_dr_low_set_addr): Likewise.
8020 (i386_dr_low_get_addr): Likewise.
8021 (i386_dr_low_can_set_control): Likewise.
8022 (i386_dr_low_set_control): Likewise.
8023 (i386_dr_low_get_control): Likewise.
8024 (i386_dr_low_get_status): Likewise.
8025 (i386_get_debug_register_length): Likewise.
8026 * linux-x86-low.c (i386_dr_low_set_addr):
8027 Changed signature. Made static.
8028 (i386_dr_low_get_addr): Likewise.
8029 (i386_dr_low_set_control): Likewise.
8030 (i386_dr_low_get_control): Likewise.
8031 (i386_dr_low_get_status): Likewise.
8032 (i386_dr_low): New global variable.
8033 * win32-i386-low.c (i386_dr_low_set_addr):
8034 Changed signature. Made static.
8035 (i386_dr_low_get_addr): Likewise.
8036 (i386_dr_low_set_control): Likewise.
8037 (i386_dr_low_get_control): Likewise.
8038 (i386_dr_low_get_status): Likewise.
8039 (i386_dr_low): New global variable.
8040
8041 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8042
8043 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8044 * Makefile.in (AR, AR_FLAGS): Define.
8045 * configure: Regenerate.
8046
8047 2014-06-19 Gary Benson <gbenson@redhat.com>
8048
8049 * Makefile.in (i386-dregs.o): New rule.
8050 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8051 * i386-low.c (target.h): Remove include.
8052 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8053 (DR_CONTROL_SHIFT): Likewise.
8054 (DR_CONTROL_SIZE): Likewise.
8055 (DR_RW_EXECUTE): Likewise.
8056 (DR_RW_WRITE): Likewise.
8057 (DR_RW_READ): Likewise.
8058 (DR_RW_IORW): Likewise.
8059 (DR_LEN_1): Likewise.
8060 (DR_LEN_2): Likewise.
8061 (DR_LEN_4): Likewise.
8062 (DR_LEN_8): Likewise.
8063 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8064 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8065 (DR_ENABLE_SIZE): Likewise.
8066 (DR_LOCAL_SLOWDOWN): Likewise.
8067 (DR_GLOBAL_SLOWDOWN): Likewise.
8068 (DR_CONTROL_RESERVED): Likewise.
8069 (I386_DR_CONTROL_MASK): Likewise.
8070 (I386_DR_VACANT): Likewise.
8071 (I386_DR_LOCAL_ENABLE): Likewise.
8072 (I386_DR_GLOBAL_ENABLE): Likewise.
8073 (I386_DR_DISABLE): Likewise.
8074 (I386_DR_SET_RW_LEN): Likewise.
8075 (I386_DR_GET_RW_LEN): Likewise.
8076 (I386_DR_WATCH_HIT): Likewise.
8077 (i386_wp_op_t): Likewise.
8078 (i386_show_dr): Likewise.
8079 (i386_length_and_rw_bits): Likewise.
8080 (i386_insert_aligned_watchpoint): Likewise.
8081 (i386_remove_aligned_watchpoint): Likewise.
8082 (i386_handle_nonaligned_watchpoint): Likewise.
8083 i386_update_inferior_debug_regs(): Likewise.
8084 (i386_dr_insert_watchpoint): Likewise.
8085 (i386_dr_remove_watchpoint): Likewise.
8086 (i386_dr_region_ok_for_watchpoint): Likewise.
8087 (i386_dr_stopped_data_address): Likewise.
8088 (i386_dr_stopped_by_watchpoint): Likewise.
8089
8090 2014-06-19 Gary Benson <gbenson@redhat.com>
8091
8092 * i386-low.c (i386_dr_show): Renamed to
8093 i386_show_dr and made static. All uses updated.
8094 (i386_dr_length_and_rw_bits): Renamed to
8095 i386_length_and_rw_bits and made static.
8096 All uses updated.
8097 (i386_dr_insert_aligned_watchpoint): Renamed to
8098 i386_insert_aligned_watchpoint and made static.
8099 All uses updated.
8100 (i386_dr_remove_aligned_watchpoint): Renamed to
8101 i386_remove_aligned_watchpoint and made static.
8102 All uses updated.
8103 (i386_dr_update_inferior_debug_regs): Renamed to
8104 i386_update_inferior_debug_regs and made static.
8105 All uses updated.
8106
8107 2014-06-18 Gary Benson <gbenson@redhat.com>
8108
8109 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8110 (i386_dr_low_can_set_control): Likewise.
8111 (i386_get_debug_register_length): Likewise.
8112 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8113 (i386_dr_low_can_set_control): Likewise.
8114 (i386_get_debug_register_length): Likewise.
8115
8116 2014-06-17 Gary Benson <gbenson@redhat.com>
8117
8118 * i386-low.h (i386-dregs.h): New include.
8119 (DR_FIRSTADDR): Now in i386-dregs.h.
8120 (DR_LASTADDR): Likewise.
8121 (DR_NADDR): Likewise.
8122 (DR_STATUS): Likewise.
8123 (DR_CONTROL): Likewise.
8124 (i386_debug_reg_state): Likewise.
8125 (i386_dr_insert_watchpoint): Likewise.
8126 (i386_dr_remove_watchpoint): Likewise.
8127 (i386_dr_region_ok_for_watchpoint): Likewise.
8128 (i386_dr_stopped_data_address): Likewise.
8129 (i386_dr_stopped_by_watchpoint): Likewise.
8130 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8131
8132 2014-06-18 Gary Benson <gbenson@redhat.com>
8133
8134 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8135 i386_dr_insert_watchpoint.
8136 (i386_low_remove_watchpoint): Renamed to
8137 i386_dr_remove_watchpoint.
8138 (i386_low_region_ok_for_watchpoint): Renamed to
8139 i386_dr_region_ok_for_watchpoint.
8140 (i386_low_stopped_data_address): Renamed to
8141 i386_dr_stopped_data_address.
8142 (i386_low_stopped_by_watchpoint): Renamed to
8143 i386_dr_stopped_by_watchpoint.
8144 * i386-low.c (i386_show_dr): Renamed to
8145 i386_dr_show and made nonstatic. All uses updated.
8146 (i386_length_and_rw_bits): Renamed to
8147 i386_dr_length_and_rw_bits and made nonstatic.
8148 All uses updated.
8149 (i386_insert_aligned_watchpoint): Renamed to
8150 i386_dr_insert_aligned_watchpoint and made nonstatic.
8151 All uses updated.
8152 (i386_remove_aligned_watchpoint): Renamed to
8153 i386_dr_remove_aligned_watchpoint and made nonstatic.
8154 All uses updated.
8155 (i386_update_inferior_debug_regs): Renamed to
8156 i386_dr_update_inferior_debug_regs and made nonstatic.
8157 All uses updated.
8158 (i386_low_insert_watchpoint): Renamed to
8159 i386_dr_insert_watchpoint. All uses updated.
8160 (i386_low_remove_watchpoint): Renamed to
8161 i386_dr_remove_watchpoint. All uses updated.
8162 (i386_low_region_ok_for_watchpoint): Renamed to
8163 i386_dr_region_ok_for_watchpoint. All uses updated.
8164 (i386_low_stopped_data_address): Renamed to
8165 i386_dr_stopped_data_address. All uses updated.
8166 (i386_low_stopped_by_watchpoint): Renamed to
8167 i386_dr_stopped_by_watchpoint. All uses updated.
8168
8169 2014-06-18 Gary Benson <gbenson@redhat.com>
8170
8171 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8172 (i386_dr_low_can_set_control): Likewise.
8173 (i386_insert_aligned_watchpoint): New check.
8174
8175 2014-06-18 Gary Benson <gbenson@redhat.com>
8176
8177 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8178 Renamed to state.
8179
8180 2014-06-18 Gary Benson <gbenson@redhat.com>
8181
8182 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8183 instead of fatal and error.
8184 (i386_handle_nonaligned_watchpoint): Likewise.
8185
8186 2014-06-18 Gary Benson <gbenson@redhat.com>
8187
8188 * i386-low.c (i386_get_debug_register_length): New macro.
8189 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8190 (i386_show_dr): Use debug_printf instead of fprintf. Use
8191 phex to format values.
8192
8193 2014-06-18 Gary Benson <gbenson@redhat.com>
8194
8195 * i386-low.h: Comment changes.
8196 * i386-low.c: Likewise.
8197
8198 2014-06-18 Gary Benson <gbenson@redhat.com>
8199
8200 * i386-low.c: Whitespace changes.
8201
8202 2014-06-12 Tom Tromey <tromey@redhat.com>
8203
8204 * utils.c (freeargv): Remove.
8205
8206 2014-06-12 Tom Tromey <tromey@redhat.com>
8207
8208 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8209 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8210 (parse_debug_format_options): Likewise.
8211 (gdbserver_usage): Likewise.
8212 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8213 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8214 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8215 against libiberty.
8216 ($(LIBGNU)): Depend on libiberty.
8217 (all-lib): Recurse into all subdirs.
8218 (install-only): Invoke "install" target in subdirs.
8219 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8220 targets.
8221 * configure: Rebuild.
8222 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8223 for vasprintf, vsnprintf, or gettimeofday.
8224 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8225 srv_tgtobj.
8226
8227 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8228
8229 * development.sh: Delete.
8230 * Makefile.in (config.status): Adjust dependency on development.sh.
8231 * configure.ac: Adjust development.sh source call.
8232 * configure: Regenerate.
8233
8234 2014-06-02 Pedro Alves <palves@redhat.com>
8235
8236 * ax.c (gdb_free_agent_expr): New function.
8237 * ax.h (gdb_free_agent_expr): New declaration.
8238 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8239 list.
8240 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8241 static.
8242 (clear_breakpoint_conditions_and_commands): New function.
8243 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8244 (clear_breakpoint_conditions_and_commands): New declaration.
8245
8246 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8247
8248 * linux-aarch64-low.c (asm/ptrace.h): Include.
8249
8250 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8251
8252 Fix TLS access for -static -pthread.
8253 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8254 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8255 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8256
8257 2014-05-20 Pedro Alves <palves@redhat.com>
8258
8259 * linux-aarch64-low.c (aarch64_insert_point)
8260 (aarch64_remove_point): No longer check whether the type is
8261 supported here. Adjust to new interface.
8262 (the_low_target): Install aarch64_supports_z_point_type as
8263 supports_z_point_type method.
8264 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8265 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8266 instead of a Z packet char. Adjust.
8267 (arm_supports_z_point_type): New function.
8268 (arm_insert_point, arm_remove_point): Adjust to new interface.
8269 (the_low_target): Install arm_supports_z_point_type.
8270 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8271 (cris_insert_point, cris_remove_point): Adjust to new interface.
8272 Don't check whether the type is supported here.
8273 (the_low_target): Install cris_supports_z_point_type.
8274 * linux-low.c (linux_supports_z_point_type): New function.
8275 (linux_insert_point, linux_remove_point): Adjust to new interface.
8276 * linux-low.h (struct linux_target_ops) <insert_point,
8277 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8278 raw_breakpoint pointer parameter.
8279 <supports_z_point_type>: New method.
8280 * linux-mips-low.c (mips_supports_z_point_type): New function.
8281 (mips_insert_point, mips_remove_point): Adjust to new interface.
8282 Use mips_supports_z_point_type.
8283 (the_low_target): Install mips_supports_z_point_type.
8284 * linux-ppc-low.c (the_low_target): Install NULL as
8285 supports_z_point_type method.
8286 * linux-s390-low.c (the_low_target): Install NULL as
8287 supports_z_point_type method.
8288 * linux-sparc-low.c (the_low_target): Install NULL as
8289 supports_z_point_type method.
8290 * linux-x86-low.c (x86_supports_z_point_type): New function.
8291 (x86_insert_point): Adjust to new insert_point interface. Use
8292 insert_memory_breakpoint. Adjust to new
8293 i386_low_insert_watchpoint interface.
8294 (x86_remove_point): Adjust to remove_point interface. Use
8295 remove_memory_breakpoint. Adjust to new
8296 i386_low_remove_watchpoint interface.
8297 (the_low_target): Install x86_supports_z_point_type.
8298 * lynx-low.c (lynx_target_ops): Install NULL as
8299 supports_z_point_type callback.
8300 * nto-low.c (nto_supports_z_point_type): New.
8301 (nto_insert_point, nto_remove_point): Adjust to new interface.
8302 (nto_target_ops): Install nto_supports_z_point_type.
8303 * mem-break.c: Adjust intro comment.
8304 (struct raw_breakpoint) <raw_type, size>: New fields.
8305 <inserted>: Update comment.
8306 <shlib_disabled>: Delete field.
8307 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8308 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8309 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8310 (raw_bkpt_type_to_target_hw_bp_type): New function.
8311 (find_enabled_raw_code_breakpoint_at): New function.
8312 (find_raw_breakpoint_at): New type and size parameters. Use them.
8313 (insert_memory_breakpoint): New function, based off
8314 set_raw_breakpoint_at.
8315 (remove_memory_breakpoint): New function.
8316 (set_raw_breakpoint_at): Reimplement.
8317 (set_breakpoint): New, based on set_breakpoint_at.
8318 (set_breakpoint_at): Reimplement.
8319 (delete_raw_breakpoint): Go through the_target->remove_point
8320 instead of assuming memory breakpoints.
8321 (find_gdb_breakpoint_at): Delete.
8322 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8323 (find_gdb_breakpoint): New function.
8324 (set_gdb_breakpoint_at): Delete.
8325 (z_type_supported): New function.
8326 (set_gdb_breakpoint_1): New function, loosely based off
8327 set_gdb_breakpoint_at.
8328 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8329 (delete_gdb_breakpoint_at): Delete.
8330 (delete_gdb_breakpoint_1): New function, loosely based off
8331 delete_gdb_breakpoint_at.
8332 (delete_gdb_breakpoint): New function.
8333 (clear_gdb_breakpoint_conditions): Rename to ...
8334 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8335 breakpoint.
8336 (add_condition_to_breakpoint): Make static.
8337 (add_breakpoint_condition): Take a struct breakpoint pointer
8338 instead of an address. Adjust.
8339 (gdb_condition_true_at_breakpoint): Rename to ...
8340 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8341 z_type parameter.
8342 (gdb_condition_true_at_breakpoint): Reimplement.
8343 (add_breakpoint_commands): Take a struct breakpoint pointer
8344 instead of an address. Adjust.
8345 (gdb_no_commands_at_breakpoint): Rename to ...
8346 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8347 parameter. Return true if no breakpoint was found. Change debug
8348 output.
8349 (gdb_no_commands_at_breakpoint): Reimplement.
8350 (run_breakpoint_commands): Rename to ...
8351 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8352 and change return type to boolean.
8353 (run_breakpoint_commands): New function.
8354 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8355 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8356 breakpoint. Go through the_target->remove_point instead of
8357 assuming memory breakpoint.
8358 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8359 software and hardware breakpoints.
8360 (reinsert_raw_breakpoint): Go through the_target->insert_point
8361 instead of assuming memory breakpoint.
8362 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8363 software and hardware breakpoints.
8364 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8365 Check both software and hardware breakpoints.
8366 (validate_inserted_breakpoint): Assert the breakpoint is a
8367 software breakpoint. Set the inserted flag to -1 instead of
8368 setting shlib_disabled.
8369 (delete_disabled_breakpoints): Adjust.
8370 (validate_breakpoints): Only validate software breakpoints.
8371 Adjust to inserted flag change.
8372 (check_mem_read, check_mem_write): Skip breakpoint types other
8373 than software breakpoints. Adjust to inserted flag change.
8374 * mem-break.h (enum raw_bkpt_type): New enum.
8375 (raw_breakpoint, struct process_info): Forward declare.
8376 (Z_packet_to_target_hw_bp_type): Delete declaration.
8377 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8378 (set_gdb_breakpoint, delete_gdb_breakpoint)
8379 (clear_breakpoint_conditions): New declarations.
8380 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8381 (breakpoint_inserted_here): Update comment.
8382 (add_breakpoint_condition, add_breakpoint_commands): Replace
8383 address parameter with a breakpoint pointer parameter.
8384 (gdb_breakpoint_here): Update comment.
8385 (delete_gdb_breakpoint_at): Delete.
8386 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8387 * server.c (process_point_options): Take a struct breakpoint
8388 pointer instead of an address. Adjust.
8389 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8390 delete_gdb_breakpoint.
8391 * spu-low.c (spu_target_ops): Install NULL as
8392 supports_z_point_type method.
8393 * target.h: Include mem-break.h.
8394 (struct target_ops) <prepare_to_access_memory>: Update comment.
8395 <supports_z_point_type>: New field.
8396 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8397 instead of a char. Also take a raw breakpoint pointer.
8398 * win32-arm-low.c (the_low_target): Install NULL as
8399 supports_z_point_type.
8400 * win32-i386-low.c (i386_supports_z_point_type): New function.
8401 (i386_insert_point, i386_remove_point): Adjust to new interface.
8402 (the_low_target): Install i386_supports_z_point_type.
8403 * win32-low.c (win32_supports_z_point_type): New function.
8404 (win32_insert_point, win32_remove_point): Adjust to new interface.
8405 (win32_target_ops): Install win32_supports_z_point_type.
8406 * win32-low.h (struct win32_target_ops):
8407 <supports_z_point_type>: New method.
8408 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8409 instead of a char. Also take a raw breakpoint pointer.
8410
8411 2014-05-20 Pedro Alves <palves@redhat.com>
8412
8413 * mem-break.h: Include break-common.h.
8414 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8415 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8416 (Z_packet_to_target_hw_bp_type): New declaration.
8417 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8418 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8419 (Z_PACKET_ACCESS_WP): Delete macros.
8420 (Z_packet_to_hw_type): Delete function.
8421 * i386-low.h: Don't include break-common.h here.
8422 (Z_packet_to_hw_type): Delete declaration.
8423 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8424 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8425 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8426 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8427 * linux-aarch64-low.c: Don't include break-common.h here.
8428 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8429 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8430 (Z_packet_to_target_hw_bp_type): Delete function.
8431 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8432 function.
8433 (mips_insert_point, mips_remove_point): Use
8434 Z_packet_to_target_hw_bp_type.
8435
8436 2014-05-20 Pedro Alves <palves@redhat.com>
8437
8438 * linux-aarch64-low.c: Include break-common.h.
8439 (enum target_point_type): Delete.
8440 (Z_packet_to_point_type): Rename to ...
8441 (Z_packet_to_target_hw_bp_type): ... this, and return a
8442 target_hw_bp_type instead.
8443 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8444 instead of an enum target_point_type.
8445 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8446 breakpoint type.
8447 (aarch64_dr_state_insert_one_point)
8448 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8449 (aarch64_handle_aligned_watchpoint)
8450 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8451 Take an enum target_hw_bp_type instead of an enum
8452 target_point_type.
8453 (aarch64_supports_z_point_type): New function.
8454 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8455 use Z_packet_to_target_hw_bp_type.
8456
8457 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8458
8459 * configure.ac: Only use -Werror by default when DEVELOPMENT
8460 is true.
8461 * configure: Regenerate.
8462
8463 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8464
8465 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8466 * linux-x86-low.c (X86_64_USER_REGS): New.
8467 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8468
8469 2014-04-28 Yao Qi <yao@codesourcery.com>
8470
8471 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8472 name.
8473
8474 2014-04-25 Pedro Alves <palves@redhat.com>
8475
8476 PR server/16255
8477 * linux-low.c (linux_attach_fail_reason_string): New function.
8478 (linux_attach_lwp): Delete.
8479 (linux_attach_lwp_1): Rename to ...
8480 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8481 argument. Remove "initial" parameter. Return int instead of
8482 void. Don't error or warn here.
8483 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8484 failure to attach to the tgid. Call warning when failing to
8485 attach to an lwp.
8486 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8487 argument. Remove "initial" parameter. Return int instead of
8488 void. Don't error or warn here.
8489 (linux_attach_fail_reason_string): New declaration.
8490 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8491 interface change. Use linux_attach_fail_reason_string.
8492
8493 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8494 Walfred Tedeschi <walfred.tedeschi@intel.com>
8495
8496 * Makefile.in: Added rules to handle new files
8497 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8498 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8499 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8500 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8501 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8502 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8503 x32-avx512-linux.o.
8504 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8505 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8506 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8507 i386/x32-avx512.xml.
8508 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8509 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8510 i386/x32-avx512-linux.xml.
8511 * i387-fp.c (num_avx512_k_registers): New constant for number
8512 of K registers.
8513 (num_avx512_zmmh_low_registers): New constant for number of
8514 lower ZMM registers (0-15).
8515 (num_avx512_zmmh_high_registers): New constant for number of
8516 higher ZMM registers (16-31).
8517 (num_avx512_ymmh_registers): New contant for number of higher
8518 YMM registers (ymm16-31 added by avx521 on x86_64).
8519 (num_avx512_xmm_registers): New constant for number of higher
8520 XMM registers (xmm16-31 added by AVX512 on x86_64).
8521 (struct i387_xsave): Add space for AVX512 registers.
8522 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8523 Add code to handle AVX512 registers.
8524 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8525 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8526 prototypei from generated file.
8527 (tdesc_amd64_avx512_linux): Likewise.
8528 (init_registers_x32_avx512_linux): Likewise.
8529 (tdesc_x32_avx512_linux): Likewise.
8530 (init_registers_i386_avx512_linux): Likewise.
8531 (tdesc_i386_avx512_linux): Likewise.
8532 (x86_64_regmap): Add AVX512 registers.
8533 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8534 mask.
8535 (initialize_low_arch): Add code to initialize AVX512 registers.
8536
8537 2014-04-23 Pedro Alves <palves@redhat.com>
8538
8539 * mem-break.c (find_gdb_breakpoint_at): Make static.
8540 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8541
8542 2014-04-23 Pedro Alves <palves@redhat.com>
8543
8544 * i386-low.c: Don't include break-common.h here.
8545 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8546 prototype to take target_hw_bp_type as argument instead of a Z
8547 packet char.
8548 * i386-low.h: Include break-common.h here.
8549 (Z_packet_to_hw_type): Declare.
8550 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8551 prototypes.
8552 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8553 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8554 (x86_remove_point): Convert the packet number to a
8555 target_hw_bp_type before calling i386_low_remove_watchpoint.
8556 * win32-i386-low.c (i386_insert_point): Convert the packet number
8557 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8558 (i386_remove_point): Convert the packet number to a
8559 target_hw_bp_type before calling i386_low_remove_watchpoint.
8560
8561 2014-04-23 Pedro Alves <palves@redhat.com>
8562
8563 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8564
8565 2014-04-10 Pedro Alves <palves@redhat.com>
8566
8567 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8568 Check if the condition or command is NULL before checking if the
8569 breakpoint is known. On success, return true.
8570 * mem-break.h (add_breakpoint_condition): Document return.
8571 (add_breakpoint_commands): Add describing comment.
8572 * server.c (skip_to_semicolon): New function.
8573 (process_point_options): Use it.
8574
8575 2014-04-09 Pedro Alves <palves@redhat.com>
8576
8577 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8578 to lwpid_of.
8579
8580 2014-02-27 Pedro Alves <palves@redhat.com>
8581
8582 PR 12702
8583 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8584 macros.
8585 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8586 output.
8587 (last_thread_of_process_p): Take a PID argument instead of a
8588 thread pointer.
8589 (linux_wait_for_lwp): Delete.
8590 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8591 functions.
8592 (linux_low_filter_event): New function, party factored out from
8593 linux_wait_for_event.
8594 (linux_wait_for_event): Rename to ...
8595 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8596 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8597 sigsuspend. Check for zombie leaders.
8598 (linux_wait_for_event): Reimplement as wrapper around
8599 linux_wait_for_event_filtered.
8600 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8601 a normal or signal exit is seen, it's the whole process exiting.
8602 (wait_for_sigstop): No longer a for_each_inferior callback.
8603 Rewrite on top of linux_wait_for_event_filtered.
8604 (stop_all_lwps): Call wait_for_sigstop directly.
8605 * server.c (resume, handle_target_event): Handle
8606 TARGET_WAITKIND_NO_RESUMED.
8607
8608 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8609
8610 * win32-low.c (psapi_get_dll_name,
8611 * win32_CreateToolhelp32Snapshot): Delete.
8612 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8613 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8614 Delete.
8615 (handle_load_dll): Add function description.
8616 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8617
8618 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8619
8620 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8621 Add comment.
8622 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8623 base address when calling win32_add_one_solib.
8624 (handle_load_dll): Delete local variable load_addr.
8625 Remove 0x1000 offset applied to DLL base address when calling
8626 win32_add_one_solib.
8627 (handle_unload_dll): Add comment.
8628
8629 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8630
8631 * win32-low.c (win32_add_all_dlls): Renames
8632 win32_ensure_ntdll_loaded. Rewrite function documentation.
8633 Adjust implementation to always load all DLLs.
8634 Add 0x1000 offset to DLL base address when calling
8635 win32_add_one_solib.
8636 (child_initialization_done): New static global.
8637 (do_initial_child_stuff): Set child_initialization_done to
8638 zero during child initialization, and 1 after. Replace call
8639 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8640 Add comment.
8641 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8642 (handle_unload_dll): Add function documentation.
8643 (get_child_debug_event): Ignore load and unload DLL events
8644 during child initialization.
8645
8646 2014-02-20 Doug Evans <dje@google.com>
8647
8648 Remove global all_lwps.
8649 * inferiors.h (ptid_of): Move here from linux-low.h.
8650 (pid_of, lwpid_of): Ditto.
8651 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8652 parameter is a struct thread_info * now.
8653 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8654 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8655 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8656 directly.
8657 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8658 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8659 * linux-arm-low.c (update_registers_callback): Update, "entry"
8660 parameter is a struct thread_info * now.
8661 Fetch lwpid from current_inferior directly.
8662 (arm_insert_point): Pass &all_threads to find_inferior instead of
8663 &all_lwps.
8664 (arm_remove_point): Ditto.
8665 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8666 (arm_prepare_to_resume): Fetch pid from thread.
8667 (arm_read_description): Fetch lwpid from current_inferior directly.
8668 * linux-low.c (all_lwps): Delete.
8669 (delete_lwp): Delete call to remove_inferior.
8670 (handle_extended_wait): Fetch lwpid from thread.
8671 (add_lwp): Don't set lwp->entry.id. Remove call to
8672 add_inferior_to_list.
8673 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8674 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8675 (kill_one_lwp_callback): Ditto.
8676 (linux_kill): Don't dereference NULL pointer.
8677 Fetch ptid,lwpid from thread.
8678 (get_detach_signal): Fetch ptid from thread.
8679 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8680 Simplify call to regcache_invalidate_thread.
8681 (delete_lwp_callback): Update, "entry" parameter is a
8682 struct thread_info * now. Fetch pid from thread.
8683 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8684 (status_pending_p_callback): Update, "entry" parameter is a
8685 struct thread_info * now. Fetch ptid from thread.
8686 (find_lwp_pid): Update, "entry" parameter is a
8687 struct thread_info * now.
8688 (linux_wait_for_lwp): Fetch pid from thread.
8689 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8690 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8691 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8692 (dequeue_one_deferred_signal): Ditto.
8693 (cancel_breakpoint): Fetch ptid from current_inferior.
8694 (linux_wait_for_event): Pass &all_threads to find_inferior,
8695 not &all_lwps. Fetch ptid, lwpid from thread.
8696 (count_events_callback): Update, "entry" parameter is a
8697 struct thread_info * now.
8698 (select_singlestep_lwp_callback): Ditto.
8699 (select_event_lwp_callback): Ditto.
8700 (cancel_breakpoints_callback): Ditto.
8701 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8702 not &all_lwps.
8703 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8704 (unsuspend_one_lwp): Update, "entry" parameter is a
8705 struct thread_info * now.
8706 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8707 not &all_lwps.
8708 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8709 Fetch lwpid from thread, not lwp.
8710 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8711 Pass &all_threads to find_inferior, not &all_lwps.
8712 (send_sigstop): Fetch lwpid from thread, not lwp.
8713 (send_sigstop_callback): Update, "entry" parameter is a
8714 struct thread_info * now.
8715 (suspend_and_send_sigstop_callback): Ditto.
8716 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8717 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8718 struct thread_info * now.
8719 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8720 from thread, lwp.
8721 (lwp_running): Update, "entry" parameter is a
8722 struct thread_info * now.
8723 (stop_all_lwps): Fetch ptid from thread.
8724 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8725 (linux_resume_one_lwp): Fetch lwpid from thread.
8726 (linux_set_resume_request): Update, "entry" parameter is a
8727 struct thread_info * now. Fetch pid, lwpid from thread.
8728 (resume_status_pending_p): Update, "entry" parameter is a
8729 struct thread_info * now.
8730 (need_step_over_p): Ditto. Fetch lwpid from thread.
8731 (start_step_over): Fetch lwpid from thread.
8732 (linux_resume_one_thread): Update, "entry" parameter is a
8733 struct thread_info * now. Fetch lwpid from thread.
8734 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8735 (proceed_one_lwp): Update, "entry" parameter is a
8736 struct thread_info * now. Fetch lwpid from thread.
8737 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8738 struct thread_info * now.
8739 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8740 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8741 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8742 directly.
8743 (regsets_store_inferior_registers): Ditto.
8744 (fetch_register, store_register): Ditto.
8745 (linux_read_memory, linux_write_memory): Ditto.
8746 (linux_request_interrupt): Ditto.
8747 (linux_read_auxv): Ditto.
8748 (linux_xfer_siginfo): Ditto.
8749 (linux_qxfer_spu): Ditto.
8750 (linux_qxfer_libraries_svr4): Ditto.
8751 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8752 moved to inferiors.h.
8753 (get_lwp): Delete.
8754 (get_thread_lwp): Update.
8755 (struct lwp_info): Delete member "entry". Simplify comment for
8756 member "thread".
8757 (all_lwps): Delete.
8758 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8759 current_inferior directly.
8760 (update_watch_registers_callback): Update, "entry" parameter is a
8761 struct thread_info * now. Fetch pid from thread.
8762 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8763 (mips_insert_point): Fetch lwpid from current_inferior.
8764 Pass &all_threads to find_inferior, not &all_lwps.
8765 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8766 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8767 directly.
8768 (mips_stopped_data_address): Ditto.
8769 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8770 directly.
8771 * linux-tile-low.c (tile_arch_setup): Ditto.
8772 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8773 (update_debug_registers_callback): Update, "entry" parameter is a
8774 struct thread_info * now. Fetch pid from thread.
8775 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8776 Pass &all_threads to find_inferior, not &all_lwps.
8777 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8778 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8779 Pass &all_threads to find_inferior, not &all_lwps.
8780 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8781 (i386_dr_low_get_status): Ditto.
8782 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8783 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8784 (x86_linux_read_description): Ditto.
8785 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8786
8787 2014-02-20 Doug Evans <dje@google.com>
8788
8789 * inferiors.c (get_first_inferior): Fix buglet.
8790
8791 2014-02-19 Doug Evans <dje@google.com>
8792
8793 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8794 * inferiors.c (add_thread): Change result type to struct thread_info *.
8795 All callers updated.
8796 (add_lwp): Call add_thread here instead of in callers.
8797 All callers updated.
8798 * linux-low.h (get_lwp_thread): Rewrite.
8799 (struct lwp_info): New member "thread".
8800
8801 2014-02-19 Doug Evans <dje@google.com>
8802
8803 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8804 All callers updated.
8805
8806 2014-02-19 Doug Evans <dje@google.com>
8807
8808 * inferiors.c (add_thread): Fix whitespace.
8809
8810 2014-02-19 Doug Evans <dje@google.com>
8811
8812 * dll.c (clear_dlls): Replace accessing list implemention details
8813 with API function.
8814 * gdbthread.h (get_first_thread): Declare.
8815 * inferiors.c (for_each_inferior_with_data): New function.
8816 (get_first_thread): New function.
8817 (find_thread_ptid): Simplify.
8818 (get_first_inferior): New function.
8819 (clear_list): Delete.
8820 (one_inferior_p): New function.
8821 (clear_inferior_list): New function.
8822 (clear_inferiors): Update.
8823 * inferiors.h (for_each_inferior_with_data): Declare.
8824 (clear_inferior_list): Declare.
8825 (one_inferior_p): Declare.
8826 (get_first_inferior): Declare.
8827 * linux-low.c (linux_wait_for_event): Replace accessing list
8828 implemention details with API function.
8829 * server.c (target_running): Ditto.
8830 (accumulate_file_name_length): New function.
8831 (emit_dll_description): New function.
8832 (handle_qxfer_libraries): Replace accessing list implemention
8833 details with API function.
8834 (handle_qxfer_threads_worker): New function.
8835 (handle_qxfer_threads_proper): Replace accessing list implemention
8836 details with API function.
8837 (handle_query): Ditto.
8838 (visit_actioned_threads_callback_ftype): New typedef.
8839 (visit_actioned_threads_data): New struct.
8840 (visit_actioned_threads): Rewrite to be find_inferior callback.
8841 (resume): Call find_inferior.
8842 (handle_status): Replace accessing list implemention
8843 details with API function.
8844 (process_serial_event): Replace accessing list implemention details
8845 with API function.
8846 * target.c (set_desired_inferior): Replace accessing list implemention
8847 details with API function.
8848 * tracepoint.c (same_process_p): New function.
8849 (gdb_agent_about_to_close): Replace accessing list implemention
8850 details with API function.
8851 * win32-low.c (child_delete_thread): Replace accessing list
8852 implemention details with API function.
8853 (match_dll_by_basename): New function.
8854 (dll_is_loaded_by_basename): New function.
8855 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8856 details call to dll_is_loaded_by_basename.
8857
8858 2014-02-19 Doug Evans <dje@google.com>
8859
8860 * dll.h (struct dll_info): Add comment.
8861 * gdbthread.h (struct thread_info): Add comment.
8862 (current_ptid): Simplify.
8863 * inferiors.c (add_process): Update.
8864 (remove_process): Update.
8865 * inferiors.h (struct process_info): Rename member "head" to "entry".
8866 * linux-low.c (delete_lwp): Update.
8867 (add_lwp): Update.
8868 (last_thread_of_process_p): Update.
8869 (kill_one_lwp_callback, linux_kill): Update.
8870 (status_pending_p_callback): Update.
8871 (wait_for_sigstop): Update. Simplify read of ptid.
8872 (start_step_over): Update.
8873 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8874 (get_lwp_thread): Update.
8875 (struct lwp_info): Rename member "head" to "entry".
8876 * regcache.h (inferior_list_entry): Delete.
8877 * server.c (kill_inferior_callback): Update.
8878 (detach_or_kill_inferior_callback): Update.
8879 (print_started_pid): Update.
8880 (print_attached_pid): Update.
8881 (process_serial_event): Simplify read of ptid.
8882 * thread-db.c (thread_db_create_event): Update.
8883 (thread_db_get_tls_address): Update.
8884 * win32-low.c (current_inferior_ptid): Simplify.
8885
8886 2014-02-19 Tom Tromey <tromey@redhat.com>
8887
8888 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8889 argument.
8890 (target_supports_btrace): Update.
8891
8892 2014-02-14 Yao Qi <yao@codesourcery.com>
8893
8894 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8895 (rsp-low-ipa.o): New target.
8896
8897 2014-02-12 Tom Tromey <tromey@redhat.com>
8898
8899 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8900 convert_ascii_to_int.
8901 * regcache.c (registers_to_string): Likewise.
8902 * remote-utils.c (decode_M_packet): Likewise.
8903 * server.c (process_serial_event): Likewise.
8904
8905 2014-02-12 Tom Tromey <tromey@redhat.com>
8906
8907 * server.c (handle_query, handle_v_run): Use hex2bin, not
8908 unhexify.
8909 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8910
8911 2014-02-12 Tom Tromey <tromey@redhat.com>
8912
8913 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8914 convert_int_to_ascii.
8915 * regcache.c (registers_to_string, collect_register_as_string):
8916 Likewise.
8917 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8918 Likewise.
8919 * server.c (process_serial_event): Likewise.
8920 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8921 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8922
8923 2014-02-12 Tom Tromey <tromey@redhat.com>
8924
8925 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8926 bin2hex, not hexify.
8927 * tracepoint.c (cmd_qtstatus): Likewise.
8928
8929 2014-02-12 Tom Tromey <tromey@redhat.com>
8930
8931 * remote-utils.c (monitor_output): Pass explicit length to
8932 hexify.
8933
8934 2014-02-12 Tom Tromey <tromey@redhat.com>
8935
8936 * tracepoint.c: Include rsp-low.h.
8937 * server.c: Include rsp-low.h.
8938 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8939 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8940 declare.
8941 * remote-utils.c: Include rsp-low.h.
8942 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8943 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8944 (convert_int_to_ascii, convert_ascii_to_int): Move to
8945 common/rsp-low.c.
8946 * regcache.c: Include rsp-low.h.
8947 * ax.c: Include rsp-low.h.
8948 * Makefile.in (SFILES): Add common/rsp-low.c.
8949 (OBS): Add rsp-low.o.
8950 (rsp-low.o): New target.
8951
8952 2014-02-12 Tom Tromey <tromey@redhat.com>
8953
8954 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8955 Include print-utils.h.
8956 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8957 (plongest, thirty_two, phex_nz): Remove.
8958 * Makefile.in (SFILES): Add common/print-utils.c.
8959 (OBS): Add print-utils.o.
8960 (print-utils-ipa.o): New target.
8961 (print-utils.o): New target.
8962 (IPA_OBJS): Add print-utils-ipa.o.
8963
8964 2014-02-06 Tom Tromey <tromey@redhat.com>
8965
8966 * Makefile.in (SFILES): Fix indentation.
8967
8968 2014-02-05 Doug Evans <dje@google.com>
8969
8970 * linux-low.c (linux_wait_for_event): Improve comment.
8971 (linux_wait_1): Keep current_inferior in sync with event_child.
8972
8973 2014-01-22 Doug Evans <dje@google.com>
8974
8975 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8976
8977 2014-01-22 Doug Evans <dje@google.com>
8978
8979 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8980 * configure: Regenerate.
8981 * config.in: Regenerate.
8982 * Makefile.in (SFILES): Add debug.c.
8983 (OBS): Add debug.o.
8984 * debug.c: New file.
8985 * debug.h: New file.
8986 * linux-aarch64-low.c (*): Update all debugging printfs to use
8987 debug_printf instead of fprintf.
8988 * linux-arm-low.c (*): Ditto.
8989 * linux-cris-low.c (*): Ditto.
8990 * linux-crisv32-low.c (*): Ditto.
8991 * linux-m32r-low.c (*): Ditto.
8992 * linux-sparc-low.c (*): Ditto.
8993 * linux-x86.c (*): Ditto.
8994 * linux-low.c (*): Ditto.
8995 (linux_wait_1): Add calls to debug_enter, debug_exit.
8996 (linux_wait): Remove redundant debugging printf.
8997 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8998 (linux_resume, unstop_all_lwps): Ditto.
8999 * mem-break.c (*): Update all debugging printfs to use
9000 debug_printf instead of fprintf.
9001 * remote-utils.c (*): Ditto.
9002 * thread-db.c (*): Ditto.
9003 * server.c #include <ctype.h>, "gdb_vecs.h".
9004 (debug_threads): Moved to debug.c.
9005 (*): Update all debugging printfs to use debug_printf instead of
9006 fprintf.
9007 (start_inferior): Replace call to fflush with call to debug_flush.
9008 (monitor_show_help): Mention set debug-format.
9009 (parse_debug_format_options): New function.
9010 (handle_monitor_command): Handle "monitor set debug-format".
9011 (gdbserver_usage): Mention --debug-format.
9012 (main): Parse --debug-format.
9013 * server.h (debug_threads): Declaration moved to debug.h.
9014 #include "debug.h".
9015 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9016 trace_debug_1 that uses debug_printf.
9017 (tracepoint_look_up_symbols): Update all debugging printfs to use
9018 debug_printf instead of fprintf.
9019
9020 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9021
9022 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9023 sys/ptrace.h.
9024
9025 2014-01-17 Pedro Alves <palves@redhat.com>
9026
9027 PR build/16445
9028 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9029 defined after including gdb_proc_service.h.
9030
9031 2014-01-16 Doug Evans <dje@google.com>
9032
9033 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9034 (match_dll): Use it.
9035
9036 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9037
9038 * target.h (target_ops) <read_btrace>: Change parameters and
9039 return type to allow error reporting.
9040 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9041 trace reading errors on.
9042 * linux-low.c (linux_low_read_btrace): Pass trace reading
9043 errors on.
9044 (linux_low_disable_btrace): New.
9045
9046 2014-01-15 Doug Evans <dje@google.com>
9047
9048 * inferiors.c (thread_id_to_gdb_id): Delete.
9049 * inferiors.h (thread_id_to_gdb_id): Delete.
9050
9051 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9052
9053 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9054 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9055 versions.
9056
9057 2014-01-08 Pedro Alves <palves@redhat.com>
9058
9059 * server.c (handle_status): Don't discard previous queued stop
9060 replies or thread's pending status here.
9061 (main) <disconnection>: Do it here instead.
9062
9063 2014-01-08 Pedro Alves <palves@redhat.com>
9064
9065 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9066 * server.c (visit_actioned_threads, handle_pending_status): New
9067 function.
9068 (handle_v_cont): Factor out parts to ...
9069 (resume): ... this new function. If in all-stop, and a thread
9070 being resumed has a pending status, report it without actually
9071 resuming.
9072 (myresume): Adjust to use the new 'resume' function.
9073 (clear_pending_status_callback, set_pending_status_callback)
9074 (find_status_pending_thread_callback): New functions.
9075 (handle_status): Handle the case of multiple threads having
9076 interesting statuses to report. Report threads' real last signal
9077 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9078 with an interesting thread to report the status for, instead of
9079 always reporting the status of the first thread.
9080
9081 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9082
9083 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9084 * gdbreplay.c (gdbreplay_version): Likewise.
9085
9086 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9087
9088 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9089 iov.iov_len with the real length in use.
9090
9091 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9092
9093 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9094 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9095 for all targets that use win32-low.c.
9096 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9097 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9098
9099 2013-12-13 Pedro Alves <palves@redhat.com>
9100
9101 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9102 if equal to TARGET_WAITKIND_LOADED.
9103 * win32-low.c (cached_status): New static global.
9104 (win32_wait): Add declaration.
9105 (do_initial_child_stuff): Flush all initial pending debug events
9106 up to the initial breakpoint.
9107 (win32_wait): If CACHED_STATUS was set, return that instead
9108 of doing a real wait. Remove the code resuming the execution
9109 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9110 during the initial phase. Also remove the code changing
9111 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9112 TARGET_WAITKIND_STOPPED.
9113
9114 2013-12-11 Yao Qi <yao@codesourcery.com>
9115
9116 * notif.c (handle_notif_ack): Return 0 if no notification
9117 matches.
9118
9119 2013-11-20 Doug Evans <dje@google.com>
9120
9121 * linux-low.c (linux_set_resume_request): Fix comment.
9122
9123 2013-11-20 Doug Evans <dje@google.com>
9124
9125 * linux-low.c (resume_status_pending_p): Tweak comment.
9126
9127 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9128
9129 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9130 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9131 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9132 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9133 (srv_amd64_regobj): Add amd64-mpx.o.
9134 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9135 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9136 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9137 * i387-fp.c (num_pl_bnd_register) Added constant.
9138 (num_pl_bnd_cfg_registers) Added constant.
9139 (struct i387_xsave) Added reserved area and MPX fields.
9140 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9141 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9142 function.
9143 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9144 (init_registers_amd64_mpx_linux): Declare new function.
9145 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9146 (x86_64_regmap): Add MPX registers.
9147 (x86_linux_read_description): Add MPX case.
9148 (initialize_low_arch): Initialize MPX targets.
9149
9150 2013-11-18 Tom Tromey <tromey@redhat.com>
9151
9152 * configure: Rebuild.
9153 * configure.ac: Don't check for stdlib.h.
9154 * gdbreplay.c: Unconditionally include stdlib.h.
9155
9156 2013-11-18 Tom Tromey <tromey@redhat.com>
9157
9158 * config.in: Rebuild.
9159 * configure: Rebuild.
9160 * configure.ac: Don't use AC_HEADER_DIRENT.
9161
9162 2013-11-18 Tom Tromey <tromey@redhat.com>
9163
9164 * server.h: Don't check HAVE_STRING_H.
9165 * gdbreplay.c: Don't check HAVE_STRING_H.
9166 * configure: Rebuild.
9167
9168 2013-11-18 Tom Tromey <tromey@redhat.com>
9169
9170 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9171 LIBGNU.
9172
9173 2013-11-08 Tom Tromey <tromey@redhat.com>
9174
9175 * configure, config.in: Rebuild.
9176 * configure.ac: Remove unused configury.
9177
9178 2013-11-08 Tom Tromey <tromey@redhat.com>
9179
9180 * acinclude.m4: Include common.m4, codeset.m4.
9181 * configure, config.in: Rebuild.
9182 * configure.ac: Use GDB_AC_COMMON.
9183
9184 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9185
9186 * linux-s390-low.c (HWCAP_S390_TE): New define.
9187 (s390_arch_setup): Consider the TE field in the HWCAP for
9188 determining 'have_regset_tdb'.
9189
9190 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9191
9192 PR gdb/16014
9193 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9194 call to sizeof.
9195
9196 2013-10-02 Pedro Alves <palves@redhat.com>
9197
9198 * server.c (process_serial_event): Don't output "GDBserver
9199 exiting" if GDB is connected through stdio.
9200 * target.c (mywait): Likewise, be silent if GDB is connected
9201 through stdio.
9202
9203 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9204
9205 * lynx-low.c (lynx_add_threads_after_attach): New function.
9206 (lynx_attach): Remove call to add_thread. Add call to
9207 lynx_add_threads_after_attach instead.
9208
9209 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9210
9211 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9212 * config.in, configure: Regenerated.
9213
9214 2013-09-18 Yao Qi <yao@codesourcery.com>
9215
9216 PR server/15959
9217 * server.c (start_inferior): Clear 'resume_info'.
9218
9219 2013-09-16 Jiong Wang <jiwang@tilera.com>
9220
9221 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9222 for each register.
9223
9224 2013-09-16 Jiong Wang <jiwang@tilera.com>
9225
9226 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9227 linux-tile-low.o to srv_tgtobj.
9228
9229 2013-09-16 Will Newton <will.newton@linaro.org>
9230
9231 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9232 out regs.
9233
9234 2013-09-06 Pedro Alves <palves@redhat.com>
9235
9236 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9237 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9238 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9239 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9240 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9241 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9242
9243 2013-09-06 Pedro Alves <palves@redhat.com>
9244
9245 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9246 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9247
9248 2013-09-06 Pedro Alves <palves@redhat.com>
9249
9250 * linux-amd64-ipa.c: Include tracepoint.h.
9251 * linux-i386-ipa.c: Include tracepoint.h.
9252
9253 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9254
9255 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9256 (ps_get_thread_area): New function.
9257
9258 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9259
9260 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9261 (initialize_low_arch): Call init_registers_crisv32 rather than
9262 init_register_crisv32.
9263
9264 2013-09-05 Pedro Alves <palves@redhat.com>
9265
9266 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9267 to ...
9268 * hostio.h: ... this new file.
9269 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9270 win32-low.c: Include hostio.h.
9271
9272 2013-09-05 Pedro Alves <palves@redhat.com>
9273
9274 * server.h (gdb_client_data, handler_func, callback_handler_func)
9275 (delete_file_handler, add_file_handler, append_callback_event)
9276 (delete_callback_event, start_event_loop, initialize_event_loop):
9277 Move to event-loop.h and include it.
9278 * event-loop.h: New file.
9279
9280 2013-09-05 Pedro Alves <palves@redhat.com>
9281
9282 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9283 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9284 (loaded_dll, unloaded_dll): Move to ...
9285 * dll.h: ... this new file.
9286 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9287
9288 2013-09-05 Pedro Alves <palves@redhat.com>
9289
9290 * server.h (current_process, get_thread_process, all_processes)
9291 (add_inferior_to_list, for_each_inferior, current_inferior)
9292 (remove_inferior, add_process, remove_process, find_process_pid)
9293 (have_started_inferiors_p, have_attached_inferiors_p)
9294 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9295 (clear_inferiors, find_inferior, find_inferior_id)
9296 (inferior_target_data, set_inferior_target_data)
9297 (inferior_regcache_data, set_inferior_regcache_data): Move to
9298 inferiors.h, and include it.
9299 * inferiors.h: New file.
9300
9301 2013-09-05 Pedro Alves <palves@redhat.com>
9302
9303 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9304 Move ...
9305 * ax.h: ... here.
9306
9307 2013-09-05 Pedro Alves <palves@redhat.com>
9308
9309 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9310 tracepoint.h.
9311 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9312 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9313 (handle_tracepoint_general_set, handle_tracepoint_query)
9314 (tracepoint_finished_step, tracepoint_was_hit)
9315 (release_while_stepping_state_list, current_traceframe)
9316 (in_readonly_region, traceframe_read_mem)
9317 (fetch_traceframe_registers, traceframe_read_sdata)
9318 (traceframe_read_info, struct fast_tpoint_collect_status)
9319 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9320 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9321 (supply_fast_tracepoint_registers)
9322 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9323 (ipa_tdesc, claim_trampoline_space)
9324 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9325 (agent_mem_read, agent_get_trace_state_variable_value)
9326 (agent_set_trace_state_variable_value, agent_tsv_read)
9327 (agent_mem_read_string, get_raw_reg_func_addr)
9328 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9329 * tracepoint.h: ... this new file.
9330
9331 2013-09-05 Pedro Alves <palves@redhat.com>
9332
9333 * server.h (perror_with_name, error, fatal, warning, paddress)
9334 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9335 include it.
9336 * utils.h: New file.
9337
9338 2013-09-05 Pedro Alves <palves@redhat.com>
9339
9340 * server.h (remote_debug, noack_mode, transport_is_reliable)
9341 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9342 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9343 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9344 (write_enn, initialize_async_io, enable_async_io)
9345 (disable_async_io, check_remote_input_interrupt_request)
9346 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9347 (dead_thread_notify, prepare_resume_reply)
9348 (decode_address_to_semicolon, decode_address, decode_m_packet)
9349 (decode_M_packet, decode_X_packet, decode_xfer_write)
9350 (decode_search_memory_packet, unhexify, hexify)
9351 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9352 (look_up_one_symbol, relocate_instruction)
9353 (monitor_output): Move to remote-utils.h, and include it.
9354 * remote-utils.h: New file.
9355
9356 2013-09-05 Pedro Alves <palves@redhat.com>
9357
9358 * server.h (_): Delete.
9359
9360 2013-09-02 Pedro Alves <palves@redhat.com>
9361
9362 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9363 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9364 allocated.
9365 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9366
9367 2013-09-02 Pierre Muller <muller@sourceware.org>
9368
9369 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9370 or WriteProcessMemory complete successfully and handle
9371 ERROR_PARTIAL_COPY error.
9372
9373 2013-09-02 Pedro Alves <palves@redhat.com>
9374
9375 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9376 error instead of EIO.
9377
9378 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9379
9380 PR server/15604
9381 * linux-low.c: Include filestuff.h.
9382 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9383 * lynx-low.c: Include filestuff.h.
9384 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9385 * server.c: Include filestuff.h.
9386 (main): Call notice_open_fds.
9387 * spu-low.c: Include filestuff.h.
9388 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9389
9390 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9391
9392 * Makefile.in: Explain why ../target and ../nat are not
9393 listed as include file search paths.
9394 (linux-waitpid.o): New object file rule.
9395 * configure.srv (srv_native_linux_obj): New variable.
9396 Replace all occurrences of linux native object files with
9397 $srv_native_linux_obj.
9398 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9399 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9400 (linux_enable_event_reporting): Remove declaration.
9401 (my_waitpid): Moved to common/linux-waitpid.c.
9402 (linux_wait_for_event): Pass ptid when calling
9403 linux_enable_event_reporting.
9404 (linux_supports_tracefork_flag): Remove.
9405 (linux_enable_event_reporting): Likewise.
9406 (linux_tracefork_grandchild): Remove.
9407 (STACK_SIZE): Moved to common/linux-ptrace.c.
9408 (linux_tracefork_child): Remove.
9409 (linux_test_for_tracefork): Remove.
9410 (linux_look_up_symbols): Call linux_supports_traceclone.
9411 (initialize_low): Remove call to linux_test_for_tracefork.
9412 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9413 common/linux-ptrace.h.
9414 (PTRACE_TYPE_ARG4): Likewise.
9415 Include linux-ptrace.h.
9416
9417 2013-08-21 Pedro Alves <palves@redhat.com>
9418
9419 * config.in: Renegerate.
9420
9421 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9422
9423 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9424 (SFILES): Remove $(srcdir)/common/target-common.c and
9425 add $(srcdir)/target/waitstatus.c.
9426 (OBS): Remove target-common.o and add waitstatus.o.
9427 (server_h): Remove $(srcdir)/../common/target-common.h and
9428 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9429 and $(srcdir)/../target/waitstatus.h.
9430 (target-common.o): Remove.
9431 (waitstatus.o): New target object file.
9432 * target.h: Do not include target-common.h and
9433 include target/resume.h, target/wait.h and
9434 target/waitstatus.h.
9435
9436 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9437
9438 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9439 to PTRACE_TYPE_ARG3.
9440 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9441 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9442 PTRACE_TYPE_ARG4.
9443 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9444 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9445
9446 2013-07-27 Jie Zhang <jie@codesourcery.com>
9447 Daniel Jacobowitz <dan@codesourcery.com>
9448 Yao Qi <yao@codesourcery.com>
9449
9450 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9451 (mips-linux-watch.o): New rule.
9452 (mips_linux_watch_h): New variable.
9453 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9454 srv_tgtobj.
9455 * linux-mips-low.c: Include mips-linux-watch.h.
9456 (struct arch_process_info, struct arch_lwp_info): New.
9457 (update_watch_registers_callback): New function.
9458 (mips_linux_new_process, mips_linux_new_thread) New functions.
9459 (mips_linux_prepare_to_resume, mips_insert_point): New
9460 functions.
9461 (mips_remove_point, mips_stopped_by_watchpoint): New
9462 functions.
9463 (rsp_bp_type_to_target_hw_bp_type): New function.
9464 (mips_stopped_data_address): New function.
9465 (the_low_target): Add watchpoint support functions.
9466
9467 2013-07-27 Yao Qi <yao@codesourcery.com>
9468
9469 * i386-low.c: Include break-common.h.
9470 (enum target_hw_bp_type): Remove.
9471
9472 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9473
9474 * Makefile.in (SFILES): /common/target-common.c.
9475 (OBS): Add target-common.o.
9476 (server_h): Add $(srcdir)/../common/target-common.h.
9477 (target-common.o): New target.
9478 * server.c (queue_stop_reply_callback): Free
9479 status string after use.
9480 * target.c (target_waitstatus_to_string): Remove.
9481 * target.h: Include target-common.h.
9482 (resume_kind): Likewise.
9483 (target_waitkind): Likewise.
9484 (target_waitstatus): Likewise.
9485 (TARGET_WNOHANG): Likewise.
9486
9487 2013-07-04 Yao Qi <yao@codesourcery.com>
9488
9489 * Makefile.in (host_alias): Use @host_noncanonical@.
9490 (target_alias): Use @target_noncanonical@.
9491 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9492 ACX_NONCANONICAL_HOST.
9493 * configure: Regenerated.
9494
9495 Revert:
9496 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9497
9498 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9499 * configure: Rebuild.
9500 * Makefile.in (version_host, version_target): Get from configure.
9501 (version.c): Use $(version_host) and $(version_target).
9502
9503 2013-07-03 Pedro Alves <palves@redhat.com>
9504
9505 * Makefile.in (config.status): Depend on development.sh.
9506 * acinclude.m4: Include libmcheck.m4.
9507 * configure: Regenerate.
9508
9509 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9510
9511 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9512 attribute inside the parentheses.
9513 (winapi_DebugSetProcessKillOnExit): Ditto.
9514 (winapi_DebugBreakProcess): Ditto.
9515 (winapi_GenerateConsoleCtrlEvent): Ditto.
9516
9517 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9518
9519 * notif.h (notif_event): Add a dummy member to avoid compiler
9520 errors.
9521
9522 2013-07-01 Pedro Alves <palves@redhat.com>
9523
9524 * hostio.c (HOSTIO_PATH_MAX): Define.
9525 (require_filename, handle_open, handle_unlink, handle_readlink):
9526 Use it.
9527
9528 2013-07-01 Pedro Alves <palves@redhat.com>
9529
9530 * server.h: Include "pathmax.h".
9531 * linux-low.c: Don't include sys/param.h.
9532 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9533 MAXPATHLEN.
9534 * win32-low.c: Don't include sys/param.h.
9535 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9536
9537 2013-07-01 Pedro Alves <palves@redhat.com>
9538
9539 * event-loop.c: Don't check HAVE_UNISTD_H before including
9540 <unistd.h>.
9541 * gdbreplay.c: Likewise.
9542 * remote-utils.c: Likewise.
9543 * server.c: Likewise.
9544 * configure.ac: Don't check for unistd.h.
9545 * configure: Regenerate.
9546
9547 2013-06-28 Tom Tromey <tromey@redhat.com>
9548
9549 * Makefile.in (version.c): Use version.in, not
9550 common/version.in.
9551
9552 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9553
9554 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9555 * configure: Rebuild.
9556 * Makefile.in (version_host, version_target): Get from configure.
9557 (version.c): Use $(version_host) and $(version_target).
9558
9559 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9560
9561 Fix trace-status to output user name without trailing colon.
9562 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9563
9564 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9565
9566 Fix trace-status to output proper start-time and stop-time.
9567 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9568 output start time and stop time in hex as gdb expects.
9569
9570 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9571
9572 * tracepoint.c (build_traceframe_info_xml): Output trace state
9573 variables present in the trace buffer.
9574
9575 2013-06-24 Tom Tromey <tromey@redhat.com>
9576
9577 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9578 create-version.sh.
9579 (version.o): Remove.
9580 * gdbreplay.c: Include version.h.
9581 (version, host_name): Don't declare.
9582 * server.h: Include version.h.
9583 (version, host_name): Don't declare.
9584
9585 2013-06-12 Pedro Alves <palves@redhat.com>
9586
9587 * linux-x86-low.c (linux_is_elf64): Delete global.
9588 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9589 with local linux_pid_exe_is_elf_64_file use.
9590
9591 2013-06-11 Pedro Alves <palves@redhat.com>
9592
9593 * linux-low.c (regset_disabled, disable_regset): New functions.
9594 (regsets_fetch_inferior_registers)
9595 (regsets_store_inferior_registers): Use them.
9596 (initialize_regsets_info); Don't allocate the disabled_regsets
9597 array here.
9598 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9599 comment.
9600
9601 2013-06-11 Pedro Alves <palves@redhat.com>
9602
9603 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9604 xmalloc.
9605
9606 2013-06-11 Pedro Alves <palves@redhat.com>
9607
9608 * linux-x86-low.c (initialize_low_arch): Call
9609 init_registers_x32_avx_linux.
9610
9611 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9612
9613 Fix compatibility with Android Bionic.
9614 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9615 it is not empty.
9616
9617 2013-06-07 Pedro Alves <palves@redhat.com>
9618
9619 PR server/14823
9620 * Makefile.in (OBS): Add tdesc.o.
9621 (IPA_OBJS): Add tdesc-ipa.o.
9622 (tdesc-ipa.o): New rule.
9623 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9624 interface.
9625 * linux-low.c (new_inferior): Delete.
9626 (disabled_regsets, num_regsets): Delete.
9627 (linux_add_process): Adjust to set the new per-process
9628 new_inferior flag.
9629 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9630 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9631 was a stop. When calling arch_setup, switch the current inferior
9632 to the thread that got an event.
9633 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9634 (regsets_fetch_inferior_registers)
9635 (regsets_store_inferior_registers): New regsets_info parameter.
9636 Adjust to use it.
9637 (linux_register_in_regsets): New regs_info parameter. Adjust to
9638 use it.
9639 (register_addr, fetch_register, store_register): New usrregs_info
9640 parameter. Adjust to use it.
9641 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9642 parameter regs_info. Adjust to use it.
9643 (linux_fetch_registers): Get the current inferior's regs_info, and
9644 adjust to use it.
9645 (linux_store_registers): Ditto.
9646 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9647 (initialize_low): Don't initialize the target_regsets here. Call
9648 initialize_low_arch.
9649 * linux-low.h (target_regsets): Delete declaration.
9650 (struct regsets_info): New.
9651 (struct usrregs_info): New.
9652 (struct regs_info): New.
9653 (struct process_info_private) <new_inferior>: New field.
9654 (struct linux_target_ops): Delete the num_regs, regmap, and
9655 regset_bitmap fields. New field regs_info.
9656 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9657 * i387-fp.c (num_xmm_registers): Delete.
9658 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9659 calls to new interface.
9660 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9661 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9662 Infer the number of xmm registers from the regcache's target
9663 description.
9664 * i387-fp.h (num_xmm_registers): Delete.
9665 * inferiors.c (add_thread): Don't install the thread's regcache
9666 here.
9667 * proc-service.c (gregset_info): Fetch the current inferior's
9668 regs_info. Adjust to use it.
9669 * regcache.c: Include tdesc.h.
9670 (register_bytes, reg_defs, num_registers)
9671 (gdbserver_expedite_regs): Delete.
9672 (get_thread_regcache): If the thread doesn't have a regcache yet,
9673 create one, instead of aborting gdbserver.
9674 (regcache_invalidate_one): Rename to ...
9675 (regcache_invalidate_thread): ... this.
9676 (regcache_invalidate_one): New.
9677 (regcache_invalidate): Only invalidate registers of the current
9678 process.
9679 (init_register_cache): Add target_desc parameter, and use it.
9680 (new_register_cache): Ditto. Assert the target description has a
9681 non zero registers_size.
9682 (regcache_cpy): Add assertions. Adjust.
9683 (realloc_register_cache, set_register_cache): Delete.
9684 (registers_to_string, registers_from_string): Adjust.
9685 (find_register_by_name, find_regno, find_register_by_number)
9686 (register_cache_size): Add target_desc parameter, and use it.
9687 (free_register_cache_thread, free_register_cache_thread_one)
9688 (regcache_release, register_cache_size): New.
9689 (register_size): Add target_desc parameter, and use it.
9690 (register_data, supply_register, supply_register_zeroed)
9691 (supply_regblock, supply_register_by_name, collect_register)
9692 (collect_register_as_string, collect_register_by_name): Adjust.
9693 * regcache.h (struct target_desc): Forward declare.
9694 (struct regcache) <tdesc>: New field.
9695 (init_register_cache, new_register_cache): Add target_desc
9696 parameter.
9697 (regcache_invalidate_thread): Declare.
9698 (regcache_invalidate_one): Delete declaration.
9699 (regcache_release): Declare.
9700 (find_register_by_number, register_cache_size, register_size)
9701 (find_regno): Add target_desc parameter.
9702 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9703 declarations.
9704 * remote-utils.c: Include tdesc.h.
9705 (outreg, prepare_resume_reply): Adjust.
9706 * server.c: Include tdesc.h.
9707 (gdbserver_xmltarget): Delete declaration.
9708 (get_features_xml, process_serial_event): Adjust.
9709 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9710 declare.
9711 (struct process_info) <tdesc>: New field.
9712 (ipa_tdesc): Declare.
9713 * tdesc.c: New file.
9714 * tdesc.h: New file.
9715 * tracepoint.c: Include tdesc.h.
9716 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9717 (get_context_regcache): Adjust to pass ipa_tdesc down.
9718 (do_action_at_tracepoint): Adjust to get the register cache size
9719 from the context regcache's description.
9720 (traceframe_walk_blocks): Adjust to get the register cache size
9721 from the current trace frame's description.
9722 (traceframe_get_pc): Adjust to get current trace frame's
9723 description and pass it down.
9724 (gdb_collect): Adjust to get the register cache size from the
9725 IPA's description.
9726 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9727 (gdbserver_xmltarget): Delete.
9728 (initialize_low_tracepoint): Set the ipa's target description.
9729 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9730 (initialize_low_tracepoint): Set the ipa's target description.
9731 * linux-x86-low.c: Include tdesc.h.
9732 [__x86_64__] (is_64bit_tdesc): New.
9733 (ps_get_thread_area, x86_get_thread_area): Use it.
9734 (i386_cannot_store_register): Rename to ...
9735 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9736 (i386_cannot_fetch_register): Rename to ...
9737 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9738 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9739 to new interface.
9740 (target_regsets): Rename to ...
9741 (x86_regsets): ... this.
9742 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9743 interface.
9744 (x86_siginfo_fixup): Use is_64bit_tdesc.
9745 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9746 (tdesc_x32_avx_linux, tdesc_x32_linux)
9747 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9748 Declare.
9749 (x86_linux_update_xmltarget): Delete.
9750 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9751 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9752 (AMD64_LINUX_USER64_CS): New.
9753 (x86_linux_read_description): New, based on
9754 x86_linux_update_xmltarget.
9755 (same_process_callback): New.
9756 (x86_arch_setup_process_callback): New.
9757 (x86_linux_update_xmltarget): New.
9758 (x86_regsets_info): New.
9759 (amd64_linux_regs_info): New.
9760 (i386_linux_usrregs_info): New.
9761 (i386_linux_regs_info): New.
9762 (x86_linux_regs_info): New.
9763 (x86_arch_setup): Reimplement.
9764 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9765 (x86_emit_ops): Ditto.
9766 (the_low_target): Adjust. Install x86_linux_regs_info,
9767 x86_cannot_fetch_register, and x86_cannot_store_register.
9768 (initialize_low_arch): New.
9769 * linux-ia64-low.c (tdesc_ia64): Declare.
9770 (ia64_fetch_register): Adjust.
9771 (ia64_usrregs_info, regs_info): New globals.
9772 (ia64_regs_info): New function.
9773 (the_low_target): Adjust.
9774 (initialize_low_arch): New function.
9775 * linux-sparc-low.c (tdesc_sparc64): Declare.
9776 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9777 Adjust.
9778 (sparc_arch_setup): New function.
9779 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9780 (the_low_target): Adjust.
9781 (initialize_low_arch): New function.
9782 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9783 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9784 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9785 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9786 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9787 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9788 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9789 (tdesc_powerpc_isa205_vsx64l): Declare.
9790 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9791 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9792 (ppc_set_pc, ppc_get_hwcap): Adjust.
9793 (ppc_usrregs_info): Forward declare.
9794 (!__powerpc64__) ppc_regmap_adjusted: New global.
9795 (ppc_arch_setup): Adjust to the current process'es target
9796 description.
9797 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9798 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9799 (ppc_store_evrregset): Adjust.
9800 (target_regsets): Rename to ...
9801 (ppc_regsets): ... this, and make static.
9802 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9803 (ppc_regs_info): New function.
9804 (the_low_target): Adjust.
9805 (initialize_low_arch): New function.
9806 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9807 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9808 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9809 (tdesc_s390x_linux64v2): Declare.
9810 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9811 (s390_fill_gregset, s390_store_last_break): Adjust.
9812 (target_regsets): Rename to ...
9813 (s390_regsets): ... this, and make static.
9814 (s390_get_pc, s390_set_pc): Adjust.
9815 (s390_get_hwcap): New target_desc parameter, and use it.
9816 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9817 (s390_arch_setup): Adjust to set the current process'es target
9818 description. Don't adjust the regmap.
9819 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9820 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9821 (regs_info_3264): New globals.
9822 (s390_regs_info): New function.
9823 (the_low_target): Adjust.
9824 (initialize_low_arch): New function.
9825 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9826 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9827 [__mips64] (init_registers_mips_linux)
9828 (init_registers_mips_dsp_linux): Delete defines.
9829 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9830 (have_dsp): New global.
9831 (mips_read_description): New, based on mips_arch_setup.
9832 (mips_arch_setup): Reimplement.
9833 (get_usrregs_info): New function.
9834 (mips_cannot_fetch_register, mips_cannot_store_register)
9835 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9836 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9837 (target_regsets): Rename to ...
9838 (mips_regsets): ... this, and make static.
9839 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9840 (dsp_regs_info, regs_info): New globals.
9841 (mips_regs_info): New function.
9842 (the_low_target): Adjust.
9843 (initialize_low_arch): New function.
9844 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9845 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9846 Declare.
9847 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9848 (arm_read_description): New, with bits factored from
9849 arm_arch_setup.
9850 (arm_arch_setup): Reimplement.
9851 (target_regsets): Rename to ...
9852 (arm_regsets): ... this, and make static.
9853 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9854 (arm_regs_info): New function.
9855 (the_low_target): Adjust.
9856 (initialize_low_arch): New function.
9857 * linux-m68k-low.c (tdesc_m68k): Declare.
9858 (target_regsets): Rename to ...
9859 (m68k_regsets): ... this, and make static.
9860 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9861 (m68k_regs_info): New function.
9862 (m68k_arch_setup): New function.
9863 (the_low_target): Adjust.
9864 (initialize_low_arch): New function.
9865 * linux-sh-low.c (tdesc_sharch): Declare.
9866 (target_regsets): Rename to ...
9867 (sh_regsets): ... this, and make static.
9868 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9869 (sh_regs_info, sh_arch_setup): New functions.
9870 (the_low_target): Adjust.
9871 (initialize_low_arch): New function.
9872 * linux-bfin-low.c (tdesc_bfin): Declare.
9873 (bfin_arch_setup): New function.
9874 (bfin_usrregs_info, regs_info): New globals.
9875 (bfin_regs_info): New function.
9876 (the_low_target): Adjust.
9877 (initialize_low_arch): New function.
9878 * linux-cris-low.c (tdesc_cris): Declare.
9879 (cris_arch_setup): New function.
9880 (cris_usrregs_info, regs_info): New globals.
9881 (cris_regs_info): New function.
9882 (the_low_target): Adjust.
9883 (initialize_low_arch): New function.
9884 * linux-cris-low.c (tdesc_crisv32): Declare.
9885 (cris_arch_setup): New function.
9886 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9887 (cris_regs_info): New function.
9888 (the_low_target): Adjust.
9889 (initialize_low_arch): New function.
9890 * linux-m32r-low.c (tdesc_m32r): Declare.
9891 (m32r_arch_setup): New function.
9892 (m32r_usrregs_info, regs_info): New globals.
9893 (m32r_regs_info): Adjust.
9894 (initialize_low_arch): New function.
9895 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9896 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9897 (tic6x_usrregs_info): Forward declare.
9898 (tic6x_read_description): New function, based on ...
9899 (tic6x_arch_setup): ... this. Reimplement.
9900 (target_regsets): Rename to ...
9901 (tic6x_regsets): ... this, and make static.
9902 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9903 (tic6x_regs_info): New function.
9904 (the_low_target): Adjust.
9905 (initialize_low_arch): New function.
9906 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9907 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9908 (target_regsets): Rename to ...
9909 (xtensa_regsets): ... this, and make static.
9910 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9911 globals.
9912 (xtensa_arch_setup, xtensa_regs_info): New functions.
9913 (the_low_target): Adjust.
9914 (initialize_low_arch): New function.
9915 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9916 (nios2_arch_setup): Set the current process'es tdesc.
9917 (target_regsets): Rename to ...
9918 (nios2_regsets): ... this.
9919 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9920 (nios2_regs_info): New function.
9921 (the_low_target): Adjust.
9922 (initialize_low_arch): New function.
9923 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9924 (aarch64_arch_setup): Set the current process'es tdesc.
9925 (target_regsets): Rename to ...
9926 (aarch64_regsets): ... this.
9927 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9928 (aarch64_regs_info): New function.
9929 (the_low_target): Adjust.
9930 (initialize_low_arch): New function.
9931 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9932 globals.
9933 (target_regsets): Rename to ...
9934 (tile_regsets): ... this.
9935 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9936 (tile_regs_info): New function.
9937 (tile_arch_setup): Set the current process'es tdesc.
9938 (the_low_target): Adjust.
9939 (initialize_low_arch): New function.
9940 * spu-low.c (tdesc_spu): Declare.
9941 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9942 * win32-arm-low.c (tdesc_arm): Declare.
9943 (arm_arch_setup): New function.
9944 (the_low_target): Install arm_arch_setup instead of
9945 init_registers_arm.
9946 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9947 (init_windows_x86): Rename to ...
9948 (i386_arch_setup): ... this. Set `win32_tdesc'.
9949 (the_low_target): Adjust.
9950 * win32-low.c (win32_tdesc): New global.
9951 (child_add_thread): Don't create the thread cache here.
9952 (do_initial_child_stuff): Set the new process'es tdesc.
9953 * win32-low.h (struct target_desc): Forward declare.
9954 (win32_tdesc): Declare.
9955 * lynx-i386-low.c (tdesc_i386): Declare global.
9956 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9957 * lynx-low.c (lynx_tdesc): New global.
9958 (lynx_add_process): Set the new process'es tdesc.
9959 * lynx-low.h (struct target_desc): Forward declare.
9960 (lynx_tdesc): Declare global.
9961 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9962 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9963 * nto-low.c (nto_tdesc): New global.
9964 (do_attach): Set the new process'es tdesc.
9965 * nto-low.h (struct target_desc): Forward declare.
9966 (nto_tdesc): Declare.
9967 * nto-x86-low.c (tdesc_i386): Declare.
9968 (nto_x86_arch_setup): Set `nto_tdesc'.
9969
9970 2013-06-04 Gary Benson <gbenson@redhat.com>
9971
9972 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9973 to qSupported response when appropriate.
9974 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9975 with nonzero-length annex.
9976 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9977 arguments supplied in annex.
9978
9979 2013-05-31 Doug Evans <dje@google.com>
9980
9981 PR server/15594
9982 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9983 64 bits in 64-cross-32 environment.
9984
9985 2013-05-28 Pedro Alves <palves@redhat.com>
9986
9987 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9988 (aarch64-without-fpu.c): Delete rule.
9989 * configure.srv (aarch64*-*-linux*): Remove references to
9990 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9991 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9992 declaration.
9993
9994 2013-05-24 Pedro Alves <palves@redhat.com>
9995
9996 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9997 instead of strchr/decode_address. Error if the range isn't split
9998 with a ','. Don't assume there's be a ':' in the action.
9999
10000 2013-05-23 Yao Qi <yao@codesourcery.com>
10001 Pedro Alves <palves@redhat.com>
10002
10003 * linux-low.c (lwp_in_step_range): New function.
10004 (linux_wait_1): If the thread was range stepping and stopped
10005 outside the stepping range, report the stop to GDB. Otherwise,
10006 continue stepping. Add range stepping debug output.
10007 (linux_set_resume_request): Copy the step range from the resume
10008 request to the lwp.
10009 (linux_supports_range_stepping): New.
10010 (linux_target_ops) <supports_range_stepping>: Set to
10011 linux_supports_range_stepping.
10012 * linux-low.h (struct linux_target_ops)
10013 <supports_range_stepping>: New field.
10014 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10015 * linux-x86-low.c (x86_supports_range_stepping): New.
10016 (the_low_target) <supports_range_stepping>: Set to
10017 x86_supports_range_stepping.
10018 * server.c (handle_v_cont): Handle 'r' action.
10019 (handle_v_requests): Append ";r" if the target supports range
10020 stepping.
10021 * target.h (struct thread_resume) <step_range_start,
10022 step_range_end>: New fields.
10023 (struct target_ops) <supports_range_stepping>:
10024 New field.
10025 (target_supports_range_stepping): New macro.
10026
10027 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10028
10029 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10030 confusion in comment.
10031
10032 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10033
10034 * lynx-low.c (struct process_info_private): New type.
10035 (lynx_add_process): New function.
10036 (lynx_create_inferior, lynx_attach): Replace calls to
10037 add_process by calls to lynx_add_process.
10038 (lynx_resume): If PTID is null, then try using
10039 current_process()->private->last_wait_event_ptid.
10040 Add comments.
10041 (lynx_clear_inferiors): Delete. The contents of that function
10042 has been inlined in lynx_mourn;
10043 (lynx_wait_1): Save the ptid in the process's private data.
10044 (lynx_mourn): Free the process' private data. Replace call
10045 to lynx_clear_inferiors by call to clear_inferiors.
10046
10047 2013-05-17 Yao Qi <yao@codesourcery.com>
10048
10049 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10050 the right place.
10051
10052 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10053
10054 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10055 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10056 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10057 PT_TEXT_END_ADDR guards. Update comments.
10058 (linux_target_op) <read_offsets>: Conditionally define to
10059 linux_read_offsets if the target is UCLIBC and if it defines
10060 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10061
10062 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10063 Andrew Jenner <andrew@codesourcery.com>
10064
10065 * Makefile.in (SFILES): Add linux-nios2-low.c.
10066 (clean): Add action to delete nios2-linux.c.
10067 (nios2-linux.c): New rule.
10068 * configure.srv: Add nios2*-*-linux*.
10069 * linux-nios2-low.c: New.
10070
10071 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10072
10073 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10074
10075 2013-04-25 Hui Zhu <hui@codesourcery.com>
10076
10077 PR gdb/15186
10078 * ax.c (ax_printf): Add fflush.
10079
10080 2013-04-22 Tom Tromey <tromey@redhat.com>
10081
10082 * Makefile.in (SFILES): Add filestuff.c.
10083 (OBS): Add filestuff.o.
10084 (filestuff.o): New target.
10085 * config.in, configure: Rebuild.
10086 * configure.ac: Check for fdwalk, pipe2.
10087
10088 2013-04-17 Pedro Alves <palves@redhat.com>
10089
10090 * configure.ac (USE_THREAD_DB): Delete variable.
10091 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10092 Don't AC_SUBST USE_THREAD_DB.
10093 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10094 * config.in, configure: Regenerate.
10095
10096 2013-04-16 Pedro Alves <palves@redhat.com>
10097
10098 * linux-low.h (struct lwp_info) <thread_known>: Move under
10099 the USE_THREAD_DB #ifdef.
10100
10101 2013-04-16 Pedro Alves <palves@redhat.com>
10102
10103 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10104 (linux-low.o): Delete rule.
10105 * linux-low.h: Always include "gdb_thread_db.h" instead of
10106 conditionally including thread_db.h.
10107 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10108 HAVE_THREAD_DB_H.
10109
10110 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10111
10112 * Makefile.in (install-only): Fix make install regression.
10113
10114 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10115
10116 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10117 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10118 installation.
10119 * gdbserver.1: Remove.
10120
10121 2013-03-22 Pedro Alves <palves@redhat.com>
10122
10123 * linux-low.c (handle_extended_wait): Don't call
10124 linux_enable_event_reporting.
10125
10126 2013-03-15 Tony Theodore <tonyt@logyst.com>
10127
10128 PR build/9098:
10129 * Makefile.in (SHELL): Use @SHELL@.
10130
10131 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10132
10133 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10134 compiler warning.
10135
10136 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10137
10138 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10139 Remove extraneous NULL element.
10140
10141 2013-03-13 Yao Qi <yao@codesourcery.com>
10142
10143 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10144 'V' block in trace frame.
10145
10146 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10147
10148 * target.h (struct target_ops): Add btrace ops.
10149 (target_supports_btrace): New macro.
10150 (target_enable_btrace): New macro.
10151 (target_disable_btrace): New macro.
10152 (target_read_btrace): New macro.
10153 * gdbthread.h (struct thread_info): Add btrace field.
10154 * server.c: Include btrace-common.h.
10155 (handle_btrace_general_set): New function.
10156 (handle_btrace_enable): New function.
10157 (handle_btrace_disable): New function.
10158 (handle_general_set): Call handle_btrace_general_set.
10159 (handle_qxfer_btrace): New function.
10160 (struct qxfer qxfer_packets[]): Add btrace entry.
10161 * inferiors.c (remove_thread): Disable btrace.
10162 * linux-low: Include linux-btrace.h.
10163 (linux_low_enable_btrace): New function.
10164 (linux_low_read_btrace): New function.
10165 (linux_target_ops): Add btrace ops.
10166 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10167 Add srv_linux_btrace=yes.
10168 (x86_64-*-linux*): Add linux-btrace.o.
10169 Add srv_linux_btrace=yes.
10170 * configure.ac: Define HAVE_LINUX_BTRACE.
10171 * config.in: Regenerated.
10172 * configure: Regenerated.
10173
10174 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10175
10176 * server.c (handle_qxfer): Preserve error message if -3 is
10177 returned.
10178 (qxfer): Document the -3 return value.
10179
10180 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10181
10182 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10183 (linux_btrace_h): New variable.
10184 (linux-btrace.o): New rule.
10185
10186 2013-03-08 Stan Shebs <stan@codesourcery.com>
10187 Hafiz Abid Qadeer <abidh@codesourcery.com>
10188
10189 * tracepoint.c (trace_buffer_size): New global.
10190 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10191 (init_trace_buffer): Change to one-argument function. Allocate
10192 trace buffer memory.
10193 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10194 handle QTBuffer:size packet.
10195 (cmd_bigqtbuffer_size): New function.
10196 (initialize_tracepoint): Call init_trace_buffer with
10197 DEFAULT_TRACE_BUFFER_SIZE.
10198 * server.c (handle_query): Add QTBuffer:size in the
10199 supported packets.
10200
10201 2013-03-07 Yao Qi <yao@codesourcery.com>
10202
10203 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10204 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10205 of -1.
10206 (cmd_qtsp): Adjust condition. Do post increment.
10207 Set cur_action and cur_step_action back to 0.
10208
10209 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10210
10211 PR server/15236
10212 * linux-low.c (linux_write_memory): Return early success if LEN is
10213 zero.
10214
10215 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10216
10217 * configure.srv: Add x86_64-*-cygwin* as target.
10218
10219 2013-02-28 Tom Tromey <tromey@redhat.com>
10220
10221 * configure.ac: Invoke AC_SYS_LARGEFILE.
10222 * configure, config.in: Rebuild.
10223
10224 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10225
10226 * win32-low.c: Throughout, fix format strings and casts of
10227 printf-like functions to avoid type related warnings on all
10228 platforms.
10229 (get_child_debug_event): Print dwDebugEventCode as hex since
10230 that's how it's usually documented.
10231
10232 2013-02-28 Yao Qi <yao@codesourcery.com>
10233
10234 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10235 pulongest.
10236
10237 2013-02-27 Jiong Wang <jiwang@tilera.com>
10238
10239 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10240 (reg-tilegx32.c): New rule.
10241 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10242 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10243 different register info initializer according to elf class.
10244 (init_registers_tilgx32): New function. The tilegx32 register info
10245 initializer.
10246 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10247 (tile_store_gregset): Likewise.
10248
10249 2013-02-27 Yao Qi <yao@codesourcery.com>
10250
10251 * server.c (process_point_options): Print debug message when
10252 debug_threads is true.
10253
10254 2013-02-26 Yao Qi <yao@codesourcery.com>
10255
10256 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10257
10258 2013-02-19 Pedro Alves <palves@redhat.com>
10259 Kai Tietz <ktietz@redhat.com>
10260
10261 PR gdb/15161
10262
10263 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10264 instead of strtoul to extract address from packet.
10265 (process_serial_event) <'z'>: Likewise.
10266
10267 2013-02-18 Yao Qi <yao@codesourcery.com>
10268
10269 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10270
10271 2013-02-14 Pedro Alves <palves@redhat.com>
10272
10273 Plug memory leak.
10274
10275 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10276 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10277
10278 2013-02-14 Pedro Alves <palves@redhat.com>
10279
10280 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10281
10282 2013-02-14 Pedro Alves <palves@redhat.com>
10283
10284 * tracepoint.c (save_string): Delete.
10285 (add_tracepoint_action): Use savestring instead of save_string.
10286
10287 2013-02-12 Pedro Alves <palves@redhat.com>
10288
10289 * linux-xtensa-low.c: Ditto.
10290 * xtensa-xtregs.c: Ditto.
10291
10292 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10293
10294 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10295 thread_db.
10296
10297 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10298
10299 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10300 aarch64_num_wp_regs and aarch64_num_bp_regs to
10301 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10302
10303 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10304
10305 * linux-aarch64-low.c (ps_get_thread_area): Replace
10306 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10307
10308 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10309 Marcus Shawcroft <marcus.shawcroft@arm.com>
10310 Nigel Stephens <nigel.stephens@arm.com>
10311 Yufeng Zhang <yufeng.zhang@arm.com>
10312
10313 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10314 (aarch64.c, aarch64-without-fpu.c): New targets.
10315 * configure.srv (aarch64*-*-linux*): New.
10316 * linux-aarch64-low.c: New file.
10317
10318 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10319
10320 * linux-low.c (handle_extended_wait, linux_create_inferior)
10321 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10322 (dequeue_one_deferred_signal, linux_resume_one_thread)
10323 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10324 (linux_tracefork_grandchild, linux_test_for_tracefork)
10325 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10326 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10327 where the argument is 0.
10328
10329 2013-01-25 Yao Qi <yao@codesourcery.com>
10330
10331 * event-loop.c: Include "queue.h".
10332 (gdb_event_p): New typedef.
10333 (struct gdb_event) <next_event>: Remove.
10334 (event_queue): Change to QUEUE(gdb_event_p).
10335 (async_queue_event): Remove.
10336 (gdb_event_xfree): New.
10337 (initialize_event_loop): New.
10338 (process_event): Use API from QUEUE.
10339 (wait_for_event): Likewise.
10340 * server.c (main): Call initialize_event_loop.
10341 * server.h (initialize_event_loop): Declare.
10342
10343 2013-01-18 Yao Qi <yao@codesourcery.com>
10344
10345 * ax.h (struct eval_agent_expr_context): New.
10346 (gdb_eval_agent_expr): Update declaration.
10347 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10348 TFRAME. Add new argument CTX.
10349 * server.h (struct eval_agent_expr_context): Declare.
10350 (agent_mem_read, agent_tsv_read): Update declaration.
10351 (agent_mem_read_string): Likewise.
10352 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10353 (add_traceframe_block): Add new argument TPOINT.
10354 Increase TPOINT->traceframe_usage.
10355 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10356 eval_tracepoint_agent_expr.
10357 (condition_true_at_tracepoint): Likewise.
10358 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10359 (agent_mem_read_string, agent_tsv_read): Likewise.
10360
10361 2013-01-16 Yao Qi <yao@codesourcery.com>
10362
10363 * linux-low.c (linux_resume_one_lwp): Don't check
10364 'lwp->bp_reinsert != 0'.
10365
10366 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10367 Pedro Alves <palves@redhat.com>
10368
10369 * lynx-low.c (ptrace_request_to_str): Define a temporary
10370 macro and use it to simplify this function's implementation.
10371
10372 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10373
10374 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10375 sets errno.
10376
10377 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10378
10379 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10380
10381 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10382
10383 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10384
10385 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10386
10387 * lynx-low.c (lynx_resume): Use the resume_info parameter
10388 to determine the ptid for the lynx_ptrace call, unless
10389 it is equal to minus_one_ptid, in which case we use the
10390 ptid of the current_inferior.
10391 (lynx_wait_1): After having received a thread create/exit
10392 event, resume the inferior's execution using the signaling
10393 thread's ptid, rather than the old ptid.
10394
10395 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10396
10397 * lynx-low.c (lynx_resume): Delete variable ret.
10398
10399 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10400
10401 * gdbreplay.c (gdbreplay_version): Update copyright year.
10402 * server.c (gdbserver_version): Likewise.
10403
10404 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10405
10406 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10407 new thread.
10408
10409 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10410
10411 * lynx-low.c (ptrace_request_to_str): Add handling for
10412 PTRACE_GETTRACESIG.
10413
10414 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10415
10416 * lynx-low.c (lynx_attach): Delete variable new_process.
10417
10418 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10419
10420 * lynx-low.c (lynx_create_inferior): Delete variable
10421 new_process.
10422
10423 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10424
10425 * lynx-low.c (ptrace_request_to_str): Do not handle
10426 PTRACE_GETTHREADLIST if this macro does not exist.
10427
10428 2012-12-15 Yao Qi <yao@codesourcery.com>
10429
10430 * Makefile.in (OBS): Add notif.o.
10431 * notif.c, notif.h: New.
10432 * server.c: Include "notif.h".
10433 (struct vstop_notif) <next>: Remove.
10434 <base>: New field.
10435 (queue_stop_reply): Update.
10436 (push_event, send_next_stop_reply): Remove.
10437 (discard_queued_stop_replies): Update.
10438 (notif_stop): New variable.
10439 (handle_v_stopped): Remove.
10440 (handle_v_requests): Don't call handle_v_stopped. Call
10441 handle_ack_notif instead.
10442 (queue_stop_reply_callback): Call notif_event_enque instead
10443 of queue_stop_reply.
10444 (handle_status): Don't call send_next_stop_reply, call
10445 notif_write_event instead.
10446 (kill_inferior_callback): Likewise.
10447 (detach_or_kill_inferior_callback): Likewise.
10448 (main): Call initialize_notif.
10449 (process_serial_event): Call QUEUE_is_empty.
10450 (handle_target_event): Call notif_push instead of push event.
10451 * server.h (push_event): Remove declaration.
10452
10453 2012-12-10 Tom Tromey <tromey@redhat.com>
10454
10455 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10456 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10457 macros.
10458 (.c.o): Rewrite.
10459 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10460 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10461 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10462 (amd64-linux-ipa.o, ax.o): Rewrite.
10463 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10464 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10465 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10466 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10467 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10468 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10469 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10470 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10471 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10472 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10473 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10474 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10475 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10476 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10477 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10478 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10479 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10480 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10481 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10482 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10483 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10484 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10485 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10486 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10487 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10488 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10489 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10490 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10491 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10492 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10493 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10494 (reg-tilegx.o): Remove.
10495 (all_object_files): New macro.
10496 Include .deps files.
10497 * aclocal.m4, configure: Rebuild.
10498 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10499 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10500 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10501
10502 2012-12-05 Tom Tromey <tromey@redhat.com>
10503
10504 PR gdb/14917:
10505 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10506
10507 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10508
10509 * configure.ac: Check for linux/perf_event.h.
10510 * config.in: Regenerated.
10511 * configure: Regenerated.
10512
10513 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10514
10515 * hostio.c (handle_readlink): Decrease buffer size
10516 parameter passed to readlink by one byte.
10517
10518 2012-11-26 Yao Qi <yao@codesourcery.com>
10519
10520 * configure.ac (build_warnings): Append '-Wempty-body'.
10521 * configure: Regenerated.
10522 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10523 body.
10524
10525 2012-11-15 Pierre Muller <muller@sourceware.org>
10526
10527 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10528 * config.in: Regenerate.
10529 * configure: Regenerate.
10530 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10531 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10532 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10533 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10534 header.
10535 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10536 instead of <sys/wait.h> header.
10537 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10538
10539 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10540
10541 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10542 (various make rules): Remove -DGDBSERVER
10543
10544 2012-11-09 Yao Qi <yao@codesourcery.com>
10545
10546 * spu-low.c (current_ptid): Move it to ..
10547 * gdbthread.h: ... here. New.
10548 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10549 * server.c (myresume, process_serial_event): Likewise.
10550 * thread-db.c (thread_db_find_new_threads): Likewise.
10551 * tracepoint.c (run_inferior_command): Likewise.
10552
10553 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10554
10555 * server.c (handle_search_memory_1): Include access length in
10556 warning message.
10557
10558 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10559
10560 * linux-crisv32-low.c: Fix compile errors.
10561
10562 2012-09-04 Yao Qi <yao@codesourcery.com>
10563
10564 * tracepoint.c (cmd_qtsv): Adjust debug message.
10565 Don't check CUR_TPOINT.
10566
10567 2012-08-28 Yao Qi <yao@codesourcery.com>
10568
10569 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10570 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10571 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10572 Remove declarations of xmalloc, xreallloc, xstrdup and
10573 freeargv.
10574 * Makefile.in (libiberty_h): New.
10575 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10576 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10577
10578 2012-08-23 Yao Qi <yao@codesourcery.com>
10579
10580 * server.h: Remove declaration of 'xsnprintf'.
10581
10582 2012-08-22 Keith Seitz <keiths@redhat.com>
10583
10584 * server.h: Include build-gnulib-gbserver/config.h.
10585 * gdbreplay.c: Likewise.
10586
10587 2012-08-08 Doug Evans <dje@google.com>
10588
10589 * Makefile.in (SFILES): Add gdb_vecs.c.
10590 (OBS): Add gdb_vecs.o.
10591 (gdb_vecs_h, host_defs_h): New variables.
10592 (thread-db.o): Add $(gdb_vecs_h) dependency.
10593 (gdb_vecs.o): New rule.
10594 * thread-db.c: #include "gdb_vecs.h".
10595 (thread_db_load_search): Use a vector to iterate over path elements.
10596 Handle text appearing after "$pdir".
10597
10598 * configure.ac: Add check for strstr.
10599 * config.in: Regenerate.
10600 * configure: Regenerate.
10601
10602 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10603
10604 * hostio.c (handle_pread): If pread fails, fall back to attempting
10605 lseek/read.
10606 (handle_pwrite): Likewise for pwrite.
10607
10608 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10609
10610 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10611 between unsupported TYPE and unimplementable ADDR/LEN combination.
10612 (arm_insert_point): Act on new return value.
10613
10614 2012-07-31 Pedro Alves <palves@redhat.com>
10615
10616 * server.c (process_point_options): Only skip tokens if we find
10617 one that is unrecognized. Don't treat 'X' specially while
10618 skipping unrecognized tokens.
10619
10620 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10621
10622 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10623 to 4-byte-align HW breakpoint addresses for Thumb.
10624
10625 2012-07-27 Yao Qi <yao@codesourcery.com>
10626
10627 PR remote/14161.
10628
10629 * server.h: Declare gdb_agent_about_to_close.
10630 * target.c (kill_inferior): Include "agent.h".
10631 New. Send command 'kill'.
10632 * target.h (kill_inferior): Removed macro.
10633 * tracepoint.c (gdb_agent_about_to_close): New.
10634 (gdb_agent_helper_thread): Handle command 'close'.
10635 Wait endlessly until the inferior stops.
10636 Install gdb_agent_remove_socket to atexit hook.
10637 (agent_socket_name): New static variable.
10638 (gdb_agent_socket_init): Replace local variable 'name' with
10639 'agent_socket_name'.
10640 (gdb_agent_remove_socket): New.
10641
10642 2012-07-27 Yao Qi <yao@codesourcery.com>
10643
10644 * server.c (process_point_options): Stop at 'X' when parsing.
10645
10646 2012-07-19 Michael Eager <eager@eagercon.com>
10647
10648 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10649 to hw_execute.
10650 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10651 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10652 hardware breakpoint.
10653
10654 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10655
10656 * gdbserver/linux-low.c (initialize_low): Call
10657 linux_ptrace_init_warnings.
10658
10659 2012-07-02 Doug Evans <dje@google.com>
10660
10661 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10662 pointer to int.
10663
10664 2012-07-02 Stan Shebs <stan@codesourcery.com>
10665
10666 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10667 (ax.o): Add it to build rule.
10668 (ax-ipa.o): Ditto.
10669 (OBS): Add format.o.
10670 (IPA_OBS): Add format.o.
10671 * server.c (handle_query): Claim support for breakpoint commands.
10672 (process_point_options): Add command case.
10673 (process_serial_event): Leave running if there are printfs in
10674 effect.
10675 * mem-break.h (any_persistent_commands): Declare.
10676 (add_breakpoint_commands): Declare.
10677 (gdb_no_commands_at_breakpoint): Declare.
10678 (run_breakpoint_commands): Declare.
10679 * mem-break.c (struct point_command_list): New struct.
10680 (struct breakpoint): New field command_list.
10681 (any_persistent_commands): New function.
10682 (add_commands_to_breakpoint): New function.
10683 (add_breakpoint_commands): New function.
10684 (gdb_no_commands_at_breakpoint): New function.
10685 (run_breakpoint_commands): New function.
10686 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10687 locally.
10688 * ax.c: Include format.h.
10689 (ax_printf): New function.
10690 (gdb_eval_agent_expr): Add printf opcode.
10691
10692 2012-06-13 Yao Qi <yao@codesourcery.com>
10693
10694 * server.c (start_inferior): Remove duplicated writes to fields
10695 'last_resume_kind' and 'last_status' of 'current_inferior'.
10696
10697 2012-06-12 Yao Qi <yao@codesourcery.com>
10698 Pedro Alves <palves@redhat.com>
10699
10700 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10701 comment.
10702 * server.c (handle_v_cont): Extend comment.
10703
10704 2012-06-11 Yao Qi <yao@codesourcery.com>
10705
10706 * linux-low.c (linux_attach): Add 'static'.
10707
10708 2012-06-06 Yao Qi <yao@codesourcery.com>
10709
10710 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10711
10712 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10713
10714 Fix gcc -flto compilation warning.
10715 * server.c (main): Make variable multi_mode and attach volatile.
10716
10717 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10718
10719 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10720 if the platform doesn't know about it.
10721
10722 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10723
10724 * Makefile.in (SFILES): Add linux-tile-low.c.
10725 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10726 * configure.srv: Handle tilegx-*-linux*.
10727 * linux-tile-low.c: New file.
10728
10729 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10730
10731 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10732
10733 2012-05-24 Pedro Alves <palves@redhat.com>
10734
10735 PR gdb/7205
10736
10737 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10738
10739 2012-05-24 Pedro Alves <palves@redhat.com>
10740
10741 PR gdb/7205
10742
10743 Replace target_signal with gdb_signal throughout.
10744
10745 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10746
10747 * linux-low.c (linux_store_registers): Avoid the copying sequence
10748 when no data has been retrieved by ptrace.
10749
10750 2012-05-22 Will Deacon <will.deacon@arm.com>
10751
10752 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10753 Include asm/ptrace.h.
10754 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10755 already defined.
10756
10757 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10758
10759 * linux-low.c (linux_store_registers): Don't re-retrieve data
10760 with ptrace that has already been obtained from /proc. Always
10761 copy any data retrieved with ptrace to the buffer supplied.
10762
10763 2012-05-11 Yao Qi <yao@codesourcery.com>
10764 Pedro Alves <palves@redhat.com>
10765
10766 * linux-low.c (enum stopping_threads_kind): New.
10767 (stopping_threads): Change type to `enum stopping_threads_kind'.
10768 (handle_extended_wait): If stopping and suspending threads, leave
10769 the new_lwp suspended too.
10770 (linux_wait_for_event): Adjust.
10771 (stop_all_lwps): Set `stopping_threads' to
10772 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10773 whether we're suspending threads or just stopping them. Assert no
10774 recursion happens.
10775
10776 2012-04-29 Yao Qi <yao@codesourcery.com>
10777
10778 * server.h: Move some code to ...
10779 * gdbthread.h: ... here. New.
10780 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10781 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10782 (nto-low.o, win32-low.o): Likewise.
10783 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10784 * regcache.c, remote-utils.c, server.c: Likewise.
10785 * target.c, tracepoint.c, win32-low.c: Likewise.
10786
10787 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10788
10789 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10790 (PTRACE_ARG4_TYPE): Likewise.
10791 (PTRACE_XFER_TYPE): Likewise.
10792 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10793 ptrace to PTRACE_ARG3_TYPE.
10794 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10795 (PTRACE_ARG4_TYPE): Likewise.
10796 (PTRACE_XFER_TYPE): Likewise.
10797 (linux_detach_one_lwp): Cast fourth argument of
10798 ptrace to long then PTRACE_ARG4_TYPE.
10799 (regsets_fetch_inferior_registers): Cast third argument of
10800 ptrace to long then PTRACE_ARG3_TYPE.
10801 (regsets_store_inferior_registers): Likewise.
10802
10803 2012-04-20 Pedro Alves <palves@redhat.com>
10804
10805 * configure: Regenerate.
10806
10807 2012-04-19 Pedro Alves <palves@redhat.com>
10808
10809 * Makefile.in (GNULIB_BUILDDIR): New.
10810 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10811 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10812 (all, install-only, uninstall, clean-info, all-lib, clean): No
10813 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10814 (maintainer-clean realclean distclean): Use subdir_do.
10815 (subdir_do): New.
10816 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10817 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10818 * acinclude.m4: Include acx_configure_dir.m4.
10819 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10820 calls. Call AC_PROG_RANLIB. Configure gnulib using
10821 ACX_CONFIGURE_DIR.
10822 (GNULIB): New.
10823 (GNULIB_STDINT_H): Adjust.
10824 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10825 * gdbreplay.c: Include build-gnulib/config.h.
10826 * server.h: Likewise.
10827 * aclocal.m4: Regenerate.
10828 * config.in: Regenerate.
10829 * configure: Regenerate.
10830
10831 2012-04-19 Pedro Alves <palves@redhat.com>
10832
10833 * Makefile.in (LIBGNU, INCGNU): Adjust.
10834 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10835 (all, install-only, uninstall, clean-info, all-lib, clean)
10836 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10837 * configure.ac: Adjust AC_OUTPUT output.
10838 * aclocal.m4: Regenerate.
10839 * configure: Regenerate.
10840
10841 2012-04-19 Pedro Alves <palves@redhat.com>
10842
10843 * Makefile.in (generated_files): New.
10844 (server_h): Remove the explicit dependency on config.h, and depend
10845 on $generated_files.
10846
10847 2012-04-19 Pedro Alves <palves@redhat.com>
10848
10849 * Makefile.in (INCGNU): Add -Ignulib.
10850
10851 2012-04-19 Pedro Alves <palves@redhat.com>
10852
10853 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10854 (INCGNU): ... this, and spell out -I here.
10855 (GNULIB_LIB): Rename to ...
10856 (LIBGNU): ... this.
10857 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10858
10859 2012-04-19 Pedro Alves <palves@redhat.com>
10860
10861 * config.in: Regenerate.
10862
10863 2012-04-19 Pedro Alves <palves@redhat.com>
10864
10865 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10866 * server.h (memmem): Remove declaration.
10867 * config.in: Regenerate.
10868 * configure: Regenerate.
10869
10870 2012-04-19 Yao Qi <yao@codesourcery.com>
10871
10872 * Makefile.in (SFILES): Add common/vec.c.
10873 (OBS): Add vec.o.
10874 (vec.o): New rule.
10875
10876 2012-04-19 Yao Qi <yao@codesourcery.com>
10877
10878 * remote-utils.c (prepare_resume_reply): Replace with macro
10879 target_core_of_thread.
10880 * server.c (handle_qxfer_threads_proper): Likewise.
10881 * target.h (traget_core_of_thread): New macro.
10882
10883 2012-04-18 Pedro Alves <palves@redhat.com>
10884
10885 * aclocal.m4: Regenerate.
10886 * configure: Regenerate.
10887
10888 2012-04-16 Yao Qi <yao@codesourcery.com>
10889
10890 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10891 duplicated on address.
10892
10893 2012-04-16 Yao Qi <yao@codesourcery.com>
10894
10895 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10896 (struct tracepoint_action_ops) <send>: New field.
10897 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10898 (agent_expr_send, x_tracepoint_action_send): New.
10899 (l_tracepoint_action_send): New.
10900 (cmd_qtdp): Download and install tracepoint
10901 according to `use_agent'.
10902 (run_inferior_command): Add one more parameter `len'.
10903 Update callers.
10904 (tracepoint_send_agent): New.
10905 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10906
10907 2012-04-16 Yao Qi <yao@codesourcery.com>
10908
10909 * tracepoint.c (download_tracepoints): Moved to ...
10910 (cmd_qtstart): ... here.
10911
10912 2012-04-14 Yao Qi <yao@codesourcery.com>
10913
10914 * tracepoint.c: Include inttypes.h.
10915 (struct collect_memory_action): Use sized types.
10916 (struct tracepoint): Likewise.
10917 (cmd_qtdp, stop_tracing): Update print specifiers.
10918 (cmd_qtp, response_tracepoint): Likewise.
10919 (collect_data_at_tracepoint): Likewise.
10920 (collect_data_at_step): Likewise.
10921
10922 2012-04-14 Yao Qi <yao@codesourcery.com>
10923
10924 Import gnulib module inttypes.
10925 * aclocal.m4, config.in, configure: Regenerated.
10926
10927 2012-04-14 Yao Qi <yao@codesourcery.com>
10928
10929 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10930 Makefile and config.status at last.
10931
10932 2012-04-13 Yao Qi <yao@codesourcery.com>
10933
10934 * tracepoint.c: Include stdint.h unconditionally.
10935
10936 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10937
10938 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10939 on BFD_HAVE_SYS_PROCFS_TYPE.
10940 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10941 * configure: Regenerate.
10942 * config.in: Likewise.
10943
10944 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10945
10946 * Makefile.in (clean): Also remove x32.c x32-linux.c
10947 x32-avx.c x32-avx-linux.c.
10948 (x32.o): New target.
10949 (x32.c): Likewise.
10950 (x32-linux.o): Likewise.
10951 (x32-linux.c): Likewise.
10952 (x32-avx.o): Likewise.
10953 (x32-avx.c): Likewise.
10954 (x32-avx-linux.o): Likewise.
10955 (x32-avx-linux.c): Likewise.
10956
10957 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10958 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10959 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10960 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10961 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10962 i386/x32-avx-linux.xml.
10963
10964 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10965 (init_registers_x32_avx_linux): Likwise.
10966 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10967 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10968
10969 2012-04-13 Pedro Alves <palves@redhat.com>
10970
10971 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10972 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10973 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10974 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10975 the sub-make.
10976
10977 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10978
10979 * linux-x86-low.c (compat_x32_clock_t): New.
10980 (compat_x32_siginfo_t): Likewise.
10981 (compat_x32_siginfo_from_siginfo): Likewise.
10982 (siginfo_from_compat_x32_siginfo): Likewise.
10983 (linux_is_elf64): Likewise.
10984 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10985 and siginfo_from_compat_x32_siginfo for x32.
10986 (x86_arch_setup): Set linux_is_elf64.
10987
10988 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10989
10990 PR gdb/13969
10991 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10992 e_machine field.
10993 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10994 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10995 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10996 compatible with process.
10997
10998 2012-04-12 Yao Qi <yao@codesourcery.com>
10999
11000 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11001 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11002 (install-only, install-info, clean): Handle sub dir gnulib.
11003 (all-lib, am--refresh): New targets.
11004 (memmem.o): Remove target.
11005 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11006 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11007 (AC_REPLACE_FUNCS): Remove memmem.
11008 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11009 (AC_OUTPUT): Generate Makefile in gnulib/.
11010 * aclocal.m4, config.in, configure: Regenerated.
11011
11012 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11013
11014 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11015
11016 2012-04-05 Pedro Alves <palves@redhat.com>
11017
11018 -Werror=strict-aliasing
11019
11020 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11021 pointer.
11022
11023 2012-04-04 Pedro Alves <palves@redhat.com>
11024
11025 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11026 (sparc_store_gregset_from_stack, sparc_store_gregset)
11027 (sparc_breakpoint_at): Fix formatting.
11028
11029 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11030
11031 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11032 are available.
11033 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11034 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11035 * config.in: Regenerate.
11036 * configure: Likewise.
11037
11038 2012-03-29 Pedro Alves <palves@redhat.com>
11039
11040 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11041 Correct ptrace arguments.
11042
11043 2012-03-28 Pedro Alves <palves@redhat.com>
11044
11045 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11046 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11047 (IA64_FR1_REGNUM): New defines.
11048 (ia64_fetch_register): New.
11049 (the_low_target): Install it.
11050 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11051 field.
11052 * linux-low.c (linux_fetch_registers): Try the
11053 the_low_target.fetch_register hook first.
11054
11055 * linux-arm-low.c (the_low_target): Adjust.
11056 * linux-bfin-low.c (the_low_target): Adjust.
11057 * linux-cris-low.c (the_low_target): Adjust.
11058 * linux-crisv32-low.c (the_low_target): Adjust.
11059 * linux-m32r-low.c (the_low_target): Adjust.
11060 * linux-m68k-low.c (the_low_target): Adjust.
11061 * linux-mips-low.c (the_low_target): Adjust.
11062 * linux-ppc-low.c (the_low_target): Adjust.
11063 * linux-s390-low.c (the_low_target): Adjust.
11064 * linux-sh-low.c (the_low_target): Adjust.
11065 * linux-sparc-low.c (the_low_target): Adjust.
11066 * linux-tic6x-low.c (the_low_target): Adjust.
11067 * linux-x86-low.c (the_low_target): Adjust.
11068 * linux-xtensa-low.c (the_low_target): Adjust.
11069
11070 2012-03-26 Pedro Alves <palves@redhat.com>
11071
11072 * server.c (handle_qxfer_libraries): Don't bail early if
11073 the_target->qxfer_libraries_svr4 is not NULL.
11074
11075 2012-03-26 Pedro Alves <palves@redhat.com>
11076
11077 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11078
11079 2012-03-23 Pedro Alves <palves@redhat.com>
11080
11081 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11082 "library-list-svr4" element's start tag when the the DSO list is
11083 empty.
11084
11085 2012-03-23 Pedro Alves <palves@redhat.com>
11086
11087 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11088 a variable whose type size is the same as the inferior's pointer
11089 size.
11090
11091 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11092
11093 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11094 struct siginfo.
11095 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11096 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11097 * linux-low.h: Include <signal.h>.
11098 (struct siginfo): Remove forward declaration.
11099 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11100 struct siginfo.
11101
11102 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11103
11104 * .gitignore: Ignore more files.
11105
11106 2012-03-19 Pedro Alves <palves@redhat.com>
11107 Jan Kratochvil <jan.kratochvil@redhat.com>
11108
11109 * server.c (cont_thread, general_thread): Add describing comments.
11110 (start_inferior): Clear `cont_thread'.
11111 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11112 of a process.
11113
11114 2012-03-15 Yao Qi <yao@codesourcery.com>
11115
11116 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11117 handling to ...
11118 (cmd_qtdp): ... here.
11119
11120 2012-03-15 Yao Qi <yao@codesourcery.com>
11121
11122 * tracepoint.c (struct tracepoint_action_ops): New.
11123 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11124 (m_tracepoint_action_download): New.
11125 (r_tracepoint_action_download): New.
11126 (x_tracepoint_action_download): New.
11127 (l_tracepoint_action_download): New.
11128 (add_tracepoint_action): Install `action->ops' according type.
11129 (download_tracepoint_1): Move code `download' function pointer
11130 of various tracepoint_action_ops.
11131
11132 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11133
11134 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11135 linux_ptrace_attach_warnings.
11136
11137 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11138
11139 * Makefile.in (linux-ptrace.o): New.
11140 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11141 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11142 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11143 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11144 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11145 of these targets.
11146 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11147
11148 2012-03-08 Yao Qi <yao@codesourcery.com>
11149 Pedro Alves <palves@redhat.com>
11150
11151 Fix PR server/13392.
11152 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11153 offset of JMP insn.
11154 * tracepoint.c (remove_tracepoint): New.
11155 (cmd_qtdp): Call remove_tracepoint when failed to install.
11156
11157 2012-03-07 Pedro Alves <palves@redhat.com>
11158
11159 * linux-low.c (get_detach_signal): New.
11160 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11161 Pass on pending signals to PTRACE_DETACH. Check the result of the
11162 ptrace call.
11163 * server.c (program_signals, program_signals_p): New.
11164 (handle_general_set): Handle QProgramSignals.
11165 * server.h (program_signals, program_signals_p): Declare.
11166
11167 2012-03-05 Pedro Alves <palves@redhat.com>
11168 Jan Kratochvil <jan.kratochvil@redhat.com>
11169
11170 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11171 New comment why.
11172
11173 2012-03-03 Yao Qi <yao@codesourcery.com>
11174
11175 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11176 agent_look_up_symbols.
11177
11178 2012-03-03 Yao Qi <yao@codesourcery.com>
11179
11180 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11181 (linux-x86-low.o): Likewise.
11182 * server.h: Remove in_process_agent_loaded.
11183 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11184 common/agent.c.
11185 Update callers.
11186
11187 2012-03-03 Yao Qi <yao@codesourcery.com>
11188
11189 * tracepoint.c (gdb_agent_capability): New global.
11190 (in_process_agent_loaded_ust): Renamed to
11191 `in_process_agent_supports_ust'.
11192 Update callers.
11193 (in_process_agent_supports_ust): Call agent_capability_check.
11194 (clear_installed_tracepoints): Assert that agent supports
11195 agent.
11196
11197 2012-03-03 Yao Qi <yao@codesourcery.com>
11198
11199 * linux-low.c (linux_supports_agent): New.
11200 (linux_target_ops): Initialize field `supports_agent' with
11201 linux_supports_agent.
11202 * target.h (struct target_ops) <supports_agent>: New.
11203 (target_supports_agent): New macro.
11204 * server.c (handle_general_set): Handle packet 'QAgent'.
11205 (handle_query): Send `QAgent+'.
11206 * Makefile.in (server.o): Depends on agent.h.
11207
11208 2012-03-03 Yao Qi <yao@codesourcery.com>
11209
11210 * Makefile.in (OBS): Add agent.o.
11211 Add new rule for agent.o.
11212 Track dependence of tracepoint.c on agent.h.
11213 * tracepoint.c (run_inferior_command_1):
11214 (run_inferior_command): Call agent_run_command.
11215 (gdb_ust_connect_sync_socket): Deleted. Move it to
11216 common/agent.c.
11217 (resume_thread, stop_thread): Likewise.
11218 (gdb_ust_socket_init): Renamed to ...
11219 (gdb_agent_socket_init): ... New.
11220 (gdb_ust_thread): Renamed to ...
11221 (gdb_agent_helper_thread): ... New.
11222 (gdb_ust_init): Move some code to ...
11223 (gdb_agent_init): ... here. New.
11224 [HAVE_UST]: Call gdb_ust_init.
11225 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11226 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11227 * config.in, configure: Regenerated.
11228
11229 2012-03-02 Pedro Alves <palves@redhat.com>
11230
11231 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11232 * linux-low.c (struct simple_pid_list): New.
11233 (stopped_pids): New a struct simple_pid_list pointer.
11234 (add_to_pid_list, pull_pid_from_list): New.
11235 (handle_extended_wait): Don't assume the first signal new children
11236 report is SIGSTOP. Adjust call to pull_pid_from_list.
11237 (linux_wait_for_lwp): Adjust.
11238
11239 2012-03-02 Yao Qi <yao@codesourcery.com>
11240
11241 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11242 debug log.
11243
11244 2012-03-02 Yao Qi <yao@codesourcery.com>
11245
11246 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11247 `stop_pc' and `tpoint'. Update caller.
11248
11249 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11250
11251 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11252 * linux-low.c (use_linux_regsets): New macro.
11253 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11254 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11255 (linux_register_in_regsets): New function.
11256 (usr_fetch_inferior_registers): Skip registers covered by
11257 regsets.
11258 (usr_store_inferior_registers): Likewise.
11259 (usr_fetch_inferior_registers): New macro.
11260 (usr_store_inferior_registers): Likewise.
11261 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11262 (linux_store_registers): Likewise.
11263 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11264 prototype.
11265 (init_registers_mips64_dsp_linux): Likewise.
11266 (init_registers_mips_linux): New macro.
11267 (init_registers_mips_dsp_linux): Likewise.
11268 (mips_dsp_num_regs): Likewise.
11269 (DSP_BASE, DSP_CONTROL): New fallback macros.
11270 (mips_base_regs): New macro.
11271 (mips_regmap): Use it. Fix the size.
11272 (mips_dsp_regmap): New variable.
11273 (mips_dsp_regset_bitmap): Likewise.
11274 (mips_arch_setup): New function.
11275 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11276 than mips_regmap.
11277 (mips_cannot_store_register): Likewise.
11278 (the_low_target): Update .arch_setup, .num_regs and .regmap
11279 initializers. Add .regset_bitmap initializer.
11280 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11281 initializer.
11282 * linux-bfin-low.c (the_low_target): Likewise.
11283 * linux-cris-low.c (the_low_target): Likewise.
11284 * linux-crisv32-low.c (the_low_target): Likewise.
11285 * linux-ia64-low.c (the_low_target): Likewise.
11286 * linux-m32r-low.c (the_low_target): Likewise.
11287 * linux-m68k-low.c (the_low_target): Likewise.
11288 * linux-ppc-low.c (the_low_target): Likewise.
11289 * linux-s390-low.c (the_low_target): Likewise.
11290 * linux-sh-low.c (the_low_target): Likewise.
11291 * linux-sparc-low.c (the_low_target): Likewise.
11292 * linux-tic6x-low.c (the_low_target): Likewise.
11293 * linux-x86-low.c (the_low_target): Likewise.
11294 * linux-xtensa-low.c (the_low_target): Likewise.
11295 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11296 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11297 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11298 srv_xmlfiles.
11299 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11300 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11301
11302 2012-02-29 Yao Qi <yao@codesourcery.com>
11303 Pedro Alves <palves@redhat.com>
11304
11305 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11306 `step_over_finished' is true.
11307
11308 2012-02-27 Pedro Alves <palves@redhat.com>
11309
11310 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11311 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11312
11313 2012-02-27 Pedro Alves <palves@redhat.com>
11314
11315 PR server/9684
11316 * linux-low.c (pid_is_stopped): New.
11317 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11318
11319 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11320
11321 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11322 of conditions.
11323
11324 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11325
11326 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11327
11328 2012-02-24 Luis Machado <lgustavo@codesourcery>
11329
11330 * server.c (handle_query): Advertise support for target-side
11331 breakpoint condition evaluation.
11332 (process_point_options): New function.
11333 (process_serial_event): When inserting a breakpoint, check for
11334 a target-side condition that should be evaluated.
11335
11336 * mem-break.c: Include regcache.h and ax.h.
11337 (point_cond_list_t): New data structure.
11338 (breakpoint) <cond_list>: New field.
11339 (find_gdb_breakpoint_at): Make non-static.
11340 (delete_gdb_breakpoint_at): Clear any target-side
11341 conditions.
11342 (clear_gdb_breakpoint_conditions): New function.
11343 (add_condition_to_breakpoint): Likewise.
11344 (add_breakpoint_condition): Likewise.
11345 (gdb_condition_true_at_breakpoint): Likewise.
11346 (gdb_breakpoint_here): Return result directly instead
11347 of going through a local variable.
11348
11349 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11350 (clear_gdb_breakpoint_conditions): Likewise.
11351 (add_breakpoint_condition): Likewise.
11352 (gdb_condition_true_at_breakpoint): Likewise.
11353
11354 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11355 (need_step_over_p): Take target-side breakpoint condition into
11356 consideration.
11357
11358 2012-02-24 Luis Machado <lgustavo@codesourcery>
11359
11360 * server.h: Include tracepoint.h.
11361 (agent_mem_read, agent_get_trace_state_variable_value,
11362 agent_set_trace_state_variable_value,
11363 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11364 get_set_tsv_func_addr): New prototypes.
11365
11366 * ax.h: New include file.
11367 * ax.c: New source file.
11368
11369 * tracepoint.c: Include ax.h.
11370 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11371 agent_expr, eval_result_type): Move to ax.h.
11372 (parse_agent_expr): Rename to ...
11373 (gdb_parse_agent_expr): ... this, make it non-static and move
11374 to ax.h.
11375 (unparse_agent_expr) Rename to ...
11376 (gdb_unparse_agent_expr): ... this, make it non-static and move
11377 to ax.h.
11378 (eval_agent_expr): Rename to ...
11379 (eval_tracepoint_agent_expr): ... this.
11380 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11381 forward declarations.
11382 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11383 (agent_get_trace_state_variable_value): New function.
11384 (agent_set_trace_state_variable_value): New function.
11385 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11386 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11387 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11388 (condition_true_at_tracepoint): Likewise.
11389 (parse_agent_expr): Rename to ...
11390 (gdb_parse_agent_expr): ... this and move to ax.c.
11391 (unparse_agent_expr): Rename to ...
11392 (gdb_unparse_agent_expr): ... this and move to ax.c.
11393 (gdb_agent_op_name): Move to ax.c.
11394 (eval_agent_expr): Rename to ...
11395 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11396 and move to ax.c.
11397 (eval_tracepoint_agent_expr): New function.
11398 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11399 non-static.
11400 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11401 ax.c.
11402 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11403 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11404 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11405 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11406 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11407 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11408 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11409 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11410 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11411 (compile_bytecodes): Remove forward declaration.
11412 (is_goto_target): Move to ax.c.
11413 (compile_bytecodes): Move to ax.c and call
11414 agent_get_trace_state_variable_value (...) and
11415 agent_set_trace_state_variable_value (...).
11416
11417 * Makefile.in: Update ax.c and IPA dependencies.
11418
11419 2012-02-24 Pedro Alves <palves@redhat.com>
11420
11421 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11422 (cmd_bigqtbuffer_circular): ... this. Only handle
11423 'QTBuffer:circular:'.
11424 (handle_tracepoint_general_set): Adjust.
11425
11426 2012-02-16 Yao Qi <yao@codesourcery.com>
11427
11428 * inferiors.c: Move code to ...
11429 * dll.c: .... here. New.
11430 * server.h: Declare clear_dlls.
11431 * Makefile.in (SFILES): Add dll.c.
11432 (OBS): Add dll.o
11433 (dll.o): New rule.
11434
11435 2012-02-11 Yao Qi <yao@codesourcery.com>
11436
11437 * server.c: (handle_monitor_command): Add a new parameter
11438 `own_buf'.
11439 (handle_query): Update caller.
11440
11441 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11442
11443 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11444 * configure, config.in: Regenerate.
11445 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11446 is not defined.
11447
11448 2012-02-02 Pedro Alves <palves@redhat.com>
11449
11450 Try SIGKILL first, then PTRACE_KILL.
11451 * linux-low.c (linux_kill_one_lwp): New.
11452 (linux_kill_one_lwp): Rename to ...
11453 (kill_one_lwp_callback): ... this. Use the new
11454 linux_kill_one_lwp.
11455
11456 2012-02-02 Pedro Alves <palves@redhat.com>
11457
11458 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11459 inferior.
11460
11461 2012-01-27 Pedro Alves <palves@redhat.com>
11462
11463 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11464 (elf_64_file_p): Make static.
11465 (linux_pid_exe_is_elf_64_file): New.
11466 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11467 Delete declarations.
11468 (linux_pid_exe_is_elf_64_file): Declare.
11469 * linux-x86-low.c (x86_arch_setup): Use
11470 linux_pid_exe_is_elf_64_file.
11471
11472 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11473
11474 * linux-low.c (linux_wait_for_event_1): Rename to ...
11475 (linux_wait_for_event): ... here and merge it with former
11476 linux_wait_for_event - new variable wait_ptid, use it.
11477 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11478
11479 2012-01-23 Pedro Alves <palves@redhat.com>
11480
11481 * server.c (main): Avoid yet another case of infinite loop while
11482 detaching/killing after a longjmp.
11483
11484 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11485
11486 Code cleanup.
11487 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11488
11489 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11490
11491 * hostio.c (handle_readlink): New function.
11492 (handle_vFile): Call it to handle "vFile:readlink" packets.
11493
11494 2012-01-20 Pedro Alves <palves@redhat.com>
11495 Ulrich Weigand <ulrich.weigand@linaro.org>
11496
11497 * server.c (handle_v_requests): Only support vAttach and vRun to
11498 start multiple processes when in extended protocol mode.
11499
11500 2012-01-17 Pedro Alves <palves@redhat.com>
11501
11502 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11503 memalign plus mprotect to allocate the scratch buffer.
11504
11505 2012-01-13 Pedro Alves <palves@redhat.com>
11506
11507 * server.c (attach_inferior): Clear `cont_thread'.
11508
11509 2012-01-13 Pedro Alves <palves@redhat.com>
11510
11511 * server.c (main): Avoid infinite loop while detaching/killing
11512 after a longjmp.
11513
11514 2012-01-09 Doug Evans <dje@google.com>
11515
11516 * server.c (start_inferior): Set last_ptid in --wrapper case.
11517
11518 2012-01-06 Yao Qi <yao@codesourcery.com>
11519
11520 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11521 defined.
11522 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11523
11524 2012-01-04 Yao Qi <yao@codesourcery.com>
11525
11526 * tracepoint.c (cmd_qtdp): Print debug message
11527 for static tracepoint.
11528
11529 2012-01-04 Yao Qi <yao@codesourcery.com>
11530
11531 * tracepoint.c (trace_vdebug): Differentiate debug message
11532 between gdbserver and IPA.
11533
11534 2012-01-03 Yao Qi <yao@codesourcery.com>
11535
11536 * tracepoint.c (tracepoint_was_hit): Don't collect for
11537 static tracepoint.
11538
11539 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11540
11541 * terminal.h: Reformat copyright header.
11542
11543 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11544
11545 * server.c (gdbserver_version): Update copyright year.
11546 * gdbreplay.c (gdbreplay_version): Likewise.
11547
11548 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11549
11550 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11551
11552 Revert:
11553 2011-12-18 Hui Zhu <teawater@gmail.com>
11554 * linux-low.c (linux_create_inferior): Save return value to ret.
11555
11556 2011-12-18 Hui Zhu <teawater@gmail.com>
11557
11558 * linux-low.c (linux_create_inferior): Save return value to ret.
11559
11560 2011-12-16 Doug Evans <dje@google.com>
11561
11562 * linux-low.c (linux_create_inferior): If stdio connection,
11563 redirect stdin from /dev/null, stdout to stderr.
11564 * remote-utils.c (remote_is_stdio): New static global.
11565 (remote_connection_is_stdio): New function.
11566 (remote_prepare): Handle stdio connection.
11567 (remote_open): Ditto.
11568 (remote_close): Don't close stdin for stdio connections.
11569 (read_prim,write_prim): New functions. Replace all calls to
11570 read/write to these.
11571 * server.c (main): Watch for "-" argument. Move call to
11572 remote_prepare before start_inferior.
11573 * server.h (STDIO_CONNECTION_NAME): New macro.
11574 (remote_connection_is_stdio): Declare.
11575
11576 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11577 in debugging output.
11578
11579 2011-12-15 Yao Qi <yao@codesourcery.com>
11580
11581 * tracepoint.c: Include sys/syscall.h.
11582 (gdb_ust_thread): Remove preprocessor conditional.
11583
11584 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11585
11586 * linux-low.c (linux_detach_one_lwp): Call
11587 the_low_target.prepare_to_resume before detaching.
11588
11589 2011-12-14 Yao Qi <yao@codesourcery.com>
11590
11591 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11592 of write.
11593
11594 2011-12-14 Yao Qi <yao@codesourcery.com>
11595
11596 * i386-low.c (i386_low_stopped_data_address): Initialize local
11597 variable `control'.
11598
11599 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11600
11601 PR remote/13492
11602
11603 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11604 DR_CONTROL unless necessary. Extend comments.
11605 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11606 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11607
11608 2011-12-13 Yao Qi <yao@codesourcery.com>
11609
11610 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11611 macros.
11612 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11613
11614 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11615
11616 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11617 Print new debug message for such case.
11618
11619 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11620
11621 Fix overlapping memcpy.
11622 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11623 the read_inferior_memory transfer.
11624 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11625 write_inferior_memory transfer.
11626 (set_fast_tracepoint_jump): New variable buf. Use it for the
11627 read_inferior_memory and write_inferior_memory transfers.
11628 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11629 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11630 Use it for the write_inferior_memory transfer.
11631 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11632 buffers.
11633
11634 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11635
11636 * linux-low.c (fetch_register, store_register): Make code
11637 consistent, fix formatting.
11638
11639 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11640
11641 * linux-low.c (usr_store_inferior_registers): Factor out code
11642 to handle individual registers into...
11643 (store_register): ... this new function.
11644
11645 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11646
11647 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11648 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11649 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11650 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11651 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11652 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11653 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11654 (srv_xmlfiles): Add new XML files.
11655
11656 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11657 and <sys/uio.h>.
11658 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11659 (init_registers_s390_linux32v1): Add prototype.
11660 (init_registers_s390_linux32v2): Likewise.
11661 (init_registers_s390_linux64v1): Likewise.
11662 (init_registers_s390_linux64v2): Likewise.
11663 (init_registers_s390x_linux64v1): Likewise.
11664 (init_registers_s390x_linux64v2): Likewise.
11665 (s390_num_regs): Increment to 52.
11666 (s390_regmap): Add orig_r2 register.
11667 (s390_num_regs_3264): Increment to 68.
11668 (s390_regmap_3264): Add orig_r2 register.
11669 (s390_collect_ptrace_register): Handle orig_r2 register.
11670 (s390_supply_ptrace_register): Likewise.
11671 (s390_fill_last_break): New function.
11672 (s390_store_last_break): Likewise.
11673 (s390_fill_system_call): New function.
11674 (s390_store_system_call): Likewise.
11675 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11676 register sets.
11677 (s390_check_regset): New function.
11678 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11679 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11680 Update target_regsets for available register sets.
11681
11682 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11683 Jan Kratochvil <jan.kratochvil@redhat.com>
11684
11685 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11686 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11687 New.
11688 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11689 * linux-low.h (struct process_info_private): New member r_debug.
11690 * server.c (handle_qxfer_libraries): Call
11691 the_target->qxfer_libraries_svr4.
11692 (handle_qxfer_libraries_svr4): New function.
11693 (qxfer_packets): New entry "libraries-svr4".
11694 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11695 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11696 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11697 PACKET_qXfer_libraries_svr4.
11698
11699 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11700
11701 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11702 PSW address/mask between 8-byte and 16-byte formats.
11703 (s390_supply_ptrace_register): Likewise.
11704 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11705 basic addressing mode bit.
11706
11707 2011-11-24 Stan Shebs <stan@codesourcery.com>
11708
11709 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11710
11711 2011-11-17 Stan Shebs <stan@codesourcery.com>
11712
11713 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11714 (tracing_start_time): New global.
11715 (tracing_stop_time): New global.
11716 (tracing_user_name): New global.
11717 (tracing_notes): New global.
11718 (tracing_stop_note): New global.
11719 (cmd_qtstart): Set traceframe_usage, start_time.
11720 (stop_tracing): Set stop_time.
11721 (cmd_qtstatus): Report additional status.
11722 (cmd_qtp): New function.
11723 (handle_tracepoint_query): Call it.
11724 (cmd_qtnotes): New function.
11725 (handle_tracepoint_general_set): Call it.
11726 (get_timestamp): Rename from tsv_get_timestamp.
11727
11728 2011-11-14 Stan Shebs <stan@codesourcery.com>
11729 Kwok Cheung Yeung <kcy@codesourcery.com>
11730
11731 * linux-x86-low.c (small_jump_insn): New.
11732 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11733 trampoline and error message, build a trampoline and issue a small
11734 jump instruction to it.
11735 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11736 trampoline and error message.
11737 (x86_get_min_fast_tracepoint_insn_len): New.
11738 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11739 * linux-low.h (struct linux_target_ops): Add arguments to
11740 install_fast_tracepoint_jump_pad operation, add new operation.
11741 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11742 arguments.
11743 (linux_get_min_fast_tracepoint_insn_len): New function.
11744 (linux_target_op): Add new operation.
11745 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11746 (gdb_trampoline_buffer_end): Ditto.
11747 (gdb_trampoline_buffer_error): Ditto.
11748 (struct ipa_sym_addresses): Add fields for new IPA variables.
11749 (symbol_list): Add entries for new IPA variables.
11750 (struct tracepoint): Add fields to hold the address range of the
11751 trampoline used by the tracepoint.
11752 (trampoline_buffer_head): New static variable.
11753 (trampoline_buffer_tail): Ditto.
11754 (claim_trampoline_space): New function.
11755 (have_fast_tracepoint_trampoline_buffer): New function.
11756 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11757 structure.
11758 (install_fast_tracepoint): Ditto, also add error buffer argument.
11759 (cmd_qtminftpilen): New function.
11760 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11761 (fast_tracepoint_from_trampoline_address): New function.
11762 (fast_tracepoint_collecting): Handle trampoline as part of jump
11763 pad space.
11764 (set_trampoline_buffer_space): New function.
11765 (initialize_tracepoint): Initialize new IPA variables.
11766 * target.h (struct target_ops): Add arguments to
11767 install_fast_tracepoint_jump_pad operation, add new
11768 get_min_fast_tracepoint_insn_len operation.
11769 (target_get_min_fast_tracepoint_insn_len): New.
11770 (install_fast_tracepoint_jump_pad): Add arguments.
11771 * server.h (IPA_BUFSIZ): Define.
11772 * linux-i386-ipa.c: Include extra header files.
11773 (initialize_fast_tracepoint_trampoline_buffer): New function.
11774 (initialize_low_tracepoint): Call it.
11775 * server.h (set_trampoline_buffer_space): Declare.
11776 (claim_trampoline_space): Ditto.
11777 (have_fast_tracepoint_trampoline_buffer): Ditto.
11778
11779 2011-11-14 Yao Qi <yao@codesourcery.com>
11780
11781 * server.c (handle_query): Handle InstallInTrace for qSupported.
11782 * tracepoint.c (add_tracepoint): Sort list.
11783 (install_tracepoint, download_tracepoint): New.
11784 (cmd_qtdp): Call them to install and download tracepoints.
11785 (sort_tracepoints): Removed.
11786 (cmd_qtstart): Update.
11787
11788 2011-11-14 Yao Qi <yao@codesourcery.com>
11789
11790 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11791 * mem-break.h: Declare.
11792 * tracepoint.c (cmd_qtstart): Move some code to ...
11793 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11794 New.
11795 (download_tracepoints): Move some code to ...
11796 (download_tracepoint_1): ... here. New.
11797
11798 2011-11-08 Yao Qi <yao@codesourcery.com>
11799
11800 * remote-utils.c (relocate_instruction): A comment fix.
11801
11802 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11803
11804 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11805 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11806 dr_status_mirror and dr_control_mirror from debug_reg_state.
11807 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11808 (i386_initial_stuff): Remove use of deleted globals.
11809 (i386_get_thread_context, i386_set_thread_context,
11810 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11811 from debug_reg_state.
11812
11813 2011-11-05 Yao Qi <yao@codesourcery.com>
11814
11815 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11816 address as TPOINT's.
11817
11818 2011-11-02 Stan Shebs <stan@codesourcery.com>
11819
11820 * tracepoint.c (agent_mem_read_string): New function.
11821 (eval_agent_expr): Call it for tracenz.
11822 * server.c (handle_query): Report support for tracenz.
11823
11824 2011-11-02 Yao Qi <yao@codesourcery.com>
11825
11826 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11827
11828 2011-11-02 Yao Qi <yao@codesourcery.com>
11829
11830 * target.h: Fix a typo in comment.
11831
11832 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11833
11834 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11835 clobber the breakpoints' shadows with fast tracepoint jumps.
11836 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11837 * target.c (write_inferior_memory): Also pass MYADDR down to
11838 check_mem_write.
11839
11840 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11841
11842 * configure.ac: Check support for personality routine.
11843 * configure: Regenerate.
11844 * config.in: Likewise.
11845 * linux-low.c: Include <sys/personality.h>.
11846 Define ADDR_NO_RANDOMIZE if necessary.
11847 (linux_create_inferior): Disable address space randomization when
11848 forking inferior, if requested.
11849 (linux_supports_disable_randomization): New function.
11850 (linux_target_ops): Install it.
11851 * server.h (disable_randomization): Declare.
11852 * server.c (disable_randomization): New global variable.
11853 (handle_general_set): Handle QDisableRandomization.
11854 (handle_query): Likewise for qSupported.
11855 (main): Support --disable-randomization and --no-disable-randomization
11856 command line arguments.
11857 * target.h (struct target_ops): Add supports_disable_randomization.
11858 (target_supports_disable_randomization): New macro.
11859
11860 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11861
11862 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11863 ifdef check.
11864 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11865 [!PT_GETDSBT] (target_loadmap): New definition.
11866 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11867 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11868 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11869 and PT_GETDSBT to LINUX_LOADMAP.
11870 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11871 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11872
11873 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11874
11875 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11876 (arm_linux_hwbp_cap): New static variable.
11877 (arm_linux_get_hwbp_cap): Replace by ...
11878 (arm_linux_init_hwbp_cap): ... this new function.
11879 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11880 (arm_linux_get_hw_watchpoint_count): Likewise.
11881 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11882 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11883 (arm_prepare_to_resume): Use perror_with_name instead of error.
11884
11885 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11886
11887 * linux-arm-low.c: Include <signal.h>.
11888 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11889 (struct arm_linux_hwbp_cap): New data type.
11890 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11891 (struct arm_linux_hw_breakpoint): New data type.
11892 (MAX_BPTS, MAX_WPTS): Define.
11893 (struct arch_process_info, struct arch_lwp_info): New data types.
11894 (arm_linux_get_hwbp_cap): New function.
11895 (arm_linux_get_hw_breakpoint_count): Likewise.
11896 (arm_linux_get_hw_watchpoint_count): Likewise.
11897 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11898 (arm_hwbp_control_initialize): Likewise.
11899 (arm_hwbp_control_is_enabled): Likewise.
11900 (arm_hwbp_control_is_initialized): Likewise.
11901 (arm_hwbp_control_disable): Likewise.
11902 (arm_linux_hw_breakpoint_equal): Likewise.
11903 (arm_linux_hw_point_initialize): Likewise.
11904 (struct update_registers_data): New data structure.
11905 (update_registers_callback: New function.
11906 (arm_insert_point): Likewise.
11907 (arm_remove_point): Likewise.
11908 (arm_stopped_by_watchpoint): Likewise.
11909 (arm_stopped_data_address): Likewise.
11910 (arm_new_process): Likewise.
11911 (arm_new_thread): Likewise.
11912 (arm_prepare_to_resume): Likewise.
11913 (the_low_target): Register arm_insert_point, arm_remove_point,
11914 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11915 arm_new_thread, and arm_prepare_to_resume.
11916
11917 2011-09-15 Stan Shebs <stan@codesourcery.com>
11918
11919 * server.h (struct emit_ops): Add compare-goto fields.
11920 * tracepoint.c (gdb_agent_op_sizes): New table.
11921 (emit_eq_goto): New function.
11922 (emit_ne_goto): New function.
11923 (emit_lt_goto): New function.
11924 (emit_le_goto): New function.
11925 (emit_gt_goto): New function.
11926 (emit_ge_goto): New function.
11927 (is_goto_target): New function.
11928 (compile_bytecodes): Recognize special cases of compare-goto
11929 combinations and call specialized emitters for them.
11930 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11931 (amd64_emit_ne_goto): New function.
11932 (amd64_emit_lt_goto): New function.
11933 (amd64_emit_le_goto): New function.
11934 (amd64_emit_gt_goto): New function.
11935 (amd64_emit_ge_goto): New function.
11936 (amd64_emit_ops): Add the new functions.
11937 (i386_emit_eq_goto): New function.
11938 (i386_emit_ne_goto): New function.
11939 (i386_emit_lt_goto): New function.
11940 (i386_emit_le_goto): New function.
11941 (i386_emit_gt_goto): New function.
11942 (i386_emit_ge_goto): New function.
11943 (i386_emit_ops): Add the new functions.
11944
11945 2011-09-08 Stan Shebs <stan@codesourcery.com>
11946
11947 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11948 (i386_emit_epilogue): Restore %ebx.
11949
11950 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11951
11952 * server.c (step_thread): Remove definition.
11953 (process_serial_event): Don't handle Hs.
11954 * server.h (step_thread): Remove declaration.
11955 * target.c (set_desired_inferior): Remove use of step_thread.
11956
11957 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11958
11959 * linux-low.c: Include linux-procfs.h.
11960 (linux_attach_lwp_1): Update comments.
11961 (linux_attach): Scan for existing threads when attaching to a
11962 process that is the tgid.
11963 * Makefile.in: Update dependencies.
11964
11965 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11966
11967 * configure.srv: Add linux-procfs.o dependencies.
11968
11969 2011-08-14 Yao Qi <yao@codesourcery.com>
11970
11971 * target.h (struct target_ops): Fix indent.
11972 * win32-low.c (win32_target_ops): Fix comment.
11973
11974 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11975 Yao Qi <yao@codesourcery.com>
11976
11977 * Makefile.in (clean): Remove tic6x-*.c files.
11978 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11979 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11980 (tic6x-c64xp-linux.c): Likewise.
11981 * configure.srv: Add support for tic6x-*-uclinux.
11982 * linux-tic6x-low.c: New.
11983 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11984
11985 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11986 Yao Qi <yao@codesourcery.com>
11987
11988 * target.h (struct target_ops): Add read_loadmap.
11989 * linux-low.c (struct target_loadseg): New type.
11990 (struct target_loadmap): New type.
11991 (linux_read_loadmap): New function.
11992 (linux_target_ops): Add linux_read_loadmap.
11993 * server.c (handle_query): Support qXfer:fdpic:read packet.
11994 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11995 to NULL.
11996
11997 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11998
11999 * win32-low.c: Include <stdint.h>.
12000
12001 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12002
12003 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12004 to the inferior here.
12005 (i386_remove_aligned_watchpoint): Ditto.
12006 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12007 fit part of the watchpoint in the debug registers.
12008 (i386_update_inferior_debug_regs): New.
12009 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12010 registers, and only update the inferior on success.
12011 (i386_low_remove_watchpoint): Ditto.
12012
12013 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12014
12015 * linux-low.c (compare_ints, unique, list_threads, show_process,
12016 linux_core_of_thread): Delete.
12017 (linux_target_ops): Change linux_core_of_thread to
12018 linux_common_core_of_thread.
12019 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12020 * utils.c (malloc_failure): Change type of argument.
12021 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12022 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12023 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12024 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12025 (IPA_OBJS): Add common-utils-ipa.o.
12026 (ptid_h, linux_osdata_h): New macros.
12027 (server_h): Add common/common-utils.h, common/xml-utils.h,
12028 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12029 common/ptid.h.
12030 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12031 ptid.o, buffer.o): New rules.
12032 (linux-low.o): Add common/linux-osdata.h as a dependency.
12033 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12034 * configure.ac: Add AC_HEADER_DIRENT check.
12035 * config.in: Regenerate.
12036 * configure: Regenerate.
12037 * remote-utils.c (xml_escape_text): Delete.
12038 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12039 buffer_xml_printf): Move to common/buffer.c.
12040 * server.c (main): Remove call to initialize_inferiors.
12041 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12042 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12043 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12044 internal_error, gdb_assert, gdb_assert_fail): Delete.
12045 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12046 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12047 common/buffer.h.
12048 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12049 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12050 initialize_inferiors): Delete.
12051
12052 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12053
12054 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12055 symbol error.
12056
12057 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12058
12059 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12060 assertion.
12061 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12062
12063 2011-05-26 Yao Qi <yao@codesourcery.com>
12064
12065 * Makefile.in (thread-db.o): Track dependence to
12066 common/gdb_thread_db.h.
12067 * thread-db.c: include gdb_thread_db.h from right place.
12068
12069 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12070
12071 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12072 __FILE__ and __LINE__ to internal_error.
12073
12074 2011-05-13 Doug Evans <dje@google.com>
12075
12076 * thread-db.c (try_thread_db_load_from_sdir): New function.
12077 (try_thread_db_load_from_dir): New function.
12078 (thread_db_load_search): Handle $sdir, ignore $pdir.
12079 Remove trying of system directories if search of
12080 libthread-db-search-path fails, that is now done via $sdir.
12081
12082 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12083
12084 * server.c (handle_query): Add EnableDisableTracepoints to the list
12085 of supported features.
12086 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12087 tracepoints.
12088 (cmd_qtenable_disable): New.
12089 (cmd_qtstart): Install tracepoints even if disabled.
12090 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12091 receiving a QTEnable or QTDisable packet.
12092 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12093 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12094 tracepoints.
12095 (gdb_probe): Skip data collection if static tracepoint is disabled.
12096
12097 2011-05-10 Doug Evans <dje@google.com>
12098
12099 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12100
12101 2011-05-04 Doug Evans <dje@google.com>
12102
12103 * linux-low.c (linux_join): Skip process lookup.
12104 * spu-low.c (spu_join): Ditto.
12105 * server.c (join_inferiors_callback): Delete.
12106 (process_serial_event): For 'D' packet (detach) call join_inferior
12107 directly.
12108
12109 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12110
12111 * README: Don't mention xscale*-*-linux*.
12112 * configure.srv (xscale*-*-linux*): Don't handle target.
12113
12114 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12115
12116 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12117 casting pointers.
12118 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12119 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12120 (i386_emit_void_call_2): Likewise.
12121
12122 2011-04-26 Yao Qi <yao@codesourcery.com>
12123
12124 * linux-low.c: Move common macros to linux-ptrace.h.
12125 Include linux-ptrace.h.
12126 * Makefile.in (linux_ptrace_h): New.
12127 (linux-low.o): Depends on linux-ptrace.h.
12128
12129 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12130
12131 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12132 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12133 (remote_prepare): New function with most of the TCP code from ...
12134 (remote_open): ... here. Detect PORT here unconditionally. Move also
12135 setting transport_is_reliable.
12136 * server.c (run_once): New variable.
12137 (gdbserver_usage): Document it.
12138 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12139 the first run if RUN_ONCE.
12140 * server.h (run_once, remote_prepare): New declarations.
12141
12142 2011-04-19 Tom Tromey <tromey@redhat.com>
12143
12144 * win32-low.c (handle_load_dll): Remove duplicate "the".
12145
12146 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12147
12148 Remove support for old Cygwin 1.5 versions.
12149 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12150 function to avoid warning.
12151 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12152 warning.
12153
12154 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12155
12156 * gdbserver/server.h (Macro _): Define it if not available.
12157
12158 2011-03-14 Michael Snyder <msnyder@vmware.com>
12159
12160 * hostio.c (handle_close): Remove unnecessary null test.
12161
12162 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12163
12164 * Makefile.in (maintainer-clean realclean distclean): Remove
12165 "make ... subdir_do" command.
12166
12167 2011-03-10 Michael Snyder <msnyder@vmware.com>
12168
12169 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12170
12171 * server.c (handle_v_run): Free alloced buffer on early return.
12172
12173 2011-03-09 Yao Qi <yao@codesourcery.com>
12174
12175 Revert:
12176 2011-03-04 Yao Qi <yao@codesourcery.com>
12177
12178 * Makefile.in: Remove GNU make feature --directory.
12179
12180 2011-03-05 Yao Qi <yao@codesourcery.com>
12181
12182 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12183 (subdir_do): New make target. Copied from gdb/Makefile.
12184 (maintainer-clean, realclean, distclean, clean): Call corresponding
12185 make targets in common/Makefile.
12186
12187 2011-02-11 Yao Qi <yao@codesourcery.com>
12188
12189 * configure.ac: Call AC_PROG_RANLIB.
12190 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12191 * configure: Regenerate.
12192
12193 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12194
12195 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12196
12197 2011-03-06 Yao Qi <yao@codesourcery.com>
12198
12199 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12200
12201 2011-03-05 Yao Qi <yao@codesourcery.com>
12202
12203 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12204 (subdir_do): New make target. Copied from gdb/Makefile.
12205 (maintainer-clean, realclean, distclean, clean): Call corresponding
12206 make targets in common/Makefile.
12207
12208 2011-03-04 Yao Qi <yao@codesourcery.com>
12209
12210 * Makefile.in: Remove GNU make feature --directory.
12211
12212 2011-03-04 Michael Snyder <msnyder@vmware.com>
12213
12214 * server.c (queue_stop_reply): Call xmalloc not malloc.
12215
12216 2011-03-02 Michael Snyder <msnyder@vmware.com>
12217
12218 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12219
12220 2011-02-28 Michael Snyder <msnyder@vmware.com>
12221
12222 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12223 (cmd_qtframe): Ditto.
12224 (cmd_qtbuffer): Ditto.
12225 (cmd_bigqtbuffer): Ditto.
12226
12227 * utils.c (decimal2str): Initialize 'width' to nine, then
12228 don't mess with it.
12229
12230 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12231
12232 * hostio.c (require_data): Free *data, not data.
12233
12234 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12235
12236 * hostio.c (require_data): Use free, not xfree.
12237
12238 2011-02-27 Michael Snyder <msnyder@vmware.com>
12239
12240 * server.c (handle_query): Discard unused value.
12241
12242 * hostio.c (require_data): Free malloc memory before returning
12243 error.
12244
12245 2011-02-26 Michael Snyder <msnyder@vmware.com>
12246
12247 * linux-low.c (list_threads): Call closedir for dirent.
12248
12249 2011-02-27 Michael Snyder <msnyder@vmware.com>
12250
12251 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12252 a case statement falls through.
12253
12254 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12255
12256 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12257 in comparison.
12258
12259 2011-02-26 Michael Snyder <msnyder@vmware.com>
12260
12261 * utils.c (decimal2str): Eliminate dead code and dead param.
12262 (pulongest): Drop dead param from call to decimal2str.
12263 (plongest): Ditto.
12264
12265 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12266
12267 Revert the following patch (not approved yet):
12268 2011-02-21 Hui Zhu <teawater@gmail.com>
12269 * tracepoint.c (tp_printf): New function.
12270 (eval_agent_expr): Handle gdb_agent_op_printf.
12271
12272 2011-02-21 Hui Zhu <teawater@gmail.com>
12273
12274 * tracepoint.c (tp_printf): New function.
12275 (eval_agent_expr): Handle gdb_agent_op_printf.
12276
12277 2011-02-18 Tom Tromey <tromey@redhat.com>
12278
12279 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12280 (tracepoint.o): Likewise.
12281 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12282 (gdb_agent_op_names): Likewise.
12283
12284 2011-02-18 Tom Tromey <tromey@redhat.com>
12285
12286 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12287 gdb_agent_op_rot>: New constants.
12288 (gdb_agent_op_names): Add pick and roll.
12289 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12290 cases.
12291
12292 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12293
12294 * aclocal.m4: Regenerated with aclocal-1.11.1.
12295
12296 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12297
12298 * server.c (handle_qxfer_traceframe_info): New.
12299 (qxfer_packets): Register "traceframe-info".
12300 (handle_query): Report support for qXfer:traceframe-info:read+.
12301 * tracepoint.c (match_blocktype): New.
12302 (traceframe_find_block_type): Rename to ...
12303 (traceframe_walk_blocks): ... this. Add callback filter argument,
12304 and use it.
12305 (traceframe_find_block_type): New, reimplemented on top of
12306 traceframe_walk_blocks.
12307 (build_traceframe_info_xml): New.
12308 (traceframe_read_info): New.
12309 * server.h (traceframe_read_info): Declare.
12310
12311 2011-02-11 Yao Qi <yao@codesourcery.com>
12312
12313 * configure.ac: Call AC_PROG_RANLIB.
12314 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12315 * configure: Regenerate.
12316
12317 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12318
12319 * server.c (gdb_read_memory): Change return semantics to allow
12320 partial transfers.
12321 (handle_search_memory_1): Adjust.
12322 (process_serial_event) <'m' packet>: Handle partial transfers.
12323 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12324
12325 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12326
12327 * regcache.c (init_register_cache): Initialize
12328 regcache->register_status.
12329 (free_register_cache): Release regcache->register_status.
12330 (regcache_cpy): Copy register_status.
12331 (registers_to_string): Print 'x's for unavailable registers.
12332 (supply_register): Mark the register's status valid or
12333 unavailable, depending on whether a buffer was passed in or not.
12334 (supply_register_zeroed): New.
12335 (supply_regblock): Mark the registers' status valid or
12336 unavailable, depending on whether a buffer was passed in or not.
12337 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12338 (struct regcache): New `register_status' field.
12339 (supply_register_zeroed): Declare.
12340 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12341 supply_register_zeroed, rather than passing a NULL buffer to
12342 supply_register.
12343 * tracepoint.c (fetch_traceframe_registers): Update comment.
12344
12345 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12346
12347 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12348 buffer explicit.
12349
12350 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12351
12352 * server.h (decode_xfer_write): Change prototype.
12353 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12354 and don't extract the annex here.
12355 * server.c (decode_xfer_read): Remove `annex' parameter,
12356 and don't extract the annex here.
12357 (decode_xfer): New.
12358 (struct qxfer): New.
12359 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12360 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12361 (handle_qxfer_statictrace): New functions, abstracted out from
12362 handle_query, and made to use the struct qxfer interface.
12363 (handle_threads_qxfer_proper): Rename to ...
12364 (handle_qxfer_threads_proper): ... this.
12365 (handle_threads_qxfer): Rename to ...
12366 (handle_qxfer_threads): ... this. Adjust.
12367 (qxfer_packets): New array.
12368 (handle_qxfer): New function.
12369 (handle_query): Use handle_qxfer.
12370
12371 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12372
12373 * gdbreplay.c: Shorten lines of >= 80 columns.
12374 * linux-low.c: Ditto.
12375 * linux-ppc-low.c: Ditto.
12376 * linux-s390-low.c: Ditto.
12377 * linux-sparc-low.c: Ditto.
12378 * linux-x86-low.c: Ditto.
12379 * linux-xtensa-low.c: Ditto.
12380 * mem-break.c: Ditto.
12381 * nto-low.c: Ditto.
12382 * regcache.h: Ditto.
12383 * remote-utils.c: Ditto.
12384 * server.c: Ditto.
12385 * server.h: Ditto.
12386 * thread-db.c: Ditto.
12387 * tracepoint.c: Ditto.
12388 * utils.c: Ditto.
12389 * win32-low.h: Ditto.
12390
12391 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12392
12393 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12394 update.
12395
12396 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12397
12398 * server.c (gdbserver_version): Update copyright year in version
12399 output.
12400 * gdbreplay.c (gdbreplay_version): Ditto.
12401
12402 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12403
12404 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12405 * linux-bfin-low.c: New file.
12406 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12407 PT_DATA_ADDR for BFIN targets.
12408 * Makefile.in (SFILES): Add linux-bfin-low.c.
12409 (clean): Remove reg-bfin.c.
12410 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12411 * README: Mention supported Blackfin targets.
12412
12413 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12414
12415 * .gitignore: New file.
12416
12417 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12418
12419 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12420
12421 2010-10-22 Jie Zhang <jie@codesourcery.com>
12422
12423 * Makefile.in: Add FLAGS_TO_PASS variable.
12424 (install): Remove dependency of install-only and recursively
12425 invoke make for install-only.
12426
12427 2010-10-04 Doug Evans <dje@google.com>
12428
12429 * Makefile.in (uninstall): Use $(DESTDIR).
12430
12431 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12432
12433 PR gdb/11842
12434
12435 * linux-x86-low.c (compat_siginfo_from_siginfo)
12436 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12437 si_code is < 0. Check for si_code == SI_TIMER before checking for
12438 si_code < 0.
12439
12440 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12441
12442 * lynx-i386-low.c: New file.
12443 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12444
12445 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12446
12447 * lynx-low.c (ptrace_request_to_str): Remove handling for
12448 request values that have been removed in LynxOS 5.x.
12449
12450 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12451
12452 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12453 <ptrace.h>
12454
12455 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12456
12457 * configure.ac: Add --enable-inprocess-agent option.
12458 * configure: Rebuilt.
12459
12460 2010-09-06 Yao Qi <yao@codesourcery.com>
12461
12462 * linux-low.c (linux_kill): Remove unused variable.
12463 (linux_stabilize_threads): Likewise.
12464 * server.c (start_inferior): Likewise.
12465 (queue_stop_reply_callback): Likewise.
12466 * tracepoint.c (do_action_at_tracepoint): Likewise.
12467
12468 2010-09-06 Yao Qi <yao@codesourcery.com>
12469
12470 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12471 on return.
12472
12473 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12474
12475 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12476
12477 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12478
12479 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12480 "$(IPA_DEPFILES)".
12481
12482 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12483
12484 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12485 gdbserver/lynx-ppc-low.c: New files.
12486 * Makefile.in (lynx_low_h): New variable.
12487 (lynx-low.o, lynx-ppc-low.o): New rules.
12488 * configure.ac: On LynxOS, link with -lnetinet.
12489 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12490 * configure: regenerate.
12491
12492 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12493
12494 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12495 * configure.ac: Add check for vasprintf and vsnprintf.
12496 * configure, config.in: Regenerate.
12497 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12498
12499 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12500
12501 * gdbreplay.c: Move include of alloca.h up, next to include of
12502 malloc.h.
12503 * server.h: Add include of malloc.h.
12504 * mem-break.c: Remove include of malloc.h.
12505 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12506
12507 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12508
12509 * Makefile.in (memmem.o): Build with -Wno-error.
12510
12511 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12512
12513 * utils.c (xsnprintf): Make non-static.
12514 * server.h: Add xsnprintf declaration.
12515 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12516 replace calls to snprintf by calls to xsnprintf throughout.
12517
12518 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12519
12520 * configure.ac: Add configure check for alloca.
12521 * configure, config.in: Regenerate.
12522 * server.h: Include alloca.h if it exists.
12523 * gdbreplay.c: Include alloca.h if it exists.
12524
12525 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12526
12527 * linux-low.c (__SIGRTMIN): Define if not already defined.
12528 (linux_create_inferior): Check for __ANDROID__ rather than
12529 __SIGRTMIN.
12530 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12531 are already deferred.
12532 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12533 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12534 stopped and already has a pending signal to report.
12535 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12536 a pending signal to report or is moving out of a jump pad.
12537 (linux_init_signals): Check for __ANDROID__ rather than
12538 __SIGRTMIN.
12539
12540 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12541
12542 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12543 debug_threads check. Avoid a linear search when not doing debug
12544 output.
12545
12546 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12547
12548 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12549 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12550 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12551 (process_event): Change local fd's type to gdb_fildes_t.
12552 (create_file_handler): Adjust prototype.
12553 (delete_file_handler): Adjust prototype.
12554 (handle_file_event): Adjust prototype. Use pfildes.
12555 (create_file_event): Adjsut prototype.
12556 * remote-utils.c (remote_desc, listen_desc): Change type to
12557 gdb_fildes_t.
12558 * server.h: New gdb_fildes_t typedef.
12559 [USE_WIN32API]: Include winsock2.h.
12560 (delete_file_handler, add_file_handler): Adjust prototypes.
12561 (pfildes): Declare.
12562 * utils.c (pfildes): New.
12563
12564 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12565
12566 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12567 * configure: Regenerate.
12568
12569 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12570
12571 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12572 (linux_done_accessing_memory): ... this.
12573 (linux_target_ops): Adjust.
12574 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12575 * nto-low.c (nto_target_ops): Adjust comment.
12576 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12577 * spu-low.c (spu_target_ops): Adjust comment.
12578 * target.h (target_ops): Rename unprepare_to_access_memory field
12579 to done_accessing_memory.
12580 (unprepare_to_access_memory): Rename to ...
12581 (done_accessing_memory): ... this.
12582
12583 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12584
12585 * linux-low.c (linux_prepare_to_access_memory): New.
12586 (linux_unprepare_to_access_memory): New.
12587 (linux_target_ops): Install them.
12588 * server.c (read_memory): Rename to ...
12589 (gdb_read_memory): ... this. Use
12590 prepare_to_access_memory/prepare_to_access_memory.
12591 (write_memory): Rename to ...
12592 (gdb_write_memory): ... this. Use
12593 prepare_to_access_memory/prepare_to_access_memory.
12594 (handle_search_memory_1): Adjust.
12595 (process_serial_event): Adjust.
12596 * target.h (struct target_ops): New fields
12597 prepare_to_access_memory and unprepare_to_access_memory.
12598 (prepare_to_access_memory, unprepare_to_access_memory): New.
12599 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12600 prepare_to_access_memory/prepare_to_access_memory.
12601 * nto-low.c (nto_target_ops): Adjust.
12602 * spu-low.c (spu_target_ops): Adjust.
12603 * win32-low.c (win32_target_ops): Adjust.
12604
12605 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12606
12607 * Makefile.in (WARN_CFLAGS): Get it from configure.
12608 (WERROR_CFLAGS): New.
12609 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12610 * configure.ac: Introduce --enable-werror, which adds -Werror to
12611 the compiler command line. Enabled by default. Disable with
12612 --disable-werror. Add -Wdeclaration-after-statement
12613 Wpointer-arith and -Wformat-nonliteral to warning flags.
12614 * configure: Regenerate.
12615
12616 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12617
12618 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12619
12620 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12621
12622 * gdbreplay.c (remote_error): New.
12623 (gdbchar): New.
12624 (expect): Use gdbchar. Check for error reading from GDB.
12625 Clarify sync error output.
12626 (play): Check for errors writing to GDB.
12627 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12628 * remote-utils.c (getpkt): Check for errors writing to the remote
12629 descriptor.
12630
12631 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12632
12633 * linux-low.c (linux_wait_1): Move non-debugging code out of
12634 `debug_threads' control.
12635
12636 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12637
12638 * linux-low.c (linux_wait_1): Don't set last_status here.
12639 * server.c (push_event, queue_stop_reply_callback): Assert we're
12640 not pushing a TARGET_WAITKIND_IGNORE event.
12641 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12642 (myresume, handle_target_event): Set the thread's last_resume_kind
12643 and last_status from the target returned status.
12644
12645 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12646
12647 PR threads/10729
12648
12649 * linux-x86-low.c (update_debug_registers_callback): New.
12650 (i386_dr_low_set_addr): Use it.
12651 (i386_dr_low_get_addr): New.
12652 (i386_dr_low_set_control): Use update_debug_registers_callback.
12653 (i386_dr_low_get_control): New.
12654 (i386_dr_low_get_status): Adjust.
12655 * linux-low.c (linux_stop_lwp): New.
12656 * linux-low.h (linux_stop_lwp): Declare.
12657
12658 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12659 argument instead of a i386_debug_reg_state.
12660 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12661 a i386_debug_reg_state.
12662 (i386_insert_aligned_watchpoint): Adjust.
12663 (i386_remove_aligned_watchpoint): Adjust.
12664 (i386_low_stopped_data_address): Read the debug registers from the
12665 inferior instead of from the mirrors.
12666 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12667 (i386_dr_low_get_addr): Declare.
12668 (i386_dr_low_get_control): Declare.
12669 (i386_dr_low_get_status): Change prototype.
12670
12671 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12672 (i386_dr_low_get_addr): New.
12673 (i386_dr_low_get_control): New.
12674 (i386_dr_low_get_status): Adjust prototype. Return
12675 dr_status_mirror.
12676 (i386_initial_stuff): Clear dr_status_mirror and
12677 dr_control_mirror.
12678 (i386_get_thread_context): Adjust.
12679 (i386_set_thread_context): Adjust.
12680 (i386_thread_added): Adjust.
12681
12682 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12683
12684 * linux-low.h (linux_thread_area): Delete declaration.
12685
12686 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12687
12688 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12689 after its termination.
12690
12691 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12692
12693 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12694 (gdb_wants_all_stopped): Delete.
12695 (linux_wait_1): Don't call them.
12696 * server.c (handle_v_cont): Tag all threads as want-stopped.
12697 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12698 stopped as "client-wants-stopped".
12699
12700 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12701
12702 * Makefile.in (signals_h): New.
12703 (server_h): Depend on it.
12704 (server.o): Don't depend on $(signals_def).
12705 (signals.o): Depend on $(signals_def).
12706
12707 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12708
12709 * Makefile.in (signals_def): New.
12710 (server_h): Append include/gdb/signals.h and signals_def.
12711 (server.o): Append signals_def.
12712
12713 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12714
12715 * server.c (handle_target_event): Use target_signal_to_host for
12716 resume_info.sig initialization.
12717 * target.h (struct thread_resume) <sig>: New comment.
12718
12719 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12720
12721 * server.c (handle_query): strcpy() the returned string from paddress()
12722 instead of sprintf().
12723 * utils.c (paddress): Return phex_nz().
12724
12725 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12726
12727 * server.c (handle_v_cont): Call mourn_inferior if process
12728 just exited.
12729 (myresume): Likewise.
12730
12731 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12732
12733 Static tracepoints, and integration with UST.
12734
12735 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12736 * mem-break.c (uninsert_all_breakpoints)
12737 (reinsert_all_breakpoints): New.
12738 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12739 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12740 (gdb_agent_ust_loaded, helper_thread_id)
12741 (gdb_agent_helper_thread_id): New macros.
12742 (struct ipa_sym_addresses): Add addr_ust_loaded,
12743 addr_helper_thread_id, addr_cmd_buf.
12744 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12745 (in_process_agent_loaded_ust): New.
12746 (write_e_ust_not_loaded): New.
12747 (maybe_write_ipa_ust_not_loaded): New.
12748 (struct collect_static_trace_data_action): New.
12749 (enum tracepoint_type) <static_tracepoint>: New.
12750 (struct tracepoint) <handle>: Mention static tracepoints.
12751 (struct static_tracepoint_ctx): New.
12752 (CMD_BUF_SIZE): New.
12753 (add_tracepoint_action): Handle static tracepoint actions.
12754 (unprobe_marker_at): New.
12755 (clear_installed_tracepoints): Handle static tracepoints.
12756 (cmd_qtdp): Handle static tracepoints.
12757 (probe_marker_at): New.
12758 (cmd_qtstart): Handle static tracepoints.
12759 (response_tracepoint): Handle static tracepoints.
12760 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12761 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12762 (get_context_regcache): Handle static tracepoints.
12763 (do_action_at_tracepoint): Handle static tracepoint actions.
12764 (traceframe_find_block_type): Handle static trace data blocks.
12765 (traceframe_read_sdata): New.
12766 (download_tracepoints): Download static tracepoint actions.
12767 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12768 (GDB_PROBE_NAME): New.
12769 (ust_ops): New.
12770 (GET_UST_SYM): New.
12771 (USTF): New.
12772 (dlsym_ust): New.
12773 (ust_marker_to_static_tracepoint): New.
12774 (gdb_probe): New.
12775 (collect_ust_data_at_tracepoint): New.
12776 (gdb_ust_probe): New.
12777 (UNIX_PATH_MAX, SOCK_DIR): New.
12778 (gdb_ust_connect_sync_socket): New.
12779 (resume_thread, stop_thread): New.
12780 (run_inferior_command): New.
12781 (init_named_socket): New.
12782 (gdb_ust_socket_init): New.
12783 (cstr_to_hexstr): New.
12784 (next_st): New.
12785 (first_marker, next_marker): New.
12786 (response_ust_marker): New.
12787 (cmd_qtfstm, cmd_qtsstm): New.
12788 (unprobe_marker_at, probe_marker_at): New.
12789 (cmd_qtstmat, gdb_ust_thread): New.
12790 (gdb_ust_init): New.
12791 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12792 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12793 (ST_REGENTRY): New.
12794 (x86_64_st_collect_regmap): New.
12795 (X86_64_NUM_ST_COLLECT_GREGS): New.
12796 (AMD64_RIP_REGNUM): New.
12797 (supply_static_tracepoint_registers): New.
12798 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12799 (ST_REGENTRY): New.
12800 (i386_st_collect_regmap): New.
12801 (i386_NUM_ST_COLLECT_GREGS): New.
12802 (supply_static_tracepoint_registers): New.
12803 * server.c (handle_query): Handle qXfer:statictrace:read.
12804 <qSupported>: Report support for StaticTracepoints, and
12805 qXfer:statictrace:read features.
12806 * server.h (traceframe_read_sdata)
12807 (supply_static_tracepoint_registers): Declare.
12808 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12809 (unpack_varlen_hex): Include in IPA build.
12810 * Makefile.in (ustlibs, ustinc): New.
12811 (IPA_OBJS): Add remote-utils-ipa.o.
12812 ($(IPA_LIB)): Link -ldl and -lpthread.
12813 (UST_CFLAGS): New.
12814 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12815 * config.in, configure: Regenerate.
12816
12817 2010-06-20 Ian Lance Taylor <iant@google.com>
12818 Pedro Alves <pedro@codesourcery.com>
12819
12820 * linux-x86-low.c (always_true): Delete.
12821 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12822 trying to fool the compiler with always_true.
12823
12824 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12825
12826 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12827 conditions in gdbserver.
12828
12829 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12830
12831 * spu-low.c (spu_read_memory): Wrap around local store limit.
12832 (spu_write_memory): Likewise.
12833
12834 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12835
12836 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12837 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12838 LONGEST uses.
12839 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12840 uses.
12841 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12842 uses with LONGEST uses.
12843
12844 2010-06-14 Stan Shebs <stan@codesourcery.com>
12845 Pedro Alves <pedro@codesourcery.com>
12846
12847 Bytecode compiler.
12848
12849 * linux-x86-low.c: Include limits.h.
12850 (add_insns): New.
12851 (always_true): New.
12852 (EMIT_ASM): New.
12853 (EMIT_ASM32): New.
12854 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12855 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12856 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12857 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12858 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12859 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12860 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12861 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12862 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12863 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12864 (amd64_emit_void_call_2): New.
12865 (amd64_emit_ops): New.
12866 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12867 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12868 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12869 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12870 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12871 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12872 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12873 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12874 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12875 (i386_emit_stack_adjust, i386_emit_int_call_1)
12876 (i386_emit_void_call_2): New.
12877 (i386_emit_ops): New.
12878 (x86_emit_ops): New.
12879 (the_low_target): Install x86_emit_ops.
12880 * server.h (struct emit_ops): New.
12881 (get_raw_reg_func_addr): Declare.
12882 (current_insn_ptr, emit_error): Declare.
12883 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12884 (set_trace_state_variable_value): New defines.
12885 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12886 addr_get_trace_state_variable_value and
12887 addr_set_trace_state_variable_value.
12888 (symbol_list): New fields for get_raw_reg,
12889 get_trace_state_variable_value and set_trace_state_variable_value.
12890 (condfn): New typedef.
12891 (struct tracepoint): New field `compiled_cond'.
12892 (do_action_at_tracepoint): Clear compiled_cond.
12893 (get_trace_state_variable_value, set_trace_state_variable_value):
12894 Export in the IPA.
12895 (condition_true_at_tracepoint): If there's a compiled condition,
12896 run that.
12897 (current_insn_ptr, emit_error): New globals.
12898 (struct bytecode_address): New.
12899 (get_raw_reg_func_addr): New.
12900 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12901 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12902 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12903 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12904 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12905 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12906 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12907 (compile_tracepoint_condition, compile_bytecodes): New.
12908 * target.h (emit_ops): Forward declare.
12909 (struct target_ops): New field emit_ops.
12910 (target_emit_ops): New.
12911 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12912 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12913 * linux-low.c (linux_emit_ops): New.
12914 (linux_target_ops): Install it.
12915 * linux-low.h (struct linux_target_ops): New field emit_ops.
12916
12917 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12918
12919 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12920 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12921
12922 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12923 Stan Shebs <stan@codesourcery.com>
12924
12925 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12926 (all): Depend on $(extra_libraries).
12927 (install-only): Install the IPA.
12928 (IPA_OBJS, IPA_LIB): New.
12929 (clean): Remove the IPA lib.
12930 (IPAGENT_CFLAGS): New.
12931 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12932 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12933 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12934 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12935 * configure.ac: Check for atomic builtins support in the compiler.
12936 (IPA_DEPFILES, extra_libraries): Define.
12937 * configure.srv (ipa_obj): Add description.
12938 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12939 (i[34567]86-*-linux*): Set ipa_obj.
12940 (x86_64-*-linux*): Set ipa_obj.
12941 * linux-low.c (stabilizing_threads): New.
12942 (supports_fast_tracepoints): New.
12943 (linux_detach): Stabilize threads before detaching.
12944 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12945 the lwp is either not stabilizing, or is moving out of a jump pad.
12946 (linux_fast_tracepoint_collecting): New.
12947 (maybe_move_out_of_jump_pad): New.
12948 (enqueue_one_deferred_signal): New.
12949 (dequeue_one_deferred_signal): New.
12950 (linux_wait_for_event_1): If moving out of a jump pad, defer
12951 pending signals to later.
12952 (linux_stabilize_threads): New.
12953 (linux_wait_1): Check if threads need moving out of jump pads, and
12954 do it if so.
12955 (stuck_in_jump_pad_callback): New.
12956 (move_out_of_jump_pad_callback): New.
12957 (lwp_running): New.
12958 (linux_resume_one_lwp): Handle moving out of jump pads.
12959 (linux_set_resume_request): Dequeue deferred signals.
12960 (need_step_over_p): Also step over fast tracepoint jumps.
12961 (start_step_over): Also uninsert fast tracepoint jumps.
12962 (finish_step_over): Also reinsert fast tracepoint jumps.
12963 (linux_install_fast_tracepoint_jump): New.
12964 (linux_target_ops): Install linux_stabilize_threads and
12965 linux_install_fast_tracepoint_jump_pad.
12966 * linux-low.h (linux_target_ops) <get_thread_area,
12967 install_fast_tracepoint_jump_pad>: New fields.
12968 (struct lwp_info) <collecting_fast_tracepoint,
12969 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12970 (linux_get_thread_area): Declare.
12971 * linux-x86-low.c (jump_insn): New.
12972 (x86_get_thread_area): New.
12973 (append_insns): New.
12974 (push_opcode): New.
12975 (amd64_install_fast_tracepoint_jump_pad): New.
12976 (i386_install_fast_tracepoint_jump_pad): New.
12977 (x86_install_fast_tracepoint_jump_pad): New.
12978 (the_low_target): Install x86_get_thread_area and
12979 x86_install_fast_tracepoint_jump_pad.
12980 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12981 (struct fast_tracepoint_jump): New.
12982 (fast_tracepoint_jump_insn): New.
12983 (fast_tracepoint_jump_shadow): New.
12984 (find_fast_tracepoint_jump_at): New.
12985 (fast_tracepoint_jump_here): New.
12986 (delete_fast_tracepoint_jump): New.
12987 (set_fast_tracepoint_jump): New.
12988 (uninsert_fast_tracepoint_jumps_at): New.
12989 (reinsert_fast_tracepoint_jumps_at): New.
12990 (set_breakpoint_at): Use write_inferior_memory.
12991 (uninsert_raw_breakpoint): Use write_inferior_memory.
12992 (check_mem_read): Mask out fast tracepoint jumps.
12993 (check_mem_write): Mask out fast tracepoint jumps.
12994 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12995 (set_fast_tracepoint_jump): Declare.
12996 (delete_fast_tracepoint_jump)
12997 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12998 (reinsert_fast_tracepoint_jumps_at): Declare.
12999 * regcache.c: Don't compile many functions when building the
13000 in-process agent library.
13001 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13002 the register buffer in the heap.
13003 (free_register_cache): If the register buffer isn't owned by the
13004 regcache, don't free it.
13005 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13006 pre-existing register caches.
13007 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13008 type.
13009 (convert_ascii_to_int): : Constify `from' parameter type.
13010 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13011 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13012 the needed buffer in-place.
13013 (relocate_instruction): New.
13014 * server.c (handle_query) <qSymbols>: If the target supports
13015 tracepoints, give it a chance of looking up symbols. Report
13016 support for fast tracepoints.
13017 (handle_status): Stabilize threads.
13018 (process_serial_event): Adjust.
13019 * server.h (struct fast_tracepoint_jump): Forward declare.
13020 (struct process_info) <fast_tracepoint_jumps>: New field.
13021 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13022 (decode_X_packet, decode_M_packet): Adjust.
13023 (relocate_instruction): Declare.
13024 (in_process_agent_loaded): Declare.
13025 (tracepoint_look_up_symbols): Declare.
13026 (struct fast_tpoint_collect_status): Declare.
13027 (fast_tracepoint_collecting): Declare.
13028 (force_unlock_trace_buffer): Declare.
13029 (handle_tracepoint_bkpts): Declare.
13030 (initialize_low_tracepoint)
13031 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13032 * target.h (struct target_ops) <stabilize_threads,
13033 install_fast_tracepoint_jump_pad>: New fields.
13034 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13035 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13036 [HAVE_STDINT_H]: Include stdint.h.
13037 (trace_debug_1): Rename to ...
13038 (trace_vdebug): ... this.
13039 (trace_debug): Rename to ...
13040 (trace_debug_1): ... this. Add `level' parameter.
13041 (trace_debug): New.
13042 (ATTR_USED, ATTR_NOINLINE): New.
13043 (IP_AGENT_EXPORT): New.
13044 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13045 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13046 (about_to_request_buffer_space, trace_buffer_is_full)
13047 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13048 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13049 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13050 (traceframe_write_count, traceframes_created)
13051 (trace_state_variables)
13052 New renaming defines.
13053 (struct ipa_sym_addresses): New.
13054 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13055 (symbol_list): New.
13056 (ipa_sym_addrs): New.
13057 (all_tracepoint_symbols_looked_up): New.
13058 (in_process_agent_loaded): New.
13059 (write_e_ipa_not_loaded): New.
13060 (maybe_write_ipa_not_loaded): New.
13061 (tracepoint_look_up_symbols): New.
13062 (debug_threads) [IN_PROCESS_AGENT]: New.
13063 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13064 (UNKNOWN_SIDE_EFFECTS): New.
13065 (stop_tracing): New.
13066 (flush_trace_buffer): New.
13067 (stop_tracing_bkpt): New.
13068 (flush_trace_buffer_bkpt): New.
13069 (read_inferior_integer): New.
13070 (read_inferior_uinteger): New.
13071 (read_inferior_data_pointer): New.
13072 (write_inferior_data_pointer): New.
13073 (write_inferior_integer): New.
13074 (write_inferior_uinteger): New.
13075 (struct collect_static_trace_data_action): Delete.
13076 (enum tracepoint_type): New.
13077 (struct tracepoint) <type>: New field `type'.
13078 <actions_str, step_actions, step_actions_str>: Only include in
13079 GDBserver.
13080 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13081 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13082 (tracepoints): Use IP_AGENT_EXPORT.
13083 (last_tracepoint): Don't include in the IPA.
13084 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13085 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13086 (alloced_trace_state_variables): New.
13087 (trace_state_variables): Use IP_AGENT_EXPORT.
13088 (traceframe_t): Delete unused variable.
13089 (circular_trace_buffer): Don't include in the IPA.
13090 (trace_buffer_start): Delete.
13091 (struct trace_buffer_control): New.
13092 (trace_buffer_free): Delete.
13093 (struct ipa_trace_buffer_control): New.
13094 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13095 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13096 New.
13097 (trace_buffer_ctrl): New.
13098 (TRACE_BUFFER_CTRL_CURR): New.
13099 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13100 Reimplement as macros.
13101 (trace_buffer_wrap): Delete.
13102 (traceframe_write_count, traceframe_read_count)
13103 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13104 (struct tracepoint_hit_ctx) <type>: New field.
13105 (struct fast_tracepoint_ctx): New.
13106 (memory_barrier): New.
13107 (cmpxchg): New.
13108 (record_tracepoint_error): Update atomically in the IPA.
13109 (clear_inferior_trace_buffer): New.
13110 (about_to_request_buffer_space): New.
13111 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13112 updating the same buffer.
13113 (add_tracepoint): Default the tracepoint's type to trap
13114 tracepoint, and orig_size to -1.
13115 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13116 internal variables.
13117 (create_trace_state_variable): New parameter `gdb'. Handle it.
13118 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13119 (cmd_qtdp): Handle fast tracepoints.
13120 (cmd_qtdv): Adjust.
13121 (max_jump_pad_size): New.
13122 (gdb_jump_pad_head): New.
13123 (get_jump_space_head): New.
13124 (claim_jump_space): New.
13125 (sort_tracepoints): New.
13126 (MAX_JUMP_SIZE): New.
13127 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13128 IPA.
13129 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13130 support. Upload fast traceframes, and delete internal IPA
13131 breakpoints.
13132 (stop_tracing_handler): New.
13133 (flush_trace_buffer_handler): New.
13134 (cmd_qtstop): Upload fast tracepoints.
13135 (response_tracepoint): Handle fast tracepoints.
13136 (tracepoint_finished_step): Upload fast traceframes. Set the
13137 tracepoint hit context's tracepoint type.
13138 (handle_tracepoint_bkpts): New.
13139 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13140 type. Add comment about fast tracepoints.
13141 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13142 non-existing action_str field.
13143 (get_context_regcache): Handle fast tracepoints.
13144 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13145 to the regcache.
13146 (fast_tracepoint_from_jump_pad_address): New.
13147 (fast_tracepoint_from_ipa_tpoint_address): New.
13148 (collecting_t): New.
13149 (force_unlock_trace_buffer): New.
13150 (fast_tracepoint_collecting): New.
13151 (collecting): New.
13152 (gdb_collect): New.
13153 (write_inferior_data_ptr): New.
13154 (target_tp_heap): New.
13155 (target_malloc): New.
13156 (download_agent_expr): New.
13157 (UALIGN): New.
13158 (download_tracepoints): New.
13159 (download_trace_state_variables): New.
13160 (upload_fast_traceframes): New.
13161 (IPA_FIRST_TRACEFRAME): New.
13162 (IPA_NEXT_TRACEFRAME_1): New.
13163 (IPA_NEXT_TRACEFRAME): New.
13164 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13165 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13166 (gdb_jump_pad_buffer_end): New.
13167 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13168 (initialize_tracepoint): Adjust.
13169 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13170 buffer. Initialize the low module.
13171 * utils.c (PREFIX, TOOLNAME): New.
13172 (malloc_failure): Use PREFIX.
13173 (error): In the IPA, an error causes an exit.
13174 (fatal, warning): Use PREFIX.
13175 (internal_error): Use TOOLNAME.
13176 (NUMCELLS): Increase to 10.
13177 * configure, config.in: Regenerate.
13178
13179 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13180
13181 * server.c (handle_query) <qSupported>: Do two passes over the
13182 qSupported string to avoid nesting strtok.
13183
13184 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13185
13186 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13187 (CDEPS): New.
13188 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13189 -Wl,--dynamic-list.
13190 * configure: Regenerate.
13191 * proc-service.list: New.
13192
13193 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13194
13195 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13196 New comment.
13197
13198 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13199
13200 * gdbreplay.c (remote_open): Check error return from socket() call by
13201 its equality to -1 not by it being negative.
13202 * remote-utils.c (remote_open): Likewise.
13203
13204 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13205
13206 * config.h: Regenerate.
13207
13208 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13209
13210 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13211 doesn't provide PTRACE_GET_THREAD_AREA.
13212
13213 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13214
13215 * linux-m68k-low.c: Include <asm/ptrace.h>
13216 (ps_get_thread_area): Implement.
13217
13218 2010-05-03 Doug Evans <dje@google.com>
13219
13220 * event-loop.c (struct callback_event): New struct.
13221 (callback_list): New global.
13222 (append_callback_event, delete_callback_event): New functions.
13223 (process_callback): New function.
13224 (start_event_loop): Call it.
13225 * remote-utils.c (NOT_SCHEDULED): Define.
13226 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13227 moved out of readchar.
13228 (readchar): Rewrite. Call reschedule before returning.
13229 (reset_readchar): New function.
13230 (remote_close): Call it.
13231 (process_remaining, reschedule): New functions.
13232 * server.h (callback_handler_func): New typedef.
13233 (append_callback_event, delete_callback_event): Declare.
13234
13235 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13236
13237 * proc-service.c (ps_pglobal_lookup): Use
13238 thread_db_look_up_one_symbol.
13239 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13240 parameter. Use it instead of all_symbols_looked_up.
13241 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13242 field.
13243 (all_symbols_looked_up): Don't declare.
13244 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13245 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13246 field.
13247 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13248 Set all_symbols_looked_up here.
13249 (thread_db_look_up_one_symbol): New.
13250 (thread_db_get_tls_address): Adjust.
13251 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13252 thread_db object on the heap, and tentatively set it in the
13253 process structure.
13254 (thread_db_init): Don't set all_symbols_looked_up here.
13255 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13256
13257 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13258
13259 * linux-low.c (linux_kill, linux_detach): Adjust.
13260 (status_pending_p_callback): Remove redundant statement. Check
13261 for !TARGET_WAITIKIND_IGNORE, instead of
13262 TARGET_WAITKIND_STOPPED.
13263 (handle_tracepoints): Make sure LWP is locked. Adjust.
13264 (linux_wait_for_event_1): Adjust.
13265 (linux_cancel_breakpoints): New.
13266 (unsuspend_one_lwp): New.
13267 (unsuspend_all_lwps): New.
13268 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13269 (send_sigstop_callback): Change return type to int, add new
13270 `except' parameter and handle it.
13271 (suspend_and_send_sigstop_callback): New.
13272 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13273 pass them down. If SUSPEND, also increment the lwp's suspend
13274 count.
13275 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13276 (need_step_over_p): Don't consider suspended LWPs.
13277 (start_step_over): Adjust.
13278 (proceed_one_lwp): Change return type to int, add new `except'
13279 parameter and handle it.
13280 (unsuspend_and_proceed_one_lwp): New.
13281 (proceed_all_lwps): Use find_inferior instead of
13282 for_each_inferior.
13283 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13284 also decrement the suspend count of LWPs. Pass `except' down,
13285 instead of hacking its suspend count.
13286 (linux_pause_all): Add `freeze' parameter. Adjust.
13287 (linux_unpause_all): New.
13288 (linux_target_ops): Install linux_unpause_all.
13289 * server.c (handle_status): Adjust.
13290 * target.h (struct target_ops): New fields `unpause_all' and
13291 `cancel_breakpoints'. Add new parameter to `pause_all'.
13292 (pause_all): Add new `freeze' parameter.
13293 (unpause_all): New.
13294 (cancel_breakpoints): New.
13295 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13296 cancel breakpoints.
13297 (cmd_qtstart): Pause threads.
13298 (stop_tracing): Pause threads, and cancel breakpoints.
13299 * win32-low.c (win32_target_ops): Adjust.
13300
13301 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13302
13303 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13304 the inferior right away from here...
13305 (linux_wait_1): ... to here, and adjust to check the thread's
13306 last_resume_kind instead of the lwp's step or stop_expected flags.
13307
13308 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13309
13310 * README: Use consistent `GDB' and `GDBserver' spellings.
13311
13312 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13313
13314 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13315 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13316 (linux_detach_one_lwp): Assume the lwp is stopped.
13317 (any_thread_of): Delete.
13318 (linux_detach): Stop all lwps here. Don't blindly delete all
13319 breakpoints.
13320 (delete_lwp_callback): New.
13321 (linux_mourn): Delete all lwps of the process that is gone.
13322 (linux_wait_1): Don't delete the last lwp of the process here.
13323 * mem-break.h (mark_breakpoints_out): Declare.
13324 * mem-break.c (mark_breakpoints_out): New.
13325 (free_all_breakpoints): Use it.
13326 * server.c (handle_target_event): If the process is gone, mark
13327 breakpoints out.
13328 * thread-db.c (struct thread_db) <create_bp>: New field.
13329 (thread_db_enable_reporting): Fix prototype. Store a thread event
13330 breakpoint reference in the thread_db struct.
13331 (thread_db_load_search): Clear the thread_db object.
13332 (try_thread_db_load_1): Ditto.
13333 (switch_to_process): New.
13334 (disable_thread_event_reporting): Use it.
13335 (remove_thread_event_breakpoints): New.
13336 (thread_db_detach, thread_db_mourn): Use it.
13337
13338 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13339
13340 * linux-low.c (linux_enable_event_reporting): New.
13341 (linux_wait_for_event_1, handle_extended_wait): Use it.
13342
13343 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13344
13345 * linux-low.c (linux_kill_one_lwp, linux_kill)
13346 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13347 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13348 SIGSTOP even if the LWP is stopped.
13349 (send_sigstop_callback): New.
13350 (stop_all_lwps): Use send_sigstop_callback instead.
13351 (linux_resume_one_thread): Adjust.
13352 (proceed_one_lwp): Still proceed an LWP that the client has
13353 requested to stop, if we haven't reported it as stopped yet. Make
13354 sure that LWPs the client want stopped, have a pending SIGSTOP.
13355
13356 2010-04-26 Doug Evans <dje@google.com>
13357
13358 * server.c (handle_general_set): Make static.
13359
13360 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13361 Print received char after testing for error/eof instead of before.
13362 (input_interrupt): Tweak comment.
13363
13364 2010-04-23 Doug Evans <dje@google.com>
13365
13366 * server.c (start_inferior): Print inferior argv if --debug.
13367
13368 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13369
13370 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13371 * nto-x86-low.c: Include server.h
13372
13373 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13374
13375 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13376 be consistent with other sources of this directory.
13377 (init_registers_amd64): Correct name of source file of this function
13378 in the comment.
13379
13380 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13381
13382 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13383 64-bit executables.
13384
13385 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13386
13387 * win32-i386-low.c: Add 64-bit support.
13388 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13389 (init_registers_amd64): Declare.
13390 (mappings): Add 64-bit version of array.
13391 (init_windows_x86): New function.
13392 (the_low_target): Change init_arch field to init_windows_x86.
13393
13394 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13395
13396 * win32-low.c: Adapt to support also 64-bit architecture.
13397 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13398 (get_image_name): Use SIZE_T type for local variable `done'.
13399 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13400 (toolhelp_get_dll_name): Idem.
13401 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13402 Use uintptr_t typecast to avoid warning.
13403 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13404 (handle_exception): Use phex_nz to avoid warning.
13405 (win32_wait): Remove unused local variable `process'.
13406
13407 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13408
13409 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13410 `amd64-avx.o'.
13411
13412 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13413
13414 * configure.ac: Use `ws2_32' library for srv_mingw.
13415 * configure: Regenerate.
13416 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13417 * remote-utils.c: Likewise.
13418
13419 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13420
13421 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13422 if __x86_64__ is defined.
13423
13424 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13425
13426 * configure: Regenerate.
13427
13428 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13429
13430 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13431 * target.h (target_ops): New get_tib_address field.
13432 * win32-low.h (win32_thread_info): Add thread_local_base field.
13433 * win32-low.c (child_add_thread): Add tlb argument.
13434 Set thread_local_base field to TLB.
13435 (get_child_debug_event): Adapt to child_add_thread change.
13436 (win32_get_tib_address): New function.
13437 (win32_target_ops): Set get_tib_address field to
13438 win32_get_tib_address.
13439 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13440
13441 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13442
13443 * linux-low.c (linux_mourn): Also remove the process.
13444 * server.c (handle_target_event): Don't remove the process here.
13445 * nto-low.c (nto_mourn): New.
13446 (nto_target_ops): Install it.
13447 * spu-low.c (spu_mourn): New.
13448 (spu_target_ops): Install it.
13449 * win32-low.c (win32_mourn): New.
13450 (win32_target_ops): Install it.
13451
13452 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13453
13454 * server.h (buffer_xml_printf): Remove redundant `;'.
13455
13456 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13457
13458 * regcache.c (set_register_cache): Invalidate regcaches before
13459 changing the register cache layout.
13460 (regcache_invalidate_one): Allow a NULL regcache.
13461 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13462 regcaches before changing the register cache layout or the target
13463 regsets.
13464
13465 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13466
13467 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13468 variable warning on Linux/x86-64.
13469
13470 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13471
13472 GDBserver disconnected tracing support.
13473
13474 * linux-low.c (linux_remove_process): Delete.
13475 (add_lwp): Don't set last_resume_kind here.
13476 (linux_kill): Use `mourn'.
13477 (linux_detach): Use `thread_db_detach', and `mourn'.
13478 (linux_mourn): New.
13479 (linux_attach_lwp_1): Adjust comment.
13480 (linux_attach): last_resume_kind moved the thread_info; adjust.
13481 (status_pending_p_callback): Adjust.
13482 (linux_wait_for_event_1): Adjust.
13483 (count_events_callback, select_singlestep_lwp_callback)
13484 (select_event_lwp_callback, cancel_breakpoints_callback)
13485 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13486 (proceed_one_lwp): Adjust.
13487 (linux_async): Add debug output.
13488 (linux_thread_stopped): New.
13489 (linux_pause_all): New.
13490 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13491 linux_pause_all.
13492 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13493 (thread_db_free): Delete declaration.
13494 (thread_db_detach, thread_db_mourn): Declare.
13495 * thread-db.c (thread_db_init): Use thread_db_mourn.
13496 (thread_db_free): Delete, split in two.
13497 (disable_thread_event_reporting): New.
13498 (thread_db_detach): New.
13499 (thread_db_mourn): New.
13500
13501 * server.h (struct thread_info) <last_resume_kind>: New field.
13502 <attached>: Add comment.
13503 <gdb_detached>: New field.
13504 (handler_func): Change return type to int.
13505 (handle_serial_event, handle_target_event): Ditto.
13506 (gdb_connected): Declare.
13507 (tracing): Delete.
13508 (disconnected_tracing): Declare.
13509 (stop_tracing): Declare.
13510
13511 * server.c (handle_query) <qSupported>: Report support for
13512 disconnected tracing.
13513 (queue_stop_reply_callback): Account for running threads.
13514 (gdb_wants_thread_stopped): New.
13515 (gdb_wants_all_threads_stopped): New.
13516 (gdb_reattached_process): New.
13517 (handle_status): Clear the `gdb_detached' flag of all processes.
13518 In all-stop, stop all threads.
13519 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13520 (process_serial_event): If the remote connection breaks, or if an
13521 exit was forced with "monitor exit", force an event loop exit.
13522 Handle disconnected tracing on detach.
13523 (handle_serial_event): Adjust.
13524 (handle_target_event): If GDB isn't connected, forward events back
13525 to the inferior, unless the last process exited, in which case,
13526 exit gdbserver. Adjust interface.
13527
13528 * remote-utils.c (remote_open): Don't block in accept. Instead
13529 register an event loop source on the listen socket file
13530 descriptor. Refactor bits into ...
13531 (listen_desc): ... this new global.
13532 (gdb_connected): ... this new function.
13533 (enable_async_notification): ... this new function.
13534 (handle_accept_event): ... this new function.
13535 (remote_close): Clear remote_desc.
13536
13537 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13538
13539 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13540 New fields.
13541 (mourn_inferior): Define.
13542 (target_process_qsupported): Avoid the dangling else problem.
13543 (thread_stopped): Define.
13544 (pause_all): Define.
13545 (target_waitstatus_to_string): Declare.
13546 * target.c (target_waitstatus_to_string): New.
13547
13548 * tracepoint.c (tracing): Make extern.
13549 (disconnected_tracing): New.
13550 (stop_tracing): Make extern. Handle tracing stops due to GDB
13551 disconnecting.
13552 (cmd_qtdisconnected): New.
13553 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13554 (handle_tracepoint_general_set): Handle QTDisconnected.
13555
13556 * event-loop.c (event_handler_func): Change return type to int.
13557 (process_event): Bail out if the event handler wants the event
13558 loop to stop.
13559 (handle_file_event): Ditto.
13560 (start_event_loop): Bail out if the event handler wants the event
13561 loop to stop.
13562
13563 * nto-low.c (nto_target_ops): Adjust.
13564 * spu-low.c (spu_wait): Don't remove the process here.
13565 (spu_target_ops): Adjust.
13566 * win32-low.c (win32_wait): Don't remove the process here.
13567 (win32_target_ops): Adjust.
13568
13569 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13570
13571 * regcache.c (realloc_register_cache): Invalidate inferior's
13572 regcache before recreating it.
13573
13574 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13575
13576 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13577
13578 2010-04-09 Stan Shebs <stan@codesourcery.com>
13579 Pedro Alves <pedro@codesourcery.com>
13580
13581 * server.h (LONGEST): New.
13582 (struct thread_info) <while_stepping>: New field.
13583 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13584 Declare.
13585 (initialize_tracepoint, handle_tracepoint_general_set)
13586 (handle_tracepoint_query, tracepoint_finished_step)
13587 (tracepoint_was_hit, release_while_stepping_state_list):
13588 (current_traceframe): Declare.
13589 * server.c (handle_general_set): Handle tracepoint packets.
13590 (read_memory): New.
13591 (write_memory): New.
13592 (handle_search_memory_1): Use read_memory.
13593 (handle_query): Report support for conditional tracepoints, trace
13594 state variables, and tracepoint sources. Handle tracepoint
13595 queries.
13596 (main): Initialize the tracepoints module.
13597 (process_serial_event): Handle traceframe reads/writes.
13598
13599 * linux-low.c (handle_tracepoints): New.
13600 (linux_wait_1): Call it.
13601 (linux_resume_one_lwp): Handle while-stepping.
13602 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13603 (linux_target_ops): Install them.
13604 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13605 New field.
13606 * linux-x86-low.c (x86_supports_tracepoints): New.
13607 (the_low_target). Install it.
13608
13609 * mem-break.h (delete_breakpoint): Declare.
13610 * mem-break.c (delete_breakpoint): Make external.
13611
13612 * target.h (struct target_ops): Add `supports_tracepoints',
13613 `read_pc', and `write_pc' fields.
13614 (target_supports_tracepoints): Define.
13615 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13616 (phex_nz): New.
13617
13618 * regcache.h (struct regcache) <registers_owned>: New field.
13619 (init_register_cache, regcache_cpy): Declare.
13620 (regcache_read_pc, regcache_write_pc): Declare.
13621 (register_cache_size): Declare.
13622 (supply_regblock): Declare.
13623 * regcache.c (init_register_cache): New.
13624 (new_register_cache): Use it.
13625 (regcache_cpy): New.
13626 (register_cache_size): New.
13627 (supply_regblock): New.
13628 (regcache_read_pc, regcache_write_pc): New.
13629
13630 * tracepoint.c: New.
13631
13632 * Makefile.in (OBS): Add tracepoint.o.
13633 (tracepoint.o): New rule.
13634
13635 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13636
13637 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13638 (i386-mmx.o): New.
13639 (i386-mmx.c): Likewise.
13640 (i386-mmx-linux.o): Likewise.
13641 (i386-mmx-linux.c): Likewise.
13642
13643 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13644 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13645 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13646 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13647
13648 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13649 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13650 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13651
13652 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13653
13654 * Makefile.in (clean): Updated.
13655 (i386-avx.o): New.
13656 (i386-avx.c): Likewise.
13657 (i386-avx-linux.o): Likewise.
13658 (i386-avx-linux.c): Likewise.
13659 (amd64-avx.o): Likewise.
13660 (amd64-avx.c): Likewise.
13661 (amd64-avx-linux.o): Likewise.
13662 (amd64-avx-linux.c): Likewise.
13663
13664 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13665 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13666 (srv_amd64_regobj): Add amd64-avx.o.
13667 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13668 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13669 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13670 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13671 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13672 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13673 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13674
13675 * i387-fp.c: Include "i386-xstate.h".
13676 (i387_xsave): New.
13677 (i387_cache_to_xsave): Likewise.
13678 (i387_xsave_to_cache): Likewise.
13679 (x86_xcr0): Likewise.
13680
13681 * i387-fp.h (i387_cache_to_xsave): Likewise.
13682 (i387_xsave_to_cache): Likewise.
13683 (x86_xcr0): Likewise.
13684
13685 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13686 * linux-crisv32-low.c (target_regsets): Likewise.
13687 * linux-m68k-low.c (target_regsets): Likewise.
13688 * linux-mips-low.c (target_regsets): Likewise.
13689 * linux-ppc-low.c (target_regsets): Likewise.
13690 * linux-s390-low.c (target_regsets): Likewise.
13691 * linux-sh-low.c (target_regsets): Likewise.
13692 * linux-sparc-low.c (target_regsets): Likewise.
13693 * linux-xtensa-low.c (target_regsets): Likewise.
13694
13695 * linux-low.c: Include <sys/uio.h>.
13696 (regsets_fetch_inferior_registers): Support nt_type.
13697 (regsets_store_inferior_registers): Likewise.
13698 (linux_process_qsupported): New.
13699 (linux_target_ops): Add linux_process_qsupported.
13700
13701 * linux-low.h (regset_info): Add nt_type.
13702 (linux_target_ops): Add process_qsupported.
13703
13704 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13705 and <sys/uio.h>.
13706 (init_registers_i386_avx_linux): New.
13707 (init_registers_amd64_avx_linux): Likewise.
13708 (xmltarget_i386_linux_no_xml): Likewise.
13709 (xmltarget_amd64_linux_no_xml): Likewise.
13710 (PTRACE_GETREGSET): Likewise.
13711 (PTRACE_SETREGSET): Likewise.
13712 (x86_fill_xstateregset): Likewise.
13713 (x86_store_xstateregset): Likewise.
13714 (use_xml): Likewise.
13715 (x86_linux_update_xmltarget): Likewise.
13716 (x86_linux_process_qsupported): Likewise.
13717 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13718 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13719 init_registers_i386_linux here. Call
13720 x86_linux_update_xmltarget.
13721 (the_low_target): Add x86_linux_process_qsupported.
13722
13723 * server.c (handle_query): Call target_process_qsupported.
13724
13725 * target.h (target_ops): Add process_qsupported.
13726 (target_process_qsupported): New.
13727
13728 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13729
13730 * inferiors.c (add_thread): Set last_status kind to
13731 TARGET_WAITKIND_IGNORE.
13732 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13733 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13734 (linux_wait_1): Move `thread' local definition to block that uses
13735 it. Don't NULL initialize `event_child'.
13736 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13737 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13738 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13739
13740 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13741
13742 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13743 an extended waitstatus, or by a watchpoint.
13744 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13745 thread was stepping or has been stopped by a watchpoint.
13746
13747 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13748
13749 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13750 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13751 of another, then delete the previous, and validate all
13752 breakpoints.
13753 (validate_inserted_breakpoint): New.
13754 (delete_disabled_breakpoints): New.
13755 (validate_breakpoints): New.
13756 (check_mem_read): Validate breakpoints before trusting their
13757 shadow. Delete disabled breakpoints.
13758 (check_mem_write): Validate breakpoints before trusting they
13759 should be inserted. Delete disabled breakpoints.
13760 * mem-break.h (validate_breakpoints):
13761 * server.c (handle_query): Validate breakpoints when we see a
13762 qSymbol query.
13763
13764 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13765
13766 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13767 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13768 if we could tell there's a GDB breakpoint at stop_pc.
13769 (need_step_over_p): Don't do a step over if we find a GDB
13770 breakpoint at the resume PC.
13771
13772 * mem-break.c (struct raw_breakpoint): New.
13773 (enum bkpt_type): New type `gdb_breakpoint'.
13774 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13775 fields. New field `raw'.
13776 (find_raw_breakpoint_at): New.
13777 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13778 breakpoint instead.
13779 (set_breakpoint_at): Adjust.
13780 (delete_raw_breakpoint): New.
13781 (release_breakpoint): New.
13782 (delete_breakpoint): Rename to...
13783 (delete_breakpoint_1): ... this. Add proc parameter. Use
13784 release_breakpoint. Return ENOENT.
13785 (delete_breakpoint): Reimplement.
13786 (find_breakpoint_at): Delete.
13787 (find_gdb_breakpoint_at): New.
13788 (delete_breakpoint_at): Delete.
13789 (set_gdb_breakpoint_at): New.
13790 (delete_gdb_breakpoint_at): New.
13791 (gdb_breakpoint_here): New.
13792 (set_reinsert_breakpoint): Use release_breakpoint.
13793 (uninsert_breakpoint): Rename to ...
13794 (uninsert_raw_breakpoint): ... this.
13795 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13796 (reinsert_raw_breakpoint): Change parameter type to
13797 raw_breakpoint.
13798 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13799 instead.
13800 (check_breakpoints): Adjust. Use release_breakpoint.
13801 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13802 (breakpoint_inserted_here): Ditto.
13803 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13804 Don't trust the breakpoint's shadow if it is not inserted.
13805 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13806 (delete_all_breakpoints): Adjust.
13807 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13808 use delete_breakpoint_1.
13809
13810 * mem-break.h (breakpoints_supported): Delete declaration.
13811 (set_gdb_breakpoint_at): Declare.
13812 (gdb_breakpoint_here): Declare.
13813 (delete_breakpoint_at): Delete.
13814 (delete_gdb_breakpoint_at): Declare.
13815
13816 * server.h (struct raw_breakpoint): Forward declare.
13817 (struct process_info): New field `raw_breakpoints'.
13818
13819 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13820 breakpoints.
13821
13822 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13823
13824 * linux-low.c (status_pending_p_callback): Fix comment.
13825 (linux_wait_for_event_1): Move most of the internal breakpoint
13826 handling from here...
13827 (linux_wait_1): ... to here.
13828 (count_events_callback): New.
13829 (select_singlestep_lwp_callback): New.
13830 (select_event_lwp_callback): New.
13831 (cancel_breakpoints_callback): New.
13832 (select_event_lwp): New.
13833 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13834 priority to all LWPs that have had events that should be reported
13835 to the client. Cancel breakpoints when about to reporting the
13836 event to the client, not while stopping lwps. No longer cancel
13837 finished single-steps here.
13838 (cancel_finished_single_step): Delete.
13839 (cancel_finished_single_steps): Delete.
13840
13841 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13842
13843 * mem-break.c (enum bkpt_type): New.
13844 (struct breakpoint): New field `type'.
13845 (set_breakpoint_at): Change return type to struct breakpoint
13846 pointer. Set type to `other_breakpoint' by default.
13847 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13848 in the breakpoint list.
13849 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13850 (reinsert_breakpoint): Rename to ...
13851 (reinsert_raw_breakpoint): ... this.
13852 (reinsert_breakpoints_at): Adjust.
13853 * mem-break.h (struct breakpoint): Declare.
13854 (set_breakpoint_at): Change return type to struct breakpoint
13855 pointer.
13856
13857 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13858
13859 * server.c (handle_query): Assign, not compare.
13860
13861 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13862
13863 Teach linux gdbserver to step-over-breakpoints.
13864
13865 * linux-low.c (can_hardware_single_step): New.
13866 (supports_breakpoints): New.
13867 (handle_extended_wait): If stopping threads, read the stop pc of
13868 the new cloned LWP.
13869 (get_pc): New.
13870 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13871 low target doesn't support retrieving the PC.
13872 (add_lwp): Set last_resume_kind to resume_continue.
13873 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13874 (linux_attach): Don't clear stop_expected. Set the lwp's
13875 last_resume_kind to resume_stop.
13876 (linux_detach_one_lwp): Don't check for removed breakpoints.
13877 (check_removed_breakpoint): Delete.
13878 (status_pending_p): Rename to ...
13879 (status_pending_p_callback): ... this. Don't check for removed
13880 breakpoints. Don't consider threads that are stopped from GDB's
13881 perspective.
13882 (linux_wait_for_lwp): Always read the stop_pc here.
13883 (cancel_breakpoint): New.
13884 (step_over_bkpt): New global.
13885 (linux_wait_for_event_1): Implement stepping over breakpoints.
13886 (gdb_wants_lwp_stopped): New.
13887 (gdb_wants_all_stopped): New.
13888 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13889 single-step traps here. Store the thread's last reported target
13890 wait status.
13891 (send_sigstop): Don't clear stop_expected. Always set it,
13892 instead.
13893 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13894 (cancel_finished_single_step): New.
13895 (cancel_finished_single_steps): New.
13896 (wait_for_sigstop): Don't cancel finished single-step traps here.
13897 (linux_resume_one_lwp): Don't check for removed breakpoints.
13898 Don't set `step' on non-hardware step archs.
13899 (linux_set_resume_request): Ignore resume_stop requests if already
13900 stopping or stopped. Set the lwp's last_resume_kind.
13901 (resume_status_pending_p): Don't check for removed breakpoints.
13902 (need_step_over_p): New.
13903 (start_step_over): New.
13904 (finish_step_over): New.
13905 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13906 requests. Clear the thread's last reported target waitstatus.
13907 Don't use the `suspended' flag. Don't consider pending breakpoints.
13908 (linux_resume): Start a step-over if necessary.
13909 (proceed_one_lwp): New.
13910 (proceed_all_lwps): New.
13911 (unstop_all_lwps): New.
13912 * linux-low.h (struct lwp_info): Rewrite comment for the
13913 `suspended' flag. Add the `stop_pc' field. Delete the
13914 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13915 Add `'last_resume_kind' and `need_step_over' fields.
13916 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13917 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13918 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13919 (set_raw_breakpoint_at): New.
13920 (set_breakpoint_at): Rewrite to use it.
13921 (reinsert_breakpoint_handler): Delete.
13922 (set_reinsert_breakpoint): New.
13923 (reinsert_breakpoint_by_bp): Delete.
13924 (delete_reinsert_breakpoints): New.
13925 (uninsert_breakpoint): Rewrite.
13926 (uninsert_breakpoints_at): New.
13927 (reinsert_breakpoint): Rewrite.
13928 (reinsert_breakpoints_at): New.
13929 (check_breakpoints): Rewrite.
13930 (breakpoint_here): New.
13931 (breakpoint_inserted_here): New.
13932 (check_mem_read): Adjust.
13933 * mem-break.h (breakpoints_supported, breakpoint_here)
13934 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13935 (reinsert_breakpoint_by_bp): Delete declaration.
13936 (delete_reinsert_breakpoints): Declare.
13937 (reinsert_breakpoint): Delete declaration.
13938 (reinsert_breakpoints_at): Declare.
13939 (uninsert_breakpoint): Delete declaration.
13940 (uninsert_breakpoints_at): Declare.
13941 (check_breakpoints): Adjust prototype.
13942 * server.h: Adjust include order.
13943 (struct thread_info): Declare here. Add a `last_status' field.
13944
13945 2010-03-23 Michael Snyder <msnyder@vmware.com>
13946
13947 * server.c (crc32): New function.
13948 (handle_query): Add handling for 'qCRC:' request.
13949
13950 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13951
13952 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13953 lwp had been stopped by a watchpoint.
13954
13955 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13956
13957 * server.h (internal_error): Declare.
13958 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13959 * utils.c (internal_error): New function.
13960
13961 2010-03-15 Andreas Schwab <schwab@redhat.com>
13962
13963 * configure.srv: Fix typo setting srv_regobj.
13964
13965 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13966
13967 * linux-low.c (fetch_register): Avoid passing a non string literal
13968 format to `error'.
13969 (usr_store_inferior_registers): Ditto.
13970
13971 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13972
13973 * linux-low.c (linux_write_memory): Bail out early if peeking
13974 memory failed.
13975
13976 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13977
13978 * linux-low.h (struct lwp_info): New fields
13979 `stopped_by_watchpoint' and `stopped_data_address'.
13980 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13981 here, and cache them in the lwp object.
13982 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13983 directly.
13984 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13985 field.
13986 (linux_stopped_by_watchpoint): Rewrite.
13987 (linux_stopped_data_address): Rewrite.
13988
13989 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13990
13991 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13992 switching the current inferior, not before.
13993
13994 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13995
13996 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13997 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13998 i386-linux.c and amd64-linux.c.
13999 (reg-i386.o): Removed.
14000 (reg-i386.c): Likewise.
14001 (reg-i386-linux.o): Likewise.
14002 (reg-i386-linux.c): Likewise.
14003 (reg-x86-64.o): Likewise.
14004 (reg-x86-64.c): Likewise.
14005 (reg-x86-64-linux.o): Likewise.
14006 (reg-x86-64-linux.c): Likewise.
14007 (i386.o): New.
14008 (i386.c): Likewise.
14009 (i386-linux.o): Likewise.
14010 (i386-linux.c): Likewise.
14011 (amd64.o): Likewise.
14012 (amd64.c): Likewise.
14013 (amd64-linux.o): Likewise.
14014 (amd64-linux.c): Likewise.
14015
14016 * configure.srv (srv_i386_regobj): New.
14017 (srv_i386_linux_regobj): Likewise.
14018 (srv_amd64_regobj): Likewise.
14019 (srv_amd64_linux_regobj): Likewise.
14020 (srv_i386_32bit_xmlfiles): Likewise.
14021 (srv_i386_64bit_xmlfiles): Likewise.
14022 (srv_i386_xmlfiles): Likewise.
14023 (srv_amd64_xmlfiles): Likewise.
14024 (srv_i386_linux_xmlfiles): Likewise.
14025 (srv_amd64_linux_xmlfiles): Likewise.
14026 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14027 srv_xmlfiles to $srv_i386_xmlfiles.
14028 (i[34567]86-*-mingw32ce*): Likewise.
14029 (i[34567]86-*-mingw*): Likewise.
14030 (i[34567]86-*-nto*): Likewise.
14031 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14032 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14033 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14034 (x86_64-*-linux*): Likewise.
14035
14036 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14037 (init_registers_amd64_linux): New.
14038 (x86_arch_setup): Replace init_registers_x86_64_linux with
14039 init_registers_amd64_linux.
14040
14041 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14042
14043 * configure.ac: Check for libdl. If it is not available link against
14044 static libthread_db.
14045 * configure: Regenerate.
14046
14047 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14048
14049 PR9605
14050
14051 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14052 handing a read watchpoint.
14053 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14054
14055 2010-02-12 Doug Evans <dje@google.com>
14056
14057 * linux-low.c (linux_supports_tracefork_flag): Document.
14058 (linux_look_up_symbols): Add comment.
14059
14060 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14061
14062 * regcache.c (supply_register): Clear regcache if buf is NULL.
14063
14064 2010-02-02 Nicolas Roche <roche@sourceware.org>
14065 Joel Brobecker <brobecker@adacore.com>
14066
14067 * inferiors.c (find_inferior): Add function documentation.
14068 (unloaded_dll): Handle the case where the unloaded dll has not
14069 been previously registered in the dll list.
14070
14071 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14072
14073 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14074 (thumb2_breakpoint): New.
14075 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14076
14077 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14078
14079 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14080 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14081 breakpoints.
14082
14083 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14084
14085 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14086
14087 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14088
14089 * linux-s390-low.c (s390_collect_ptrace_register)
14090 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14091
14092 2010-01-21 Doug Evans <dje@google.com>
14093
14094 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14095 (PTRACE_ARG4_TYPE): New macro.
14096 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14097 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14098 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14099 (usr_store_inferior_registers): Ditto.
14100 (linux_read_memory, linux_write_memory): Ditto.
14101 (linux_test_for_tracefork): Ditto.
14102
14103 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14104 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14105
14106 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14107
14108 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14109 target.
14110
14111 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14112
14113 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14114 prototype to take a regcache. Adjust.
14115
14116 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14117
14118 * regcache.h (struct thread_info): Forward declare.
14119 (struct regcache): New.
14120 (new_register_cache): Adjust prototype.
14121 (get_thread_regcache): Declare.
14122 (free_register_cache): Adjust prototype.
14123 (registers_to_string, registers_from_string): Ditto.
14124 (supply_register, supply_register_by_name, collect_register)
14125 (collect_register_as_string, collect_register_by_name): Ditto.
14126 * regcache.c (struct inferior_regcache_data): Delete.
14127 (get_regcache): Rename to ...
14128 (get_thread_regcache): ... this. Adjust. Switch inferior before
14129 fetching registers.
14130 (regcache_invalidate_one): Adjust.
14131 (regcache_invalidate): Fix prototype.
14132 (new_register_cache): Return the new register cache.
14133 (free_register_cache): Change prototype.
14134 (realloc_register_cache): Adjust.
14135 (registers_to_string): Change prototype to take a regcache. Adjust.
14136 (registers_from_string): Ditto.
14137 (register_data): Ditto.
14138 (supply_register): Ditto.
14139 (supply_register_by_name): Ditto.
14140 (collect_register): Ditto.
14141 (collect_register_as_string): Ditto.
14142 (collect_register_by_name): Ditto.
14143 * server.c (process_serial_event): Adjust.
14144 * linux-low.h (regset_fill_func, regset_store_func): Change
14145 prototype.
14146 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14147 Change prototype.
14148 * linux-low.c (get_stop_pc): Adjust.
14149 (check_removed_breakpoint): Adjust.
14150 (linux_wait_for_event): Adjust.
14151 (linux_resume_one_lwp): Adjust.
14152 (fetch_register): Add regcache parameter. Adjust.
14153 (usr_store_inferior_registers): Ditto.
14154 (regsets_fetch_inferior_registers): Ditto.
14155 (regsets_store_inferior_registers): Ditto.
14156 (linux_fetch_registers, linux_store_registers): Ditto.
14157 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14158 regcache. Adjust.
14159 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14160 Ditto.
14161 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14162 prototype to take a regcache.
14163 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14164 * remote-utils.c (convert_ascii_to_int, outreg)
14165 (prepare_resume_reply): Change prototype to take a regcache.
14166 Adjust.
14167 * target.h (struct target_ops) <fetch_registers, store_registers>:
14168 Change prototype to take a regcache.
14169 (fetch_inferior_registers, store_inferior_registers): Change
14170 prototype to take a regcache. Adjust.
14171 * proc-service.c (ps_lgetregs): Adjust.
14172 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14173 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14174 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14175 take a regcache. Adjust.
14176 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14177 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14178 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14179 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14180 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14181 (cris_cannot_fetch_register):
14182 (cris_breakpoint_at): Change prototype to take a regcache.
14183 Adjust.
14184 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14185 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14186 to take a regcache. Adjust.
14187 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14188 Adjust.
14189 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14190 take a regcache. Adjust.
14191 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14192 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14193 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14194 * linux-mips-low.c (mips_get_pc):
14195 (mips_set_pc): Change prototype to take a regcache. Adjust.
14196 (mips_reinsert_addr): Adjust.
14197 (mips_collect_register): Change prototype to take a regcache.
14198 Adjust.
14199 (mips_supply_register):
14200 (mips_collect_register_32bit, mips_supply_register_32bit)
14201 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14202 (mips_store_fpregset): Ditto.
14203 * linux-ppc-low.c (ppc_supply_ptrace_register)
14204 (ppc_supply_ptrace_register): Ditto.
14205 (parse_spufs_run): Adjust.
14206 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14207 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14208 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14209 take a regcache. Adjust.
14210 * linux-s390-low.c (s390_collect_ptrace_register)
14211 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14212 (s390_set_pc): Change prototype to take a regcache. Adjust.
14213 (s390_arch_setup): Adjust.
14214 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14215 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14216 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14217 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14218 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14219 regcache. Adjust.
14220 (sparc_breakpoint_at): Adjust.
14221 * linux-xtensa-low.c (xtensa_fill_gregset):
14222 (xtensa_store_gregset):
14223 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14224 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14225 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14226 prototype to take a regcache. Adjust.
14227 * win32-arm-low.c (arm_fetch_inferior_register)
14228 (arm_store_inferior_register): Change prototype to take a
14229 regcache. Adjust.
14230 * win32-i386-low.c (i386_fetch_inferior_register)
14231 (i386_store_inferior_register): Change prototype to take a
14232 regcache. Adjust.
14233 * win32-low.c (child_fetch_inferior_registers)
14234 (child_store_inferior_registers): Change prototype to take a
14235 regcache. Adjust.
14236 (win32_wait): Adjust.
14237 (win32_fetch_inferior_registers): Change prototype to take a
14238 regcache. Adjust.
14239 (win32_store_inferior_registers): Adjust.
14240 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14241 store_inferior_register>: Change prototype to take a regcache.
14242
14243 2010-01-20 Doug Evans <dje@google.com>
14244
14245 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14246 #ifdef.
14247 (linux_wait_for_event1, linux_init_signals): Ditto.
14248 (W_STOPCODE): Provide definition if missing.
14249
14250 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14251
14252 * linux-low.c (linux_core_of_thread): New.
14253 (compare_ints, show_process, list_threads): New.
14254 (linux_qxfer_osdata): Report threads and cores.
14255 (linux_target_op): Register linux_core_of_thread.
14256 * remote-utils.c (prepare_resume_reply): Report the core.
14257 (buffer_xml_printf): Support %d specifier.
14258 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14259 New.
14260 (handle_query): Handle qXfer:threads. Announce availability
14261 thereof.
14262 * target.h (struct target_ops): New field core_of_thread.
14263
14264 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14265
14266 * Makefile.in (clean): Remove new generated files.
14267 (reg-s390.o, reg-s390.c): Remove rules.
14268 (reg-s390x.o, reg-s390x.c): Likewise.
14269 (s390-linux32.o, s390-linux32.c): Add rules.
14270 (s390-linux64.o, s390-linux64.c): Likewise.
14271 (s390x-linux64.o, s390x-linux64.c): Likewise.
14272 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14273 * linux-s390-low.c: Include <elf.h>.
14274 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14275 (init_registers_s390): Remove prototype.
14276 (init_registers_s390x): Likewise.
14277 (init_registers_s390_linux32): Add prototype.
14278 (init_registers_s390_linux64): Likewise.
14279 (init_registers_s390x_linux64): Likewise.
14280 (s390_num_regs_3264): New define.
14281 (s390_regmap_3264): New global variable.
14282 (s390_cannot_fetch_register): Remove obsolete check.
14283 (s390_cannot_store_register): Likewise.
14284 (s390_collect_ptrace_register): Handle upper/lower register halves.
14285 (s390_supply_ptrace_register): Likewise.
14286 (s390_fill_gregset): Update to register number changes.
14287 (s390_get_hwcap): New routine.
14288 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14289 Install appropriate regmap and register set.
14290
14291 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14292
14293 * server.c (gdbserver_version): Update copyright year to 2010.
14294 * gdbreplay.c (gdbreplay_version): Likewise.
14295
14296 2009-12-28 Doug Evans <dje@google.com>
14297
14298 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14299 elf/external.h. Include <elf.h> instead but only if necessary.
14300
14301 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14302
14303 * linux-low.c (linux_remove_process): Remove `detaching'
14304 parameter. Don't release/detach from thread_db here.
14305 (linux_kill): Release/detach from thread_db here, ...
14306 (linux_detach): ... and here, before actually detaching.
14307 (linux_wait_1): ... and here, when a process exits.
14308 * thread-db.c (any_thread_of): New.
14309 (thread_db_free): Switch the current inferior to a thread of the
14310 passed in process.
14311
14312 2009-12-21 Doug Evans <dje@google.com>
14313
14314 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14315
14316 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14317 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14318 warning ifndef __NR_tkill. Move setting of errno there too.
14319 Delete unnecessary resetting of errno after syscall.
14320 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14321
14322 * configure.ac: Check for dladdr.
14323 * config.in: Regenerate.
14324 * configure: Regenerate.
14325 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14326 (try_thread_db_load): Update.
14327
14328 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14329
14330 2009-12-18 Doug Evans <dje@google.com>
14331
14332 * event-loop.c: Include unistd.h if it exists.
14333
14334 * linux-low.c (my_waitpid): Move definition away from being in
14335 between linux_tracefork_child/linux_test_for_tracefork.
14336
14337 * gdb_proc_service.h (psaddr_t): Fix type.
14338 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14339 signature to match glibc.
14340
14341 2009-12-16 Doug Evans <dje@google.com>
14342
14343 * linux-low.c (linux_read_memory): Fix argument to read.
14344
14345 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14346
14347 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14348 events, don't leave current_inferior pointing at null.
14349
14350 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14351
14352 * win32-low.c (LOG): Delete.
14353 (OUTMSG): Output to stderr.
14354 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14355 on compile time LOG macro.
14356 (win32_wait): Fix debug output.
14357
14358 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14359
14360 * win32-low.c (win32_add_one_solib): If the dll name is
14361 "ntdll.dll", prepend the system directory to the dll path.
14362
14363 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14364
14365 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14366
14367 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14368 Vladimir Prus <vladimir@codesourcery.com>
14369
14370 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14371 * configure.ac: Check for __mcoldfire__ and set
14372 gdb_cv_m68k_is_coldfire.
14373 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14374 reg-cf.o and reg-m68k.o.
14375 * configure: Regenerated.
14376
14377 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14378
14379 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14380 Pass it to thread_db_free.
14381 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14382 proper `detaching' argument to linux_remove_process.
14383 * linux-low.h (thread_db_free): Add `detaching' parameter.
14384 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14385 to thread_db_free.
14386 (thread_db_free): Add `detaching' parameter. Only
14387 call td_ta_clear_event if detaching from process.
14388
14389 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14390
14391 * thread-db.c (thread_db_free): Fix typo.
14392
14393 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14394
14395 PR gdb/10838
14396 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14397
14398 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14399
14400 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14401 with an i686 compiler.
14402 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14403 needed.
14404 * configure: Rebuilt.
14405
14406 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14407
14408 PR gdb/10783
14409
14410 * server.c (handle_search_memory_1): Correct read_addr initialization
14411 in loop for searching subsequent chunks.
14412
14413 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14414
14415 * configure.ac: New --with-libthread-db option.
14416 * thread-db.c: Allow direct dependence on libthread_db.
14417 (thread_db_free): Adjust.
14418 * config.in: Regenerate.
14419 * configure: Likewise.
14420
14421 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14422
14423 PR gdb/10757
14424 * thread-db.c (attach_thread): New function.
14425 (maybe_attach_thread): Return success/failure.
14426 (find_new_threads_callback): Adjust.
14427 (thread_db_find_new_threads): Loop until no new threads.
14428
14429 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14430
14431 * proc-service.c (ps_lgetregs): Formatting.
14432
14433 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14434
14435 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14436 * configure.ac: Adjust.
14437 * linux-low.h (struct process_info_private): Move members to struct
14438 thread_db.
14439 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14440 * linux-low.c (linux_remove_process): Adjust.
14441 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14442 * server.c (handle_query): Move code ...
14443 (handle_monitor_command): ... here. New function.
14444 * target.h (struct target_ops): New member.
14445 * thread-db.c (struct thread_db): New.
14446 (libthread_db_search_path): New variable.
14447 (thread_db_create_event, thread_db_enable_reporting)
14448 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14449 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14450 (try_thread_db_load_1, dladdr_to_soname): New functions.
14451 (try_thread_db_load, thread_db_load_search): New functions.
14452 (thread_db_init): Search for libthread_db.
14453 (thread_db_free): New function.
14454 (thread_db_handle_monitor_command): Likewise.
14455 * config.in: Regenerate.
14456 * configure: Regenerate.
14457
14458 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14459
14460 * spu-low.c (spu_kill): Wait for inferior to terminate.
14461 Call clear_inferiors.
14462 (spu_detach): Call clear_inferiors.
14463
14464 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14465
14466 * aclocal.m4: Regenerate.
14467 * config.in: Likewise.
14468 * configure: Likewise.
14469
14470 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14471
14472 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14473 (parse_spufs_run): New function.
14474 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14475 (ppc_breakpoint_at): Handle SPU breakpoints.
14476
14477 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14478
14479 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14480 (SPUFS_MAGIC): Define.
14481 (spu_enumerate_spu_ids): New function.
14482 (linux_qxfer_spu): New function.
14483 (linux_target_ops): Install linux_qxfer_spu.
14484
14485 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14486
14487 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14488 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14489 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14490 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14491 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14492 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14493 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14494 (init_registers_powerpc_cell32l): Add prototype.
14495 (init_registers_powerpc_cell64l): Likewise.
14496 (ppc_arch_setup): Detect Cell/B.E. architecture.
14497
14498 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14499
14500 * Makefile.in (datarootdir): New variable.
14501
14502 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14503
14504 * linux-low.c (linux_write_memory): Update debugging output.
14505 * Makefile.in (clean): Add new descriptions.
14506 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14507 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14508 * configure.srv: Add new files for arm*-*-linux*.
14509 * linux-arm-low.c: Add new declarations.
14510 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14511 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14512 (HWCAP_VFPv3D16): New.
14513 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14514 instead of __IWMMXT__.
14515 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14516 (arm_arch_setup): New.
14517 (target_regsets): Remove #ifdef. Add VFP regset.
14518 (the_low_target): Use arm_arch_setup.
14519
14520 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14521
14522 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14523 the main thread again.
14524
14525 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14526
14527 Adding Neutrino gdbserver.
14528 * configure: Regenerated.
14529 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14530 * configure.srv (i[34567]86-*-nto*): New target.
14531 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14532 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14533 (nto_comctrl) [__QNX__]: New function.
14534 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14535
14536 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14537
14538 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14539 srv_tgtobj.
14540
14541 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14542 Pedro Alves <pedro@codesourcery.com>
14543
14544 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14545 don't support CONTEXT_EXTENDED_REGISTERS.
14546 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14547 (the_low_target): Install them.
14548 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14549 failing with ERROR_PIPE_NOT_CONNECTED.
14550
14551 2009-06-30 Doug Evans <dje@google.com>
14552 Pierre Muller <muller@ics.u-strasbg.fr>
14553
14554 Add h/w watchpoint support to x86-linux, win32-i386.
14555 * Makefile.in (SFILES): Add i386-low.c
14556 (i386_low_h): Define.
14557 (i386-low.o): Add dependencies.
14558 (linux-x86-low.o): Add i386-low.h dependency.
14559 (win32-i386-low.o): Ditto.
14560 * i386-low.c: New file.
14561 * i386-low.h: New file.
14562 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14563 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14564 * linux-low.c (linux_add_process): Initialize arch_private.
14565 (linux_remove_process): Free arch_private.
14566 (add_lwp): Initialize arch_private.
14567 (delete_lwp): Free arch_private.
14568 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14569 provided.
14570 * linux-low.h (process_info_private): New member arch_private.
14571 (lwp_info): New member arch_private.
14572 (linux_target_ops): New members new_process, new_thread,
14573 prepare_to_resume.
14574 (ptid_of): New macro.
14575 * linux-x86-low.c: Include stddef.h, i386-low.h.
14576 (arch_process_info): New struct.
14577 (arch_lwp_info): New struct.
14578 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14579 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14580 (i386_dr_low_get_status): New function.
14581 (x86_insert_point, x86_remove_point): New functions.
14582 (x86_stopped_by_watchpoint): New function.
14583 (x86_stopped_data_address): New function.
14584 (x86_linux_new_process, x86_linux_new_thread): New functions.
14585 (x86_linux_prepare_to_resume): New function.
14586 (the_low_target): Add entries for insert_point, remove_point,
14587 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14588 prepare_to_resume.
14589 * server.c (debug_hw_points): New global.
14590 (monitor_show_help): Document set debug-hw-points.
14591 (handle_query): Process "set debug-hw-points".
14592 * server.h (debug_hw_points): Declare.
14593 (paddress): Declare.
14594 * utils.c (NUMCELLS, CELLSIZE): New macros.
14595 (get_sell, xsnprintf, paddress): New functions.
14596 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14597 remove_point, stopped_by_watchpoint, stopped_data_address.
14598 * win32-i386-low.c: Include i386-low.h.
14599 (debug_reg_state): Replaces dr.
14600 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14601 (i386_dr_low_get_status): New function.
14602 (i386_insert_point, i386_remove_point): New functions.
14603 (i386_stopped_by_watchpoint): New function.
14604 (i386_stopped_data_address): New function.
14605 (i386_initial_stuff): Update.
14606 (get_thread_context,set_thread_context,i386_thread_added): Update.
14607 (the_low_target): Add entries for insert_point,
14608 remove_point, stopped_by_watchpoint, stopped_data_address.
14609 * win32-low.c (win32_insert_watchpoint): New function.
14610 (win32_remove_watchpoint): New function.
14611 (win32_stopped_by_watchpoint): New function.
14612 (win32_stopped_data_address): New function.
14613 (win32_target_ops): Add entries for insert_watchpoint,
14614 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14615 * win32-low.h (win32_target_ops): New members insert_point,
14616 remove_point, stopped_by_watchpoint, stopped_data_address.
14617
14618 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14619
14620 * server.c (process_serial_event): Re-return unsupported, not
14621 error, if the type isn't recognized. Re-allow supporting only
14622 insert or remove packets. Also call require_running for
14623 breakpoints. Add missing break statement to default case. Tidy.
14624 * target.h (struct target_ops): Rename insert_watchpoint to
14625 insert_point, and remove_watchpoint to remove_point.
14626
14627 * linux-low.h (struct linux_target_ops): Likewise.
14628 * linux-low.c (linux_insert_watchpoint): Rename to ...
14629 (linux_insert_point): ... this. Adjust.
14630 (linux_remove_watchpoint): Rename to ...
14631 (linux_remove_point): ... this. Adjust.
14632 (linux_target_ops): Adjust.
14633 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14634 (cris_insert_point): ... this.
14635 (cris_remove_watchpoint): Rename to ...
14636 (cris_remove_point): ... this.
14637 (the_low_target): Adjust.
14638
14639 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14640
14641 * server.c (handle_v_kill): Pass signal_pid to
14642 kill_inferior if multi_process is zero.
14643
14644 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14645
14646 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14647 * target.h (target_ops): Comment for *_watchpoint to make it clear
14648 the functions can get types '0' and '1'.
14649
14650 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14651
14652 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14653 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14654 * regcache.c (get_regcache): Likewise.
14655 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14656 * win32-low.c (child_fetch_inferior_registers): Remove check for
14657 regno 0.
14658
14659 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14660 Pedro Alves <pedro@codesourcery.com>
14661
14662 * target.h (struct target_ops) <supports_multi_process>: New
14663 callback.
14664 (target_supports_multi_process): New.
14665 * server.c (handle_query): Even if GDB reports support, only
14666 enable multi-process if the target also supports it. Report
14667 multi-process support only if the target backend supports it.
14668 * linux-low.c (linux_supports_multi_process): New function.
14669 (linux_target_ops): Install it as target_supports_multi_process
14670 callback.
14671
14672 2009-05-24 Doug Evans <dje@google.com>
14673
14674 Global renaming of find_thread_pid to find_thread_ptid.
14675 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14676 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14677 All callers updated.
14678
14679 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14680 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14681 directly.
14682
14683 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14684 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14685 (linux_resume_one_lwp): Ditto.
14686
14687 2009-05-23 Doug Evans <dje@google.com>
14688
14689 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14690 from struct inferior_list_entry * to struct lwp_info *.
14691 All callers updated.
14692
14693 2009-05-13 Doug Evans <dje@google.com>
14694
14695 * linux-x86-low.c: Don't include assert.h.
14696 (x86_siginfo_fixup): Use fatal, not assert.
14697 (x86_arch_setup): Fix comment.
14698
14699 2009-05-12 Doug Evans <dje@google.com>
14700
14701 Biarch support for i386/amd64 gdbserver.
14702 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14703 Add linux-x86-low.c.
14704 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14705 (linux-x86-low.o): Add.
14706 * linux-x86-64-low.c: Delete.
14707 * linux-i386-low.c: Delete.
14708 * linux-x86-low.c: New file.
14709 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14710 linux-x86-low.o.
14711 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14712 linux-x86-low.o.
14713 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14714 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14715 (linux_child_pid_to_exec_file): New function.
14716 (elf_64_header_p, elf_64_file_p): New functions.
14717 (siginfo_fixup): New function.
14718 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14719 give target a chance to convert layout.
14720 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14721 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14722
14723 2009-05-07 Doug Evans <dje@google.com>
14724
14725 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14726 (regsets_store_inferior_registers): Ditto.
14727
14728 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14729
14730 PR server/10048
14731
14732 * linux-low.c (must_set_ptrace_flags): Delete.
14733 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14734 of the global.
14735 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14736 `lwp->must_set_ptrace_flags' instead.
14737 (linux_wait_for_event_1): Set ptrace options here.
14738 (linux_wait_1): ... not here.
14739
14740 2009-04-30 Doug Evans <dje@google.com>
14741
14742 * inferiors.c (started_inferior_callback): New function.
14743 (attached_inferior_callback): New function.
14744 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14745 * server.c (print_started_pid, print_attached_pid): New functions.
14746 (detach_or_kill_for_exit): New function.
14747 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14748 * server.h (have_started_inferiors_p): Declare.
14749 (have_attached_inferiors_p): Declare.
14750
14751 * inferiors.c (remove_process): Fix memory leak, free process.
14752 * linux-low.c (linux_remove_process): New function.
14753 (linux_kill): Call it instead of remove_process.
14754 (linux_detach, linux_wait_1): Ditto.
14755
14756 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14757
14758 * configure.srv: Add x86 Windows CE target.
14759
14760 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14761
14762 * inferiors.c (get_thread_process): Make global.
14763 * server.h (get_thread_process): Add prototype.
14764 * thread-db.c (find_one_thread): Use get_thread_process
14765 instead of current_process.
14766 (thread_db_get_tls_address): Do not crash if called when
14767 thread layer is not yet initialized.
14768
14769 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14770
14771 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14772 * spu-low.c (current_tid): Rename to ...
14773 (current_ptid): ... this.
14774 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14775 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14776 ptid_get_lwp (current_ptid) instead of current_tid.
14777 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14778 instead of current_tid. Use find_process_pid to verify pid
14779 argument is valid. Pass proper argument to remove_process.
14780 (spu_thread_alive): Compare current_ptid instead of current_tid.
14781 (spu_resume): Likewise.
14782
14783 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14784
14785 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14786 variable.
14787
14788 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14789
14790 Implement the multiprocess extensions, and add linux multiprocess
14791 support.
14792
14793 * server.h (ULONGEST): Declare.
14794 (struct ptid, ptid_t): New.
14795 (minus_one_ptid, null_ptid): Declare.
14796 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14797 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14798 (struct inferior_list_entry): Change `id' type from unsigned from
14799 to ptid_t.
14800 (struct sym_cache, struct breakpoint, struct
14801 process_info_private): Forward declare.
14802 (struct process_info): Declare.
14803 (current_process): Declare.
14804 (all_processes): Declare.
14805 (initialize_inferiors): Declare.
14806 (add_thread): Adjust to use ptid_t.
14807 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14808 (add_process, remove_process, find_thread_pid): Declare.
14809 (find_inferior_id): Adjust to use ptid_t.
14810 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14811 (multi_process): Declare.
14812 (push_event): Adjust to use ptid_t.
14813 (read_ptid, write_ptid): Declare.
14814 (prepare_resume_reply): Adjust to use ptid_t.
14815 (clear_symbol_cache): Declare.
14816 * inferiors.c (all_processes): New.
14817 (null_ptid, minus_one_ptid): New.
14818 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14819 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14820 (add_thread): Change unsigned long to ptid. Remove gdb_id
14821 parameter. Adjust.
14822 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14823 (gdb_id_to_thread): Rename to ...
14824 (find_thread_pid): ... this. Change unsigned long to ptid.
14825 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14826 (loaded_dll, pull_pid_from_list): Adjust.
14827 (add_process, remove_process, find_process_pid)
14828 (get_thread_process, current_process, initialize_inferiors): New.
14829 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14830 (struct target_waitstatus) <related_pid>: Ditto.
14831 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14832 return type to int.
14833 (struct target_ops) <join>: Add `pid' argument.
14834 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14835 (struct target_ops) <wait>: Add `ptid' field. Change return type
14836 to ptid.
14837 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14838 (mywait): Add `ptid' argument. Change return type to ptid_t.
14839 (target_pid_to_str): Declare.
14840 * target.c (set_desired_inferior): Adjust to use ptids.
14841 (mywait): Add new `ptid' argument. Adjust.
14842 (target_pid_to_str): New.
14843 * mem-break.h (free_all_breakpoints): Declare.
14844 * mem-break.c (breakpoints): Delelete.
14845 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14846 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14847 to use per-process breakpoint list.
14848 (free_all_breakpoints): New.
14849 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14850 (symbol_cache, all_symbols_looked_up): Delete.
14851 (hexchars): New.
14852 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14853 read_ptid): New.
14854 (prepare_resume_reply): Change ptid argument's type from unsigned
14855 long to ptid_t. Adjust. Implement W;process and X;process.
14856 (free_sym_cache, clear_symbol_cache): New.
14857 (look_up_one_symbol): Adjust to per-process symbol cache. *
14858 * server.c (cont_thread, general_thread, step_thread): Change type
14859 to ptid_t.
14860 (attached): Delete.
14861 (multi_process): New.
14862 (last_ptid): Change type to ptid_t.
14863 (struct vstop_notif) <ptid>: Change type to ptid_t.
14864 (queue_stop_reply, push_event): Change `ptid' argument's type to
14865 ptid_t.
14866 (discard_queued_stop_replies): Add `pid' argument.
14867 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14868 changes. Don't reference the `attached' global.
14869 (attach_inferior): Adjust to mywait interface changes.
14870 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14871 features. Handle and report "multiprocess+". Handle
14872 "qAttached:PID".
14873 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14874 changes.
14875 (handle_v_kill): New.
14876 (handle_v_stopped): Adjust to use target_pid_to_str.
14877 (handle_v_requests): Allow multiple attaches and runs when
14878 multiprocess extensions are in effect. Handle "vKill".
14879 (myresume): Adjust to use ptids.
14880 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14881 (handle_status): Adjust to discard_queued_stop_replies interface
14882 change.
14883 (first_thread_of, kill_inferior_callback)
14884 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14885 (main): Call initialize_inferiors. Adjust to use ptids, killing
14886 and detaching from all inferiors. Handle multiprocess packet
14887 variants.
14888 * linux-low.h: Include gdb_proc_service.h.
14889 (struct process_info_private): New.
14890 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14891 <lwpid_of>: Use ptid_get_lwp.
14892 (get_lwp_thread): Adjust.
14893 (struct lwp_info): Add `dead' member.
14894 (find_lwp_pid): Declare.
14895 * linux-low.c (thread_db_active): Delete.
14896 (new_inferior): Adjust comment.
14897 (inferior_pid): Delete.
14898 (linux_add_process): New.
14899 (handle_extended_wait): Adjust.
14900 (add_lwp): Change unsigned long to ptid.
14901 (linux_create_inferior): Add process to processes table. Adjust
14902 to use ptids. Don't set new_inferior here.
14903 (linux_attach_lwp): Rename to ...
14904 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14905 it. Adjust to use ptids.
14906 (linux_attach_lwp): New.
14907 (linux_attach): Add process to processes table. Don't set
14908 new_inferior here.
14909 (struct counter): New.
14910 (second_thread_of_pid_p, last_thread_of_process_p): New.
14911 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14912 multiple processes.
14913 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14914 processes. Remove process from process table.
14915 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14916 to multiple processes.
14917 (any_thread_of): New.
14918 (linux_detach): Add `pid' argument, and handle it. Remove process
14919 from processes table.
14920 (linux_join): Add `pid' argument. Handle it.
14921 (linux_thread_alive): Change unsighed long argument to ptid_t.
14922 Consider dead lwps as not being alive.
14923 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14924 threads we're not interested in.
14925 (same_lwp, find_lwp_pid): New.
14926 (linux_wait_for_lwp): Change `pid' argument's type from int to
14927 ptid_t. Adjust.
14928 (linux_wait_for_event): Rename to ...
14929 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14930 from int to ptid_t. Adjust.
14931 (linux_wait_for_event): New.
14932 (linux_wait_1): Add `ptid' argument. Change return type to
14933 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14934 that exit from the process table.
14935 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14936 Adjust.
14937 (mark_lwp_dead): New.
14938 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14939 stopping all threads, mark its main lwp as dead.
14940 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14941 ptids.
14942 (fetch_register, usr_store_inferior_registers)
14943 (regsets_fetch_inferior_registers)
14944 (regsets_store_inferior_registers, linux_read_memory)
14945 (linux_write_memory): Inline `inferior_pid'.
14946 (linux_look_up_symbols): Adjust to use per-process
14947 `thread_db_active'.
14948 (linux_request_interrupt): Adjust to use ptids.
14949 (linux_read_auxv): Inline `inferior_pid'.
14950 (initialize_low): Don't reference thread_db_active.
14951 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14952 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14953 (ps_getpid): Return the pid of the current inferior.
14954 * thread-db.c (proc_handle, thread_agent): Delete.
14955 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14956 per-process data.
14957 (find_one_thread): Change argument type to ptid_t. Adjust to
14958 per-process data.
14959 (maybe_attach_thread): Adjust to per-process data and ptids.
14960 (thread_db_find_new_threads): Ditto.
14961 (thread_db_init): Ditto.
14962 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14963 processes table. Adjust to use ptids.
14964 (spu_kill, spu_detach): Adjust interface. Remove process from
14965 processes table.
14966 (spu_join, spu_thread_alive): Adjust interface.
14967 (spu_wait): Adjust interface. Remove process from processes
14968 table. Adjust to use ptids.
14969 * win32-low.c (current_inferior_tid): Delete.
14970 (current_inferior_ptid): New.
14971 (debug_event_ptid): New.
14972 (thread_rec): Take a ptid. Adjust.
14973 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14974 (child_delete_thread): Ditto.
14975 (do_initial_child_stuff): Add `attached' argument. Add process to
14976 processes table.
14977 (child_fetch_inferior_registers, child_store_inferior_registers):
14978 Adjust.
14979 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14980 (win32_attach): Pass 1 to do_initial_child_stuff.
14981 (win32_kill): Adjust interface. Remove process from processes
14982 table.
14983 (win32_detach): Ditto.
14984 (win32_join): Adjust interface.
14985 (win32_thread_alive): Take a ptid.
14986 (win32_resume): Adjust to use ptids.
14987 (get_child_debug_event): Ditto.
14988 (win32_wait): Adjust interface. Remove exiting process from
14989 processes table.
14990
14991 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14992
14993 Non-stop mode support.
14994
14995 * server.h (non_stop): Declare.
14996 (gdb_client_data, handler_func): Declare.
14997 (delete_file_handler, add_file_handler, start_event_loop):
14998 Declare.
14999 (handle_serial_event, handle_target_event, push_event)
15000 (putpkt_notif): Declare.
15001 * target.h (enum resume_kind): New.
15002 (struct thread_resume): Replace `step' field by `kind' field.
15003 (TARGET_WNOHANG): Define.
15004 (struct target_ops) <wait>: Add `options' argument.
15005 <supports_non_stop, async, start_non_stop>: New fields.
15006 (target_supports_non_stop, target_async): New.
15007 (start_non_stop): Declare.
15008 (mywait): Add `options' argument.
15009 * target.c (mywait): Add `options' argument. Print child exit
15010 notifications here.
15011 (start_non_stop): New.
15012 * server.c (non_stop, own_buf, mem_buf): New globals.
15013 (struct vstop_notif): New.
15014 (notif_queue): New global.
15015 (queue_stop_reply, push_event, discard_queued_stop_replies)
15016 (send_next_stop_reply): New.
15017 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15018 interface changes.
15019 (attach_inferior): In non-stop mode, don't wait for the target
15020 here.
15021 (handle_general_set): Handle QNonStop.
15022 (handle_query): When handling qC, return the current general
15023 thread, instead of the first thread of the list.
15024 (handle_query): If the backend supports non-stop mode, include
15025 QNonStop+ in the qSupported query response.
15026 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15027 and non-stop mode.
15028 (handle_v_attach, handle_v_run): Handle non-stop mode.
15029 (handle_v_stopped): New.
15030 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15031 (myresume): Adjust to use resume_kind. Handle non-stop.
15032 (queue_stop_reply_callback): New.
15033 (handle_status): Handle non-stop mode.
15034 (main): Clear non_stop flag on reconnection. Use the event-loop.
15035 Refactor serial protocol handling from here ...
15036 (process_serial_event): ... to this new function. When GDB
15037 selects any thread, select one here. In non-stop mode, wait until
15038 GDB acks all pending events before exiting.
15039 (handle_serial_event, handle_target_event): New.
15040 * remote-utils.c (remote_open): Install remote_desc in the event
15041 loop.
15042 (remote_close): Remove remote_desc from the event loop.
15043 (putpkt_binary): Rename to...
15044 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15045 (putpkt_binary): New as wrapper around putpkt_binary_1.
15046 (putpkt_notif): New.
15047 (prepare_resume_reply): In non-stop mode, don't change the
15048 general_thread.
15049 * event-loop.c: New.
15050 * Makefile.in (OBJ): Add event-loop.o.
15051 (event-loop.o): New rule.
15052
15053 * linux-low.h (pid_of): Moved here.
15054 (lwpid_of): New.
15055 (get_lwp_thread): Use lwpid_of.
15056 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15057 * linux-low.c (pid_of): Delete.
15058 (inferior_pid): Use lwpid_of.
15059 (linux_event_pipe): New.
15060 (target_is_async_p): New.
15061 (delete_lwp): New.
15062 (handle_extended_wait): Use lwpid_of.
15063 (add_lwp): Don't set lwpid field.
15064 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15065 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15066 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15067 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15068 first. Adjust to linux_wait_for_event interface changes. Use
15069 lwpid_of.
15070 (linux_detach): Don't delete the main lwp here.
15071 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15072 (status_pending_p): Don't consider explicitly suspended lwps.
15073 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15074 pointer. Add OPTIONS argument. Change return type to int. Use
15075 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15076 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15077 pointer. Add status pointer argument. Return a pid instead of a
15078 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15079 changes. In non-stop mode, don't switch to a random thread.
15080 (linux_wait): Rename to...
15081 (linux_wait_1): ... this. Add target_options argument, and handle
15082 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15083 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15084 clean exit and signal exit code. Don't stop all threads in
15085 non-stop mode. In all-stop mode, only stop all threads when
15086 reporting a stop to GDB. Handle explicit thread stop requests.
15087 (async_file_flush, async_file_mark): New.
15088 (linux_wait): New.
15089 (send_sigstop): Use lwpid_of.
15090 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15091 interface changes. In non-stop mode, don't switch to a random
15092 thread.
15093 (linux_resume_one_lwp): Use lwpid_of.
15094 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15095 (linux_resume_one_thread): ... this. Handle resume_stop. In
15096 non-stop mode, don't look for pending flag in all threads.
15097 (resume_status_pending_p): Don't consider explicitly suspended
15098 threads.
15099 (my_waitpid): Reimplement. Emulate __WALL.
15100 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15101 Use lwpid_of.
15102 (sigchld_handler, linux_supports_non_stop, linux_async)
15103 (linux_start_non_stop): New.
15104 (linux_target_ops): Register linux_supports_non_stop, linux_async
15105 and linux_start_non_stop.
15106 (initialize_low): Install SIGCHLD handler.
15107 * thread-db.c (thread_db_create_event, find_one_thread)
15108 (thread_db_get_tls_address): Use lwpid_of.
15109 * win32-low.c (win32_detach): Adjust to use resume_kind.
15110 (win32_wait): Add `options' argument.
15111 * spu-low.c (spu_resume): Adjust to use resume_kind.
15112 (spu_wait): Add `options' argument.
15113
15114 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15115
15116 Decouple target code from remote protocol.
15117
15118 * target.h (enum target_waitkind): New.
15119 (struct target_waitstatus): New.
15120 (struct target_ops) <wait>: Return an unsigned long. Take a
15121 target_waitstatus pointer instead of a char pointer.
15122 (mywait): Likewise.
15123 * target.c (mywait): Change prototype to return an unsigned long.
15124 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15125 * server.h (thread_from_wait, old_thread_from_wait): Delete
15126 declarations.
15127 (prepare_resume_reply): Change prototype to take a
15128 target_waitstatus.
15129 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15130 (last_status, last_ptid): New.
15131 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15132 pid instead of a signal.
15133 (attach_inferior): Remove "status" and "signal" parameters.
15134 Adjust.
15135 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15136 not as an address.
15137 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15138 (handle_v_requests, myresume): Remove "status" and "signal"
15139 parameters. Adjust.
15140 (handle_status): New.
15141 (main): Delete local `status'. Adjust.
15142 * remote-utils.c: Include target.h.
15143 (prepare_resume_reply): Change prototype to take a
15144 target_waitstatus. Adjust.
15145
15146 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15147 interface.
15148 * spu-low.c (spu_wait): Adjust.
15149 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15150 Delete.
15151 (win32_wait): Adjust.
15152
15153 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15154
15155 * target.h (struct thread_resume): Delete leave_stopped member.
15156 (struct target_ops): Add a `n' argument to the `resume' callback.
15157 * server.c (start_inferior): Adjust.
15158 (handle_v_cont, myresume): Adjust.
15159 * linux-low.c (check_removed_breakpoint): Adjust to resume
15160 interface change, and to removed leave_stopped field.
15161 (resume_ptr): Delete.
15162 (struct thread_resume_array): New.
15163 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15164 resume interface change.
15165 (linux_continue_one_thread, linux_queue_one_thread)
15166 (resume_status_pending_p): Check if the resume field is NULL
15167 instead of checking the leave_stopped member.
15168 (linux_resume): Adjust to the target resume interface change.
15169 * spu-low.c (spu_resume): Adjust to the target resume interface
15170 change.
15171 * win32-low.c (win32_detach, win32_resume): Ditto.
15172
15173 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15174
15175 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15176 flag.
15177 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15178 pending.
15179 (linux_continue_one_thread): Only preserve the stepping flag if
15180 there's a pending breakpoint.
15181
15182 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15183
15184 * server.c (main): After the inferior having exited, call
15185 remote_close before exiting gdbserver.
15186
15187 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15188
15189 Fix size of FPSCR in Power 7 processors.
15190 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15191 (PPC_FEATURE_HAS_DFP): New #define.
15192 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15193 size of the FPSCR.
15194
15195 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15196
15197 * server.c (handle_query) Whitespace and formatting.
15198
15199 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15200
15201 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15202 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15203 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15204 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15205 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15206 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15207 Makefile.in, configure.ac: Fix whitespace throughout.
15208 * configure: Regenerate.
15209
15210 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15211
15212 * inferiors.c (find_inferior): Make it safe for the callback
15213 function to delete the currently iterated inferior.
15214
15215 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15216
15217 * Makefile.in (linuw_low_h): Move higher.
15218 (thread-db.o): Depend on $(linux_low_h).
15219
15220 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15221
15222 Rename "process" to "lwp" throughout.
15223
15224 * linux-low.c (all_processes): Rename to...
15225 (all_lwps): ... this.
15226 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15227 (add_process): Rename to ...
15228 (add_lwp): ... this. Adjust.
15229 (linux_create_inferior): Adjust.
15230 (linux_attach_lwp): Adjust.
15231 (linux_attach): Adjust.
15232 (linux_kill_one_process): Rename to ...
15233 (linux_kill_one_lwp): ... this. Adjust.
15234 (linux_kill): Adjust.
15235 (linux_detach_one_process): Rename to ...
15236 (linux_detach_one_lwp): ... this. Adjust.
15237 (linux_detach): Adjust.
15238 (check_removed_breakpoint): Adjust.
15239 (status_pending_p): Adjust.
15240 (linux_wait_for_process): Rename to ...
15241 (linux_wait_for_lwp): ... this. Adjust.
15242 (linux_wait_for_event): Adjust.
15243 (send_sigstop): Adjust.
15244 (wait_for_sigstop): Adjust.
15245 (stop_all_processes): Rename to ...
15246 (stop_all_lwps): ... this.
15247 (linux_resume_one_process): Rename to ...
15248 (linux_resume_one_lwp): ... this. Adjust.
15249 (linux_set_resume_request, linux_continue_one_thread)
15250 (linux_queue_one_thread, resume_status_pending_p)
15251 (usr_store_inferior_registers, regsets_store_inferior_registers)
15252 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15253 Adjust.
15254 * linux-low.h (get_process): Rename to ...
15255 (get_lwp): ... this. Adjust.
15256 (get_thread_process): Rename to ...
15257 (get_thread_lwp): ... this. Adjust.
15258 (get_process_thread): Rename to ...
15259 (get_lwp_thread): ... this. Adjust.
15260 (struct process_info): Rename to ...
15261 (struct lwp_info): ... this.
15262 (all_processes): Rename to ...
15263 (all_lwps): ... this.
15264 * proc-service.c (ps_lgetregs): Adjust.
15265 * thread-db.c (thread_db_create_event, find_one_thread)
15266 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15267
15268 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15269
15270 * server.c (handle_query): Handle "qAttached".
15271
15272 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15273
15274 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15275 GPLv3, update license URL.
15276
15277 2009-03-01 Doug Evans <dje@google.com>
15278
15279 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15280 (server_h): Add gdb_signals.h.
15281 (signals.o): Update.
15282 * server.h (target_signal_from_host,target_signal_to_host_p)
15283 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15284
15285 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15286
15287 * remote-utils.c (getpkt): Also generate remote-debug
15288 information if noack_mode is set.
15289
15290 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15291
15292 * server.c (handle_query): Report qXfer:siginfo:read and
15293 qXfer:siginfo:write as supported and handle them.
15294 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15295 * linux-low.c (linux_xfer_siginfo): New.
15296 (linux_target_ops): Set it.
15297
15298 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15299
15300 * server.c (gdbserver_usage): Mention --remote-debug.
15301 (main): Accept '--remote-debug' switch.
15302
15303 2009-01-18 Doug Evans <dje@google.com>
15304
15305 * regcache.c (new_register_cache): No need to check result of xcalloc.
15306 * server.c (handle_search_memory): Back out calls to xmalloc,
15307 result is checked and error is returned to user upon failure.
15308 (handle_query): Ditto. Add more checks for result of malloc.
15309 (handle_v_cont): Check result of malloc, report error back to
15310 user upon failure.
15311 (handle_v_run): Ditto. Call freeargv.
15312 * server.h (freeargv): Declare.
15313 * utils.c (freeargv): New fn.
15314
15315 2009-01-15 Doug Evans <dje@google.com>
15316
15317 * gdbreplay.c (perror_with_name): Make arg const char *.
15318 * server.h (target_signal_to_name): Make return type const char *.
15319 * thread-db.c (thread_db_err_str): Make return type const char *.
15320 * utils.c (perror_with_name): Make arg const char *.
15321
15322 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15323
15324 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15325 when handling a EXIT_PROCESS_DEBUG_EVENT.
15326
15327 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15328
15329 * gdbreplay.c (gdbreplay_version): Update copyright year.
15330 * server.c (gdbserver_version): Likewise.
15331
15332 2009-01-05 Doug Evans <dje@google.com>
15333
15334 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15335 (handle_extended_wait): Improve comment.
15336
15337 2008-12-13 Doug Evans <dje@google.com>
15338
15339 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15340 * server.h (ATTR_MALLOC): New macro.
15341 (xmalloc,xcalloc,xstrdup): Declare.
15342 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15343 * inferiors.c: Ditto.
15344 * linux-low.c: Ditto.
15345 * mem-break.c: Ditto.
15346 * regcache.c: Ditto.
15347 * remote-utils.c: Ditto.
15348 * server.c: Ditto.
15349 * target.c: Ditto.
15350 * win32-low.c: Ditto.
15351
15352 2008-12-12 Doug Evans <dje@google.com>
15353
15354 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15355 in debugging printf.
15356
15357 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15358
15359 2008-12-09 Doug Evans <dje@google.com>
15360
15361 * linux-low.h (struct process_info): Delete member tid, unused.
15362 * thread-db.c (find_one_thread): Update.
15363 (maybe_attach_thread): Update.
15364
15365 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15366
15367 * target.h (struct target_ops): Add qxfer_osdata member.
15368 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15369 and dirent.h.
15370 (linux_qxfer_osdata): New functions.
15371 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15372 callback.
15373 * server.c (handle_query): Handle "qXfer:osdata:read:".
15374 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15375 (buffer_xml_printf): New functions.
15376 * server.h (struct buffer): New.
15377 (buffer_grow_str, buffer_grow_str0): New macros.
15378 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15379 (buffer_xml_printf): Declare.
15380
15381 2008-11-24 Doug Evans <dje@google.com>
15382
15383 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15384
15385 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15386
15387 * server.c (handle_v_run): Always use the supplied argument list.
15388
15389 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15390
15391 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15392 (xtensa_regmap_table): Add entry for scompare1.
15393
15394 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15395
15396 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15397 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15398 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15399 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15400 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15401 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15402 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15403 XML target descriptions.
15404 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15405 when inferior is running on an ISA 2.05 or later processor. Add
15406 special case to return offset for full 64-bit slot of FPSCR when
15407 in 32-bits.
15408
15409 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15410
15411 * Makefile.in (SFILES, clean): Added sparc64 files.
15412 (reg-sparc64.o, reg-sparc64.c): New.
15413 * configure.srv (sparc*-*-linux*): New configuration.
15414 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15415 syscall arguments for SPARC.
15416 (regsets_store_inferior_registers): Likewise.
15417 * linux-sparc-low.c: New file.
15418
15419 2008-10-21 Doug Evans <dje@google.com>
15420
15421 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15422 (READLINE_DIR,READLINE_DEP): Delete.
15423 (INTERNAL_CFLAGS): Update.
15424 (LINTFLAGS): Update.
15425
15426 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15427
15428 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15429 whole argv from the last run, not just argv[0].
15430
15431 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15432
15433 * regcache.c (new_register_cache): Return NULL if the register
15434 cache size isn't known yet.
15435 (free_register_cache): Avoid dereferencing a NULL regcache.
15436
15437 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15438
15439 * configure.srv: Merge MIPS and MIPS64.
15440
15441 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15442
15443 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15444
15445 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15446
15447 * Makefile.in: Add required vsx dependencies.
15448
15449 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15450 Declare init_registers_powerpc_vsx32l.
15451 Declare init_registers_powerpc_vsx64l.
15452 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15453 (ppc_arch_setup): Check for VSX in hwcap.
15454 (ppc_fill_vsxregset): New function.
15455 (ppc_store_vsxregset): New function.
15456 Add new VSX entry in regset_info target_regsets.
15457
15458 * configure.srv: Add new VSX dependencies.
15459
15460 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15461
15462 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15463 (remote_open): Set or clear transport_is_reliable.
15464 (putpkt_binary): Don't expect acks in noack mode.
15465 (getpkt): Don't send ack/nac in noack mode.
15466 * server.c (handle_general_set): Handle QStartNoAckMode.
15467 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15468 qSupported.
15469 (main): Reset noack_mode on every connection.
15470 * server.h (noack_mode): Declare.
15471
15472 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15473
15474 * Makefile.in (GDBREPLAY_OBS): New variable.
15475 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15476
15477 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15478 Daniel Jacobowitz <dan@codesourcery.com>
15479
15480 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15481 (usr_store_inferior_registers): Likewise.
15482 (regsets_store_inferior_registers): Likewise.
15483
15484 2008-07-31 Rolf Jansen <rj@surtec.com>
15485 Pedro Alves <pedro@codesourcery.com>
15486
15487 * configure.ac: Check for memmem declaration.
15488 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15489 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15490 (disable_packet_qfThreadInfo): Unconditionally compile.
15491 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15492 * configure, config.in: Regenerate.
15493
15494 2008-07-28 Doug Kwan <dougkwan@google.com>
15495
15496 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15497 (linux_write_memory): Remove declaration of errno.
15498
15499 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15500
15501 * linux-low.c (handle_extended_wait): Do not use "status"
15502 variable uninitialized.
15503
15504 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15505
15506 * server.c (handle_v_attach): Inhibit reporting dll changes.
15507
15508 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15509
15510 * remote-utils.c (prepare_resume_reply): If requested, don't
15511 output "thread:TID" in the T stop reply.
15512
15513 * server.c (disable_packet_vCont, disable_packet_Tthread)
15514 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15515 (handle_query): If requested, disable support for qC, qfThreadInfo
15516 and qsThreadInfo.
15517 (handle_v_requests): If requested, disable support for vCont.
15518 (gdbserver_show_disableable): New.
15519 (main): Handle --disable-packet and --disable-packet=LIST.
15520
15521 * server.h (disable_packet_vCont, disable_packet_Tthread)
15522 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15523
15524 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15525
15526 * server.c (gdbserver_usage): Mention --version.
15527
15528 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15529
15530 * Makefile.in (gdbreplay.o): New rule.
15531
15532 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15533
15534 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15535 message, not gdbserver.
15536
15537 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15538 Nathan Sidwell <nathan@codesourcery.com>
15539 Joseph Myers <joseph@codesourcery.com>
15540
15541 * acinclude.m4: Include ../../config/acx.m4.
15542 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15543 * configure, config.in: Regenerate.
15544 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15545 * server.c (gdbserver_version): Print PKGVERSION.
15546 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15547 (main): Adjust gdbserver_usage calls.
15548 * gdbreplay.c (version, host_name): Add declarations.
15549 (gdbreplay_version, gdbreplay_usage): New.
15550 (main): Accept --version and --help options.
15551
15552 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15553
15554 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15555 (arm_breakpoint_at): Handle Thumb.
15556 (the_low_target): Add comment.
15557
15558 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15559
15560 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15561
15562 2008-05-09 Doug Evans <dje@google.com>
15563
15564 * server.h (decode_search_memory_packet): Declare.
15565 * remote-utils.c (decode_search_memory_packet): New fn.
15566 * server.c (handle_search_memory_1): New fn.
15567 (handle_search_memory): New fn.
15568 (handle_query): Process qSearch:memory packets.
15569
15570 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15571
15572 * regcache.c (registers_length): Remove.
15573 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15574 full register packet.
15575 * regcache.h (registers_length): Remove prototype.
15576 * server.h (PBUFSIZ): Define to 16384.
15577
15578 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15579
15580 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15581 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15582 powerpc-64l.o, and powerpc-altivec64l.o.
15583 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15584 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15585 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15586 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15587 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15588 to srv_xmlfiles.
15589
15590 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15591 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15592 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15593 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15594 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15595 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15596 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15597 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15598 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15599 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15600 (clean): Update.
15601
15602 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15603 (init_registers_powerpc_32l): ... this new prototype.
15604 (init_registers_powerpc_32): Remove, replace by ...
15605 (init_registers_powerpc_altivec32l): ... this new prototype.
15606 (init_registers_powerpc_e500): Remove, replace by ...
15607 (init_registers_powerpc_e500l): ... this new prototype.
15608 (init_registers_ppc64): Remove, replace by ...
15609 (init_registers_powerpc_64l): ... this new prototype.
15610 (init_registers_powerpc_64): Remove, replace by ...
15611 (init_registers_powerpc_altivec64l): ... this new prototype.
15612 (ppc_num_regs): Set to 73.
15613 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15614 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15615 (ppc_cannot_store_register): Handle orig_r3 and trap.
15616 (ppc_arch_setup): Update init_registers_... calls.
15617 (ppc_fill_gregset): Handle orig_r3 and trap.
15618
15619 * inferiors.c (clear_inferiors): Reset current_inferior.
15620
15621 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15622
15623 * acinclude.m4: Add override.m4.
15624 * configure: Regenerate.
15625
15626 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15627
15628 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15629 initial call to init_register_ppc64.
15630
15631 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15632
15633 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15634 single powerpc*-*-linux* case.
15635 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15636
15637 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15638
15639 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15640 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15641 from reg_xmlfiles.
15642 * linux-ppc-low.c: Include <elf.h>.
15643 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15644 (ppc_hwcap): New global variable.
15645 (ppc_regmap): Remove __SPE__ #ifdef sections.
15646 (ppc_regmap_e500): New global variable.
15647 (ppc_cannot_store_register): Update __SPE__ special case.
15648 (ppc_get_hwcap): New function.
15649 (ppc_arch_setup): Use it to determine whether inferior supports
15650 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15651 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15652 Do not access registers if target does not support AltiVec.
15653 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15654 Do not access registers if target does not support SPE.
15655 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15656
15657 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15658
15659 * linux-low.c (disabled_regsets, num_regsets): New.
15660 (use_regsets_p): Delete.
15661 (linux_wait_for_process): Clear disabled_regsets.
15662 (regsets_fetch_inferior_registers): Check and set it.
15663 (regsets_store_inferior_registers): Likewise.
15664 (linux_fetch_registers, linux_store_registers): Do not use
15665 use_regsets_p.
15666 (initialize_low): Allocate disabled_regsets.
15667
15668 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15669
15670 * Makefile.in (LIBOBJS): New.
15671 (OBS): Use LIBOBJS.
15672 (memmem.o): New rule.
15673 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15674 * configure: Regenerated.
15675
15676 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15677
15678 * server.c (handle_query): Never return "unsupported" for
15679 qXfer:features:read queries.
15680
15681 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15682
15683 * server.c (get_features_xml): Fix inverted condition.
15684 (handle_query): Always support qXfer:feature:read.
15685
15686 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15687
15688 * server.c (wrapper_argv): New.
15689 (start_inferior): Handle wrapper_argv. If set, expect an extra
15690 trap.
15691 (gdbserver_usage): Document --wrapper.
15692 (main): Parse --wrapper.
15693
15694 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15695
15696 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15697 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15698 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15699 (ppc_set_pc): Likewise.
15700 (ppc_arch_setup): New function.
15701 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15702 of collect_register.
15703 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15704
15705 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15706
15707 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15708 instead of linux-ppc64-low.o.
15709 * linux-ppc64-low.c: Remove file.
15710 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15711 (linux-ppc64-low.o): Remove rule.
15712
15713 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15714 (init_registers_powerpc_64): Likewise.
15715 (ppc_regmap): Conditionally define depending on __powerpc64__.
15716 (ppc_cannot_store_register): Do not special-case "fpscr" when
15717 compiled on __powerpc64__.
15718 (ppc_collect_ptrace_register): New function.
15719 (ppc_supply_ptrace_register): New function.
15720 (ppc_breakpoint): Change type to "unsigned int".
15721 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15722 (the_low_target): Conditionally provide initializers for the
15723 arch_setup member depending on __powerpc64__. Install
15724 collect_ptrace_register and supply_ptrace_register members.
15725
15726 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15727
15728 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15729 * server.c (gdbserver_xmltarget): Define.
15730 (get_features_xml): Use it to replace "target.xml" and arch_string.
15731
15732 * configure.srv: Remove srv_xmltarget. Add XML files that were
15733 mentioned there to srv_xmlfiles instead. Remove conditional tests
15734 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15735 srv_xmlfiles and srv_regobj to include all possible choices.
15736 * configure.ac (srv_xmltarget): Remove.
15737 (srv_xmlfiles): Do not add "target.xml".
15738 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15739 checks for supplementary target information.
15740 * configure: Regenerate.
15741 * Makefile.in (XML_TARGET): Remove.
15742 (target.xml): Remove rule.
15743 (clean): Do not clean up target.xml.
15744 (.PRECIOUS): Do not mention target.xml.
15745
15746 * target.h (struct target_ops): Remove arch_string member.
15747 * linux-low.c (linux_arch_string): Remove.
15748 (linux_target_ops): Remove arch_string initializer.
15749 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15750 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15751 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15752 * spu-low.c (spu_arch_string): Remove.
15753 (spu_target_ops): Remove arch_string initializer.
15754 * win32-low.c (win32_arch_string): Remove.
15755 (win32_target_ops): Remove arch_string initializer.
15756 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15757 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15758 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15759
15760 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15761
15762 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15763 by collect_ptrace_register and supply_ptrace_register hooks.
15764 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15765 instead of checking for the_low_target.left_pad_xfer.
15766 (usr_store_inferior_registers): Use collect_ptrace_register callback
15767 instead of checking for the_low_target.left_pad_xfer.
15768
15769 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15770 (s390_supply_ptrace_register): Likewise.
15771 (s390_fill_gregset): Call s390_collect_ptrace_register.
15772 (the_low_target): Update.
15773
15774 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15775 (ppc_supply_ptrace_register): Likewise.
15776 (the_low_target): Update.
15777
15778 * linux-i386-low.c (the_low_target): Update.
15779 * linux-x86-64-low.c (the_low_target): Update.
15780
15781 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15782
15783 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15784 reg-s390.o and reg-s390x.o.
15785
15786 * linux-low.c (new_inferior): New global variable.
15787 (linux_create_inferior, linux_attach): Set it.
15788 (linux_wait_for_process): Call the_low_target.arch_setup after the
15789 target has stopped for the first time.
15790 (initialize_low): Do not call the_low_target.arch_setup.
15791
15792 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15793 (s390_set_pc): Likewise.
15794 (s390_arch_setup): New function.
15795 (the_low_target): Use s390_arch_setup as arch_setup routine.
15796
15797 * regcache.c (realloc_register_cache): New function.
15798 (set_register_cache): Call it for each existing regcache.
15799
15800 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15801
15802 * server.h (init_registers): Remove prototype.
15803
15804 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15805 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15806 instead of init_registers ().
15807 * linux-arm-low.c (init_registers_arm): Add prototype.
15808 (init_registers_arm_with_iwmmxt): Likewise.
15809 (the_low_target): Add initializer for arch_setup field.
15810 * linux-cris-low.c (init_registers_cris): Add prototype.
15811 (the_low_target): Add initializer for arch_setup field.
15812 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15813 (the_low_target): Add initializer for arch_setup field.
15814 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15815 (the_low_target): Add initializer for arch_setup field.
15816 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15817 (the_low_target): Add initializer for arch_setup field.
15818 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15819 (the_low_target): Add initializer for arch_setup field.
15820 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15821 (the_low_target): Add initializer for arch_setup field.
15822 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15823 (init_registers_mips64_linux): Likewise.
15824 (the_low_target): Add initializer for arch_setup field.
15825 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15826 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15827 (the_low_target): Add initializer for arch_setup field.
15828 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15829 (init_registers_powerpc_64): Likewise.
15830 (the_low_target): Add initializer for arch_setup field.
15831 * linux-s390-low.c (init_registers_s390): Add prototype.
15832 (init_registers_s390x): Likewise.
15833 (the_low_target): Add initializer for arch_setup field.
15834 * linux-sh-low.c (init_registers_sh): Add prototype.
15835 (the_low_target): Add initializer for arch_setup field.
15836 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15837 (the_low_target): Add initializer for arch_setup field.
15838 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15839 (the_low_target): Add initializer for arch_setup field.
15840
15841 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15842 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15843 instead of init_registers ().
15844 * win32-arm-low.c (init_registers_arm): Add prototype.
15845 (the_low_target): Add initializer for arch_setup field.
15846 * win32-i386-low.c (init_registers_i386): Add prototype.
15847 (the_low_target): Add initializer for arch_setup field.
15848
15849 * spu-low.c (init_registers_spu): Add prototype.
15850 (initialize_low): Call initialie_registers_spu () instead of
15851 initialize_registers ().
15852
15853 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15854
15855 * server.c (handle_v_requests): When handling the vRun and vAttach
15856 packets, if already debugging a process, don't kill it. Return an
15857 error instead.
15858
15859 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15860
15861 * server.c (handle_query): Correct length check.
15862
15863 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15864
15865 * win32-low.c (do_initial_child_stuff): Add process handle
15866 parameter. Set current_process_handle and current_process_id from the
15867 parameters. Clear globals.
15868 (win32_create_inferior): Don't set current_process_handle and
15869 current_process_id here. Instead pass them on the call to
15870 do_initial_child_stuff.
15871 (win32_attach): Likewise.
15872 (win32_clear_inferiors): New.
15873 (win32_kill): Don't close the current process handle or the
15874 current thread handle here. Instead call win32_clear_inferiors.
15875 (win32_detach): Don't open a new handle to the process. Call
15876 win32_clear_inferiors.
15877 (win32_join): Don't rely on current_process_handle; open a new
15878 handle using the process id.
15879 (win32_wait): Call win32_clear_inferiors when the inferior process
15880 has exited.
15881
15882 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15883
15884 * server.c (monitor_show_help): Add "exit".
15885
15886 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15887
15888 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15889 (clean): Add reg-xtensa.c.
15890 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15891 * configure.srv (xtensa*-*-linux*) New target.
15892 * linux-xtensa-low.c: New.
15893 * xtensa-xtregs.c: New.
15894
15895 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15896
15897 * hostio.c: Don't include errno.h.
15898 (errno_to_fileio_errno): Move to hostio-errno.
15899 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15900 error number outputting to the target->hostio_last_error callback.
15901 (hostio_packet_error): Use FILEIO_EINVAL directly.
15902 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15903 calls to hostio_error.
15904 * hostio-errno.c: New.
15905 * server.h (hostio_last_error_from_errno): Declare.
15906 * target.h (target_ops): Add hostio_last_error member.
15907 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15908 as hostio_last_error handler.
15909 * spu-low.c (spu_target_ops): Likewise.
15910 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15911 (wince_hostio_last_error): New functions.
15912 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15913 as hostio_last_error handler.
15914 (win32_target_ops) [!_WIN32_WCE]: Register
15915 hostio_last_error_from_errno as hostio_last_error handler.
15916 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15917 (hostio-errno.o): New rule.
15918 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15919 * configure.srv (srv_hostio_err_objs): New variable. Default to
15920 hostio-errno.o.
15921 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15922 * configure: Regenerate.
15923
15924 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15925
15926 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15927 (linux_kill, linux_detach): Clean up the process list.
15928 * remote-utils.c (remote_open): Improve port number parsing.
15929 (putpkt_binary, input_interrupt): Only send interrupts if the target
15930 is running.
15931 * server.c (extended_protocol): Make static.
15932 (attached): Define earlier.
15933 (exit_requested, response_needed, program_argv): New variables.
15934 (target_running): New.
15935 (start_inferior): Clear attached here.
15936 (attach_inferior): Set attached here.
15937 (require_running): Define.
15938 (handle_query): Use require_running and target_running. Implement
15939 "monitor exit".
15940 (handle_v_attach, handle_v_run): New.
15941 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15942 (gdbserver_usage): Update.
15943 (main): Redo argument parsing. Handle --debug and --multi. Handle
15944 --attach along with other options or after the port. Save
15945 program_argv. Support no initial program. Resynchronize
15946 communication with GDB after an error. Handle "monitor exit".
15947 Use require_running and target_running. Always allow the extended
15948 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15949 restart in extended mode.
15950 * README: Refer to the GDB manual. Update --attach usage.
15951
15952 2007-12-20 Andreas Schwab <schwab@suse.de>
15953
15954 * linux-low.c (STACK_SIZE): Define.
15955 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15956 (linux_test_for_tracefork): Likewise.
15957
15958 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15959
15960 * linux-low.c (linux_wait_for_event): Update messages. Do not
15961 reinsert auto-delete breakpoints.
15962 * mem-break.c (struct breakpoint): Change return type of handler to
15963 int.
15964 (set_breakpoint_at): Update handler type.
15965 (reinsert_breakpoint_handler): Return 1 instead of calling
15966 delete_breakpoint.
15967 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15968 setting a new one.
15969 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15970 * mem-break.h (set_breakpoint_at): Update handler type.
15971 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15972 * win32-low.c (auto_delete_breakpoint): New.
15973 (get_child_debug_event): Use it.
15974
15975 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15976
15977 * configure.ac: Check for pread and pwrite.
15978 * hostio.c (handle_pread): Fall back to lseek and read.
15979 (handle_pwrite): Fall back to lseek and write.
15980 * config.in, configure: Regenerated.
15981
15982 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15983
15984 * server.c (myresume): Add own_buf argument.
15985 (main): Update calls.
15986
15987 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15988
15989 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15990 * remote-utils.c (remote_open): Do not call disable_async_io.
15991 (block_async_io): Delete.
15992 (unblock_async_io): Make static.
15993 (initialize_async_io): New.
15994 * server.c (handle_v_cont): Handle async I/O here.
15995 (myresume): Likewise. Move other common resume tasks here...
15996 (main): ... from here. Call initialize_async_io. Disable async
15997 I/O before the main loop.
15998 * server.h (initialize_async_io): Declare.
15999 (block_async_io, unblock_async_io): Delete prototypes.
16000 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16001
16002 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16003
16004 * remote-utils.c (readchar): Allow binary data in received messages.
16005
16006 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16007
16008 * win32-low.c (attaching): New global.
16009 (win32_create_inferior): Clear the `attaching' global.
16010 (win32_attach): Set the `attaching' global.
16011 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16012 attaching. Only set a breakpoint at the entry point if not
16013 attaching.
16014
16015 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16016
16017 * server.c (main): Don't report dll events on the initial
16018 connection on attaches.
16019
16020 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16021
16022 * server.c (main): Relax numerical bases supported for the pid of
16023 the --attach command line argument.
16024
16025 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16026
16027 * win32-low.c (win32_attach): Call OpenProcess before
16028 DebugActiveProcess, not after. Add last error output to error
16029 call.
16030
16031 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16032
16033 * win32-low.c (win32_get_thread_context)
16034 (win32_set_thread_context): New functions.
16035 (thread_rec): Use win32_get_thread_context.
16036 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16037 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16038 field.
16039
16040 2007-12-03 Leo Zayas
16041 Pedro Alves <pedro_alves@portugalmail.pt>
16042
16043 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16044 global variables.
16045 (child_add_thread): Minor cleanup.
16046 (child_continue): Resume artificially suspended threads before
16047 calling ContinueDebugEvent.
16048 (suspend_one_thread): New.
16049 (fake_breakpoint_event): New.
16050 (get_child_debug_event): Change return type to int. Check here if
16051 gdb sent an interrupt request. If a soft interrupt was requested,
16052 fake a breakpoint event. Return 0 if there is no event to handle,
16053 and 1 otherwise.
16054 (win32_wait): Don't check here if gdb sent an interrupt request.
16055 Ensure there is a valid event to handle.
16056 (win32_request_interrupt): Add soft interruption method as last
16057 resort.
16058
16059 2007-12-03 Leo Zayas
16060 Pedro Alves <pedro_alves@portugalmail.pt>
16061
16062 * win32-low.h (win32_thread_info): Add descriptions to the
16063 structure members. Replace `suspend_count' counter by a
16064 `suspended' flag.
16065 * win32-low.c (thread_rec): Update condition of when to get the
16066 context from the inferior. Rely on ContextFlags being set if it
16067 has already been retrieved. Only suspend the inferior thread if
16068 we haven't already. Warn if that fails.
16069 (continue_one_thread): s/suspend_count/suspended/. Only call
16070 ResumeThread once. Warn if that fails.
16071
16072 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16073
16074 * win32-low.c (win32_wait): Don't read from the inferior when it
16075 has already exited.
16076
16077 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16078
16079 * Makefile.in (win32_low_h): New variable.
16080 (win32-low.o): Add dependency on $(win32_low_h).
16081 (win32-arm-low.o, win32-i386-low.o): New rules.
16082
16083 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16084
16085 * hostio.c: Correct copyright year.
16086
16087 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16088
16089 * Makefile.in (OBS): Add hostio.o.
16090 (hostio.o): New rule.
16091 * server.h (handle_vFile): Declare.
16092 * hostio.c: New file.
16093 * server.c (handle_v_requests): Take packet_len and new_packet_len
16094 for binary packets. Call handle_vFile.
16095 (main): Update call to handle_v_requests.
16096
16097 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16098
16099 * linux-low.c: Include <sched.h>.
16100
16101 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16102
16103 * linux-low.c (linux_tracefork_grandchild): New.
16104 (linux_tracefork_child): Use clone.
16105 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16106
16107 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16108
16109 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16110
16111 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16112
16113 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16114
16115 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16116
16117 * inferiors.c (change_inferior_id): Delete.
16118 (add_pid_to_list, pull_pid_from_list): New.
16119 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16120 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16121 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16122 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16123 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16124 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16125 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16126 (using_threads): Always set to 1.
16127 (handle_extended_wait): New.
16128 (add_process): Do not set TID.
16129 (linux_create_inferior): Set must_set_ptrace_flags.
16130 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16131 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16132 (linux_thread_alive): Rename TID argument to LWPID.
16133 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16134 (linux_wait_for_event): Do not use TID or check using_threads. Update
16135 call to dead_thread_notify. Call handle_extended_wait.
16136 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16137 (send_sigstop): Delete sigstop_sent.
16138 (wait_for_sigstop): Avoid TID.
16139 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16140 (linux_test_for_tracefork): New.
16141 (linux_lookup_signals): Use thread_db_active and
16142 linux_supports_tracefork_flag.
16143 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16144 * linux-low.h (get_process_thread): Avoid TID.
16145 (struct process_ifo): Move thread_known and tid to the end. Remove
16146 sigstop_sent.
16147 (linux_attach_lwp, thread_db_init): Update prototypes.
16148 * server.h (change_inferior_id): Delete prototype.
16149 (add_pid_to_list, pull_pid_from_list): New prototypes.
16150 * thread-db.c (thread_db_use_events): New.
16151 (find_first_thread): Rename to...
16152 (find_one_thread): ...this. Update callers and messages. Do not
16153 call fatal. Check thread_db_use_events. Do not call
16154 change_inferior_id or new_thread_notify.
16155 (maybe_attach_thread): Update. Do not call new_thread_notify.
16156 (thread_db_init): Set thread_db_use_events. Check use_events.
16157 * utils.c (fatal, warning): Correct message prefix.
16158
16159 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16160
16161 * Makefile.in (clean): Remove new files.
16162 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16163 (powerpc-64.o, powerpc-64.c): New rules.
16164 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16165 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16166 with SPE.
16167 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16168 SPE targets.
16169 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16170 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16171 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16172 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16173 (target_regsets): Add AltiVec and SPE register sets.
16174 * configure.ac: Check for AltiVec and SPE.
16175 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16176 (ppc_fill_vrregset, ppc_store_vrregset): New.
16177 (target_regsets): Add AltiVec register set.
16178 * configure: Regenerated.
16179
16180 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16181
16182 * linux-low.c (O_LARGEFILE): Define.
16183 (linux_read_memory): Use /proc/PID/mem.
16184 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16185 * configure, config.in: Regenerated.
16186
16187 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16188
16189 * linux-low.c (linux_wait_for_event): Do not pass signals while
16190 single-stepping.
16191
16192 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16193
16194 * win32-low.c (create_process): New.
16195 (win32_create_inferior): Use create_process instead of
16196 CreateProcess. If create_process failed retry appending an ".exe"
16197 suffix. Store the GetLastError result immediatelly after
16198 create_process calls and use it on the call to error.
16199
16200 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16201
16202 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16203
16204 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16205
16206 * configure.ac: Switch license to GPLv3.
16207
16208 2007-08-01 Michael Snyder <msnyder@access-company.com>
16209
16210 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16211
16212 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16213
16214 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16215 typedef.
16216 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16217 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16218 CloseToolhelp32Snapshot.
16219 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16220 CloseToolhelp32Snapshot.
16221
16222 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16223
16224 * server.c (main): Check for inferior exit before main loop.
16225
16226 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16227
16228 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16229 instead of on tmp_desc.
16230
16231 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16232 Daniel Jacobowitz <dan@codesourcery.com>
16233
16234 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16235 (add_thread): Minor cleanups.
16236 (clear_inferiors): Move lower in the file. Clear the DLL
16237 list.
16238 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16239 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16240 (xml_escape_text): New.
16241 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16242 for qSupported.
16243 (handle_v_cont): Report errors.
16244 (gdbserver_version): Update.
16245 (main): Correct size of own_buf. Do not report initial DLL events.
16246 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16247 (unloaded_dll, xml_escape_text): New.
16248 * win32-low.c (enum target_waitkind): Update comments.
16249 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16250 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16251 (win32_EnumProcessModules, win32_GetModuleInformation)
16252 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16253 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16254 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16255 (win32_Module32First, win32_Module32Next, load_toolhelp)
16256 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16257 (get_child_debug_event): Handle DLL events.
16258 (win32_wait): Likewise.
16259
16260 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16261
16262 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16263 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16264
16265 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16266
16267 * win32-low.c (handle_output_debug_string): Ignore event if not
16268 waiting.
16269
16270 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16271
16272 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16273
16274 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16275
16276 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16277
16278 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16279
16280 * inferiors.c (change_inferior_id): Add comment.
16281 * linux-low.c (check_removed_breakpoint): Add an early
16282 prototype. Improve debug output.
16283 (linux_attach): Doc update.
16284 (linux_detach_one_process, linux_detach): Clean up before releasing
16285 each process.
16286 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16287 * linux-low.h (struct process_info): Doc improvement.
16288 * mem-break.c (delete_all_breakpoints): New.
16289 * mem-break.h (delete_all_breakpoints): New prototype.
16290 * thread-db.c (find_first_thread): New.
16291 (thread_db_create_event): Call it instead of
16292 thread_db_find_new_threads. Clean up unused variables.
16293 (maybe_attach_thread): Remove first thread handling.
16294 (thread_db_find_new_threads): Use find_first_thread.
16295 (thread_db_get_tls_address): Likewise.
16296
16297 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16298
16299 * thread-db.c (thread_db_find_new_threads): Add prototype.
16300 (thread_db_create_event): Check for the main thread before adding
16301 a new thread.
16302 (maybe_attach_thread): Only enable event reporting if TID == 0.
16303 (thread_db_get_tls_address): Check for new threads.
16304
16305 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16306
16307 * linux-low.c (linux_create_inferior): Try execv before execvp.
16308 * spu-low.c (spu_create_inferior): Likewise.
16309
16310 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16311
16312 * linux-low.c (linux_create_inferior): Change execv to execvp.
16313 * spu-low.c (spu_create_inferior): Likewies.
16314
16315 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16316
16317 * Makefile.in (clean): Clean new files instead of deleted ones.
16318 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16319 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16320 rules.
16321 * configure.srv: Specify XML files and new regformats for MIPS and
16322 MIPS64 GNU/Linux.
16323 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16324 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16325 an entry for the restart register.
16326 (mips_cannot_fetch_register, mips_cannot_store_register)
16327 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16328 register names to match the XML descriptions.
16329 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16330 restart register instead of $0.
16331
16332 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16333 Markus Deuling <deuling@de.ibm.com>
16334
16335 * remote-utils.c (decode_xfer_write): New function.
16336 * server.h (decode_xfer_write): Add prototype.
16337 * server.c (handle_query): Add PACKET_LEN argument. Support
16338 qXfer:spu:read and qXfer:spu:write packets.
16339 (main): Pass packet_len to handle_query.
16340 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16341 * target.h (target_ops): Add qxfer_spu.
16342
16343 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16344
16345 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16346 accessing non-seekable spufs files.
16347
16348 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16349
16350 * server.c (handle_query): Add reply for qC packet.
16351
16352 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16353 Leo Zayas <lerele@champenstudios@com>
16354
16355 * server.h (check_remote_input_interrupt_request): New function.
16356 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16357 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16358 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16359 (check_remote_input_interrupt_request): New function.
16360 * server.h (check_remote_input_interrupt_request): Declare.
16361 * win32-low.c (winapi_DebugBreakProcess,
16362 winapi_GenerateConsoleCtrlEvent): New typedefs.
16363 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16364 to 250 ms.
16365 (win32_wait): Check for remote interrupt request
16366 with check_remote_input_interrupt_request.
16367 (win32_request_interrupt): New function.
16368 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16369
16370 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16371
16372 * win32-low.c (debug_registers_changed,
16373 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16374 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16375 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16376 (thread_rec): Get context using the low target.
16377 (child_add_thread): Call thread_added on the low target,
16378 which does the same thing.
16379 (regptr): Delete.
16380 (do_initial_child_stuff): Remove debug registers references.
16381 Set context using the low target. Resume threads after
16382 setting the contexts.
16383 (child_continue): Remove dead variable. Remove debug
16384 registers references.
16385 (child_fetch_inferior_registers): Go through the low target.
16386 (do_child_store_inferior_registers): Remove.
16387 (child_store_inferior_registers): Go through the low target.
16388 (win32_resume): Remove debug registers references.
16389 Set context using the low target.
16390 (handle_exception): Change return type to void. Don't record
16391 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16392 first chance exception.
16393 (get_child_debug_event): Change return type to void. Remove
16394 goto loop. Always return after waiting for debug event.
16395 (win32_wait): Convert to switch statement. Handle spurious
16396 events.
16397
16398 * win32-i386-low.c (debug_registers_changed,
16399 debug_registers_used): New.
16400 (initial_stuff): Rename to ...
16401 (i386_initial_stuff): ... this. Clear debug registers
16402 state variables.
16403 (store_debug_registers): Delete.
16404 (i386_get_thread_context): New.
16405 (load_debug_registers): Delete.
16406 (i386_set_thread_context): New.
16407 (i386_thread_added): New.
16408 (single_step): Rename to ...
16409 (i386_single_step): ... this.
16410 (do_fetch_inferior_registers): Rename to ...
16411 (i386_fetch_inferior_register): ... this.
16412 (i386_store_inferior_register): New.
16413 (the_low_target): Adapt to new interface.
16414
16415 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16416 (arm_get_thread_context): New.
16417 (arm_set_thread_context): New.
16418 (regptr): New.
16419 (do_fetch_inferior_registers): Rename to ...
16420 (arm_fetch_inferior_register): ... this.
16421 (arm_store_inferior_register): New.
16422 (arm_wince_breakpoint): Reimplement as unsigned long.
16423 (arm_wince_breakpoint_len): Define.
16424 (the_low_target): Adapt to new interface.
16425
16426 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16427 load_debug_registers. Add get_thread_context, set_thread_context,
16428 thread_added and store_inferior_register. Rename
16429 fetch_inferior_registers to fetch_inferior_register.
16430 (regptr): Remove declaration.
16431
16432 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16433
16434 * linux-low.c (linux_detach): Change return type to int. Return 0.
16435 * spu-low.c (spu_detach): Likewise.
16436
16437 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16438
16439 * target.h (target_ops): Change return type of detach to int.
16440 Add join.
16441 (join_inferior): New.
16442 * server.c (main): Don't skip detach support on mingw32.
16443 If the inferior doesn't support detaching return error.
16444 Call join_inferior instead of using waitpid.
16445 * linux-low.c (linux_join): New.
16446 (linux_target_op): Add linux_join.
16447 * spu-low.c (spu_join): New.
16448 (spu_target_ops): Add spu_join.
16449 * win32-low.c (win32_detach): Adapt to new interface.
16450 Reopen current_process_handle before detaching. Issue a child
16451 resume before detaching.
16452 (win32_join): New.
16453 (win32_target_op): Add win32_join.
16454
16455 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16456
16457 * win32-low.c (win32-attach): Fix return value.
16458 * target.h (target_ops): Describe ATTACH return values.
16459
16460 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16461
16462 * win32-low.c (GETPROCADDRESS): Define.
16463 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16464 (winapi_DebugSetProcessKillOnExit): Likewise.
16465 (win32_create_inferior): Force usage of ansi CreateProcessA.
16466 (win32_attach): Use GETPROCADDRESS.
16467 (win32_detach): Likewise.
16468
16469 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16470
16471 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16472
16473 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16474
16475 * win32-low.c: Commit leftover changes from 2007-03-29.
16476
16477 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16478
16479 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16480 fields short instead of int. Add explicit padding.
16481 (i387_cache_to_fsave): Remove unnecessary casts.
16482 (i387_fsave_to_cache): Doc fix.
16483 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16484
16485 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16486
16487 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16488 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16489
16490 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16491
16492 * configure.srv (arm*-*-mingw32ce*): Move near the other
16493 arm targets.
16494
16495 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16496
16497 * configure.ac: Add errno checking.
16498 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16499 sys/file.h and malloc.h.
16500 (AC_CHECK_DECLS): Add perror.
16501 (srv_mingwce): Handle.
16502 * configure.srv (i[34567]86-*-cygwin*): Add
16503 win32-i386-low.o to srv_tgtobj.
16504 (i[34567]86-*-mingw*): Likewise.
16505 (arm*-*-mingw32ce*): Add case.
16506 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16507 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16508 [__MINGW32CE__] (strerror): New function.
16509 [__MINGW32CE__] (errno): Define to GetLastError.
16510 [__MINGW32CE__] (COUNTOF): New macro.
16511 (remote_open): Remove extra close call.
16512 * mem-break.c (delete_breakpoint_at): New function.
16513 * mem-break.h (delete_breakpoint_at): Declare.
16514 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16515 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16516 [USE_WIN32API] (read, write): Add char* casts.
16517 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16518 * server.h: Include wincecompat.h on Windows CE.
16519 [HAVE_ERRNO_H]: Check.
16520 (perror): Declare if not declared.
16521 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16522 (perror_with_name): Remove errno declaration.
16523 * wincecompat.h: New.
16524 * wincecompat.c: New.
16525 * win32-low.h: New.
16526 * win32-arm-low.c: New.
16527 * win32-i386-low.c: New.
16528 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16529 (OUTMSG2): Make it safe.
16530 (_T): New macro.
16531 (COUNTOF): New macro.
16532 (NUM_REGS): Get it from the low target.
16533 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16534 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16535 (thread_rec): Let low target handle debug registers.
16536 (child_add_thread): Likewise.
16537 (child_init_thread_list): Likewise.
16538 (continue_one_thread): Likewise.
16539 (regptr): New.
16540 (do_child_fetch_inferior_registers): Move to ...
16541 * win32-i386-low.c: ... here, and rename to ...
16542 (do_fetch_inferior_registers): ... this.
16543 * win32-low.c (child_fetch_inferior_registers):
16544 Go through the low target.
16545 (do_child_store_inferior_registers): Use regptr.
16546 (strwinerror): New function.
16547 (win32_create_inferior): Handle Windows CE.
16548 Use strwinerror instead of strerror on Windows error
16549 codes. Add program to the error output.
16550 Don't close the main thread handle on Windows CE.
16551 (win32_attach): Use coredll.dll on Windows CE.
16552 (win32_kill): Close current process and current
16553 thread handles.
16554 (win32_detach): Use coredll.dll on Windows CE.
16555 (win32_resume): Let low target handle debug registers, and
16556 step request.
16557 (handle_exception): Add/Remove initial breakpoint. Avoid
16558 non-existant WSTOPSIG on Windows CE.
16559 (win32_read_inferior_memory): Cast to remove warning.
16560 (win32_arch_string): Go through the low target.
16561 (initialize_low): Call set_breakpoint_data with the low
16562 target's breakpoint.
16563 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16564 FOP_REGNUM, mappings): Move to ...
16565 * win32-i386-low.c: ... here.
16566 * win32-low.c (win32_thread_info): Move to ...
16567 * win32-low.h: ... here.
16568 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16569 win32-arm-low.c and wincecompat.c.
16570 (all:): Add $EXEEXT.
16571 (install-only:): Likewise.
16572 (gdbserver:): Likewise.
16573 (gdbreplay:): Likewise.
16574 * config.in: Regenerate.
16575 * configure: Regenerate.
16576
16577 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16578
16579 * win32-low.c: Rename typedef thread_info to
16580 win32_thread_info throughout.
16581
16582 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16583
16584 * win32-i386-low.c: Rename to ...
16585 * win32-low.c: ... this.
16586 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16587 * Makefile.in: Likewise.
16588
16589 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16590
16591 * remote-utils.c (monitor_output): Constify msg parameter.
16592 * server.h (monitor_output): Likewise.
16593 * win32-i386-low.c (handle_output_debug_string): New.
16594 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16595 handle_output_debug_string.
16596 (get_child_debug_event): Likewise.
16597
16598 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16599
16600 * server.c (main): Correct strtoul check.
16601
16602 2007-03-27 Jon Ringle <jon@ringle.org>
16603
16604 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16605
16606 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16607
16608 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16609
16610 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16611
16612 * terminal.h: Check HAVE_SGTTY_H.
16613
16614 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16615
16616 * remote-utils.c (remote_open): Print out the assigned port number.
16617
16618 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16619
16620 * remote-utils.c (monitor_output): New function.
16621 * server.c (debug_threads): Define here.
16622 (monitor_show_help): New function.
16623 (handle_query): Handle qRcmd.
16624 (main): Do not handle 'd' packet.
16625 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16626 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16627 of debug_threads.
16628
16629 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16630
16631 * Makefile.in (EXEEXT): New.
16632 (clean): Use $(EXEEXT).
16633
16634 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16635
16636 * target.h (target_ops): Rename send_signal to request_interrupt,
16637 and remove enum target_signal parameter.
16638 * linux-low.c (linux_request_interrupt): Rename from
16639 linux_send_signal, and always send SIGINT.
16640 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16641 and always send SIGINT.
16642 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16643 of send_signal.
16644 (input_interrupt): Likewise.
16645
16646 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16647
16648 * server.c (get_features_xml): Check if target implemented
16649 arch_string.
16650 * win32-i386-low.c (win32_arch_string): New.
16651 (win32_target_ops): Add win32_arch_string as arch_string member.
16652
16653 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16654
16655 * spu-low.c (spu_arch_string): New.
16656 (spu_target_ops): Add spu_arch_string.
16657
16658 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16659
16660 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16661 * configure.ac: Do not check for terminal.h.
16662 * configure, config.in: Regenerated.
16663
16664 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16665
16666 * Makefile.in (OBS): Add $(XML_BUILTIN).
16667 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16668 (clean): Update.
16669 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16670 (arm-with-iwmmxt.c): New.
16671 * config.in, configure: Regenerate.
16672 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16673 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16674 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16675 (arm*-*-linux*): Add iWMMXt and regset support.
16676 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16677 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16678 (arm_store_wmmxregset, target_regsets): New.
16679 * server.c (get_features_xml): Take annex argument. Check builtin
16680 XML documents.
16681 (handle_query): Handle multiple annexes.
16682
16683 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16684
16685 * remote-utils.c [USE_WIN32API] (read, write): Define.
16686 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16687 write.
16688
16689 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16690
16691 * linux-i386-low.c (the_low_target): Set arch_string.
16692 * linux-x86-64-low.c (the_low_target): Likewise.
16693 * linux-low.c (linux_arch_string): New.
16694 (linux_target_ops): Add it.
16695 * linux-low.h (struct linux_target_ops): Add arch_string.
16696 * server.c (write_qxfer_response): Use const void * for DATA.
16697 (get_features_xml): New.
16698 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16699 * target.h (struct target_ops): Add arch_string method.
16700
16701 2007-01-03 Denis Pilat <denis.pilat@st.com>
16702 Daniel Jacobowitz <dan@codesourcery.com>
16703
16704 * linux-low.c (linux_kill): Handle being called with no threads.
16705 * win32-i386-low.c (win32_kill): Likewise.
16706 (get_child_debug_event): Clear current_process_handle.
16707
16708 2006-12-30 Denis PILAT <denis.pilat@st.com>
16709 Daniel Jacobowitz <dan@codesourcery.com>
16710
16711 * remote-utils.c (remote_open): Check the type of specified
16712 serial port devices before opening them.
16713 * server.c (main): Kill the inferior if an error occurs during
16714 the first remote_open.
16715
16716 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16717
16718 * README: Update supported targets.
16719
16720 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16721
16722 * Makefile.in (clean): Remove reg-mips64.c.
16723 (reg-mips64.c, reg-mips64.o): New rules.
16724 * configure.srv: Handle mips64. Include regset support for mips.
16725 * linux-mips-low.c (union mips_register): New.
16726 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16727 (mips_breakpoint, mips_breakpoint_at): Use int.
16728 (mips_collect_register, mips_supply_register)
16729 (mips_collect_register_32bit, mips_supply_register_32bit)
16730 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16731 (mips_store_fpregset, target_regsets): New.
16732 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16733
16734 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16735
16736 * configure.srv: Add target "spu*-*-*".
16737 * Makefile.in (clean): Remove reg-spu.c.
16738 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16739 * spu-low.c: New file.
16740
16741 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16742
16743 * configure.ac: Correct td_thr_tls_get_addr test.
16744 * configure: Regenerated.
16745
16746 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16747
16748 * linux-low.c (linux_wait_for_event): Reformat. Use the
16749 pass_signals array.
16750 * remote-utils.c (decode_address_to_semicolon): New.
16751 * server.c (pass_signals, handle_general_set): New.
16752 (handle_query): Mention QPassSignals for qSupported.
16753 (main): Call handle_general_set.
16754 * server.h (pass_signals, decode_address_to_semicolon): New.
16755
16756 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16757
16758 * server.c (handle_query): Correct error handling for read_auxv.
16759
16760 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16761
16762 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16763 and srv_linux_thread_db to yes.
16764 * linux-s390-low.c (s390_fill_gregset): New function.
16765 (target_regsets): Define data structure.
16766
16767 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16768
16769 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16770 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16771 * config.in, configure: Regenerated.
16772 * inferiors.c (gdb_id_to_thread): New function.
16773 (gdb_id_to_thread_id): Use it.
16774 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16775 * linux-low.h (struct process_info): Add th member.
16776 (thread_db_get_tls_address): New prototype.
16777 * remote-utils.c (decode_address): Make non-static.
16778 * server.c (handle_query): Handle qGetTLSAddr.
16779 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16780 * target.h (struct target_ops): Add get_tls_address.
16781 * thread-db.c (maybe_attach_thread): Save the thread handle.
16782 (thread_db_get_tls_address): New.
16783
16784 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16785
16786 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16787 (linux_resume_one_process): Take a siginfo_t *. Update all
16788 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16789 (struct pending_signals): Add a siginfo_t.
16790 (linux_wait_for_process): Always set last_status.
16791 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16792 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16793 * linux-low.h (struct process_info): Add last_status.
16794
16795 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16796
16797 * remote-utils.c (try_rle): New function.
16798 (putpkt_binary): Use it.
16799
16800 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16801
16802 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16803 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16804 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16805 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16806 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16807 point registers.
16808
16809 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16810
16811 * server.c (terminal_fd): New variable.
16812 (old_foreground_pgrp): Likewise.
16813 (restore_old_foreground_pgrp): New function.
16814 (start_inferior): Record the terminal file descriptor in terminal_fd
16815 and its original foreground group in old_foreground_pgrp. Register
16816 restore_old_foreground_pgrp with atexit().
16817
16818 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16819
16820 * server.c (handle_query): Correct qPart to qXfer.
16821
16822 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16823
16824 * configure.ac: Check for more headers which are missing on
16825 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16826 * configure.srv: Add Cygwin and mingw32.
16827 * remote-utils.c: Don't include headers unconditionally which
16828 are missing on mingw32. Include <winsock.h> for mingw32.
16829 (remote_open): Adjust for mingw32 support. Flush
16830 standard error after writing to it.
16831 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16832 (unblock_async_io, enable_async_io, disable_async_io)
16833 (readchar, getpkt): Update for Winsock support.
16834 (prepare_resume_reply): Expect a protocol signal number.
16835 * server.c: Disable <sys/wait.h> on mingw32.
16836 (start_inferior): Adjust for mingw32 support. Flush
16837 standard error after writing to it.
16838 (attach_inferior): Likewise. Use protocol signal
16839 numbers.
16840 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16841 and names.
16842 * win32-i386-low.c: New file.
16843 * Makefile.in (XM_CLIBS): Set.
16844 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16845 (win32-i386-low.o): New dependency rule.
16846 * linux-low.c (linux_wait): Use target signal numbers.
16847 * target.h (struct target_ops): Doc fix.
16848 * server.h (target_signal_to_name): New prototype.
16849 * gdbreplay.c: Don't include headers unconditionally which
16850 are missing on mingw32. Include <winsock.h> for mingw32.
16851 (remote_close, remote_open): Adjust for Winsock support.
16852 * configure, config.in: Regenerated.
16853
16854 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16855
16856 * server.c (decode_xfer_read, write_qxfer_response): New.
16857 (handle_query): Take a packet length argument. Handle
16858 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16859 the qSupported response.
16860 (main): Update call to handle_query.
16861
16862 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16863
16864 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16865 (putpkt_binary): Renamed from putpkt and adjusted for binary
16866 data.
16867 (putpkt): New wrapper for putpkt_binary.
16868 (readchar): Don't mask off the high bit.
16869 (decode_X_packet): New function.
16870 * server.c (main): Call putpkt_binary if a handler sets the packet
16871 length. Save the length of the incoming packet. Handle 'X'.
16872 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16873
16874 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16875
16876 * server.c (handle_query): Handle qSupported.
16877
16878 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16879
16880 * remote-utils.c (all_symbols_looked_up): New variable.
16881 (look_up_one_symbol): Check it.
16882 * server.h (look_up_one_symbol): New declaration.
16883 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16884
16885 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16886
16887 * Makefile.in (linux-arm-low.o): Update dependencies.
16888 * linux-arm-low.c: Include "gdb_proc_service.h".
16889 (PTRACE_GET_THREAD_AREA): Define.
16890 (ps_get_thread_area): New function.
16891
16892 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16893
16894 * configure.srv (m68k*-*-uclinux*): New target.
16895 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16896 (linux_resume_one_process): Remove extraneous cast.
16897 (linux_read_offsets): New.
16898 (linux_target_op): Add linux_read_offsets on mmuless systems.
16899 * server.c (handle_query): Add qOffsets logic.
16900 * target.h (struct target_ops): Add read_offsets.
16901
16902 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16903
16904 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16905 (PTRACE_GET_THREAD_AREA): Define.
16906 (ps_get_thread_area): New function.
16907 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16908 (linux-x86-64-low.o): Update.
16909
16910 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16911
16912 * configure.ac: Remove checks for prfpregset_t.
16913 * gdb_proc_service.h: New file.
16914 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16915 new "gdb_proc_service.h".
16916 * proc-service.c: Likewise.
16917 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16918 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16919 * Makefile.in (gdb_proc_service_h): Updated.
16920 * configure, config.in: Regenerated.
16921
16922 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16923
16924 * remote-utils.c (prepare_resume_reply): Move declaration
16925 of gdb_id_from_wait to the top of the block.
16926
16927 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16928
16929 * linux-low.c (regsets_store_inferior_registers): Read the regset
16930 from the target before filling it.
16931
16932 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16933
16934 * server.c (attach_inferior): Return SIGTRAP for a successful
16935 attach.
16936
16937 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16938
16939 * Makefile.in (OBS): Add version.o.
16940 (STAGESTUFF): Delete.
16941 (version.o): Add dependencies.
16942 (version.c): Replace rule.
16943 (clean): Remove version.c.
16944 * server.c (gdbserver_version): New.
16945 (gdbserver_usage): Use printf.
16946 (main): Handle --version and --help.
16947 * server.h (version, host_name): Add declarations.
16948
16949 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16950
16951 * linux-arm-low.c:
16952 * linux-arm-low.c:
16953 * inferiors.c:
16954 * i387-fp.h:
16955 * i387-fp.c:
16956 * gdbreplay.c:
16957 * regcache.c:
16958 * proc-service.c:
16959 * mem-break.h:
16960 * mem-break.c:
16961 * linux-x86-64-low.c:
16962 * linux-sh-low.c:
16963 * linux-s390-low.c:
16964 * linux-ppc64-low.c:
16965 * linux-ppc-low.c:
16966 * linux-mips-low.c:
16967 * linux-m68k-low.c:
16968 * linux-m32r-low.c:
16969 * linux-low.h:
16970 * linux-low.c:
16971 * linux-ia64-low.c:
16972 * linux-i386-low.c:
16973 * linux-crisv32-low.c:
16974 * thread-db.c:
16975 * terminal.h:
16976 * target.h:
16977 * target.c:
16978 * server.h:
16979 * server.c:
16980 * remote-utils.c:
16981 * regcache.h:
16982 * utils.c:
16983 * Makefile.in:
16984 * configure.ac:
16985 * gdbserver.1: Add (C) after Copyright. Update the FSF
16986 address.
16987
16988 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16989
16990 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16991 (arm_breakpoint_at): Recognize both breakpoints.
16992 (the_low_target): Use the correct breakpoint instruction.
16993
16994 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16995
16996 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16997 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16998 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16999 (the_low_target): Update.
17000
17001 2005-10-25 Andreas Schwab <schwab@suse.de>
17002
17003 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17004
17005 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17006 (ia64_num_regs): Reduce to 462.
17007
17008 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17009
17010 * acinclude.m4: Correct quoting.
17011 * aclocal.m4: Regenerated.
17012
17013 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17014 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17015 (thread_db_init): Call thread_db_err_str.
17016 * configure.ac: Check for TD_VERSION.
17017 * config.in, configure: Regenerated.
17018
17019 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17020
17021 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17022
17023 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17024
17025 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17026 is not available. Define HAVE_PTRACE_GETREGS if it is.
17027 * config.in, configure: Regenerated.
17028 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17029 * linux-i386-low.c, linux-m68k-low.c: Update to use
17030 HAVE_PTRACE_GETREGS.
17031 * linux-low.c (regsets_fetch_inferior_registers)
17032 (regsets_store_inferior_registers): Only return 0 if we processed
17033 GENERAL_REGS.
17034 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17035 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17036
17037 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17038
17039 * inferiors.c (struct thread_info): Add gdb_id.
17040 (add_thread): Add gdb_id argument.
17041 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17042 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17043 calls to add_thread.
17044 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17045 * server.c (handle_query): Use thread_to_gdb_id.
17046 (handle_v_cont, main): Use gdb_id_to_thread_id.
17047 * server.h (add_thread): Update prototype.
17048 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17049 prototypes.
17050
17051 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17052
17053 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17054 left-padded registers.
17055 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17056 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17057
17058 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17059
17060 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17061 * configure: Regenerate.
17062 * config.in: Regenerate.
17063 * server.h (NEED_DECLARATION_STRERROR):
17064 Replace with !HAVE_DECL_STRERROR.
17065
17066 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17067
17068 * linux-low.c (linux_wait, linux_send_signal): Don't test
17069 an unsigned long variable for > 0 if it could be MAX_ULONG.
17070 * server.c (myresume): Likewise.
17071 * target.c (set_desired_inferior): Likewise.
17072
17073 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17074
17075 * configure.ac: Simplify and improve check for socklen_t.
17076 * configure, config.in: Regenerate.
17077
17078 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17079
17080 * acconfig.h: Remove.
17081 * configure.ac: Add a test for socklen_t. Use three-argument
17082 AC_DEFINE throughout.
17083 * config.in: Regenerated using autoheader 2.59.
17084 * configure: Regenerated.
17085
17086 * gdbreplay.c (socklen_t): Provide a default.
17087 (remote_open): Use socklen_t.
17088 * remote-utils.c (socklen_t): Provide a default.
17089 (remote_open): Use socklen_t.
17090 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17091 unsigned char.
17092
17093 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17094 char for buffers.
17095 * linux-low.c (linux_read_memory, linux_write_memory)
17096 (linux_read_auxv): Likewise.
17097 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17098 (check_mem_write): Likewise.
17099 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17100 Likewise.
17101 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17102 (registers_from_string, register_data): Likewise.
17103 * server.c (handle_query, main): Likewise.
17104 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17105 (decode_M_packet): Likewise.
17106 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17107 * target.h (struct target_ops): Update read_memory, write_memory,
17108 and read_auxv.
17109 (read_inferior_memory, write_inferior_memory): Update.
17110 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17111 to unsigned char *.
17112 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17113 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17114 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17115 linux-s390-low.c, linux-sh-low.c: Update for changes in
17116 read_inferior_memory and the_low_target->breakpoint.
17117
17118 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17119
17120 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17121 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17122 * configure.srv: Add powerpc64-*-linux*.
17123 * linux-ppc64-low.c: New file.
17124
17125 2005-05-23 Orjan Friberg <orjanf@axis.com>
17126
17127 * linux-cris-low.c: New file with support for CRIS.
17128 * linux-crisv32-low.c: Ditto for CRISv32.
17129 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17130 (clean): Add reg-cris.c and reg-crisv32.c.
17131 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17132 reg-crisv32.o, and reg-crisv32.c to make rules.
17133 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17134 recognized targets.
17135
17136 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17137
17138 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17139 of sizeof (PTRACE_XFER_TYPE).
17140 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17141
17142 2005-05-12 Orjan Friberg <orjanf@axis.com>
17143
17144 * target.h (struct target_ops): Add insert_watchpoint,
17145 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17146 pointers for hardware watchpoint support.
17147 * linux-low.h (struct linux_target_ops): Ditto.
17148 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17149 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17150 to linux_target_ops.
17151 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17152 reply packet.
17153 * server.c (main): Recognize 'Z' and 'z' packets.
17154
17155 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17156
17157 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17158 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17159 (the_low_target): Add new members.
17160
17161 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17162
17163 * proc-service.c (ps_lgetregs): Search all_processes instead of
17164 all_threads.
17165
17166 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17167
17168 * server.c (start_inferior): Change return type to int.
17169 (attach_inferior): Change sigptr to int *.
17170 (handle_v_cont, handle_v_requests): Change signal to int *.
17171 (main): Change signal to int.
17172
17173 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17174
17175 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17176 * configure.srv: Add m32r*-*-linux*.
17177 * linux-m32r-low.c: New file.
17178
17179 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17180
17181 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17182
17183 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17184
17185 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17186 Take unsigned long arguments for PIDs.
17187 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17188 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17189 (wait_for_sigstop, linux_resume_one_process)
17190 (regsets_fetch_inferior_registers, linux_send_signal)
17191 (linux_read_auxv): Likewise. Update the types of variables holding
17192 PIDs. Update format string specifiers.
17193 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17194 * remote-utils.c (prepare_resume_reply): Likewise.
17195 * server.c (cont_thread, general_thread, step_thread)
17196 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17197 unsigned long.
17198 (handle_query): Update format specifiers.
17199 (handle_v_cont, main): Use strtoul for thread IDs.
17200 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17201 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17202 (general_thread, step_thread, thread_from_wait)
17203 (old_thread_from_wait): Update.
17204 * target.h (struct thread_resume): Use unsigned long for THREAD.
17205 (struct target_ops): Use unsigned long for arguments to attach and
17206 thread_alive.
17207
17208 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17209
17210 * acinclude.m4: Include bfd/bfd.m4 directly.
17211 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17212 <agriffis@toolchain.org>.
17213 * aclocal.m4, configure: Regenerated.
17214
17215 2005-01-07 Andrew Cagney <cagney@gnu.org>
17216
17217 * configure.ac: Rename configure.in, require autoconf 2.59.
17218 * configure: Re-generate.
17219
17220 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17221
17222 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17223 LIBS when finished.
17224 * aclocal.m4: Regenerated.
17225 * configure: Regenerated.
17226
17227 2004-11-21 Andreas Schwab <schwab@suse.de>
17228
17229 * linux-m68k-low.c (m68k_num_gregs): Define.
17230 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17231 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17232 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17233 (m68k_breakpoint_at): New. Add to the_low_target.
17234
17235 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17236 srv_linux_thread_db to yes.
17237
17238 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17239
17240 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17241 (ARCH_SET_FS): Likewise.
17242 (ARCH_GET_FS): Likewise.
17243 (ARCH_GET_GS): Likewise.
17244
17245 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17246
17247 * linux-i386-low.c (ps_get_thread_area): New.
17248 * linux-x86-64-low.c (ps_get_thread_area): New.
17249 * linux-low.c: Include <sys/syscall.h>.
17250 (linux_kill_one_process): Don't kill the first thread here.
17251 (linux_kill): Kill the first thread here.
17252 (kill_lwp): New function.
17253 (send_sigstop, linux_send_signal): Use it.
17254 * proc-service.c: Clean up #ifdefs.
17255 (fpregset_info): Delete.
17256 (ps_lgetregs): Update and enable implementation.
17257 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17258 implementations.
17259 * remote-utils.c (struct sym_cache, symbol_cache): New.
17260 (input_interrupt): Print a clearer message.
17261 (async_io_enabled): New variable.
17262 (enable_async_io, disable_async_io): Use it. Update comments.
17263 (look_up_one_symbol): Use the symbol cache.
17264 * thread-db.c (thread_db_look_up_symbols): New function.
17265 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17266
17267 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17268
17269 * configure.in: Test for -rdynamic.
17270 * configure: Regenerated.
17271 * Makefile (INTERNAL_LDFLAGS): New.
17272 (gdbserver, gdbreplay): Use it.
17273
17274 2004-09-02 Andrew Cagney <cagney@gnu.org>
17275
17276 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17277
17278 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17279
17280 * linux-low.c (linux_wait): Clear all_processes list also.
17281
17282 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17283
17284 * linux-low.c: Include <errno.h>. Remove extern declaration of
17285 errno.
17286
17287 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17288
17289 * gdbreplay.c, server.h, utils.c: Update copyright years.
17290
17291 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17292
17293 * server.c (main): Print child status or termination signal from
17294 variable 'signal', not 'sig'.
17295
17296 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17297
17298 * linux-low.c (linux_read_memory): Change return type to
17299 int. Check for and return error from ptrace().
17300 * target.c (read_inferior_memory): Change return type to int. Pass
17301 back return status from the_target->read_memory().
17302 * target.h (struct target_ops): Adapt *read_memory() prototype.
17303 Update comment.
17304 (read_inferior_memory): Adapt prototype.
17305 * server.c (main): Return an error packet if
17306 read_inferior_memory() returns an error.
17307
17308 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17309
17310 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17311 Unify with other clean targets.
17312
17313 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17314
17315 * server.c (handle_v_cont): Call set_desired_inferior.
17316
17317 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17318
17319 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17320
17321 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17322
17323 * linux-low.c (linux_wait): Unblock async I/O.
17324 (linux_resume): Block and enable async I/O.
17325 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17326 * server.h (block_async_io, unblock_async_io): Add prototypes.
17327
17328 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17329
17330 * remote-utils.c (remote_open): Print a status notice after
17331 opening a TCP port.
17332 * server.c (attach_inferior): Print a status notice after
17333 attaching.
17334
17335 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17336
17337 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17338
17339 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17340
17341 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17342 error packet.
17343 * server.c, target.h: Update copyright years.
17344
17345 2004-02-25 Roland McGrath <roland@redhat.com>
17346
17347 * target.h (struct target_ops): New member `read_auxv'.
17348 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17349 * linux-low.c (linux_read_auxv): New function.
17350 (linux_target_ops): Initialize `read_auxv' member to that.
17351
17352 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17353
17354 Committed by Jim Blandy <jimb@redhat.com>.
17355
17356 * linux-s390-low.c (s390_num_regs): Update.
17357 (s390_regmap): Remove control registers. Use __s390x__ predefine
17358 instead of GPR_SIZE to distiguish s390 and s390x targets.
17359
17360 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17361
17362 * linux-low.c: Update copyright year.
17363 (check_removed_breakpoint): Clear pending_is_breakpoint.
17364 (linux_set_resume_request, linux_queue_one_thread)
17365 (resume_status_pending_p): New functions.
17366 (linux_continue_one_thread): Use process->resume.
17367 (linux_resume): Only resume threads if there are no pending events.
17368 * linux-low.h (struct process_info): Add resume request
17369 pointer.
17370
17371 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17372
17373 * regcache.c (new_register_cache): Clear the allocated register
17374 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17375
17376 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17377
17378 * linux-low.c (linux_resume): Take a struct thread_resume *
17379 argument.
17380 (linux_wait): Update call.
17381 (resume_ptr): New static variable.
17382 (linux_continue_one_thread): Renamed from
17383 linux_continue_one_process. Use resume_ptr.
17384 (linux_resume): Use linux_continue_one_thread.
17385 * server.c (handle_v_cont, handle_v_requests): New functions.
17386 (myresume): New function.
17387 (main): Handle 'v' case.
17388 * target.h (struct thread_resume): New type.
17389 (struct target_ops): Change argument of "resume" to struct
17390 thread_resume *.
17391 (myresume): Delete macro.
17392
17393 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17394
17395 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17396 (uninstall): Support DESTDIR.
17397
17398 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17399
17400 * configure.srv: Add xscale*linux copy of arm*linux entry.
17401
17402 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17403
17404 * linux-arm-low.c (arm_reinsert_addr): New function.
17405 (the_low_target): Add arm_reinsert_addr.
17406
17407 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17408
17409 * mem-break.c: Remove whitespace at end of file.
17410
17411 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17412
17413 * configure.in: Check whether we need to prototype strerror.
17414 * server.h: Optionally prototype strerror.
17415 * gdbreplay.c (perror_with_name): Use strerror.
17416 * linux-low.c (linux_attach_lwp): Use strerror.
17417 * utils.c (perror_with_name): Use strerror.
17418 * config.in, configure: Regenerated.
17419
17420 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17421
17422 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17423 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17424
17425 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17426
17427 * Makefile.in (SFILES): Update.
17428 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17429 low-sun3.c: Remove files.
17430
17431 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17432
17433 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17434 (linux_detach_one_process, linux_detach): New functions.
17435 (linux_target_ops): Add linux_detach.
17436 * server.c (main): Handle 'D' packet.
17437 * target.h (struct target_ops): Add "detach" member.
17438 (detach_inferior): Define.
17439
17440 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17441
17442 From Kelley Cook <kelleycook@wideopenwest.com>:
17443 * configure.srv: Accept i[34567]86 variants.
17444
17445 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17446
17447 * linux-low.c (linux_wait_for_event): Correct comment typos.
17448 (linux_resume_one_process): Call check_removed_breakpoint.
17449 (linux_send_signal): New function.
17450 (linux_target_ops): Add linux_send_signal.
17451 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17452 of kill.
17453 * target.h (struct target_ops): Add send_signal.
17454
17455 2003-05-29 Jim Blandy <jimb@redhat.com>
17456
17457 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17458 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17459 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17460 away part of the register's value.
17461
17462 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17463
17464 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17465 (linux_wait_for_event, linux_init_signals): Likewise.
17466
17467 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17468
17469 * configure.in: Check for stdlib.h.
17470 * configure: Regenerated.
17471 * config.in: Regenerated.
17472
17473 2003-01-04 Andreas Schwab <schwab@suse.de>
17474
17475 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17476
17477 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17478
17479 * Makefile.in: Remove obsolete code.
17480
17481 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17482
17483 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17484 defined(PT_FPR0_HI).
17485
17486 2002-11-17 Stuart Hughes <seh@zee2.com>
17487
17488 * linux-arm-low.c (arm_num_regs): Increase.
17489 (arm_regmap): Include status register.
17490
17491 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17492
17493 * linux-low.c (register_addr): Remove incorrect -1 check.
17494
17495 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17496
17497 * linux-low.c (linux_create_inferior): Call setpgid. Return
17498 the new PID.
17499 (unstopped_p, linux_signal_pid): Remove.
17500 (linux_target_ops): Remove linux_signal_pid.
17501 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17502 global instead of target method.
17503 * target.h (struct target_ops): Remove signal_pid. Update comment
17504 for create_inferior.
17505 * server.c (signal_pid): New variable.
17506 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17507 gdbserver. Set the child to be the foreground process group.
17508 (attach_inferior): Set signal_pid.
17509
17510 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17511
17512 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17513
17514 2002-08-20 Jim Blandy <jimb@redhat.com>
17515
17516 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17517 default for this.
17518
17519 2002-08-01 Andrew Cagney <cagney@redhat.com>
17520
17521 * Makefile.in: Make chill references obsolete.
17522
17523 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17524
17525 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17526 * configure: Regenerate.
17527 * config.in: Regenerate.
17528
17529 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17530
17531 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17532 (perror_with_name, remote_close, remote_open, expect, play): Static.
17533
17534 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17535
17536 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17537 byte offsets instead of an array of indexes.
17538 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17539
17540 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17541
17542 * regcache.c: Add comment.
17543
17544 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17545
17546 * thread-db.c: New file.
17547 * proc-service.c: New file.
17548 * acinclude.m4: New file.
17549 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17550 proc-service.o, and thread-db.o.
17551 (linux-low.o): Add USE_THREAD_DB.
17552 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17553 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17554 * aclocal.m4: Regenerated.
17555 * config.in: Regenerated.
17556 * configure: Regenerated.
17557 * configure.in: Check for proc_service.h, sys/procfs.h,
17558 thread_db.h, and linux/elf.h headrs.
17559 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17560 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17561 Check for -lthread_db and thread support.
17562 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17563 PowerPC, and SuperH.
17564 * i387-fp.c: Constify arguments.
17565 * i387-fp.h: Likewise.
17566 * inferiors.c: (struct thread_info): Renamed from
17567 `struct inferior_info'. Remove PID member. Use generic inferior
17568 list header. All uses updated.
17569 (inferiors, signal_pid): Removed.
17570 (all_threads): New variable.
17571 (get_thread): Define.
17572 (add_inferior_to_list): New function.
17573 (for_each_inferior): New function.
17574 (change_inferior_id): New function.
17575 (add_inferior): Removed.
17576 (remove_inferior): New function.
17577 (add_thread): New function.
17578 (free_one_thread): New function.
17579 (remove_thread): New function.
17580 (clear_inferiors): Use for_each_inferior and free_one_thread.
17581 (find_inferior): New function.
17582 (find_inferior_id): New function.
17583 (inferior_target_data): Update argument type.
17584 (set_inferior_target_data): Likewise.
17585 (inferior_regcache_data): Likewise.
17586 (set_inferior_regcache_data): Likewise.
17587 * linux-low.c (linux_bp_reinsert): Remove.
17588 (all_processes, stopping_threads, using_thrads)
17589 (struct pending_signals, debug_threads, pid_of): New.
17590 (inferior_pid): Replace with macro.
17591 (struct inferior_linux_data): Remove.
17592 (get_stop_pc, add_process): New functions.
17593 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17594 Use add_process and add_thread.
17595 (linux_attach_lwp): New function, based on old linux_attach. Use
17596 add_process and add_thread. Set stop_expected for new threads.
17597 (linux_attach): New function.
17598 (linux_kill_one_process): New function.
17599 (linux_kill): Kill all LWPs.
17600 (linux_thread_alive): Use find_inferior_id.
17601 (check_removed_breakpoints, status_pending_p): New functions.
17602 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17603 Update. Use WNOHANG. Wait for cloned processes also. Update process
17604 struct for the found process.
17605 (linux_wait_for_event): New function.
17606 (linux_wait): Use it. Support LWPs.
17607 (send_sigstop, wait_for_sigstop, stop_all_processes)
17608 (linux_resume_one_process, linux_continue_one_process): New functions.
17609 (linux_resume): Support LWPs.
17610 (REGISTER_RAW_SIZE): Remove.
17611 (fetch_register): Use register_size instead. Call supply_register.
17612 (usr_store_inferior_registers): Likewise. Call collect_register.
17613 Fix recursive case.
17614 (regsets_fetch_inferior_registers): Improve error message.
17615 (regsets_store_inferior_registers): Add debugging.
17616 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17617 (unstopped_p, linux_signal_pid): New functions.
17618 (linux_target_ops): Add linux_signal_pid.
17619 (linux_init_signals): New function.
17620 (initialize_low): Call it. Initialize using_threads.
17621 * regcache.c (inferior_regcache_data): Add valid
17622 flag.
17623 (get_regcache): Fetch registers lazily. Add fetch argument
17624 and update all callers.
17625 (regcache_invalidate_one, regcache_invalidate): New
17626 functions.
17627 (new_register_cache): Renamed from create_register_cache.
17628 Return the new regcache.
17629 (free_register_cache): Change argument to a void *.
17630 (registers_to_string, registers_from_string): Call get_regcache
17631 with fetch flag set.
17632 (register_data): Make static. Pass fetch flag to get_regcache.
17633 (supply_register): Call get_regcache with fetch flag clear.
17634 (collect_register): Call get_regcache with fetch flag set.
17635 (collect_register_as_string): New function.
17636 * regcache.h: Update.
17637 * remote-utils.c (putpkt): Flush after debug output and use
17638 stderr.
17639 Handle input interrupts while waiting for an ACK.
17640 (input_interrupt): Use signal_pid method.
17641 (getpkt): Flush after debug output and use stderr.
17642 (outreg): Use collect_register_as_string.
17643 (new_thread_notify, dead_thread_notify): New functions.
17644 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17645 and general_thread.
17646 (look_up_one_symbol): Flush after debug output.
17647 * server.c (step_thread, server_waiting): New variables.
17648 (start_inferior): Don't use signal_pid. Update call to mywait.
17649 (attach_inferior): Update call to mywait.
17650 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17651 (main): Don't fetch/store registers explicitly. Use
17652 set_desired_inferior. Support proposed ``Hs'' packet. Update
17653 calls to mywait.
17654 * server.h: Update.
17655 (struct inferior_list, struct_inferior_list_entry): New.
17656 * target.c (set_desired_inferior): New.
17657 (write_inferior_memory): Constify.
17658 (mywait): New function.
17659 * target.h: Update.
17660 (struct target_ops): New signal_pid method.
17661 (mywait): Removed macro, added prototype.
17662
17663 * linux-low.h (regset_func): Removed.
17664 (regset_fill_func, regset_store_func): New.
17665 (enum regset_type): New.
17666 (struct regset_info): Add type field. Use new operation types.
17667 (struct linux_target_ops): stop_pc renamed to get_pc.
17668 Add decr_pc_after_break and breakpoint_at.
17669 (get_process, get_thread_proess, get_process_thread)
17670 (strut process_info, all_processes, linux_attach_lwp)
17671 (thread_db_init): New.
17672
17673 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17674 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17675 (the_low_target): Add new members.
17676 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17677 (i386_store_fpxregset): Constify.
17678 (target_regsets): Add new kind identifier.
17679 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17680 (i386_set_pc): Add debugging.
17681 (i386_breakpoint_at): New function.
17682 (the_low_target): Add new members.
17683 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17684 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17685 (mips_breakpoint_at): New.
17686 (the_low_target): Add new members.
17687 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17688 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17689 (the_low_target): Add new members.
17690 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17691 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17692 (the_low_target): Add new members.
17693 * linux-x86-64-low.c (target_regsets): Add new kind
17694 identifier.
17695
17696 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17697
17698 From Martin Pool <mbp@samba.org>:
17699 * server.c (gdbserver_usage): New function.
17700 (main): Call it.
17701
17702 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17703
17704 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17705 stop_at -> stop_pc.
17706
17707 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17708
17709 * Makefile.in: Remove obsolete code.
17710
17711 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17712
17713 * linux-low.c (regsets_fetch_inferior_registers),
17714 (regsets_store_inferior_registers): Removed cast to int from
17715 ptrace() calls.
17716 * regcache.h: Added declaration of struct inferior_info.
17717
17718 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17719
17720 * inferiors.c (struct inferior_info): Add regcache_data.
17721 (add_inferior): Call create_register_cache.
17722 (clear_inferiors): Call free_register_cache.
17723 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17724 * regcache.c (struct inferior_regcache_data): New.
17725 (registers): Remove.
17726 (get_regcache): New function.
17727 (create_register_cache, free_register_cache): New functions.
17728 (set_register_cache): Don't initialize the register cache here.
17729 (registers_to_string, registers_from_string, register_data): Call
17730 get_regcache.
17731 * regcache.h: Add prototypes.
17732 * server.h: Likewise.
17733
17734 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17735
17736 * mem-break.c: New file.
17737 * mem-break.h: New file.
17738 * Makefile.in: Add mem-break.o rule; update server.h
17739 dependencies.
17740 * inferiors.c (struct inferior_info): Add target_data
17741 member.
17742 (clear_inferiors): Free target_data member if set.
17743 (inferior_target_data, set_inferior_target_data): New functions.
17744 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17745 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17746 * linux-low.c (linux_bp_reinsert): New variable.
17747 (struct inferior_linux_data): New.
17748 (linux_create_inferior): Use set_inferior_target_data.
17749 (linux_attach): Likewise. Call add_inferior.
17750 (linux_wait_for_one_inferior): New function.
17751 (linux_wait): Call it.
17752 (linux_write_memory): Add const.
17753 (initialize_low): Call set_breakpoint_data.
17754 * linux-low.h (struct linux_target_ops): Add breakpoint
17755 handling members.
17756 * server.c (attach_inferior): Remove extra add_inferior
17757 call.
17758 * server.h: Include mem-break.h. Update inferior.c
17759 prototypes.
17760 * target.c (read_inferior_memory)
17761 (write_inferior_memory): New functions.
17762 * target.h (read_inferior_memory)
17763 (write_inferior_memory): Change macros to prototypes.
17764 (struct target_ops): Update comments. Add const to write_memory
17765 definition.
17766
17767 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17768
17769 * linux-low.c (usr_store_inferior_registers): Support
17770 registers which are allowed to fail to store.
17771 * linux-low.h (linux_target_ops): Likewise.
17772 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17773 (ppc_cannot_store_register): FPSCR may not be storable.
17774
17775 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17776
17777 * server.h: Include <string.h> if HAVE_STRING_H.
17778 * ChangeLog: Correct paths in last ChangeLog entry.
17779
17780 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17781
17782 * linux-low.h: Remove obsolete prototypes.
17783 (struct linux_target_ops): New.
17784 (extern the_low_target): New.
17785 * linux-low.c (num_regs, regmap): Remove declarations.
17786 (register_addr): Use the_low_target explicitly.
17787 (fetch_register): Likewise.
17788 (usr_fetch_inferior_registers): Likewise.
17789 (usr_store_inferior_registers): Likewise.
17790 * linux-arm-low.c (num_regs): Remove.
17791 (arm_num_regs): Define.
17792 (arm_regmap): Renamed from regmap, made static.
17793 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17794 made static.
17795 (arm_cannot_store_register): Renamed from cannot_store_register,
17796 made static.
17797 (the_low_target): New.
17798 * linux-i386-low.c (num_regs): Remove.
17799 (i386_num_regs): Define.
17800 (i386_regmap): Renamed from regmap, made static.
17801 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17802 made static.
17803 (i386_cannot_store_register): Renamed from cannot_store_register,
17804 made static.
17805 (the_low_target): New.
17806 * linux-ia64-low.c (num_regs): Remove.
17807 (ia64_num_regs): Define.
17808 (ia64_regmap): Renamed from regmap, made static.
17809 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17810 made static.
17811 (ia64_cannot_store_register): Renamed from cannot_store_register,
17812 made static.
17813 (the_low_target): New.
17814 * linux-m68k-low.c (num_regs): Remove.
17815 (m68k_num_regs): Define.
17816 (m68k_regmap): Renamed from regmap, made static.
17817 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17818 made static.
17819 (m68k_cannot_store_register): Renamed from cannot_store_register,
17820 made static.
17821 (the_low_target): New.
17822 * linux-mips-low.c (num_regs): Remove.
17823 (mips_num_regs): Define.
17824 (mips_regmap): Renamed from regmap, made static.
17825 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17826 made static.
17827 (mips_cannot_store_register): Renamed from cannot_store_register,
17828 made static.
17829 (the_low_target): New.
17830 * linux-ppc-low.c (num_regs): Remove.
17831 (ppc_num_regs): Define.
17832 (ppc_regmap): Renamed from regmap, made static.
17833 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17834 made static.
17835 (ppc_cannot_store_register): Renamed from cannot_store_register,
17836 made static.
17837 (the_low_target): New.
17838 * linux-s390-low.c (num_regs): Remove.
17839 (s390_num_regs): Define.
17840 (s390_regmap): Renamed from regmap, made static.
17841 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17842 made static.
17843 (s390_cannot_store_register): Renamed from cannot_store_register,
17844 made static.
17845 (the_low_target): New.
17846 * linux-sh-low.c (num_regs): Remove.
17847 (sh_num_regs): Define.
17848 (sh_regmap): Renamed from regmap, made static.
17849 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17850 made static.
17851 (sh_cannot_store_register): Renamed from cannot_store_register,
17852 made static.
17853 (the_low_target): New.
17854 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17855 (the_low_target): New.
17856
17857 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17858
17859 * Makefile.in: Add stamp-h target.
17860 * configure.in: Create stamp-h.
17861 * configure: Regenerated.
17862
17863 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17864
17865 * inferiors.c: New file.
17866 * target.c: New file.
17867 * target.h: New file.
17868 * Makefile.in: Add target.o and inferiors.o. Update
17869 dependencies.
17870 * linux-low.c (inferior_pid): New static variable,
17871 moved from server.c.
17872 (linux_create_inferior): Renamed from create_inferior.
17873 Call add_inferior. Return 0 on success instead of a PID.
17874 (linux_attach): Renamed from myattach.
17875 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17876 (linux_thread_alive): Renamed from mythread_alive.
17877 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17878 child dies.
17879 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17880 (regsets_store_inferior_registers): Correct error message.
17881 Add missing ``return 0''.
17882 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17883 (linux_store_registers): Renamed from store_inferior_registers.
17884 (linux_read_memory): Renamed from read_inferior_memory.
17885 (linux_write_memory): Renamed from write_inferior_memory.
17886 (linux_target_ops): New structure.
17887 (initialize_low): Call set_target_ops ().
17888 * remote-utils.c (unhexify): New function.
17889 (hexify): New function.
17890 (input_interrupt): Send signals to ``signal_pid''.
17891 * server.c (inferior_pid): Remove.
17892 (start_inferior): Update create_inferior call.
17893 (attach_inferior): Call add_inferior.
17894 (handle_query): New function.
17895 (main): Call handle_query for `q' packets.
17896 * server.h: Include "target.h". Remove obsolete prototypes.
17897 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17898
17899 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17900
17901 * Makefile.in: Add WARN_CFLAGS. Update configury
17902 dependencies.
17903 * configure.in: Check for <string.h>
17904 * configure: Regenerate.
17905 * config.in: Regenerate.
17906 * gdbreplay.c: Include needed system headers.
17907 (remote_open): Remove strchr prototype.
17908 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17909 * regcache.c (supply_register): Change buf argument to const void *.
17910 (supply_register_by_name): Likewise.
17911 (collect_register): Change buf argument to void *.
17912 (collect_register_by_name): Likewise.
17913 * regcache.h: Add missing prototypes.
17914 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17915 * server.c (handle_query): New function.
17916 (attached): New static variable, moved out of main.
17917 (main): Quiet longjmp clobber warnings.
17918 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17919 * utils.c (error): Remove NORETURN.
17920 (fatal): Likewise.
This page took 0.370986 seconds and 5 git commands to generate.