Fix indentation in common.m4
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
25c51f71
TT
12020-01-14 Tom Tromey <tom@tromey.com>
2
3 * configure: Rebuild.
4
c0bd321d
SM
52020-01-13 Simon Marchi <simon.marchi@efficios.com>
6
7 * Makefile.in (%-generated.c): Remove rule for files from
8 regformats/i386.
9
bb564c58
SM
102020-01-13 Simon Marchi <simon.marchi@efficios.com>
11
12 * configure: Re-generate.
13
6e37c371
SM
142020-01-13 Simon Marchi <simon.marchi@efficios.com>
15
16 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
17 Define to static.
18 * tracepoint.c (stop_tracing, flush_trace_buffer,
19 about_to_request_buffer_space, get_trace_state_variable_value,
20 set_trace_state_variable_value, gdb_collect): Add declaration.
21
df4a0200
SM
222020-01-13 Simon Marchi <simon.marchi@efficios.com>
23
24 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
25 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
26 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
27 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
28 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
29 static.
30
89e94ec9
SM
312020-01-13 Simon Marchi <simon.marchi@efficios.com>
32
33 * inferiors.c: Include gdbsupport/common-inferior.h.
34
2552728a
SM
352020-01-13 Simon Marchi <simon.marchi@efficios.com>
36
37 * hostio-errno.c: Include hostio.h.
38
4025fa09
SM
392020-01-13 Simon Marchi <simon.marchi@efficios.com>
40
41 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
42 prerequisite.
43
c0b0a142
SM
442020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
45
46 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
47 * linux-arm-tdesc.h: Include arch/arm.h.
48
bb1183e2
SM
492020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
50
51 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
52
f5df0b5f
SM
532020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
54
55 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
56 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
57
5b6d1e4f
PA
582020-01-10 Pedro Alves <palves@redhat.com>
59
60 * fork-child.c (post_fork_inferior): Pass target down to
61 startup_inferior.
62 * inferiors.c (switch_to_thread): Add process_stratum_target
63 parameter.
64 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
65 * nto-low.c (nto_target_ops): Now a process_stratum_target.
66 * linux-low.c (linux_target_ops): Now a process_stratum_target.
67 * remote-utils.c (prepare_resume_reply): Pass the target to
68 switch_to_thread.
69 * target.c (the_target): Now a process_stratum_target.
70 (done_accessing_memory): Pass the target to switch_to_thread.
71 (set_target_ops): Ajust to use process_stratum_target.
72 * target.h (struct target_ops): Rename to ...
73 (struct process_stratum_target): ... this.
74 (the_target, set_target_ops): Adjust.
75 (prepare_to_access_memory): Adjust comment.
76 * win32-low.c (child_xfer_memory): Adjust to use
77 process_stratum_target.
78 (win32_target_ops): Now a process_stratum_target.
79
559e7e50
EZ
802020-01-06 Eli Zaretskii <eliz@gnu.org>
81 Pedro Alves <palves@redhat.com>
82
83 * win32-low.c (get_child_debug_event): Extract the fatal exception
84 from the exit status and convert to the equivalent Posix signal
85 number.
86 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
87 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
88
48189bec
HD
892020-01-01 Hannes Domani <ssbssa@yahoo.de>
90
91 * Makefile.in: Use INSTALL_PROGRAM_ENV.
92
5dd8bf88
JB
932020-01-01 Joel Brobecker <brobecker@adacore.com>
94
95 * server.c (gdbserver_version): Change copyright year to 2020.
96 * gdbreplay.c (gdbreplay_version): Likewise.
97
0ad6b8ee
CB
982019-12-19 Christian Biesinger <cbiesinger@google.com>
99
100 * configure: Regenerate.
101 * configure.ac: Quote variable arguments of test.
102
1ee7b812
BE
1032019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
104
105 * Makefile.in: Fix build with GNU Make 3.81
106
d9fa87f4
TT
1072019-12-16 Tom Tromey <tromey@adacore.com>
108
109 * server.c (get_exec_file): Constify result.
110
ab7d13f0
CB
1112019-12-10 Christian Biesinger <cbiesinger@google.com>
112
113 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
114 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
115 * config.in: Regenerate.
116 * configure: Regenerate.
117 * configure.ac: Don't check for strerror.
118 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
119 Call safe_strerror instead of strerror.
120 * server.h (strerror): Remove this now-unnecessary declaration.
121 * tracepoint.c (init_named_socket): Call safe_strerror instead of
122 strerror.
123 (gdb_agent_helper_thread): Likewise.
124 * utils.c (perror_with_name): Likewise.
125
4da8c3a8
TT
1262019-11-26 Tom Tromey <tom@tromey.com>
127
128 * configure, config.in: Rebuild.
129
21987b9c
TT
1302019-11-26 Tom Tromey <tom@tromey.com>
131
132 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
133 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
134 gdb_sigmask.
135 * configure, config.in: Rebuild.
136
5e030278
TT
1372019-11-26 Tom Tromey <tom@tromey.com>
138
139 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
140 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
141 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
142 * acinclude.m4: Include ax_pthread.m4.
143 * config.in, configure: Rebuild.
144
6d91ce9a
CB
1452019-11-26 Christian Biesinger <cbiesinger@google.com>
146
147 * debug.c (debug_set_output): Call safe_strerror instead of
148 strerror.
149 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
150 (linux_kill_one_lwp): Likewise.
151 (linux_detach_one_lwp): Likewise.
152 (linux_wait_for_event_filtered): Likewise.
153 (store_register): Likewise.
154 * lynx-low.c (lynx_attach): Likewise.
155 * mem-break.c (insert_memory_breakpoint): Likewise.
156 (remove_memory_breakpoint): Likewise.
157 (delete_fast_tracepoint_jump): Likewise.
158 (set_fast_tracepoint_jump): Likewise.
159 (uninsert_fast_tracepoint_jumps_at): Likewise.
160 (reinsert_fast_tracepoint_jumps_at): Likewise.
161 * nto-low.c (nto_xfer_memory): Likewise.
162 (nto_resume): Likewise.
163
6cdd651f
LM
1642019-11-20 Luis Machado <luis.machado@linaro.org>
165
166 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
167 instead of register count.
168 * tdesc.c (tdesc_contains_feature): New function.
169 * tdesc.h (tdesc_contains_feature): New prototype.
170
cd850b40
CB
1712019-11-15 Christian Biesinger <cbiesinger@google.com>
172
173 * Makefile.in: Add safe-strerror.c.
174 * configure: Regenerate.
175 * configure.ac: Don't source common.host.
176
5abebf3c
CB
1772019-11-15 Christian Biesinger <cbiesinger@google.com>
178
179 * config.in: Regenerate.
180 * configure: Regenerate.
181
e06f3d6e
AB
1822019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
183
184 * ax.c (ax_printf): Handle size_t_arg.
185
ca3a04f6
CB
1862019-11-06 Christian Biesinger <cbiesinger@google.com>
187
188 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
189 * mi/mi-main.c (output_cores): Likewise.
190 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
191 (linux_xfer_osdata_modules): Likewise.
192 * remote.c (register_remote_support_xml): Likewise.
193 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
194 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
195
e48f6033
CB
1962019-11-01 Christian Biesinger <cbiesinger@google.com>
197
198 * configure: Regenerate.
199 * configure.ac: Remove check for strerror_r.
200
e7e97a2e
CB
2012019-10-31 Christian Biesinger <cbiesinger@google.com>
202
203 * config.in: Regenerate.
204 * configure: Regenerate.
205 * configure.ac: Also check for strerror_r.
206
75cafaa6
CB
2072019-10-31 Christian Biesinger <cbiesinger@google.com>
208
209 * ax.h (debug_agent): Remove duplicate declaration.
210
30baf67b
TV
2112019-10-26 Tom de Vries <tdevries@suse.de>
212
213 * linux-aarch64-low.c: Fix typos in comments.
214 * linux-arm-low.c: Same.
215 * linux-low.c: Same.
216 * linux-ppc-low.c: Same.
217 * proc-service.c: Same.
218 * regcache.h: Same.
219 * server.c: Same.
220 * tracepoint.c: Same.
221 * win32-low.c: Same.
222
52c64cf7
TT
2232019-10-25 Tom Tromey <tromey@adacore.com>
224
225 * utils.c (xstrdup): Remove.
226
c12d372d
TT
2272019-10-23 Tom Tromey <tom@tromey.com>
228
229 * configure, config.in: Rebuild.
230
4d0b984b
TT
2312019-10-23 Tom Tromey <tom@tromey.com>
232
233 * configure: Rebuild.
234 * acinclude.m4: Use m4_include, not sinclude.
235
c5adaa19
TT
2362019-10-17 Tom Tromey <tromey@adacore.com>
237
238 * configure: Rebuild.
239 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
240 in AC_CONFIG_FILES invocation.
241 * Makefile.in (stamp-h, Makefile): Use new-style config.status
242 invocation.
243
fec4e896
CB
2442019-10-16 Christian Biesinger <cbiesinger@google.com>
245
246 * server.c: Include xml-builtin.h.
247 (get_xml_features): Don't declare xml_builtins here.
248
00975ff6
AB
2492019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
250
251 * Makefile.in: Remove references to vec-ipa.o.
252
0dc32745
AB
2532019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
254
255 * Makefile.in: Remove references to vec.c.
256
3e6ec53a
CB
2572019-10-02 Christian Biesinger <cbiesinger@google.com>
258
259 * server.c (server_waiting): Change to bool.
260 (extended_protocol): Likewise.
261 (response_needed): Likewise.
262 (exit_requested): Likewise.
263 (run_once): Likewise.
264 (report_no_resumed): Likewise.
265 (non_stop): Likewise.
266 (disable_packet_vCont): Likewise.
267 (disable_packet_Tthread): Likewise.
268 (disable_packet_qC): Likewise.
269 (disable_packet_qfThreadInfo): Likewise.
270 (handle_general_set): Update.
271 (handle_detach): Update.
272 (handle_monitor_command): Update.
273 (handle_query): Update.
274 (captured_main): Update.
275 (process_serial_event): Update.
276 * server.h (server_waiting): Change to bool.
277 (disable_packet_vCont): Likewise.
278 (disable_packet_Tthread): Likewise.
279 (disable_packet_qC): Likewise.
280 (disable_packet_qfThreadInfo): Likewise.
281 (run_once): Likewise.
282 (non_stop): Likewise.
283 * target.c (target_stop_and_wait): Update.
284
80fd2826
TT
2852019-10-02 Tom Tromey <tromey@adacore.com>
286
287 * Makefile.in (SFILES): Add common-inferior.c.
288 (OBS): Add common-inferior.o.
289 * server.c (startup_with_shell): Don't define.
290
46f29a9a
AB
2912019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
292
293 * linux-low.c (linux_low_read_btrace): Update for change to
294 std::vector.
295
f9d949fb
CB
2962019-09-20 Christian Biesinger <cbiesinger@google.com>
297
298 * debug.c (debug_threads): Remove comment in favor of the header.
299 * debug.h (using_threads): Add declaration.
300 (debug_threads): Add comment.
301 * linux-aarch64-low.c: Include debug.h and remove declaration of
302 debug_threads.
303 * nto-low.c: Likewise.
304 * remote-utils.c: Likewise.
305 * thread-db.c: Likewise.
306
abf516c6
UW
3072019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
308
309 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
310 and powerpc-cell64l-ipa.o.
311 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
312 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
313 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
314 (spu*-*-*): Remove.
315
316 * spu-low.c: Remove file.
317
318 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
319 (parse_spufs_run): Remove.
320 (ppc_get_pc): Remove Cell/B.E. support.
321 (ppc_set_pc): Likewise.
322 (ppc_breakpoint_at): Likewise.
323 (ppc_arch_setup): Likewise.
324 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
325 tdesc_powerpc_cell32l.
326 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
327 or init_registers_powerpc_cell32l.
328 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
329 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
330 or init_registers_powerpc_cell32l.
331 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
332 (init_registers_powerpc_cell32l): Remove prototype.
333 (init_registers_powerpc_cell64l): Likewise.
334
335 * target.h (struct target_ops): Remove qxfer_spu member.
336 * server.c (handle_qxfer_spu): Remove.
337 (qxfer_packets): Remove entry for "spu".
338 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
339 * linux-low.c (SPUFS_MAGIC): Remove.
340 (spu_enumerate_spu_ids): Remove.
341 (linux_qxfer_spu): Remove.
342 (linux_target_ops): Remove qxfer_spu member.
343 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
344 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
345 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
346
2d41fa11
SDJ
3472019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
348
349 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
350 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
351 * config.in: Regenerate.
352 * configure: Regenerate.
353
d59b55f0
TT
3542019-08-15 Tom Tromey <tromey@adacore.com>
355
356 * target.c (target_write_memory): Use gdb::byte_vector.
357
4196ab2a
TT
3582019-08-15 Tom Tromey <tromey@adacore.com>
359
360 * tracepoint.c (write_inferior_data_pointer)
361 (write_inferior_integer, write_inferior_int8)
362 (write_inferior_uinteger, m_tracepoint_action_download)
363 (r_tracepoint_action_download, x_tracepoint_action_download)
364 (l_tracepoint_action_download, clear_inferior_trace_buffer)
365 (download_agent_expr, download_tracepoint_1)
366 (download_trace_state_variables, upload_fast_traceframes): Update.
367 * server.c (gdb_write_memory): Update.
368 * remote-utils.c (relocate_instruction): Update.
369 * proc-service.c (ps_pdwrite): Update.
370 * mem-break.c (remove_memory_breakpoint)
371 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
372 (uninsert_fast_tracepoint_jumps_at)
373 (reinsert_fast_tracepoint_jumps_at): Update.
374 * linux-x86-low.c (append_insns)
375 (i386_install_fast_tracepoint_jump_pad)
376 (amd64_write_goto_address, i386_write_goto_address): Update.
377 * linux-s390-low.c (append_insns, s390_write_goto_address):
378 Update.
379 * linux-ppc-low.c (ppc_relocate_instruction)
380 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
381 (ppc_write_goto_address): Update.
382 * linux-aarch64-low.c (append_insns): Update.
383 * target.h (struct target_ops): Update.
384 (write_inferior_memory): Don't declare.
385 * target.c (target_write_memory): Rename from
386 write_inferior_memory. Remove old target_write_memory.
387
c6778d00
TT
3882019-08-15 Tom Tromey <tromey@adacore.com>
389
390 * target.c (write_inferior_memory): Use std::vector.
391
404f2902
FCE
3922019-08-06 Frank Ch. Eigler <fche@redhat.com>
393
394 PR build/24886
395 * configure.ac: Drop enable-libmcheck support.
396 * configure, config.in: Rebuild.
397 * acinclude.m4: Don't include it.
398
4c5aa8e0
AH
3992019-07-19 Alan Hayward <alan.hayward@arm.com>
400
401 * configure.srv: Remove Arm xml files.
402
7cc17433
AH
4032019-07-19 Alan Hayward <alan.hayward@arm.com>
404
405 * configure.srv: Add new files. Remove xml generated files.
406 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
407 registers.
408 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
409 * linux-aarch32-tdesc.c: New file.
410 * linux-aarch32-tdesc.h: New file.
411 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
412 * linux-arm-low.c (init_registers_arm, tdesc_arm)
413 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
414 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
415 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
416 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
417 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
418 (arm_read_description): Call arm_linux_read_description.
419 (initialize_low_arch): Don't init registers.
420 * linux-arm-tdesc.c: New file.
421 * linux-arm-tdesc.h: New file.
422
166a82be
AH
4232019-07-10 Alan Hayward <alan.hayward@arm.com>
424
425 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
426 Move counter inside for.
427 (arm_read_description): Check ptrace earlier.
428 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
429
268a13a5
TT
4302019-07-09 Tom Tromey <tom@tromey.com>
431
432 * configure: Rebuild.
433 * configure.ac: Change common to gdbsupport.
434 * acinclude.m4: Change common to gdbsupport.
435 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
436 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
437 common to gdbsupport.
438 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
439 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
440 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
441 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
442 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
443 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
444 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
445 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
446 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
447 common to gdbsupport.
448
350fab54
AH
4492019-07-04 Alan Hayward <alan.hayward@arm.com>
450
451 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
452 defines.
453 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
454
2b40fda7
AH
4552019-07-04 Alan Hayward <alan.hayward@arm.com>
456
457 * configure.srv: Remove legacy xml.
458 * linux-aarch64-low.c (initialize_low_arch): Remove
459 initialize_low_tdesc call.
460 * linux-aarch64-tdesc-selftest.c: Remove file.
461 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
462 * linux-x86-low.c (initialize_low_arch): Remove
463 initialize_low_tdesc call.
464 * linux-x86-tdesc-selftest.c: Remove file.
465 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
466
7d10623d
TV
4672019-06-20 Tom de Vries <tdevries@suse.de>
468
469 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
470 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
471
8d6a48df
TV
4722019-06-19 Tom de Vries <tdevries@suse.de>
473
474 * debug.h (debug_write): Change return type to ssize_t.
475 * debug.c (debug_write): Same.
476
73cc7272
TT
4772019-06-14 Tom Tromey <tom@tromey.com>
478
479 * configure.ac: Use new path to gnulib.
480 * configure: Rebuild.
481 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
482 to gnulib.
483
08f10e02
TT
4842019-06-11 Tom Tromey <tom@tromey.com>
485
486 * Makefile.in (SFILES): Add alloc.c.
487 (OBS): Add alloc.o.
488 (IPA_OBJS): Add alloc-ipa.o.
489 (alloc-ipa.o): New target.
490 (%.o: ../%.c): New pattern rule.
491
422186a9
TT
4922019-06-10 Tom Tromey <tromey@adacore.com>
493
494 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
495 end warning with a newline.
496 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
497 newline.
498 * thread-db.c (attach_thread): Don't end warning with a newline.
499 (thread_db_notice_clone): Likewise.
500 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
501 newline.
502 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
503 end warning with a newline.
504
b02f78f9
PA
5052019-06-04 Pedro Alves <palves@redhat.com>
506
507 * server.c (captured_main): Use make_unique_xstrdup.
508
88ed7edb
TT
5092019-06-02 Tom Tromey <tom@tromey.com>
510
511 * gdbreplay.c (fromhex): Remove.
512 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
513
33a6bc35
TT
5142019-05-29 Tom Tromey <tromey@adacore.com>
515
516 * configure: Rebuild.
517
e90a813d
KB
5182019-05-06 Kevin Buettner <kevinb@redhat.com>
519
520 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
521 sign extension code on 32-bit builds.
522
353ea2d1
EZ
5232019-05-03 Eli Zaretskii <eliz@gnu.org>
524
525 * remote-utils.c:
526 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
527
b494cdff
TT
5282019-04-19 Tom Tromey <tom@tromey.com>
529
530 * server.c (struct vstop_notif): Derive from notif_event.
531 <base>: Remove.
532 (queue_stop_reply): Update.
533 (remove_all_on_match_ptid): Change type. Rewrite.
534 (discard_queued_stop_replies): Rewrite.
535 (in_queued_stop_replies_ptid): Change type.
536 (in_queued_stop_replies): Rewrite.
537 (notif_stop): Update.
538 (queue_stop_reply_callback): Update.
539 (captured_main): Don't call initialize_notif.
540 (push_stop_notification): Update.
541 * notif.c (notif_write_event, handle_notif_ack)
542 (notif_event_enque, notif_push): Update.
543 (notif_event_xfree, initialize_notif): Remove.
544 * notif.h (struct notif_event): Include <list>, not
545 "common/queue.h".
546 (struct notif_server) <queue>: Now a std::list.
547 (notif_event_p): Remove typedef.
548 (initialize_notif): Don't declare.
549 (struct notif_event): Add virtual destructor.
550
a7e559cc
AH
5512019-04-17 Alan Hayward <alan.hayward@arm.com>
552
553 * ax.c (ax_vdebug): Call debug_printf.
554 * debug.c (debug_write): New function.
555 * debug.h (debug_write): New declaration.
556 * linux-low.c (sigchld_handler): Call debug_write.
557
aeb2e706
AH
5582019-04-17 Alan Hayward <alan.hayward@arm.com>
559
560 * debug.c (debug_set_output): New function.
561 (debug_vprintf): Send output to debug_file.
562 (debug_flush): Likewise.
563 * debug.h (debug_set_output): New declaration.
564 * server.c (handle_monitor_command): Add debug-file option.
565 (captured_main): Likewise.
566
c1bc0935
AH
5672019-04-17 Alan Hayward <alan.hayward@arm.com>
568
569 * debug.c (remote_debug): Add definition.
570 * debug.h (remote_debug): Add declaration.
571 * hostio.c (remote_debug): Remove declaration.
572 * remote-utils.c (struct ui_file): Likewise.
573 (remote_debug): Likewise.
574 * remote-utils.h (remote_debug): Likewise,
575 * server.c (remote_debug): Remove definition.
576
3f52fdbc
KB
5772019-04-10 Kevin Buettner <kevinb@redhat.com>
578
579 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
580 when using a 64-bit gdbserver.
581
b0319eaa
TT
5822019-04-09 Tom Tromey <tromey@adacore.com>
583
584 * linux-low.c (select_event_lwp): Use find_thread_in_random.
585
eedc3f4f
TT
5862019-04-08 Tom Tromey <tom@tromey.com>
587
588 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
589 throw.
590 (linux_resume_one_lwp): Likewise.
591
230d2906
TT
5922019-04-08 Tom Tromey <tom@tromey.com>
593
594 * gdbreplay.c: Update.
595 * linux-low.c: Update.
596 * server.c: Update.
597
a70b8144
TT
5982019-04-08 Tom Tromey <tom@tromey.com>
599
600 * server.c: Use C++ exception handling.
601 * linux-low.c: Use C++ exception handling.
602 * gdbreplay.c: Use C++ exception handling.
603
3d6e9d23
TT
6042019-04-08 Tom Tromey <tom@tromey.com>
605
606 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
607 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
608 (captured_main, main): Update.
609 * gdbreplay.c (main): Update.
610
0570503d
PFC
6112019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
612
613 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
614 value in argument pointer, return 1 if the entry is found and 0
615 otherwise. Move comment.
616 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
617 * linux-low.h (linux_get_auxv): Declare.
618 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
619
227a9e65
TT
6202019-04-05 Tom Tromey <tromey@adacore.com>
621
622 * server.c (gdbserver_usage): Use upper-case for metasyntactic
623 variables.
624
69f4c9cc
AH
6252019-03-28 Alan Hayward <alan.hayward@arm.com>
626
627 * linux-low.c (AT_HWCAP2): Add define if not already included.
628
974c89e0
AH
6292019-03-26 Alan Hayward <alan.hayward@arm.com>
630
631 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
632 (aarch64_arch_setup): Call linux_get_hwcap.
633 * linux-arm-low.c (arm_get_hwcap): Remove function.
634 (arm_read_description): Call linux_get_hwcap.
635 * linux-low.c (linux_get_auxv): New function.
636 (linux_get_hwcap): Likewise.
637 (linux_get_hwcap2): Likewise.
638 * linux-low.h (linux_get_hwcap): New declaration.
639 (linux_get_hwcap2): Likewise.
640 * linux-ppc-low.c (ppc_get_auxv): Remove function.
641 (ppc_arch_setup): Call linux_get_hwcap.
642 * linux-s390-low.c (s390_get_hwcap): Remove function.
643 (s390_arch_setup): Call linux_get_hwcap.
644
1ef53e6b
AH
6452019-03-22 Alan Hayward <alan.hayward@arm.com>
646 Jiong Wang <jiong.wang@arm.com>
647
648 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
649 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
650 to fail.
651 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
652
ee4fbcfa
AH
6532019-03-22 Alan Hayward <alan.hayward@arm.com>
654 Jiong Wang <jiong.wang@arm.com>
655
656 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
657 (aarch64_get_hwcap): New function.
658 (aarch64_arch_setup): Read APIA hwcap.
659
6dc0ebde
AH
6602019-03-22 Alan Hayward <alan.hayward@arm.com>
661 Jiong Wang <jiong.wang@arm.com>
662
663 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
664 (initialize_low_tracepoint): Likewise.
665 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
666 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
667 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
668 (aarch64_linux_read_description): Likewise.
669 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
670
1163a4b7
JB
6712019-03-12 John Baldwin <jhb@FreeBSD.org>
672
673 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
674 i386_create_target_description for 'segments' parameter.
675 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
676 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
677 * win32-i386-low.c (i386_arch_setup): Likewise.
678
d3a70e03
TT
6792019-03-12 Tom Tromey <tromey@adacore.com>
680
681 * linux-low.c (iterate_over_lwps): Update.
682
37991b4f
TT
6832019-03-06 Tom Tromey <tom@tromey.com>
684
685 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
686 (captured_main): Use SCOPE_EXIT.
687
45950eb6
SDJ
6882019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
689
690 * configure.srv: Use '$enable_unittest' instead of '$development'
691 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
692 case.
693
43ac54fc
TT
6942019-02-27 Tom Tromey <tromey@adacore.com>
695
696 * gdbreplay.c (logchar): Handle \r\n.
697
df0da8a2
AH
6982019-02-07 Alan Hayward <alan.hayward@arm.com>
699
700 * linux-low.c (linux_attach): Add process before lwp.
701 * server.c (attach_inferior): Check if already attached.
702
1a5c2598
TT
7032019-02-07 Tom Tromey <tom@tromey.com>
704
705 * x86-tdesc.h: Rename include guard.
706 * x86-low.h: Add include guard.
707 * wincecompat.h: Rename include guard.
708 * win32-low.h: Add include guard.
709 * utils.h: Rename include guard.
710 * tracepoint.h: Rename include guard.
711 * tdesc.h: Rename include guard.
712 * target.h: Rename include guard.
713 * server.h: Rename include guard.
714 * remote-utils.h: Rename include guard.
715 * regcache.h: Rename include guard.
716 * nto-low.h: Rename include guard.
717 * notif.h: Add include guard.
718 * mem-break.h: Rename include guard.
719 * lynx-low.h: Add include guard.
720 * linux-x86-tdesc.h: Add include guard.
721 * linux-s390-tdesc.h: Add include guard.
722 * linux-ppc-tdesc-init.h: Add include guard.
723 * linux-low.h: Add include guard.
724 * linux-aarch64-tdesc.h: Add include guard.
725 * linux-aarch32-low.h: Add include guard.
726 * inferiors.h: Rename include guard.
727 * i387-fp.h: Rename include guard.
728 * hostio.h: Rename include guard.
729 * gdbthread.h: Rename include guard.
730 * gdb_proc_service.h: Rename include guard.
731 * event-loop.h: Rename include guard.
732 * dll.h: Rename include guard.
733 * debug.h: Rename include guard.
734 * ax.h: Rename include guard.
735
956cc47c
SN
7362018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
737
738 PR gdb/23985
739 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
740 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
741
a0707f3c
TT
7422019-01-25 Tom Tromey <tom@tromey.com>
743
744 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
745
0747795c
TT
7462019-01-25 Tom Tromey <tom@tromey.com>
747
748 * win32-low.c: Fix common/ includes.
749 * win32-i386-low.c: Fix common/ includes.
750 * tracepoint.c: Fix common/ includes.
751 * thread-db.c: Fix common/ includes.
752 * target.h: Fix common/ includes.
753 * symbol.c: Fix common/ includes.
754 * spu-low.c: Fix common/ includes.
755 * server.h: Fix common/ includes.
756 * server.c: Fix common/ includes.
757 * remote-utils.c: Fix common/ includes.
758 * regcache.h: Fix common/ includes.
759 * regcache.c: Fix common/ includes.
760 * nto-x86-low.c: Fix common/ includes.
761 * notif.h: Fix common/ includes.
762 * mem-break.h: Fix common/ includes.
763 * lynx-low.c: Fix common/ includes.
764 * lynx-i386-low.c: Fix common/ includes.
765 * linux-x86-tdesc-selftest.c: Fix common/ includes.
766 * linux-x86-low.c: Fix common/ includes.
767 * linux-low.c: Fix common/ includes.
768 * inferiors.h: Fix common/ includes.
769 * i387-fp.c: Fix common/ includes.
770 * hostio.c: Fix common/ includes.
771 * hostio-errno.c: Fix common/ includes.
772 * gdbthread.h: Fix common/ includes.
773 * gdbreplay.c: Fix common/ includes.
774 * fork-child.c: Fix common/ includes.
775 * event-loop.c: Fix common/ includes.
776 * ax.c:
777 (enum gdb_agent_op): Fix common/ includes.
778
be6d4f74
TT
7792019-01-21 Tom Tromey <tom@tromey.com>
780
781 * tracepoint.c: Fix includes.
782 * remote-utils.c: Fix includes.
783 * linux-x86-low.c: Fix includes.
784
66d91b39
JB
7852019-01-01 Joel Brobecker <brobecker@adacore.com>
786
787 * gdbreplay.c (gdbreplay_version): Update copyright year in
788 version message.
789 * server.c (gdbserver_version): Likewise.
790
754e3168
AH
7912018-12-05 Alan Hayward <alan.hayward@arm.com>
792
793 * linux-low.c (add_lwp): Switch ordering.
794
d105de22
TT
7952018-11-29 Tom Tromey <tom@tromey.com>
796
797 * win32-low.c (win32_join): Take pid, not process.
798 * target.h (struct target_ops) <join>: Change argument type.
799 (join_inferior): Change argument name.
800 * spu-low.c (spu_join): Take pid, not process.
801 * server.c (handle_detach): Preserve pid before destroying
802 process.
803 * lynx-low.c (lynx_join): Take pid, not process.
804 * linux-low.c (linux_join): Take pid, not process.
805
50138245
AH
8062018-11-23 Alan Hayward <alan.hayward@arm.com>
807
808 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
809 (aarch64_cannot_fetch_register): Likewise.
810 (struct linux_target_ops): Update references.
811
64f57f3d
PFC
8122018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
813
814 * linux-ppc-low.c: Include nat/linux-ptrace.h.
815
8d619c01
EBM
8162018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
817
818 * configure.srv (ipa_ppc_linux_regobj): Add
819 powerpc-isa207-htm-vsx32l-ipa.o and
820 powerpc-isa207-htm-vsx64l-ipa.o.
821 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
822 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
823 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
824 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
825 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
826 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
827 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
828 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
829 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
830 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
831 (init_registers_powerpc_isa207_htm_vsx32l)
832 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
833 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
834 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
835 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
836 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
837 (ppc_store_tm_ctarregset): New functions.
838 (ppc_regsets): Add entries for HTM regsets.
839 (ppc_arch_setup): Set htm in features struct when needed. Set
840 sizes for the HTM regsets.
841 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
842 (initialize_low_arch): Call
843 init_registers_powerpc_isa207_htm_vsx32l and
844 init_registers_powerpc_isa207_htm_vsx64l.
845 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
846 PPC_TDESC_ISA207_HTM_VSX.
847 (initialize_low_tracepoint): Call
848 init_registers_powerpc_isa207_htm_vsx32l and
849 init_registers_powerpc_isa207_htm_vsx64l.
850
232bfb86
EBM
8512018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
852
853 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
854 rs6000/power-linux-pmu.xml to srv_xmlfiles.
855 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
856 (ppc_store_pmuregset): New functions.
857 (ppc_regsets): Add entries for ebb and pmu regsets.
858 (ppc_arch_setup): Set isa207 in features struct if the ebb and
859 pmu regsets are available. Set sizes for these regsets.
860
f2cf6173
EBM
8612018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
862
863 * configure.srv (ipa_ppc_linux_regobj): Add
864 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
865 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
866 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
867 rs6000/powerpc-isa207-vsx32l.xml, and
868 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
869 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
870 <PPC_TDESC_ISA207_VSX>: New enum value.
871 (init_registers_powerpc_isa207_vsx32l): Declare.
872 (init_registers_powerpc_isa207_vsx64l): Declare.
873 * linux-ppc-low.c (ppc_fill_tarregset): New function.
874 (ppc_store_tarregset): New function.
875 (ppc_regsets): Add entry for the TAR regset.
876 (ppc_arch_setup): Set isa207 in features struct when needed. Set
877 size for the TAR regsets.
878 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
879 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
880 and init_registers_powerpc_isa207_vsx64l.
881 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
882 (initialize_low_tracepoint): Call
883 init_registers_powerpc_isa207_vsx32l and
884 init_registers_powerpc_isa207_vsx64l.
885
7ca18ed6
EBM
8862018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
887 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
888
889 * configure.srv (ipa_ppc_linux_regobj): Add
890 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
891 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
892 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
893 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
894 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
895 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
896 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
897 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
898 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
899 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
900 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
901 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
902 (ppc_hwcap): Add comment.
903 (ppc_hwcap2): New global.
904 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
905 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
906 (ppc_regsets): Add entries for the DSCR and PPR regsets.
907 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
908 when needed. Set sizes for the the DSCR and PPR regsets.
909 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
910 (initialize_low_arch): Call
911 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
912 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
913 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
914 PPC_TDESC_ISA205_PPR_DSCR_VSX.
915 (initialize_low_tracepoint): Call
916 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
917 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
918
5c849b22
PFC
9192018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
920
921 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
922
8ecfd7bd
SDJ
9232018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
924 Simon Marchi <simark@simark.ca>
925
926 * acinclude.m4: Include "../selftest.m4".
927 * configure: Regenerate.
928 * configure.ac: Use "GDB_AC_SELFTEST".
929 * configure.srv: Use "$enable_unittests" instead of
930 "$development" when checking whether unit tests have been
931 enabled.
932 * server.c (captured_main): Update message informing that
933 selftests have been disabled.
934
96643e35
TT
9352018-10-04 Tom Tromey <tom@tromey.com>
936
937 * configure: Rebuild.
938
da4ae14a
TT
9392018-10-04 Tom Tromey <tom@tromey.com>
940
941 * server.c (handle_status): Rename inner "thread".
942 (process_serial_event): Declare "res" in 'm' case.
943 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
944 (iterate_over_lwps): Rename inner "thread".
945 (linux_qxfer_libraries_svr4): Rename inner "len".
946 * gdbthread.h (find_thread_in_random): Rename inner "thread".
947
7c619dbd
GB
9482018-10-01 Gary Benson <gbenson@redhat.com>
949
950 * gdb_proc_service.h: Moved common code to
951 common/gdb_proc_service.h.
952
3795e814
GB
9532018-10-01 Gary Benson <gbenson@redhat.com>
954
955 * gdb_proc_service.h: Synchronize comments and whitespace with
956 GDB's version of this file.
957
49b036f1
TT
9582018-09-25 Tom Tromey <tom@tromey.com>
959
960 * configure: Rebuild.
961 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
962
8ff03f0b
SM
9632018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
964
965 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
966 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
967 ($(IPA_LIB)): Sort IPA_OBJS.
968
a1cd91dc
SM
9692018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
970
971 * Makefile.in: Remove references to $(ADD_DEPS).
972
752312ba
TT
9732018-09-16 Tom Tromey <tom@tromey.com>
974
975 * remote-utils.c (remote_open): Use GNU style for metasyntactic
976 variables.
977 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
978 variables.
979
f1628857
TT
9802018-09-05 Tom Tromey <tom@tromey.com>
981
982 * configure: Rebuild.
983
ad202fcc
SM
9842018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
985
986 PR build/23399
987 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
988
d3d8724a
TT
9892018-08-27 Tom Tromey <tom@tromey.com>
990
991 PR build/23087:
992 * configure: Rebuild.
993
b4f183d2
TT
9942018-08-27 Tom Tromey <tom@tromey.com>
995
996 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
997 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
998 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
999 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1000 (s390x_emit_stack_adjust): Add casts to unsigned char.
1001
4e2aa472
SM
10022018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1003
1004 PR gdb/23374
1005 PR gdb/23375
1006 * server.h (struct client_state) <disable_randomization>:
1007 Initialize to 1.
1008
cf4088a9
SM
10092018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1010
1011 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1012 variable.
1013 (mips_supply_ptrace_register): Likewise.
1014
a0de763e
TT
10152018-07-22 Tom Tromey <tom@tromey.com>
1016
1017 * configure: Rebuild.
1018
b0a7723d
TT
10192018-07-22 Tom Tromey <tom@tromey.com>
1020
1021 * win32-low.c (win32_create_inferior): Remove unused variables.
1022 * gdbreplay.c (remote_open): Remove unused variable.
1023 * remote-utils.c (remote_prepare): Remove unused variable.
1024 * x86-tdesc.h (X86_TDESC_H): Define.
1025 (amd64_expedite_regs): Define conditionally.
1026 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1027 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1028 * remote-utils.c (readchar): Remove unused variable.
1029
a780ef4f
PA
10302018-07-13 Pedro Alves <palves@redhat.com>
1031
1032 * linux-low.c (linux_kill): Change parameter to process_info
1033 pointer instead of pid. Adjust.
1034 * lynx-low.c (lynx_kill): Likewise.
1035 * nto-low.c (nto_kill): Likewise.
1036 * spu-low.c (spu_kill): Likewise.
1037 * win32-low.c (win32_kill): Likewise.
1038 * server.c (handle_v_kill, kill_inferior_callback)
1039 (detach_or_kill_for_exit): Adjust.
1040 * target.c (kill_inferior): Change parameter to process_info
1041 pointer instead of pid. Adjust.
1042 * target.h (struct target_ops) <kill>: Change parameter to
1043 process_info pointer instead of pid. Adjust all implementations
1044 and callers.
1045 (kill_inferior): Likewise.
1046
ef2ddb33
PA
10472018-07-13 Pedro Alves <palves@redhat.com>
1048
1049 * linux-low.c (linux_detach, linux_join): Change parameter to
1050 process_info pointer instead of pid. Adjust.
1051 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1052 * nto-low.c (nto_detach): Likewise.
1053 * spu-low.c (spu_detach, spu_join): Likewise.
1054 * win32-low.c (win32_detach, win32_join): Likewise.
1055 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1056 * target.h (struct target_ops) <detach, join>: Change parameter to
1057 process_info pointer instead of pid. Adjust all implementations
1058 and callers.
1059 (detach_inferior, join_inferior): Rename 'pid' parameter to
1060 'proc'.
1061
c7ab0aef
SDJ
10622018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1063 Jan Kratochvil <jan.kratochvil@redhat.com>
1064 Paul Fertser <fercerpav@gmail.com>
1065 Tsutomu Seki <sekiriki@gmail.com>
1066
1067 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1068 (OBS): Add 'common/netstuff.o'.
1069 (GDBREPLAY_OBS): Likewise.
1070 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1071 (remote_open): Implement support for IPv6
1072 connections.
1073 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1074 and 'wspiapi.h'.
1075 (handle_accept_event): Accept connections from IPv6 sources.
1076 (remote_prepare): Handle IPv6-style hostnames; implement
1077 support for IPv6 connections.
1078 (remote_open): Implement support for printing connections from
1079 IPv6 sources.
1080
31445d10
PA
10812018-07-11 Pedro Alves <palves@redhat.com>
1082
1083 PR gdb/23377
1084 * mem-break.c (any_persistent_commands): Add process_info
1085 parameter and use it instead of relying on the current process.
1086 Change return type to bool.
1087 * mem-break.h (any_persistent_commands): Add process_info
1088 parameter and change return type to bool.
1089 * server.c (handle_detach): Remove require_running_or_return call.
1090 Look up the process_info for the process we're about to detach.
1091 If not found, return back error to GDB. Adjust
1092 any_persistent_commands call to pass down a process pointer.
1093
cb197132
PA
10942018-07-11 Pedro Alves <palves@redhat.com>
1095
1096 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1097 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1098 instead of collect_register_by_name.
1099 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1100 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1101
1b919490
VB
11022018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1103 Pedro Alves <palves@redhat.com>
1104
1105 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1106
d7e15655
TT
11072018-07-03 Tom Tromey <tom@tromey.com>
1108
1109 * linux-low.c: Update.
1110 * lynx-low.c: Update.
1111 * mem-break.c: Update.
1112 * nto-low.c: Update.
1113 * remote-utils.c: Update.
1114 * server.c: Update.
1115 * spu-low.c: Update.
1116 * target.c: Update.
1117 * win32-low.c: Update.
1118
26a57c92
TT
11192018-07-03 Tom Tromey <tom@tromey.com>
1120
1121 * server.c: Update.
1122
0e998d96
TT
11232018-07-03 Tom Tromey <tom@tromey.com>
1124
1125 * linux-low.c: Update.
1126
cc6bcb54
TT
11272018-07-03 Tom Tromey <tom@tromey.com>
1128
1129 * target.c: Update.
1130
e38504b3
TT
11312018-07-03 Tom Tromey <tom@tromey.com>
1132
1133 * linux-low.c: Update.
1134 * linux-mips-low.c: Update.
1135 * lynx-low.c: Update.
1136 * nto-low.c: Update.
1137 * remote-utils.c: Update.
1138 * server.c: Update.
1139 * spu-low.c: Update.
1140 * target.c: Update.
1141 * thread-db.c: Update.
1142
e99b03dc
TT
11432018-07-03 Tom Tromey <tom@tromey.com>
1144
1145 * linux-low.c: Update.
1146 * linux-mips-low.c: Update.
1147 * lynx-low.c: Update.
1148 * mem-break.c: Update.
1149 * nto-low.c: Update.
1150 * remote-utils.c: Update.
1151 * server.c: Update.
1152 * spu-low.c: Update.
1153 * target.c: Update.
1154 * tracepoint.c: Update.
1155
f2907e49
TT
11562018-07-03 Tom Tromey <tom@tromey.com>
1157
1158 * linux-low.c: Update.
1159 * linux-ppc-low.c: Update.
1160 * linux-x86-low.c: Update.
1161 * proc-service.c: Update.
1162 * server.c: Update.
1163 * spu-low.c: Update.
1164 * thread-db.c: Update.
1165 * win32-low.c: Update.
1166
fd79271b
TT
11672018-07-03 Tom Tromey <tom@tromey.com>
1168
1169 * linux-low.c: Update.
1170 * lynx-low.c: Update.
1171 * nto-low.c: Update.
1172 * remote-utils.c: Update.
1173 * spu-low.c: Update.
1174 * thread-db.c: Update.
1175 * win32-low.c: Update.
1176
c0867626
SDJ
11772018-06-29 Joel Brobecker <brobecker@adacore.com>
1178
1179 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1180 parameter in call to 'amd64_create_target_description'.
1181
2512d7ef
JK
11822018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1183
1184 * x86-tdesc.h: Remove executable permission flag.
1185
d0ac1c44
SM
11862018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1187
1188 * configure.ac: Remove AC_PREREQ, add missing quoting.
1189 * configure: Re-generate.
1190 * config.in: Re-generate.
1191 * aclocal.m4: Re-generate.
1192
c4eb05ff
SM
11932018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1194
1195 * tracepoint.h (current_traceframe): Remove declaration.
1196
02895270
AH
11972018-06-18 Alan Hayward <alan.hayward@arm.com>
1198
1199 * linux-aarch64-low.c (is_sve_tdesc): New function.
1200 (aarch64_sve_regs_copy_to_regcache): Likewise.
1201 (aarch64_sve_regs_copy_from_regcache): Likewise.
1202 (aarch64_regs_info): Add SVE checks.
1203 (initialize_low_arch): Initialize SVE.
1204
e9902bfc
AH
12052018-06-18 Alan Hayward <alan.hayward@arm.com>
1206
1207 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1208
fefa175e
AH
12092018-06-11 Alan Hayward <alan.hayward@arm.com>
1210
1211 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1212 (initialize_low_tracepoint): Likewise
1213 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1214 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1215 param.
1216 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1217 checks.
1218 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1219
b91ad3ff
AH
12202018-06-11 Alan Hayward <alan.hayward@arm.com>
1221
1222 * server.h (PBUFSIZ): Increase size
1223
f868386e
AH
12242018-06-11 Alan Hayward <alan.hayward@arm.com>
1225
1226 * regcache.c (regcache::raw_compare): New function.
1227 * regcache.h (regcache::raw_compare): New declaration.
1228
9c861883
AH
12292018-06-11 Alan Hayward <alan.hayward@arm.com>
1230
1231 * regcache.c (new_register_cache): Use new.
1232 (free_register_cache): Use delete.
1233 (register_data): Use const.
1234 (supply_register): Move body inside regcache.
1235 (regcache::raw_supply): New override function.
1236 (collect_register): Move body inside regcache.
1237 (regcache::raw_collect): New override function.
1238 (regcache::get_register_status): New override function.
1239 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1240
40591844
TT
12412018-06-09 Tom Tromey <tom@tromey.com>
1242
1243 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1244 declare queue.
1245 (event_queue): Use std::queue.
1246 (gdb_event_xfree): Remove.
1247 (initialize_event_loop, process_event, wait_for_event): Update.
1248
6341380d
SC
12492018-06-08 Stan Cox <scox@redhat.com>
1250
1251 * win32-low.c (win32_create_inferior): last_ptid and last_status
1252 moved to client_state.
1253
03349c93
PA
12542018-06-08 Pedro Alves <palves@redhat.com>
1255
1256 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1257 common/common-exceptions.o, common/common-utils.o,
1258 common/errors.o, common/print-utils.o and utils.o.
1259 * gdbreplay.c: Include "common-defs.h" instead of the two
1260 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1261 string.h or alloca.h.
1262 (perror_with_name): Delete.
1263 (remote_open): Use xstrdup instead of strdup.
1264 (main): Rename to ...
1265 (captured_main): ... this.
1266 (main): New.
1267
8dcc53b3
TT
12682018-06-08 Tom Tromey <tom@tromey.com>
1269
1270 * linux-low.c (linux_low_read_btrace): Update.
1271
c12a5089
SC
12722018-06-04 Stan Cox <scox@redhat.com>
1273
1274 * server.h (struct client_state): New.
1275 * server.c (cont_thread, general_thread, multi_process)
1276 (report_fork_events, report_vfork_events, report_exec_events)
1277 (report_thread_events, swbreak_feature, hwbreak_feature)
1278 (vCont_supported, disable_randomization, pass_signals)
1279 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1280 Moved to client_state.
1281 * remote-utils.c (remote_debug, noack_mode)
1282 (transport_is_reliable): Moved to client_state.
1283 * tracepoint.c (current_traceframe): Moved to client_state.
1284
1285 Update all callers.
1286 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1287 linux-low.c, remote-utils.h, target.c: Use client_state.
1288
122394f1
AH
12892018-05-31 Alan Hayward <alan.hayward@arm.com>
1290
1291 * configure.srv: Add new c/h file.
1292
95228a0d
AH
12932018-05-31 Alan Hayward <alan.hayward@arm.com>
1294
1295 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1296 null VQ.
1297
d8dab6c3
MR
12982018-05-25 Maciej W. Rozycki <macro@mips.com>
1299
1300 * gdb.arch/mips-fpregset-core.exp: New test.
1301 * gdb.arch/mips-fpregset-core.c: New test source.
1302
81e25b7c
EK
13032018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1304
1305 PR server/23198
1306 * hostio.c (require_int): Do not report overflow for integers
1307 between 0xfffffff and 0x7fffffff.
1308
7e947ad3
MR
13092018-05-22 Maciej W. Rozycki <macro@mips.com>
1310
1311 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1312 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1313 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1314 functions.
1315 (the_low_target): Wire them.
1316
1d75a658
PFC
13172018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1318
1319 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1320 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1321 mode. Call collect_register_by_name with vscr using
1322 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1323 (ppc_store_vrregset): Add and set vscr_offset variable as in
1324 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1325 vscr_offset.
1326
d078308a
PFC
13272018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1328
1329 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1330 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1331 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1332
7273b5fc
PFC
13332018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1334
1335 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1336 (ppc_store_vsxregset): Likewise.
1337 (ppc_fill_vrregset): Likewise.
1338 (ppc_store_vrregset): Likewise.
1339 (ppc_fill_evrregset): Likewise.
1340 (ppc_store_evrregset): Likewise.
1341 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1342 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1343 needed.
1344
2e077f5e
PFC
13452018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1346
1347 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1348 wordsize of the inferior. Call ppc_linux_target_wordsize.
1349
bd64614e
PFC
13502018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1351
1352 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1353 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1354 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1355 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1356 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1357 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1358 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1359 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1360 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1361 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1362 (tdesc_powerpc_e500l): Remove.
1363 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1364 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1365 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1366 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1367 linux-ppc-tdesc.h.
1368 (ppc_arch_setup): Remove target description matching code. Fill a
1369 ppc_linux_features struct and call ppc_linux_match_description
1370 with it.
1371
75d74cca
MR
13722018-05-22 Maciej W. Rozycki <macro@mips.com>
1373
1374 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1375 width of the requested register exceeds the width of the
1376 `ptrace' data type.
1377 (mips_cannot_store_register): Likewise.
1378
e4439e43
MR
13792018-05-21 Maciej W. Rozycki <macro@mips.com>
1380
1381 * linux-mips-low.c (mips_fetch_register): New function. Update
1382 preceding comment.
1383 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1384 (the_low_target): Wire `mips_fetch_register'.
1385
55271bf9
JB
13862018-05-10 Joel Brobecker <brobecker@adacore.com>
1387
1388 * lynx-i386-low.c (LYNXOS_178): New macro.
1389 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1390 the layout on LynxOS-178.
1391 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1392 handle floating point registers that are not supported by
1393 LynxOS-178.
1394
1a34f210
TT
13952018-05-10 Tom Tromey <tom@tromey.com>
1396
1397 * configure: Rebuild.
1398
190852c8
JB
13992018-05-10 Joel Brobecker <brobecker@adacore.com>
1400
1401 PR server/23158:
1402 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1403 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1404 Use it to set the expedite_regs field in the given tdesc.
1405 * x86-tdesc.h: New file.
1406 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1407 Adjust following the addition of the new expedite_regs parameter
1408 to init_target_desc.
1409 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1410 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1411 (i386_linux_read_description, amd64_linux_read_description):
1412 Adjust following the addition of the new expedite_regs parameter
1413 to init_target_desc.
1414 * lynx-i386-low.c: #include "x86-tdesc.h".
1415 (lynx_i386_arch_setup): Adjust following the addition of the new
1416 expedite_regs parameter to init_target_desc.
1417 * nto-x86-low.c: #include "x86-tdesc.h".
1418 (nto_x86_arch_setup): Adjust following the addition of the new
1419 expedite_regs parameter to init_target_desc.
1420 * win32-i386-low.c: #include "x86-tdesc.h".
1421 (i386_arch_setup): Adjust following the addition of the new
1422 expedite_regs parameter to init_target_desc.
1423
7dbac825
JB
14242018-05-10 Joel Brobecker <brobecker@adacore.com>
1425
1426 PR server/23158:
1427 * win32-low.c (win32_create_inferior): Add call to my_wait
1428 setting last_status global.
1429
906994d9
JB
14302018-05-10 Joel Brobecker <brobecker@adacore.com>
1431
1432 PR server/23158:
1433 * win32-low.c (create_process): Only call gdb_tilde_expand if
1434 inferior_cwd is not NULL.
1435
8ee22052
AB
14362018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1437
1438 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1439 registers to the cache if their values have changed.
1440 (i387_xsave_to_cache): Provide default values for x87 control
1441 registers when these features are available, but disabled.
1442 * regcache.c (supply_register_by_name_zeroed): New function.
1443 * regcache.h (supply_register_by_name_zeroed): Declare new
1444 function.
1445
aff689d3
TT
14462018-05-07 Tom Tromey <tom@tromey.com>
1447
1448 * configure: Rebuild.
1449
85e26832
TT
14502018-05-04 Tom Tromey <tom@tromey.com>
1451
1452 * configure: Rebuild.
1453
a3b60e45
JK
14542018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1455 Pedro Alves <palves@redhat.com>
1456
1457 * linux-aarch64-low.c (aarch64_stopped_data_address):
1458 Likewise.
1459
632e107b
TT
14602018-04-27 Tom Tromey <tom@tromey.com>
1461
1462 * configure: Rebuild.
1463
458412c3
TT
14642018-04-23 Tom Tromey <tom@tromey.com>
1465
1466 * configure: Rebuild.
1467
f31c089e
SM
14682018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1469
1470 * Makefile.in (depcomp): Add "..".
1471 (all_deps_files): New and use it.
1472
b319b098
AH
14732018-04-18 Alan Hayward <alan.hayward@arm.com>
1474
1475 * configure.srv (aarch64*-*-linux*): Don't include xml.
1476 (i[34567]86-*-cygwin*): Likewise.
1477 (i[34567]86-*-linux*): Likewise.
1478 (i[34567]86-*-lynxos*): Likewise.
1479 (i[34567]86-*-mingw32ce*): Likewise.
1480 (i[34567]86-*-mingw*): Likewise.
1481 (i[34567]86-*-nto*): Likewise.
1482 (tic6x-*-uclinux): Likewise.
1483 (x86_64-*-linux*): Likewise.
1484 (x86_64-*-mingw*): Likewise.
1485 (x86_64-*-cygwin*): Likewise.
1486
3b74854b
AH
14872018-04-18 Alan Hayward <alan.hayward@arm.com>
1488
1489 * tdesc.c: Remove xml parameter.
1490
e98577a9
AH
14912018-04-18 Alan Hayward <alan.hayward@arm.com>
1492
1493 * server.c (get_features_xml): Remove cast.
1494 * tdesc.c (void target_desc::accept): Fill in function.
1495 (tdesc_get_features_xml): Remove old xml creation.
1496 (print_xml_feature::visit_pre): Add xml vistor.
1497 * tdesc.h (struct target_desc): Make xmltarget mutable.
1498 (tdesc_get_features_xml): Remove declaration.
1499
d278f585
AH
15002018-04-18 Alan Hayward <alan.hayward@arm.com>
1501
1502 * tdesc.c (tdesc_architecture_name): Add new function.
1503 (tdesc_osabi_name): Likewise.
1504 (tdesc_get_features_xml): Use new functions.
1505
eee8a18d
AH
15062018-04-18 Alan Hayward <alan.hayward@arm.com>
1507
1508 * tdesc.c (tdesc_create_flags): Remove.
1509 (tdesc_add_flag): Likewise.
1510 (tdesc_named_type): Likewise.
1511 (tdesc_create_union): Likewise.
1512 (tdesc_create_struct): Likewise.
1513 (tdesc_create_vector): Likewise.
1514 (tdesc_add_bitfield): Likewise.
1515 (tdesc_add_field): Likewise.
1516 (tdesc_set_struct_size): Likewise.
1517
82ec9bc7
AH
15182018-04-18 Alan Hayward <alan.hayward@arm.com>
1519
1520 * tdesc.c (~target_desc): Remove implictly deleted items.
1521 (init_target_desc): Iterate all features.
1522 (tdesc_get_features_xml): Use vector.
1523 (tdesc_create_feature): Create feature.
1524 * tdesc.h (tdesc_feature) Remove
1525 (target_desc): Add features.
1526
ea3e7d71
AH
15272018-04-18 Alan Hayward <alan.hayward@arm.com>
1528
1529 * Makefile.in: Add common/tdesc.c
1530 * tdesc.c (init_target_desc): init all reg_defs from register
1531 vector.
1532 (tdesc_create_reg): Create tdesc_reg.
1533 * tdesc.h (tdesc_feature): Add register vector.
1534
17d08cd4
SM
15352018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1536
1537 * tdesc.h (struct target_desc) <features>: Change type to
1538 std::vector<std::string>.
1539 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1540 changes.
1541 (tdesc_get_features_xml): Likewise.
1542 (tdesc_create_feature): Likewise.
1543
5cd3e386
AH
15442018-03-26 Alan Hayward <alan.hayward@arm.com>
1545
1546 * regcache.c (find_register_by_number): Return a ref.
1547 (find_regno): Use references.
1548 (register_size): Likewise.
1549 (register_data): Likewise.
1550 * tdesc.c (target_desc::~target_desc): Remove free calls.
1551 (target_desc::operator==): Use std::vector compare.
1552 (init_target_desc): Use reference.
1553 (tdesc_create_reg): Use reg constructors.
1554 * tdesc.h (struct target_desc): Replace pointer with object.
1555
dff7492c
AH
15562018-03-23 Alan Hayward <alan.hayward@arm.com>
1557
1558 * regcache.c (find_register_by_number): Make static.
1559 (find_regno): Use find_register_by_number
1560 * regcache.h (struct reg): Remove declaration.
1561
d80e5242
AH
15622018-03-23 Alan Hayward <alan.hayward@arm.com>
1563
1564 * tdesc.c (target_desc::~target_desc): Move to here.
1565 (target_desc::operator==): Likewise.
1566 * tdesc.h (target_desc::~target_desc): Move from here.
1567 (target_desc::operator==): Likewise.
1568
f69c5afb
AA
15692018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1570
1571 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1572
ce29f843
AA
15732018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1574
1575 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1576 S390_TDESC_GS.
1577 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1578 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1579 and init_registers_s390_gs_linux64.
1580
c49bd90b
AA
15812018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1582
1583 * linux-s390-low.c (s390_fill_gs): Remove function.
1584 (s390_fill_gsbc): Remove function.
1585 (s390_regsets): Set fill functions for the guarded storage regsets
1586 to NULL.
1587
7edb9bd3
AA
15882018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1589
1590 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1591 the word size. Add comment.
1592 (s390_get_wordsize): New function.
1593 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1594 pswm with it. Instead, use s390_get_wordsize to determine the
1595 word size first and derive the correct tdesc from that directly.
1596
39be3c7e
SM
15972018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1598
1599 * Makefile.in: Include silent-rules.mk.
1600 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1601 (COMPILE): Add ECHO_CXX.
1602 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1603 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1604 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1605 (version-generated.c): Add ECHO_GEN.
1606 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1607 (IPAGENT_COMPILE): Add ECHO_CXX.
1608 (%-generated.c): Add ECHO_REGDAT.
1609
3ae9ce5d
TT
16102018-03-14 Tom Tromey <tom@tromey.com>
1611
1612 PR cli/14977:
1613 * ax.c (ax_printf): Special case for NULL.
1614
e6a58aa8
SM
16152018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1616
1617 * linux-low.c (linux_qxfer_libraries_svr4): Use
1618 xml_escape_text_append.
1619
f6e8a41e
SM
16202018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1621
1622 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1623
b9671caf
SM
16242018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1625
1626 * server.c (handle_general_set): Remove unnecessary xstrdup.
1627
e80aaf61
SM
16282018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1629
1630 * server.c (parse_debug_format_options): Adjust to
1631 delim_string_to_char_ptr_vec changes.
1632 * thread-db.c (thread_db_load_search): Adjust to
1633 dirnames_to_char_ptr_vec changes.
1634
b1223e78
MM
16352018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1636
1637 * target.h (target_enable_btrace, target_disable_btrace)
1638 (target_read_btrace, target_read_btrace_conf): Turn macro into
1639 inline function. Throw error if target method is not defined.
1640 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1641 check for btrace target method. Be prepared to handle exceptions
1642 from btrace target methods.
1643
81561546
SDJ
16442018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1645
1646 * server.c (captured_main): Change order of error message printed
1647 when the current working directory cannot be found.
1648
25e3c82c
SDJ
16492018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1650
1651 * server.c: Include "filenames.h" and "pathstuff.h".
1652 (program_name): Delete variable.
1653 (program_path): New anonymous class.
1654 (get_exec_wrapper): Use "program_path" instead of
1655 "program_name".
1656 (handle_v_run): Likewise.
1657 (captured_main): Likewise.
1658 (process_serial_event): Likewise.
1659
b4987c95
SDJ
16602018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1661
1662 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1663 (OBJS): Add "pathstuff.o".
1664 * server.c (current_directory): New global variable.
1665 (captured_main): Initialize "current_directory".
1666
f46cd62a
AH
16672018-02-26 Alan Hayward <alan.hayward@arm.com>
1668
1669 * tdesc.c: Use common/tdesc.h.
1670 * tdesc.h: Likewise.
1671
a543c5ca
AH
16722018-02-20 Alan Hayward <alan.hayward@arm.com>
1673 Simon Marchi <simon.marchi@ericsson.com>
1674
1675 * Makefile.in: Switch order of make rules.
1676
b5884fa7
AH
16772018-02-19 Alan Hayward <alan.hayward@arm.com>
1678
1679 * Makefile.in: Add common directory in build.
1680 * configure.ac: Add common reference.
1681 * configure: Regenerate.
1682
de6242d3
MM
16832018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1684
1685 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1686 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1687 * spu-low.c (spu_target_ops): Likewise.
1688 * win32-low.c (win32_target_ops): Likewise.
1689 * server.c (supported_btrace_packets): Report packets unconditionally.
1690 * target.h (target_ops) <supports_btrace>: Remove.
1691 (target_supports_btrace): Remove.
1692
9ee23a85
MM
16932018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1694
1695 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1696 (handle_btrace_disable): Change return type to void. Use exceptions
1697 to report errors.
1698 (handle_btrace_general_set): Catch exception and copy message to
1699 return message.
1700
8ce47547
TT
17012018-02-08 Tom Tromey <tom@tromey.com>
1702
1703 * linux-low.c (install_software_single_step_breakpoints): Use
1704 make_scoped_restore.
1705 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1706 (do_restore_current_thread_cleanup): Remove.
1707 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1708 declare.
1709
45dd3607
TT
17102018-02-08 Tom Tromey <tom@tromey.com>
1711
1712 * mem-break.c (set_raw_breakpoint_at): Use
1713 gdb::unique_xmalloc_ptr.
1714
e671cd59
PA
17152018-01-30 Pedro Alves <palves@redhat.com>
1716
1717 PR gdb/13211
1718 * target.c (target_terminal::terminal_state): Rename to ...
1719 (target_terminal::m_terminal_state): ... this.
1720
a0aad537
JC
17212018-01-19 James Clarke <jrtc27@jrtc27.com>
1722
1723 * linux-low.c (handle_extended_wait): Surround call to
1724 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1725
4d9b86e1
SM
17262018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1727
1728 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1729 linux_ptrace_attach_fail_reason_string now returning an
1730 std::string.
1731 (linux_attach): Likewise.
1732 * thread-db.c (attach_thread): Likewise.
1733
f517c180
EA
17342018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1735
1736 PR gdb/21559
1737 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1738 checking for fs_base/gs_base fields in struct user_regs_struct.
1739 * configure: Regenerate.
1740
9a70f35c
YQ
17412018-01-16 Yao Qi <yao.qi@linaro.org>
1742
1743 PR gdb/18749
1744 * linux-low.c (fetch_register): Call supply_register instead of
1745 error.
1746
605fd3c6
YQ
17472018-01-08 Yao Qi <yao.qi@linaro.org>
1748 Simon Marchi <simon.marchi@ericsson.com>
1749
1750 * Makefile.in (OBS): Remove selftest.o.
1751 * configure.ac: Set srv_selftest_objs if $development is true.
1752 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1753 * configure: Re-generated.
1754 * server.c (captured_main): Wrap variable selftest_filter with
1755 GDB_SELF_TEST.
1756
2cc05030
SM
17572018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1758
1759 * server.c (parse_debug_format_options): Return std::string.
1760 (handle_monitor_command, captured_main): Adjust.
1761
e379cee6
PA
17622018-01-05 Pedro Alves <palves@redhat.com>
1763
1764 PR gdb/18653
1765 * server.c (captured_main): Pass quiet=false to
1766 save_original_signals_state.
1767
82e1e79a
JB
17682018-01-01 Joel Brobecker <brobecker@adacore.com>
1769
1770 * gdbreplay.c (gdbreplay_version): Update copyright year in
1771 version message.
1772 * server.c (gdbserver_version): Likewise.
1773
8e481c3b
TT
17742017-12-08 Tom Tromey <tom@tromey.com>
1775
1776 * ax.c (ax_printf): Update.
1777
a8806230
YQ
17782017-12-07 Yao Qi <yao.qi@linaro.org>
1779
1780 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1781 aarch64_linux_read_description.
1782 * linux-amd64-ipa.c (idx2mask): New array.
1783 (get_ipa_tdesc): Move idx2mask out.
1784 (initialize_low_tracepoint): Initialize target descriptions.
1785 * linux-i386-ipa.c (idx2mask): New array.
1786 (get_ipa_tdesc): Move idx2mask out.
1787 (initialize_low_tracepoint): Initialize target descriptions.
1788
d4a0e8b5
SM
17892017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1790
1791 * tdesc.c (struct tdesc_type): Change return type.
1792 (tdesc_add_flag): Change parameter type.
1793 (tdesc_add_bitfield): Likewise.
1794 (tdesc_add_field): Likewise.
1795 (tdesc_set_struct_size): Likewise.
1796
798a7429
SM
17972017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1798
1799 * regcache.c (registers_to_string): Remove unused variable.
1800
c0e15c9b
SM
18012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1802
1803 * inferiors.c (for_each_inferior_with_data): Remove.
1804 * inferiors.h (for_each_inferior_with_data): Remove.
1805 * server.c (handle_qxfer_threads_worker): Change parameter type.
1806 (handle_qxfer_threads_proper): Use for_each_thread.
1807
f0045347
SM
18082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1809
1810 * inferiors.c (for_each_inferior): Remove.
1811 (clear_inferiors): Use for_each_thread.
1812 * inferiors.h (for_each_inferior): Remove.
1813 * linux-low.c (linux_wait_for_event_filtered): Use
1814 for_each_thread.
1815 (linux_stabilize_threads): Likewise.
1816 * regcache.c (regcache_release): Likewise.
1817 * server.c (gdb_wants_all_threads_stopped): Likewise.
1818 (clear_pending_status_callback): Remove.
1819 (handle_status): Use for_each_thread.
1820 (captured_main): Likewise.
1821 * win32-low.c (child_init_thread_list): Likewise.
1822 (win32_clear_inferiors): Likewise.
1823 (fake_breakpoint_event): Likewise.
1824
9521758b
SM
18252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1826
1827 * inferiors.h (find_inferior): Remove.
1828 * inferiors.c (find_inferior): Remove.
1829
8f86d7aa
SM
18302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1831
1832 * linux-low.c (resume_status_pending_p): Update comment.
1833 (need_step_over_p): Update comment.
1834
e2b44075
SM
18352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1836
1837 * linux-low.c (proceed_one_lwp): Return void, change parameter
1838 type.
1839 (unsuspend_and_proceed_one_lwp): Likewise.
1840 (proceed_all_lwps): Use for_each_thread.
1841 (unstop_all_lwps): Likewise.
1842
c80825ff
SM
18432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1844
1845 * linux-low.c (linux_resume_one_thread): Return void, take
1846 parameter directly.
1847 (linux_resume): Use for_each_thread.
1848
df3e4dbe
SM
18492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1850
1851 * linux-low.c (send_sigstop_callback): Return void, change
1852 parameter type. Rename to...
1853 (send_sigstop): ... this.
1854 (suspend_and_send_sigstop_callback): Return void, change parameter
1855 type. Rename to...
1856 (suspend_and_send_sigstop): ... this.
1857 (stop_all_lwps): Use for_each_thread.
1858
5a6b0a41
SM
18592017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1860
1861 * linux-low.c (lwp_running): Return bool, remove unused
1862 argument.
1863 (linux_stabilize_threads): Use find_thread.
1864
39a64da5
SM
18652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1866
1867 * linux-low.c (select_singlestep_lwp_callback): Remove.
1868 (count_events_callback): Remove.
1869 (select_event_lwp_callback): Remove.
1870 (select_event_lwp): Use find_thread/for_each_thread.
1871
a1385b7b
SM
18722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1873
1874 * linux-low.c (not_stopped_callback): Return bool, take filter
1875 argument directly.
1876 (linux_wait_for_event_filtered): Use find_thread.
1877 (linux_wait_1): Likewise.
1878
454296a2
SM
18792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1880
1881 * linux-low.c (same_lwp): Remove.
1882 (find_lwp_pid): Use find_thread.
1883
6b2a85da
SM
18842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1885
1886 * linux-low.c (delete_lwp_callback): Remove.
1887 (linux_mourn): Use for_each_thread.
1888
798a38e8
SM
18892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1890
1891 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1892 args parameter, don't check for pid.
1893 (linux_detach): Use for_each_thread.
1894
e4eb0dec
SM
18952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1896
1897 * linux-low.c (struct counter): Remove.
1898 (second_thread_of_pid_p): Remove.
1899 (last_thread_of_process_p): Use find_thread.
1900
83e1b6c1
SM
19012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1902
1903 * inferiors.c (find_inferior_in_random): Remove.
1904 * inferiors.h (find_inferior_in_random): Remove.
1905 * linux-low.c (status_pending_p_callback): Return bool, accept
1906 parameter ptid directly.
1907 (linux_wait_for_event_filtered): Use find_thread_in_random.
1908 (linux_wait_1): Likewise.
1909
8dc7b443
SM
19102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1911
1912 * inferiors.c (find_inferior_id): Remove.
1913 (find_thread_ptid): Move implemention from find_inferior_id to
1914 here.
1915 * inferiors.h (find_inferior_id): Remove.
1916 * server.c (handle_status): Use find_thread_ptid.
1917 (process_serial_event): Likewise.
1918 * thread-db.c (find_one_thread): Likewise.
1919 (thread_db_thread_handle): Likewise.
1920 * win32-low.c (thread_rec): Likewise.
1921 (child_delete_thread): Likewise.
1922 (win32_thread_alive): Likewise.
1923 (get_child_debug_event): Likewise.
1924
da25033c
SM
19252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1926
1927 * linux-mips-low.c (update_watch_registers_callback): Return
1928 void, remove pid_p parameter, don't check for pid.
1929 (mips_insert_point, mips_remove_point): Use for_each_thread.
1930
c91bb56b
SM
19312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1932
1933 * lynx.low (lynx_delete_thread_callback): Remove.
1934 (lynx_mourn): Use for_each_thread.
1935
634a3254
SM
19362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1937
1938 * regcache.c (regcache_invalidate_one): Remove.
1939 (regcache_invalidate_pid): use for_each_thread.
1940
41272101
TT
19412017-11-26 Tom Tromey <tom@tromey.com>
1942
1943 * linux-low.c (linux_create_inferior): Update.
1944
f5291a6f
UW
19452017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1946
1947 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1948
6654d750
AH
19492017-11-24 Alan Hayward <alan.hayward@arm.com>
1950
1951 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1952 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1953 * linux-aarch64-tdesc-selftest.c: New file.
1954 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1955
19562017-11-24 Alan Hayward <alan.hayward@arm.com>
1957
1958 * configure.srv: Add new file.
1959 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1960 * linux-aarch64-tdesc-selftest.c: New file.
1961 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1962
49bdb7ee
AH
19632017-11-24 Alan Hayward <alan.hayward@arm.com>
1964
1965 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1966 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1967 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1968
d6d7ce56
AH
19692017-11-24 Alan Hayward <alan.hayward@arm.com>
1970
1971 * configure.srv: Add new files.
1972 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1973 aarch64_linux_read_description.
1974 * linux-aarch64-low.c (aarch64_linux_read_description):
1975 Merge with aarch64_arch_setup.
1976 (aarch64_arch_setup): Call aarch64_linux_read_description.
1977 * linux-aarch64-tdesc.c: New file.
1978 * linux-aarch64-tdesc.h: New file.
1979
506fe5f4
YQ
19802017-11-24 Yao Qi <yao.qi@linaro.org>
1981
1982 * configure.srv: Set $srv_regobj for tic6x-linux.
1983 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1984 (tic6x_read_description): Move some code to tic6x_arch_setup.
1985 (tic6x_tdesc_test): New function.
1986 (initialize_low_arch): Call selftests::register_test.
1987
29f9a567
YQ
19882017-11-22 Yao Qi <yao.qi@linaro.org>
1989
1990 * remote-utils.c (prepare_resume_reply): Use memcpy.
1991
578290ec
SM
19922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1993
1994 * linux-low.c (kill_one_lwp_callback): Return void, take
1995 argument directly, don't filter on pid.
1996 (linux_kill): Use for_each_thread.
1997
eca55aec
SM
19982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1999
2000 * linux-low.c (need_step_over_p): Return bool, remove dummy
2001 argument.
2002 (linux_resume, proceed_all_lwps): Use find_thread.
2003
25c28b4d
SM
20042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2005
2006 * linux-low.c (resume_status_pending_p): Return bool, remove
2007 flag_p argument.
2008 (linux_resume): Use find_thread.
2009
5fdda392
SM
20102017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2011
2012 * linux-low.c (struct thread_resume_array): Remove.
2013 (linux_set_resume_request): Return void, take arguments
2014 directly.
2015 (linux_resume): Use for_each_thread.
2016
fcb056a5
SM
20172017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2018
2019 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2020 return bool, remove data argument.
2021 (linux_stabilize_threads): Use find_thread.
2022
139720c5
SM
20232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2024
2025 * linux-low.c (unsuspend_one_lwp): Remove.
2026 (unsuspend_all_lwps): Use for_each_thread, inline code from
2027 unsuspend_one_lwp.
2028
6d1e5673
SM
20292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2030
2031 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2032 * linux-low.c (struct iterate_over_lwps_args): Remove.
2033 (iterate_over_lwps_filter): Remove.
2034 (iterate_over_lwps): Use find_thread.
2035
bbf550d5
SM
20362017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2037
2038 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2039 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2040 code from reset_lwp_ptrace_options_callback.
2041
00192f77
SM
20422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2043
2044 * linux-arm-low.c (struct update_registers_data): Remove.
2045 (update_registers_callback): Return void, take arguments
2046 directly, don't check thread's pid.
2047 (arm_insert_point, arm_remove_point): Use for_each_thread.
2048
2bee2b6c
SM
20492017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2050
2051 * win32-low.c (continue_one_thread): Return void, take argument
2052 directly.
2053 (child_continue): Use for_each_thread.
2054
0b360f19
SM
20552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2056
2057 * win32-i386-low.c (update_debug_registers_callback): Rename
2058 to ...
2059 (update_debug_registers): ... this, return void, remove pid_p arg.
2060 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2061
f27866ba
SM
20622017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2063
2064 * inferiors.h (struct process_info): Add constructor, initialize
2065 fields..
2066 <syscalls_to_catch>: Change type to std::vector<int>.
2067 * inferiors.c (add_process): Allocate process_info with new.
2068 (remove_process): Free process_info with delete.
2069 * linux-low.c (handle_extended_wait): Adjust.
2070 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2071 * server.c (handle_general_set): Adjust.
2072
e849ea89
PA
20732017-11-16 Pedro Alves <palves@redhat.com>
2074
2075 * remote-utils.c (remote_close): Block SIGIO signals instead of
2076 uninstalling the SIGIO handler.
2077
1d0aa65c
AH
20782017-11-16 Alan Hayward <alan.hayward@arm.com>
2079
2080 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2081
3491a34c
YQ
20822017-11-16 Yao Qi <yao.qi@linaro.org>
2083
2084 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2085 (tic6x_store_gregset): Likewise.
2086 (tic6x_usrregs_info): Move it up.
2087
a602f924
AH
20882017-11-15 Alan Hayward <alan.hayward@arm.com>
2089
2090 * Makefile.in: Update arch rules.
2091 * configure.srv: Explicitly mark arch/ files.
2092
5616b6c3
AS
20932017-11-13 Andreas Schwab <schwab@suse.de>
2094
2095 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2096 function.
2097 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2098
d1928160
PA
20992017-11-06 Pedro Alves <palves@redhat.com>
2100
2101 * config.in, configure: Regenerate.
2102
bac608e7
SM
21032017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2104
2105 * target.c (struct thread_search): Remove.
2106 (thread_search_callback): Remove.
2107 (prepare_to_access_memory): Use for_each_thread instead of
2108 find_inferior. Inline code from thread_search_callback.
2109
eaddb425
SM
21102017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2111
2112 * server.c (struct visit_actioned_threads_data): Remove.
2113 (visit_actioned_threads): Change prototype to take arguments
2114 directly.
2115 (resume): Use find_thread instead of find_inferior.
2116
99078d34
SM
21172017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2118
2119 * server.c (queue_stop_reply_callback): Change prototype, return
2120 void.
2121 (find_status_pending_thread_callback): Remove.
2122 (handle_status): Replace find_inferior with find_thread and
2123 for_each_thread.
2124
cc628f3d
AH
21252017-10-25 Alan Hayward <alan.hayward@arm.com>
2126
2127 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2128 with REGNO.
2129 (aarch64_store_gregset): Likewise.
2130 (aarch64_fill_fpregset): Likewise.
2131 (aarch64_store_fpregset): Likewise.
2132
4d3bb80e
SM
21332017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2134
2135 * gdbthread.h (find_thread, for_each_thread): New functions.
2136 * inferiors.c (thread_of_pid): Remove.
2137 (find_any_thread_of_pid): Use find_thread.
2138 * linux-low.c (num_lwps): Use for_each_thread.
2139
7a7cdfa0
YQ
21402017-10-17 Yao Qi <yao.qi@linaro.org>
2141
2142 * Makefile.in: Remove one rule.
2143 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2144
e675d170
YQ
21452017-10-17 Yao Qi <yao.qi@linaro.org>
2146
2147 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2148 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2149
7eb4e0f9
YQ
21502017-10-17 Yao Qi <yao.qi@linaro.org>
2151
2152 * configure.srv: Rename arm.o with arch/arm.o.
2153
60d6cfc9
YQ
21542017-10-17 Yao Qi <yao.qi@linaro.org>
2155
2156 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2157 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2158 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2159 (arch-i386.o, arch-amd64.o): Remove rules.
2160 (arch/%.o): New rule.
2161 Update POSTCOMPILE and COMPILE.pre.
2162 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2163 * configure: Re-generated.
2164 * configure.srv: Replace arch-i386.o with arch/i386.o.
2165 Replace arch-amd64.o with arch/amd64.o.
2166
5bfda255
YQ
21672017-10-16 Yao Qi <yao.qi@linaro.org>
2168
2169 * configure: Regenerated.
2170
9c80ecd6
SM
21712017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2172
2173 * inferiors.h: (struct inferior_list): Remove.
2174 (struct inferior_list_entry); Remove.
2175 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2176 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2177 get_first_inferior): Remove.
2178 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2179 find_inferior_id, find_inferior_in_random): Change signature.
2180 * inferiors.c (all_threads): Change type to
2181 std::list<thread_info *>.
2182 (get_thread): Remove macro.
2183 (find_inferior, find_inferior_id): Change signature, implement
2184 using find_thread.
2185 (find_inferior_in_random): Change signature, implement using
2186 find_thread_in_random.
2187 (for_each_inferior, for_each_inferior_with_data): Change
2188 signature, implement using for_each_thread.
2189 (add_inferior_to_list, remove_inferior): Remove.
2190 (add_thread, get_first_thread, thread_of_pid,
2191 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2192 (get_first_inferior, one_inferior_p, clear_inferior_list):
2193 Remove.
2194 (clear_inferiors, get_thread_process): Update.
2195 * gdbthread.h: Include <list>.
2196 (struct thread_info) <entry>: Remove field.
2197 <id>: New field.
2198 (all_threads): Change type to std::list<thread_info *>.
2199 (get_first_inferior): Add doc.
2200 (find_thread, for_each_thread, find_thread_in_random): New
2201 functions.
2202 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2203 * linux-arm-low.c (update_registers_callback): Update.
2204 * linux-low.c (second_thread_of_pid_p): Update.
2205 (kill_one_lwp_callback, linux_detach_lwp_callback,
2206 delete_lwp_callback, status_pending_p_callback, same_lwp,
2207 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2208 iterate_over_lwps, not_stopped_callback,
2209 resume_stopped_resumed_lwps, count_events_callback,
2210 select_singlestep_lwp_callback, select_event_lwp_callback,
2211 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2212 suspend_and_send_sigstop_callback, wait_for_sigstop,
2213 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2214 lwp_running, linux_set_resume_request, resume_status_pending_p,
2215 need_step_over_p, start_step_over, linux_resume_one_thread,
2216 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2217 reset_lwp_ptrace_options_callback): Update.
2218 * linux-mips-low.c (update_watch_registers_callback): Update.
2219 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2220 Update.
2221 (free_register_cache_thread_one): Remove.
2222 (regcache_release): Update.
2223 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2224 handle_qxfer_threads_worker): Update.
2225 (handle_query): Update, use list iterator.
2226 (visit_actioned_threads, handle_pending_status,
2227 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2228 clear_pending_status_callback, set_pending_status_callback,
2229 find_status_pending_thread_callback, handle_status,
2230 process_serial_event): Update.
2231 * target.c (thread_search_callback): Update.
2232 * thread-db.c (thread_db_get_tls_address): Update.
2233 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2234 Update.
2235 * win32-i386-low.c (update_debug_registers_callback): Update.
2236 * win32-low.c (delete_thread_info, child_delete_thread,
2237 continue_one_thread, suspend_one_thread,
2238 get_child_debug_event): Adjust.
2239
9179355e
SM
22402017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2241
2242 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2243 * inferiors.h: Include <list>.
2244 (struct process_info) <entry>: Remove field.
2245 <pid>: New field.
2246 (pid_of): Change macro to function.
2247 (ptid_of, lwpid_of): Remove macro.
2248 (all_processes): Change type to std::list<process_info *>.
2249 (ALL_PROCESSES): Remove macro.
2250 (for_each_process, find_process): New function.
2251 * inferiors.c (all_processes): Change type to
2252 std::list<process_info *>.
2253 (find_thread_process): Adjust.
2254 (add_process): Likewise.
2255 (remove_process): Likewise.
2256 (find_process_pid): Likewise.
2257 (get_first_process): Likewise.
2258 (started_inferior_callback): Remove.
2259 (have_started_inferiors_p): Adjust.
2260 (attached_inferior_callback): Remove.
2261 (have_attached_inferiors_p): Adjust.
2262 * linux-low.c (check_zombie_leaders): Likewise.
2263 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2264 (x86_linux_update_xmltarget): Adjust.
2265 * server.c (handle_query): Likewise.
2266 (gdb_reattached_process): Remove.
2267 (handle_status): Adjust.
2268 (kill_inferior_callback): Likewise.
2269 (detach_or_kill_inferior): Remove.
2270 (print_started_pid): Likewise.
2271 (print_attached_pid): Likewise.
2272 (detach_or_kill_for_exit): Update.
2273 (process_serial_event): Likewise.
2274 * linux-arm-low.c (arm_new_fork): Likewise.
2275
c9cb8905
SM
22762017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2277
2278 * dll.h: Include <list>.
2279 (struct dll_info): Add constructor.
2280 <entry>: Remove field.
2281 (all_dlls): Change type to std::list<dll_info>.
2282 * dll.c: Include <algorithm>.
2283 (get_dll): Remove macro.
2284 (all_dlls): Change type to std::list<dll_info *>.
2285 (free_one_dll): Remove.
2286 (match_dll): Likewise.
2287 (loaded_dll): Adjust.
2288 (unloaded_dll): Adjust to all_dlls type change, use
2289 std::find_if. Inline code from match_dll.
2290 (clear_dlls): Adjust to all_dlls type change.
2291 * server.c (emit_dll_description): Remove.
2292 (handle_qxfer_libraries): Adjust to all_dlls type change,
2293 integrate emit_dll_description's functionality.
2294
04ec7890
SM
22952017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2296
2297 * linux-low.h (struct linux_target_ops) <delete_process>: New
2298 field.
2299 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2300 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2301 (struct linux_target_ops): Add delete_process callback.
2302 * linux-arm-low.c (arm_delete_process): New.
2303 (struct linux_target_ops): Add delete_process callback.
2304 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2305 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2306 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2307 * linux-mips-low.c (mips_linux_delete_process): New.
2308 (struct linux_target_ops): Add delete_process callback.
2309 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2310 * linux-s390-low.c (struct linux_target_ops): Likewise.
2311 * linux-sh-low.c (struct linux_target_ops): Likewise.
2312 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2313 * linux-tile-low.c (struct linux_target_ops): Likewise.
2314 * linux-x86-low.c (x86_linux_delete_process): New.
2315 (struct linux_target_ops): Add delete_process callback.
2316 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2317
466eecee
SM
23182017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2319
2320 * linux-aarch64-low.c (the_low_target): Add thread delete
2321 callback.
2322 * linux-arm-low.c (arm_delete_thread): New function.
2323 (the_low_target): Add thread delete callback.
2324 * linux-bfin-low.c (the_low_target): Likewise.
2325 * linux-crisv32-low.c (the_low_target): Likewise.
2326 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2327 set.
2328 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2329 field.
2330 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2331 * linux-mips-low.c (mips_linux_delete_thread): New function.
2332 (the_low_target): Add thread delete callback.
2333 * linux-ppc-low.c (the_low_target): Likewise.
2334 * linux-s390-low.c (the_low_target): Likewise.
2335 * linux-sh-low.c (the_low_target): Likewise.
2336 * linux-tic6x-low.c (the_low_target): Likewise.
2337 * linux-tile-low.c (the_low_target): Likewise.
2338 * linux-x86-low.c (the_low_target): Likewise.
2339 * linux-xtensa-low.c (the_low_target): Likewise.
2340
b79f7801
YZ
23412017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2342
2343 * win32-low.c: Include "common-inferior.h".
2344
bc3b087d
SDJ
23452017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2346
2347 * inferiors.c (set_inferior_cwd): New function.
2348 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2349 (handle_query): Inform that QSetWorkingDir is supported.
2350 * win32-low.c (create_process): Pass the inferior's cwd to
2351 CreateProcess.
2352
d092c5a2
SDJ
23532017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2354
2355 * inferiors.c (current_inferior_cwd): New global variable.
2356 (get_inferior_cwd): New function.
2357 * inferiors.h (struct process_info) <cwd>: New field.
2358
7da0a886
SDJ
23592017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2360
2361 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2362 (OBS): Add gdb_tilde_expand.o.
2363
289a6840
SM
23642017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2365
2366 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2367 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2368
256642e8
PA
23692017-09-29 Pedro Alves <palves@redhat.com>
2370
2371 * ax.c (gdb_parse_agent_expr): Constify.
2372 * ax.h (gdb_parse_agent_expr): Constify.
2373 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2374 Constify.
2375 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2376 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2377 * remote-utils.h (read_ptid): Constify.
2378 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2379 (process_point_options, process_serial_event): Constify.
2380 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2381 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2382 (cmd_qtbuffer): Constify.
2383
5b9ca4d4
PA
23842017-09-29 Pedro Alves <palves@redhat.com>
2385
2386 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2387 fails.
2388
94c207e0
PA
23892017-09-29 Pedro Alves <palves@redhat.com>
2390
2391 * linux-low.c (handle_extended_wait): Pass parent thread instead
2392 of process to thread_db_notice_clone.
2393 * linux-low.h (thread_db_notice_clone): Replace parent process
2394 parameter with parent thread parameter.
2395 * thread-db.c (find_one_thread): Add comment.
2396 (thread_db_notice_clone): Replace parent process parameter with
2397 parent thread parameter. Temporarily switch to the parent thread.
2398
75352e28
SDJ
23992017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2400
2401 * gdbthread.h: Include "common-gdbthread.h".
2402 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2403 "if" when validating the ptid.
2404 * remote-utils.c: Include "gdbthread.h".
2405 (prepare_resume_reply): Use "switch_to_thread".
2406 * target.c (done_accessing_memory): Likewise.
2407
ad339634
AA
24082017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2409
2410 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2411 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2412 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2413 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2414 s390x-gs-linux64-ipa.o to ipa_obj.
2415 * linux-s390-low.c (HWCAP_S390_GS): New define.
2416 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2417 New functions.
2418 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2419 (s390_arch_setup): Check for guarded-storage support and choose
2420 appropriate tdesc.
2421 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2422 init_registers_s390x_gs_linux64.
2423 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2424 enum value.
2425 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2426 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2427
cc4d742f
SM
24282017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2429
2430 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2431
f6327dcb
KB
24322017-09-21 Kevin Buettner <kevinb@redhat.com>
2433
2434 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2435 (thread_db_thread_handle): Declare.
2436 * linux-low.c (linux_target_ops): Initialize thread_handle.
2437 * server.c (handle_qxfer_threads_worker): Add support for
2438 "handle" attribute.
2439 * target.h (struct target_ops): Add new function pointer,
2440 thread_handle.
2441 (target_thread_handle): Define.
2442 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2443 field in lwp.
2444 (thread_db_thread_handle): New function.
2445
86299109
KB
24462017-09-21 Kevin Buettner <kevinb@redhat.com>
2447
2448 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2449 * linux-low.h (thread_db_notice_clone): Declare.
2450 * thread-db.c (thread_db_notice_clone): New function.
2451
f557a88a
PA
24522017-09-21 Pedro Alves <palves@redhat.com>
2453
2454 * server.c (gdb_read_memory, handle_status, process_serial_event)
2455 (handle_serial_event, handle_target_event): Adjust to
2456 set_desired_thread prototype change.
2457 * target.c (set_desired_thread): Remove 'use_general' parameter
2458 and adjust.
2459 * target.h (set_desired_thread): Remove 'use_general' parameter.
2460
223ffa71
TT
24612017-09-20 Tom Tromey <tom@tromey.com>
2462
2463 * target.c (target_terminal::terminal_state): Define.
2464 (target_terminal::init): Rename from target_terminal_init.
2465 (target_terminal::inferior): Rename from
2466 target_terminal_inferior.
2467 (target_terminal::ours): Rename from target_terminal_ours.
2468 (target_terminal::ours_for_output, target_terminal::info): New.
2469
04fd3ba9
SM
24702017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2471
2472 * server.c (accumulate_file_name_length): Remove.
2473 (emit_dll_description): Adjust to std::string change.
2474 (handle_qxfer_libraries): Use std::string to hold document.
2475
5e187554
SM
24762017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2477
2478 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2479 return type of xml_escape_text.
2480 * server.c (emit_dll_description): Likewise.
2481
1526853e
SM
24822017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2483
2484 * server.c (captured_main): Accept argument for --selftest.
2485 Update run_tests call.
2486 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2487 when registering selftests.
2488
c4dfafab
SDJ
24892017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2490
2491 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2492 instead of "VEC" for "target_desc.reg_defs".
2493 (regcache_cpy): Likewise.
2494 (registers_to_string): Likewise.
2495 (registers_from_string): Likewise.
2496 (find_regno): Likewise.
2497 (supply_regblock): Likewise.
2498 (regcache_raw_read_unsigned): Likewise.
2499 * tdesc.c (init_target_desc): Likewise.
2500 (tdesc_create_reg): Likewise.
2501 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2502 (struct target_desc) <reg_defs>: Convert to "std::vector".
2503 (target_desc): Do not initialize "reg_defs".
2504 (~target_desc): Update code to use "std::vector" instead of "VEC"
2505 for "target_desc.reg_defs".
2506 (operator==): Likewise.
2507
124aceb4
SM
25082017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2509
2510 * inferiors.h (thread_to_gdb_id): Remove.
2511 * inferiors.c (thread_to_gdb_id): Remove.
2512 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2513 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2514 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2515 Likewise.
2516 * nto-low.c (nto_fetch_registers, nto_store_registers,
2517 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2518
96cde54f
SM
25192017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2520
2521 * inferiors.h (gdb_id_to_thread_id): Remove.
2522 * inferiors.c (gdb_id_to_thread_id): Remove.
2523 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2524 removal. Move pid declaration closer to where it's used.
2525
e8ca139e
SM
25262017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2527
2528 * server.c (handle_detach): New function.
2529 (process_serial_event): Move code out, call handle_detach.
2530
f8a4e119
SM
25312017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2532
2533 * server.c (require_running): Rename to ...
2534 (require_running_or_return): ... this ...
2535 (require_running_or_break): ... and this.
2536 (handle_query, process_serial_event): Adjust.
2537
0eb0a407
SM
25382017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2539
2540 * linux-low.c (linux_set_resume_request): Remove unused
2541 variables.
2542
785922a5
SM
25432017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2544
2545 * server.c (first_thread_of): Remove.
2546 (process_serial_event): Replace usage of first_thread_of with
2547 find_any_thread_of_pid.
2548 * tracepoint.c (same_process_p): Remove.
2549 (gdb_agent_about_to_close): Replace usage of same_process_p with
2550 find_any_thread_of_pid.
2551 * linux-x86-low.c (same_process_callback): Remove.
2552 (x86_arch_setup_process_callback): Replace usage of
2553 same_process_callback with find_any_thread_of_pid.
2554 * thread-db.c (any_thread_of): Remove.
2555 (switch_to_process): Replace usage of any_thread_of with
2556 find_any_thread_of_pid.
2557 * inferiors.c (thread_pid_matches_callback): Remove.
2558 (find_thread_process): Adjust to use find_any_thread_of_pid.
2559
a059f00c
SDJ
25602017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2561
2562 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2563 with "!VEC_empty".
a059f00c 2564
cc397f3a
SDJ
25652017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2566
2567 * linux-low.c (handle_extended_wait): Use
2568 "allocate_target_description" instead of "XNEW".
2569 * linux-x86-low.c (initialize_low_arch): Likewise.
2570
22916b07
YQ
25712017-09-05 Yao Qi <yao.qi@linaro.org>
2572
2573 * configure.srv (srv_i386_regobj): Remove.
2574 (srv_amd64_regobj): Remove.
2575 (srv_regobj): Set it to "" for x86 non-linux targets.
2576 * linux-x86-tdesc.c (i386_linux_read_description):
2577 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2578 (init_registers_i386): Remove the declaration.
2579 (tdesc_i386): Remove the declaration.
2580 (lynx_i386_arch_setup): Call i386_create_target_description.
2581 * nto-x86-low.c: Likewise.
2582 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2583 [!__x86_64__]: include arch/i386.h.
2584 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2585
38602d55
YQ
25862017-09-05 Yao Qi <yao.qi@linaro.org>
2587
2588 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2589 i386/amd64-XXX-linux from it.
2590
44b886ff
YQ
25912017-09-05 Yao Qi <yao.qi@linaro.org>
2592
2593 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2594 false.
2595 (ipa_amd64_linux_regobj): Remove.
2596 (ipa_x32_linux_regobj): Remove.
2597
b4570e4b
YQ
25982017-09-05 Yao Qi <yao.qi@linaro.org>
2599
2600 * Makefile.in (arch-amd64.o): New rule.
2601 * configure.srv: Append arch-amd64.o.
2602 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2603 (get_ipa_tdesc): Call amd64_linux_read_description.
2604 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2605 and init_registers_amd64_XXX.
2606 * linux-x86-low.c (x86_linux_read_description): Call
2607 amd64_linux_read_description.
2608 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2609 (initialize_low_arch): Don't call init_registers_x32_XXX and
2610 init_registers_amd64_XXX.
2611 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2612 and tdesc_amd64_XXX.
2613 [__x86_64__] (amd64_tdesc_test): New function.
2614 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2615 and init_registers_amd64_XXX.
2616 * linux-x86-tdesc.c: Include arch/amd64.h.
2617 (xcr0_to_tdesc_idx): New function.
2618 (i386_linux_read_description): New function.
2619 (amd64_get_ipa_tdesc_idx): New function.
2620 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2621 (amd64_get_ipa_tdesc): Declare.
2622
d1f28ea2
YQ
26232017-09-05 Yao Qi <yao.qi@linaro.org>
2624
2625 * configure.srv (srv_i386_linux_xmlfiles): Remove
2626 i386/i386-XXX-linux.xml from it.
2627
25a93583
YQ
26282017-09-05 Yao Qi <yao.qi@linaro.org>
2629
2630 * configure.srv: Set srv_i386_linux_regobj empty if $development
2631 is false.
2632 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2633 initialize_low_tdesc.
2634 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2635 with #if initialize_low_tdesc.
2636 * linux-x86-tdesc-selftest.c: New file.
2637 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2638
5f035c07
YQ
26392017-09-05 Yao Qi <yao.qi@linaro.org>
2640
2641 * Makefile.in (arch-i386.o): New rule.
2642 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2643 (x86_64-*-linux*): Likewise.
2644 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2645 include arch/i386.h.
2646 (i386_linux_read_description): Remove code and call
2647 i386_create_target_description.
2648 * tdesc.c (allocate_target_description): New function.
2649 * tdesc.h (set_tdesc_architecture): Remove declaration.
2650 (set_tdesc_osabi): Likewise.
2651
0abe8a89
YQ
26522017-09-05 Yao Qi <yao.qi@linaro.org>
2653
2654 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2655 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2656 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2657 .xmltarget.
2658 * server.c (get_features_xml): Call tdesc_get_features_xml.
2659 * tdesc.c (set_tdesc_architecture): New function.
2660 (set_tdesc_osabi): New function.
2661 (tdesc_get_features_xml): New function.
2662 (tdesc_create_feature): Add an argument.
2663 * tdesc.h (struct target_desc) <features>: New field.
2664 <arch, osabi>: New field.
2665 (~target_desc): xfree features, arch, and osabi.
2666 (target_desc::oerator==): Don't compare .xmltarget.
2667 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2668 (set_tdesc_osabi): Likewise.
2669 (tdesc_get_features_xml): Likewise.
2670
0a188386
YQ
26712017-09-05 Yao Qi <yao.qi@linaro.org>
2672
2673 * linux-x86-tdesc.c: Include selftest.h.
2674 (i386_tdesc_test): New function.
2675 (initialize_low_tdesc): Call selftests::register_test.
2676 * tdesc.h: Include regdef.h.
2677 (target_desc): Override operator == and !=.
2678
f49ff000
YQ
26792017-09-05 Yao Qi <yao.qi@linaro.org>
2680
2681 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2682 (ipa_obj): Likewise.
2683 * linux-i386-ipa.c: Include common/x86-xstate.h
2684 (get_ipa_tdesc): Call i386_linux_read_description.
2685 (initialize_low_tracepoint): Don't call init_registers_XXX
2686 functions, call initialize_low_tdesc instead.
2687 * linux-x86-low.c (x86_linux_read_description): Call
2688 i386_linux_read_description.
2689 (initialize_low_arch): Don't call init_registers_i386_XXX
2690 functions, call initialize_low_tdesc.
2691 * linux-x86-tdesc.c: New file.
2692 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2693 (i386_get_ipa_tdesc_idx): Declare.
2694 (i386_get_ipa_tdesc): Declare.
2695 (initialize_low_tdesc): Declare.
2696
2b68ef2f
YQ
26972017-09-05 Yao Qi <yao.qi@linaro.org>
2698
2699 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2700 instead of 0.
2701
f7000548
YQ
27022017-09-05 Yao Qi <yao.qi@linaro.org>
2703
2704 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2705 * regcache.c (get_thread_regcache): Use VEC_length.
2706 (init_register_cache): Likewise.
2707 (regcache_cpy): Likewise.
2708 (registers_to_string): Iterate reg_defs via VEC_iterate.
2709 (find_regno): Likewise.
2710 (find_register_by_number): Use VEC_index.
2711 (register_size): Call find_register_by_number.
2712 (register_data): Call find_register_by_number.
2713 (supply_regblock): Use VEC_length.
2714 (regcache_raw_read_unsigned): Likewise.
2715 * tdesc.c (init_target_desc): Iterate reg_defs via
2716 VEC_iterate.
2717 (default_description): Update initializer.
2718 (copy_target_description): Don't update field num_registers.
2719 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2720 <num_registers>: Remove.
2721
50a421ac
SM
27222017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2723
2724 * Makefile.in (.SECONDARY): Define target.
2725
23fdd69e
SM
27262017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2727
2728 * linux-low.c (linux_wait_1): Adjust.
2729 * server.c (queue_stop_reply_callback): Adjust.
2730
0a2dde4a
SDJ
27312017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2732
2733 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2734 QEnvironmentUnset and QEnvironmentReset packets.
2735 (handle_query): Inform remote that QEnvironmentHexEncoded,
2736 QEnvironmentUnset and QEnvironmentReset are supported.
2737
6afd337d
SM
27382017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2739
2740 * inferiors.h (inferior_target_data): Rename to ...
2741 (thread_target_data): ... this.
2742 (inferior_regcache_data): Rename to ...
2743 (thread_regcache_data): ... this.
2744 (set_inferior_regcache_data): Rename to ...
2745 (set_thread_regcache_data): ... this.
2746 * inferiors.c (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 (free_one_thread): Update.
2753 * linux-low.h (get_thread_lwp): Update.
2754 * regcache.c (get_thread_regcache): Update.
2755 (regcache_invalidate_thread): Update.
2756 (free_register_cache_thread): Update.
2757 * win32-i386-low.c (update_debug_registers_callback): Update.
2758 (win32_get_current_dr): Update.
2759 * win32-low.c (thread_rec): Update.
2760 (delete_thread_info): Update.
2761 (continue_one_thread): Update.
2762 (suspend_one_thread): Update.
2763
a160cc46
SM
27642017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2765
2766 * inferiors.c (set_inferior_target_data): Remove.
2767 * inferiors.h (set_inferior_target_data): Remove.
2768
6d580b63
YQ
27692017-08-18 Yao Qi <yao.qi@linaro.org>
2770
2771 * Makefile.in (OBS): Add selftest.o.
2772 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2773 * configure, config.in: Re-generated.
2774 * server.c: Include common/sefltest.h.
2775 (captured_main): Handle option --selftest.
2776
f5a29eb0
YQ
27772017-08-09 Yao Qi <yao.qi@linaro.org>
2778
2779 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2780 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2781 i386-avx-mpx.o and i386-mmx.o.
2782 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2783 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2784 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2785 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2786 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2787 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2788 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2789 i386/amd64-avx-mpx.xml.
2790
57757c2f
YQ
27912017-08-09 Yao Qi <yao.qi@linaro.org>
2792
2793 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2794 and x32-avx-avx512.o.
2795 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2796 i386/x32-avx-avx512.xml.
2797
229d26fc
SM
27982017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2799
2800 * tracepoint.h (enum class fast_tpoint_collect_result): New
2801 enumeration.
2802 (fast_tracepoint_collecting): Change return type to
2803 fast_tpoint_collect_result.
2804 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2805 * linux-low.h: Include tracepoint.h.
2806 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2807 fast_tpoint_collect_result.
2808 * linux-low.c (handle_tracepoints): Adjust.
2809 (linux_fast_tracepoint_collecting): Change return type to
2810 fast_tpoint_collect_result.
2811 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2812 linux_wait_1, stuck_in_jump_pad_callback,
2813 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2814 proceed_one_lwp): Adjust to type change.
2815
2e1e43e1
YQ
28162017-07-10 Yao Qi <yao.qi@linaro.org>
2817
2818 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2819
adc764e7
YQ
28202017-06-29 Yao Qi <yao.qi@linaro.org>
2821
2822 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2823 Remove.
2824 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2825
a206891a
SM
28262017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2827
2828 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2829
9a6c7d9c
SDJ
28302017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2831
2832 * linux-low.c (linux_create_inferior): Adjust code to access the
2833 environment information via 'gdb_environ' class.
2834 * lynx-low.c (lynx_create_inferior): Likewise.
2835 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2836 (get_environ): Return a pointer to 'our_environ'.
2837 (captured_main): Initialize 'our_environ'.
2838 * server.h (get_environ): Adjust prototype.
2839 * spu-low.c (spu_create_inferior): Adjust code to access the
2840 environment information via 'gdb_environ' class.
2841
ae3e2ccf
SM
28422017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2843
2844 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2845 usage of "register" keyword.
2846
3e019bdc
SM
28472017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2848
2849 * configure: Re-generate.
2850
8465943a
SM
28512017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2852
2853 * configure: Re-generate.
2854
cf0dd6f0
SM
28552017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2856
2857 * Makefile.in (COMPILE.pre): Add "-x c++".
2858
9845682b
SDJ
28592017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2860
2861 * fork-child.c: Conditionally include <signal.h>.
2862
aefd8b33
SDJ
28632017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2864
2865 * server.c (handle_general_set): Handle new packet
2866 "QStartupWithShell".
2867 (handle_query): Add "QStartupWithShell" to the list of supported
2868 packets.
2869 (gdbserver_usage): Add help text explaining the
2870 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2871 options.
2872 (captured_main): Recognize and act upon the presence of the new
2873 CLI options.
2874
2090129c
SDJ
28752017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2876 Pedro Alves <palves@redhat.com>
2877
2878 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2879 * configure: Regenerate.
2880 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2881 "fork-inferior.o".
2882 (i[34567]86-*-lynxos*): Likewise.
2883 (spu*-*-*): Likewise.
2884 * fork-child.c: New file.
2885 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2886 and "environ.h".
2887 (linux_ptrace_fun): New function.
2888 (linux_create_inferior): Adjust function prototype to reflect
2889 change on "target.h". Adjust function code to use
2890 "fork_inferior".
2891 (linux_request_interrupt): Delete "signal_pid".
2892 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2893 (lynx_ptrace_fun): New function.
2894 (lynx_create_inferior): Adjust function prototype to reflect
2895 change on "target.h". Adjust function code to use
2896 "fork_inferior".
2897 * nto-low.c (nto_create_inferior): Adjust function prototype and
2898 code to reflect change on "target.h". Update comments.
2899 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2900 "common-terminal.h" and "environ.h".
2901 (terminal_fd): Moved to fork-child.c.
2902 (old_foreground_pgrp): Likewise.
2903 (restore_old_foreground_pgrp): Likewise.
2904 (last_status): Make it global.
2905 (last_ptid): Likewise.
2906 (our_environ): New variable.
2907 (startup_with_shell): Likewise.
2908 (program_name): Likewise.
2909 (program_argv): Rename to...
2910 (program_args): ...this.
2911 (wrapper_argv): New variable.
2912 (start_inferior): Delete function.
2913 (get_exec_wrapper): New function.
2914 (get_exec_file): Likewise.
2915 (get_environ): Likewise.
2916 (prefork_hook): Likewise.
2917 (post_fork_inferior): Likewise.
2918 (postfork_hook): Likewise.
2919 (postfork_child_hook): Likewise.
2920 (handle_v_run): Update code to deal with arguments coming from the
2921 remote host. Update calls from "start_inferior" to
2922 "create_inferior".
2923 (captured_main): Likewise. Initialize environment variable. Call
2924 "have_job_control".
2925 * server.h (post_fork_inferior): New prototype.
2926 (get_environ): Likewise.
2927 (last_status): Declare.
2928 (last_ptid): Likewise.
2929 (signal_pid): Likewise.
2930 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2931 (spu_ptrace_fun): New function.
2932 (spu_create_inferior): Adjust function prototype to reflect change
2933 on "target.h". Adjust function code to use "fork_inferior".
2934 * target.c (target_terminal_init): New function.
2935 (target_terminal_inferior): Likewise.
2936 (target_terminal_ours): Likewise.
2937 * target.h: Include <vector>.
2938 (struct target_ops) <create_inferior>: Update prototype.
2939 (create_inferior): Update macro.
2940 * utils.c (gdb_flush_out_err): New function.
2941 * win32-low.c (win32_create_inferior): Adjust function prototype
2942 and code to reflect change on "target.h".
2943
043a4934
SDJ
29442017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2945
2946 * inferiors.c (switch_to_thread): New function.
2947
15652511
SDJ
29482017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2949
2950 * Makefile.in (SFILE): Add "common/job-control.c".
2951 (OBS): Add "job-control.o".
2952
21ea5acd
SDJ
29532017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2954
2955 * Makefile: Remove "@host_makefile_frag@".
2956
e13cb306
PA
29572017-05-05 Pedro Alves <palves@redhat.com>
2958
2959 * configure: Regenerate.
2960
c94fee56
SDJ
29612017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2962
2963 * configure: Regenerate.
2964
a0ff9e1a
SM
29652017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2966
2967 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2968 software_single_step change of return type to
2969 std::vector<CORE_ADDR>.
2970 * linux-low.c (install_software_single_step_breakpoints):
2971 Likewise.
2972 * linux-low.h (install_software_single_step_breakpoints):
2973 Likewise.
2974
be628ab8
SDJ
29752017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2976
2977 * remote-utils.c: Include "gdb_termios.h" instead of
2978 "terminal.h".
2979 * terminal.h: Delete file.
2980
7c5ded6a
SDJ
29812017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2982
2983 * server.c: Include <vector>.
2984 <program_argv, wrapper_argv>: Convert to std::vector.
2985 (start_inferior): Rewrite function to use C++.
2986 (handle_v_run): Likewise. Update code that calculates the argv
2987 based on the vRun packet; use C++.
2988 (captured_main): Likewise.
2989
436252de
SM
29902017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2991
2992 * server.c (handle_v_cont): Initialize thread_resume::thread
2993 with null_ptid.
2994
9bf2a700
PA
29952017-04-05 Pedro Alves <palves@redhat.com>
2996
2997 * configure: Regenerate.
2998
a121b7c1
PA
29992017-04-05 Pedro Alves <palves@redhat.com>
3000
3001 * gdbreplay.c (sync_error): Constify.
3002 * linux-x86-low.c (push_opcode): Constify.
3003
21c8a587
PA
30042017-04-05 Pedro Alves <palves@redhat.com>
3005
3006 * win32-low.c (get_child_debug_event)
3007 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3008 Report TARGET_WAITKIND_SPURIOUS instead.
3009
fb32b4f7
PA
30102017-04-05 Pedro Alves <palves@redhat.com>
3011
e79be6e5
SM
3012 * remote-utils.c (remote_prepare, remote_open): Constify.
3013 * remote-utils.h (remote_prepare, remote_open): Constify.
3014 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3015
65dd1e59
SM
30162017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3017
3018 * Makefile.in (clean): Clear .deps.
3019
8fa5b777
SM
30202017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3021
3022 * .gitignore: Remove generated files, replace with wildcard.
3023 * (clean): Replace removal of generated files with wildcard.
3024 (version.c): Replace with...
3025 (version-generated.c): ...this.
3026 (xml-builtin.c): Replace with...
3027 (xml-builtin-generated.c): ...this.
3028 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3029 (%.c: *regformats*): Replace with...
3030 (%-generated.c: *regformats*): ...this.
3031
a12e714b
MF
30322017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3033
3034 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3035 (xtensa_fill_gregset): Call collect_register_by_name for
3036 threadptr register.
3037 (xtensa_store_gregset): Call supply_register_by_name for
3038 threadptr register.
3039
1a09b50a
MF
30402017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3041
3042 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3043 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3044 (xtensa_store_gregset): Call supply_register for all registers in
3045 a0_regnum..a0_regnum + C0_NREGS range.
3046
1a01e7c6
SM
30472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3048
3049 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3050 (ax-ipa.o: ax.c): Remove.
3051 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3052 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3053 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3054 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3055 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3056
36bc18a8
SM
30572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3058
3059 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3060 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3061 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3062 (errors-ipa.o: ../common/errors.c): Remove.
3063 (format-ipa.o: ../common/format.c): Remove.
3064 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3065
a8ebe3d5
SM
30662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3067
3068 * Makefile.in (%-ipa.o: %.c): New rule.
3069 (tracepoint-ipa.o: tracepoint.c): Remove.
3070 (utils-ipa.o: utils.c): Remove.
3071 (remote-utils-ipa.o: remote-utils.c): Remove.
3072 (regcache-ipa.o: regcache.c): Remove.
3073 (i386-linux-ipa.o: i386-linux.c): Remove.
3074 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3075 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3076 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3077 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3078 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3079 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3080 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3081 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3082 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3083 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3084 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3085 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3086 (aarch64-ipa.o: aarch64.c): Remove.
3087 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3088 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3089 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3090 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3091 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3092 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3093 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3094 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3095 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3096 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3097 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3098 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3099 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3100 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3101 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3102 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3103 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3104 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3105 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3106 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3107 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3108 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3109 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3110 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3111 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3112 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3113 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3114 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3115 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3116 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3117 (tdesc-ipa.o: tdesc.c): Remove.
3118 (x32-linux-ipa.o: x32-linux.c): Remove.
3119 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3120 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3121
50cfacb7
SM
31222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3123
3124 * Makefile.in (%.o: ../arch/%.c): New rule.
3125 (arm.o: ../arch/arm.c): Remove.
3126 (arm-linux.o: ../arch/arm-linux.c): Remove.
3127 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3128 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3129
c5a22423
SM
31302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3131
3132 * Makefile.in (%.o: ../nat/%.c): New rule.
3133 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3134 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3135 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3136 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3137 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3138 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3139 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3140 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3141 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3142 (linux-personality.o: ../nat/linux-personality.c): Remove.
3143 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3144 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3145 (x86-linux.o: ../nat/x86-linux.c): Remove.
3146 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3147 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3148
6bda016b
SM
31492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3150
3151 * Makefile.in (%.o: ../common/%.c): New rule.
3152 (signals.o: ../common/signals.c): Remove.
3153 (print-utils.o: ../common/print-utils.c): Remove.
3154 (rsp-low.o: ../common/rsp-low.c): Remove.
3155 (common-utils.o: ../common/common-utils.c): Remove.
3156 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3157 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3158 (vec.o: ../common/vec.c): Remove.
3159 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3160 (xml-utils.o: ../common/xml-utils.c): Remove.
3161 (ptid.o: ../common/ptid.c): Remove.
3162 (buffer.o: ../common/buffer.c): Remove.
3163 (format.o: ../common/format.c): Remove.
3164 (filestuff.o: ../common/filestuff.c): Remove.
3165 (agent.o: ../common/agent.c): Remove.
3166 (errors.o: ../common/errors.c): Remove.
3167 (environ.o: ../common/environ.c): Remove.
3168 (common-debug.o: ../common/common-debug.c): Remove.
3169 (cleanups.o: ../common/cleanups.c): Remove.
3170 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3171 (fileio.o: ../common/fileio.c): Remove.
3172 (common-regcache.o: ../common/common-regcache.c): Remove.
3173 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3174 (new-op.o: ../common/new-op.c): Remove.
3175 (btrace-common.o: ../common/btrace-common.c): Remove.
3176
21122961
SM
31772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3178
3179 * Makefile.in (%.o: ../target/%.c): New rule.
3180 (waitstatus.o: ../target/waitstatus.c): Remove.
3181
c362e621
SM
31822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3183
3184 * Makefile.in
3185 (%.c: ../regformats/%.dat,
3186 (%.c: ../regformats/arm/%.dat,
3187 (%.c: ../regformats/i386/%.dat,
3188 (%.c: ../regformats/rs6000/%.dat): New rules.
3189 (aarch64.c): Remove.
3190 (reg-arm.c): Remove.
3191 (arm-with-iwmmxt.c): Remove.
3192 (arm-with-vfpv2.c): Remove.
3193 (arm-with-vfpv3.c): Remove.
3194 (arm-with-neon.c): Remove.
3195 (reg-bfin.c): Remove.
3196 (reg-cris.c): Remove.
3197 (reg-crisv32.c): Remove.
3198 (i386.c): Remove.
3199 (i386-linux.c): Remove.
3200 (i386-avx.c): Remove.
3201 (i386-avx-linux.c): Remove.
3202 (i386-avx-avx512.c): Remove.
3203 (i386-avx-avx512-linux.c): Remove.
3204 (i386-mpx.c): Remove.
3205 (i386-mpx-linux.c): Remove.
3206 (i386-avx-mpx-avx512-pku.c): Remove.
3207 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3208 (i386-avx-mpx.c): Remove.
3209 (i386-avx-mpx-linux.c): Remove.
3210 (i386-mmx.c): Remove.
3211 (i386-mmx-linux.c): Remove.
3212 (reg-ia64.c): Remove.
3213 (reg-m32r.c): Remove.
3214 (reg-m68k.c): Remove.
3215 (reg-cf.c): Remove.
3216 (mips-linux.c): Remove.
3217 (mips-dsp-linux.c): Remove.
3218 (mips64-linux.c): Remove.
3219 (mips64-dsp-linux.c): Remove.
3220 (nios2-linux.c): Remove.
3221 (powerpc-32.c): Remove.
3222 (powerpc-32l.c): Remove.
3223 (powerpc-altivec32l.c): Remove.
3224 (powerpc-cell32l.c): Remove.
3225 (powerpc-vsx32l.c): Remove.
3226 (powerpc-isa205-32l.c): Remove.
3227 (powerpc-isa205-altivec32l.c): Remove.
3228 (powerpc-isa205-vsx32l.c): Remove.
3229 (powerpc-e500l.c): Remove.
3230 (powerpc-64l.c): Remove.
3231 (powerpc-altivec64l.c): Remove.
3232 (powerpc-cell64l.c): Remove.
3233 (powerpc-vsx64l.c): Remove.
3234 (powerpc-isa205-64l.c): Remove.
3235 (powerpc-isa205-altivec64l.c): Remove.
3236 (powerpc-isa205-vsx64l.c): Remove.
3237 (s390-linux32.c): Remove.
3238 (s390-linux32v1.c): Remove.
3239 (s390-linux32v2.c): Remove.
3240 (s390-linux64.c): Remove.
3241 (s390-linux64v1.c): Remove.
3242 (s390-linux64v2.c): Remove.
3243 (s390-te-linux64.c): Remove.
3244 (s390-vx-linux64.c): Remove.
3245 (s390-tevx-linux64.c): Remove.
3246 (s390x-linux64.c): Remove.
3247 (s390x-linux64v1.c): Remove.
3248 (s390x-linux64v2.c): Remove.
3249 (s390x-te-linux64.c): Remove.
3250 (s390x-vx-linux64.c): Remove.
3251 (s390x-tevx-linux64.c): Remove.
3252 (tic6x-c64xp-linux.c): Remove.
3253 (tic6x-c64x-linux.c): Remove.
3254 (tic6x-c62x-linux.c): Remove.
3255 (reg-sh.c): Remove.
3256 (reg-sparc64.c): Remove.
3257 (reg-spu.c): Remove.
3258 (amd64.c): Remove.
3259 (amd64-linux.c): Remove.
3260 (amd64-avx.c): Remove.
3261 (amd64-avx-linux.c): Remove.
3262 (amd64-avx-avx512.c): Remove.
3263 (amd64-avx-avx512-linux.c): Remove.
3264 (amd64-mpx.c): Remove.
3265 (amd64-mpx-linux.c): Remove.
3266 (amd64-avx-mpx-avx512-pku.c): Remove.
3267 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3268 (amd64-avx-mpx.c): Remove.
3269 (amd64-avx-mpx-linux.c): Remove.
3270 (x32.c): Remove.
3271 (x32-linux.c): Remove.
3272 (x32-avx.c): Remove.
3273 (x32-avx-linux.c): Remove.
3274 (x32-avx-avx512.c): Remove.
3275 (x32-avx-avx512-linux.c): Remove.
3276 (reg-xtensa.c): Remove.
3277 (reg-tilegx.c): Remove.
3278 (reg-tilegx32.c): Remove.
3279
1672e0d9
SDJ
32802017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3281
3282 * Makefile.in (SFILES): Add "common/environ.c".
3283 (OBJS): Add "common/environ.h".
3284
239b6d10
WT
32852017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3286
3287 * configure.ac: Check if the fs_base and gs_base members of
3288 `struct user_regs_struct' exist.
3289 * config.in: Regenerated.
3290 * configure: Likewise.
3291
694b382c
AT
32922017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3293
3294 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3295 target_read_memory.
3296 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3297 (get_next_pcs_syscall_next_pc): Likewise.
3298
7dc53023
LM
32992016-12-23 Luis Machado <lgustavo@codesourcery.com>
3300
3301 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3302 * nto-x86-low.c: Likewise.
3303
ad02e4fe
SM
33042016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3305
3306 * Makefile.in: Include disable-implicit-rules.mk.
3307
dcb07cfa
PA
33082016-11-23 Pedro Alves <palves@redhat.com>
3309
3310 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3311 (debug_vprintf): Use std::chrono::steady_clock instead of
3312 gettimeofday. Use '.' instead of ':'.
3313 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3314 (get_timestamp): Use std::chrono::steady_clock instead of
3315 gettimeofday.
3316
8629c02c
SM
33172016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3318
3319 * Makefile.in: Fix whitespace formatting.
3320
b593ecca
SM
33212016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3322
3323 * Makefile.in (SFILES, OBS): Flatten list and order
3324 alphabetically.
3325
9986ba08
PA
33262016-11-23 Pedro Alves <palves@redhat.com>
3327
3328 * event-loop.c (handle_file_event): Use warning.
3329 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3330 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3331 Use warning.
3332
4eefa7bc
PA
33332016-11-23 Pedro Alves <palves@redhat.com>
3334
3335 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3336 output.
3337 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3338 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3339 debug_printf and debug_flush for debug output.
3340 * server.c (handle_general_set): Likewise.
3341 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3342 output.
3343
5443506e
SM
33442016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3345
3346 * Makefile.in (.c.o): Replace rule with ...
3347 (%.o: %.c): ... this one.
3348
3b165252
SM
33492016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3350
3351 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3352 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3353 make.
3354 * configure.ac: Remove checks for the make program.
3355 * configure: Re-generate.
3356
0bcda685
PA
33572016-10-28 Pedro Alves <palves@redhat.com>
3358
3359 * Makefile.in (CXX_DIALECT): Get from configure.
3360 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3361 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3362 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3363 * config.in: Regenerate.
3364 * configure: Regenerate.
3365
c3805894
YQ
33662016-10-27 Yao Qi <yao.qi@linaro.org>
3367
3368 * linux-low.c (linux_supports_range_stepping): Return true if
3369 can_software_single_step return true.
3370
89342618
YQ
33712016-10-27 Yao Qi <yao.qi@linaro.org>
3372
3373 * inferiors.c (find_inferior_in_random): New function.
3374 * inferiors.h (find_inferior_in_random): Declare.
3375 * linux-low.c (linux_wait_for_event_filtered): Call
3376 find_inferior_in_random instead of find_inferior.
3377
e3652c84
YQ
33782016-10-27 Yao Qi <yao.qi@linaro.org>
3379
3380 * linux-low.c (linux_wait_1): If single-step breakpoints are
3381 inserted, remove them.
3382
5a04c4cf
PA
33832016-10-26 Pedro Alves <palves@redhat.com>
3384
3385 * linux-low.c (handle_extended_wait): Link parent/child fork
3386 threads.
3387 (linux_wait_1): Unlink them.
3388 (linux_set_resume_request): Ignore resume requests for
3389 already-resumed and unhandled fork child threads.
3390 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3391 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3392 New functions.
3393 (handle_v_requests) <vCont>: Don't call require_running.
3394 * server.h (in_queued_stop_replies): New declaration.
3395
cb93dc7f
YQ
33962016-10-24 Yao Qi <yao.qi@linaro.org>
3397
3398 PR server/20733
3399 * linux-aarch64-low.c (append_insns): Cast the return value to
3400 'uint32_t *'.
3401
a1078bea
YQ
34022016-10-10 Yao Qi <yao.qi@linaro.org>
3403
3404 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3405
1fb77080
SDJ
34062016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3407
3408 * target.c (target_supports_multi_process): New function, moved
3409 from...
3410 * target.h (target_supports_multi_process): ... here. Remove
3411 macro.
3412
39b5a3b9
TT
34132016-10-05 Tom Tromey <tom@tromey.com>
3414
3415 PR remote/20655:
3416 * tracepoint.c (handle_tracepoint_bkpts): Check
3417 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3418
c1d0b70a
YQ
34192016-10-05 Yao Qi <yao.qi@linaro.org>
3420
3421 * configure.srv: Update the path of arm-*.xml files.
3422
0a69eedb
YQ
34232016-10-05 Terry Guo <terry.guo@arm.com>
3424 Yao Qi <yao.qi@linaro.org>
3425
3426 * Makefile.in: Adjust the path of rules.
3427 * configure.srv: Update the path of xml files.
3428 * regformats/arm-with-iwmmxt.dat: Regenerated.
3429 * regformats/arm-with-neon.dat: Likewise.
3430 * regformats/arm-with-vfpv2.dat: Likewise.
3431 * regformats/arm-with-vfpv3.dat Likewise.
3432
17e16485
YQ
34332016-09-30 Yao Qi <yao.qi@linaro.org>
3434
3435 PR gdbserver/20627
3436 * target.c (target_stop_and_wait): Don't call
3437 target_continue_no_signal, use resume_stop instead.
3438
edeeb602
YQ
34392016-09-26 Yao Qi <yao.qi@linaro.org>
3440
3441 * linux-low.c (linux_wait_1): Call debug_exit.
3442
503b1c39
PA
34432016-09-23 Pedro Alves <palves@redhat.com>
3444
3445 * Makefile.in (SFILES): Add common/new-op.c.
3446 (OBS): Add common/new-op.o.
3447 (new-op.o): New rule.
3448
74172ecf
SM
34492016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3450
3451 * .gitinore: Ignore more files.
3452
fc6cda2e
YQ
34532016-09-21 Yao Qi <yao.qi@linaro.org>
3454
3455 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3456 23.
3457
bc1e6c81
SDJ
34582016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3459
3460 * server.c (start_inferior): Call target_mourn_inferior instead of
3461 mourn_inferior; pass ptid_t argument to it.
3462 (resume): Likewise.
3463 (handle_target_event): Likewise.
3464 * target.c (target_mourn_inferior): New function.
3465 * target.h (mourn_inferior): Delete macro.
3466
0e00e962
AA
34672016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3468
3469 * linux-low.c (lwp_is_stepping): New function.
3470
1d8cb77d
CL
34712016-09-06 Carl Love <cel@us.ibm.com>
3472
3473 * server.c (start_inferior): Fixed comment, requested comment change
3474 didn't get updated correctly. Removed reference to ptrace () call as
3475 it is only true on Linux systems.
3476
7313bced
CL
34772016-09-06 Carl Love <cel@us.ibm.com>
3478
3479 * server.c (start_inferior): Do not call
3480 function target_post_create_inferior () if the
3481 inferior process has already exited.
3482
cf6de44d
PA
34832016-09-05 Pedro Alves <palves@redhat.com>
3484
3485 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3486 (COMPILE.pre, CC_LD): Use CXX directly.
3487 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3488 * acinclude.m4: Don't include build-with-cxx.m4.
3489 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3490 * configure: Regenerate.
3491
c1da6748
AT
34922016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3493
3494 PR gdb/19495
3495 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3496 call writing data to own_buf.
3497
f2b9e3df
SDJ
34982016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3499
3500 * target.c (mywait): Call target_wait instead of
3501 the_target->wait.
3502 (target_wait): New function.
3503
049a8570
SDJ
35042016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3505
3506 * server.c (start_inferior): New variable 'ptid'. Replace calls
3507 to the_target->resume by target_continue{,_no_signal}, depending
3508 on the case.
3509 * target.c (target_stop_and_wait): Call target_continue_no_signal
3510 instead of the_target->resume.
3511 (target_continue): New function.
3512
3aa5cfa0
AT
35132016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3514
3515 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3516
754653a7
AZ
35172016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3518
3519 PR server/20491
3520 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3521 ps_prochandle.
3522 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3523 * linux-arm-low.c (ps_get_thread_area): Likewise.
3524 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3525 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3526 * linux-mips-low.c (ps_get_thread_area): Likewise.
3527 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3528 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3529 * linux-x86-low.c (ps_get_thread_area): Likewise.
3530 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3531
ed036b40
PA
35322016-08-19 Pedro Alves <palves@redhat.com>
3533
3534 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3535
c8ef42ee
PA
35362016-08-19 Pedro Alves <palves@redhat.com>
3537
3538 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3539 comment. Use memcpy instead of casting through unsigned long.
3540
9c235a72
PA
35412016-08-19 Pedro Alves <palves@redhat.com>
3542
3543 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3544 allocating around 0x80000000.
3545
201506da
PA
35462016-08-19 Pedro Alves <palves@redhat.com>
3547
3548 PR gdb/20415
3549 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3550 (x32-avx512-linux-ipa.o): New rules.
3551 * configure.ac (x86_64-*-linux*): New x32 check.
3552 * configure.srv (ipa_x32_linux_regobj): New.
3553 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3554 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3555 descriptions.
3556 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3557 descriptions.
3558 * configure: Regenerate.
3559
f348d89a
PA
35602016-08-09 Pedro Alves <palves@redhat.com>
3561
3562 PR gdb/18653
3563 * Makefile.in (OBS): Add signals-state-save-restore.o.
3564 (signals-state-save-restore.o): New rule.
3565 * config.in: Regenerate.
3566 * configure: Regenerate.
3567 * linux-low.c: Include "signals-state-save-restore.h".
3568 (linux_create_inferior): Call
3569 restore_original_signals_state.
3570 * server.c: Include "dispositions-save-restore.h".
3571 (captured_main): Call save_original_signals_state.
3572
1baf5149
PA
35732016-08-05 Pedro Alves <palves@redhat.com>
3574
3575 * configure: Regenerate.
3576
fcd4a73d
YQ
35772016-08-04 Yao Qi <yao.qi@linaro.org>
3578
3579 * linux-low.c (regsets_fetch_inferior_registers): Check
3580 errno is ESRCH or not.
3581
979659d0
YQ
35822016-08-02 Yao Qi <yao.qi@linaro.org>
3583
3584 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3585 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3586 (thread_db_load_search): Update.
3587 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3588 td_ta_set_event and td_ta_event_getmsg.
3589
6598661d
PA
35902016-07-26 Pedro Alves <palves@redhat.com>
3591
3592 PR server/20414
3593 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3594 of unsigned long for 64-bit registers and use uint32_t instead of
3595 unsigned int for 32-bit registers.
3596
9cf12d57
PA
35972016-07-26 Pedro Alves <palves@redhat.com>
3598
3599 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3600 to 'ptrace'.
3601
305450ed
TT
36022016-07-21 Tom Tromey <tom@tromey.com>
3603
3604 * configure: Rebuild.
3605
2583da7c
YQ
36062016-07-21 Yao Qi <yao.qi@linaro.org>
3607
3608 * mem-break.c (find_gdb_breakpoint): Cast bp to
3609 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3610
21536b36
YQ
36112016-07-21 Yao Qi <yao.qi@linaro.org>
3612
3613 * server.c (handle_v_requests): Support s and S actions
3614 if target_supports_software_single_step return true.
3615
8901d193
YQ
36162016-07-21 Yao Qi <yao.qi@linaro.org>
3617
3618 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3619 is resume_step, call maybe_hw_step.
3620 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3621 and unstop them.
3622 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3623 breakpoints or not.
3624 (proceed_one_lwp): If resume request is resume_step, install
3625 reinsert breakpoints and call maybe_hw_step.
3626
0e9a339e
YQ
36272016-07-21 Yao Qi <yao.qi@linaro.org>
3628
3629 * linux-low.c (proceed_one_lwp): Declare.
3630 (linux_resume_one_thread): Remove local variable 'step'.
3631 Lift code enqueue signal. Call proceed_one_lwp instead of
3632 linux_resume_one_lwp.
3633
4281b351
YQ
36342016-07-21 Yao Qi <yao.qi@linaro.org>
3635
3636 * linux-low.c (linux_resume_one_thread): Call
3637 enqueue_pending_signal.
3638
984a2c04
YQ
36392016-07-21 Yao Qi <yao.qi@linaro.org>
3640
3641 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3642 * inferiors.c (do_restore_current_thread_cleanup): New function.
3643 (make_cleanup_restore_current_thread): Likewise.
3644 * linux-low.c (install_software_single_step_breakpoints): Call
3645 make_cleanup_restore_current_thread. Switch current_thread to
3646 thread.
3647
bec903c9
YQ
36482016-07-21 Yao Qi <yao.qi@linaro.org>
3649
3650 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3651 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3652 (clone_one_breakpoint): Likewise.
3653 (delete_reinsert_breakpoints): Change parameter to thread.
3654 Callers updated.
3655 (has_reinsert_breakpoints): Likewise.
3656 (uninsert_reinsert_breakpoints): Likewise.
3657 (reinsert_reinsert_breakpoints): Likewise.
3658 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3659 (delete_reinsert_breakpoints): Likewise.
3660 (reinsert_reinsert_breakpoints): Likewise.
3661 (uninsert_reinsert_breakpoints): Likewise.
3662 (has_reinsert_breakpoints): Likewise.
3663
63c40ec7
YQ
36642016-07-21 Yao Qi <yao.qi@linaro.org>
3665
3666 * inferiors.c (get_thread_process): Make parameter const.
3667 * inferiors.h (get_thread_process): Update declaration.
3668 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3669 Add new parameters child_thread and parent_thread. Callers
3670 updated.
3671 * mem-break.h (clone_all_breakpoints): Update declaration.
3672
9aa76cd0
YQ
36732016-07-21 Yao Qi <yao.qi@linaro.org>
3674
3675 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3676 <command_list, handler>: Remove.
3677 (struct gdb_breakpoint): New.
3678 (struct other_breakpoint): New.
3679 (struct reinsert_breakpoint): New.
3680 (is_gdb_breakpoint): New function.
3681 (any_persistent_commands): Update command_list if
3682 is_gdb_breakpoint returns true.
3683 (set_breakpoint): Create breakpoints according to their types.
3684 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3685 (set_gdb_breakpoint_1): Likewise.
3686 (set_gdb_breakpoint): Likewise.
3687 (clear_breakpoint_conditions): Change parameter type to
3688 'struct gdb_breakpoint *'.
3689 (clear_breakpoint_commands): Likewise.
3690 (clear_breakpoint_conditions_and_commands): Likewise.
3691 (add_condition_to_breakpoint): Likewise.
3692 (add_breakpoint_condition): Likewise.
3693 (add_commands_to_breakpoint): Likewise.
3694 (check_breakpoints): Check other_breakpoint.
3695 (clone_one_breakpoint): Clone breakpopint according to its type.
3696 * mem-break.h (struct gdb_breakpoint): Declare.
3697 (set_gdb_breakpoint): Update declaration.
3698 (clear_breakpoint_conditions_and_commands): Likewise.
3699 (add_breakpoint_condition): Likewise.
3700 (add_breakpoint_commands): Likewise.
3701 * server.c (process_point_options): Change parameter type to
3702 'struct gdb_breakpoint *'.
3703
811f8301
YQ
37042016-07-21 Yao Qi <yao.qi@linaro.org>
3705
3706 * mem-break.c (set_breakpoint_at): Rename it to ...
3707 (set_breakpoint_type_at): ... it.
3708 (set_breakpoint_at): Call set_breakpoint_type_at.
3709 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3710 * mem-break.h (set_breakpoint_at): Update comments.
3711
b1c51e36
CLT
37122016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3713
3714 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3715 to buf parameter.
3716 (nios2_store_gregset): Likewise.
3717
ced2dffb
PA
37182016-07-01 Pedro Alves <palves@redhat.com>
3719 Antoine Tremblay <antoine.tremblay@ericsson.com>
3720
3721 * linux-low.c: Change interface to take the target lwp_info
3722 pointer directly and return void. Handle detaching from a zombie
3723 thread.
3724 (linux_detach_lwp_callback): New function.
3725 (linux_detach): Detach from the leader thread after detaching from
3726 the clone threads.
3727
2ac09a5b
YQ
37282016-06-28 Yao Qi <yao.qi@linaro.org>
3729
3730 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3731 for variable new_offset.
3732 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3733 (aarch64_ftrace_insn_reloc_cb): Likewise.
3734 (aarch64_ftrace_insn_reloc_tb): Likewise.
3735 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3736 PRIx64 instead of PRIx32.
3737
79e7fd4f
YQ
37382016-06-28 Yao Qi <yao.qi@linaro.org>
3739
3740 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3741 (the_low_target): Install arm_get_syscall_trapinfo.
3742
061fc021
YQ
37432016-06-28 Yao Qi <yao.qi@linaro.org>
3744
3745 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3746 function.
3747 (the_low_target): Install aarch64_get_syscall_trapinfo.
3748
4cc32bec
YQ
37492016-06-28 Yao Qi <yao.qi@linaro.org>
3750
3751 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3752 Callers updated.
3753 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3754 Remove parameter sysno.
3755 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3756 sysret.
3757
782c1122
AA
37582016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3759
3760 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3761 (s390_emit_ne_goto): Likewise.
3762 (s390_emit_lt_goto): Likewise.
3763 (s390_emit_le_goto): Likewise.
3764 (s390_emit_gt_goto): Likewise.
3765 (s390_emit_ge_goto): Likewise.
3766 (s390x_emit_eq_goto): Likewise.
3767 (s390x_emit_ne_goto): Likewise.
3768 (s390x_emit_lt_goto): Likewise.
3769 (s390x_emit_le_goto): Likewise.
3770 (s390x_emit_gt_goto): Likewise.
3771 (s390x_emit_ge_goto): Likewise.
3772 (s390_emit_ops_impl): Mark variable static.
3773 (s390x_emit_ops): Likewise.
3774
2e7b624b
YQ
37752016-06-17 Yao Qi <yao.qi@linaro.org>
3776
3777 * linux-low.c (handle_extended_wait): Call
3778 uninsert_reinsert_breakpoints for the parent process. Remove
3779 reinsert breakpoints from the child process. Reinsert them to
3780 the parent process when vfork is done.
3781 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3782 (reinsert_reinsert_breakpoints): New function.
3783 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3784 (reinsert_reinsert_breakpoints): Declare.
3785
8a81c5d7
YQ
37862016-06-17 Yao Qi <yao.qi@linaro.org>
3787
3788 * linux-low.c (handle_extended_wait): If the parent is doing
3789 step-over, remove the reinsert breakpoints from the forked child.
3790
f50bf8e5
YQ
37912016-06-17 Yao Qi <yao.qi@linaro.org>
3792
3793 * linux-low.c (unsuspend_all_lwps): Declare.
3794 (linux_low_filter_event): If thread exited, call finish_step_over.
3795 If step-over is finished, unsuspend other threads.
3796
8376a3cb
YQ
37972016-06-17 Yao Qi <yao.qi@linaro.org>
3798
3799 * linux-low.c (linux_resume_one_lwp_throw): Assert
3800 has_reinsert_breakpoints returns false.
3801 * mem-break.c (delete_disabled_breakpoints): Assert
3802 bp type isn't reinsert_breakpoint.
3803
f79b145d
YQ
38042016-06-17 Yao Qi <yao.qi@linaro.org>
3805
3806 * linux-low.c (maybe_hw_step): New function.
3807 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3808 (finish_step_over): Switch current_thread to lwp temporarily,
3809 and assert has_reinsert_breakpoints returns true.
3810 (proceed_one_lwp): Call maybe_hw_step.
3811 * mem-break.c (has_reinsert_breakpoints): New function.
3812 * mem-break.h (has_reinsert_breakpoints): Declare.
3813
0ae534d2
JT
38142016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3815
3816 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3817
fcdad592
YQ
38182016-05-17 Yao Qi <yao.qi@linaro.org>
3819
3820 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3821 instead of find_inferior.
3822
9e784964
YQ
38232016-05-05 Yao Qi <yao.qi@linaro.org>
3824
3825 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3826 Initialize res to zero.
3827
cf2ebb6e
YQ
38282016-05-05 Yao Qi <yao.qi@linaro.org>
3829
3830 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3831 to uint32_t.
3832
c1aebf87
UW
38332016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3834
3835 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3836 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3837 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3838
35fd2deb 38392016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3840 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3841
3842 * tracepoint.c (write_inferior_int8): New function.
3843 (cmd_qtenable_disable): Write enable flag using
3844 write_inferior_int8.
3845
484b3c32
YQ
38462016-04-25 Yao Qi <yao.qi@linaro.org>
3847
3848 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3849 (need_step_over_p): Return zero if the LWP has pending signals
3850 can be delivered on software single step target.
3851
85ba7d86
YQ
38522016-04-25 Yao Qi <yao.qi@linaro.org>
3853
3854 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3855 return instead of error.
3856
3539aa13
YQ
38572016-04-22 Yao Qi <yao.qi@linaro.org>
3858
3859 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3860 to 23.
3861
5b061e98
YQ
38622016-04-22 Yao Qi <yao.qi@linaro.org>
3863
3864 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3865 signal when stepping over breakpoint with software single
3866 step.
3867
3451269c
PA
38682016-04-21 Pedro Alves <palves@redhat.com>
3869
3870 * linux-s390-low.c (s390_collect_ptrace_register)
3871 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3872 add casts.
3873 (s390_check_regset): Use void * instead of gdb_byte *.
3874
a2358508
PA
38752016-04-20 Pedro Alves <palves@redhat.com>
3876
3877 * configure: Renegerate.
3878
6885166d
YQ
38792016-04-20 Yao Qi <yao.qi@linaro.org>
3880
3881 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3882 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3883 number 16.
3884 (arm_store_gregset): Likewise.
3885
2b863f51
WT
38862016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3887
3888 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3889 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3890 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3891 (amd64-avx-mpx-linux.c): New rules.
3892 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3893 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3894 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3895 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3896 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3897 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3898 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3899 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3900 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3901 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3902 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3903 * linux-x86-low.c (x86_linux_read_description): Add case for
3904 X86_XSTATE_AVX_MPX_MASK.
3905 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3906 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3907 init_registers_i386_avx_mpx_linux.
3908 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3909 (initialize_low_tracepoint): Call
3910 init_registers_i386_avx_mpx_linux.
3911 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3912 (initialize_low_tracepoint): Call
3913 init_registers_amd64_avx_mpx_linux.
3914 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3915 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3916 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3917 declarations.
3918
9b30624b
PA
39192016-04-18 Pedro Alves <palves@redhat.com>
3920
3921 * configure: Regenerate.
3922
45e3745e
AT
39232016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3924
3925 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3926 (aarch64_emit_sub): Likewise.
3927
2afc13ff
PA
39282016-04-12 Pedro Alves <palves@redhat.com>
3929
3930 * utils.c (prepare_to_throw_exception): Delete.
3931
6e774b13
SM
39322016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3933
3934 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3935
4dca19f8
MK
39362016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3937
3938 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3939
d0a9981f
MK
39402016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3941
3942 * linux-aarch64-ipa.c: Add <elf.h> include.
3943 * linux-ppc-ipa.c: Add <elf.h> include.
3944 * linux-s390-ipa.c: Add <elf.h> include.
3945
252db07e
MK
39462016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3947
3948 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3949 (get_raw_reg_ptr): Likewise.
3950 (get_trace_state_variable_value_ptr): Likewise.
3951 (set_trace_state_variable_value_ptr): Likewise.
3952 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3953 char *.
3954
14e2b6d9
MK
39552016-03-31 Wei-cheng Wang <cole945@gmail.com>
3956 Marcin Kościelnicki <koriakin@0x04.net>
3957
3958 PR/17221
3959 * linux-ppc-low.c (emit_insns): New function.
3960 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3961 (ppc_emit_prologue): New function.
3962 (ppc_emit_epilogue): New function.
3963 (ppc_emit_add): New function.
3964 (ppc_emit_sub): New function.
3965 (ppc_emit_mul): New function.
3966 (ppc_emit_lsh): New function.
3967 (ppc_emit_rsh_signed): New function.
3968 (ppc_emit_rsh_unsigned): New function.
3969 (ppc_emit_ext): New function.
3970 (ppc_emit_zero_ext): New function.
3971 (ppc_emit_log_not): New function.
3972 (ppc_emit_bit_and): New function.
3973 (ppc_emit_bit_or): New function.
3974 (ppc_emit_bit_xor): New function.
3975 (ppc_emit_bit_not): New function.
3976 (ppc_emit_equal): New function.
3977 (ppc_emit_less_signed): New function.
3978 (ppc_emit_less_unsigned): New function.
3979 (ppc_emit_ref): New function.
3980 (ppc_emit_const): New function.
3981 (ppc_emit_reg): New function.
3982 (ppc_emit_pop): New function.
3983 (ppc_emit_stack_flush): New function.
3984 (ppc_emit_swap): New function.
3985 (ppc_emit_stack_adjust): New function.
3986 (ppc_emit_call): New function.
3987 (ppc_emit_int_call_1): New function.
3988 (ppc_emit_void_call_2): New function.
3989 (ppc_emit_if_goto): New function.
3990 (ppc_emit_goto): New function.
3991 (ppc_emit_eq_goto): New function.
3992 (ppc_emit_ne_goto): New function.
3993 (ppc_emit_lt_goto): New function.
3994 (ppc_emit_le_goto): New function.
3995 (ppc_emit_gt_goto): New function.
3996 (ppc_emit_ge_goto): New function.
3997 (ppc_write_goto_address): New function.
3998 (ppc_emit_ops_impl): New static variable.
3999 (ppc64v1_emit_prologue): New function.
4000 (ppc64v2_emit_prologue): New function.
4001 (ppc64_emit_epilogue): New function.
4002 (ppc64_emit_add): New function.
4003 (ppc64_emit_sub): New function.
4004 (ppc64_emit_mul): New function.
4005 (ppc64_emit_lsh): New function.
4006 (ppc64_emit_rsh_signed): New function.
4007 (ppc64_emit_rsh_unsigned): New function.
4008 (ppc64_emit_ext): New function.
4009 (ppc64_emit_zero_ext): New function.
4010 (ppc64_emit_log_not): New function.
4011 (ppc64_emit_bit_and): New function.
4012 (ppc64_emit_bit_or): New function.
4013 (ppc64_emit_bit_xor): New function.
4014 (ppc64_emit_bit_not): New function.
4015 (ppc64_emit_equal): New function.
4016 (ppc64_emit_less_signed): New function.
4017 (ppc64_emit_less_unsigned): New function.
4018 (ppc64_emit_ref): New function.
4019 (ppc64_emit_const): New function.
4020 (ppc64v1_emit_reg): New function.
4021 (ppc64v2_emit_reg): New function.
4022 (ppc64_emit_pop): New function.
4023 (ppc64_emit_stack_flush): New function.
4024 (ppc64_emit_swap): New function.
4025 (ppc64v1_emit_call): New function.
4026 (ppc64v2_emit_call): New function.
4027 (ppc64v1_emit_int_call_1): New function.
4028 (ppc64v2_emit_int_call_1): New function.
4029 (ppc64v1_emit_void_call_2): New function.
4030 (ppc64v2_emit_void_call_2): New function.
4031 (ppc64_emit_if_goto): New function.
4032 (ppc64_emit_eq_goto): New function.
4033 (ppc64_emit_ne_goto): New function.
4034 (ppc64_emit_lt_goto): New function.
4035 (ppc64_emit_le_goto): New function.
4036 (ppc64_emit_gt_goto): New function.
4037 (ppc64_emit_ge_goto): New function.
4038 (ppc64v1_emit_ops_impl): New static variable.
4039 (ppc64v2_emit_ops_impl): New static variable.
4040 (ppc_emit_ops): New function.
4041 (linux_low_target): Wire in ppc_emit_ops.
4042
a2174ba4
MK
40432016-03-31 Wei-cheng Wang <cole945@gmail.com>
4044 Marcin Kościelnicki <koriakin@0x04.net>
4045
4046 PR/17221
4047 * Makefile.in: Add powerpc-*-ipa.o
4048 * configure.srv: Add ipa_obj for powerpc*-linux.
4049 * linux-ppc-ipa.c: New file.
4050 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4051 includes.
4052 (PPC_FIELD): New macro.
4053 (PPC_SEXT): New macro.
4054 (PPC_OP6): New macro.
4055 (PPC_BO): New macro.
4056 (PPC_LI): New macro.
4057 (PPC_BD): New macro.
4058 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4059 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4060 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4061 (ppc_get_thread_area): New function.
4062 (is_elfv2_inferior): New function.
4063 (gen_ds_form): New function.
4064 (GEN_STD): New macro.
4065 (GEN_STDU): New macro.
4066 (GEN_LD): New macro.
4067 (GEN_LDU): New macro.
4068 (gen_d_form): New function.
4069 (GEN_ADDI): New macro.
4070 (GEN_ADDIS): New macro.
4071 (GEN_LI): New macro.
4072 (GEN_LIS): New macro.
4073 (GEN_ORI): New macro.
4074 (GEN_ORIS): New macro.
4075 (GEN_LWZ): New macro.
4076 (GEN_STW): New macro.
4077 (GEN_STWU): New macro.
4078 (gen_xfx_form): New function.
4079 (GEN_MFSPR): New macro.
4080 (GEN_MTSPR): New macro.
4081 (GEN_MFCR): New macro.
4082 (GEN_MTCR): New macro.
4083 (GEN_SYNC): New macro.
4084 (GEN_LWSYNC): New macro.
4085 (gen_x_form): New function.
4086 (GEN_OR): New macro.
4087 (GEN_MR): New macro.
4088 (GEN_LWARX): New macro.
4089 (GEN_STWCX): New macro.
4090 (GEN_CMPW): New macro.
4091 (gen_md_form): New function.
4092 (GEN_RLDICL): New macro.
4093 (GEN_RLDICR): New macro.
4094 (gen_i_form): New function.
4095 (GEN_B): New macro.
4096 (GEN_BL): New macro.
4097 (gen_b_form): New function.
4098 (GEN_BNE): New macro.
4099 (GEN_LOAD): New macro.
4100 (GEN_STORE): New macro.
4101 (gen_limm): New function.
4102 (gen_atomic_xchg): New function.
4103 (gen_call): New function.
4104 (ppc_relocate_instruction): New function.
4105 (ppc_install_fast_tracepoint_jump_pad): New function.
4106 (ppc_get_min_fast_tracepoint_insn_len): New function.
4107 (ppc_get_ipa_tdesc_idx): New function.
4108 (the_low_target): Wire in the new functions.
4109 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4110 tdescs.
4111 * linux-ppc-tdesc.h: New file.
4112
a13c4696
MK
41132016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4114
4115 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4116 (alloc_jump_pad_buffer): New function.
4117 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4118 (alloc_jump_pad_buffer): New function.
4119 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4120 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4121 (alloc_jump_pad_buffer): New function.
4122 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4123 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4124 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4125 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4126
1cda1512
MK
41272016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4128
4129 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4130 * linux-amd64-ipa.c: Likewise.
4131 * linux-i386-ipa.c: Likewise.
4132 * linux-s390-ipa.c: Likewise.
4133 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4134 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4135 set_trace_state_variable_value_ptr.
4136 (struct ipa_sym_addresses): Likewise.
4137 (symbol_list): Likewise.
4138 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4139 accessing gdb_collect directly.
4140 (gdb_collect_ptr_type): New typedef.
4141 (get_raw_reg_ptr_type): New typedef.
4142 (get_trace_state_variable_value_ptr_type): New typedef.
4143 (set_trace_state_variable_value_ptr_type): New typedef.
4144 (gdb_collect_ptr): New global.
4145 (get_raw_reg_ptr): New global.
4146 (get_trace_state_variable_value_ptr): New global.
4147 (set_trace_state_variable_value_ptr): New global.
4148 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4149 accessing get_raw_reg directly.
4150 (get_get_tsv_func_addr): Likewise for
4151 get_trace_state_variable_value_ptr.
4152 (get_set_tsv_func_addr): Likewise for
4153 set_trace_state_variable_value_ptr.
4154 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4155
72fb5488
SM
41562016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4157
4158 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4159
28170b88
MK
41602016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4161
4162 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4163 packets.
4164 (relocate_instruction): Remove own_buf.
4165 * server.c (own_buf): Make global.
4166 (handle_v_requests): Make global.
4167 * server.h (own_buf): New declaration.
4168 (handle_v_requests): New prototype.
4169
f39e8743
MK
41702016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4171
4172 PR 18377
4173 * linux-s390-low.c (add_insns): New function.
4174 (s390_emit_prologue): New function.
4175 (s390_emit_epilogue): New function.
4176 (s390_emit_add): New function.
4177 (s390_emit_sub): New function.
4178 (s390_emit_mul): New function.
4179 (s390_emit_lsh): New function.
4180 (s390_emit_rsh_signed): New function.
4181 (s390_emit_rsh_unsigned): New function.
4182 (s390_emit_ext): New function.
4183 (s390_emit_log_not): New function.
4184 (s390_emit_bit_and): New function.
4185 (s390_emit_bit_or): New function.
4186 (s390_emit_bit_xor): New function.
4187 (s390_emit_bit_not): New function.
4188 (s390_emit_equal): New function.
4189 (s390_emit_less_signed): New function.
4190 (s390_emit_less_unsigned): New function.
4191 (s390_emit_ref): New function.
4192 (s390_emit_if_goto): New function.
4193 (s390_emit_goto): New function.
4194 (s390_write_goto_address): New function.
4195 (s390_emit_litpool): New function.
4196 (s390_emit_const): New function.
4197 (s390_emit_call): New function.
4198 (s390_emit_reg): New function.
4199 (s390_emit_pop): New function.
4200 (s390_emit_stack_flush): New function.
4201 (s390_emit_zero_ext): New function.
4202 (s390_emit_swap): New function.
4203 (s390_emit_stack_adjust): New function.
4204 (s390_emit_set_r2): New function.
4205 (s390_emit_int_call_1): New function.
4206 (s390_emit_void_call_2): New function.
4207 (s390_emit_eq_goto): New function.
4208 (s390_emit_ne_goto): New function.
4209 (s390_emit_lt_goto): New function.
4210 (s390_emit_le_goto): New function.
4211 (s390_emit_gt_goto): New function.
4212 (s390_emit_ge_goto): New function.
4213 (s390x_emit_prologue): New function.
4214 (s390x_emit_epilogue): New function.
4215 (s390x_emit_add): New function.
4216 (s390x_emit_sub): New function.
4217 (s390x_emit_mul): New function.
4218 (s390x_emit_lsh): New function.
4219 (s390x_emit_rsh_signed): New function.
4220 (s390x_emit_rsh_unsigned): New function.
4221 (s390x_emit_ext): New function.
4222 (s390x_emit_log_not): New function.
4223 (s390x_emit_bit_and): New function.
4224 (s390x_emit_bit_or): New function.
4225 (s390x_emit_bit_xor): New function.
4226 (s390x_emit_bit_not): New function.
4227 (s390x_emit_equal): New function.
4228 (s390x_emit_less_signed): New function.
4229 (s390x_emit_less_unsigned): New function.
4230 (s390x_emit_ref): New function.
4231 (s390x_emit_if_goto): New function.
4232 (s390x_emit_const): New function.
4233 (s390x_emit_call): New function.
4234 (s390x_emit_reg): New function.
4235 (s390x_emit_pop): New function.
4236 (s390x_emit_stack_flush): New function.
4237 (s390x_emit_zero_ext): New function.
4238 (s390x_emit_swap): New function.
4239 (s390x_emit_stack_adjust): New function.
4240 (s390x_emit_int_call_1): New function.
4241 (s390x_emit_void_call_2): New function.
4242 (s390x_emit_eq_goto): New function.
4243 (s390x_emit_ne_goto): New function.
4244 (s390x_emit_lt_goto): New function.
4245 (s390x_emit_le_goto): New function.
4246 (s390x_emit_gt_goto): New function.
4247 (s390x_emit_ge_goto): New function.
4248 (s390_emit_ops): New function.
4249 (struct linux_target_ops): Fill in emit_ops hook.
4250
abd9baf9
MK
42512016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4252
4253 PR 18377
4254 * Makefile.in: Add s390 IPA files.
4255 * configure.srv: Build IPA for s390.
4256 * linux-s390-ipa.c: New file.
4257 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4258 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4259 (tdesc_s390_linux32): Likewise.
4260 (init_registers_s390_linux32v1): Likewise.
4261 (tdesc_s390_linux32v1): Likewise.
4262 (init_registers_s390_linux32v2): Likewise.
4263 (tdesc_s390_linux32v2): Likewise.
4264 (init_registers_s390_linux64): Likewise.
4265 (tdesc_s390_linux64): Likewise.
4266 (init_registers_s390_linux64v1): Likewise.
4267 (tdesc_s390_linux64v1): Likewise.
4268 (init_registers_s390_linux64v2): Likewise.
4269 (tdesc_s390_linux64v2): Likewise.
4270 (init_registers_s390_te_linux64): Likewise.
4271 (tdesc_s390_te_linux64): Likewise.
4272 (init_registers_s390_vx_linux64): Likewise.
4273 (tdesc_s390_vx_linux64): Likewise.
4274 (init_registers_s390_tevx_linux64): Likewise.
4275 (tdesc_s390_tevx_linux64): Likewise.
4276 (init_registers_s390x_linux64): Likewise.
4277 (tdesc_s390x_linux64): Likewise.
4278 (init_registers_s390x_linux64v1): Likewise.
4279 (tdesc_s390x_linux64v1): Likewise.
4280 (init_registers_s390x_linux64v2): Likewise.
4281 (tdesc_s390x_linux64v2): Likewise.
4282 (init_registers_s390x_te_linux64): Likewise.
4283 (tdesc_s390x_te_linux64): Likewise.
4284 (init_registers_s390x_vx_linux64): Likewise.
4285 (tdesc_s390x_vx_linux64): Likewise.
4286 (init_registers_s390x_tevx_linux64): Likewise.
4287 (tdesc_s390x_tevx_linux64): Likewise.
4288 (have_hwcap_s390_vx): New static variable.
4289 (s390_arch_setup): Fill have_hwcap_s390_vx.
4290 (s390_get_thread_area): New function.
4291 (s390_ft_entry_gpr_esa): New const.
4292 (s390_ft_entry_gpr_zarch): New const.
4293 (s390_ft_entry_misc): New const.
4294 (s390_ft_entry_fr): New const.
4295 (s390_ft_entry_vr): New const.
4296 (s390_ft_main_31): New const.
4297 (s390_ft_main_64): New const.
4298 (s390_ft_exit_fr): New const.
4299 (s390_ft_exit_vr): New const.
4300 (s390_ft_exit_misc): New const.
4301 (s390_ft_exit_gpr_esa): New const.
4302 (s390_ft_exit_gpr_zarch): New const.
4303 (append_insns): New function.
4304 (s390_relocate_instruction): New function.
4305 (s390_install_fast_tracepoint_jump_pad): New function.
4306 (s390_get_min_fast_tracepoint_insn_len): New function.
4307 (s390_get_ipa_tdesc_idx): New function.
4308 (struct linux_target_ops): Wire in the above functions.
4309 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4310 * linux-s390-tdesc.h: New file.
4311
a4105d04
MK
43122016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4313
4314 * linux-s390-low.c (s390_supports_tracepoints): New function.
4315 (struct linux_target_ops): Fill supports_tracepoints hook.
4316
35ac8b3e
YQ
43172016-03-18 Yao Qi <yao.qi@linaro.org>
4318
4319 * linux-low.c (lwp_signal_can_be_delivered): New function.
4320 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4321
94610ec4
YQ
43222016-03-18 Yao Qi <yao.qi@linaro.org>
4323
4324 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4325 0 if signal is enqueued. Remove 'signal' from one debugging
4326 message. Move one debugging message to some lines below.
4327 Remove code setting 'signal' to 0.
4328
80aea927
YQ
43292016-03-18 Yao Qi <yao.qi@linaro.org>
4330
4331 * linux-low.c (linux_low_filter_event): Remove redundant
4332 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4333
b04fd3be
MK
43342016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4335
4336 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4337 (struct linux_target_ops): Wire in the above.
4338
c40c8d4b
YQ
43392016-03-03 Yao Qi <yao.qi@linaro.org>
4340
4341 * linux-low.c: Update comments to start_step_over.
4342
0f8288ae
YQ
43432016-03-03 Yao Qi <yao.qi@linaro.org>
4344
4345 PR server/19736
4346 * linux-low.c (handle_extended_wait): Set child suspended
4347 if event_lwp->bp_reinsert isn't zero.
4348
fdbd04a8
YQ
43492016-03-02 Yao Qi <yao.qi@linaro.org>
4350
4351 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4352 enqueue_pending_signal.
4353
6896a8fa
MK
43542016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4355
4356 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4357 is actually loaded.
4358
ab503087
MK
43592016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4360
4361 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4362 (s390_regmap_3264) [!__s390x__]: New global.
4363 (s390_collect_ptrace_register): Skip map entries containing -1.
4364 (s390_supply_ptrace_register): Ditto.
4365 (s390_fill_gprs_high): New function.
4366 (s390_store_gprs_high): New function.
4367 (s390_regsets): Add NT_S390_HIGH_GPRS.
4368 (s390_get_hwcap): Enable on 31-bit.
4369 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4370 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4371 Detect NT_S390_HIGH_GPRS.
4372 (s390_usrregs_info_3264): Enable on 31-bit.
4373 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4374 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4375
ae91f625
MK
43762016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4377
4378 PR gdb/13808
4379 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4380 * configure.srv: Ditto.
4381 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4382 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4383 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4384 (init_registers_amd64_linux): Remove prototype.
4385 (tdesc_amd64_linux): Remove declaration.
4386 (get_ipa_tdesc): New function.
4387 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4388 initialize remaining tdescs.
4389 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4390 (init_registers_i386_linux): Remove prototype.
4391 (tdesc_i386_linux): Remove declaration.
4392 (get_ipa_tdesc): New function.
4393 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4394 initialize remaining tdescs.
4395 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4396 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4397 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4398 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4399 (x86_get_ipa_tdesc_idx): New function.
4400 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4401 * linux-x86-tdesc.h: New file.
4402 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4403 (target_get_ipa_tdesc_idx): New macro.
4404 * tracepoint.c (ipa_tdesc_idx): New macro.
4405 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4406 (symbol_list): Add ipa_tdesc_idx.
4407 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4408 (ipa_tdesc): Remove.
4409 (ipa_tdesc_idx): New variable.
4410 (get_context_regcache): Use get_ipa_tdesc.
4411 (gdb_collect): Ditto.
4412 (gdb_probe): Ditto.
4413 * tracepoint.h (get_ipa_tdesc): New prototype.
4414 (ipa_tdesc): Remove.
4415
e7ad2f14
PA
44162016-02-24 Pedro Alves <palves@redhat.com>
4417
4418 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4419 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4420 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4421 Factor out common code between the USE_SIGTRAP_SIGINFO and
4422 !USE_SIGTRAP_SIGINFO blocks.
4423 (linux_low_filter_event): Call save_stop_reason instead of
4424 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4425 Update comments.
4426 (linux_wait_1): Update comments.
4427
657f9cde
WW
44282016-02-24 Wei-cheng Wang <cole945@gmail.com>
4429
4430 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4431 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4432 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4433 ppc_insert_point, ppc_remove_point.
4434
b00b61e1
MK
44352016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4436
4437 * linux-s390-low.c (s390_supports_z_point_type): New function.
4438 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4439
553cb527
YQ
44402016-02-16 Yao Qi <yao.qi@linaro.org>
4441
4442 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4443 PC. Get pc from regcache_read_pc.
4444
a5652c21
YQ
44452016-02-12 Yao Qi <yao.qi@linaro.org>
4446
4447 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4448 or linux_get_pc_32bit.
4449 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4450
ed443b61
YQ
44512016-02-12 Yao Qi <yao.qi@linaro.org>
4452
4453 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4454 arm_linux_get_next_pcs_fixup.
4455
020ecd38
MK
44562016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4457
4458 * tracepoint.c (x_tracepoint_action_download): Change
4459 write_inferior_data_ptr to write_inferior_data_pointer.
4460 (cmd_qtstart): Likewise.
4461 (write_inferior_data_ptr): Remove.
4462 (download_agent_expr): Change write_inferior_data_ptr to
4463 write_inferior_data_pointer.
4464 (download_tracepoint_1): Likewise.
4465 (download_tracepoint): Likewise.
4466 (download_trace_state_variables): Likewise.
4467
7cae9051
WW
44682016-02-11 Wei-cheng Wang <cole945@gmail.com>
4469 Marcin Kościelnicki <koriakin@0x04.net>
4470
4471 * tracepoint.c (struct tracepoint_action_ops): Remove.
4472 (struct tracepoint_action): Remove ops.
4473 (m_tracepoint_action_download, r_tracepoint_action_download)
4474 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4475 size and offset accordingly.
4476 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4477 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4478 (tracepoint_action_send, tracepoint_action_download): New functions.
4479 Helpers for trace action handlers.
4480 (add_tracepoint_action): Remove setup actions ops.
4481 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4482
9f6a71b4
YQ
44832016-02-10 Yao Qi <yao.qi@linaro.org>
4484
4485 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4486
1e94266c
SM
44872016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4488
4489 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4490 to AC_OUTPUT.
4491 * configure: Regenerate.
4492
8adce034
SM
44932016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4494
4495 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4496 void * to gdb_byte *.
4497 * linux-low.c (siginfo_fixup): Likewise.
4498 (linux_xfer_siginfo): Likewise.
4499 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4500 Likewise.
4501 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4502
93813b37
WT
45032016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4504
4505 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4506 to srv_tgtobj.
4507 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4508 to srv_tgtobj.
4509 * linux-x86-low.c [__x86_64__]: Include
4510 "nat/amd64-linux-siginfo.h".
4511 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4512 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4513 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4514 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4515 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4516 (cpt_si_fd, si_timerid, si_overrun): Move from
4517 nat/amd64-linux-siginfo.c.
4518 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4519
8424cc97
SM
45202016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4521
4522 * server.c (skip_to_semicolon): Remove.
4523 (process_point_options): Use strchrnul instead of
4524 skip_to_semicolon.
4525
4d18591b
YQ
45262016-01-26 Yao Qi <yao.qi@linaro.org>
4527
4528 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4529 * linux-low.c (install_software_single_step_breakpoints): Don't
4530 call regcache_read_pc.
4531 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4532 argument pc.
4533
d8020970
YQ
45342016-01-26 Yao Qi <yao.qi@linaro.org>
4535
4536 * linux-low.c (install_software_single_step_breakpoints): Call
4537 regcache_read_pc instead of get_pc.
4538
8b207339
YQ
45392016-01-26 Yao Qi <yao.qi@linaro.org>
4540
4541 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4542 (unblock_async_io): Rename to ...
4543 (block_unblock_async_io): ... it. New function.
4544 (enable_async_io): Don't install SIGIO handler. Unblock it
4545 instead.
4546 (disable_async_io): Don't ignore SIGIO. Block it instead.
4547 (initialize_async_io): Install SIGIO handler. Don't call
4548 unblock_async_io.
4549
18879fef
YQ
45502016-01-26 Yao Qi <yao.qi@linaro.org>
4551
4552 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4553 first character is '\003', call *the_target->request_interrupt.
4554
a0f8e08a
YQ
45552016-01-25 Yao Qi <yao.qi@linaro.org>
4556
4557 * remote-utils.c (new_thread_notify): Remove.
4558 (dead_thread_notify): Likewise.
4559 * remote-utils.h (new_thread_notify): Remove declaration.
4560 (dead_thread_notify): Likewise.
4561
cc5fd9ab
MK
45622016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4563
4564 * gdb.trace/pending.exp: Fix expected message on continue.
4565
99e8eb11
MK
45662016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4567
4568 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4569 it works properly on big-endian machines where sizeof (CORE_ADDR)
4570 != sizeof (void *).
4571
a994041d
PA
45722016-01-21 Pedro Alves <palves@redhat.com>
4573
4574 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4575 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4576 * configure: Regenerate.
4577
f7a6a40d
YQ
45782016-01-21 Yao Qi <yao.qi@linaro.org>
4579
4580 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4581 is_thumb and set it according to CPSR saved on the stack.
4582 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4583 arm_sigreturn_next_pc.
4584
6f69e520
YQ
45852016-01-18 Yao Qi <yao.qi@linaro.org>
4586
4587 * linux-low.c (linux_set_pc_64bit): New function.
4588 (linux_get_pc_64bit): New function.
4589 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4590 Declare.
4591 * linux-sparc-low.c (debug_threads): Remove declaration.
4592 (sparc_get_pc): Remove.
4593 (the_low_target): Use linux_get_pc_64bit instead of
4594 sparc_get_pc.
4595 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4596 (the_low_target): Use linux_get_pc_64bit and
4597 linux_set_pc_64bit.
4598
276d4552
YQ
45992016-01-18 Yao Qi <yao.qi@linaro.org>
4600
4601 * linux-arm-low.c (debug_threads): Remove declaration.
4602 (arm_get_pc, arm_set_pc): Remove.
4603 (the_low_target): Use linux_get_pc_32bit and
4604 linux_set_pc_32bit.
4605 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4606 (the_low_target): Use linux_get_pc_32bit and
4607 linux_set_pc_32bit.
4608 * linux-cris-low.c (debug_threads): Remove declaration.
4609 (cris_get_pc, cris_set_pc,): Remove.
4610 (the_low_target): Use linux_get_pc_32bit and
4611 linux_set_pc_32bit.
4612 * linux-crisv32-low.c (debug_threads): Remove declaration.
4613 (cris_get_pc, cris_set_pc): Remove.
4614 (the_low_target): Use linux_get_pc_32bit and
4615 linux_set_pc_32bit.
4616 * linux-low.c: Include inttypes.h.
4617 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4618 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4619 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4620 (the_low_target): Use linux_get_pc_32bit and
4621 linux_set_pc_32bit.
4622 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4623 (the_low_target): Use linux_get_pc_32bit and
4624 linux_set_pc_32bit.
4625 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4626 (the_low_target): Use linux_get_pc_32bit and
4627 linux_set_pc_32bit.
4628 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4629 (the_low_target): Use linux_get_pc_32bit and
4630 linux_set_pc_32bit.
4631 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4632 (the_low_target): Use linux_get_pc_32bit and
4633 linux_set_pc_32bit.
4634
eb0edac8
GB
46352016-01-18 Gary Benson <gbenson@redhat.com>
4636
4637 * configure.ac (AC_FUNC_FORK): New check.
4638 * config.in: Regenerate.
4639 * configure: Likewise.
4640
1b451dda
YQ
46412016-01-14 Yao Qi <yao.qi@linaro.org>
4642
4643 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4644 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4645 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4646 arm_get_next_pcs_ctor.
4647
82075af2
JS
46482016-01-12 Josh Stone <jistone@redhat.com>
4649 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4650
4651 * inferiors.h: Include "gdb_vecs.h".
4652 (struct process_info): Add syscalls_to_catch.
4653 * inferiors.c (remove_process): Free syscalls_to_catch.
4654 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4655 syscall_return stops.
4656 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4657 * server.c (handle_general_set): Handle QCatchSyscalls.
4658 (handle_query): Report support for QCatchSyscalls.
4659 * target.h (struct target_ops): Add supports_catch_syscall.
4660 (target_supports_catch_syscall): New macro.
4661 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4662 (struct lwp_info): Add syscall_state.
4663 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4664 Maintain syscall_state and syscalls_to_catch across exec.
4665 (get_syscall_trapinfo): New function, proxy to the_low_target.
4666 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4667 (linux_low_filter_event): Toggle syscall_state entry/return for
4668 syscall traps, and set it ignored for all others.
4669 (gdb_catching_syscalls_p): New function.
4670 (gdb_catch_this_syscall_p): New function.
4671 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4672 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4673 (linux_supports_catch_syscall): New function.
4674 (linux_target_ops): Install it.
4675 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4676 (the_low_target): Install it.
4677
8f13a3ce
MF
46782016-01-12 Mike Frysinger <vapier@gentoo.org>
4679
4680 * acinclude.m4: Include new ../warning.m4 file.
4681 * configure: Regenerated.
4682 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4683
5b3da067
MF
46842016-01-12 Mike Frysinger <vapier@gentoo.org>
4685
4686 * ax.c (is_goto_target): Mark static.
4687 * linux-low.c (register_addr): Likewise.
4688 (linux_fetch_registers, linux_store_registers): Likewise.
4689 * mem-break.c (any_persistent_commands): Fix old prototype.
4690 (add_commands_to_breakpoint): Mark static.
4691 * regcache.c (find_register_by_name): Delete unused func.
4692 * remote-utils.c (hex_or_minus_one): Mark static.
4693 * server.c (monitor_show_help): Mark static.
4694 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4695 handle_v_requests): Likewise.
4696
bc504a31
PA
46972016-01-12 Pedro Alves <palves@redhat.com>
4698
4699 Remove use of the registered trademark symbol throughout.
4700
5a0dd67a
YQ
47012016-01-08 Yao Qi <yao.qi@linaro.org>
4702
4703 * remote-utils.c (getpkt): If c is '\003', call target hook
4704 request_interrupt.
4705
b2ca446f
YQ
47062016-01-06 Yao Qi <yao.qi@linaro.org>
4707
4708 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4709 linux-aarch32-low.c.
4710 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4711 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4712 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4713 (thumb2_breakpoint): Declare.
4714 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4715 linux-aarch32-low.h.
4716 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4717 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4718 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4719
edd88788
JB
47202016-01-01 Joel Brobecker <brobecker@adacore.com>
4721
4722 * gdbreplay.c (gdbreplay_version): Change copyright year in
4723 version message.
4724 * server.c (gdbserver_version): Likewise.
4725
65da7f14
PP
47262015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4727
4728 * server.c (crc32_table): Delete.
4729 (crc32): Use libiberty's xcrc32 function.
4730
4abd5ed2
JB
47312015-12-22 Joel Brobecker <brobecker@adacore.com>
4732
4733 * lynx-low.c (lynx_delete_thread_callback): New function.
4734 (lynx_mourn): Properly delete our process and all of its
4735 threads. Remove call to clear_inferiors.
4736
0e50fe5c
JB
47372015-12-22 Joel Brobecker <brobecker@adacore.com>
4738
4739 * target.c (thread_search_callback): Add check that
4740 the thread_stopped target callback is not NULL before
4741 calling it.
4742
35adc03f
YQ
47432015-12-21 Yao Qi <yao.qi@linaro.org>
4744
4745 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4746 arm breakpoint.
4747
bd2b2909
AT
47482015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4749
4750 * server.c (handle_query): Call target_supports_software_single_step.
4751
7fe5e27e
AT
47522015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4753
4754 * linux-low.c (single_step): New function.
4755 (linux_resume_one_lwp_throw): Call single_step.
4756 (start_step_over): Likewise.
4757
d9311bfa
AT
47582015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4759
4760 * Makefile.in (SFILES): Append arch/arm-linux.c,
4761 arch/arm-get-next-pcs.c.
4762 (arm-linux.o): New rule.
4763 (arm-get-next-pcs.o): New rule.
4764 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4765 arm-linux.o.
4766 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4767 to linux-aarch32-low.c.
4768 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4769 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4770 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4771 (thumb2_breakpoint_len): Likewise.
4772 (arm_is_thumb_mode): Make non-static.
4773 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4774 from linux-aarch32-low.c.
4775 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4776 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4777 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4778 (thumb2_breakpoint_len): Likewise.
4779 (arm_is_thumb_mode): New declaration.
4780 * linux-arm-low.c: Include arch/arm-linux.h
4781 aarch/arm-get-next-pcs.h, sys/syscall.h.
4782 (get_next_pcs_ops): New struct.
4783 (get_next_pcs_addr_bits_remove): New function.
4784 (get_next_pcs_is_thumb): New function.
4785 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4786 (arm_sigreturn_next_pc): Likewise.
4787 (get_next_pcs_syscall_next_pc): Likewise.
4788 (arm_gdbserver_get_next_pcs): Likewise.
4789 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4790 Initialize.
4791 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4792 * server.h: Include gdb_vecs.h.
4793
68ce2059
AT
47942015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4795
4796 * Makefile.in (SFILES): Append common/common-regcache.c.
4797 (OBS): Append common-regcache.o.
4798 (common-regcache.o): New rule.
4799 * regcache.c (init_register_cache): Initialize cache to
4800 REG_UNAVAILABLE.
4801 (regcache_raw_read_unsigned): New function.
4802 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4803 register_status enum.
4804
fa5308bd
AT
48052015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4806
4807 * linux-aarch64-low.c (the_low_targets): Rename
4808 breakpoint_reinsert_addr to get_next_pcs.
4809 * linux-arm-low.c (the_low_targets): Likewise.
4810 * linux-bfin-low.c (the_low_targets): Likewise.
4811 * linux-cris-low.c (the_low_targets): Likewise.
4812 * linux-crisv32-low.c (the_low_targets): Likewise.
4813 * linux-low.c (can_software_single_step): Likewise.
4814 (install_software_single_step_breakpoints): New function.
4815 (start_step_over): Use install_software_single_step_breakpoints.
4816 * linux-low.h: New CORE_ADDR vector.
4817 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4818 get_next_pcs.
4819 * linux-mips-low.c (the_low_targets): Likewise.
4820 * linux-nios2-low.c (the_low_targets): Likewise.
4821 * linux-sparc-low.c (the_low_targets): Likewise.
4822
4a6ed09b
PA
48232015-12-17 Pedro Alves <palves@redhat.com>
4824
4825 * linux-low.c (linux_kill_one_lwp): Remove references to
4826 LinuxThreads.
4827 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4828 to 'kill'.
4829 (linux_init_signals): Delete.
4830 (initialize_low): Adjust.
4831 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4832
7544db95
PA
48332015-12-16 Pedro Alves <palves@redhat.com>
4834
4835 * configure.ac (compiler warning flags): When testing a
4836 -Wno-foo option, check whether -Wfoo works instead.
4837 * configure: Regenerate.
4838
8020350c
DB
48392015-12-11 Don Breazeal <donb@codesourcery.com>
4840
4841 * server.c (process_serial_event): Don't exit from gdbserver
4842 in remote mode if there are still active inferiors.
4843
db91f502
YQ
48442015-12-11 Yao Qi <yao.qi@linaro.org>
4845
4846 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4847 arm_breakpoint_at if the process is 32-bit.
4848
b37a6290
YQ
48492015-12-11 Yao Qi <yao.qi@linaro.org>
4850
4851 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4852 arm breakpoint.
4853
17b1509a
YQ
48542015-12-07 Yao Qi <yao.qi@linaro.org>
4855
4856 * configure.srv: Append arm.o to srv_tgtobj for
4857 aarch64*-*-linux* target.
4858 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4859 from linux-arm-low.c.
4860 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4861 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4862 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4863 (thumb2_breakpoint_len): Likewise.
4864 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4865 (arm_breakpoint_kinds): Likewise.
4866 (arm_breakpoint_kind_from_pc): Likewise.
4867 (arm_sw_breakpoint_from_kind): Likewise.
4868 (arm_breakpoint_kind_from_current_state): Likewise.
4869 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4870 (arm_sw_breakpoint_from_kind): Declare.
4871 (arm_breakpoint_kind_from_current_state): Declare.
4872 (arm_breakpoint_at): Declare.
4873 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4874 arm_sw_breakpoint_from_kind if process is 32-bit.
4875 (aarch64_breakpoint_kind_from_pc): New function.
4876 (aarch64_breakpoint_kind_from_current_state): New function.
4877 (the_low_target): Initialize fields breakpoint_kind_from_pc
4878 and breakpoint_kind_from_current_state.
4879 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4880 linux-aarch32-low.c.
4881 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4882 (arm_breakpoint, arm_breakpoint_len): Likewise.
4883 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4884 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4885 (arm_is_thumb_mode): Likewise.
4886 (arm_breakpoint_at): Likewise.
4887 (arm_breakpoint_kind_from_pc): Likewise.
4888 (arm_sw_breakpoint_from_kind): Likewise.
4889 (arm_breakpoint_kind_from_current_state): Likewise.
4890
4891 Revert:
4892 2015-08-04 Yao Qi <yao.qi@linaro.org>
4893
4894 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4895 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4896 * server.c (extended_protocol): Remove "static".
4897 * server.h (extended_protocol): Declare it.
4898
ece66d65
JS
48992015-12-04 Josh Stone <jistone@redhat.com>
4900
4901 * target.h (struct target_ops) <arch_setup>: Rename to ...
4902 (struct target_ops) <post_create_inferior>: ... this.
4903 (target_arch_setup): Rename to ...
4904 (target_post_create_inferior): ... this, calling post_create_inferior.
4905 * server.c (start_inferior): Update target_arch_setup calls to
4906 target_post_create_inferior.
4907 * linux-low.c (linux_low_ptrace_options): Forward declare.
4908 (linux_arch_setup): Update its comment for general use.
4909 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4910 (struct linux_target_ops): Use linux_post_create_inferior.
4911 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4912 to post_create_inferior.
4913 * nto-low.c (struct nto_target_ops): Likewise.
4914 * spu-low.c (struct spu_target_ops): Likewise.
4915 * win32-low.c (struct win32_target_ops): Likewise.
4916
e58c48b4
AT
49172015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4918
4919 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4920
fbec8956
AT
49212015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4922
4923 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4924 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4925 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4926 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4927 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4928 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4929 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4930 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4931 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4932 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4933 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4934 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4935
9b4c5f87
AT
49362015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4937
4938 * linux-low.c (linux_look_up_symbols): Don't call
4939 linux_supports_traceclone.
4940 * linux-low.h (thread_db_init): Remove use_events argument.
4941 * thread-db.c (thread_db_use_event): Remove global variable.
4942 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4943 (struct thread_db) <td_create_bp>: Remove field.
4944 (thread_db_create_event): Remove function.
4945 (thread_db_enable_reporting): Likewise.
4946 (find_one_thread): Don't check for thread_db_use_events.
4947 (attach_thread): Likewise.
4948 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4949 (try_thread_db_load_1): Don't check for thread_db_use_events.
4950 (thread_db_init): Remove use_events argument and thread events
4951 handling.
4952 (remove_thread_event_breakpoints): Remove function.
4953 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4954
7d00775e
AT
49552015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4956
4957 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4958 New function.
4959 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4960 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4961 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4962 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4963 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4964 Initialize.
4965 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4966 New function.
4967 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4968 * linux-low.c (can_hardware_single_step): Use
4969 supports_hardware_single_step.
4970 (can_software_single_step): New function.
4971 (start_step_over): Call can_software_single_step.
4972 (linux_supports_hardware_single_step): New function.
4973 (struct target_ops) <supports_software_single_step>: Initialize.
4974 * linux-low.h (struct linux_target_ops)
4975 <supports_hardware_single_step>: Initialize.
4976 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4977 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4978 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4979 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4980 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4981 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4982 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4983 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4984 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4985 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4986 Initialize.
4987 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4988 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4989 Initialize.
4990 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4991 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4992 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4993 New function.
4994 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4995 * target.h (struct target_ops): <supports_software_single_step>:
4996 New field.
4997 (target_supports_software_single_step): New macro.
4998
2d97cd35
AT
49992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5000
5001 * linux-low.c (linux_wait_1): Fix pc advance condition.
5002 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5003 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5004
769ef81f
AT
50052015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5006
5007 * linux-arm-low.c (arm_is_thumb_mode): New function.
5008 (arm_breakpoint_at): Use arm_is_thumb_mode.
5009 (arm_breakpoint_kind_from_current_state): New function.
5010 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5011 Initialize.
5012 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5013 (linux_breakpoint_kind_from_current_state): New function.
5014 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5015 * linux-low.h (struct linux_target_ops)
5016 <breakpoint_kind_from_current_state>: New field.
5017 * target.h (struct target_ops): Likewise.
5018 (target_breakpoint_kind_from_current_state): New macro.
5019
1bebeeca
PA
50202015-11-30 Pedro Alves <palves@redhat.com>
5021
5022 * linux-low.c (linux_resume): Wake up the event loop before
5023 returning.
5024
a67a9fae
PA
50252015-11-30 Pedro Alves <palves@redhat.com>
5026
5027 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5028 check.
5029 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5030 to -1.
5031 * target.c (struct thread_search): New structure.
5032 (thread_search_callback): New function.
5033 (prev_general_thread): New global.
5034 (prepare_to_access_memory, done_accessing_memory): New functions.
5035 * target.h (prepare_to_access_memory, done_accessing_memory):
5036 Replace macros with function declarations.
5037
f2faf941
PA
50382015-11-30 Pedro Alves <palves@redhat.com>
5039
5040 PR 14618
5041 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5042 report TARGET_WAITKIND_NO_RESUMED.
5043 * remote-utils.c (prepare_resume_reply): Handle
5044 TARGET_WAITKIND_NO_RESUMED.
5045 * server.c (report_no_resumed): New global.
5046 (handle_query) <qSupported>: Handle "no-resumed+". Report
5047 "no-resumed+" support.
5048 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5049 return error if the client doesn't support no-resumed events.
5050 (push_stop_notification): New function.
5051 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5052 events if the client supports them.
5053
a681f9c9
PA
50542015-11-30 Pedro Alves <palves@redhat.com>
5055
5056 * linux-low.c (thread_still_has_status_pending_p): Don't check
5057 vCont;t here.
5058 (lwp_resumed): New function.
5059 (status_pending_p_callback): Return early if the LWP is not
5060 supposed to be resumed.
5061
65706a29
PA
50622015-11-30 Pedro Alves <palves@redhat.com>
5063
5064 * linux-low.c (handle_extended_wait): Assert that the LWP's
5065 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5066 thread create events, leave the new child's status pending.
5067 (linux_low_filter_event): If GDB wants to hear about thread exit
5068 events, leave the LWP marked dead and don't delete it.
5069 (linux_wait_for_event_filtered): Don't check for thread exit.
5070 (filter_exit_event): New function.
5071 (linux_wait_1): Use it, when returning an exit event.
5072 (linux_resume_one_lwp_throw): Assert that the LWP's
5073 waitstatus is TARGET_WAITKIND_IGNORE.
5074 * remote-utils.c (prepare_resume_reply): Handle
5075 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5076 * server.c (report_thread_events): New global.
5077 (handle_general_set): Handle QThreadEvents.
5078 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5079 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5080 TARGET_WAITKIND_THREAD_EXITED.
5081 * server.h (report_thread_events): Declare.
5082
56cf4bed
PA
50832015-11-30 Pedro Alves <palves@redhat.com>
5084
5085 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5086 the thread's last_resume_kind was resume_stop.
5087
500c1d85
PA
50882015-11-30 Pedro Alves <palves@redhat.com>
5089
5090 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5091 before returning.
5092
de979965
PA
50932015-11-30 Pedro Alves <palves@redhat.com>
5094
5095 * server.c (handle_v_requests): Handle vCtrlC.
5096
34c65914
PA
50972015-11-30 Pedro Alves <palves@redhat.com>
5098
5099 * gdbthread.h (find_any_thread_of_pid): Declare.
5100 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5101 functions.
5102 * server.c (handle_query): If current_thread is NULL, look for
5103 another thread of the selected process.
5104
79efa585 51052015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5106 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5107
5108 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5109 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5110 name in reply.
5111 * target.h (struct target_ops) <thread_name>: New field.
5112 (target_thread_name): New macro.
5113
80d82c19
JB
51142015-11-23 Joel Brobecker <brobecker@adacore.com>
5115
5116 * regcache.h (regcache_invalidate_pid): Add declaration.
5117 * regcache.c (regcache_invalidate_pid): New function, extracted
5118 from regcache_invalidate.
5119 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5120 Add trivial documentation comment.
5121 * lynx-low.c: Use regcache_invalidate_pid instead of
5122 regcache_invalidate.
5123
64da5dd5
JB
51242015-11-23 Joel Brobecker <brobecker@adacore.com>
5125
5126 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5127 and Elf64_auxv_t if the target is Android.
5128
37ce4055
DE
51292015-11-22 Doug Evans <xdje42@gmail.com>
5130
5131 * target.h: #include <sys/types.h>.
5132
06e03fff
PA
51332015-11-19 Pedro Alves <palves@redhat.com>
5134
5135 * linux-low.c (linux_process_qsupported): Change prototype.
5136 Adjust.
5137 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5138 Change prototype.
5139 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5140 and adjust to loop over all features.
5141 * server.c (handle_query) <qSupported>: Adjust to call
5142 target_process_qsupported once, passing it a vector of unprocessed
5143 features.
5144 * target.h (struct target_ops) <process_qsupported>: Change
5145 prototype.
5146 (target_process_qsupported): Adjust.
5147
9a084706
PA
51482015-11-19 Pedro Alves <palves@redhat.com>
5149
5150 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5151 mode.
5152 * configure: Regenerate.
5153
dad44a1f
PA
51542015-11-19 Pedro Alves <palves@redhat.com>
5155
5156 * configure: Regenerate.
5157
231c0592
YQ
51582015-11-19 Yao Qi <yao.qi@linaro.org>
5159
5160 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5161 type to uint32_t.
5162
6c1c9a8b
YQ
51632015-11-19 Yao Qi <yao.qi@linaro.org>
5164
5165 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5166 (struct aarch64_operand): Move enum out.
5167
9caa3311
YQ
51682015-11-19 Yao Qi <yao.qi@linaro.org>
5169
5170 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5171 struct user_fpsimd_state *.
5172 (aarch64_store_fpregset): Likewise.
5173
6a69a054
YQ
51742015-11-19 Yao Qi <yao.qi@linaro.org>
5175
5176 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5177 struct user_pt_regs *.
5178 (aarch64_store_gregset): Likewise.
5179
1798301e
PA
51802015-11-18 Pedro Alves <palves@redhat.com>
5181
5182 * Makefile.in (all_object_files): Add $IPA_OBJS.
5183
ce7715e2
PA
51842015-11-17 Pedro Alves <palves@redhat.com>
5185
5186 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5187 GDB_SIGNAL_0 and gdb_signal_to_string.
5188
c0879059
PA
51892015-11-17 Pedro Alves <palves@redhat.com>
5190
5191 * win32-low.c (handle_output_debug_string): Remove parameter.
5192 (win32_kill): Remove our_status local and adjust call to
5193 handle_output_debug_string.
5194 (get_child_debug_event): Adjust call to
5195 handle_output_debug_string.
5196
1996e237
SM
51972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5198
5199 * linux-mips-low.c (mips_fill_gregset): Add cast.
5200 (mips_store_gregset): Likewise.
5201 (mips_fill_fpregset): Likewise.
5202 (mips_store_fpregset): Likewise.
5203
cbec665b
SM
52042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5205
5206 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5207 priv.
5208
eb3e3c67
SM
52092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5210
5211 * linux-mips-low.c (mips_linux_new_thread): Change type of
5212 watch_type to enum target_hw_bp_type.
5213
171de4b8
SM
52142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5215
5216 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5217 Change return type to arm_hwbp_type.
5218
04248ead
SM
52192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5220
5221 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5222 (arm_store_gregset): Likewise.
5223 * linux-arm-low.c (arm_get_hwcap): Likewise.
5224 (arm_read_description): Likewise.
5225
04b3479c
SM
52262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5227
5228 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5229
2bc84e8a
SM
52302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5231
5232 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5233 (ppc_fill_vsxregset): Likewise.
5234 (ppc_store_vsxregset): Likewise.
5235 (ppc_fill_vrregset): Likewise.
5236 (ppc_store_vrregset): Likewise.
5237 (ppc_fill_evrregset): Likewise.
5238 (ppc_store_evrregset): Likewise.
5239
e6c5bb05
SM
52402015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5241
5242 * linux-ppc-low.c (ppc_usrregs_info): Remove
5243 forward-declaration.
5244 (ppc_arch_setup): Move lower in file.
5245
7ea45d72
SM
52462015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5247
5248 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5249 (ps_pdwrite): Likewise.
5250
69291610
HW
52512015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5252
5253 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5254 to after assert checks.
5255
b42945fd
SM
52562015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5257
5258 * proc-service.c (ps_pdread): Add/adjust casts.
5259 (ps_pdwrite): Add/adjust casts.
5260
d6f85c84
SM
52612015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5262
5263 * server.c (handle_search_memory_1): Cast return value of
5264 memmem.
5265
f98cd059
SM
52662015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5267
5268 * server.c (write_qxfer_response): Change type of data to
5269 gdb_byte *.
5270
d2412fa5
PA
52712015-10-29 Pedro Alves <palves@redhat.com>
5272
5273 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5274
c17414a2
PA
52752015-10-29 Pedro Alves <palves@redhat.com>
5276
5277 * tracepoint.c (clear_installed_tracepoints): Add casts.
5278
e053fbc4
PA
52792015-10-29 Pedro Alves <palves@redhat.com>
5280
5281 * server.c (handle_v_cont, process_serial_event): Add enum
5282 gdb_signal casts to signal parsing code.
5283
add67df8
PA
52842015-10-29 Pedro Alves <palves@redhat.com>
5285
5286 * linux-low.h (NULL_REGSET): Define.
5287 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5288 * linux-arm-low.c (arm_regsets): Likewise.
5289 * linux-crisv32-low.c (cris_regsets): Likewise.
5290 * linux-m68k-low.c (m68k_regsets): Likewise.
5291 * linux-mips-low.c (mips_regsets): Likewise.
5292 * linux-nios2-low.c (nios2_regsets): Likewise.
5293 * linux-ppc-low.c (ppc_regsets): Likewise.
5294 * linux-s390-low.c (s390_regsets): Likewise.
5295 * linux-sh-low.c (sh_regsets): Likewise.
5296 * linux-sparc-low.c (sparc_regsets): Likewise.
5297 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5298 * linux-tile-low.c (tile_regsets): Likewise.
5299 * linux-x86-low.c (x86_regsets): Likewise.
5300 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5301
50bc912a
PA
53022015-10-29 Pedro Alves <palves@redhat.com>
5303
5304 * linux-low.h (NULL_REGSET): Define.
5305 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5306 * linux-arm-low.c (arm_regsets): Likewise.
5307 * linux-crisv32-low.c (cris_regsets): Likewise.
5308 * linux-m68k-low.c (m68k_regsets): Likewise.
5309 * linux-mips-low.c (mips_regsets): Likewise.
5310 * linux-nios2-low.c (nios2_regsets): Likewise.
5311 * linux-ppc-low.c (ppc_regsets): Likewise.
5312 * linux-s390-low.c (s390_regsets): Likewise.
5313 * linux-sh-low.c (sh_regsets): Likewise.
5314 * linux-sparc-low.c (sparc_regsets): Likewise.
5315 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5316 * linux-tile-low.c (tile_regsets): Likewise.
5317 * linux-x86-low.c (x86_regsets): Likewise.
5318 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5319
682b2546
DE
53202015-10-26 Doug Evans <dje@google.com>
5321
5322 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5323
963843d4
DE
53242015-10-26 Doug Evans <dje@google.com>
5325
5326 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5327
d41401ac
DE
53282015-10-26 Doug Evans <dje@google.com>
5329
5330 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5331 for debug_printf.
5332 (attach_thread, find_new_threads_callback): Ditto.
5333
3db28855
AT
53342015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5335
5336 * mem-break.h (set_breakpoint_data): Remove.
5337
fb78e89c
AT
53382015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5339
5340 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5341 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5342 (initialize_low): Remove set_breakpoint_data call.
5343 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5344 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5345 (initialize_low): Remove set_breakpoint_data call.
5346 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5347 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5348 (initialize_low): Remove set_breakpoint_data call.
5349
2e6ee069
AT
53502015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5351
5352 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5353 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5354 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5355 * target.h (target_breakpoint_kind_from_pc): New macro.
5356
1652a986
AT
53572015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5358
5359 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5360 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5361 the default breakpoint kind.
5362
abeead09
AT
53632015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5364
5365 * linux-arm-low.c (arm_supports_z_point_type): Add software
5366 breakpoint support.
5367
b0b4b501
AT
53682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5369
5370 * linux-arm-low.c: Refactor breakpoint definitions.
5371 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5372 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5373
8689682c
AT
53742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5375
5376 * Makefile.in: Add arm.c/o.
5377 * configure.srv: Likewise.
5378 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5379 (arm_breakpoint_kind_from_pc): New function.
5380 (arm_sw_breakpoint_from_kind): Return proper kind.
5381 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5382
27165294
AT
53832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5384
5385 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5386 removal.
5387 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5388 (struct raw_breakpoint) <size>: Remove.
5389 (struct raw_breakpoint) <kind>: Add.
5390 (bp_size): New function.
5391 (bp_opcode): Likewise.
5392 (find_raw_breakpoint_at): Adjust for kind.
5393 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5394 (remove_memory_breakpoint): Adjust for kind call bp_size.
5395 (set_raw_breakpoint_at): Adjust for kind.
5396 (set_breakpoint): Likewise.
5397 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5398 (delete_raw_breakpoint): Adjust for kind.
5399 (delete_breakpoint): Likewise.
5400 (find_gdb_breakpoint): Likewise.
5401 (set_gdb_breakpoint_1): Likewise.
5402 (set_gdb_breakpoint): Likewise.
5403 (delete_gdb_breakpoint_1): Likewise.
5404 (delete_gdb_breakpoint): Likewise.
5405 (uninsert_raw_breakpoint): Likewise.
5406 (reinsert_raw_breakpoint): Likewise.
5407 (set_breakpoint_data): Remove.
5408 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5409 (check_mem_read): Adjust for kind call bp_size.
5410 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5411 (clone_one_breakpoint): Adjust for kind.
5412 * mem-break.h (set_gdb_breakpoint): Likewise.
5413 (delete_gdb_breakpoint): Likewise.
5414 * server.c (process_serial_event): Likewise.
5415
dd373349
AT
54162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5417
5418 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5419 (struct linux_target_ops) <breakpoint>: Remove.
5420 (struct linux_target_ops) <breakpoint_len>: Remove.
5421 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5422 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5423 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5424 (arm_sw_breakpoint_from_kind): New function.
5425 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5426 (struct linux_target_ops) <breakpoint>: Remove.
5427 (struct linux_target_ops) <breakpoint_len>: Remove.
5428 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5429 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5430 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5431 (struct linux_target_ops) <breakpoint>: Remove.
5432 (struct linux_target_ops) <breakpoint_len>: Remove.
5433 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5434 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5435 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5436 (struct linux_target_ops) <breakpoint>: Remove.
5437 (struct linux_target_ops) <breakpoint_len>: Remove.
5438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5439 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5440 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5441 and sw_breakpoint_from_kind to increment the pc.
5442 (linux_breakpoint_kind_from_pc): New function.
5443 (linux_sw_breakpoint_from_kind): New function.
5444 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5445 (initialize_low): Call breakpoint_kind_from_pc and
5446 sw_breakpoint_from_kind to replace breakpoint_data/len.
5447 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5448 New field.
5449 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5450 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5451 (struct linux_target_ops) <breakpoint>: Remove.
5452 (struct linux_target_ops) <breakpoint_len>: Remove.
5453 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5455 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5456 (struct linux_target_ops) <breakpoint>: Remove.
5457 (struct linux_target_ops) <breakpoint_len>: Remove.
5458 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5459 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5460 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5461 (struct linux_target_ops) <breakpoint>: Remove.
5462 (struct linux_target_ops) <breakpoint_len>: Remove.
5463 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5464 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5465 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5466 (struct linux_target_ops) <breakpoint>: Remove.
5467 (struct linux_target_ops) <breakpoint_len>: Remove.
5468 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5469 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5470 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5471 (struct linux_target_ops) <breakpoint>: Remove.
5472 (struct linux_target_ops) <breakpoint_len>: Remove.
5473 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5474 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5475 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5476 (struct linux_target_ops) <breakpoint>: Remove.
5477 (struct linux_target_ops) <breakpoint_len>: Remove.
5478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5480 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5481 (struct linux_target_ops) <breakpoint>: Remove.
5482 (struct linux_target_ops) <breakpoint_len>: Remove.
5483 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5484 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5485 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5486 (struct linux_target_ops) <breakpoint>: Remove.
5487 (struct linux_target_ops) <breakpoint_len>: Remove.
5488 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5489 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5490 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5491 (struct linux_target_ops) <breakpoint>: Remove.
5492 (struct linux_target_ops) <breakpoint_len>: Remove.
5493 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5494 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5495 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5496 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5502 (struct linux_target_ops) <breakpoint>: Remove.
5503 (struct linux_target_ops) <breakpoint_len>: Remove.
5504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5506
4cd98a19
AT
55072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5508
5509 * linux-cris-low.c (cris_get_pc): Remove void arg.
5510
774ee6d2
AR
55112015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5512
5513 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5514 variable name.
5515
833dcd29
AR
55162015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5517
5518 * inferiors.c (thread_pid_matches_callback): New function.
5519 (find_thread_process): New function.
5520 (remove_thread): Reset current_thread.
5521 (remove_process): Assert threads have been removed first.
5522
8d689ee5
YQ
55232015-10-15 Yao Qi <yao.qi@linaro.org>
5524
5525 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5526 if it is 3.
5527 (aarch64_remove_point): Likewise.
5528 * regcache.c (regcache_register_size): New function.
5529
1c2e1515
YQ
55302015-10-12 Yao Qi <yao.qi@linaro.org>
5531
5532 * linux-aarch64-low.c: Update all callers as emit_load_store
5533 is renamed to aarch64_emit_load_store.
5534
e1c587c3
YQ
55352015-10-12 Yao Qi <yao.qi@linaro.org>
5536
5537 * linux-aarch64-low.c: Update all callers of function renaming
5538 from emit_insn to aarch64_emit_insn.
5539
b6542f81
YQ
55402015-10-12 Yao Qi <yao.qi@linaro.org>
5541
5542 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5543 arch/aarch64-insn.h.
5544 (struct aarch64_memory_operand): Likewise.
5545 (ENCODE): Likewise.
5546 (emit_insn): Move to arch/aarch64-insn.c.
5547 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5548 (emit_load_store): Move to arch/aarch64-insn.c.
5549 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5550 (can_encode_int32): Remove.
5551
246994ce
YQ
55522015-10-12 Yao Qi <yao.qi@linaro.org>
5553
5554 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5555 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5556 (aarch64_relocate_instruction): Likewise.
5557 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5558 (struct aarch64_insn_visitor): Likewise.
5559
0badd99f
YQ
55602015-10-12 Yao Qi <yao.qi@linaro.org>
5561
5562 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5563 (struct aarch64_insn_visitor): New.
5564 (struct aarch64_insn_relocation_data): New.
5565 (aarch64_ftrace_insn_reloc_b): New function.
5566 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5567 (aarch64_ftrace_insn_reloc_cb): Likewise.
5568 (aarch64_ftrace_insn_reloc_tb): Likewise.
5569 (aarch64_ftrace_insn_reloc_adr): Likewise.
5570 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5571 (aarch64_ftrace_insn_reloc_others): Likewise.
5572 (visitor): New.
5573 (aarch64_relocate_instruction): Use visitor.
5574
dfaffe9d
YQ
55752015-10-12 Yao Qi <yao.qi@linaro.org>
5576
5577 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5578 int. Add argument buf.
5579 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5580 aarch64_relocate_instruction.
5581
70b439f0
YQ
55822015-10-12 Yao Qi <yao.qi@linaro.org>
5583
5584 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5585 argument insn. Remove local variable insn. Don't call
5586 target_read_uint32.
5587 (aarch64_install_fast_tracepoint_jump_pad): Call
5588 target_read_uint32.
5589
7781c06f
YQ
55902015-09-30 Yao Qi <yao.qi@linaro.org>
5591
5592 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5593 (emit_load_store_pair): Likewise.
5594
9a3c8263
SM
55952015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5596
5597 * dll.c (match_dll): Add cast(s).
5598 (unloaded_dll): Likewise.
5599 * linux-low.c (second_thread_of_pid_p): Likewise.
5600 (delete_lwp_callback): Likewise.
5601 (count_events_callback): Likewise.
5602 (select_event_lwp_callback): Likewise.
5603 (linux_set_resume_request): Likewise.
5604 * server.c (accumulate_file_name_length): Likewise.
5605 (emit_dll_description): Likewise.
5606 (handle_qxfer_threads_worker): Likewise.
5607 (visit_actioned_threads): Likewise.
5608 * thread-db.c (any_thread_of): Likewise.
5609 * tracepoint.c (same_process_p): Likewise.
5610 (match_blocktype): Likewise.
5611 (build_traceframe_info_xml): Likewise.
5612
224c3ddb
SM
56132015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5614
5615 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5616 assignment.
5617 (gdb_unparse_agent_expr): Likewise.
5618 * hostio.c (require_data): Likewise.
5619 (handle_pread): Likewise.
5620 * linux-low.c (disable_regset): Likewise.
5621 (fetch_register): Likewise.
5622 (store_register): Likewise.
5623 (get_dynamic): Likewise.
5624 (linux_qxfer_libraries_svr4): Likewise.
5625 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5626 (set_fast_tracepoint_jump): Likewise.
5627 (uninsert_fast_tracepoint_jumps_at): Likewise.
5628 (reinsert_fast_tracepoint_jumps_at): Likewise.
5629 (validate_inserted_breakpoint): Likewise.
5630 (clone_agent_expr): Likewise.
5631 * regcache.c (init_register_cache): Likewise.
5632 * remote-utils.c (putpkt_binary_1): Likewise.
5633 (decode_M_packet): Likewise.
5634 (decode_X_packet): Likewise.
5635 (look_up_one_symbol): Likewise.
5636 (relocate_instruction): Likewise.
5637 (monitor_output): Likewise.
5638 * server.c (handle_search_memory): Likewise.
5639 (handle_qxfer_exec_file): Likewise.
5640 (handle_qxfer_libraries): Likewise.
5641 (handle_qxfer): Likewise.
5642 (handle_query): Likewise.
5643 (handle_v_cont): Likewise.
5644 (handle_v_run): Likewise.
5645 (captured_main): Likewise.
5646 * target.c (write_inferior_memory): Likewise.
5647 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5648 * tracepoint.c (init_trace_buffer): Likewise.
5649 (add_tracepoint_action): Likewise.
5650 (add_traceframe): Likewise.
5651 (add_traceframe_block): Likewise.
5652 (cmd_qtdpsrc): Likewise.
5653 (cmd_qtdv): Likewise.
5654 (cmd_qtstatus): Likewise.
5655 (response_source): Likewise.
5656 (response_tsv): Likewise.
5657 (cmd_qtnotes): Likewise.
5658 (gdb_collect): Likewise.
5659 (initialize_tracepoint): Likewise.
5660
afbe19f8
PL
56612015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5662
5663 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5664 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5665 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5666 <NOP>: New.
5667 (enum aarch64_condition_codes): New enum.
5668 (w0): New static global.
5669 (fp): Likewise.
5670 (lr): Likewise.
5671 (struct aarch64_memory_operand) <type>: New
5672 MEMORY_OPERAND_POSTINDEX type.
5673 (postindex_memory_operand): New helper function.
5674 (emit_ret): New function.
5675 (emit_load_store_pair): New function, factored out of emit_stp
5676 with support for MEMORY_OPERAND_POSTINDEX.
5677 (emit_stp): Rewrite using emit_load_store_pair.
5678 (emit_ldp): New function.
5679 (emit_load_store): Likewise.
5680 (emit_ldr): Mention post-index instruction in comment.
5681 (emit_ldrh): New function.
5682 (emit_ldrb): New function.
5683 (emit_ldrsw): Mention post-index instruction in comment.
5684 (emit_str): Likewise.
5685 (emit_subs): New function.
5686 (emit_cmp): Likewise.
5687 (emit_and): Likewise.
5688 (emit_orr): Likewise.
5689 (emit_orn): Likewise.
5690 (emit_eor): Likewise.
5691 (emit_mvn): Likewise.
5692 (emit_lslv): Likewise.
5693 (emit_lsrv): Likewise.
5694 (emit_asrv): Likewise.
5695 (emit_mul): Likewise.
5696 (emit_sbfm): Likewise.
5697 (emit_sbfx): Likewise.
5698 (emit_ubfm): Likewise.
5699 (emit_ubfx): Likewise.
5700 (emit_csinc): Likewise.
5701 (emit_cset): Likewise.
5702 (emit_nop): Likewise.
5703 (emit_ops_insns): New helper function.
5704 (emit_pop): Likewise.
5705 (emit_push): Likewise.
5706 (aarch64_emit_prologue): New function.
5707 (aarch64_emit_epilogue): Likewise.
5708 (aarch64_emit_add): Likewise.
5709 (aarch64_emit_sub): Likewise.
5710 (aarch64_emit_mul): Likewise.
5711 (aarch64_emit_lsh): Likewise.
5712 (aarch64_emit_rsh_signed): Likewise.
5713 (aarch64_emit_rsh_unsigned): Likewise.
5714 (aarch64_emit_ext): Likewise.
5715 (aarch64_emit_log_not): Likewise.
5716 (aarch64_emit_bit_and): Likewise.
5717 (aarch64_emit_bit_or): Likewise.
5718 (aarch64_emit_bit_xor): Likewise.
5719 (aarch64_emit_bit_not): Likewise.
5720 (aarch64_emit_equal): Likewise.
5721 (aarch64_emit_less_signed): Likewise.
5722 (aarch64_emit_less_unsigned): Likewise.
5723 (aarch64_emit_ref): Likewise.
5724 (aarch64_emit_if_goto): Likewise.
5725 (aarch64_emit_goto): Likewise.
5726 (aarch64_write_goto_address): Likewise.
5727 (aarch64_emit_const): Likewise.
5728 (aarch64_emit_call): Likewise.
5729 (aarch64_emit_reg): Likewise.
5730 (aarch64_emit_pop): Likewise.
5731 (aarch64_emit_stack_flush): Likewise.
5732 (aarch64_emit_zero_ext): Likewise.
5733 (aarch64_emit_swap): Likewise.
5734 (aarch64_emit_stack_adjust): Likewise.
5735 (aarch64_emit_int_call_1): Likewise.
5736 (aarch64_emit_void_call_2): Likewise.
5737 (aarch64_emit_eq_goto): Likewise.
5738 (aarch64_emit_ne_goto): Likewise.
5739 (aarch64_emit_lt_goto): Likewise.
5740 (aarch64_emit_le_goto): Likewise.
5741 (aarch64_emit_gt_goto): Likewise.
5742 (aarch64_emit_ge_got): Likewise.
5743 (aarch64_emit_ops_impl): New static global variable.
5744 (aarch64_emit_ops): New target function, return
5745 &aarch64_emit_ops_impl.
5746 (struct linux_target_ops): Install it.
5747
bb903df0
PL
57482015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5749
5750 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5751 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5752 aarch64-ipa.o.
5753 * linux-aarch64-ipa.c: New file.
5754 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5755 and endian.h.
5756 (aarch64_get_thread_area): New target method.
5757 (extract_signed_bitfield): New helper function.
5758 (aarch64_decode_ldr_literal): New function.
5759 (enum aarch64_opcodes): New enum.
5760 (struct aarch64_register): New struct.
5761 (struct aarch64_operand): New struct.
5762 (x0): New static global.
5763 (x1): Likewise.
5764 (x2): Likewise.
5765 (x3): Likewise.
5766 (x4): Likewise.
5767 (w2): Likewise.
5768 (ip0): Likewise.
5769 (sp): Likewise.
5770 (xzr): Likewise.
5771 (aarch64_register): New helper function.
5772 (register_operand): Likewise.
5773 (immediate_operand): Likewise.
5774 (struct aarch64_memory_operand): New struct.
5775 (offset_memory_operand): New helper function.
5776 (preindex_memory_operand): Likewise.
5777 (enum aarch64_system_control_registers): New enum.
5778 (ENCODE): New macro.
5779 (emit_insn): New helper function.
5780 (emit_b): New function.
5781 (emit_bcond): Likewise.
5782 (emit_cb): Likewise.
5783 (emit_tb): Likewise.
5784 (emit_blr): Likewise.
5785 (emit_stp): Likewise.
5786 (emit_ldp_q_offset): Likewise.
5787 (emit_stp_q_offset): Likewise.
5788 (emit_load_store): Likewise.
5789 (emit_ldr): Likewise.
5790 (emit_ldrsw): Likewise.
5791 (emit_str): Likewise.
5792 (emit_ldaxr): Likewise.
5793 (emit_stxr): Likewise.
5794 (emit_stlr): Likewise.
5795 (emit_data_processing_reg): Likewise.
5796 (emit_data_processing): Likewise.
5797 (emit_add): Likewise.
5798 (emit_sub): Likewise.
5799 (emit_mov): Likewise.
5800 (emit_movk): Likewise.
5801 (emit_mov_addr): Likewise.
5802 (emit_mrs): Likewise.
5803 (emit_msr): Likewise.
5804 (emit_sevl): Likewise.
5805 (emit_wfe): Likewise.
5806 (append_insns): Likewise.
5807 (can_encode_int32_in): New helper function.
5808 (aarch64_relocate_instruction): New function.
5809 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5810 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5811 (struct linux_target_ops): Install aarch64_get_thread_area,
5812 aarch64_install_fast_tracepoint_jump_pad and
5813 aarch64_get_min_fast_tracepoint_insn_len.
5814
787749ea
PL
58152015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5816
5817 * Makefile.in (aarch64-insn.o): New rule.
5818 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5819
9812b2e6
YQ
58202015-09-21 Yao Qi <yao.qi@linaro.org>
5821
5822 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5823
18fe412b
YQ
58242015-09-21 Yao Qi <yao.qi@linaro.org>
5825
5826 * tracepoint.c (max_jump_pad_size): Remove.
5827
a0cc84cd
YQ
58282015-09-18 Yao Qi <yao.qi@linaro.org>
5829
5830 * linux-aarch64-low.c: Don't include sys/uio.h.
5831 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5832
d78908cf
WW
58332015-09-16 Wei-cheng Wang <cole945@gmail.com>
5834
5835 * tracepoint.c (eval_result_type): Change prototype.
5836 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5837
d57e0d50
PA
58382015-09-15 Pedro Alves <palves@redhat.com>
5839
5840 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5841 Check whether to report exec events instead of checking whether
5842 multiprocess is enabled.
5843
5a676acc
PA
58442015-09-15 Pedro Alves <palves@redhat.com>
5845
5846 PR remote/18965
5847 * remote-utils.c (prepare_resume_reply): Merge
5848 TARGET_WAITKIND_VFORK_DONE switch case with the
5849 TARGET_WAITKIND_FORKED case.
5850
7c5d0fad
YQ
58512015-09-15 Yao Qi <yao.qi@linaro.org>
5852
5853 * server.c (handle_query): Check string comparison using
5854 "else if" instead of "if".
5855
750ce8d1
YQ
58562015-09-15 Yao Qi <yao.qi@linaro.org>
5857
5858 * server.c (vCont_supported): New global variable.
5859 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5860 matches. Append ";vContSupported+" to own_buf.
5861 (handle_v_requests): Append ";s;S" to own_buf if target supports
5862 hardware single step or vCont_supported is false.
5863 (capture_main): Set vCont_supported to zero.
5864
70b90b91
YQ
58652015-09-15 Yao Qi <yao.qi@linaro.org>
5866
5867 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5868 it to ...
5869 (linux_supports_hardware_single_step): ... New function.
5870 (linux_target_ops): Update.
5871 * lynx-low.c (lynx_target_ops): Set field
5872 supports_hardware_single_step to target_can_do_hardware_single_step.
5873 * nto-low.c (nto_target_ops): Likewise.
5874 * spu-low.c (spu_target_ops): Likewise.
5875 * win32-low.c (win32_target_ops): Likewise.
5876 * target.c (target_can_do_hardware_single_step): New function.
5877 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5878 Remove. <supports_hardware_single_step>: New field.
5879 (target_supports_conditional_breakpoints): Remove.
5880 (target_supports_hardware_single_step): New macro.
5881 (target_can_do_hardware_single_step): Declare.
5882 * server.c (handle_query): Use target_supports_hardware_single_step
5883 instead of target_supports_conditional_breakpoints.
5884
ade90bde
YQ
58852015-09-15 Yao Qi <yao.qi@linaro.org>
5886
5887 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5888 function.
5889 (struct linux_target_ops the_low_target): Install
5890 aarch64_linux_siginfo_fixup.
5891
94585166
DB
58922015-09-11 Don Breazeal <donb@codesourcery.com>
5893 Luis Machado <lgustavo@codesourcery.com>
5894
5895 * linux-low.c (linux_mourn): Static declaration.
5896 (linux_arch_setup): Move in front of
5897 handle_extended_wait.
5898 (linux_arch_setup_thread): New function.
5899 (handle_extended_wait): Handle exec events. Call
5900 linux_arch_setup_thread. Make event_lwp argument a
5901 pointer-to-a-pointer.
5902 (check_zombie_leaders): Do not check stopped threads.
5903 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5904 (linux_low_filter_event): Add lwp and thread for exec'ing
5905 non-leader thread if leader thread has been deleted.
5906 Refactor code into linux_arch_setup_thread and call it.
5907 Pass child lwp pointer by reference to handle_extended_wait.
5908 (linux_wait_for_event_filtered): Update comment.
5909 (linux_wait_1): Prevent clobbering exec event status.
5910 (linux_supports_exec_events): New function.
5911 (linux_target_ops) <supports_exec_events>: Initialize new member.
5912 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5913 new member.
5914 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5915 * server.c (report_exec_events): New global variable.
5916 (handle_query): Handle qSupported query for exec-events feature.
5917 (captured_main): Initialize report_exec_events.
5918 * server.h (report_exec_events): Declare new global variable.
5919 * target.h (struct target_ops) <supports_exec_events>: New
5920 member.
5921 (target_supports_exec_events): New macro.
5922 * win32-low.c (win32_target_ops) <supports_exec_events>:
5923 Initialize new member.
5924
0568462b
MM
59252015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5926
5927 * linux-low.c (linux_low_enable_btrace): Remove.
5928 (linux_target_ops): Replace linux_low_enable_btrace with
5929 linux_enable_btrace.
5930
39edd165
YQ
59312015-09-03 Yao Qi <yao.qi@linaro.org>
5932
5933 * linux-aarch64-low.c (aarch64_insert_point): Call
5934 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5935 returns true.
5936
1db33b5a
UW
59372015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5938
5939 * linux-low.c (check_stopped_by_breakpoint): Use
5940 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5941
ab290430
PA
59422015-08-27 Pedro Alves <palves@redhat.com>
5943
5944 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5945
8d749320
SM
59462015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5947
6711b7f8
SM
5948 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5949 the XNEW-family equivalent.
8d749320
SM
5950 (compile_bytecodes): Likewise.
5951 * dll.c (loaded_dll): Likewise.
5952 * event-loop.c (append_callback_event): Likewise.
5953 (create_file_handler): Likewise.
5954 (create_file_event): Likewise.
5955 * hostio.c (handle_open): Likewise.
5956 * inferiors.c (add_thread): Likewise.
5957 (add_process): Likewise.
5958 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5959 * linux-arm-low.c (arm_new_process): Likewise.
5960 (arm_new_thread): Likewise.
5961 * linux-low.c (add_to_pid_list): Likewise.
5962 (linux_add_process): Likewise.
5963 (handle_extended_wait): Likewise.
5964 (add_lwp): Likewise.
5965 (enqueue_one_deferred_signal): Likewise.
5966 (enqueue_pending_signal): Likewise.
5967 (linux_resume_one_lwp_throw): Likewise.
5968 (linux_resume_one_thread): Likewise.
5969 (linux_read_memory): Likewise.
5970 (linux_write_memory): Likewise.
5971 * linux-mips-low.c (mips_linux_new_process): Likewise.
5972 (mips_linux_new_thread): Likewise.
5973 (mips_add_watchpoint): Likewise.
5974 * linux-x86-low.c (initialize_low_arch): Likewise.
5975 * lynx-low.c (lynx_add_process): Likewise.
5976 * mem-break.c (set_raw_breakpoint_at): Likewise.
5977 (set_breakpoint): Likewise.
5978 (add_condition_to_breakpoint): Likewise.
5979 (add_commands_to_breakpoint): Likewise.
5980 (clone_agent_expr): Likewise.
5981 (clone_one_breakpoint): Likewise.
5982 * regcache.c (new_register_cache): Likewise.
5983 * remote-utils.c (look_up_one_symbol): Likewise.
5984 * server.c (queue_stop_reply): Likewise.
5985 (start_inferior): Likewise.
5986 (queue_stop_reply_callback): Likewise.
5987 (handle_target_event): Likewise.
5988 * spu-low.c (fetch_ppc_memory): Likewise.
5989 (store_ppc_memory): Likewise.
5990 * target.c (set_target_ops): Likewise.
5991 * thread-db.c (thread_db_load_search): Likewise.
5992 (try_thread_db_load_1): Likewise.
5993 * tracepoint.c (add_tracepoint): Likewise.
5994 (add_tracepoint_action): Likewise.
5995 (create_trace_state_variable): Likewise.
5996 (cmd_qtdpsrc): Likewise.
5997 (cmd_qtro): Likewise.
5998 (add_while_stepping_state): Likewise.
5999 * win32-low.c (child_add_thread): Likewise.
6000 (get_image_name): Likewise.
6001
ed8b7b42
YQ
60022015-08-25 Yao Qi <yao.qi@linaro.org>
6003
6004 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6005
db3cb7cb
YQ
60062015-08-25 Yao Qi <yao.qi@linaro.org>
6007
6008 * Makefile.in (aarch64-linux.o): New rule.
6009 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6010 srv_tgtobj.
6011 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6012 (aarch64_init_debug_reg_state): Make it extern.
6013 (aarch64_linux_prepare_to_resume): Remove.
6014
f6011a1c
YQ
60152015-08-25 Yao Qi <yao.qi@linaro.org>
6016
6017 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6018 lwp_arch_private_info and ptid_of_lwp.
6019
88e2cf7e
YQ
60202015-08-25 Yao Qi <yao.qi@linaro.org>
6021
6022 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6023 Find proc_info by find_process_pid. All callers updated.
6024
5e35436e
YQ
60252015-08-25 Yao Qi <yao.qi@linaro.org>
6026
6027 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6028 Remove.
6029 (debug_reg_change_callback): Remove.
6030 (aarch64_notify_debug_reg_change): Remove.
6031
4a8a7965
YQ
60322015-08-25 Yao Qi <yao.qi@linaro.org>
6033
6034 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6035 Call current_lwp_ptid.
6036
32a271ee
YQ
60372015-08-25 Yao Qi <yao.qi@linaro.org>
6038
6039 * linux-aarch64-low.c (debug_reg_change_callback): Use
6040 debug_printf.
6041
0d51c8d7
YQ
60422015-08-25 Yao Qi <yao.qi@linaro.org>
6043
6044 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6045
31a43dd5
YQ
60462015-08-25 Yao Qi <yao.qi@linaro.org>
6047
6048 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6049
8ee52567
YQ
60502015-08-25 Yao Qi <yao.qi@linaro.org>
6051
6052 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6053 the code.
6054
ff3f0f45
YQ
60552015-08-25 Yao Qi <yao.qi@linaro.org>
6056
6057 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6058 Remove.
6059 (debug_reg_change_callback): Remove argument entry and add argument
6060 lwp. Remove local variable thread. Don't print thread id in the
6061 debugging output. Don't check whether pid of thread equals to pid.
6062 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6063 iterate_over_lwps instead find_inferior.
6064
3d40fbb5
PA
60652015-08-24 Pedro Alves <palves@redhat.com>
6066
6067 * inferiors.c (get_first_process): New function.
6068 * inferiors.h (get_first_process): New declaration.
6069 * remote-utils.c (read_ptid): Default to the first process in the
6070 list, instead of to the current thread's process.
6071
438e1e42
PA
60722015-08-24 Pedro Alves <palves@redhat.com>
6073
6074 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6075 * event-loop.c: Likewise.
6076 * remote-utils.c: Likewise.
6077 * tracepoint.c: Likewise.
6078
a8c6d4fc
PA
60792015-08-24 Pedro Alves <palves@redhat.com>
6080
6081 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6082 ptid_get_lwp.
6083
99b0bb12
PA
60842015-08-21 Pedro Alves <palves@redhat.com>
6085
6086 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6087 instead of literal 1.
6088
f8904751
PA
60892015-08-21 Pedro Alves <palves@redhat.com>
6090
6091 * tdesc.c (default_description): Explicitly zero-initialize.
6092
465a859e
PA
60932015-08-21 Pedro Alves <palves@redhat.com>
6094
6095 PR gdb/18749
6096 * inferiors.c (remove_thread): Discard any pending stop reply for
6097 this thread.
6098 * server.c (remove_all_on_match_pid): Rename to ...
6099 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6100 instead of a pid.
6101 (discard_queued_stop_replies): Change parameter to a ptid. Now
6102 extern.
6103 (handle_v_kill, kill_inferior_callback, captured_main)
6104 (process_serial_event): Adjust.
6105 * server.h (discard_queued_stop_replies): Declare.
6106
f0db101d
PA
61072015-08-21 Pedro Alves <palves@redhat.com>
6108
6109 * linux-low.c (wait_for_sigstop): Always switch to no thread
6110 selected if the previously current thread dies.
6111 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6112 process instead of the current thread's.
6113 * remote-utils.c (input_interrupt): Don't check if there's no
6114 current thread.
6115 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6116 current thread to the general thread fails, error out.
6117 (handle_qxfer_auxv, handle_qxfer_libraries)
6118 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6119 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6120 (handle_query): Check if there's a thread selected instead of
6121 checking whether there's any thread in the thread list.
6122 (handle_qxfer_threads, handle_qxfer_btrace)
6123 (handle_qxfer_btrace_conf): Don't error out early if there's no
6124 thread in the thread list.
6125 (handle_v_cont, myresume): Don't set the current thread to the
6126 continue thread.
6127 (process_serial_event) <Hg handling>: Also set thread_id if the
6128 previous general thread is still alive.
6129 (process_serial_event) <g/G handling>: If setting the current
6130 thread to the general thread fails, error out.
6131 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6132 thread's lwp instead of the current thread's.
6133 * target.c (set_desired_thread): If the desired thread was not
6134 found, leave the current thread pointing to NULL. Return an int
6135 (boolean) indicating success.
6136 * target.h (set_desired_thread): Change return type to int.
6137
40045d91
MF
61382015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6139
6140 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6141 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6142 #includes.
6143 (ps_get_thread_area): New function.
6144
45face3b
GB
61452015-08-19 Gary Benson <gbenson@redhat.com>
6146
6147 * hostio.c (handle_pread): Do not attempt to read more data
6148 than hostio_reply_with_data can fit in a packet.
6149
16d5f642
JB
61502015-08-18 Joel Brobecker <brobecker@adacore.com>
6151
6152 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6153
a738da3a
MF
61542015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6155
6156 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6157
33ebda9d
PA
61582015-08-06 Pedro Alves <palves@redhat.com>
6159
6160 * tracepoint.c (expr_eval_result): Now an int.
6161
a44892be
PA
61622015-08-06 Pedro Alves <palves@redhat.com>
6163
6164 * gdbthread.h (struct regcache): Forward declare.
6165 (struct thread_info) <regcache_data>: Now a struct regcache
6166 pointer.
6167 * inferiors.c (inferior_regcache_data)
6168 (set_inferior_regcache_data): Now work with struct regcache
6169 pointers.
6170 * inferiors.h (struct regcache): Forward declare.
6171 (inferior_regcache_data, set_inferior_regcache_data): Now work
6172 with struct regcache pointers.
6173 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6174 (free_register_cache_thread): Remove struct regcache pointer
6175 casts.
6176
608a1e46
PA
61772015-08-06 Pedro Alves <palves@redhat.com>
6178
6179 * server.c (captured_main): On error, print the exception message
6180 to stderr, and if run_once is set, throw a quit.
6181
f0ce0d3a
PA
61822015-08-06 Pedro Alves <palves@redhat.com>
6183
6184 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6185 the current thread.
6186
bf47e248
PA
61872015-08-06 Pedro Alves <palves@redhat.com>
6188
6189 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6190 reading beyond the passed in buffer length.
6191
b6b9ffcc
PL
61922015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6193
6194 * tracepoint.c (symbol_list) <required>: Remove.
6195
863d01bd
PA
61962015-08-06 Pedro Alves <palves@redhat.com>
6197
6198 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6199 count if stopping and suspending threads.
6200 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6201 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6202 (linux_detach): Complete an ongoing step-over.
6203 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6204 throughout.
6205 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6206 (linux_wait_1): If passing a signal to the inferior after
6207 finishing a step-over, unsuspend and re-resume all lwps. If we
6208 see a single-step event but the thread should be continuing, don't
6209 pass the trap to gdb.
6210 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6211 internal_error instead of gdb_assert.
6212 (enqueue_pending_signal): New function.
6213 (check_ptrace_stopped_lwp_gone): Add debug output.
6214 (start_step_over): Use internal_error instead of gdb_assert.
6215 (complete_ongoing_step_over): New function.
6216 (linux_resume_one_thread): Don't resume a suspended thread.
6217 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6218 it stepping.
6219
00db26fa
PA
62202015-08-06 Pedro Alves <palves@redhat.com>
6221
6222 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6223 (linux_thread_alive): Use lwp_is_marked_dead.
6224 (extended_event_reported): Delete.
6225 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6226 instead of extended_event_reported.
6227 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6228 as well.
6229 (lwp_is_marked_dead): New function.
6230 (lwp_running): Use lwp_is_marked_dead.
6231 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6232 comment.
6233
ad071a30
PA
62342015-08-06 Pedro Alves <palves@redhat.com>
6235
6236 * linux-low.c (linux_wait_1): Move fork event output out of the
6237 !report_to_gdb check. Pass event_child->waitstatus to
6238 target_waitstatus_to_string instead of ourstatus.
6239
524b57e6
YQ
62402015-08-04 Yao Qi <yao.qi@linaro.org>
6241
6242 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6243 if current_thread is 32 bit.
6244
6085d6f6
YQ
62452015-08-04 Yao Qi <yao.qi@linaro.org>
6246
6247 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6248 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6249 * server.c (extended_protocol): Remove "static".
6250 * server.h (extended_protocol): Declare it.
6251
8a7e4587
YQ
62522015-08-04 Yao Qi <yao.qi@linaro.org>
6253
6254 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6255 both aarch64 and aarch32.
6256 (aarch64_set_pc): Likewise.
6257
3b53ae99
YQ
62582015-08-04 Yao Qi <yao.qi@linaro.org>
6259
6260 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6261 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6262 arm-with-neon.xml to srv_xmlfiles.
6263 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6264 (is_64bit_tdesc): New function.
6265 (aarch64_linux_read_description): New function.
6266 (aarch64_arch_setup): Call aarch64_linux_read_description.
6267 (regs_info): Rename to regs_info_aarch64.
6268 (aarch64_regs_info): Return right regs_info.
6269 (initialize_low_arch): Call initialize_low_arch_aarch32.
6270
bd9e6534
YQ
62712015-08-04 Yao Qi <yao.qi@linaro.org>
6272
6273 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6274 * linux-aarch32-low.c: New file.
6275 * linux-aarch32-low.h: New file.
6276 * linux-arm-low.c (arm_fill_gregset): Move it to
6277 linux-aarch32-low.c.
6278 (arm_store_gregset): Likewise.
6279 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6280 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6281 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6282 (regs_info): Rename to regs_info_arm.
6283 (arm_regs_info): Return regs_info_aarch32 if
6284 have_ptrace_getregset is 1 and target description is
6285 arm_with_neon or arm_with_vfpv3.
6286 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6287 Call initialize_low_arch_aarch32 instead.
6288
ded48a5e
YQ
62892015-08-04 Yao Qi <yao.qi@linaro.org>
6290
6291 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6292 * linux-low.c: ... here.
6293 * linux-low.h (have_ptrace_getregset): Declare it.
6294
96e9210f
PA
62952015-08-04 Pedro Alves <palves@redhat.com>
6296
6297 * thread-db.c (struct thread_db): Use new typedefs.
6298 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6299 CHK calls.
6300 (disable_thread_event_reporting): Cast result of dlsym to
6301 destination function pointer type.
6302 (thread_db_mourn): Use td_ta_delete_ftype.
6303
af60a1ef
SL
63042015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6305
6306 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6307 arch variant.
6308 (CDX_BREAKPOINT): Define for R2.
6309 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6310 (the_low_target): Add comments.
6311
e8b41681
YQ
63122015-07-30 Yao Qi <yao.qi@linaro.org>
6313
6314 * linux-arm-low.c (arm_hwcap): Remove it.
6315 (arm_read_description): New local variable arm_hwcap. Don't
6316 set arm_hwcap to zero.
6317
89abb039
YQ
63182015-07-30 Yao Qi <yao.qi@linaro.org>
6319
6320 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6321 Use regcache->tdesc instead.
6322 (arm_store_wmmxregset): Likewise.
6323 (arm_fill_vfpregset): Likewise.
6324 (arm_store_vfpregset): Likewise.
6325
deca266c
YQ
63262015-07-30 Yao Qi <yao.qi@linaro.org>
6327
6328 * linux-arm-low.c: Include arch/arm.h.
6329 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6330 (arm_store_gregset): Likewise.
6331
aa58a496
SM
63322015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6333
6334 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6335 ptrace's 4th parameter.
6336
50904b25
YQ
63372015-07-27 Yao Qi <yao.qi@linaro.org>
6338
6339 * configure.srv (case aarch64*-*-linux*): Don't set
6340 srv_linux_usrregs.
6341
5826e159
PA
63422015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6343
6344 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6345 sys/ptrace.h.
6346 * linux-arm-low.c: Likewise.
6347 * linux-cris-low.c: Likewise.
6348 * linux-crisv32-low.c: Likewise.
6349 * linux-low.c: Likewise.
6350 * linux-m68k-low.c: Likewise.
6351 * linux-mips-low.c: Likewise.
6352 * linux-nios2-low.c: Likewise.
6353 * linux-s390-low.c: Likewise.
6354 * linux-sparc-low.c: Likewise.
6355 * linux-tic6x-low.c: Likewise.
6356 * linux-tile-low.c: Likewise.
6357 * linux-x86-low.c: Likewise.
6358
54019719
PA
63592015-07-24 Pedro Alves <palves@redhat.com>
6360
6361 * config.in: Regenerate.
6362 * configure: Regenerate.
6363
eb7aa561
PA
63642015-07-24 Pedro Alves <palves@redhat.com>
6365
6366 * acinclude.m4: Include ../ptrace.m4.
6367 * configure.ac: Call GDB_AC_PTRACE.
6368 * config.in, configure: Regenerate.
6369
55d7b841
YQ
63702015-07-24 Yao Qi <yao.qi@linaro.org>
6371
6372 * linux-low.c (linux_create_inferior): Remove setting to
6373 proc->priv->new_inferior.
6374 (linux_attach): Likewise.
6375 (linux_low_filter_event): Likewise.
6376 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6377
c06cbd92
YQ
63782015-07-24 Yao Qi <yao.qi@linaro.org>
6379
6380 * linux-low.c (linux_arch_setup): New function.
6381 (linux_low_filter_event): If proc->tdesc is NULL and
6382 proc->attached is true, call the_low_target.arch_setup.
6383 Otherwise, keep status pending, and return.
6384 (linux_resume_one_lwp_throw): Don't call get_pc if
6385 thread->while_stepping isn't NULL. Don't call
6386 get_thread_regcache if proc->tdesc is NULL.
6387 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6388 (linux_target_ops): Install arch_setup.
6389 * server.c (start_inferior): Call the_target->arch_setup.
6390 * target.h (struct target_ops) <arch_setup>: New field.
6391 (target_arch_setup): New marco.
6392 * lynx-low.c (lynx_target_ops): Update.
6393 * nto-low.c (nto_target_ops): Update.
6394 * spu-low.c (spu_target_ops): Update.
6395 * win32-low.c (win32_target_ops): Update.
6396
5ae3ebba
YQ
63972015-07-24 Yao Qi <yao.qi@linaro.org>
6398
6399 * linux-low.c (linux_add_process): Don't set
6400 proc->priv->new_inferior.
6401 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6402 (linux_attach): Likewise.
6403
eb97750b
YQ
64042015-07-24 Yao Qi <yao.qi@linaro.org>
6405
6406 * server.c (start_inferior): Code refactor.
6407
51aee833
YQ
64082015-07-24 Yao Qi <yao.qi@linaro.org>
6409
6410 * server.c (process_serial_event): Set general_thread.
6411
af1b22f3
YQ
64122015-07-21 Yao Qi <yao.qi@linaro.org>
6413
6414 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6415 aarch64_linux_get_debug_reg_capacity.
6416
554717a3
YQ
64172015-07-17 Yao Qi <yao.qi@linaro.org>
6418
6419 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6420 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6421 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6422 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6423 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6424 (AARCH64_HWP_ALIGNMENT): Likewise.
6425 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6426 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6427 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6428 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6429 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6430 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6431 (struct aarch64_debug_reg_state): Likewise.
6432 (struct arch_lwp_info): Likewise.
6433 (aarch64_align_watchpoint): Likewise.
6434 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6435 (aarch64_watchpoint_length): Likewise.
6436 (aarch64_point_encode_ctrl_reg): Likewise
6437 (aarch64_point_is_aligned): Likewise.
6438 (aarch64_align_watchpoint): Likewise.
6439 (aarch64_linux_set_debug_regs):
6440 (aarch64_dr_state_insert_one_point): Likewise.
6441 (aarch64_dr_state_remove_one_point): Likewise.
6442 (aarch64_handle_breakpoint): Likewise.
6443 (aarch64_handle_aligned_watchpoint): Likewise.
6444 (aarch64_handle_unaligned_watchpoint): Likewise.
6445 (aarch64_handle_watchpoint): Likewise.
6446
c67ca4de
YQ
64472015-07-17 Yao Qi <yao.qi@linaro.org>
6448
6449 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6450 and don't aarch64_get_debug_reg_state. All callers update.
6451 (aarch64_handle_aligned_watchpoint): Likewise.
6452 (aarch64_handle_unaligned_watchpoint): Likewise.
6453 (aarch64_handle_watchpoint): Likewise.
6454 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6455 (aarch64_remove_point): Likewise.
6456
25abf979
YQ
64572015-07-17 Yao Qi <yao.qi@linaro.org>
6458
6459 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6460 debug_printf.
6461 (aarch64_handle_unaligned_watchpoint): Likewise.
6462
db1ff28b
JK
64632015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6464
6465 Revert the previous 3 commits:
6466 Move gdb_regex* to common/
6467 Move linux_find_memory_regions_full & co.
6468 gdbserver build-id attribute generator
6469
700ca40f
JK
64702015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6471 Jan Kratochvil <jan.kratochvil@redhat.com>
6472
6473 gdbserver build-id attribute generator.
6474 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6475 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6476 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6477 (find_phdr): New.
6478 (get_dynamic): Use find_pdhr to traverse program headers.
6479 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6480 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6481 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6482 (get_hex_build_id): New.
6483 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6484 to reply XML document.
6485
9904185c
JK
64862015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6487 Jan Kratochvil <jan.kratochvil@redhat.com>
6488
6489 * target.c: Include target/target-utils.h and fcntl.h.
6490 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6491 (target_fileio_read_stralloc): New functions.
6492
6e5b4429
JK
64932015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6494
6495 * Makefile.in (OBS): Add gdb_regex.o.
6496 (gdb_regex.o): New.
6497 * config.in: Rebuilt.
6498 * configure: Rebuilt.
6499
ddc98fbf
JK
65002015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6501 Jan Kratochvil <jan.kratochvil@redhat.com>
6502
6503 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6504 * Makefile.in (OBS): Add target-utils.o.
6505 (linux-maps.o, target-utils.o): New.
6506 * configure.srv (srv_linux_obj): Add linux-maps.o.
6507
e57bb7a0
PL
65082015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6509
6510 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6511 function, return 1.
6512 (the_low_target): Install it.
6513
586b02a9
PA
65142015-07-14 Pedro Alves <palves@redhat.com>
6515
6516 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6517 Instead, ignore ECHILD, and throw an error for other errnos.
6518
58c1b36c
PA
65192015-07-10 Pedro Alves <palves@redhat.com>
6520
6521 * event-loop.c (struct callback_event) <data>: Change type to
6522 gdb_client_data instance instead of gdb_client_data pointer.
6523 (append_callback_event): Adjust.
6524
421530db
PL
65252015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6526
6527 * linux-aarch64-low.c: Add comments for each linux_target_ops
6528 method. Remove comments already covered in target_ops and
6529 linux_target_ops definitions.
6530 (the_low_target): Add comments for each unimplemented method.
6531
c2d65f38
YQ
65322015-07-09 Yao Qi <yao.qi@linaro.org>
6533
6534 * linux-aarch64-low.c (aarch64_regmap): Remove.
6535 (aarch64_usrregs_info): Remove.
6536 (regs_info): Set field usrregs to NULL.
6537
b20a6524
MM
65382015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6539
6540 * linux-low.c: Include "rsp-low.h"
6541 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6542 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6543 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6544 (handle_btrace_enable_pt): New.
6545 (handle_btrace_general_set): Support "pt".
6546 (handle_btrace_conf_general_set): Support "pt:size".
6547
96c97461
PL
65482015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6549
6550 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6551 Z_PACKET_SW_BP.
6552
37d66942
PL
65532015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6554
6555 * linux-aarch64-low.c: Remove comment about endianness.
6556 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6557 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6558 memcmp.
6559
dc06243f
GB
65602015-06-24 Gary Benson <gbenson@redhat.com>
6561
6562 * linux-i386-ipa.c (stdint.h): Do not include.
6563 * lynx-i386-low.c (stdint.h): Likewise.
6564 * lynx-ppc-low.c (stdint.h): Likewise.
6565 * mem-break.c (stdint.h): Likewise.
6566 * thread-db.c (stdint.h): Likewise.
6567 * tracepoint.c (stdint.h): Likewise.
6568 * win32-low.c (stdint.h): Likewise.
6569
124e13d9
SM
65702015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6571
6572 * server.c (write_qxfer_response): Update call to
6573 remote_escape_output.
6574
909c2cda
JK
65752015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6576 Jan Kratochvil <jan.kratochvil@redhat.com>
6577
6578 Merge multiple hex conversions.
6579 * gdbreplay.c (tohex): Rename to 'fromhex'.
6580 (logchar): Use fromhex.
6581
24c05f46
JK
65822015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6583
6584 * server.c (handle_qxfer_libraries): Set `version' attribute for
6585 <library-list>.
6586
14d2069a
GB
65872015-06-10 Gary Benson <gbenson@redhat.com>
6588
6589 * target.h (struct target_ops) <multifs_open>: New field.
6590 <multifs_unlink>: Likewise.
6591 <multifs_readlink>: Likewise.
6592 * linux-low.c (nat/linux-namespaces.h): New include.
6593 (linux_target_ops): Initialize the_target->multifs_open,
6594 the_target->multifs_unlink and the_target->multifs_readlink.
6595 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6596 * hostio.c (hostio_fs_pid): New static variable.
6597 (hostio_handle_new_gdb_connection): New function.
6598 (handle_setfs): Likewise.
6599 (handle_open): Use the_target->multifs_open as appropriate.
6600 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6601 (handle_readlink): Use the_target->multifs_readlink as
6602 appropriate.
6603 (handle_vFile): Handle vFile:setfs packets.
6604 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6605 after target_handle_new_gdb_connection.
6606
4b8b5e72
GB
66072015-06-10 Gary Benson <gbenson@redhat.com>
6608
6609 * configure.ac (AC_CHECK_FUNCS): Add setns.
6610 * config.in: Regenerate.
6611 * configure: Likewise.
6612 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6613 (linux-namespaces.o): New rule.
6614 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6615
3ac2e371
GB
66162015-06-09 Gary Benson <gbenson@redhat.com>
6617
6618 * hostio.c (handle_open): Process mode argument with
6619 fileio_to_host_mode.
6620
ca9b78ce
YQ
66212015-06-01 Yao Qi <yao.qi@linaro.org>
6622
6623 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6624 * linux-x86-low.c: Likewise.
6625
bfacd19d
DB
66262015-05-28 Don Breazeal <donb@codesourcery.com>
6627
6628 * linux-low.c (handle_extended_wait): Initialize
6629 thread_info.last_resume_kind for new fork children.
6630
452003ef
PA
66312015-05-15 Pedro Alves <palves@redhat.com>
6632
6633 * target.h (target_handle_new_gdb_connection): Rewrite using if
6634 wrapped in do/while.
6635
1041a03c
JB
66362015-05-14 Joel Brobecker <brobecker@adacore.com>
6637
6638 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6639 * configure, config.in: Regenerate.
6640 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6641 Declare typedef.
6642
c269dbdb
DB
66432015-05-12 Don Breazeal <donb@codesourcery.com>
6644
6645 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6646 PTRACE_EVENT_VFORK_DONE.
6647 (linux_low_ptrace_options, extended_event_reported): Add vfork
6648 events.
6649 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6650 and "vforkdone" for RSP 'T' Stop Reply Packet.
6651 * server.h (report_vfork_events): Declare
6652 global variable.
6653
3a8a0396
DB
66542015-05-12 Don Breazeal <donb@codesourcery.com>
6655
6656 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6657 (the_low_target) <new_fork>: Initialize new member.
6658 * linux-arm-low.c (arm_new_fork): New function.
6659 (the_low_target) <new_fork>: Initialize new member.
6660 * linux-low.c (handle_extended_wait): Call new target function
6661 new_fork.
6662 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6663 * linux-mips-low.c (mips_add_watchpoint): New function
6664 extracted from mips_insert_point.
6665 (the_low_target) <new_fork>: Initialize new member.
6666 (mips_linux_new_fork): New function.
6667 (mips_insert_point): Call mips_add_watchpoint.
6668 * linux-x86-low.c (x86_linux_new_fork): New function.
6669 (the_low_target) <new_fork>: Initialize new member.
6670
de0d863e
DB
66712015-05-12 Don Breazeal <donb@codesourcery.com>
6672
6673 * linux-low.c (handle_extended_wait): Implement return value,
6674 rename argument 'event_child' to 'event_lwp', handle
6675 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6676 (linux_low_ptrace_options): New function.
6677 (linux_low_filter_event): Call linux_low_ptrace_options,
6678 use different argument fo linux_enable_event_reporting,
6679 use return value from handle_extended_wait.
6680 (extended_event_reported): New function.
6681 (linux_wait_1): Call extended_event_reported and set
6682 status to report fork events.
6683 (linux_write_memory): Add pid to debug message.
6684 (reset_lwp_ptrace_options_callback): New function.
6685 (linux_handle_new_gdb_connection): New function.
6686 (linux_target_ops): Initialize new structure member.
6687 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6688 * lynx-low.c: Initialize new structure member.
6689 * remote-utils.c (prepare_resume_reply): Implement stop reason
6690 "fork" for "T" stop message.
6691 * server.c (handle_query): Call handle_new_gdb_connection.
6692 * server.h (report_fork_events): Declare global flag.
6693 * target.h (struct target_ops) <handle_new_gdb_connection>:
6694 New member.
6695 (target_handle_new_gdb_connection): New macro.
6696 * win32-low.c: Initialize new structure member.
6697
ddcbc397
DB
66982015-05-12 Don Breazeal <donb@codesourcery.com>
6699
6700 * mem-break.c (APPEND_TO_LIST): Define macro.
6701 (clone_agent_expr): New function.
6702 (clone_one_breakpoint): New function.
6703 (clone_all_breakpoints): New function.
6704 * mem-break.h: Declare new functions.
6705
89245bc0
DB
67062015-05-12 Don Breazeal <donb@codesourcery.com>
6707
6708 * linux-low.c (linux_supports_fork_events): New function.
6709 (linux_supports_vfork_events): New function.
6710 (linux_target_ops): Initialize new structure members.
6711 (initialize_low): Call linux_check_ptrace_features.
6712 * lynx-low.c (lynx_target_ops): Initialize new structure
6713 members.
6714 * server.c (report_fork_events, report_vfork_events):
6715 New global flags.
6716 (handle_query): Add new features to qSupported packet and
6717 response.
6718 (captured_main): Initialize new global variables.
6719 * target.h (struct target_ops) <supports_fork_events>:
6720 New member.
6721 <supports_vfork_events>: New member.
6722 (target_supports_fork_events): New macro.
6723 (target_supports_vfork_events): New macro.
6724 * win32-low.c (win32_target_ops): Initialize new structure
6725 members.
6726
835205d0
GB
67272015-05-12 Gary Benson <gbenson@redhat.com>
6728
6729 * server.c (handle_qxfer_exec_file): Use current process
6730 if annex is empty.
6731
21e94bd9
SL
67322015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6733
6734 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6735 Remove HAVE_PTRACE_GETREGS conditionals.
6736 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6737 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6738
45614f15
YQ
67392015-05-08 Yao Qi <yao.qi@linaro.org>
6740
6741 * linux-low.c (linux_supports_conditional_breakpoints): New
6742 function.
6743 (linux_target_ops): Install new target method.
6744 * lynx-low.c (lynx_target_ops): Install NULL hook for
6745 supports_conditional_breakpoints.
6746 * nto-low.c (nto_target_ops): Likewise.
6747 * spu-low.c (spu_target_ops): Likewise.
6748 * win32-low.c (win32_target_ops): Likewise.
6749 * server.c (handle_query): Check
6750 target_supports_conditional_breakpoints.
6751 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6752 New field.
6753 (target_supports_conditional_breakpoints): New macro.
6754
80ad801e
PA
67552015-05-06 Pedro Alves <palves@redhat.com>
6756
6757 PR server/18081
6758 * server.c (start_inferior): If the process exits, mourn it.
6759
819843c7
GB
67602015-04-21 Gary Benson <gbenson@redhat.com>
6761
6762 * hostio.c (fileio_open_flags_to_host): Factored out to
6763 fileio_to_host_openflags in common/fileio.c. Single use
6764 updated.
6765
a2d5a9d7
MF
67662015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6767
6768 * linux-xtensa-low.c (xtensa_fill_gregset)
6769 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6770 XCHAL_HAVE_LOOP.
6771
deb44829
MF
67722015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6773
6774 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6775 (regs_info): Replace usrregs pointer with NULL.
6776
e57f1de3
GB
67772015-04-17 Gary Benson <gbenson@redhat.com>
6778
6779 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6780 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6781 * server.c (handle_qxfer_exec_file): New function.
6782 (qxfer_packets): Add exec-file entry.
6783 (handle_query): Report qXfer:exec-file:read as supported packet.
6784
62828379
RN
67852015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6786
6787 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6788
b88bb450
GB
67892015-04-09 Gary Benson <gbenson@redhat.com>
6790
6791 * hostio-errno.c (errno_to_fileio_error): Remove function.
6792 Update caller to use remote_fileio_to_fio_error.
6793
c8f4bfdd
YQ
67942015-04-09 Yao Qi <yao.qi@linaro.org>
6795
6796 * linux-low.c (linux_insert_point): Call
6797 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6798 (linux_remove_point): Call remove_memory_breakpoint if type is
6799 raw_bkpt_type_sw.
6800 * linux-x86-low.c (x86_insert_point): Don't call
6801 insert_memory_breakpoint.
6802 (x86_remove_point): Don't call remove_memory_breakpoint.
6803
41f98f02
PA
68042015-04-01 Pedro Alves <palves@redhat.com>
6805 Cleber Rosa <crosa@redhat.com>
6806
6807 * server.c (gdbserver_usage): Reorganize and extend the usage
6808 message.
6809
2bf6fb9d
PA
68102015-03-24 Pedro Alves <palves@redhat.com>
6811
6812 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6813 output. Also dump TRAP_TRACE.
6814 (linux_low_filter_event): In debug output, distinguish a
6815 resume_stop SIGSTOP from a delayed SIGSTOP.
6816
369f6daa
GB
68172015-03-24 Gary Benson <gbenson@redhat.com>
6818
6819 * linux-x86-low.c (x86_linux_new_thread): Moved to
6820 nat/x86-linux.c.
6821 (x86_linux_prepare_to_resume): Likewise.
6822
8e5d4070
GB
68232015-03-24 Gary Benson <gbenson@redhat.com>
6824
6825 * Makefile.in (x86-linux-dregs.o): New rule.
6826 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6827 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6828 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6829 (x86_linux_dr_get): Likewise.
6830 (x86_linux_dr_set): Likewise.
6831 (update_debug_registers_callback): Likewise.
6832 (x86_linux_dr_set_addr): Likewise.
6833 (x86_linux_dr_get_addr): Likewise.
6834 (x86_linux_dr_set_control): Likewise.
6835 (x86_linux_dr_get_control): Likewise.
6836 (x86_linux_dr_get_status): Likewise.
6837 (x86_linux_update_debug_registers): Likewise.
6838
2b95d440
GB
68392015-03-24 Gary Benson <gbenson@redhat.com>
6840
6841 * linux-x86-low.c (x86_linux_update_debug_registers):
6842 New function, factored out from...
6843 (x86_linux_prepare_to_resume): ...this.
6844
14b0bc68
GB
68452015-03-24 Gary Benson <gbenson@redhat.com>
6846
6847 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6848 (x86_linux_dr_set): Likewise.
6849 (update_debug_registers_callback): Likewise.
6850 (x86_linux_dr_set_addr): Likewise.
6851 (x86_linux_dr_get_addr): Likewise.
6852 (x86_linux_dr_set_control): Likewise.
6853 (x86_linux_dr_get_control): Likewise.
6854 (x86_linux_dr_get_status): Likewise.
6855 (x86_linux_prepare_to_resume): Likewise.
6856
5dfe6ca8
GB
68572015-03-24 Gary Benson <gbenson@redhat.com>
6858
6859 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6860 Use perror_with_name. Pass string through gettext.
6861 (x86_linux_dr_set): Likewise.
6862
d33472ad
GB
68632015-03-24 Gary Benson <gbenson@redhat.com>
6864
6865 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6866 (x86_linux_dr_set_addr): ...this.
6867 (x86_dr_low_get_addr): Rename to...
6868 (x86_linux_dr_get_addr): ...this.
6869 (x86_dr_low_set_control): Rename to...
6870 (x86_linux_dr_set_control): ...this.
6871 (x86_dr_low_get_control): Rename to...
6872 (x86_linux_dr_get_control): ...this.
6873 (x86_dr_low_get_status): Rename to...
6874 (x86_linux_dr_get_status): ...this.
6875 (x86_dr_low): Update with new function names.
6876
4b134ca1
GB
68772015-03-24 Gary Benson <gbenson@redhat.com>
6878
6879 * Makefile.in (x86-linux.o): New rule.
6880 * configure.srv: Add x86-linux.o to relevant targets.
6881 * linux-low.c (lwp_set_arch_private_info): New function.
6882 (lwp_arch_private_info): Likewise.
6883 * linux-x86-low.c: Include nat/x86-linux.h.
6884 (arch_lwp_info): Removed structure.
6885 (update_debug_registers_callback):
6886 Use lwp_set_debug_registers_changed.
6887 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6888 and lwp_set_debug_registers_changed.
6889 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6890
34c703da
GB
68912015-03-24 Gary Benson <gbenson@redhat.com>
6892
6893 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6894 * linux-arm-low.c (arm_new_thread): Likewise.
6895 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6896 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6897 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6898 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6899
cff068da
GB
69002015-03-24 Gary Benson <gbenson@redhat.com>
6901
6902 * linux-low.c (ptid_of_lwp): New function.
6903 (lwp_is_stopped): Likewise.
6904 (lwp_stop_reason): Likewise.
6905 * linux-x86-low.c (update_debug_registers_callback):
6906 Use lwp_is_stopped.
6907 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6908 lwp_stop_reason.
6909
b2f7c7e8
GB
69102015-03-24 Gary Benson <gbenson@redhat.com>
6911
6912 * linux-low.h (linux_stop_lwp): Remove declaration.
6913
6d4ee8c6
GB
69142015-03-24 Gary Benson <gbenson@redhat.com>
6915
6916 * linux-low.h: Include nat/linux-nat.h.
6917 * linux-low.c (iterate_over_lwps_args): New structure.
6918 (iterate_over_lwps_filter): New function.
6919 (iterate_over_lwps): Likewise.
6920 * linux-x86-low.c (update_debug_registers_callback):
6921 Update signature to what iterate_over_lwps expects.
6922 Remove PID check that iterate_over_lwps now performs.
6923 (x86_dr_low_set_addr): Use iterate_over_lwps.
6924 (x86_dr_low_set_control): Likewise.
6925
70a0bb6b
GB
69262015-03-24 Gary Benson <gbenson@redhat.com>
6927
6928 * linux-x86-low.c (x86_debug_reg_state): New function.
6929 (x86_linux_prepare_to_resume): Use the above.
6930
7b669087
GB
69312015-03-24 Gary Benson <gbenson@redhat.com>
6932
6933 * linux-low.c (current_lwp_ptid): New function.
6934 * linux-x86-low.c: Include nat/linux-nat.h.
6935 (x86_dr_low_get_addr): Use current_lwp_ptid.
6936 (x86_dr_low_get_control): Likewise.
6937 (x86_dr_low_get_status): Likewise.
6938
eef49a3d
PA
69392015-03-20 Pedro Alves <palves@redhat.com>
6940
6941 * tracepoint.c (cmd_qtstatus): Make "str" const.
6942
b2333d22
PA
69432015-03-20 Pedro Alves <palves@redhat.com>
6944
6945 * server.c (handle_general_set): Make "req_str" const.
6946
23f238d3
PA
69472015-03-19 Pedro Alves <palves@redhat.com>
6948
6949 * linux-low.c (linux_resume_one_lwp): Rename to ...
6950 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6951 instead call perror_with_name.
6952 (check_ptrace_stopped_lwp_gone): New function.
6953 (linux_resume_one_lwp): Reimplement as wrapper around
6954 linux_resume_one_lwp_throw that swallows errors if the LWP is
6955 gone.
6956
91baf43f
PA
69572015-03-19 Pedro Alves <palves@redhat.com>
6958
6959 * linux-low.c (count_events_callback, select_event_lwp_callback):
6960 No longer check whether the thread has resume_stop as last resume
6961 kind.
6962
8bf3b159
PA
69632015-03-19 Pedro Alves <palves@redhat.com>
6964
6965 * linux-low.c (count_events_callback, select_event_lwp_callback):
6966 Use the lwp's status_pending_p field, not the thread's.
6967
b90fc188
PA
69682015-03-19 Pedro Alves <palves@redhat.com>
6969
6970 * linux-low.c (select_event_lwp_callback): Update comments to
6971 no longer mention SIGTRAP.
6972
464b0089
GB
69732015-03-18 Gary Benson <gbenson@redhat.com>
6974
6975 * server.c (handle_query): Do not report vFile:fstat as supported.
6976
aa9e327f
GB
69772015-03-11 Gary Benson <gbenson@redhat.com>
6978
6979 * hostio.c (sys/types.h): New include.
6980 (sys/stat.h): Likewise.
6981 (common-remote-fileio.h): Likewise.
6982 (handle_fstat): New function.
6983 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6984
791c0056
GB
69852015-03-11 Gary Benson <gbenson@redhat.com>
6986
6987 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6988 struct stat.st_blocks and struct stat.st_blksize.
6989 * configure: Regenerate.
6990 * config.in: Likewise.
6991 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6992 (OBS): Add common-remote-fileio.o.
6993 (common-remote-fileio.o): New rule.
6994
9a9df970
PA
69952015-03-09 Pedro Alves <palves@redhat.com>
6996
6997 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6998 'struct sockaddr' pointer in 'accept' call.
6999
9eb1356e
PA
70002015-03-09 Pedro Alves <palves@redhat.com>
7001
7002 Revert:
7003 2015-03-07 Pedro Alves <palves@redhat.com>
7004 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7005 or <winsock2.h> here. Instead include "gdb_socket.h".
7006 (remote_open): Use union gdb_sockaddr_u.
7007 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7008 or <winsock2.h> here. Instead include "gdb_socket.h".
7009 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7010 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7011 or <sys/un.h>.
7012 (init_named_socket, gdb_agent_helper_thread): Use union
7013 gdb_sockaddr_u.
7014
aac331e4
PA
70152015-03-07 Pedro Alves <palves@redhat.com>
7016
7017 * configure.ac (build_warnings): Move
7018 -Wdeclaration-after-statement to the C-specific set.
7019 * configure: Regenerate.
7020
366c75fc
PA
70212015-03-07 Pedro Alves <palves@redhat.com>
7022
7023 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7024 or <winsock2.h> here. Instead include "gdb_socket.h".
7025 (remote_open): Use union gdb_sockaddr_u.
7026 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7027 or <winsock2.h> here. Instead include "gdb_socket.h".
7028 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7029 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7030 or <sys/un.h>.
7031 (init_named_socket, gdb_agent_helper_thread): Use union
7032 gdb_sockaddr_u.
7033
492d29ea
PA
70342015-03-07 Pedro Alves <palves@redhat.com>
7035
7036 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7037 instead.
7038
60a191ed
YQ
70392015-03-06 Yao Qi <yao.qi@linaro.org>
7040
7041 * linux-aarch64-low.c (aarch64_insert_point): Use
7042 show_debug_regs as a boolean.
7043 (aarch64_remove_point): Likewise.
7044
f5771b1d
PA
70452015-03-05 Pedro Alves <palves@redhat.com>
7046
7047 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7048 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7049 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7050 * nto-low.c (nto_target_ops): Likewise.
7051 * spu-low.c (spu_target_ops): Likewise.
7052 * win32-low.c (win32_target_ops): Likewise.
7053
3e572f71
PA
70542015-03-04 Pedro Alves <palves@redhat.com>
7055
72f4393d 7056 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7057 Decide whether a breakpoint triggered based on the SIGTRAP's
7058 siginfo.si_code.
72f4393d
L
7059 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7060 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7061 (linux_low_filter_event): Check for breakpoints before checking
7062 watchpoints.
7063 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7064 siginfo.si_code.
72f4393d
L
7065 (linux_stopped_by_sw_breakpoint)
7066 (linux_supports_stopped_by_sw_breakpoint)
7067 (linux_stopped_by_hw_breakpoint)
7068 (linux_supports_stopped_by_hw_breakpoint): New functions.
7069 (linux_target_ops): Install new target methods.
3e572f71 7070
1ec68e26
PA
70712015-03-04 Pedro Alves <palves@redhat.com>
7072
7073 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7074 * server.c (swbreak_feature, hwbreak_feature): New globals.
7075 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7076 (captured_main): Clear swbreak_feature and hwbreak_feature.
7077 * server.h (swbreak_feature, hwbreak_feature): Declare.
7078 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7079 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7080 supports_stopped_by_hw_breakpoint>: New fields.
7081 (target_supports_stopped_by_sw_breakpoint)
7082 (target_stopped_by_sw_breakpoint)
7083 (target_supports_stopped_by_hw_breakpoint)
7084 (target_stopped_by_hw_breakpoint): Declare.
7085
15c66dd6
PA
70862015-03-04 Pedro Alves <palves@redhat.com>
7087
7088 enum lwp_stop_reason -> enum target_stop_reason
7089 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7090 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7091 (linux_wait_1, stuck_in_jump_pad_callback)
7092 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7093 (linux_stopped_by_watchpoint):
7094 * linux-low.h (enum lwp_stop_reason): Delete.
7095 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7096 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7097
98fc70d6
YQ
70982015-03-04 Yao Qi <yao.qi@linaro.org>
7099
7100 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7101
dd2ac174
GB
71022015-03-03 Gary Benson <gbenson@redhat.com>
7103
7104 * hostio.c (handle_vFile): Fix prefix lengths.
7105
d68e53f4
MM
71062015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7107
7108 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7109 ptr_bits.
7110
bf2d68ab
AA
71112015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7112
7113 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7114 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7115 (clean): Add "rm -f" for above C files.
7116 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7117 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7118 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7119 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7120 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7121 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7122 (init_registers_s390x_vx_linux64)
7123 (init_registers_s390x_tevx_linux64)
7124 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7125 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7126 declarations.
7127 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7128 (s390_store_vxrs_high): New functions.
7129 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7130 NT_S390_VXRS_HIGH.
7131 (s390_arch_setup): Add logic for selecting one of the new target
7132 descriptions. Activate the new vector regsets if applicable.
7133 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7134 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7135 and init_registers_s390x_tevx_linux64.
7136
c966a859
PA
71372015-03-01 Pedro Alves <palves@redhat.com>
7138
7139 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7140 parameter.
7141
4180215b
PA
71422015-02-27 Pedro Alves <palves@redhat.com>
7143
7144 * linux-x86-low.c (u_debugreg_offset): New function.
7145 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7146
749bab01
PA
71472015-02-27 Pedro Alves <palves@redhat.com>
7148
7149 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7150 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7151 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7152 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7153 (ps_lsetfpregs, ps_getpid)
7154 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7155 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7156 (ps_lsetxregs, ps_plog): Declare.
7157
3c14e5a3
PA
71582015-02-27 Pedro Alves <palves@redhat.com>
7159
7160 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7161 IP_AGENT_EXPORT_FUNC.
7162 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7163 IP_AGENT_EXPORT_FUNC.
7164 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7165 (IP_AGENT_EXPORT): Delete.
7166 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7167 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7168 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7169 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7170 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7171 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7172 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7173 (traceframe_read_count, traceframe_write_count)
7174 (traceframes_created, trace_state_variables, get_raw_reg)
7175 (get_trace_state_variable_value, set_trace_state_variable_value)
7176 (ust_loaded, helper_thread_id, cmd_buf): Use
7177 IPA_SYM_EXPORTED_NAME.
7178 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7179 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7180 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7181 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7182 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7183 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7184 EXTERN_C_PUSH/EXTERN_C_POP.
7185 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7186 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7187 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7188 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7189 (traceframe_write_count, traceframe_read_count)
7190 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7191 (about_to_request_buffer_space, get_trace_state_variable_value)
7192 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7193 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7194 EXTERN_C_PUSH/EXTERN_C_POP.
7195 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7196 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7197 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7198 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7199 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7200 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7201 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7202 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7203 Define.
7204 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7205 (IP_AGENT_EXPORT_VAR_DECL): Define.
7206 (tracing): Declare.
7207 (gdb_agent_get_raw_reg): Declare.
7208
fe978cb0
PA
72092015-02-27 Tom Tromey <tromey@redhat.com>
7210 Pedro Alves <palves@redhat.com>
7211
7212 Rename symbols whose names are reserved C++ keywords throughout.
7213
3bc3d82a
PA
72142015-02-27 Pedro Alves <palves@redhat.com>
7215
7216 * Makefile.in (COMPILER): New, get it from autoconf.
7217 (CXX): Get from autoconf instead.
7218 (COMPILE.pre): Use COMPILER.
7219 (CC-LD): Rename to ...
7220 (CC_LD): ... this. Use COMPILER.
7221 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7222 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7223 * acinclude.m4: Include build-with-cxx.m4.
7224 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7225 Disable -Werror by default if building in C++ mode.
7226 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7227 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7228 the C++ compiler. Save/restore CXXFLAGS too.
7229 * configure: Regenerate.
7230
07697489
PA
72312015-02-27 Pedro Alves <palves@redhat.com>
7232
7233 * acinclude.m4: Include libiberty.m4.
7234 * configure.ac: Call libiberty_INIT.
7235 * config.in, configure: Regenerate.
7236
9beb7c4e
PA
72372015-02-26 Pedro Alves <palves@redhat.com>
7238
7239 * linux-low.c (linux_wait_1): When incrementing the PC past a
7240 program breakpoint always use the_low_target.breakpoint_len as
7241 increment, rather than the maximum between that and
7242 the_low_target.decr_pc_after_break.
7243
8090aef2
PA
72442015-02-23 Pedro Alves <palves@redhat.com>
7245
7246 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7247 thread was doing a step-over; always adjust the PC if
7248 we stepped over a permanent breakpoint.
7249 (linux_wait_1): If we stepped over breakpoint that was on top of a
7250 permanent breakpoint, manually advance the PC past it.
7251
bc9540e8
PA
72522015-02-23 Pedro Alves <palves@redhat.com>
7253
7254 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7255 modes.
7256 (x86_fill_gregset, x86_store_gregset): Use it when handling
7257 $orig_eax.
7258
2db9a427
PA
72592015-02-20 Pedro Alves <palves@redhat.com>
7260
7261 * thread-db.c: Include "nat/linux-procfs.h".
7262 (thread_db_init): Skip listing new threads if the kernel supports
7263 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7264
afa8d396
PA
72652015-02-20 Pedro Alves <palves@redhat.com>
7266
7267 * linux-low.c (status_pending_p_callback): Use ptid_match.
7268
c9587f88
AT
72692015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7270
7271 PR breakpoints/16812
7272 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7273 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7274 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7275
b05ec7a5
AT
72762015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7277
7278 PR breakpoints/15956
7279 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7280
d33501a5
MM
72812015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7282
7283 * linux-low.c (linux_low_btrace_conf): Print size.
7284 * server.c (handle_btrace_conf_general_set): New.
7285 (hanle_general_set): Call handle_btrace_conf_general_set.
7286 (handle_query): Report Qbtrace-conf:bts:size as supported.
7287
f4abbc16
MM
72882015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7289
7290 * linux-low.c (linux_low_enable_btrace): Update parameters.
7291 (linux_low_btrace_conf): New.
7292 (linux_target_ops)<to_btrace_conf>: Initialize.
7293 * server.c (current_btrace_conf): New.
7294 (handle_btrace_enable): Rename to ...
7295 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7296 to target_enable_btrace. Update comment. Update users.
7297 (handle_qxfer_btrace_conf): New.
7298 (qxfer_packets): Add btrace-conf entry.
7299 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7300 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7301 (target_ops)<read_btrace_conf>: New.
7302 (target_enable_btrace): Update parameters.
7303 (target_read_btrace_conf): New.
7304
043c3577
MM
73052015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7306
7307 * server.c (handle_btrace_general_set): Remove call to
7308 target_supports_btrace.
7309 (supported_btrace_packets): New.
7310 (handle_query): Call supported_btrace_packets.
7311 * target.h: include btrace-common.h.
7312 (btrace_target_info): Removed.
7313 (supports_btrace, target_supports_btrace): Update parameters.
7314
734b0e4b
MM
73152015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7316
7317 * Makefile.in (SFILES): Add common/btrace-common.c.
7318 (OBS): Add common/btrace-common.o.
7319 (btrace-common.o): Add build rules.
7320 * linux-low: Include btrace-common.h.
7321 (linux_low_read_btrace): Use struct btrace_data. Call
7322 btrace_data_init and btrace_data_fini.
7323
d6c146e9
PA
73242015-02-06 Pedro Alves <palves@redhat.com>
7325
7326 * thread-db.c (find_new_threads_callback): Add debug output.
7327
20ba1ce6
PA
73282015-02-04 Pedro Alves <palves@redhat.com>
7329
7330 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7331 (resume_stopped_resumed_lwps): New function.
7332 (linux_wait_for_event_filtered): Use it.
7333
8cc73a39
SDJ
73342015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7335
7336 * Makefile.in (SFILES): Add linux-personality.c.
7337 (linux-personality.o): New rule.
7338 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7339 list of objects to be built.
7340 * linux-low.c: Include nat/linux-personality.h.
7341 (linux_create_inferior): Remove code to disable address space
7342 randomization (moved to ../nat/linux-personality.c). Create
7343 cleanup to disable address space randomization.
7344
fb23d554
SDJ
73452015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7346
7347 * Makefile.in (posix-strerror.o): New rule.
7348 (mingw-strerror.o): Likewise.
7349 * configure: Regenerated.
7350 * configure.ac: Source file ../common/common.host. Initialize new
7351 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7352
cdf43629
YQ
73532015-01-14 Yao Qi <yao@codesourcery.com>
7354
7355 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7356 (ppc-linux.o): New rule.
7357 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7358 * configure.ac: AC_CHECK_FUNCS(getauxval).
7359 * config.in: Re-generated.
7360 * configure: Re-generated.
7361 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7362 ppc64_64bit_inferior_p
7363
514c5338
YQ
73642015-01-14 Yao Qi <yao@codesourcery.com>
7365
7366 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7367 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7368 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7369 (PT_ORIG_R3, PT_TRAP): Likewise.
7370 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7371 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7372 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7373
3368c1e5
JB
73742015-01-10 Joel Brobecker <brobecker@adacore.com>
7375
7376 * i387-fp.c (i387_cache_to_xsave): In look over
7377 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7378 zmmh_low_space field by use of zmmh_high_space.
7379
582511be
PA
73802015-01-09 Pedro Alves <palves@redhat.com>
7381
7382 * linux-low.c (step_over_bkpt): Move higher up in the file.
7383 (handle_extended_wait): Don't store the stop_pc here.
7384 (get_stop_pc): Adjust comments and rename to ...
7385 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7386 stopped for a software breakpoint or hardware breakpoint.
7387 (thread_still_has_status_pending_p): New function.
7388 (status_pending_p_callback): Use
7389 thread_still_has_status_pending_p. If the event is no longer
7390 interesting, resume the LWP.
7391 (handle_tracepoints): Add assert.
7392 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7393 (wstatus_maybe_breakpoint): New function.
7394 (cancel_breakpoint): Delete function.
7395 (check_stopped_by_watchpoint): New function, factored out from
7396 linux_low_filter_event.
7397 (lp_status_maybe_breakpoint): Delete function.
7398 (linux_low_filter_event): Remove filter_ptid argument.
7399 Leave thread group exits pending here. Store the LWP's stop PC.
7400 Always leave events pending.
7401 (linux_wait_for_event_filtered): Pull all events out of the
7402 kernel, and leave them all pending.
7403 (count_events_callback, select_event_lwp_callback): Consider all
7404 events.
7405 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7406 (select_event_lwp): Only give preference to the stepping LWP in
7407 all-stop mode. Adjust comments.
7408 (ignore_event): New function.
7409 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7410 references to cancel_breakpoints. Adjust to renames. Also give
7411 equal priority to all LWPs that have had events in non-stop mode.
7412 If reporting a software breakpoint event, unadjust the LWP's PC.
7413 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7414 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7415 Adjust.
7416 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7417 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7418 (linux_stopped_by_watchpoint): Adjust.
7419 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7420 * linux-low.h (enum lwp_stop_reason): New.
7421 (struct lwp_info) <stop_pc>: Adjust comment.
7422 <stopped_by_watchpoint>: Delete field.
7423 <stop_reason>: New field.
7424 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7425 * mem-break.c (software_breakpoint_inserted_here)
7426 (hardware_breakpoint_inserted_here): New function.
7427 * mem-break.h (software_breakpoint_inserted_here)
7428 (hardware_breakpoint_inserted_here): Declare.
7429 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7430 (cancel_breakpoints): Delete.
7431 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7432 (upload_fast_traceframes): Remove references to
7433 cancel_breakpoints.
7434
a33e3959
PA
74352015-01-09 Pedro Alves <palves@redhat.com>
7436
7437 * thread-db.c (find_new_threads_callback): Ignore thread if the
7438 kernel thread ID is -1.
7439
8784d563
PA
74402015-01-09 Pedro Alves <palves@redhat.com>
7441
7442 * linux-low.c (linux_attach_fail_reason_string): Move to
7443 nat/linux-ptrace.c, and rename.
7444 (linux_attach_lwp): Update comment.
7445 (attach_proc_task_lwp_callback): New function.
7446 (linux_attach): Adjust to rename and use
7447 linux_proc_attach_tgid_threads.
7448 (linux_attach_fail_reason_string): Delete declaration.
7449
76f2b779
JB
74502015-01-01 Joel Brobecker <brobecker@adacore.com>
7451
7452 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7453 * server.c (gdbserver_version): Likewise.
7454
fafcc06a
SDJ
74552014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7456
7457 * remote-utils.c: Include ctype.h.
7458 (input_interrupt): Explicitly handle the case when the char
7459 received is the NUL byte. Improve the printing of non-ASCII
7460 characters.
7461
beed38b8
JB
74622014-12-16 Joel Brobecker <brobecker@adacore.com>
7463
7464 * linux-low.c (linux_low_filter_event): Update call to
7465 linux_enable_event_reporting following the addition of
7466 a new parameter to that function.
7467
bf330350
CU
74682014-12-16 Catalin Udma <catalin.udma@freescale.com>
7469
7470 PR server/17457
7471 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7472 (AARCH64_FPCR_REGNO): Likewise.
7473 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7474 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7475 (aarch64_store_fpregset): Likewise.
7476
5227d625
JB
74772014-12-15 Joel Brobecker <brobecker@adacore.com>
7478
7479 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7480 Remove FIXME comment about assumption about N.
7481
f93b65a0
JB
74822014-12-13 Joel Brobecker <brobecker@adacore.com>
7483
7484 * configure.ac: If large-file support is disabled in GDBserver,
7485 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7486 * configure: Regenerate.
7487
e5a9158d
AA
74882014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7489
7490 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7491 warning upon ENODATA from ptrace.
7492 * linux-s390-low.c (s390_store_tdb): New.
7493 (s390_regsets): Add regset for NT_S390_TDB.
7494
feea5f36
AA
74952014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7496
7497 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7498 without a fill_function.
7499 * linux-s390-low.c (s390_fill_last_break): Remove.
7500 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7501 (s390_arch_setup): Use regset's size instead of fill_function for
7502 loop end condition.
7503
098dbe61
AA
75042014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7505
7506 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7507 the regset's store function when ptrace returned an error.
7508 * regcache.c (get_thread_regcache): Invalidate register cache
7509 before fetching inferior's registers.
7510
28eef672
AA
75112014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7512
7513 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7514 while-loop as for-loop.
7515 (regsets_store_inferior_registers): Likewise.
7516
bdca27a2
YQ
75172014-11-28 Yao Qi <yao@codesourcery.com>
7518
7519 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7520 * config.in, configure: Re-generate.
7521 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7522 is defined.
7523
9c232dda
YQ
75242014-11-21 Yao Qi <yao@codesourcery.com>
7525
7526 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7527 (AC_CHECK_HEADERS): Remove malloc.h.
7528 * configure: Re-generated.
7529 * config.in: Re-generated.
7530 * server.h: Don't include alloca.h and malloc.h.
7531 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7532 Don't include malloc.h.
7533
43968415
JB
75342014-11-17 Joel Brobecker <brobecker@adacore.com>
7535
7536 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7537 corresponding ERRNO check in same block.
7538
40e91bc7
PA
75392014-11-12 Pedro Alves <palves@redhat.com>
7540
7541 * server.c (cont_thread): Update comment.
7542 (start_inferior, attach_inferior): No longer clear cont_thread.
7543 (handle_v_cont): No longer set cont_thread.
7544 (captured_main): Clear cont_thread each time a GDB connects.
7545
c2c118cf
PA
75462014-11-12 Pedro Alves <palves@redhat.com>
7547
7548 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7549 thread, and don't resume all threads if the Hc thread has exited.
7550
78708b7c
PA
75512014-11-12 Pedro Alves <palves@redhat.com>
7552
7553 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7554 the process group instead of to a specific LWP.
7555
a2abc7de
PA
75562014-10-15 Pedro Alves <palves@redhat.com>
7557
7558 PR server/17487
7559 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7560 parameter.
7561 (arm_set_thread_context): Delete.
7562 (the_low_target): Adjust.
7563 * win32-i386-low.c (debug_registers_changed)
7564 (debug_registers_used): Delete.
7565 (update_debug_registers_callback): New function.
7566 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7567 needing to update their debug registers.
7568 (win32_get_current_dr): New function.
7569 (x86_dr_low_get_addr, x86_dr_low_get_control)
7570 (x86_dr_low_get_status): Fetch the debug register from the thread
7571 record's context.
7572 (i386_initial_stuff): Adjust.
7573 (i386_get_thread_context): Remove current_event parameter. Don't
7574 clear debug_registers_changed nor copy DR values to
7575 debug_reg_state.
7576 (i386_set_thread_context): Delete.
7577 (i386_prepare_to_resume): New function.
7578 (i386_thread_added): Mark the thread as needing to update irs
7579 debug registers.
7580 (the_low_target): Remove i386_set_thread_context and install
7581 i386_prepare_to_resume.
7582 * win32-low.c (win32_get_thread_context): Adjust.
7583 (win32_set_thread_context): Use SetThreadContext
7584 directly.
7585 (win32_prepare_to_resume): New function.
7586 (win32_require_context): New function, factored out from ...
7587 (thread_rec): ... this.
7588 (continue_one_thread): Call win32_prepare_to_resume on each thread
7589 we're about to continue.
7590 (win32_resume): Call win32_prepare_to_resume on the event thread.
7591 * win32-low.h (struct win32_thread_info)
7592 <debug_registers_changed>: New field.
7593 (struct win32_target_ops): Change prototype of set_thread_context,
7594 delete set_thread_context and add prepare_to_resume.
7595 (win32_require_context): New declaration.
7596
a442d071
GB
75972014-10-08 Gary Benson <gbenson@redhat.com>
7598
7599 * server.h: Do not include common-exceptions.h.
7600
6f1947e8
GB
76012014-10-08 Gary Benson <gbenson@redhat.com>
7602
7603 * server.h: Do not include cleanups.h.
7604
63b434a4
JH
76052014-09-30 James Hogan <james.hogan@imgtec.com>
7606
7607 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7608 mips64-dsp-linux.c.
7609
c4d9ceb6
YQ
76102014-09-23 Yao Qi <yao@codesourcery.com>
7611
7612 * linux-low.c (lp_status_maybe_breakpoint): New function.
7613 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7614 (count_events_callback): Likewise.
7615 (select_event_lwp_callback): Likewise.
7616 (cancel_breakpoints_callback): Likewise.
7617
89a5711c
DB
76182014-09-19 Don Breazeal <donb@codesourcery.com>
7619
7620 * linux-low.c (handle_extended_wait): Call
7621 linux_ptrace_get_extended_event.
7622 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7623 linux_is_extended_waitstatus.
7624
bffc0964
JB
76252014-09-16 Joel Brobecker <brobecker@adacore.com>
7626
7627 * Makefile.in (CPPFLAGS): Define.
7628 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7629 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7630
0bfdf32f
GB
76312014-09-16 Gary Benson <gbenson@redhat.com>
7632
7633 * inferiors.h (current_inferior): Renamed as...
7634 (current_thread): New variable. All uses updated.
7635 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7636 (maybe_move_out_of_jump_pad): Likewise.
7637 (cancel_breakpoint): Likewise.
7638 (linux_low_filter_event): Likewise.
7639 (wait_for_sigstop): Likewise.
7640 (linux_resume_one_lwp): Likewise.
7641 (need_step_over_p): Likewise.
7642 (start_step_over): Likewise.
7643 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7644 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7645 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7646 and save_inferior as saved_thread.
7647 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7648 saved_thread.
7649 (regcache_invalidate_thread): Likewise.
7650 * remote-utils.c (prepare_resume_reply): Likewise.
7651 * thread-db.c (thread_db_get_tls_address): Likewise.
7652 (disable_thread_event_reporting): Likewise.
7653 (remove_thread_event_breakpoints): Likewise.
7654 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7655 as saved_thread.
7656 * target.h (set_desired_inferior): Renamed as...
7657 (set_desired_thread): New declaration. All uses updated.
7658 * server.c (myresume): Updated comment to reference thread instead
7659 of inferior.
7660 (handle_serial_event): Likewise.
7661 (handle_target_event): Likewise.
7662
361c8ade
GB
76632014-09-12 Tom Tromey <tromey@redhat.com>
7664 Gary Benson <gbenson@redhat.com>
7665
7666 * regcache.h: Include common-regcache.h.
7667 (regcache_read_pc): Don't declare.
7668 * regcache.c (get_thread_regcache_for_ptid): New function.
7669
bd9269f7
GB
76702014-09-11 Tom Tromey <tromey@redhat.com>
7671 Gary Benson <gbenson@redhat.com>
7672
7673 * symbol.c: New file.
7674 * Makefile.in (SFILES): Add symbol.c.
7675 (OBS): Add symbol.o.
7676
f8c1d06b
GB
76772014-09-11 Gary Benson <gbenson@redhat.com>
7678
7679 * target.c (target_stop_ptid, target_continue_ptid): New
7680 functions.
7681
721ec300
GB
76822014-09-11 Tom Tromey <tromey@redhat.com>
7683 Gary Benson <gbenson@redhat.com>
7684
7685 * target.h: Include target/target.h.
7686 * target.c (target_read_memory, target_read_uint32)
7687 (target_write_memory): New functions.
7688
c5e92cca
GB
76892014-09-11 Gary Benson <gbenson@redhat.com>
7690
7691 * server.h (debug_hw_points): Don't declare.
7692 * server.c (debug_hw_points): Don't define. Replace all uses
7693 with show_debug_regs.
7694 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7695 all uses with show_debug_regs.
7696
2e4bb98a
EBM
76972014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7698
7699 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7700 endianness into account.
7701 (ppc_supply_ptrace_register): Likewise.
7702
ac740bc7
JH
77032014-09-03 James Hogan <james.hogan@imgtec.com>
7704
7705 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7706 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7707
97ea6506
GB
77082014-09-03 Gary Benson <gbenson@redhat.com>
7709
7710 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7711 ALL_DEBUG_ADDRESS_REGISTERS.
7712
df7e5265
GB
77132014-09-02 Gary Benson <gbenson@redhat.com>
7714
7715 * i386-low.h: Renamed as...
7716 * x86-low.h: New file. All type, function and variable name
7717 prefixes changed from "i386_" to "x86_". All references updated.
7718 * i386-low.c: Renamed as...
7719 * x86-low.c: New file. All type, function and variable name
7720 prefixes changed from "i386_" to "x86_". All references updated.
7721
ed859da7
GB
77222014-09-02 Gary Benson <gbenson@redhat.com>
7723
7724 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7725 (x86_linux_new_thread): Likewise.
7726
860789c7
GB
77272014-08-29 Gary Benson <gbenson@redhat.com>
7728
7729 * server.h (setjmp.h): Do not include.
7730 (toplevel): Do not declare.
7731 (common-exceptions.h): Include.
7732 (cleanups.h): Likewise.
7733 * server.c (toplevel): Do not define.
7734 (exit_code): New static global.
7735 (detach_or_kill_for_exit_cleanup): New function.
7736 (main): New function. Original main renamed to...
7737 (captured_main): New function.
7738 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7739
ff55e1b5
GB
77402014-08-29 Gary Benson <gbenson@redhat.com>
7741
7742 * Makefile.in (SFILES): Add common/common-exceptions.c.
7743 (OBS): Add common-exceptions.o.
7744 (common-exceptions.o): New rule.
7745 * utils.c (prepare_to_throw_exception): New function.
7746
e9bcb658
GB
77472014-08-29 Gary Benson <gbenson@redhat.com>
7748
7749 * config.in: Regenerate.
7750 * configure: Likewise.
7751
e3180625
GB
77522014-08-29 Gary Benson <gbenson@redhat.com>
7753
7754 * Makefile.in (SFILES): Add common/cleanups.c.
7755 (OBS): cleanups.o.
7756 (cleanups.o): New rule.
7757
e3d6ba5d
GB
77582014-08-29 Gary Benson <gbenson@redhat.com>
7759
7760 * utils.c (internal_vwarning): New function.
7761
7096e886
GB
77622014-08-28 Gary Benson <gbenson@redhat.com>
7763
7764 * utils.h (fatal): Remove declaration.
7765 * utils.c (fatal): Remove function.
7766
14ce3192
GB
77672014-08-28 Gary Benson <gbenson@redhat.com>
7768
7769 * tracepoint.c (gdb_agent_init): Replace fatal with
7770 perror_with_name.
7771 (initialize_tracepoint): Likewise.
7772
50278d59
GB
77732014-08-28 Gary Benson <gbenson@redhat.com>
7774
7775 * remote-utils.c (remote_prepare): Replace fatal with error.
7776
aa96c426
GB
77772014-08-28 Gary Benson <gbenson@redhat.com>
7778
7779 * linux-low.c (linux_async): Replace fatal with warning.
7780 Tidy up and return.
7781 (linux_start_non_stop): Return -1 if linux_async failed.
7782
f7160e97
GB
77832014-08-28 Gary Benson <gbenson@redhat.com>
7784
7785 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7786 gdb_assert.
7787 (i386_dr_low_get_addr): Remove vague comment.
7788 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7789 gdb_assert.
7790
38e08fca
GB
77912014-08-28 Gary Benson <gbenson@redhat.com>
7792
7793 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7794 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7795 internal_error.
7796 (linux_resume_one_lwp): Likewise.
7797 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7798 gdb_assert.
7799 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7800 with internal_error.
7801 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7802 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7803 (find_register_by_name): Replace fatal with internal_error.
7804 (find_regno): Likewise.
7805 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7806 * thread-db.c (thread_db_create_event): Likewise.
7807 (thread_db_load_search): Likewise.
7808 (try_thread_db_load_1): Likewise.
7809 * tracepoint.c (get_jump_space_head): Replace fatal with
7810 internal_error.
7811 (claim_trampoline_space): Likewise.
7812 (have_fast_tracepoint_trampoline_buffer): Likewise.
7813 (cmd_qtstart): Likewise.
7814 (stop_tracing): Likewise.
7815 (fast_tracepoint_collecting): Likewise.
7816 (target_malloc): Likewise.
7817 (download_tracepoint): Likewise.
7818 (download_trace_state_variables): Replace check with gdb_assert.
7819 (upload_fast_traceframes): Replace fatal with internal_error.
7820
34abf635
GB
78212014-08-19 Tom Tromey <tromey@redhat.com>
7822 Gary Benson <gbenson@redhat.com>
7823
7824 * Makefile.in (SFILES): Add common/common-debug.c.
7825 (OBS): Add common-debug.o.
7826 (common-debug.o): New rule.
7827 * debug.h (debug_printf): Don't declare.
7828 * debug.c (debug_printf): Renamed and rewritten as...
7829 (debug_vprintf): New function.
7830
f6e94d78
GB
78312014-08-19 Gary Benson <gbenson@redhat.com>
7832
7833 * utils.h: Do not include print-utils.h.
7834
9239eeab
GB
78352014-08-19 Tom Tromey <tromey@redhat.com>
7836 Gary Benson <gbenson@redhat.com>
7837
7838 * server.h: Add static assertion.
7839 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7840
ef87c8bb
GB
78412014-08-19 Tom Tromey <tromey@redhat.com>
7842 Gary Benson <gbenson@redhat.com>
7843
7844 * Makefile.in (SFILES): Add common/errors.c.
7845 (OBS): Add errors.o.
7846 (IPA_OBS): Add errors-ipa.o.
7847 (errors.o): New rule.
7848 (errors-ipa.o): Likewise.
7849 * utils.h (perror_with_name, error, warning): Don't declare.
7850 * utils.c (warning): Renamed and rewritten as...
7851 (vwarning): New function.
7852 (error): Renamed and rewritten as...
7853 (verror): New function.
7854 (internal_error): Renamed and rewritten as...
7855 (internal_verror): New function.
7856
bb974a24
GB
78572014-08-07 Gary Benson <gbenson@redhat.com>
7858
7859 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7860 * configure: Regenerate.
7861 * config.in: Likewise.
7862 * server.h: Do not include errno.h.
7863 * event-loop.c: Likewise.
7864 * hostio-errno.c: Likewise.
7865 * linux-low.c: Likewise.
7866 * remote-utils.c: Likewise.
7867 * spu-low.c: Likewise.
7868 * utils.c: Likewise.
7869 * gdbreplay.c: Unconditionally include errno.h.
7870
6d3d12eb
GB
78712014-08-07 Gary Benson <gbenson@redhat.com>
7872
7873 * server.h: Do not include string.h.
7874 * event-loop.c: Likewise.
7875 * linux-low.c: Likewise.
7876 * regcache.c: Likewise.
7877 * remote-utils.c: Likewise.
7878 * spu-low.c: Likewise.
7879 * utils.c: Likewise.
7880
dccbb609
GB
78812014-08-07 Gary Benson <gbenson@redhat.com>
7882
7883 * server.h: Do not include gdb_assert.h.
7884
e76df0d0
GB
78852014-08-07 Gary Benson <gbenson@redhat.com>
7886
7887 * server.h: Do not include common-utils.h.
7888
4cb9c816
GB
78892014-08-07 Gary Benson <gbenson@redhat.com>
7890
7891 * server.h: Do not include ptid.h.
7892 * notif.h: Likewise.
7893
3995eeee
GB
78942014-08-07 Gary Benson <gbenson@redhat.com>
7895
7896 * server.h: Do not include gdb_locale.h.
7897
cb9f1a9b
GB
78982014-08-07 Gary Benson <gbenson@redhat.com>
7899
7900 * server.h: Do not include gdb/signals.h.
7901 * win32-low.c: Likewise.
7902
a5fceff8
GB
79032014-08-07 Gary Benson <gbenson@redhat.com>
7904
7905 * server.h: Do not include pathmax.h.
7906
b9391142
GB
79072014-08-07 Gary Benson <gbenson@redhat.com>
7908
7909 * server.h: Do not include libiberty.h.
7910 * linux-bfin-low.c: Likewise.
7911
0e443c87
GB
79122014-08-07 Gary Benson <gbenson@redhat.com>
7913
7914 * server.h: Do not include ansidecl.h.
7915
8ebb3f56
GB
79162014-08-07 Gary Benson <gbenson@redhat.com>
7917
7918 * linux-x86-low.c: Do not include stddef.h.
7919 * lynx-ppc-low.c: Likewise.
7920 * tracepoint.c: Likewise.
7921
8980bdf6
GB
79222014-08-07 Gary Benson <gbenson@redhat.com>
7923
7924 * server.h: Do not include stdarg.h.
7925 * nto-low.c: Likewise.
7926
d7096f71
GB
79272014-08-07 Gary Benson <gbenson@redhat.com>
7928
7929 * server.h: Do not include stdlib.h.
7930 * inferiors.c: Likewise.
7931 * linux-low.c: Likewise.
7932 * regcache.c: Likewise.
7933 * spu-low.c: Likewise.
7934 * tracepoint.c: Likewise.
7935 * utils.c: Likewise.
7936
d02f550d
GB
79372014-08-07 Gary Benson <gbenson@redhat.com>
7938
7939 * server.h: Do not include stdio.h.
7940 * linux-low.c: Likewise.
7941 * remote-utils.c: Likewise.
7942 * spu-low.c: Likewise.
7943 * utils.c: Likewise.
7944 * wincecompat.c: Likewise.
7945
87f6c4e3
GB
79462014-08-06 Gary Benson <gbenson@redhat.com>
7947
7948 * regcache.c (init_register_cache): Move conditionals inside if.
7949
7089dca4
GB
79502014-08-06 Gary Benson <gbenson@redhat.com>
7951
7952 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7953
462f517e
GB
79542014-07-31 Gary Benson <gbenson@redhat.com>
7955
7956 * ax.h: Do not include server.h.
7957 * gdbthread.h: Likewise.
7958 * lynx-low.h: Likewise.
7959 * notif.h: Likewise.
7960
976411d6
GB
79612014-07-30 Gary Benson <gbenson@redhat.com>
7962
7963 * server.h: Include common-defs.h.
7964 Do not include config.h or build-gnulib-gdbserver/config.h.
7965
d41f6d8e
GB
79662014-07-30 Gary Benson <gbenson@redhat.com>
7967
7968 * hostio-errno.c: Move server.h to top of includes list.
7969 * inferiors.c: Likewise.
7970 * linux-x86-low.c: Likewise.
7971 * notif.c: Include server.h.
7972
314c6a35
TT
79732014-07-24 Tom Tromey <tromey@redhat.com>
7974 Gary Benson <gbenson@redhat.com>
7975
7976 * server.h (CORE_ADDR): Now unsigned.
7977
69ff6be5
PA
79782014-07-16 Pedro Alves <palves@redhat.com>
7979
7980 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7981
ce9e3fe7
PA
79822014-07-15 Pedro Alves <palves@redhat.com>
7983
7984 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7985 copy.
7986
e76126e8
PA
79872014-07-11 Pedro Alves <palves@redhat.com>
7988
7989 * linux-low.c (kill_wait_lwp): New function, based on
7990 kill_one_lwp_callback, but use my_waitpid directly.
7991 (kill_one_lwp_callback, linux_kill): Use it.
7992
8e9db26e
PA
79932014-06-23 Pedro Alves <palves@redhat.com>
7994
7995 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7996 before setting DR0..DR3.
7997
698b3e08
GB
79982014-06-20 Gary Benson <gbenson@redhat.com>
7999
8000 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8001 * configure: Regenerated.
8002 * config.in: Likewise.
8003
125f8a3d
GB
80042014-06-20 Gary Benson <gbenson@redhat.com>
8005
8006 * Makefile.in (SFILES): Update locations for files moved
8007 from common to nat.
8008 (object file files): Reordered.
8009
42995dbd
GB
80102014-06-20 Gary Benson <gbenson@redhat.com>
8011
8012 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8013 (i386_dr_low_set_addr): Likewise.
8014 (i386_dr_low_get_addr): Likewise.
8015 (i386_dr_low_can_set_control): Likewise.
8016 (i386_dr_low_set_control): Likewise.
8017 (i386_dr_low_get_control): Likewise.
8018 (i386_dr_low_get_status): Likewise.
8019 (i386_get_debug_register_length): Likewise.
8020 * linux-x86-low.c (i386_dr_low_set_addr):
8021 Changed signature. Made static.
8022 (i386_dr_low_get_addr): Likewise.
8023 (i386_dr_low_set_control): Likewise.
8024 (i386_dr_low_get_control): Likewise.
8025 (i386_dr_low_get_status): Likewise.
8026 (i386_dr_low): New global variable.
8027 * win32-i386-low.c (i386_dr_low_set_addr):
8028 Changed signature. Made static.
8029 (i386_dr_low_get_addr): Likewise.
8030 (i386_dr_low_set_control): Likewise.
8031 (i386_dr_low_get_control): Likewise.
8032 (i386_dr_low_get_status): Likewise.
8033 (i386_dr_low): New global variable.
8034
e1d2394b
MS
80352014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8036
8037 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8038 * Makefile.in (AR, AR_FLAGS): Define.
8039 * configure: Regenerate.
8040
3a8ee006
GB
80412014-06-19 Gary Benson <gbenson@redhat.com>
8042
8043 * Makefile.in (i386-dregs.o): New rule.
8044 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8045 * i386-low.c (target.h): Remove include.
8046 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8047 (DR_CONTROL_SHIFT): Likewise.
8048 (DR_CONTROL_SIZE): Likewise.
8049 (DR_RW_EXECUTE): Likewise.
8050 (DR_RW_WRITE): Likewise.
8051 (DR_RW_READ): Likewise.
8052 (DR_RW_IORW): Likewise.
8053 (DR_LEN_1): Likewise.
8054 (DR_LEN_2): Likewise.
8055 (DR_LEN_4): Likewise.
8056 (DR_LEN_8): Likewise.
8057 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8058 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8059 (DR_ENABLE_SIZE): Likewise.
8060 (DR_LOCAL_SLOWDOWN): Likewise.
8061 (DR_GLOBAL_SLOWDOWN): Likewise.
8062 (DR_CONTROL_RESERVED): Likewise.
8063 (I386_DR_CONTROL_MASK): Likewise.
8064 (I386_DR_VACANT): Likewise.
8065 (I386_DR_LOCAL_ENABLE): Likewise.
8066 (I386_DR_GLOBAL_ENABLE): Likewise.
8067 (I386_DR_DISABLE): Likewise.
8068 (I386_DR_SET_RW_LEN): Likewise.
8069 (I386_DR_GET_RW_LEN): Likewise.
8070 (I386_DR_WATCH_HIT): Likewise.
8071 (i386_wp_op_t): Likewise.
8072 (i386_show_dr): Likewise.
8073 (i386_length_and_rw_bits): Likewise.
8074 (i386_insert_aligned_watchpoint): Likewise.
8075 (i386_remove_aligned_watchpoint): Likewise.
8076 (i386_handle_nonaligned_watchpoint): Likewise.
8077 i386_update_inferior_debug_regs(): Likewise.
8078 (i386_dr_insert_watchpoint): Likewise.
8079 (i386_dr_remove_watchpoint): Likewise.
8080 (i386_dr_region_ok_for_watchpoint): Likewise.
8081 (i386_dr_stopped_data_address): Likewise.
8082 (i386_dr_stopped_by_watchpoint): Likewise.
8083
8f26655c
GB
80842014-06-19 Gary Benson <gbenson@redhat.com>
8085
8086 * i386-low.c (i386_dr_show): Renamed to
8087 i386_show_dr and made static. All uses updated.
8088 (i386_dr_length_and_rw_bits): Renamed to
8089 i386_length_and_rw_bits and made static.
8090 All uses updated.
8091 (i386_dr_insert_aligned_watchpoint): Renamed to
8092 i386_insert_aligned_watchpoint and made static.
8093 All uses updated.
8094 (i386_dr_remove_aligned_watchpoint): Renamed to
8095 i386_remove_aligned_watchpoint and made static.
8096 All uses updated.
8097 (i386_dr_update_inferior_debug_regs): Renamed to
8098 i386_update_inferior_debug_regs and made static.
8099 All uses updated.
8100
b9228891
GB
81012014-06-18 Gary Benson <gbenson@redhat.com>
8102
5171def3
GB
8103 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8104 (i386_dr_low_can_set_control): Likewise.
8105 (i386_get_debug_register_length): Likewise.
8106 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8107 (i386_dr_low_can_set_control): Likewise.
8108 (i386_get_debug_register_length): Likewise.
8109
81102014-06-17 Gary Benson <gbenson@redhat.com>
8111
b9228891
GB
8112 * i386-low.h (i386-dregs.h): New include.
8113 (DR_FIRSTADDR): Now in i386-dregs.h.
8114 (DR_LASTADDR): Likewise.
8115 (DR_NADDR): Likewise.
8116 (DR_STATUS): Likewise.
8117 (DR_CONTROL): Likewise.
8118 (i386_debug_reg_state): Likewise.
8119 (i386_dr_insert_watchpoint): Likewise.
8120 (i386_dr_remove_watchpoint): Likewise.
8121 (i386_dr_region_ok_for_watchpoint): Likewise.
8122 (i386_dr_stopped_data_address): Likewise.
8123 (i386_dr_stopped_by_watchpoint): Likewise.
8124 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8125
4be83cc2
GB
81262014-06-18 Gary Benson <gbenson@redhat.com>
8127
8128 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8129 i386_dr_insert_watchpoint.
8130 (i386_low_remove_watchpoint): Renamed to
8131 i386_dr_remove_watchpoint.
8132 (i386_low_region_ok_for_watchpoint): Renamed to
8133 i386_dr_region_ok_for_watchpoint.
8134 (i386_low_stopped_data_address): Renamed to
8135 i386_dr_stopped_data_address.
8136 (i386_low_stopped_by_watchpoint): Renamed to
8137 i386_dr_stopped_by_watchpoint.
8138 * i386-low.c (i386_show_dr): Renamed to
8139 i386_dr_show and made nonstatic. All uses updated.
8140 (i386_length_and_rw_bits): Renamed to
8141 i386_dr_length_and_rw_bits and made nonstatic.
8142 All uses updated.
8143 (i386_insert_aligned_watchpoint): Renamed to
8144 i386_dr_insert_aligned_watchpoint and made nonstatic.
8145 All uses updated.
8146 (i386_remove_aligned_watchpoint): Renamed to
8147 i386_dr_remove_aligned_watchpoint and made nonstatic.
8148 All uses updated.
8149 (i386_update_inferior_debug_regs): Renamed to
8150 i386_dr_update_inferior_debug_regs and made nonstatic.
8151 All uses updated.
8152 (i386_low_insert_watchpoint): Renamed to
8153 i386_dr_insert_watchpoint. All uses updated.
8154 (i386_low_remove_watchpoint): Renamed to
8155 i386_dr_remove_watchpoint. All uses updated.
8156 (i386_low_region_ok_for_watchpoint): Renamed to
8157 i386_dr_region_ok_for_watchpoint. All uses updated.
8158 (i386_low_stopped_data_address): Renamed to
8159 i386_dr_stopped_data_address. All uses updated.
8160 (i386_low_stopped_by_watchpoint): Renamed to
8161 i386_dr_stopped_by_watchpoint. All uses updated.
8162
131aa0d4
GB
81632014-06-18 Gary Benson <gbenson@redhat.com>
8164
8165 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8166 (i386_dr_low_can_set_control): Likewise.
8167 (i386_insert_aligned_watchpoint): New check.
8168
d9305f7f
GB
81692014-06-18 Gary Benson <gbenson@redhat.com>
8170
8171 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8172 Renamed to state.
8173
e927c9fc
GB
81742014-06-18 Gary Benson <gbenson@redhat.com>
8175
8176 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8177 instead of fatal and error.
8178 (i386_handle_nonaligned_watchpoint): Likewise.
8179
1b6d4134
GB
81802014-06-18 Gary Benson <gbenson@redhat.com>
8181
8182 * i386-low.c (i386_get_debug_register_length): New macro.
8183 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8184 (i386_show_dr): Use debug_printf instead of fprintf. Use
8185 phex to format values.
8186
6e62758f
GB
81872014-06-18 Gary Benson <gbenson@redhat.com>
8188
8189 * i386-low.h: Comment changes.
8190 * i386-low.c: Likewise.
8191
fc6e2f03
GB
81922014-06-18 Gary Benson <gbenson@redhat.com>
8193
8194 * i386-low.c: Whitespace changes.
8195
f9d1eeed
TT
81962014-06-12 Tom Tromey <tromey@redhat.com>
8197
8198 * utils.c (freeargv): Remove.
8199
0b04e523
TT
82002014-06-12 Tom Tromey <tromey@redhat.com>
8201
8202 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8203 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8204 (parse_debug_format_options): Likewise.
8205 (gdbserver_usage): Likewise.
8206 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8207 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8208 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8209 against libiberty.
8210 ($(LIBGNU)): Depend on libiberty.
8211 (all-lib): Recurse into all subdirs.
8212 (install-only): Invoke "install" target in subdirs.
8213 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8214 targets.
8215 * configure: Rebuild.
8216 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8217 for vasprintf, vsnprintf, or gettimeofday.
8218 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8219 srv_tgtobj.
8220
270c9937
JB
82212014-06-05 Joel Brobecker <brobecker@adacore.com>
8222
8223 * development.sh: Delete.
8224 * Makefile.in (config.status): Adjust dependency on development.sh.
8225 * configure.ac: Adjust development.sh source call.
8226 * configure: Regenerate.
8227
0a261ed8
PA
82282014-06-02 Pedro Alves <palves@redhat.com>
8229
8230 * ax.c (gdb_free_agent_expr): New function.
8231 * ax.h (gdb_free_agent_expr): New declaration.
8232 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8233 list.
8234 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8235 static.
8236 (clear_breakpoint_conditions_and_commands): New function.
8237 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8238 (clear_breakpoint_conditions_and_commands): New declaration.
8239
e9dae05e
RR
82402014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8241
8242 * linux-aarch64-low.c (asm/ptrace.h): Include.
8243
5876f503
JK
82442014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8245
8246 Fix TLS access for -static -pthread.
8247 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8248 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8249 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8250
802e8e6d
PA
82512014-05-20 Pedro Alves <palves@redhat.com>
8252
8253 * linux-aarch64-low.c (aarch64_insert_point)
8254 (aarch64_remove_point): No longer check whether the type is
8255 supported here. Adjust to new interface.
8256 (the_low_target): Install aarch64_supports_z_point_type as
8257 supports_z_point_type method.
8258 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8259 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8260 instead of a Z packet char. Adjust.
8261 (arm_supports_z_point_type): New function.
8262 (arm_insert_point, arm_remove_point): Adjust to new interface.
8263 (the_low_target): Install arm_supports_z_point_type.
8264 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8265 (cris_insert_point, cris_remove_point): Adjust to new interface.
8266 Don't check whether the type is supported here.
8267 (the_low_target): Install cris_supports_z_point_type.
8268 * linux-low.c (linux_supports_z_point_type): New function.
8269 (linux_insert_point, linux_remove_point): Adjust to new interface.
8270 * linux-low.h (struct linux_target_ops) <insert_point,
8271 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8272 raw_breakpoint pointer parameter.
8273 <supports_z_point_type>: New method.
8274 * linux-mips-low.c (mips_supports_z_point_type): New function.
8275 (mips_insert_point, mips_remove_point): Adjust to new interface.
8276 Use mips_supports_z_point_type.
8277 (the_low_target): Install mips_supports_z_point_type.
8278 * linux-ppc-low.c (the_low_target): Install NULL as
8279 supports_z_point_type method.
8280 * linux-s390-low.c (the_low_target): Install NULL as
8281 supports_z_point_type method.
8282 * linux-sparc-low.c (the_low_target): Install NULL as
8283 supports_z_point_type method.
8284 * linux-x86-low.c (x86_supports_z_point_type): New function.
8285 (x86_insert_point): Adjust to new insert_point interface. Use
8286 insert_memory_breakpoint. Adjust to new
8287 i386_low_insert_watchpoint interface.
8288 (x86_remove_point): Adjust to remove_point interface. Use
8289 remove_memory_breakpoint. Adjust to new
8290 i386_low_remove_watchpoint interface.
8291 (the_low_target): Install x86_supports_z_point_type.
8292 * lynx-low.c (lynx_target_ops): Install NULL as
8293 supports_z_point_type callback.
8294 * nto-low.c (nto_supports_z_point_type): New.
8295 (nto_insert_point, nto_remove_point): Adjust to new interface.
8296 (nto_target_ops): Install nto_supports_z_point_type.
8297 * mem-break.c: Adjust intro comment.
8298 (struct raw_breakpoint) <raw_type, size>: New fields.
8299 <inserted>: Update comment.
8300 <shlib_disabled>: Delete field.
8301 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8302 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8303 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8304 (raw_bkpt_type_to_target_hw_bp_type): New function.
8305 (find_enabled_raw_code_breakpoint_at): New function.
8306 (find_raw_breakpoint_at): New type and size parameters. Use them.
8307 (insert_memory_breakpoint): New function, based off
8308 set_raw_breakpoint_at.
8309 (remove_memory_breakpoint): New function.
8310 (set_raw_breakpoint_at): Reimplement.
8311 (set_breakpoint): New, based on set_breakpoint_at.
8312 (set_breakpoint_at): Reimplement.
8313 (delete_raw_breakpoint): Go through the_target->remove_point
8314 instead of assuming memory breakpoints.
8315 (find_gdb_breakpoint_at): Delete.
8316 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8317 (find_gdb_breakpoint): New function.
8318 (set_gdb_breakpoint_at): Delete.
8319 (z_type_supported): New function.
8320 (set_gdb_breakpoint_1): New function, loosely based off
8321 set_gdb_breakpoint_at.
8322 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8323 (delete_gdb_breakpoint_at): Delete.
8324 (delete_gdb_breakpoint_1): New function, loosely based off
8325 delete_gdb_breakpoint_at.
8326 (delete_gdb_breakpoint): New function.
8327 (clear_gdb_breakpoint_conditions): Rename to ...
8328 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8329 breakpoint.
8330 (add_condition_to_breakpoint): Make static.
8331 (add_breakpoint_condition): Take a struct breakpoint pointer
8332 instead of an address. Adjust.
8333 (gdb_condition_true_at_breakpoint): Rename to ...
8334 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8335 z_type parameter.
8336 (gdb_condition_true_at_breakpoint): Reimplement.
8337 (add_breakpoint_commands): Take a struct breakpoint pointer
8338 instead of an address. Adjust.
8339 (gdb_no_commands_at_breakpoint): Rename to ...
8340 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8341 parameter. Return true if no breakpoint was found. Change debug
8342 output.
8343 (gdb_no_commands_at_breakpoint): Reimplement.
8344 (run_breakpoint_commands): Rename to ...
8345 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8346 and change return type to boolean.
8347 (run_breakpoint_commands): New function.
8348 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8349 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8350 breakpoint. Go through the_target->remove_point instead of
8351 assuming memory breakpoint.
8352 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8353 software and hardware breakpoints.
8354 (reinsert_raw_breakpoint): Go through the_target->insert_point
8355 instead of assuming memory breakpoint.
8356 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8357 software and hardware breakpoints.
8358 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8359 Check both software and hardware breakpoints.
8360 (validate_inserted_breakpoint): Assert the breakpoint is a
8361 software breakpoint. Set the inserted flag to -1 instead of
8362 setting shlib_disabled.
8363 (delete_disabled_breakpoints): Adjust.
8364 (validate_breakpoints): Only validate software breakpoints.
8365 Adjust to inserted flag change.
8366 (check_mem_read, check_mem_write): Skip breakpoint types other
8367 than software breakpoints. Adjust to inserted flag change.
8368 * mem-break.h (enum raw_bkpt_type): New enum.
8369 (raw_breakpoint, struct process_info): Forward declare.
8370 (Z_packet_to_target_hw_bp_type): Delete declaration.
8371 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8372 (set_gdb_breakpoint, delete_gdb_breakpoint)
8373 (clear_breakpoint_conditions): New declarations.
8374 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8375 (breakpoint_inserted_here): Update comment.
8376 (add_breakpoint_condition, add_breakpoint_commands): Replace
8377 address parameter with a breakpoint pointer parameter.
8378 (gdb_breakpoint_here): Update comment.
8379 (delete_gdb_breakpoint_at): Delete.
8380 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8381 * server.c (process_point_options): Take a struct breakpoint
8382 pointer instead of an address. Adjust.
8383 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8384 delete_gdb_breakpoint.
8385 * spu-low.c (spu_target_ops): Install NULL as
8386 supports_z_point_type method.
8387 * target.h: Include mem-break.h.
8388 (struct target_ops) <prepare_to_access_memory>: Update comment.
8389 <supports_z_point_type>: New field.
8390 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8391 instead of a char. Also take a raw breakpoint pointer.
8392 * win32-arm-low.c (the_low_target): Install NULL as
8393 supports_z_point_type.
8394 * win32-i386-low.c (i386_supports_z_point_type): New function.
8395 (i386_insert_point, i386_remove_point): Adjust to new interface.
8396 (the_low_target): Install i386_supports_z_point_type.
8397 * win32-low.c (win32_supports_z_point_type): New function.
8398 (win32_insert_point, win32_remove_point): Adjust to new interface.
8399 (win32_target_ops): Install win32_supports_z_point_type.
8400 * win32-low.h (struct win32_target_ops):
8401 <supports_z_point_type>: New method.
8402 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8403 instead of a char. Also take a raw breakpoint pointer.
8404
932539e3
PA
84052014-05-20 Pedro Alves <palves@redhat.com>
8406
8407 * mem-break.h: Include break-common.h.
8408 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8409 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8410 (Z_packet_to_target_hw_bp_type): New declaration.
8411 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8412 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8413 (Z_PACKET_ACCESS_WP): Delete macros.
8414 (Z_packet_to_hw_type): Delete function.
8415 * i386-low.h: Don't include break-common.h here.
8416 (Z_packet_to_hw_type): Delete declaration.
8417 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8418 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8419 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8420 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8421 * linux-aarch64-low.c: Don't include break-common.h here.
8422 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8423 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8424 (Z_packet_to_target_hw_bp_type): Delete function.
8425 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8426 function.
8427 (mips_insert_point, mips_remove_point): Use
8428 Z_packet_to_target_hw_bp_type.
8429
4ff0d3d8
PA
84302014-05-20 Pedro Alves <palves@redhat.com>
8431
8432 * linux-aarch64-low.c: Include break-common.h.
8433 (enum target_point_type): Delete.
8434 (Z_packet_to_point_type): Rename to ...
8435 (Z_packet_to_target_hw_bp_type): ... this, and return a
8436 target_hw_bp_type instead.
8437 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8438 instead of an enum target_point_type.
8439 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8440 breakpoint type.
8441 (aarch64_dr_state_insert_one_point)
8442 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8443 (aarch64_handle_aligned_watchpoint)
8444 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8445 Take an enum target_hw_bp_type instead of an enum
8446 target_point_type.
8447 (aarch64_supports_z_point_type): New function.
8448 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8449 use Z_packet_to_target_hw_bp_type.
8450
786dc519
JB
84512014-05-20 Joel Brobecker <brobecker@adacore.com>
8452
8453 * configure.ac: Only use -Werror by default when DEVELOPMENT
8454 is true.
8455 * configure: Regenerate.
8456
9e0aa64f
JK
84572014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8458
8459 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8460 * linux-x86-low.c (X86_64_USER_REGS): New.
8461 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8462
2b577b92
YQ
84632014-04-28 Yao Qi <yao@codesourcery.com>
8464
8465 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8466 name.
8467
94611da2
PA
84682014-04-25 Pedro Alves <palves@redhat.com>
8469
8470 PR server/16255
8471 * linux-low.c (linux_attach_fail_reason_string): New function.
8472 (linux_attach_lwp): Delete.
8473 (linux_attach_lwp_1): Rename to ...
8474 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8475 argument. Remove "initial" parameter. Return int instead of
8476 void. Don't error or warn here.
8477 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8478 failure to attach to the tgid. Call warning when failing to
8479 attach to an lwp.
8480 * linux-low.h (linux_attach_lwp): 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_fail_reason_string): New declaration.
8484 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8485 interface change. Use linux_attach_fail_reason_string.
8486
01f9f808
MS
84872014-04-24 Michael Sturm <michael.sturm@mintel.com>
8488 Walfred Tedeschi <walfred.tedeschi@intel.com>
8489
8490 * Makefile.in: Added rules to handle new files
8491 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8492 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8493 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8494 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8495 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8496 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8497 x32-avx512-linux.o.
8498 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8499 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8500 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8501 i386/x32-avx512.xml.
8502 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8503 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8504 i386/x32-avx512-linux.xml.
8505 * i387-fp.c (num_avx512_k_registers): New constant for number
8506 of K registers.
8507 (num_avx512_zmmh_low_registers): New constant for number of
8508 lower ZMM registers (0-15).
8509 (num_avx512_zmmh_high_registers): New constant for number of
8510 higher ZMM registers (16-31).
8511 (num_avx512_ymmh_registers): New contant for number of higher
8512 YMM registers (ymm16-31 added by avx521 on x86_64).
8513 (num_avx512_xmm_registers): New constant for number of higher
8514 XMM registers (xmm16-31 added by AVX512 on x86_64).
8515 (struct i387_xsave): Add space for AVX512 registers.
8516 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8517 Add code to handle AVX512 registers.
8518 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8519 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8520 prototypei from generated file.
8521 (tdesc_amd64_avx512_linux): Likewise.
8522 (init_registers_x32_avx512_linux): Likewise.
8523 (tdesc_x32_avx512_linux): Likewise.
8524 (init_registers_i386_avx512_linux): Likewise.
8525 (tdesc_i386_avx512_linux): Likewise.
8526 (x86_64_regmap): Add AVX512 registers.
8527 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8528 mask.
8529 (initialize_low_arch): Add code to initialize AVX512 registers.
8530
51aa91f9
PA
85312014-04-23 Pedro Alves <palves@redhat.com>
8532
8533 * mem-break.c (find_gdb_breakpoint_at): Make static.
8534 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8535
a4165e94
PA
85362014-04-23 Pedro Alves <palves@redhat.com>
8537
8538 * i386-low.c: Don't include break-common.h here.
8539 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8540 prototype to take target_hw_bp_type as argument instead of a Z
8541 packet char.
8542 * i386-low.h: Include break-common.h here.
8543 (Z_packet_to_hw_type): Declare.
8544 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8545 prototypes.
8546 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8547 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8548 (x86_remove_point): Convert the packet number to a
8549 target_hw_bp_type before calling i386_low_remove_watchpoint.
8550 * win32-i386-low.c (i386_insert_point): Convert the packet number
8551 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8552 (i386_remove_point): Convert the packet number to a
8553 target_hw_bp_type before calling i386_low_remove_watchpoint.
8554
b8acf843
PA
85552014-04-23 Pedro Alves <palves@redhat.com>
8556
8557 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8558
d708bcd1
PA
85592014-04-10 Pedro Alves <palves@redhat.com>
8560
8561 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8562 Check if the condition or command is NULL before checking if the
8563 breakpoint is known. On success, return true.
8564 * mem-break.h (add_breakpoint_condition): Document return.
8565 (add_breakpoint_commands): Add describing comment.
8566 * server.c (skip_to_semicolon): New function.
8567 (process_point_options): Use it.
8568
2eec7d5b
PA
85692014-04-09 Pedro Alves <palves@redhat.com>
8570
8571 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8572 to lwpid_of.
8573
fa96cb38
PA
85742014-02-27 Pedro Alves <palves@redhat.com>
8575
8576 PR 12702
8577 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8578 macros.
8579 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8580 output.
8581 (last_thread_of_process_p): Take a PID argument instead of a
8582 thread pointer.
8583 (linux_wait_for_lwp): Delete.
8584 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8585 functions.
8586 (linux_low_filter_event): New function, party factored out from
8587 linux_wait_for_event.
8588 (linux_wait_for_event): Rename to ...
8589 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8590 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8591 sigsuspend. Check for zombie leaders.
8592 (linux_wait_for_event): Reimplement as wrapper around
8593 linux_wait_for_event_filtered.
8594 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8595 a normal or signal exit is seen, it's the whole process exiting.
8596 (wait_for_sigstop): No longer a for_each_inferior callback.
8597 Rewrite on top of linux_wait_for_event_filtered.
8598 (stop_all_lwps): Call wait_for_sigstop directly.
8599 * server.c (resume, handle_target_event): Handle
8600 TARGET_WAITKIND_NO_RESUMED.
8601
d763de10
JB
86022014-02-26 Joel Brobecker <brobecker@adacore.com>
8603
8604 * win32-low.c (psapi_get_dll_name,
8605 * win32_CreateToolhelp32Snapshot): Delete.
8606 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8607 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8608 Delete.
8609 (handle_load_dll): Add function description.
8610 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8611
850a0f76
JB
86122014-02-26 Joel Brobecker <brobecker@adacore.com>
8613
8614 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8615 Add comment.
8616 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8617 base address when calling win32_add_one_solib.
8618 (handle_load_dll): Delete local variable load_addr.
8619 Remove 0x1000 offset applied to DLL base address when calling
8620 win32_add_one_solib.
8621 (handle_unload_dll): Add comment.
8622
f25b3fc3
JB
86232014-02-26 Joel Brobecker <brobecker@adacore.com>
8624
8625 * win32-low.c (win32_add_all_dlls): Renames
8626 win32_ensure_ntdll_loaded. Rewrite function documentation.
8627 Adjust implementation to always load all DLLs.
8628 Add 0x1000 offset to DLL base address when calling
8629 win32_add_one_solib.
8630 (child_initialization_done): New static global.
8631 (do_initial_child_stuff): Set child_initialization_done to
8632 zero during child initialization, and 1 after. Replace call
8633 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8634 Add comment.
8635 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8636 (handle_unload_dll): Add function documentation.
8637 (get_child_debug_event): Ignore load and unload DLL events
8638 during child initialization.
8639
d86d4aaf
DE
86402014-02-20 Doug Evans <dje@google.com>
8641
3bc32da3 8642 Remove global all_lwps.
d86d4aaf
DE
8643 * inferiors.h (ptid_of): Move here from linux-low.h.
8644 (pid_of, lwpid_of): Ditto.
8645 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8646 parameter is a struct thread_info * now.
8647 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8648 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8649 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8650 directly.
8651 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8652 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8653 * linux-arm-low.c (update_registers_callback): Update, "entry"
8654 parameter is a struct thread_info * now.
8655 Fetch lwpid from current_inferior directly.
8656 (arm_insert_point): Pass &all_threads to find_inferior instead of
8657 &all_lwps.
8658 (arm_remove_point): Ditto.
8659 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8660 (arm_prepare_to_resume): Fetch pid from thread.
8661 (arm_read_description): Fetch lwpid from current_inferior directly.
8662 * linux-low.c (all_lwps): Delete.
8663 (delete_lwp): Delete call to remove_inferior.
8664 (handle_extended_wait): Fetch lwpid from thread.
8665 (add_lwp): Don't set lwp->entry.id. Remove call to
8666 add_inferior_to_list.
8667 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8668 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8669 (kill_one_lwp_callback): Ditto.
8670 (linux_kill): Don't dereference NULL pointer.
8671 Fetch ptid,lwpid from thread.
8672 (get_detach_signal): Fetch ptid from thread.
8673 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8674 Simplify call to regcache_invalidate_thread.
8675 (delete_lwp_callback): Update, "entry" parameter is a
8676 struct thread_info * now. Fetch pid from thread.
8677 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8678 (status_pending_p_callback): Update, "entry" parameter is a
8679 struct thread_info * now. Fetch ptid from thread.
8680 (find_lwp_pid): Update, "entry" parameter is a
8681 struct thread_info * now.
8682 (linux_wait_for_lwp): Fetch pid from thread.
8683 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8684 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8685 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8686 (dequeue_one_deferred_signal): Ditto.
8687 (cancel_breakpoint): Fetch ptid from current_inferior.
8688 (linux_wait_for_event): Pass &all_threads to find_inferior,
8689 not &all_lwps. Fetch ptid, lwpid from thread.
8690 (count_events_callback): Update, "entry" parameter is a
8691 struct thread_info * now.
8692 (select_singlestep_lwp_callback): Ditto.
8693 (select_event_lwp_callback): Ditto.
8694 (cancel_breakpoints_callback): Ditto.
8695 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8696 not &all_lwps.
8697 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8698 (unsuspend_one_lwp): Update, "entry" parameter is a
8699 struct thread_info * now.
8700 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8701 not &all_lwps.
8702 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8703 Fetch lwpid from thread, not lwp.
8704 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8705 Pass &all_threads to find_inferior, not &all_lwps.
8706 (send_sigstop): Fetch lwpid from thread, not lwp.
8707 (send_sigstop_callback): Update, "entry" parameter is a
8708 struct thread_info * now.
8709 (suspend_and_send_sigstop_callback): Ditto.
8710 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8711 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8712 struct thread_info * now.
8713 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8714 from thread, lwp.
8715 (lwp_running): Update, "entry" parameter is a
8716 struct thread_info * now.
8717 (stop_all_lwps): Fetch ptid from thread.
8718 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8719 (linux_resume_one_lwp): Fetch lwpid from thread.
8720 (linux_set_resume_request): Update, "entry" parameter is a
8721 struct thread_info * now. Fetch pid, lwpid from thread.
8722 (resume_status_pending_p): Update, "entry" parameter is a
8723 struct thread_info * now.
8724 (need_step_over_p): Ditto. Fetch lwpid from thread.
8725 (start_step_over): Fetch lwpid from thread.
8726 (linux_resume_one_thread): Update, "entry" parameter is a
8727 struct thread_info * now. Fetch lwpid from thread.
8728 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8729 (proceed_one_lwp): Update, "entry" parameter is a
8730 struct thread_info * now. Fetch lwpid from thread.
8731 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8732 struct thread_info * now.
8733 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8734 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8735 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8736 directly.
8737 (regsets_store_inferior_registers): Ditto.
8738 (fetch_register, store_register): Ditto.
8739 (linux_read_memory, linux_write_memory): Ditto.
8740 (linux_request_interrupt): Ditto.
8741 (linux_read_auxv): Ditto.
8742 (linux_xfer_siginfo): Ditto.
8743 (linux_qxfer_spu): Ditto.
8744 (linux_qxfer_libraries_svr4): Ditto.
8745 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8746 moved to inferiors.h.
8747 (get_lwp): Delete.
8748 (get_thread_lwp): Update.
8749 (struct lwp_info): Delete member "entry". Simplify comment for
8750 member "thread".
8751 (all_lwps): Delete.
8752 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8753 current_inferior directly.
8754 (update_watch_registers_callback): Update, "entry" parameter is a
8755 struct thread_info * now. Fetch pid from thread.
8756 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8757 (mips_insert_point): Fetch lwpid from current_inferior.
8758 Pass &all_threads to find_inferior, not &all_lwps.
8759 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8760 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8761 directly.
8762 (mips_stopped_data_address): Ditto.
8763 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8764 directly.
8765 * linux-tile-low.c (tile_arch_setup): Ditto.
8766 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8767 (update_debug_registers_callback): Update, "entry" parameter is a
8768 struct thread_info * now. Fetch pid from thread.
8769 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8770 Pass &all_threads to find_inferior, not &all_lwps.
8771 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8772 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8773 Pass &all_threads to find_inferior, not &all_lwps.
8774 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8775 (i386_dr_low_get_status): Ditto.
8776 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8777 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8778 (x86_linux_read_description): Ditto.
8779 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8780
3b8361aa
DE
87812014-02-20 Doug Evans <dje@google.com>
8782
8783 * inferiors.c (get_first_inferior): Fix buglet.
8784
f7667f0d
DE
87852014-02-19 Doug Evans <dje@google.com>
8786
8787 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8788 * inferiors.c (add_thread): Change result type to struct thread_info *.
8789 All callers updated.
8790 (add_lwp): Call add_thread here instead of in callers.
8791 All callers updated.
8792 * linux-low.h (get_lwp_thread): Rewrite.
8793 (struct lwp_info): New member "thread".
8794
b3312d80
DE
87952014-02-19 Doug Evans <dje@google.com>
8796
8797 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8798 All callers updated.
8799
ecc6f45c
DE
88002014-02-19 Doug Evans <dje@google.com>
8801
8802 * inferiors.c (add_thread): Fix whitespace.
8803
649ebbca
DE
88042014-02-19 Doug Evans <dje@google.com>
8805
8806 * dll.c (clear_dlls): Replace accessing list implemention details
8807 with API function.
8808 * gdbthread.h (get_first_thread): Declare.
8809 * inferiors.c (for_each_inferior_with_data): New function.
8810 (get_first_thread): New function.
8811 (find_thread_ptid): Simplify.
8812 (get_first_inferior): New function.
8813 (clear_list): Delete.
8814 (one_inferior_p): New function.
8815 (clear_inferior_list): New function.
8816 (clear_inferiors): Update.
8817 * inferiors.h (for_each_inferior_with_data): Declare.
8818 (clear_inferior_list): Declare.
8819 (one_inferior_p): Declare.
8820 (get_first_inferior): Declare.
8821 * linux-low.c (linux_wait_for_event): Replace accessing list
8822 implemention details with API function.
8823 * server.c (target_running): Ditto.
8824 (accumulate_file_name_length): New function.
8825 (emit_dll_description): New function.
8826 (handle_qxfer_libraries): Replace accessing list implemention
8827 details with API function.
8828 (handle_qxfer_threads_worker): New function.
8829 (handle_qxfer_threads_proper): Replace accessing list implemention
8830 details with API function.
8831 (handle_query): Ditto.
8832 (visit_actioned_threads_callback_ftype): New typedef.
8833 (visit_actioned_threads_data): New struct.
8834 (visit_actioned_threads): Rewrite to be find_inferior callback.
8835 (resume): Call find_inferior.
8836 (handle_status): Replace accessing list implemention
8837 details with API function.
8838 (process_serial_event): Replace accessing list implemention details
8839 with API function.
8840 * target.c (set_desired_inferior): Replace accessing list implemention
8841 details with API function.
8842 * tracepoint.c (same_process_p): New function.
8843 (gdb_agent_about_to_close): Replace accessing list implemention
8844 details with API function.
8845 * win32-low.c (child_delete_thread): Replace accessing list
8846 implemention details with API function.
8847 (match_dll_by_basename): New function.
8848 (dll_is_loaded_by_basename): New function.
8849 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8850 details call to dll_is_loaded_by_basename.
8851
80894984
DE
88522014-02-19 Doug Evans <dje@google.com>
8853
8854 * dll.h (struct dll_info): Add comment.
8855 * gdbthread.h (struct thread_info): Add comment.
8856 (current_ptid): Simplify.
8857 * inferiors.c (add_process): Update.
8858 (remove_process): Update.
8859 * inferiors.h (struct process_info): Rename member "head" to "entry".
8860 * linux-low.c (delete_lwp): Update.
8861 (add_lwp): Update.
8862 (last_thread_of_process_p): Update.
8863 (kill_one_lwp_callback, linux_kill): Update.
8864 (status_pending_p_callback): Update.
8865 (wait_for_sigstop): Update. Simplify read of ptid.
8866 (start_step_over): Update.
8867 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8868 (get_lwp_thread): Update.
8869 (struct lwp_info): Rename member "head" to "entry".
8870 * regcache.h (inferior_list_entry): Delete.
8871 * server.c (kill_inferior_callback): Update.
8872 (detach_or_kill_inferior_callback): Update.
8873 (print_started_pid): Update.
8874 (print_attached_pid): Update.
8875 (process_serial_event): Simplify read of ptid.
8876 * thread-db.c (thread_db_create_event): Update.
8877 (thread_db_get_tls_address): Update.
8878 * win32-low.c (current_inferior_ptid): Simplify.
8879
46917d26
TT
88802014-02-19 Tom Tromey <tromey@redhat.com>
8881
8882 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8883 argument.
8884 (target_supports_btrace): Update.
8885
0759a81e
YQ
88862014-02-14 Yao Qi <yao@codesourcery.com>
8887
8888 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8889 (rsp-low-ipa.o): New target.
8890
a7191e8b
TT
88912014-02-12 Tom Tromey <tromey@redhat.com>
8892
8893 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8894 convert_ascii_to_int.
8895 * regcache.c (registers_to_string): Likewise.
8896 * remote-utils.c (decode_M_packet): Likewise.
8897 * server.c (process_serial_event): Likewise.
8898
ff0e980e
TT
88992014-02-12 Tom Tromey <tromey@redhat.com>
8900
8901 * server.c (handle_query, handle_v_run): Use hex2bin, not
8902 unhexify.
8903 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8904
e9371aff
TT
89052014-02-12 Tom Tromey <tromey@redhat.com>
8906
8907 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8908 convert_int_to_ascii.
8909 * regcache.c (registers_to_string, collect_register_as_string):
8910 Likewise.
8911 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8912 Likewise.
8913 * server.c (process_serial_event): Likewise.
8914 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8915 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8916
971dc0b8
TT
89172014-02-12 Tom Tromey <tromey@redhat.com>
8918
8919 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8920 bin2hex, not hexify.
8921 * tracepoint.c (cmd_qtstatus): Likewise.
8922
0a822afb
TT
89232014-02-12 Tom Tromey <tromey@redhat.com>
8924
8925 * remote-utils.c (monitor_output): Pass explicit length to
8926 hexify.
8927
9c3d6531
TT
89282014-02-12 Tom Tromey <tromey@redhat.com>
8929
8930 * tracepoint.c: Include rsp-low.h.
8931 * server.c: Include rsp-low.h.
8932 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8933 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8934 declare.
8935 * remote-utils.c: Include rsp-low.h.
8936 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8937 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8938 (convert_int_to_ascii, convert_ascii_to_int): Move to
8939 common/rsp-low.c.
8940 * regcache.c: Include rsp-low.h.
8941 * ax.c: Include rsp-low.h.
8942 * Makefile.in (SFILES): Add common/rsp-low.c.
8943 (OBS): Add rsp-low.o.
8944 (rsp-low.o): New target.
8945
01fd3ea5
TT
89462014-02-12 Tom Tromey <tromey@redhat.com>
8947
8948 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8949 Include print-utils.h.
8950 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8951 (plongest, thirty_two, phex_nz): Remove.
8952 * Makefile.in (SFILES): Add common/print-utils.c.
8953 (OBS): Add print-utils.o.
8954 (print-utils-ipa.o): New target.
8955 (print-utils.o): New target.
8956 (IPA_OBJS): Add print-utils-ipa.o.
8957
e99dc820
TT
89582014-02-06 Tom Tromey <tromey@redhat.com>
8959
8960 * Makefile.in (SFILES): Fix indentation.
8961
ee1e2d4f
DE
89622014-02-05 Doug Evans <dje@google.com>
8963
8964 * linux-low.c (linux_wait_for_event): Improve comment.
8965 (linux_wait_1): Keep current_inferior in sync with event_child.
8966
f5a02773
DE
89672014-01-22 Doug Evans <dje@google.com>
8968
8969 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8970
87ce2a04
DE
89712014-01-22 Doug Evans <dje@google.com>
8972
8973 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8974 * configure: Regenerate.
8975 * config.in: Regenerate.
8976 * Makefile.in (SFILES): Add debug.c.
8977 (OBS): Add debug.o.
8978 * debug.c: New file.
8979 * debug.h: New file.
8980 * linux-aarch64-low.c (*): Update all debugging printfs to use
8981 debug_printf instead of fprintf.
8982 * linux-arm-low.c (*): Ditto.
8983 * linux-cris-low.c (*): Ditto.
8984 * linux-crisv32-low.c (*): Ditto.
8985 * linux-m32r-low.c (*): Ditto.
8986 * linux-sparc-low.c (*): Ditto.
8987 * linux-x86.c (*): Ditto.
8988 * linux-low.c (*): Ditto.
8989 (linux_wait_1): Add calls to debug_enter, debug_exit.
8990 (linux_wait): Remove redundant debugging printf.
8991 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8992 (linux_resume, unstop_all_lwps): Ditto.
8993 * mem-break.c (*): Update all debugging printfs to use
8994 debug_printf instead of fprintf.
8995 * remote-utils.c (*): Ditto.
8996 * thread-db.c (*): Ditto.
8997 * server.c #include <ctype.h>, "gdb_vecs.h".
8998 (debug_threads): Moved to debug.c.
8999 (*): Update all debugging printfs to use debug_printf instead of
9000 fprintf.
9001 (start_inferior): Replace call to fflush with call to debug_flush.
9002 (monitor_show_help): Mention set debug-format.
9003 (parse_debug_format_options): New function.
9004 (handle_monitor_command): Handle "monitor set debug-format".
9005 (gdbserver_usage): Mention --debug-format.
9006 (main): Parse --debug-format.
9007 * server.h (debug_threads): Declaration moved to debug.h.
9008 #include "debug.h".
9009 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9010 trace_debug_1 that uses debug_printf.
9011 (tracepoint_look_up_symbols): Update all debugging printfs to use
9012 debug_printf instead of fprintf.
9013
e671835b
BS
90142014-01-20 Baruch Siach <baruch@tkos.co.il>
9015
9016 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9017 sys/ptrace.h.
9018
b5737fa9
PA
90192014-01-17 Pedro Alves <palves@redhat.com>
9020
ea38d2a9 9021 PR build/16445
c7faa97a
PA
9022 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9023 defined after including gdb_proc_service.h.
b5737fa9 9024
40ed484e
DE
90252014-01-16 Doug Evans <dje@google.com>
9026
9027 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9028 (match_dll): Use it.
9029
969c39fb
MM
90302014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9031
9032 * target.h (target_ops) <read_btrace>: Change parameters and
9033 return type to allow error reporting.
9034 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9035 trace reading errors on.
9036 * linux-low.c (linux_low_read_btrace): Pass trace reading
9037 errors on.
9038 (linux_low_disable_btrace): New.
9039
ab7f45ba
DE
90402014-01-15 Doug Evans <dje@google.com>
9041
9042 * inferiors.c (thread_id_to_gdb_id): Delete.
9043 * inferiors.h (thread_id_to_gdb_id): Delete.
9044
66af0f44
EZ
90452014-01-13 Eli Zaretskii <eliz@gnu.org>
9046
9047 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9048 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9049 versions.
9050
9939e131
PA
90512014-01-08 Pedro Alves <palves@redhat.com>
9052
9053 * server.c (handle_status): Don't discard previous queued stop
9054 replies or thread's pending status here.
9055 (main) <disconnection>: Do it here instead.
9056
b7ea362b
PA
90572014-01-08 Pedro Alves <palves@redhat.com>
9058
9059 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9060 * server.c (visit_actioned_threads, handle_pending_status): New
9061 function.
9062 (handle_v_cont): Factor out parts to ...
9063 (resume): ... this new function. If in all-stop, and a thread
9064 being resumed has a pending status, report it without actually
9065 resuming.
9066 (myresume): Adjust to use the new 'resume' function.
9067 (clear_pending_status_callback, set_pending_status_callback)
9068 (find_status_pending_thread_callback): New functions.
9069 (handle_status): Handle the case of multiple threads having
9070 interesting statuses to report. Report threads' real last signal
9071 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9072 with an interesting thread to report the status for, instead of
9073 always reporting the status of the first thread.
9074
28498c42
JB
90752014-01-01 Joel Brobecker <brobecker@adacore.com>
9076
9077 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9078 * gdbreplay.c (gdbreplay_version): Likewise.
9079
f45c82da
YZ
90802013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9081
9082 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9083 iov.iov_len with the real length in use.
9084
379a5e2d
JB
90852013-12-13 Joel Brobecker <brobecker@adacore.com>
9086
9087 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9088 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9089 for all targets that use win32-low.c.
9090 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9091 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9092
4210d83e
PA
90932013-12-13 Pedro Alves <palves@redhat.com>
9094
9095 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9096 if equal to TARGET_WAITKIND_LOADED.
9097 * win32-low.c (cached_status): New static global.
9098 (win32_wait): Add declaration.
9099 (do_initial_child_stuff): Flush all initial pending debug events
9100 up to the initial breakpoint.
9101 (win32_wait): If CACHED_STATUS was set, return that instead
9102 of doing a real wait. Remove the code resuming the execution
9103 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9104 during the initial phase. Also remove the code changing
9105 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9106 TARGET_WAITKIND_STOPPED.
9107
e7f0d979
YQ
91082013-12-11 Yao Qi <yao@codesourcery.com>
9109
9110 * notif.c (handle_notif_ack): Return 0 if no notification
9111 matches.
9112
ebcf782c
DE
91132013-11-20 Doug Evans <dje@google.com>
9114
9115 * linux-low.c (linux_set_resume_request): Fix comment.
9116
20ad9378
DE
91172013-11-20 Doug Evans <dje@google.com>
9118
9119 * linux-low.c (resume_status_pending_p): Tweak comment.
9120
a196ebeb
WT
91212013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9122
9123 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9124 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9125 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9126 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9127 (srv_amd64_regobj): Add amd64-mpx.o.
9128 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9129 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9130 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9131 * i387-fp.c (num_pl_bnd_register) Added constant.
9132 (num_pl_bnd_cfg_registers) Added constant.
9133 (struct i387_xsave) Added reserved area and MPX fields.
9134 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9135 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9136 function.
9137 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9138 (init_registers_amd64_mpx_linux): Declare new function.
9139 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9140 (x86_64_regmap): Add MPX registers.
9141 (x86_linux_read_description): Add MPX case.
9142 (initialize_low_arch): Initialize MPX targets.
9143
0080a2f6
TT
91442013-11-18 Tom Tromey <tromey@redhat.com>
9145
9146 * configure: Rebuild.
9147 * configure.ac: Don't check for stdlib.h.
9148 * gdbreplay.c: Unconditionally include stdlib.h.
9149
2978b111
TT
91502013-11-18 Tom Tromey <tromey@redhat.com>
9151
9152 * config.in: Rebuild.
9153 * configure: Rebuild.
9154 * configure.ac: Don't use AC_HEADER_DIRENT.
9155
a3d08894
TT
91562013-11-18 Tom Tromey <tromey@redhat.com>
9157
9158 * server.h: Don't check HAVE_STRING_H.
9159 * gdbreplay.c: Don't check HAVE_STRING_H.
9160 * configure: Rebuild.
9161
0a5dd17d
TT
91622013-11-18 Tom Tromey <tromey@redhat.com>
9163
9164 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9165 LIBGNU.
9166
1bd2f0ba
TT
91672013-11-08 Tom Tromey <tromey@redhat.com>
9168
9169 * configure, config.in: Rebuild.
9170 * configure.ac: Remove unused configury.
9171
3266f10b
TT
91722013-11-08 Tom Tromey <tromey@redhat.com>
9173
9174 * acinclude.m4: Include common.m4, codeset.m4.
9175 * configure, config.in: Rebuild.
9176 * configure.ac: Use GDB_AC_COMMON.
9177
6682d959
AA
91782013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9179
9180 * linux-s390-low.c (HWCAP_S390_TE): New define.
9181 (s390_arch_setup): Consider the TE field in the HWCAP for
9182 determining 'have_regset_tdb'.
9183
fd0a4d76
SDJ
91842013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9185
9186 PR gdb/16014
9187 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9188 call to sizeof.
9189
1a3d890b
PA
91902013-10-02 Pedro Alves <palves@redhat.com>
9191
9192 * server.c (process_serial_event): Don't output "GDBserver
9193 exiting" if GDB is connected through stdio.
9194 * target.c (mywait): Likewise, be silent if GDB is connected
9195 through stdio.
9196
97ad4581
JB
91972013-10-01 Joel Brobecker <brobecker@adacore.com>
9198
9199 * lynx-low.c (lynx_add_threads_after_attach): New function.
9200 (lynx_attach): Remove call to add_thread. Add call to
9201 lynx_add_threads_after_attach instead.
9202
5b4e221c
MF
92032013-09-28 Mike Frysinger <vapier@gentoo.org>
9204
9205 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9206 * config.in, configure: Regenerated.
9207
ee47b2f8
YQ
92082013-09-18 Yao Qi <yao@codesourcery.com>
9209
9210 PR server/15959
9211 * server.c (start_inferior): Clear 'resume_info'.
9212
d6707650 92132013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9214
d6707650
JW
9215 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9216 for each register.
9217
9243dd0e 92182013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9219
9243dd0e
JW
9220 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9221 linux-tile-low.o to srv_tgtobj.
9222
c623a6ef
WN
92232013-09-16 Will Newton <will.newton@linaro.org>
9224
9225 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9226 out regs.
9227
fb71d39e
PA
92282013-09-06 Pedro Alves <palves@redhat.com>
9229
9230 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9231 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9232 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9233 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9234 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9235 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9236
8e7e9910
PA
92372013-09-06 Pedro Alves <palves@redhat.com>
9238
9239 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9240 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9241
7c3a12ca
PA
92422013-09-06 Pedro Alves <palves@redhat.com>
9243
9244 * linux-amd64-ipa.c: Include tracepoint.h.
9245 * linux-i386-ipa.c: Include tracepoint.h.
9246
8eb3d7b6
RW
92472013-09-06 Ricard Wanderlof <ricardw@axis.com>
9248
9249 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9250 (ps_get_thread_area): New function.
9251
eddddb9d
RW
92522013-09-06 Ricard Wanderlof <ricardw@axis.com>
9253
9254 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9255 (initialize_low_arch): Call init_registers_crisv32 rather than
9256 init_register_crisv32.
9257
533b0600
PA
92582013-09-05 Pedro Alves <palves@redhat.com>
9259
9260 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9261 to ...
9262 * hostio.h: ... this new file.
9263 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9264 win32-low.c: Include hostio.h.
9265
0ce3d3b5
PA
92662013-09-05 Pedro Alves <palves@redhat.com>
9267
9268 * server.h (gdb_client_data, handler_func, callback_handler_func)
9269 (delete_file_handler, add_file_handler, append_callback_event)
9270 (delete_callback_event, start_event_loop, initialize_event_loop):
9271 Move to event-loop.h and include it.
9272 * event-loop.h: New file.
9273
799cdc37
PA
92742013-09-05 Pedro Alves <palves@redhat.com>
9275
9276 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9277 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9278 (loaded_dll, unloaded_dll): Move to ...
9279 * dll.h: ... this new file.
9280 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9281
6a6bbd9d
PA
92822013-09-05 Pedro Alves <palves@redhat.com>
9283
9284 * server.h (current_process, get_thread_process, all_processes)
9285 (add_inferior_to_list, for_each_inferior, current_inferior)
9286 (remove_inferior, add_process, remove_process, find_process_pid)
9287 (have_started_inferiors_p, have_attached_inferiors_p)
9288 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9289 (clear_inferiors, find_inferior, find_inferior_id)
9290 (inferior_target_data, set_inferior_target_data)
9291 (inferior_regcache_data, set_inferior_regcache_data): Move to
9292 inferiors.h, and include it.
9293 * inferiors.h: New file.
9294
f699aaba
PA
92952013-09-05 Pedro Alves <palves@redhat.com>
9296
9297 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9298 Move ...
72f4393d 9299 * ax.h: ... here.
f699aaba 9300
c144c7a0
PA
93012013-09-05 Pedro Alves <palves@redhat.com>
9302
9303 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9304 tracepoint.h.
9305 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9306 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9307 (handle_tracepoint_general_set, handle_tracepoint_query)
9308 (tracepoint_finished_step, tracepoint_was_hit)
9309 (release_while_stepping_state_list, current_traceframe)
9310 (in_readonly_region, traceframe_read_mem)
9311 (fetch_traceframe_registers, traceframe_read_sdata)
9312 (traceframe_read_info, struct fast_tpoint_collect_status)
9313 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9314 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9315 (supply_fast_tracepoint_registers)
9316 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9317 (ipa_tdesc, claim_trampoline_space)
9318 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9319 (agent_mem_read, agent_get_trace_state_variable_value)
9320 (agent_set_trace_state_variable_value, agent_tsv_read)
9321 (agent_mem_read_string, get_raw_reg_func_addr)
9322 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9323 * tracepoint.h: ... this new file.
9324
ff42e6ab
PA
93252013-09-05 Pedro Alves <palves@redhat.com>
9326
9327 * server.h (perror_with_name, error, fatal, warning, paddress)
9328 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9329 include it.
9330 * utils.h: New file.
9331
541af0f4
PA
93322013-09-05 Pedro Alves <palves@redhat.com>
9333
9334 * server.h (remote_debug, noack_mode, transport_is_reliable)
9335 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9336 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9337 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9338 (write_enn, initialize_async_io, enable_async_io)
9339 (disable_async_io, check_remote_input_interrupt_request)
9340 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9341 (dead_thread_notify, prepare_resume_reply)
9342 (decode_address_to_semicolon, decode_address, decode_m_packet)
9343 (decode_M_packet, decode_X_packet, decode_xfer_write)
9344 (decode_search_memory_packet, unhexify, hexify)
9345 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9346 (look_up_one_symbol, relocate_instruction)
9347 (monitor_output): Move to remote-utils.h, and include it.
9348 * remote-utils.h: New file.
9349
eebdf26b
PA
93502013-09-05 Pedro Alves <palves@redhat.com>
9351
9352 * server.h (_): Delete.
9353
3aafd2ff
PA
93542013-09-02 Pedro Alves <palves@redhat.com>
9355
9356 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9357 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9358 allocated.
9359 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9360
cee83bcb
PM
93612013-09-02 Pierre Muller <muller@sourceware.org>
9362
9363 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9364 or WriteProcessMemory complete successfully and handle
9365 ERROR_PARTIAL_COPY error.
9366
9a13b2fa
PA
93672013-09-02 Pedro Alves <palves@redhat.com>
9368
9369 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9370 error instead of EIO.
9371
602e3198
JK
93722013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9373
9374 PR server/15604
9375 * linux-low.c: Include filestuff.h.
9376 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9377 * lynx-low.c: Include filestuff.h.
9378 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9379 * server.c: Include filestuff.h.
9380 (main): Call notice_open_fds.
9381 * spu-low.c: Include filestuff.h.
9382 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9383
96d7229d
LM
93842013-08-22 Luis Machado <lgustavo@codesourcery.com>
9385
9386 * Makefile.in: Explain why ../target and ../nat are not
9387 listed as include file search paths.
9388 (linux-waitpid.o): New object file rule.
9389 * configure.srv (srv_native_linux_obj): New variable.
9390 Replace all occurrences of linux native object files with
9391 $srv_native_linux_obj.
9392 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9393 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9394 (linux_enable_event_reporting): Remove declaration.
9395 (my_waitpid): Moved to common/linux-waitpid.c.
9396 (linux_wait_for_event): Pass ptid when calling
9397 linux_enable_event_reporting.
9398 (linux_supports_tracefork_flag): Remove.
9399 (linux_enable_event_reporting): Likewise.
9400 (linux_tracefork_grandchild): Remove.
9401 (STACK_SIZE): Moved to common/linux-ptrace.c.
9402 (linux_tracefork_child): Remove.
9403 (linux_test_for_tracefork): Remove.
9404 (linux_look_up_symbols): Call linux_supports_traceclone.
9405 (initialize_low): Remove call to linux_test_for_tracefork.
9406 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9407 common/linux-ptrace.h.
9408 (PTRACE_TYPE_ARG4): Likewise.
9409 Include linux-ptrace.h.
9410
32940073
PA
94112013-08-21 Pedro Alves <palves@redhat.com>
9412
9413 * config.in: Renegerate.
9414
33b60d58 94152013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9416
33b60d58
LM
9417 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9418 (SFILES): Remove $(srcdir)/common/target-common.c and
9419 add $(srcdir)/target/waitstatus.c.
9420 (OBS): Remove target-common.o and add waitstatus.o.
9421 (server_h): Remove $(srcdir)/../common/target-common.h and
9422 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9423 and $(srcdir)/../target/waitstatus.h.
9424 (target-common.o): Remove.
9425 (waitstatus.o): New target object file.
9426 * target.h: Do not include target-common.h and
9427 include target/resume.h, target/wait.h and
9428 target/waitstatus.h.
9429
b8e1b30e
LM
94302013-08-13 Luis Machado <lgustavo@codesourcery.com>
9431
9432 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9433 to PTRACE_TYPE_ARG3.
9434 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9435 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9436 PTRACE_TYPE_ARG4.
9437 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9438 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9439
7a60ad40
YQ
94402013-07-27 Jie Zhang <jie@codesourcery.com>
9441 Daniel Jacobowitz <dan@codesourcery.com>
9442 Yao Qi <yao@codesourcery.com>
9443
9444 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9445 (mips-linux-watch.o): New rule.
9446 (mips_linux_watch_h): New variable.
9447 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9448 srv_tgtobj.
9449 * linux-mips-low.c: Include mips-linux-watch.h.
9450 (struct arch_process_info, struct arch_lwp_info): New.
9451 (update_watch_registers_callback): New function.
9452 (mips_linux_new_process, mips_linux_new_thread) New functions.
9453 (mips_linux_prepare_to_resume, mips_insert_point): New
9454 functions.
9455 (mips_remove_point, mips_stopped_by_watchpoint): New
9456 functions.
9457 (rsp_bp_type_to_target_hw_bp_type): New function.
9458 (mips_stopped_data_address): New function.
9459 (the_low_target): Add watchpoint support functions.
9460
de6f69ad
YQ
94612013-07-27 Yao Qi <yao@codesourcery.com>
9462
9463 * i386-low.c: Include break-common.h.
9464 (enum target_hw_bp_type): Remove.
9465
3360c0bf
LM
94662013-07-24 Luis Machado <lgustavo@codesourcery.com>
9467
9468 * Makefile.in (SFILES): /common/target-common.c.
9469 (OBS): Add target-common.o.
9470 (server_h): Add $(srcdir)/../common/target-common.h.
9471 (target-common.o): New target.
9472 * server.c (queue_stop_reply_callback): Free
9473 status string after use.
9474 * target.c (target_waitstatus_to_string): Remove.
9475 * target.h: Include target-common.h.
9476 (resume_kind): Likewise.
9477 (target_waitkind): Likewise.
9478 (target_waitstatus): Likewise.
9479 (TARGET_WNOHANG): Likewise.
9480
bd885420
YQ
94812013-07-04 Yao Qi <yao@codesourcery.com>
9482
9483 * Makefile.in (host_alias): Use @host_noncanonical@.
9484 (target_alias): Use @target_noncanonical@.
9485 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9486 ACX_NONCANONICAL_HOST.
9487 * configure: Regenerated.
9488
9489 Revert:
9490 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9491
9492 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9493 * configure: Rebuild.
9494 * Makefile.in (version_host, version_target): Get from configure.
9495 (version.c): Use $(version_host) and $(version_target).
9496
17ef446e
PA
94972013-07-03 Pedro Alves <palves@redhat.com>
9498
9499 * Makefile.in (config.status): Depend on development.sh.
9500 * acinclude.m4: Include libmcheck.m4.
9501 * configure: Regenerate.
9502
7a9a7487
MG
95032013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9504
9505 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9506 attribute inside the parentheses.
9507 (winapi_DebugSetProcessKillOnExit): Ditto.
9508 (winapi_DebugBreakProcess): Ditto.
9509 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9510
49b64de6
MG
95112013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9512
9513 * notif.h (notif_event): Add a dummy member to avoid compiler
9514 errors.
9515
d5749ee7
PA
95162013-07-01 Pedro Alves <palves@redhat.com>
9517
9518 * hostio.c (HOSTIO_PATH_MAX): Define.
9519 (require_filename, handle_open, handle_unlink, handle_readlink):
9520 Use it.
9521
d8d2a3ee
PA
95222013-07-01 Pedro Alves <palves@redhat.com>
9523
9524 * server.h: Include "pathmax.h".
9525 * linux-low.c: Don't include sys/param.h.
9526 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9527 MAXPATHLEN.
9528 * win32-low.c: Don't include sys/param.h.
9529 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9530
bc7dea8d
PA
95312013-07-01 Pedro Alves <palves@redhat.com>
9532
9533 * event-loop.c: Don't check HAVE_UNISTD_H before including
9534 <unistd.h>.
9535 * gdbreplay.c: Likewise.
9536 * remote-utils.c: Likewise.
9537 * server.c: Likewise.
9538 * configure.ac: Don't check for unistd.h.
9539 * configure: Regenerate.
9540
d6c2da54
TT
95412013-06-28 Tom Tromey <tromey@redhat.com>
9542
9543 * Makefile.in (version.c): Use version.in, not
9544 common/version.in.
9545
257b6bec
MG
95462013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9547
9548 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9549 * configure: Rebuild.
9550 * Makefile.in (version_host, version_target): Get from configure.
9551 (version.c): Use $(version_host) and $(version_target).
9552
86ebe149
DK
95532013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9554
9555 Fix trace-status to output user name without trailing colon.
9556 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9557
f30aa5af
DK
95582013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9559
9560 Fix trace-status to output proper start-time and stop-time.
9561 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9562 output start time and stop time in hex as gdb expects.
9563
28a93511
YQ
95642013-06-26 Pedro Alves <pedro@codesourcery.com>
9565
9566 * tracepoint.c (build_traceframe_info_xml): Output trace state
9567 variables present in the trace buffer.
9568
01208463
TT
95692013-06-24 Tom Tromey <tromey@redhat.com>
9570
9571 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9572 create-version.sh.
9573 (version.o): Remove.
9574 * gdbreplay.c: Include version.h.
9575 (version, host_name): Don't declare.
9576 * server.h: Include version.h.
9577 (version, host_name): Don't declare.
9578
760256f9
PA
95792013-06-12 Pedro Alves <palves@redhat.com>
9580
9581 * linux-x86-low.c (linux_is_elf64): Delete global.
9582 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9583 with local linux_pid_exe_is_elf_64_file use.
9584
030031ee
PA
95852013-06-11 Pedro Alves <palves@redhat.com>
9586
9587 * linux-low.c (regset_disabled, disable_regset): New functions.
9588 (regsets_fetch_inferior_registers)
9589 (regsets_store_inferior_registers): Use them.
9590 (initialize_regsets_info); Don't allocate the disabled_regsets
9591 array here.
9592 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9593 comment.
9594
5da6eb0a
PA
95952013-06-11 Pedro Alves <palves@redhat.com>
9596
9597 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9598 xmalloc.
9599
7e5aaa09
PA
96002013-06-11 Pedro Alves <palves@redhat.com>
9601
9602 * linux-x86-low.c (initialize_low_arch): Call
9603 init_registers_x32_avx_linux.
9604
d878444c
JK
96052013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9606
9607 Fix compatibility with Android Bionic.
9608 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9609 it is not empty.
9610
3aee8918
PA
96112013-06-07 Pedro Alves <palves@redhat.com>
9612
5f2b57b5 9613 PR server/14823
3aee8918
PA
9614 * Makefile.in (OBS): Add tdesc.o.
9615 (IPA_OBJS): Add tdesc-ipa.o.
9616 (tdesc-ipa.o): New rule.
9617 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9618 interface.
9619 * linux-low.c (new_inferior): Delete.
9620 (disabled_regsets, num_regsets): Delete.
9621 (linux_add_process): Adjust to set the new per-process
9622 new_inferior flag.
9623 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9624 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9625 was a stop. When calling arch_setup, switch the current inferior
9626 to the thread that got an event.
9627 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9628 (regsets_fetch_inferior_registers)
9629 (regsets_store_inferior_registers): New regsets_info parameter.
9630 Adjust to use it.
9631 (linux_register_in_regsets): New regs_info parameter. Adjust to
9632 use it.
9633 (register_addr, fetch_register, store_register): New usrregs_info
9634 parameter. Adjust to use it.
9635 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9636 parameter regs_info. Adjust to use it.
9637 (linux_fetch_registers): Get the current inferior's regs_info, and
9638 adjust to use it.
9639 (linux_store_registers): Ditto.
9640 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9641 (initialize_low): Don't initialize the target_regsets here. Call
9642 initialize_low_arch.
9643 * linux-low.h (target_regsets): Delete declaration.
9644 (struct regsets_info): New.
9645 (struct usrregs_info): New.
9646 (struct regs_info): New.
9647 (struct process_info_private) <new_inferior>: New field.
9648 (struct linux_target_ops): Delete the num_regs, regmap, and
9649 regset_bitmap fields. New field regs_info.
9650 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9651 * i387-fp.c (num_xmm_registers): Delete.
9652 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9653 calls to new interface.
9654 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9655 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9656 Infer the number of xmm registers from the regcache's target
9657 description.
9658 * i387-fp.h (num_xmm_registers): Delete.
9659 * inferiors.c (add_thread): Don't install the thread's regcache
9660 here.
9661 * proc-service.c (gregset_info): Fetch the current inferior's
9662 regs_info. Adjust to use it.
9663 * regcache.c: Include tdesc.h.
9664 (register_bytes, reg_defs, num_registers)
9665 (gdbserver_expedite_regs): Delete.
9666 (get_thread_regcache): If the thread doesn't have a regcache yet,
9667 create one, instead of aborting gdbserver.
9668 (regcache_invalidate_one): Rename to ...
9669 (regcache_invalidate_thread): ... this.
9670 (regcache_invalidate_one): New.
9671 (regcache_invalidate): Only invalidate registers of the current
9672 process.
9673 (init_register_cache): Add target_desc parameter, and use it.
9674 (new_register_cache): Ditto. Assert the target description has a
9675 non zero registers_size.
9676 (regcache_cpy): Add assertions. Adjust.
9677 (realloc_register_cache, set_register_cache): Delete.
9678 (registers_to_string, registers_from_string): Adjust.
9679 (find_register_by_name, find_regno, find_register_by_number)
9680 (register_cache_size): Add target_desc parameter, and use it.
9681 (free_register_cache_thread, free_register_cache_thread_one)
9682 (regcache_release, register_cache_size): New.
9683 (register_size): Add target_desc parameter, and use it.
9684 (register_data, supply_register, supply_register_zeroed)
9685 (supply_regblock, supply_register_by_name, collect_register)
9686 (collect_register_as_string, collect_register_by_name): Adjust.
9687 * regcache.h (struct target_desc): Forward declare.
9688 (struct regcache) <tdesc>: New field.
9689 (init_register_cache, new_register_cache): Add target_desc
9690 parameter.
9691 (regcache_invalidate_thread): Declare.
9692 (regcache_invalidate_one): Delete declaration.
9693 (regcache_release): Declare.
9694 (find_register_by_number, register_cache_size, register_size)
9695 (find_regno): Add target_desc parameter.
9696 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9697 declarations.
9698 * remote-utils.c: Include tdesc.h.
9699 (outreg, prepare_resume_reply): Adjust.
9700 * server.c: Include tdesc.h.
9701 (gdbserver_xmltarget): Delete declaration.
9702 (get_features_xml, process_serial_event): Adjust.
9703 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9704 declare.
9705 (struct process_info) <tdesc>: New field.
9706 (ipa_tdesc): Declare.
9707 * tdesc.c: New file.
9708 * tdesc.h: New file.
9709 * tracepoint.c: Include tdesc.h.
9710 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9711 (get_context_regcache): Adjust to pass ipa_tdesc down.
9712 (do_action_at_tracepoint): Adjust to get the register cache size
9713 from the context regcache's description.
9714 (traceframe_walk_blocks): Adjust to get the register cache size
9715 from the current trace frame's description.
9716 (traceframe_get_pc): Adjust to get current trace frame's
9717 description and pass it down.
9718 (gdb_collect): Adjust to get the register cache size from the
9719 IPA's description.
9720 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9721 (gdbserver_xmltarget): Delete.
9722 (initialize_low_tracepoint): Set the ipa's target description.
9723 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9724 (initialize_low_tracepoint): Set the ipa's target description.
9725 * linux-x86-low.c: Include tdesc.h.
9726 [__x86_64__] (is_64bit_tdesc): New.
9727 (ps_get_thread_area, x86_get_thread_area): Use it.
9728 (i386_cannot_store_register): Rename to ...
9729 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9730 (i386_cannot_fetch_register): Rename to ...
9731 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9732 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9733 to new interface.
9734 (target_regsets): Rename to ...
9735 (x86_regsets): ... this.
9736 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9737 interface.
9738 (x86_siginfo_fixup): Use is_64bit_tdesc.
9739 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9740 (tdesc_x32_avx_linux, tdesc_x32_linux)
9741 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9742 Declare.
9743 (x86_linux_update_xmltarget): Delete.
9744 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9745 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9746 (AMD64_LINUX_USER64_CS): New.
9747 (x86_linux_read_description): New, based on
9748 x86_linux_update_xmltarget.
9749 (same_process_callback): New.
9750 (x86_arch_setup_process_callback): New.
9751 (x86_linux_update_xmltarget): New.
9752 (x86_regsets_info): New.
9753 (amd64_linux_regs_info): New.
9754 (i386_linux_usrregs_info): New.
9755 (i386_linux_regs_info): New.
9756 (x86_linux_regs_info): New.
9757 (x86_arch_setup): Reimplement.
9758 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9759 (x86_emit_ops): Ditto.
9760 (the_low_target): Adjust. Install x86_linux_regs_info,
9761 x86_cannot_fetch_register, and x86_cannot_store_register.
9762 (initialize_low_arch): New.
9763 * linux-ia64-low.c (tdesc_ia64): Declare.
9764 (ia64_fetch_register): Adjust.
9765 (ia64_usrregs_info, regs_info): New globals.
9766 (ia64_regs_info): New function.
9767 (the_low_target): Adjust.
9768 (initialize_low_arch): New function.
9769 * linux-sparc-low.c (tdesc_sparc64): Declare.
9770 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9771 Adjust.
9772 (sparc_arch_setup): New function.
9773 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9774 (the_low_target): Adjust.
9775 (initialize_low_arch): New function.
9776 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9777 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9778 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9779 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9780 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9781 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9782 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9783 (tdesc_powerpc_isa205_vsx64l): Declare.
9784 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9785 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9786 (ppc_set_pc, ppc_get_hwcap): Adjust.
9787 (ppc_usrregs_info): Forward declare.
9788 (!__powerpc64__) ppc_regmap_adjusted: New global.
9789 (ppc_arch_setup): Adjust to the current process'es target
9790 description.
9791 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9792 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9793 (ppc_store_evrregset): Adjust.
9794 (target_regsets): Rename to ...
9795 (ppc_regsets): ... this, and make static.
9796 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9797 (ppc_regs_info): New function.
9798 (the_low_target): Adjust.
9799 (initialize_low_arch): New function.
9800 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9801 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9802 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9803 (tdesc_s390x_linux64v2): Declare.
9804 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9805 (s390_fill_gregset, s390_store_last_break): Adjust.
9806 (target_regsets): Rename to ...
9807 (s390_regsets): ... this, and make static.
9808 (s390_get_pc, s390_set_pc): Adjust.
9809 (s390_get_hwcap): New target_desc parameter, and use it.
9810 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9811 (s390_arch_setup): Adjust to set the current process'es target
9812 description. Don't adjust the regmap.
9813 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9814 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9815 (regs_info_3264): New globals.
9816 (s390_regs_info): New function.
9817 (the_low_target): Adjust.
9818 (initialize_low_arch): New function.
9819 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9820 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9821 [__mips64] (init_registers_mips_linux)
9822 (init_registers_mips_dsp_linux): Delete defines.
9823 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9824 (have_dsp): New global.
9825 (mips_read_description): New, based on mips_arch_setup.
9826 (mips_arch_setup): Reimplement.
9827 (get_usrregs_info): New function.
9828 (mips_cannot_fetch_register, mips_cannot_store_register)
9829 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9830 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9831 (target_regsets): Rename to ...
9832 (mips_regsets): ... this, and make static.
9833 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9834 (dsp_regs_info, regs_info): New globals.
9835 (mips_regs_info): New function.
9836 (the_low_target): Adjust.
9837 (initialize_low_arch): New function.
9838 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9839 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9840 Declare.
9841 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9842 (arm_read_description): New, with bits factored from
9843 arm_arch_setup.
9844 (arm_arch_setup): Reimplement.
9845 (target_regsets): Rename to ...
9846 (arm_regsets): ... this, and make static.
9847 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9848 (arm_regs_info): New function.
9849 (the_low_target): Adjust.
9850 (initialize_low_arch): New function.
9851 * linux-m68k-low.c (tdesc_m68k): Declare.
9852 (target_regsets): Rename to ...
9853 (m68k_regsets): ... this, and make static.
9854 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9855 (m68k_regs_info): New function.
9856 (m68k_arch_setup): New function.
9857 (the_low_target): Adjust.
9858 (initialize_low_arch): New function.
9859 * linux-sh-low.c (tdesc_sharch): Declare.
9860 (target_regsets): Rename to ...
9861 (sh_regsets): ... this, and make static.
9862 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9863 (sh_regs_info, sh_arch_setup): New functions.
9864 (the_low_target): Adjust.
9865 (initialize_low_arch): New function.
9866 * linux-bfin-low.c (tdesc_bfin): Declare.
9867 (bfin_arch_setup): New function.
9868 (bfin_usrregs_info, regs_info): New globals.
9869 (bfin_regs_info): New function.
9870 (the_low_target): Adjust.
9871 (initialize_low_arch): New function.
9872 * linux-cris-low.c (tdesc_cris): Declare.
9873 (cris_arch_setup): New function.
9874 (cris_usrregs_info, regs_info): New globals.
9875 (cris_regs_info): New function.
9876 (the_low_target): Adjust.
9877 (initialize_low_arch): New function.
9878 * linux-cris-low.c (tdesc_crisv32): Declare.
9879 (cris_arch_setup): New function.
9880 (cris_regsets_info, 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-m32r-low.c (tdesc_m32r): Declare.
9885 (m32r_arch_setup): New function.
9886 (m32r_usrregs_info, regs_info): New globals.
9887 (m32r_regs_info): Adjust.
9888 (initialize_low_arch): New function.
9889 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9890 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9891 (tic6x_usrregs_info): Forward declare.
9892 (tic6x_read_description): New function, based on ...
9893 (tic6x_arch_setup): ... this. Reimplement.
9894 (target_regsets): Rename to ...
9895 (tic6x_regsets): ... this, and make static.
9896 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9897 (tic6x_regs_info): New function.
9898 (the_low_target): Adjust.
9899 (initialize_low_arch): New function.
9900 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9901 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9902 (target_regsets): Rename to ...
9903 (xtensa_regsets): ... this, and make static.
9904 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9905 globals.
9906 (xtensa_arch_setup, xtensa_regs_info): New functions.
9907 (the_low_target): Adjust.
9908 (initialize_low_arch): New function.
9909 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9910 (nios2_arch_setup): Set the current process'es tdesc.
9911 (target_regsets): Rename to ...
9912 (nios2_regsets): ... this.
9913 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9914 (nios2_regs_info): New function.
9915 (the_low_target): Adjust.
9916 (initialize_low_arch): New function.
a261b8f5
PA
9917 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9918 (aarch64_arch_setup): Set the current process'es tdesc.
9919 (target_regsets): Rename to ...
9920 (aarch64_regsets): ... this.
9921 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9922 (aarch64_regs_info): New function.
9923 (the_low_target): Adjust.
9924 (initialize_low_arch): New function.
3aee8918
PA
9925 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9926 globals.
9927 (target_regsets): Rename to ...
9928 (tile_regsets): ... this.
9929 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9930 (tile_regs_info): New function.
9931 (tile_arch_setup): Set the current process'es tdesc.
9932 (the_low_target): Adjust.
9933 (initialize_low_arch): New function.
9934 * spu-low.c (tdesc_spu): Declare.
9935 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9936 * win32-arm-low.c (tdesc_arm): Declare.
9937 (arm_arch_setup): New function.
9938 (the_low_target): Install arm_arch_setup instead of
9939 init_registers_arm.
9940 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9941 (init_windows_x86): Rename to ...
9942 (i386_arch_setup): ... this. Set `win32_tdesc'.
9943 (the_low_target): Adjust.
9944 * win32-low.c (win32_tdesc): New global.
9945 (child_add_thread): Don't create the thread cache here.
9946 (do_initial_child_stuff): Set the new process'es tdesc.
9947 * win32-low.h (struct target_desc): Forward declare.
9948 (win32_tdesc): Declare.
9949 * lynx-i386-low.c (tdesc_i386): Declare global.
9950 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9951 * lynx-low.c (lynx_tdesc): New global.
9952 (lynx_add_process): Set the new process'es tdesc.
9953 * lynx-low.h (struct target_desc): Forward declare.
9954 (lynx_tdesc): Declare global.
9955 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9956 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9957 * nto-low.c (nto_tdesc): New global.
9958 (do_attach): Set the new process'es tdesc.
9959 * nto-low.h (struct target_desc): Forward declare.
9960 (nto_tdesc): Declare.
9961 * nto-x86-low.c (tdesc_i386): Declare.
9962 (nto_x86_arch_setup): Set `nto_tdesc'.
9963
b1fbec62
GB
99642013-06-04 Gary Benson <gbenson@redhat.com>
9965
9966 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9967 to qSupported response when appropriate.
9968 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9969 with nonzero-length annex.
9970 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9971 arguments supplied in annex.
9972
d1ec4ce7
DE
99732013-05-31 Doug Evans <dje@google.com>
9974
ac44adcb 9975 PR server/15594
d1ec4ce7
DE
9976 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9977 64 bits in 64-cross-32 environment.
9978
9b25f2d3
PA
99792013-05-28 Pedro Alves <palves@redhat.com>
9980
9981 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9982 (aarch64-without-fpu.c): Delete rule.
9983 * configure.srv (aarch64*-*-linux*): Remove references to
9984 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9985 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9986 declaration.
9987
6740dc9c
PA
99882013-05-24 Pedro Alves <palves@redhat.com>
9989
9990 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9991 instead of strchr/decode_address. Error if the range isn't split
9992 with a ','. Don't assume there's be a ':' in the action.
9993
c2d6af84
PA
99942013-05-23 Yao Qi <yao@codesourcery.com>
9995 Pedro Alves <palves@redhat.com>
9996
9997 * linux-low.c (lwp_in_step_range): New function.
9998 (linux_wait_1): If the thread was range stepping and stopped
9999 outside the stepping range, report the stop to GDB. Otherwise,
10000 continue stepping. Add range stepping debug output.
10001 (linux_set_resume_request): Copy the step range from the resume
10002 request to the lwp.
10003 (linux_supports_range_stepping): New.
10004 (linux_target_ops) <supports_range_stepping>: Set to
10005 linux_supports_range_stepping.
10006 * linux-low.h (struct linux_target_ops)
10007 <supports_range_stepping>: New field.
10008 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10009 * linux-x86-low.c (x86_supports_range_stepping): New.
10010 (the_low_target) <supports_range_stepping>: Set to
10011 x86_supports_range_stepping.
10012 * server.c (handle_v_cont): Handle 'r' action.
10013 (handle_v_requests): Append ";r" if the target supports range
10014 stepping.
10015 * target.h (struct thread_resume) <step_range_start,
10016 step_range_end>: New fields.
10017 (struct target_ops) <supports_range_stepping>:
10018 New field.
10019 (target_supports_range_stepping): New macro.
10020
58794e1a
JB
100212013-05-17 Joel Brobecker <brobecker@adacore.com>
10022
10023 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10024 confusion in comment.
10025
d631c5a7
JB
100262013-05-17 Joel Brobecker <brobecker@adacore.com>
10027
10028 * lynx-low.c (struct process_info_private): New type.
10029 (lynx_add_process): New function.
10030 (lynx_create_inferior, lynx_attach): Replace calls to
10031 add_process by calls to lynx_add_process.
10032 (lynx_resume): If PTID is null, then try using
10033 current_process()->private->last_wait_event_ptid.
10034 Add comments.
10035 (lynx_clear_inferiors): Delete. The contents of that function
10036 has been inlined in lynx_mourn;
10037 (lynx_wait_1): Save the ptid in the process's private data.
10038 (lynx_mourn): Free the process' private data. Replace call
10039 to lynx_clear_inferiors by call to clear_inferiors.
10040
96f7a20f
YQ
100412013-05-17 Yao Qi <yao@codesourcery.com>
10042
10043 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10044 the right place.
10045
db0dfaa0
LM
100462013-05-16 Luis Machado <lgustavo@codesourcery.com>
10047
10048 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10049 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10050 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10051 PT_TEXT_END_ADDR guards. Update comments.
10052 (linux_target_op) <read_offsets>: Conditionally define to
10053 linux_read_offsets if the target is UCLIBC and if it defines
10054 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10055
68f5f838
SL
100562013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10057 Andrew Jenner <andrew@codesourcery.com>
10058
10059 * Makefile.in (SFILES): Add linux-nios2-low.c.
10060 (clean): Add action to delete nios2-linux.c.
10061 (nios2-linux.c): New rule.
10062 * configure.srv: Add nios2*-*-linux*.
10063 * linux-nios2-low.c: New.
10064
1ebff1fd
HAQ
100652013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10066
10067 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10068
f6150862
HZ
100692013-04-25 Hui Zhu <hui@codesourcery.com>
10070
10071 PR gdb/15186
f6150862
HZ
10072 * ax.c (ax_printf): Add fflush.
10073
614c279d
TT
100742013-04-22 Tom Tromey <tromey@redhat.com>
10075
10076 * Makefile.in (SFILES): Add filestuff.c.
10077 (OBS): Add filestuff.o.
10078 (filestuff.o): New target.
10079 * config.in, configure: Rebuild.
10080 * configure.ac: Check for fdwalk, pipe2.
10081
7d4e5717
PA
100822013-04-17 Pedro Alves <palves@redhat.com>
10083
10084 * configure.ac (USE_THREAD_DB): Delete variable.
10085 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10086 Don't AC_SUBST USE_THREAD_DB.
10087 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10088 * config.in, configure: Regenerate.
10089
d5c93e41
PA
100902013-04-16 Pedro Alves <palves@redhat.com>
10091
10092 * linux-low.h (struct lwp_info) <thread_known>: Move under
10093 the USE_THREAD_DB #ifdef.
10094
04f5fe89
PA
100952013-04-16 Pedro Alves <palves@redhat.com>
10096
10097 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10098 (linux-low.o): Delete rule.
10099 * linux-low.h: Always include "gdb_thread_db.h" instead of
10100 conditionally including thread_db.h.
10101 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10102 HAVE_THREAD_DB_H.
10103
480b27bf
JK
101042013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10105
10106 * Makefile.in (install-only): Fix make install regression.
10107
43662968
JK
101082013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10109
10110 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10111 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10112 installation.
10113 * gdbserver.1: Remove.
10114
3e74e146
PA
101152013-03-22 Pedro Alves <palves@redhat.com>
10116
10117 * linux-low.c (handle_extended_wait): Don't call
10118 linux_enable_event_reporting.
10119
a8347a2a
TT
101202013-03-15 Tony Theodore <tonyt@logyst.com>
10121
10122 PR build/9098:
10123 * Makefile.in (SHELL): Use @SHELL@.
10124
eeb56fa7
SDJ
101252013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10126
10127 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10128 compiler warning.
10129
4fa7e2ff
JB
101302013-03-13 Joel Brobecker <brobecker@adacore.com>
10131
10132 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10133 Remove extraneous NULL element.
10134
8ddb1965
YQ
101352013-03-13 Yao Qi <yao@codesourcery.com>
10136
10137 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10138 'V' block in trace frame.
10139
9accd112
MM
101402013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10141
10142 * target.h (struct target_ops): Add btrace ops.
10143 (target_supports_btrace): New macro.
10144 (target_enable_btrace): New macro.
10145 (target_disable_btrace): New macro.
10146 (target_read_btrace): New macro.
10147 * gdbthread.h (struct thread_info): Add btrace field.
10148 * server.c: Include btrace-common.h.
10149 (handle_btrace_general_set): New function.
10150 (handle_btrace_enable): New function.
10151 (handle_btrace_disable): New function.
10152 (handle_general_set): Call handle_btrace_general_set.
10153 (handle_qxfer_btrace): New function.
10154 (struct qxfer qxfer_packets[]): Add btrace entry.
10155 * inferiors.c (remove_thread): Disable btrace.
10156 * linux-low: Include linux-btrace.h.
10157 (linux_low_enable_btrace): New function.
10158 (linux_low_read_btrace): New function.
10159 (linux_target_ops): Add btrace ops.
10160 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10161 Add srv_linux_btrace=yes.
10162 (x86_64-*-linux*): Add linux-btrace.o.
10163 Add srv_linux_btrace=yes.
10164 * configure.ac: Define HAVE_LINUX_BTRACE.
10165 * config.in: Regenerated.
10166 * configure: Regenerated.
10167
5cc22e4c
MM
101682013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10169
10170 * server.c (handle_qxfer): Preserve error message if -3 is
10171 returned.
10172 (qxfer): Document the -3 return value.
10173
7c97f91e
MM
101742013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10175
10176 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10177 (linux_btrace_h): New variable.
10178 (linux-btrace.o): New rule.
10179
be9a119c 101802013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10181 Hafiz Abid Qadeer <abidh@codesourcery.com>
10182
10183 * tracepoint.c (trace_buffer_size): New global.
10184 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10185 (init_trace_buffer): Change to one-argument function. Allocate
10186 trace buffer memory.
10187 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10188 handle QTBuffer:size packet.
10189 (cmd_bigqtbuffer_size): New function.
10190 (initialize_tracepoint): Call init_trace_buffer with
10191 DEFAULT_TRACE_BUFFER_SIZE.
10192 * server.c (handle_query): Add QTBuffer:size in the
10193 supported packets.
10194
e64f7499
YQ
101952013-03-07 Yao Qi <yao@codesourcery.com>
10196
10197 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10198 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10199 of -1.
10200 (cmd_qtsp): Adjust condition. Do post increment.
10201 Set cur_action and cur_step_action back to 0.
10202
f0ae6fc3
PA
102032013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10204
10205 PR server/15236
10206 * linux-low.c (linux_write_memory): Return early success if LEN is
10207 zero.
10208
b5b0b0af
CV
102092013-03-05 Corinna Vinschen <vinschen@redhat.de>
10210
334ad4a8 10211 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10212
589bc927
TT
102132013-02-28 Tom Tromey <tromey@redhat.com>
10214
10215 * configure.ac: Invoke AC_SYS_LARGEFILE.
10216 * configure, config.in: Rebuild.
10217
dfe07582
CV
102182013-02-28 Corinna Vinschen <vinschen@redhat.com>
10219
10220 * win32-low.c: Throughout, fix format strings and casts of
10221 printf-like functions to avoid type related warnings on all
10222 platforms.
10223 (get_child_debug_event): Print dwDebugEventCode as hex since
10224 that's how it's usually documented.
10225
736cd585
YQ
102262013-02-28 Yao Qi <yao@codesourcery.com>
10227
10228 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10229 pulongest.
10230
e1f58301
JW
102312013-02-27 Jiong Wang <jiwang@tilera.com>
10232
10233 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10234 (reg-tilegx32.c): New rule.
10235 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10236 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10237 different register info initializer according to elf class.
10238 (init_registers_tilgx32): New function. The tilegx32 register info
10239 initializer.
10240 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10241 (tile_store_gregset): Likewise.
10242
d171ca78
YQ
102432013-02-27 Yao Qi <yao@codesourcery.com>
10244
10245 * server.c (process_point_options): Print debug message when
10246 debug_threads is true.
10247
282bbdf3
YQ
102482013-02-26 Yao Qi <yao@codesourcery.com>
10249
10250 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10251
aca22551
PA
102522013-02-19 Pedro Alves <palves@redhat.com>
10253 Kai Tietz <ktietz@redhat.com>
10254
10255 PR gdb/15161
10256
10257 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10258 instead of strtoul to extract address from packet.
10259 (process_serial_event) <'z'>: Likewise.
10260
4f3cee1c
YQ
102612013-02-18 Yao Qi <yao@codesourcery.com>
10262
10263 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10264
8e1d55a3
PA
102652013-02-14 Pedro Alves <palves@redhat.com>
10266
10267 Plug memory leak.
10268
10269 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10270 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10271
458820da
PA
102722013-02-14 Pedro Alves <palves@redhat.com>
10273
10274 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10275
baea0dae
PA
102762013-02-14 Pedro Alves <palves@redhat.com>
10277
10278 * tracepoint.c (save_string): Delete.
10279 (add_tracepoint_action): Use savestring instead of save_string.
10280
0b1afbb3
PA
102812013-02-12 Pedro Alves <palves@redhat.com>
10282
10283 * linux-xtensa-low.c: Ditto.
10284 * xtensa-xtregs.c: Ditto.
10285
8a4ac37e
PA
102862013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10287
10288 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10289 thread_db.
10290
148de6bb
MS
102912013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10292
10293 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10294 aarch64_num_wp_regs and aarch64_num_bp_regs to
10295 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10296
55fac6e0
MS
102972013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10298
10299 * linux-aarch64-low.c (ps_get_thread_area): Replace
10300 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10301
176eb98c
MS
103022013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10303 Marcus Shawcroft <marcus.shawcroft@arm.com>
10304 Nigel Stephens <nigel.stephens@arm.com>
10305 Yufeng Zhang <yufeng.zhang@arm.com>
10306
10307 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10308 (aarch64.c, aarch64-without-fpu.c): New targets.
10309 * configure.srv (aarch64*-*-linux*): New.
10310 * linux-aarch64-low.c: New file.
10311
56f7af9c
MS
103122013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10313
43aaf8b6 10314 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10315 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10316 (dequeue_one_deferred_signal, linux_resume_one_thread)
10317 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10318 (linux_tracefork_grandchild, linux_test_for_tracefork)
10319 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10320 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10321 where the argument is 0.
10322
60f662b0
YQ
103232013-01-25 Yao Qi <yao@codesourcery.com>
10324
10325 * event-loop.c: Include "queue.h".
10326 (gdb_event_p): New typedef.
10327 (struct gdb_event) <next_event>: Remove.
10328 (event_queue): Change to QUEUE(gdb_event_p).
10329 (async_queue_event): Remove.
10330 (gdb_event_xfree): New.
10331 (initialize_event_loop): New.
10332 (process_event): Use API from QUEUE.
10333 (wait_for_event): Likewise.
10334 * server.c (main): Call initialize_event_loop.
10335 * server.h (initialize_event_loop): Declare.
10336
5ae4861a
YQ
103372013-01-18 Yao Qi <yao@codesourcery.com>
10338
10339 * ax.h (struct eval_agent_expr_context): New.
10340 (gdb_eval_agent_expr): Update declaration.
10341 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10342 TFRAME. Add new argument CTX.
10343 * server.h (struct eval_agent_expr_context): Declare.
10344 (agent_mem_read, agent_tsv_read): Update declaration.
10345 (agent_mem_read_string): Likewise.
10346 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10347 (add_traceframe_block): Add new argument TPOINT.
10348 Increase TPOINT->traceframe_usage.
10349 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10350 eval_tracepoint_agent_expr.
10351 (condition_true_at_tracepoint): Likewise.
10352 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10353 (agent_mem_read_string, agent_tsv_read): Likewise.
10354
85e00e85
YQ
103552013-01-16 Yao Qi <yao@codesourcery.com>
10356
10357 * linux-low.c (linux_resume_one_lwp): Don't check
10358 'lwp->bp_reinsert != 0'.
10359
4039cf45
JB
103602013-01-07 Joel Brobecker <brobecker@adacore.com>
10361 Pedro Alves <palves@redhat.com>
10362
10363 * lynx-low.c (ptrace_request_to_str): Define a temporary
10364 macro and use it to simplify this function's implementation.
10365
9044dee2
JB
103662013-01-07 Joel Brobecker <brobecker@adacore.com>
10367
10368 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10369 sets errno.
10370
e6352c8f
JB
103712013-01-07 Joel Brobecker <brobecker@adacore.com>
10372
10373 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10374
50681a27
JB
103752013-01-07 Joel Brobecker <brobecker@adacore.com>
10376
10377 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10378
3f6e77ef
JB
103792013-01-07 Joel Brobecker <brobecker@adacore.com>
10380
10381 * lynx-low.c (lynx_resume): Use the resume_info parameter
10382 to determine the ptid for the lynx_ptrace call, unless
10383 it is equal to minus_one_ptid, in which case we use the
10384 ptid of the current_inferior.
10385 (lynx_wait_1): After having received a thread create/exit
10386 event, resume the inferior's execution using the signaling
10387 thread's ptid, rather than the old ptid.
10388
7fda33ae
JB
103892013-01-07 Joel Brobecker <brobecker@adacore.com>
10390
10391 * lynx-low.c (lynx_resume): Delete variable ret.
10392
b9786c74
JB
103932013-01-01 Joel Brobecker <brobecker@adacore.com>
10394
10395 * gdbreplay.c (gdbreplay_version): Update copyright year.
10396 * server.c (gdbserver_version): Likewise.
10397
8b93d60f
JB
103982012-12-17 Joel Brobecker <brobecker@adacore.com>
10399
10400 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10401 new thread.
10402
037335a7
JB
104032012-12-17 Joel Brobecker <brobecker@adacore.com>
10404
10405 * lynx-low.c (ptrace_request_to_str): Add handling for
10406 PTRACE_GETTRACESIG.
10407
52d4cbd8
JB
104082012-12-17 Joel Brobecker <brobecker@adacore.com>
10409
10410 * lynx-low.c (lynx_attach): Delete variable new_process.
10411
ab8f6ca9
JB
104122012-12-17 Joel Brobecker <brobecker@adacore.com>
10413
10414 * lynx-low.c (lynx_create_inferior): Delete variable
10415 new_process.
10416
78cbc024
JB
104172012-12-17 Joel Brobecker <brobecker@adacore.com>
10418
10419 * lynx-low.c (ptrace_request_to_str): Do not handle
10420 PTRACE_GETTHREADLIST if this macro does not exist.
10421
14a00470
YQ
104222012-12-15 Yao Qi <yao@codesourcery.com>
10423
10424 * Makefile.in (OBS): Add notif.o.
10425 * notif.c, notif.h: New.
10426 * server.c: Include "notif.h".
10427 (struct vstop_notif) <next>: Remove.
10428 <base>: New field.
10429 (queue_stop_reply): Update.
10430 (push_event, send_next_stop_reply): Remove.
10431 (discard_queued_stop_replies): Update.
10432 (notif_stop): New variable.
10433 (handle_v_stopped): Remove.
10434 (handle_v_requests): Don't call handle_v_stopped. Call
10435 handle_ack_notif instead.
10436 (queue_stop_reply_callback): Call notif_event_enque instead
10437 of queue_stop_reply.
10438 (handle_status): Don't call send_next_stop_reply, call
10439 notif_write_event instead.
10440 (kill_inferior_callback): Likewise.
10441 (detach_or_kill_inferior_callback): Likewise.
10442 (main): Call initialize_notif.
10443 (process_serial_event): Call QUEUE_is_empty.
10444 (handle_target_event): Call notif_push instead of push event.
10445 * server.h (push_event): Remove declaration.
10446
61c125b9
TT
104472012-12-10 Tom Tromey <tromey@redhat.com>
10448
10449 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10450 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10451 macros.
10452 (.c.o): Rewrite.
10453 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10454 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10455 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10456 (amd64-linux-ipa.o, ax.o): Rewrite.
10457 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10458 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10459 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10460 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10461 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10462 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10463 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10464 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10465 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10466 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10467 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10468 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10469 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10470 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10471 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10472 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10473 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10474 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10475 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10476 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10477 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10478 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10479 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10480 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10481 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10482 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10483 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10484 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10485 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10486 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10487 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10488 (reg-tilegx.o): Remove.
10489 (all_object_files): New macro.
10490 Include .deps files.
10491 * aclocal.m4, configure: Rebuild.
10492 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10493 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10494 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10495
e90e9ad9
TT
104962012-12-05 Tom Tromey <tromey@redhat.com>
10497
10498 PR gdb/14917:
10499 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10500
02d403bf 105012012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10502
10503 * configure.ac: Check for linux/perf_event.h.
10504 * config.in: Regenerated.
10505 * configure: Regenerated.
10506
0270a750
PA
105072012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10508
10509 * hostio.c (handle_readlink): Decrease buffer size
10510 parameter passed to readlink by one byte.
10511
8c29b58e
YQ
105122012-11-26 Yao Qi <yao@codesourcery.com>
10513
10514 * configure.ac (build_warnings): Append '-Wempty-body'.
10515 * configure: Regenerated.
10516 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10517 body.
10518
8bdce1ff
PM
105192012-11-15 Pierre Muller <muller@sourceware.org>
10520
10521 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10522 * config.in: Regenerate.
10523 * configure: Regenerate.
10524 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10525 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10526 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10527 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10528 header.
10529 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10530 instead of <sys/wait.h> header.
10531 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10532
02d403bf 105332012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10534
10535 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10536 (various make rules): Remove -DGDBSERVER
10537
fbd5db48
YQ
105382012-11-09 Yao Qi <yao@codesourcery.com>
10539
10540 * spu-low.c (current_ptid): Move it to ..
10541 * gdbthread.h: ... here. New.
10542 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10543 * server.c (myresume, process_serial_event): Likewise.
10544 * thread-db.c (thread_db_find_new_threads): Likewise.
10545 * tracepoint.c (run_inferior_command): Likewise.
10546
b3dc46ff
AB
105472012-10-01 Andrew Burgess <aburgess@broadcom.com>
10548
10549 * server.c (handle_search_memory_1): Include access length in
10550 warning message.
10551
07c04788
HPN
105522012-09-05 Michael Brandt <michael.brandt@axis.com>
10553
10554 * linux-crisv32-low.c: Fix compile errors.
10555
918d227b
YQ
105562012-09-04 Yao Qi <yao@codesourcery.com>
10557
10558 * tracepoint.c (cmd_qtsv): Adjust debug message.
10559 Don't check CUR_TPOINT.
10560
18c1b81a
YQ
105612012-08-28 Yao Qi <yao@codesourcery.com>
10562
10563 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10564 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10565 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10566 Remove declarations of xmalloc, xreallloc, xstrdup and
10567 freeargv.
10568 * Makefile.in (libiberty_h): New.
10569 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10570 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10571
dc82f37b
YQ
105722012-08-23 Yao Qi <yao@codesourcery.com>
10573
10574 * server.h: Remove declaration of 'xsnprintf'.
10575
406b1477
KS
105762012-08-22 Keith Seitz <keiths@redhat.com>
10577
10578 * server.h: Include build-gnulib-gbserver/config.h.
10579 * gdbreplay.c: Likewise.
10580
e6712ff1
DE
105812012-08-08 Doug Evans <dje@google.com>
10582
10583 * Makefile.in (SFILES): Add gdb_vecs.c.
10584 (OBS): Add gdb_vecs.o.
10585 (gdb_vecs_h, host_defs_h): New variables.
10586 (thread-db.o): Add $(gdb_vecs_h) dependency.
10587 (gdb_vecs.o): New rule.
10588 * thread-db.c: #include "gdb_vecs.h".
10589 (thread_db_load_search): Use a vector to iterate over path elements.
10590 Handle text appearing after "$pdir".
10591
10592 * configure.ac: Add check for strstr.
10593 * config.in: Regenerate.
10594 * configure: Regenerate.
10595
7c3270ae
UW
105962012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10597
10598 * hostio.c (handle_pread): If pread fails, fall back to attempting
10599 lseek/read.
10600 (handle_pwrite): Likewise for pwrite.
10601
b62e2b27
UW
106022012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10603
10604 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10605 between unsupported TYPE and unimplementable ADDR/LEN combination.
10606 (arm_insert_point): Act on new return value.
10607
78a99e91
PA
106082012-07-31 Pedro Alves <palves@redhat.com>
10609
10610 * server.c (process_point_options): Only skip tokens if we find
10611 one that is unrecognized. Don't treat 'X' specially while
10612 skipping unrecognized tokens.
10613
fcf303ab
UW
106142012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10615
10616 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10617 to 4-byte-align HW breakpoint addresses for Thumb.
10618
7255706c
YQ
106192012-07-27 Yao Qi <yao@codesourcery.com>
10620
10621 PR remote/14161.
10622
10623 * server.h: Declare gdb_agent_about_to_close.
10624 * target.c (kill_inferior): Include "agent.h".
10625 New. Send command 'kill'.
10626 * target.h (kill_inferior): Removed macro.
10627 * tracepoint.c (gdb_agent_about_to_close): New.
10628 (gdb_agent_helper_thread): Handle command 'close'.
10629 Wait endlessly until the inferior stops.
10630 Install gdb_agent_remove_socket to atexit hook.
10631 (agent_socket_name): New static variable.
10632 (gdb_agent_socket_init): Replace local variable 'name' with
10633 'agent_socket_name'.
10634 (gdb_agent_remove_socket): New.
10635
5a3f286f
YQ
106362012-07-27 Yao Qi <yao@codesourcery.com>
10637
10638 * server.c (process_point_options): Stop at 'X' when parsing.
10639
961bd387
ME
106402012-07-19 Michael Eager <eager@eagercon.com>
10641
a261b8f5 10642 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10643 to hw_execute.
10644 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10645 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10646 hardware breakpoint.
10647
aa7c7447
JK
106482012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10649
10650 * gdbserver/linux-low.c (initialize_low): Call
10651 linux_ptrace_init_warnings.
10652
7f216e7c
DE
106532012-07-02 Doug Evans <dje@google.com>
10654
10655 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10656 pointer to int.
10657
d3ce09f5
SS
106582012-07-02 Stan Shebs <stan@codesourcery.com>
10659
10660 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10661 (ax.o): Add it to build rule.
10662 (ax-ipa.o): Ditto.
10663 (OBS): Add format.o.
10664 (IPA_OBS): Add format.o.
10665 * server.c (handle_query): Claim support for breakpoint commands.
10666 (process_point_options): Add command case.
10667 (process_serial_event): Leave running if there are printfs in
10668 effect.
10669 * mem-break.h (any_persistent_commands): Declare.
10670 (add_breakpoint_commands): Declare.
10671 (gdb_no_commands_at_breakpoint): Declare.
10672 (run_breakpoint_commands): Declare.
10673 * mem-break.c (struct point_command_list): New struct.
10674 (struct breakpoint): New field command_list.
10675 (any_persistent_commands): New function.
10676 (add_commands_to_breakpoint): New function.
10677 (add_breakpoint_commands): New function.
10678 (gdb_no_commands_at_breakpoint): New function.
10679 (run_breakpoint_commands): New function.
10680 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10681 locally.
10682 * ax.c: Include format.h.
10683 (ax_printf): New function.
10684 (gdb_eval_agent_expr): Add printf opcode.
10685
2f8f6aed
YQ
106862012-06-13 Yao Qi <yao@codesourcery.com>
10687
10688 * server.c (start_inferior): Remove duplicated writes to fields
10689 'last_resume_kind' and 'last_status' of 'current_inferior'.
10690
0c9070b3
YQ
106912012-06-12 Yao Qi <yao@codesourcery.com>
10692 Pedro Alves <palves@redhat.com>
10693
10694 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10695 comment.
10696 * server.c (handle_v_cont): Extend comment.
10697
c52daf70
YQ
106982012-06-11 Yao Qi <yao@codesourcery.com>
10699
10700 * linux-low.c (linux_attach): Add 'static'.
10701
d38bbb0a
YQ
107022012-06-06 Yao Qi <yao@codesourcery.com>
10703
10704 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10705
89dc0afd
JK
107062012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10707
10708 Fix gcc -flto compilation warning.
10709 * server.c (main): Make variable multi_mode and attach volatile.
10710
75f62ce7
TJB
107112012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10712
10713 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10714 if the platform doesn't know about it.
10715
65f479b6
PA
107162012-05-30 Jeff Kenton <jkenton@tilera.com>
10717
10718 * Makefile.in (SFILES): Add linux-tile-low.c.
10719 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10720 * configure.srv: Handle tilegx-*-linux*.
10721 * linux-tile-low.c: New file.
10722
0c5bf5a9
JK
107232012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10724
10725 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10726
a493e3e2
PA
107272012-05-24 Pedro Alves <palves@redhat.com>
10728
10729 PR gdb/7205
10730
43aaf8b6 10731 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10732
2ea28649
PA
107332012-05-24 Pedro Alves <palves@redhat.com>
10734
10735 PR gdb/7205
10736
10737 Replace target_signal with gdb_signal throughout.
10738
8d409d16
MR
107392012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10740
10741 * linux-low.c (linux_store_registers): Avoid the copying sequence
10742 when no data has been retrieved by ptrace.
10743
23512c01
MGD
107442012-05-22 Will Deacon <will.deacon@arm.com>
10745
10746 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10747 Include asm/ptrace.h.
10748 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10749 already defined.
10750
4934b29e
MR
107512012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10752
10753 * linux-low.c (linux_store_registers): Don't re-retrieve data
10754 with ptrace that has already been obtained from /proc. Always
10755 copy any data retrieved with ptrace to the buffer supplied.
10756
bde24c0a
PA
107572012-05-11 Yao Qi <yao@codesourcery.com>
10758 Pedro Alves <palves@redhat.com>
10759
10760 * linux-low.c (enum stopping_threads_kind): New.
10761 (stopping_threads): Change type to `enum stopping_threads_kind'.
10762 (handle_extended_wait): If stopping and suspending threads, leave
10763 the new_lwp suspended too.
10764 (linux_wait_for_event): Adjust.
10765 (stop_all_lwps): Set `stopping_threads' to
10766 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10767 whether we're suspending threads or just stopping them. Assert no
10768 recursion happens.
10769
623b6bdf
YQ
107702012-04-29 Yao Qi <yao@codesourcery.com>
10771
10772 * server.h: Move some code to ...
10773 * gdbthread.h: ... here. New.
10774 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10775 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10776 (nto-low.o, win32-low.o): Likewise.
10777 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10778 * regcache.c, remote-utils.c, server.c: Likewise.
10779 * target.c, tracepoint.c, win32-low.c: Likewise.
10780
f15f9948
TJB
107812012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10782
10783 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10784 (PTRACE_ARG4_TYPE): Likewise.
10785 (PTRACE_XFER_TYPE): Likewise.
10786 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10787 ptrace to PTRACE_ARG3_TYPE.
10788 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10789 (PTRACE_ARG4_TYPE): Likewise.
10790 (PTRACE_XFER_TYPE): Likewise.
10791 (linux_detach_one_lwp): Cast fourth argument of
10792 ptrace to long then PTRACE_ARG4_TYPE.
10793 (regsets_fetch_inferior_registers): Cast third argument of
10794 ptrace to long then PTRACE_ARG3_TYPE.
10795 (regsets_store_inferior_registers): Likewise.
10796
38ea300a
PA
107972012-04-20 Pedro Alves <palves@redhat.com>
10798
10799 * configure: Regenerate.
10800
c971b7fa
PA
108012012-04-19 Pedro Alves <palves@redhat.com>
10802
43aaf8b6 10803 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10804 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10805 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10806 (all, install-only, uninstall, clean-info, all-lib, clean): No
10807 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10808 (maintainer-clean realclean distclean): Use subdir_do.
10809 (subdir_do): New.
10810 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10811 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10812 * acinclude.m4: Include acx_configure_dir.m4.
10813 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10814 calls. Call AC_PROG_RANLIB. Configure gnulib using
10815 ACX_CONFIGURE_DIR.
10816 (GNULIB): New.
10817 (GNULIB_STDINT_H): Adjust.
10818 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10819 * gdbreplay.c: Include build-gnulib/config.h.
10820 * server.h: Likewise.
10821 * aclocal.m4: Regenerate.
10822 * config.in: Regenerate.
10823 * configure: Regenerate.
c971b7fa 10824
809277f8
PA
108252012-04-19 Pedro Alves <palves@redhat.com>
10826
10827 * Makefile.in (LIBGNU, INCGNU): Adjust.
10828 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10829 (all, install-only, uninstall, clean-info, all-lib, clean)
10830 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10831 * configure.ac: Adjust AC_OUTPUT output.
10832 * aclocal.m4: Regenerate.
10833 * configure: Regenerate.
10834
fd9bb8b8
PA
108352012-04-19 Pedro Alves <palves@redhat.com>
10836
10837 * Makefile.in (generated_files): New.
10838 (server_h): Remove the explicit dependency on config.h, and depend
10839 on $generated_files.
10840
1c298c66
PA
108412012-04-19 Pedro Alves <palves@redhat.com>
10842
10843 * Makefile.in (INCGNU): Add -Ignulib.
10844
57c4b50b
PA
108452012-04-19 Pedro Alves <palves@redhat.com>
10846
10847 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10848 (INCGNU): ... this, and spell out -I here.
10849 (GNULIB_LIB): Rename to ...
10850 (LIBGNU): ... this.
10851 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10852
1030e047
PA
108532012-04-19 Pedro Alves <palves@redhat.com>
10854
10855 * config.in: Regenerate.
10856
447d4319
PA
108572012-04-19 Pedro Alves <palves@redhat.com>
10858
10859 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10860 * server.h (memmem): Remove declaration.
10861 * config.in: Regenerate.
10862 * configure: Regenerate.
10863
aad9eab9
YQ
108642012-04-19 Yao Qi <yao@codesourcery.com>
10865
10866 * Makefile.in (SFILES): Add common/vec.c.
10867 (OBS): Add vec.o.
10868 (vec.o): New rule.
10869
3e10640f
YQ
108702012-04-19 Yao Qi <yao@codesourcery.com>
10871
10872 * remote-utils.c (prepare_resume_reply): Replace with macro
10873 target_core_of_thread.
10874 * server.c (handle_qxfer_threads_proper): Likewise.
10875 * target.h (traget_core_of_thread): New macro.
10876
71622373
PA
108772012-04-18 Pedro Alves <palves@redhat.com>
10878
10879 * aclocal.m4: Regenerate.
10880 * configure: Regenerate.
10881
80d26939
YQ
108822012-04-16 Yao Qi <yao@codesourcery.com>
10883
10884 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10885 duplicated on address.
10886
42476b70
YQ
108872012-04-16 Yao Qi <yao@codesourcery.com>
10888
10889 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10890 (struct tracepoint_action_ops) <send>: New field.
10891 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10892 (agent_expr_send, x_tracepoint_action_send): New.
10893 (l_tracepoint_action_send): New.
10894 (cmd_qtdp): Download and install tracepoint
10895 according to `use_agent'.
10896 (run_inferior_command): Add one more parameter `len'.
10897 Update callers.
10898 (tracepoint_send_agent): New.
10899 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10900
7bc83639
YQ
109012012-04-16 Yao Qi <yao@codesourcery.com>
10902
10903 * tracepoint.c (download_tracepoints): Moved to ...
10904 (cmd_qtstart): ... here.
10905
5f18041e
YQ
109062012-04-14 Yao Qi <yao@codesourcery.com>
10907
10908 * tracepoint.c: Include inttypes.h.
10909 (struct collect_memory_action): Use sized types.
10910 (struct tracepoint): Likewise.
10911 (cmd_qtdp, stop_tracing): Update print specifiers.
10912 (cmd_qtp, response_tracepoint): Likewise.
10913 (collect_data_at_tracepoint): Likewise.
10914 (collect_data_at_step): Likewise.
10915
55a8c076
YQ
109162012-04-14 Yao Qi <yao@codesourcery.com>
10917
10918 Import gnulib module inttypes.
10919 * aclocal.m4, config.in, configure: Regenerated.
10920
dc750257
YQ
109212012-04-14 Yao Qi <yao@codesourcery.com>
10922
10923 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10924 Makefile and config.status at last.
10925
0ab5faf9
YQ
109262012-04-13 Yao Qi <yao@codesourcery.com>
10927
10928 * tracepoint.c: Include stdint.h unconditionally.
10929
18f5fd81
TJB
109302012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10931
10932 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10933 on BFD_HAVE_SYS_PROCFS_TYPE.
10934 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10935 * configure: Regenerate.
10936 * config.in: Likewise.
10937
4d47af5c
L
109382012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10939
10940 * Makefile.in (clean): Also remove x32.c x32-linux.c
10941 x32-avx.c x32-avx-linux.c.
10942 (x32.o): New target.
10943 (x32.c): Likewise.
10944 (x32-linux.o): Likewise.
10945 (x32-linux.c): Likewise.
10946 (x32-avx.o): Likewise.
10947 (x32-avx.c): Likewise.
10948 (x32-avx-linux.o): Likewise.
10949 (x32-avx-linux.c): Likewise.
10950
10951 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10952 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10953 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10954 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10955 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10956 i386/x32-avx-linux.xml.
10957
10958 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10959 (init_registers_x32_avx_linux): Likwise.
10960 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10961 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10962
ecedbe58
PA
109632012-04-13 Pedro Alves <palves@redhat.com>
10964
10965 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10966 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10967 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10968 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10969 the sub-make.
10970
c92b5177
L
109712012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10972
10973 * linux-x86-low.c (compat_x32_clock_t): New.
10974 (compat_x32_siginfo_t): Likewise.
10975 (compat_x32_siginfo_from_siginfo): Likewise.
10976 (siginfo_from_compat_x32_siginfo): Likewise.
10977 (linux_is_elf64): Likewise.
10978 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10979 and siginfo_from_compat_x32_siginfo for x32.
10980 (x86_arch_setup): Set linux_is_elf64.
10981
214d508e
L
109822012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10983
10984 PR gdb/13969
10985 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10986 e_machine field.
10987 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10988 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10989 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10990 compatible with process.
10991
c9a1864a
YQ
109922012-04-12 Yao Qi <yao@codesourcery.com>
10993
10994 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10995 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10996 (install-only, install-info, clean): Handle sub dir gnulib.
10997 (all-lib, am--refresh): New targets.
10998 (memmem.o): Remove target.
10999 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11000 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11001 (AC_REPLACE_FUNCS): Remove memmem.
11002 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11003 (AC_OUTPUT): Generate Makefile in gnulib/.
11004 * aclocal.m4, config.in, configure: Regenerated.
11005
367ba2c2
MR
110062012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11007
11008 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11009
9d236627
PA
110102012-04-05 Pedro Alves <palves@redhat.com>
11011
11012 -Werror=strict-aliasing
11013
11014 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11015 pointer.
11016
111217b3
PA
110172012-04-04 Pedro Alves <palves@redhat.com>
11018
11019 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11020 (sparc_store_gregset_from_stack, sparc_store_gregset)
11021 (sparc_breakpoint_at): Fix formatting.
11022
8365dcf5
TJB
110232012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11024
11025 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11026 are available.
11027 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11028 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11029 * config.in: Regenerate.
11030 * configure: Likewise.
11031
689cc2ae
PA
110322012-03-29 Pedro Alves <palves@redhat.com>
11033
11034 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11035 Correct ptrace arguments.
11036
c14dfd32
PA
110372012-03-28 Pedro Alves <palves@redhat.com>
11038
11039 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11040 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11041 (IA64_FR1_REGNUM): New defines.
11042 (ia64_fetch_register): New.
11043 (the_low_target): Install it.
11044 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11045 field.
11046 * linux-low.c (linux_fetch_registers): Try the
11047 the_low_target.fetch_register hook first.
11048
11049 * linux-arm-low.c (the_low_target): Adjust.
11050 * linux-bfin-low.c (the_low_target): Adjust.
11051 * linux-cris-low.c (the_low_target): Adjust.
11052 * linux-crisv32-low.c (the_low_target): Adjust.
11053 * linux-m32r-low.c (the_low_target): Adjust.
11054 * linux-m68k-low.c (the_low_target): Adjust.
11055 * linux-mips-low.c (the_low_target): Adjust.
11056 * linux-ppc-low.c (the_low_target): Adjust.
11057 * linux-s390-low.c (the_low_target): Adjust.
11058 * linux-sh-low.c (the_low_target): Adjust.
11059 * linux-sparc-low.c (the_low_target): Adjust.
11060 * linux-tic6x-low.c (the_low_target): Adjust.
11061 * linux-x86-low.c (the_low_target): Adjust.
11062 * linux-xtensa-low.c (the_low_target): Adjust.
11063
63c88e13
PA
110642012-03-26 Pedro Alves <palves@redhat.com>
11065
11066 * server.c (handle_qxfer_libraries): Don't bail early if
11067 the_target->qxfer_libraries_svr4 is not NULL.
11068
fb723180
PA
110692012-03-26 Pedro Alves <palves@redhat.com>
11070
11071 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11072
0afae3cf
PA
110732012-03-23 Pedro Alves <palves@redhat.com>
11074
11075 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11076 "library-list-svr4" element's start tag when the the DSO list is
11077 empty.
11078
485f1ee4
PA
110792012-03-23 Pedro Alves <palves@redhat.com>
11080
11081 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11082 a variable whose type size is the same as the inferior's pointer
11083 size.
11084
a5362b9a
TS
110852012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11086
11087 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11088 struct siginfo.
11089 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11090 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11091 * linux-low.h: Include <signal.h>.
11092 (struct siginfo): Remove forward declaration.
11093 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11094 struct siginfo.
11095
d226c142
MF
110962012-03-21 Mike Frysinger <vapier@gentoo.org>
11097
11098 * .gitignore: Ignore more files.
11099
122f36ef
PA
111002012-03-19 Pedro Alves <palves@redhat.com>
11101 Jan Kratochvil <jan.kratochvil@redhat.com>
11102
11103 * server.c (cont_thread, general_thread): Add describing comments.
11104 (start_inferior): Clear `cont_thread'.
11105 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11106 of a process.
11107
fc3e5175
YQ
111082012-03-15 Yao Qi <yao@codesourcery.com>
11109
11110 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11111 handling to ...
11112 (cmd_qtdp): ... here.
11113
8d0d92cd
YQ
111142012-03-15 Yao Qi <yao@codesourcery.com>
11115
11116 * tracepoint.c (struct tracepoint_action_ops): New.
11117 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11118 (m_tracepoint_action_download): New.
11119 (r_tracepoint_action_download): New.
11120 (x_tracepoint_action_download): New.
11121 (l_tracepoint_action_download): New.
11122 (add_tracepoint_action): Install `action->ops' according type.
11123 (download_tracepoint_1): Move code `download' function pointer
11124 of various tracepoint_action_ops.
11125
87b0bb13
JK
111262012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11127
11128 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11129 linux_ptrace_attach_warnings.
11130
5f572dec
JK
111312012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11132
11133 * Makefile.in (linux-ptrace.o): New.
11134 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11135 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11136 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11137 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11138 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11139 of these targets.
11140 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11141
f4647387
YQ
111422012-03-08 Yao Qi <yao@codesourcery.com>
11143 Pedro Alves <palves@redhat.com>
11144
11145 Fix PR server/13392.
11146 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11147 offset of JMP insn.
11148 * tracepoint.c (remove_tracepoint): New.
11149 (cmd_qtdp): Call remove_tracepoint when failed to install.
11150
9b224c5e
PA
111512012-03-07 Pedro Alves <palves@redhat.com>
11152
11153 * linux-low.c (get_detach_signal): New.
11154 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11155 Pass on pending signals to PTRACE_DETACH. Check the result of the
11156 ptrace call.
11157 * server.c (program_signals, program_signals_p): New.
11158 (handle_general_set): Handle QProgramSignals.
11159 * server.h (program_signals, program_signals_p): Declare.
11160
e237a7e2
JK
111612012-03-05 Pedro Alves <palves@redhat.com>
11162 Jan Kratochvil <jan.kratochvil@redhat.com>
11163
11164 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11165 New comment why.
11166
5808517f
YQ
111672012-03-03 Yao Qi <yao@codesourcery.com>
11168
11169 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11170 agent_look_up_symbols.
11171
58b4daa5
YQ
111722012-03-03 Yao Qi <yao@codesourcery.com>
11173
11174 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11175 (linux-x86-low.o): Likewise.
11176 * server.h: Remove in_process_agent_loaded.
11177 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11178 common/agent.c.
11179 Update callers.
11180
8ffcbaaf
YQ
111812012-03-03 Yao Qi <yao@codesourcery.com>
11182
11183 * tracepoint.c (gdb_agent_capability): New global.
11184 (in_process_agent_loaded_ust): Renamed to
11185 `in_process_agent_supports_ust'.
11186 Update callers.
11187 (in_process_agent_supports_ust): Call agent_capability_check.
11188 (clear_installed_tracepoints): Assert that agent supports
11189 agent.
11190
d1feda86
YQ
111912012-03-03 Yao Qi <yao@codesourcery.com>
11192
11193 * linux-low.c (linux_supports_agent): New.
11194 (linux_target_ops): Initialize field `supports_agent' with
11195 linux_supports_agent.
11196 * target.h (struct target_ops) <supports_agent>: New.
11197 (target_supports_agent): New macro.
11198 * server.c (handle_general_set): Handle packet 'QAgent'.
11199 (handle_query): Send `QAgent+'.
11200 * Makefile.in (server.o): Depends on agent.h.
11201
2fa291ac
YQ
112022012-03-03 Yao Qi <yao@codesourcery.com>
11203
11204 * Makefile.in (OBS): Add agent.o.
11205 Add new rule for agent.o.
11206 Track dependence of tracepoint.c on agent.h.
11207 * tracepoint.c (run_inferior_command_1):
11208 (run_inferior_command): Call agent_run_command.
11209 (gdb_ust_connect_sync_socket): Deleted. Move it to
11210 common/agent.c.
11211 (resume_thread, stop_thread): Likewise.
11212 (gdb_ust_socket_init): Renamed to ...
11213 (gdb_agent_socket_init): ... New.
11214 (gdb_ust_thread): Renamed to ...
11215 (gdb_agent_helper_thread): ... New.
11216 (gdb_ust_init): Move some code to ...
11217 (gdb_agent_init): ... here. New.
11218 [HAVE_UST]: Call gdb_ust_init.
11219 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11220 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11221 * config.in, configure: Regenerated.
11222
05044653
PA
112232012-03-02 Pedro Alves <palves@redhat.com>
11224
11225 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11226 * linux-low.c (struct simple_pid_list): New.
11227 (stopped_pids): New a struct simple_pid_list pointer.
11228 (add_to_pid_list, pull_pid_from_list): New.
11229 (handle_extended_wait): Don't assume the first signal new children
11230 report is SIGSTOP. Adjust call to pull_pid_from_list.
11231 (linux_wait_for_lwp): Adjust.
11232
8d00225b
YQ
112332012-03-02 Yao Qi <yao@codesourcery.com>
11234
11235 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11236 debug log.
11237
19560ba5
YQ
112382012-03-02 Yao Qi <yao@codesourcery.com>
11239
11240 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11241 `stop_pc' and `tpoint'. Update caller.
11242
1faeff08
MR
112432012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11244
11245 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11246 * linux-low.c (use_linux_regsets): New macro.
11247 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11248 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11249 (linux_register_in_regsets): New function.
11250 (usr_fetch_inferior_registers): Skip registers covered by
11251 regsets.
11252 (usr_store_inferior_registers): Likewise.
11253 (usr_fetch_inferior_registers): New macro.
11254 (usr_store_inferior_registers): Likewise.
11255 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11256 (linux_store_registers): Likewise.
11257 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11258 prototype.
11259 (init_registers_mips64_dsp_linux): Likewise.
11260 (init_registers_mips_linux): New macro.
11261 (init_registers_mips_dsp_linux): Likewise.
11262 (mips_dsp_num_regs): Likewise.
11263 (DSP_BASE, DSP_CONTROL): New fallback macros.
11264 (mips_base_regs): New macro.
11265 (mips_regmap): Use it. Fix the size.
11266 (mips_dsp_regmap): New variable.
11267 (mips_dsp_regset_bitmap): Likewise.
11268 (mips_arch_setup): New function.
11269 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11270 than mips_regmap.
11271 (mips_cannot_store_register): Likewise.
11272 (the_low_target): Update .arch_setup, .num_regs and .regmap
11273 initializers. Add .regset_bitmap initializer.
11274 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11275 initializer.
11276 * linux-bfin-low.c (the_low_target): Likewise.
11277 * linux-cris-low.c (the_low_target): Likewise.
11278 * linux-crisv32-low.c (the_low_target): Likewise.
11279 * linux-ia64-low.c (the_low_target): Likewise.
11280 * linux-m32r-low.c (the_low_target): Likewise.
11281 * linux-m68k-low.c (the_low_target): Likewise.
11282 * linux-ppc-low.c (the_low_target): Likewise.
11283 * linux-s390-low.c (the_low_target): Likewise.
11284 * linux-sh-low.c (the_low_target): Likewise.
11285 * linux-sparc-low.c (the_low_target): Likewise.
11286 * linux-tic6x-low.c (the_low_target): Likewise.
11287 * linux-x86-low.c (the_low_target): Likewise.
11288 * linux-xtensa-low.c (the_low_target): Likewise.
11289 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11290 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11291 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11292 srv_xmlfiles.
11293 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11294 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11295
c03e6ccc
YQ
112962012-02-29 Yao Qi <yao@codesourcery.com>
11297 Pedro Alves <palves@redhat.com>
11298
11299 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11300 `step_over_finished' is true.
11301
644cebc9
PA
113022012-02-27 Pedro Alves <palves@redhat.com>
11303
11304 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11305 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11306
c14d7ab2
PA
113072012-02-27 Pedro Alves <palves@redhat.com>
11308
11309 PR server/9684
11310 * linux-low.c (pid_is_stopped): New.
11311 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11312
412c89dd
LM
113132012-02-25 Luis Machado <lgustavo@codesourcery.com>
11314
11315 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11316 of conditions.
11317
b745defe
MR
113182012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11319
11320 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11321
9f3a5c85
LM
113222012-02-24 Luis Machado <lgustavo@codesourcery>
11323
11324 * server.c (handle_query): Advertise support for target-side
11325 breakpoint condition evaluation.
11326 (process_point_options): New function.
11327 (process_serial_event): When inserting a breakpoint, check for
11328 a target-side condition that should be evaluated.
11329
11330 * mem-break.c: Include regcache.h and ax.h.
11331 (point_cond_list_t): New data structure.
11332 (breakpoint) <cond_list>: New field.
11333 (find_gdb_breakpoint_at): Make non-static.
11334 (delete_gdb_breakpoint_at): Clear any target-side
11335 conditions.
11336 (clear_gdb_breakpoint_conditions): New function.
11337 (add_condition_to_breakpoint): Likewise.
11338 (add_breakpoint_condition): Likewise.
11339 (gdb_condition_true_at_breakpoint): Likewise.
11340 (gdb_breakpoint_here): Return result directly instead
11341 of going through a local variable.
11342
11343 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11344 (clear_gdb_breakpoint_conditions): Likewise.
11345 (add_breakpoint_condition): Likewise.
11346 (gdb_condition_true_at_breakpoint): Likewise.
11347
11348 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11349 (need_step_over_p): Take target-side breakpoint condition into
11350 consideration.
11351
5e1dc496
LM
113522012-02-24 Luis Machado <lgustavo@codesourcery>
11353
11354 * server.h: Include tracepoint.h.
11355 (agent_mem_read, agent_get_trace_state_variable_value,
11356 agent_set_trace_state_variable_value,
11357 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11358 get_set_tsv_func_addr): New prototypes.
11359
11360 * ax.h: New include file.
11361 * ax.c: New source file.
11362
11363 * tracepoint.c: Include ax.h.
11364 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11365 agent_expr, eval_result_type): Move to ax.h.
11366 (parse_agent_expr): Rename to ...
11367 (gdb_parse_agent_expr): ... this, make it non-static and move
11368 to ax.h.
11369 (unparse_agent_expr) Rename to ...
11370 (gdb_unparse_agent_expr): ... this, make it non-static and move
11371 to ax.h.
11372 (eval_agent_expr): Rename to ...
11373 (eval_tracepoint_agent_expr): ... this.
11374 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11375 forward declarations.
11376 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11377 (agent_get_trace_state_variable_value): New function.
11378 (agent_set_trace_state_variable_value): New function.
11379 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11380 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11381 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11382 (condition_true_at_tracepoint): Likewise.
11383 (parse_agent_expr): Rename to ...
11384 (gdb_parse_agent_expr): ... this and move to ax.c.
11385 (unparse_agent_expr): Rename to ...
11386 (gdb_unparse_agent_expr): ... this and move to ax.c.
11387 (gdb_agent_op_name): Move to ax.c.
11388 (eval_agent_expr): Rename to ...
11389 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11390 and move to ax.c.
11391 (eval_tracepoint_agent_expr): New function.
11392 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11393 non-static.
5e1dc496
LM
11394 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11395 ax.c.
11396 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11397 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11398 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11399 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11400 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11401 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11402 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11403 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11404 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11405 (compile_bytecodes): Remove forward declaration.
11406 (is_goto_target): Move to ax.c.
11407 (compile_bytecodes): Move to ax.c and call
11408 agent_get_trace_state_variable_value (...) and
11409 agent_set_trace_state_variable_value (...).
11410
11411 * Makefile.in: Update ax.c and IPA dependencies.
11412
277e4e52
PA
114132012-02-24 Pedro Alves <palves@redhat.com>
11414
11415 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11416 (cmd_bigqtbuffer_circular): ... this. Only handle
11417 'QTBuffer:circular:'.
11418 (handle_tracepoint_general_set): Adjust.
11419
bf4c19f7
YQ
114202012-02-16 Yao Qi <yao@codesourcery.com>
11421
11422 * inferiors.c: Move code to ...
11423 * dll.c: .... here. New.
11424 * server.h: Declare clear_dlls.
11425 * Makefile.in (SFILES): Add dll.c.
11426 (OBS): Add dll.o
11427 (dll.o): New rule.
11428
d73f2619
YQ
114292012-02-11 Yao Qi <yao@codesourcery.com>
11430
11431 * server.c: (handle_monitor_command): Add a new parameter
11432 `own_buf'.
11433 (handle_query): Update caller.
11434
f8255c2a
JB
114352012-02-09 Joel Brobecker <brobecker@adacore.com>
11436
11437 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11438 * configure, config.in: Regenerate.
11439 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11440 is not defined.
11441
da84f473
PA
114422012-02-02 Pedro Alves <palves@redhat.com>
11443
11444 Try SIGKILL first, then PTRACE_KILL.
11445 * linux-low.c (linux_kill_one_lwp): New.
11446 (linux_kill_one_lwp): Rename to ...
11447 (kill_one_lwp_callback): ... this. Use the new
11448 linux_kill_one_lwp.
11449
e886a173
PA
114502012-02-02 Pedro Alves <palves@redhat.com>
11451
11452 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11453 inferior.
11454
be07f1a2
PA
114552012-01-27 Pedro Alves <palves@redhat.com>
11456
11457 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11458 (elf_64_file_p): Make static.
11459 (linux_pid_exe_is_elf_64_file): New.
11460 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11461 Delete declarations.
11462 (linux_pid_exe_is_elf_64_file): Declare.
11463 * linux-x86-low.c (x86_arch_setup): Use
11464 linux_pid_exe_is_elf_64_file.
11465
d8301ad1
JK
114662012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11467
11468 * linux-low.c (linux_wait_for_event_1): Rename to ...
11469 (linux_wait_for_event): ... here and merge it with former
11470 linux_wait_for_event - new variable wait_ptid, use it.
11471 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11472
01b17894
PA
114732012-01-23 Pedro Alves <palves@redhat.com>
11474
11475 * server.c (main): Avoid yet another case of infinite loop while
11476 detaching/killing after a longjmp.
11477
e825046f
JK
114782012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11479
11480 Code cleanup.
11481 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11482
b9e7b9c3
UW
114832012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11484
11485 * hostio.c (handle_readlink): New function.
11486 (handle_vFile): Call it to handle "vFile:readlink" packets.
11487
901f9912
UW
114882012-01-20 Pedro Alves <palves@redhat.com>
11489 Ulrich Weigand <ulrich.weigand@linaro.org>
11490
11491 * server.c (handle_v_requests): Only support vAttach and vRun to
11492 start multiple processes when in extended protocol mode.
11493
fc1ab1a0
PA
114942012-01-17 Pedro Alves <palves@redhat.com>
11495
11496 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11497 memalign plus mprotect to allocate the scratch buffer.
11498
7d5d4e98
PA
114992012-01-13 Pedro Alves <palves@redhat.com>
11500
11501 * server.c (attach_inferior): Clear `cont_thread'.
11502
f128d5e9
PA
115032012-01-13 Pedro Alves <palves@redhat.com>
11504
11505 * server.c (main): Avoid infinite loop while detaching/killing
11506 after a longjmp.
11507
06db92f0
DE
115082012-01-09 Doug Evans <dje@google.com>
11509
11510 * server.c (start_inferior): Set last_ptid in --wrapper case.
11511
32d92999
YQ
115122012-01-06 Yao Qi <yao@codesourcery.com>
11513
11514 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11515 defined.
11516 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11517
5e0a92a9
YQ
115182012-01-04 Yao Qi <yao@codesourcery.com>
11519
11520 * tracepoint.c (cmd_qtdp): Print debug message
11521 for static tracepoint.
11522
ae639e8c
YQ
115232012-01-04 Yao Qi <yao@codesourcery.com>
11524
11525 * tracepoint.c (trace_vdebug): Differentiate debug message
11526 between gdbserver and IPA.
11527
f72429c5
YQ
115282012-01-03 Yao Qi <yao@codesourcery.com>
11529
11530 * tracepoint.c (tracepoint_was_hit): Don't collect for
11531 static tracepoint.
11532
12c3e59c
JB
115332012-01-02 Joel Brobecker <brobecker@adacore.com>
11534
11535 * terminal.h: Reformat copyright header.
11536
67827812
JB
115372012-01-02 Joel Brobecker <brobecker@adacore.com>
11538
11539 * server.c (gdbserver_version): Update copyright year.
11540 * gdbreplay.c (gdbreplay_version): Likewise.
11541
3e52c33d
JK
115422011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11543
11544 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11545
11546 Revert:
11547 2011-12-18 Hui Zhu <teawater@gmail.com>
11548 * linux-low.c (linux_create_inferior): Save return value to ret.
11549
66f1260e
HZ
115502011-12-18 Hui Zhu <teawater@gmail.com>
11551
11552 * linux-low.c (linux_create_inferior): Save return value to ret.
11553
e77616d7
DE
115542011-12-16 Doug Evans <dje@google.com>
11555
e7b06c57
DE
11556 * linux-low.c (linux_create_inferior): If stdio connection,
11557 redirect stdin from /dev/null, stdout to stderr.
11558 * remote-utils.c (remote_is_stdio): New static global.
11559 (remote_connection_is_stdio): New function.
11560 (remote_prepare): Handle stdio connection.
11561 (remote_open): Ditto.
11562 (remote_close): Don't close stdin for stdio connections.
11563 (read_prim,write_prim): New functions. Replace all calls to
11564 read/write to these.
11565 * server.c (main): Watch for "-" argument. Move call to
11566 remote_prepare before start_inferior.
11567 * server.h (STDIO_CONNECTION_NAME): New macro.
11568 (remote_connection_is_stdio): Declare.
11569
e77616d7
DE
11570 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11571 in debugging output.
11572
82067193
YQ
115732011-12-15 Yao Qi <yao@codesourcery.com>
11574
11575 * tracepoint.c: Include sys/syscall.h.
11576 (gdb_ust_thread): Remove preprocessor conditional.
11577
82bfbe7e
PA
115782011-12-14 Pedro Alves <pedro@codesourcery.com>
11579
11580 * linux-low.c (linux_detach_one_lwp): Call
11581 the_low_target.prepare_to_resume before detaching.
11582
712c6575
YQ
115832011-12-14 Yao Qi <yao@codesourcery.com>
11584
11585 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11586 of write.
11587
d54d1edf
YQ
115882011-12-14 Yao Qi <yao@codesourcery.com>
11589
11590 * i386-low.c (i386_low_stopped_data_address): Initialize local
11591 variable `control'.
11592
6210a125
PA
115932011-12-13 Pedro Alves <pedro@codesourcery.com>
11594
11595 PR remote/13492
11596
11597 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11598 DR_CONTROL unless necessary. Extend comments.
11599 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11600 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11601
2ece8244
YQ
116022011-12-13 Yao Qi <yao@codesourcery.com>
11603
11604 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11605 macros.
11606 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11607
784867a5
JK
116082011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11609
11610 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11611 Print new debug message for such case.
11612
6bf36717
JK
116132011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11614
11615 Fix overlapping memcpy.
11616 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11617 the read_inferior_memory transfer.
11618 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11619 write_inferior_memory transfer.
11620 (set_fast_tracepoint_jump): New variable buf. Use it for the
11621 read_inferior_memory and write_inferior_memory transfers.
11622 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11623 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11624 Use it for the write_inferior_memory transfer.
11625 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11626 buffers.
11627
50275556
MR
116282011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11629
11630 * linux-low.c (fetch_register, store_register): Make code
11631 consistent, fix formatting.
11632
7325beb4
MR
116332011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11634
11635 * linux-low.c (usr_store_inferior_registers): Factor out code
11636 to handle individual registers into...
11637 (store_register): ... this new function.
11638
c642a434
UW
116392011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11640
11641 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11642 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11643 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11644 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11645 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11646 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11647 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11648 (srv_xmlfiles): Add new XML files.
11649
11650 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11651 and <sys/uio.h>.
11652 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11653 (init_registers_s390_linux32v1): Add prototype.
11654 (init_registers_s390_linux32v2): Likewise.
11655 (init_registers_s390_linux64v1): Likewise.
11656 (init_registers_s390_linux64v2): Likewise.
11657 (init_registers_s390x_linux64v1): Likewise.
11658 (init_registers_s390x_linux64v2): Likewise.
11659 (s390_num_regs): Increment to 52.
11660 (s390_regmap): Add orig_r2 register.
11661 (s390_num_regs_3264): Increment to 68.
11662 (s390_regmap_3264): Add orig_r2 register.
11663 (s390_collect_ptrace_register): Handle orig_r2 register.
11664 (s390_supply_ptrace_register): Likewise.
11665 (s390_fill_last_break): New function.
11666 (s390_store_last_break): Likewise.
11667 (s390_fill_system_call): New function.
11668 (s390_store_system_call): Likewise.
11669 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11670 register sets.
11671 (s390_check_regset): New function.
11672 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11673 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11674 Update target_regsets for available register sets.
11675
2268b414
JK
116762011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11677 Jan Kratochvil <jan.kratochvil@redhat.com>
11678
11679 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11680 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11681 New.
11682 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11683 * linux-low.h (struct process_info_private): New member r_debug.
11684 * server.c (handle_qxfer_libraries): Call
11685 the_target->qxfer_libraries_svr4.
11686 (handle_qxfer_libraries_svr4): New function.
11687 (qxfer_packets): New entry "libraries-svr4".
11688 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11689 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11690 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11691 PACKET_qXfer_libraries_svr4.
11692
d6db1fab
UW
116932011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11694
11695 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11696 PSW address/mask between 8-byte and 16-byte formats.
11697 (s390_supply_ptrace_register): Likewise.
11698 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11699 basic addressing mode bit.
11700
242f5f1c
SS
117012011-11-24 Stan Shebs <stan@codesourcery.com>
11702
11703 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11704
f196051f
SS
117052011-11-17 Stan Shebs <stan@codesourcery.com>
11706
11707 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11708 (tracing_start_time): New global.
11709 (tracing_stop_time): New global.
11710 (tracing_user_name): New global.
11711 (tracing_notes): New global.
11712 (tracing_stop_note): New global.
11713 (cmd_qtstart): Set traceframe_usage, start_time.
11714 (stop_tracing): Set stop_time.
11715 (cmd_qtstatus): Report additional status.
11716 (cmd_qtp): New function.
11717 (handle_tracepoint_query): Call it.
11718 (cmd_qtnotes): New function.
11719 (handle_tracepoint_general_set): Call it.
11720 (get_timestamp): Rename from tsv_get_timestamp.
11721
405f8e94
SS
117222011-11-14 Stan Shebs <stan@codesourcery.com>
11723 Kwok Cheung Yeung <kcy@codesourcery.com>
11724
11725 * linux-x86-low.c (small_jump_insn): New.
11726 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11727 trampoline and error message, build a trampoline and issue a small
11728 jump instruction to it.
11729 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11730 trampoline and error message.
11731 (x86_get_min_fast_tracepoint_insn_len): New.
11732 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11733 * linux-low.h (struct linux_target_ops): Add arguments to
11734 install_fast_tracepoint_jump_pad operation, add new operation.
11735 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11736 arguments.
11737 (linux_get_min_fast_tracepoint_insn_len): New function.
11738 (linux_target_op): Add new operation.
11739 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11740 (gdb_trampoline_buffer_end): Ditto.
11741 (gdb_trampoline_buffer_error): Ditto.
11742 (struct ipa_sym_addresses): Add fields for new IPA variables.
11743 (symbol_list): Add entries for new IPA variables.
11744 (struct tracepoint): Add fields to hold the address range of the
11745 trampoline used by the tracepoint.
11746 (trampoline_buffer_head): New static variable.
11747 (trampoline_buffer_tail): Ditto.
11748 (claim_trampoline_space): New function.
11749 (have_fast_tracepoint_trampoline_buffer): New function.
11750 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11751 structure.
11752 (install_fast_tracepoint): Ditto, also add error buffer argument.
11753 (cmd_qtminftpilen): New function.
11754 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11755 (fast_tracepoint_from_trampoline_address): New function.
11756 (fast_tracepoint_collecting): Handle trampoline as part of jump
11757 pad space.
11758 (set_trampoline_buffer_space): New function.
11759 (initialize_tracepoint): Initialize new IPA variables.
11760 * target.h (struct target_ops): Add arguments to
11761 install_fast_tracepoint_jump_pad operation, add new
11762 get_min_fast_tracepoint_insn_len operation.
11763 (target_get_min_fast_tracepoint_insn_len): New.
11764 (install_fast_tracepoint_jump_pad): Add arguments.
11765 * server.h (IPA_BUFSIZ): Define.
11766 * linux-i386-ipa.c: Include extra header files.
11767 (initialize_fast_tracepoint_trampoline_buffer): New function.
11768 (initialize_low_tracepoint): Call it.
11769 * server.h (set_trampoline_buffer_space): Declare.
11770 (claim_trampoline_space): Ditto.
11771 (have_fast_tracepoint_trampoline_buffer): Ditto.
11772
1e4d1764
YQ
117732011-11-14 Yao Qi <yao@codesourcery.com>
11774
11775 * server.c (handle_query): Handle InstallInTrace for qSupported.
11776 * tracepoint.c (add_tracepoint): Sort list.
11777 (install_tracepoint, download_tracepoint): New.
11778 (cmd_qtdp): Call them to install and download tracepoints.
11779 (sort_tracepoints): Removed.
11780 (cmd_qtstart): Update.
11781
5c73ff4e
YQ
117822011-11-14 Yao Qi <yao@codesourcery.com>
11783
11784 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11785 * mem-break.h: Declare.
11786 * tracepoint.c (cmd_qtstart): Move some code to ...
11787 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11788 New.
11789 (download_tracepoints): Move some code to ...
11790 (download_tracepoint_1): ... here. New.
11791
86a30030
YQ
117922011-11-08 Yao Qi <yao@codesourcery.com>
11793
11794 * remote-utils.c (relocate_instruction): A comment fix.
11795
8d26e50c
JB
117962011-11-07 Joel Brobecker <brobecker@adacore.com>
11797
11798 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11799 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11800 dr_status_mirror and dr_control_mirror from debug_reg_state.
11801 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11802 (i386_initial_stuff): Remove use of deleted globals.
11803 (i386_get_thread_context, i386_set_thread_context,
11804 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11805 from debug_reg_state.
11806
a59306a3
YQ
118072011-11-05 Yao Qi <yao@codesourcery.com>
11808
11809 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11810 address as TPOINT's.
11811
3065dfb6
SS
118122011-11-02 Stan Shebs <stan@codesourcery.com>
11813
11814 * tracepoint.c (agent_mem_read_string): New function.
11815 (eval_agent_expr): Call it for tracenz.
11816 * server.c (handle_query): Report support for tracenz.
11817
fd0d8c7c
YQ
118182011-11-02 Yao Qi <yao@codesourcery.com>
11819
11820 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11821
609086b1
YQ
118222011-11-02 Yao Qi <yao@codesourcery.com>
11823
11824 * target.h: Fix a typo in comment.
11825
b9fd1791
PA
118262011-10-31 Pedro Alves <pedro@codesourcery.com>
11827
11828 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11829 clobber the breakpoints' shadows with fast tracepoint jumps.
11830 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11831 * target.c (write_inferior_memory): Also pass MYADDR down to
11832 check_mem_write.
11833
03583c20
UW
118342011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11835
11836 * configure.ac: Check support for personality routine.
11837 * configure: Regenerate.
11838 * config.in: Likewise.
11839 * linux-low.c: Include <sys/personality.h>.
11840 Define ADDR_NO_RANDOMIZE if necessary.
11841 (linux_create_inferior): Disable address space randomization when
11842 forking inferior, if requested.
11843 (linux_supports_disable_randomization): New function.
11844 (linux_target_ops): Install it.
11845 * server.h (disable_randomization): Declare.
11846 * server.c (disable_randomization): New global variable.
11847 (handle_general_set): Handle QDisableRandomization.
11848 (handle_query): Likewise for qSupported.
11849 (main): Support --disable-randomization and --no-disable-randomization
11850 command line arguments.
11851 * target.h (struct target_ops): Add supports_disable_randomization.
11852 (target_supports_disable_randomization): New macro.
11853
723b724b
MF
118542011-09-29 Mike Frysinger <vapier@gentoo.org>
11855
11856 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11857 ifdef check.
11858 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11859 [!PT_GETDSBT] (target_loadmap): New definition.
11860 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11861 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11862 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11863 and PT_GETDSBT to LINUX_LOADMAP.
11864 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11865 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11866
55329a5c 118672011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11868
11869 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11870 (arm_linux_hwbp_cap): New static variable.
11871 (arm_linux_get_hwbp_cap): Replace by ...
11872 (arm_linux_init_hwbp_cap): ... this new function.
11873 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11874 (arm_linux_get_hw_watchpoint_count): Likewise.
11875 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11876 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11877 (arm_prepare_to_resume): Use perror_with_name instead of error.
11878
55329a5c 118792011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11880
11881 * linux-arm-low.c: Include <signal.h>.
11882 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11883 (struct arm_linux_hwbp_cap): New data type.
11884 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11885 (struct arm_linux_hw_breakpoint): New data type.
11886 (MAX_BPTS, MAX_WPTS): Define.
11887 (struct arch_process_info, struct arch_lwp_info): New data types.
11888 (arm_linux_get_hwbp_cap): New function.
11889 (arm_linux_get_hw_breakpoint_count): Likewise.
11890 (arm_linux_get_hw_watchpoint_count): Likewise.
11891 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11892 (arm_hwbp_control_initialize): Likewise.
11893 (arm_hwbp_control_is_enabled): Likewise.
11894 (arm_hwbp_control_is_initialized): Likewise.
11895 (arm_hwbp_control_disable): Likewise.
11896 (arm_linux_hw_breakpoint_equal): Likewise.
11897 (arm_linux_hw_point_initialize): Likewise.
11898 (struct update_registers_data): New data structure.
11899 (update_registers_callback: New function.
11900 (arm_insert_point): Likewise.
11901 (arm_remove_point): Likewise.
11902 (arm_stopped_by_watchpoint): Likewise.
11903 (arm_stopped_data_address): Likewise.
11904 (arm_new_process): Likewise.
11905 (arm_new_thread): Likewise.
11906 (arm_prepare_to_resume): Likewise.
11907 (the_low_target): Register arm_insert_point, arm_remove_point,
11908 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11909 arm_new_thread, and arm_prepare_to_resume.
11910
6b9801d4
SS
119112011-09-15 Stan Shebs <stan@codesourcery.com>
11912
11913 * server.h (struct emit_ops): Add compare-goto fields.
11914 * tracepoint.c (gdb_agent_op_sizes): New table.
11915 (emit_eq_goto): New function.
11916 (emit_ne_goto): New function.
11917 (emit_lt_goto): New function.
11918 (emit_le_goto): New function.
11919 (emit_gt_goto): New function.
11920 (emit_ge_goto): New function.
11921 (is_goto_target): New function.
11922 (compile_bytecodes): Recognize special cases of compare-goto
11923 combinations and call specialized emitters for them.
11924 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11925 (amd64_emit_ne_goto): New function.
11926 (amd64_emit_lt_goto): New function.
11927 (amd64_emit_le_goto): New function.
11928 (amd64_emit_gt_goto): New function.
11929 (amd64_emit_ge_goto): New function.
11930 (amd64_emit_ops): Add the new functions.
11931 (i386_emit_eq_goto): New function.
11932 (i386_emit_ne_goto): New function.
11933 (i386_emit_lt_goto): New function.
11934 (i386_emit_le_goto): New function.
11935 (i386_emit_gt_goto): New function.
11936 (i386_emit_ge_goto): New function.
11937 (i386_emit_ops): Add the new functions.
11938
bf15cbda
SS
119392011-09-08 Stan Shebs <stan@codesourcery.com>
11940
11941 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11942 (i386_emit_epilogue): Restore %ebx.
11943
943ca1dd
JZ
119442011-08-31 Jie Zhang <jzhang918@gmail.com>
11945
11946 * server.c (step_thread): Remove definition.
11947 (process_serial_event): Don't handle Hs.
11948 * server.h (step_thread): Remove declaration.
11949 * target.c (set_desired_inferior): Remove use of step_thread.
11950
e3deef73
LM
119512011-08-24 Luis Machado <lgustavo@codesourcery.com>
11952
11953 * linux-low.c: Include linux-procfs.h.
11954 (linux_attach_lwp_1): Update comments.
11955 (linux_attach): Scan for existing threads when attaching to a
11956 process that is the tgid.
11957 * Makefile.in: Update dependencies.
11958
13da1c97
LM
119592011-08-24 Luis Machado <lgustavo@codesourcery.com>
11960
11961 * configure.srv: Add linux-procfs.o dependencies.
11962
881127c9
YQ
119632011-08-14 Yao Qi <yao@codesourcery.com>
11964
11965 * target.h (struct target_ops): Fix indent.
11966 * win32-low.c (win32_target_ops): Fix comment.
11967
58dbd541
YQ
119682011-08-14 Andrew Jenner <andrew@codesourcery.com>
11969 Yao Qi <yao@codesourcery.com>
11970
11971 * Makefile.in (clean): Remove tic6x-*.c files.
11972 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11973 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11974 (tic6x-c64xp-linux.c): Likewise.
11975 * configure.srv: Add support for tic6x-*-uclinux.
11976 * linux-tic6x-low.c: New.
11977 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11978
78d85199
YQ
119792011-08-14 Andrew Stubbs <ams@codesourcery.com>
11980 Yao Qi <yao@codesourcery.com>
11981
11982 * target.h (struct target_ops): Add read_loadmap.
11983 * linux-low.c (struct target_loadseg): New type.
11984 (struct target_loadmap): New type.
11985 (linux_read_loadmap): New function.
11986 (linux_target_ops): Add linux_read_loadmap.
11987 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11988 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11989 to NULL.
78d85199 11990
a959a88d
EZ
119912011-08-05 Eli Zaretskii <eliz@gnu.org>
11992
11993 * win32-low.c: Include <stdint.h>.
11994
1ced966e
PA
119952011-07-22 Pedro Alves <pedro@codesourcery.com>
11996
11997 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11998 to the inferior here.
11999 (i386_remove_aligned_watchpoint): Ditto.
12000 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12001 fit part of the watchpoint in the debug registers.
12002 (i386_update_inferior_debug_regs): New.
12003 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12004 registers, and only update the inferior on success.
12005 (i386_low_remove_watchpoint): Ditto.
12006
d26e3629
KY
120072011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12008
12009 * linux-low.c (compare_ints, unique, list_threads, show_process,
12010 linux_core_of_thread): Delete.
12011 (linux_target_ops): Change linux_core_of_thread to
12012 linux_common_core_of_thread.
12013 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12014 * utils.c (malloc_failure): Change type of argument.
12015 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12016 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12017 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12018 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12019 (IPA_OBJS): Add common-utils-ipa.o.
12020 (ptid_h, linux_osdata_h): New macros.
12021 (server_h): Add common/common-utils.h, common/xml-utils.h,
12022 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12023 common/ptid.h.
12024 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12025 ptid.o, buffer.o): New rules.
12026 (linux-low.o): Add common/linux-osdata.h as a dependency.
12027 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12028 * configure.ac: Add AC_HEADER_DIRENT check.
12029 * config.in: Regenerate.
12030 * configure: Regenerate.
12031 * remote-utils.c (xml_escape_text): Delete.
12032 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12033 buffer_xml_printf): Move to common/buffer.c.
12034 * server.c (main): Remove call to initialize_inferiors.
12035 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12036 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12037 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12038 internal_error, gdb_assert, gdb_assert_fail): Delete.
12039 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12040 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12041 common/buffer.h.
12042 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12043 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12044 initialize_inferiors): Delete.
12045
2275a1a7
PA
120462011-07-20 Pedro Alves <pedro@codesourcery.com>
12047
12048 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12049 symbol error.
12050
0a5b1e09
PA
120512011-05-31 Pedro Alves <pedro@codesourcery.com>
12052
12053 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12054 assertion.
12055 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12056
6938fd34
YQ
120572011-05-26 Yao Qi <yao@codesourcery.com>
12058
12059 * Makefile.in (thread-db.o): Track dependence to
12060 common/gdb_thread_db.h.
12061 * thread-db.c: include gdb_thread_db.h from right place.
12062
b481f9e0
TT
120632011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12064
12065 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12066 __FILE__ and __LINE__ to internal_error.
12067
98a5dd13
DE
120682011-05-13 Doug Evans <dje@google.com>
12069
12070 * thread-db.c (try_thread_db_load_from_sdir): New function.
12071 (try_thread_db_load_from_dir): New function.
12072 (thread_db_load_search): Handle $sdir, ignore $pdir.
12073 Remove trying of system directories if search of
12074 libthread-db-search-path fails, that is now done via $sdir.
12075
d248b706
KY
120762011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12077
12078 * server.c (handle_query): Add EnableDisableTracepoints to the list
12079 of supported features.
43aaf8b6 12080 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12081 tracepoints.
43aaf8b6
PA
12082 (cmd_qtenable_disable): New.
12083 (cmd_qtstart): Install tracepoints even if disabled.
12084 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12085 receiving a QTEnable or QTDisable packet.
12086 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12087 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12088 tracepoints.
12089 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12090
84e578fb
DE
120912011-05-10 Doug Evans <dje@google.com>
12092
12093 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12094
71f55dd8
DE
120952011-05-04 Doug Evans <dje@google.com>
12096
12097 * linux-low.c (linux_join): Skip process lookup.
12098 * spu-low.c (spu_join): Ditto.
12099 * server.c (join_inferiors_callback): Delete.
12100 (process_serial_event): For 'D' packet (detach) call join_inferior
12101 directly.
12102
4d393d60
JM
121032011-05-04 Joseph Myers <joseph@codesourcery.com>
12104
12105 * README: Don't mention xscale*-*-linux*.
12106 * configure.srv (xscale*-*-linux*): Don't handle target.
12107
b00ad6ff
NF
121082011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12109
12110 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12111 casting pointers.
12112 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12113 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12114 (i386_emit_void_call_2): Likewise.
12115
af96c192
YQ
121162011-04-26 Yao Qi <yao@codesourcery.com>
12117
43aaf8b6
PA
12118 * linux-low.c: Move common macros to linux-ptrace.h.
12119 Include linux-ptrace.h.
af96c192
YQ
12120 * Makefile.in (linux_ptrace_h): New.
12121 (linux-low.o): Depends on linux-ptrace.h.
12122
03f2bd59
JK
121232011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12124
12125 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12126 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12127 (remote_prepare): New function with most of the TCP code from ...
12128 (remote_open): ... here. Detect PORT here unconditionally. Move also
12129 setting transport_is_reliable.
12130 * server.c (run_once): New variable.
12131 (gdbserver_usage): Document it.
12132 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12133 the first run if RUN_ONCE.
12134 * server.h (run_once, remote_prepare): New declarations.
12135
7a9dd1b2
TT
121362011-04-19 Tom Tromey <tromey@redhat.com>
12137
12138 * win32-low.c (handle_load_dll): Remove duplicate "the".
12139
81239425
PM
121402011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12141
12142 Remove support for old Cygwin 1.5 versions.
12143 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12144 function to avoid warning.
12145 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12146 warning.
12147
9e0627f1
PM
121482011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12149
12150 * gdbserver/server.h (Macro _): Define it if not available.
12151
588eebee
MS
121522011-03-14 Michael Snyder <msnyder@vmware.com>
12153
348af9f7 12154 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12155
43f70d4c
JB
121562011-03-10 Joel Brobecker <brobecker@adacore.com>
12157
12158 * Makefile.in (maintainer-clean realclean distclean): Remove
12159 "make ... subdir_do" command.
12160
348af9f7
MS
121612011-03-10 Michael Snyder <msnyder@vmware.com>
12162
12163 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12164
12165 * server.c (handle_v_run): Free alloced buffer on early return.
12166
e637a4f5
YQ
121672011-03-09 Yao Qi <yao@codesourcery.com>
12168
12169 Revert:
12170 2011-03-04 Yao Qi <yao@codesourcery.com>
12171
12172 * Makefile.in: Remove GNU make feature --directory.
12173
12174 2011-03-05 Yao Qi <yao@codesourcery.com>
12175
12176 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12177 (subdir_do): New make target. Copied from gdb/Makefile.
12178 (maintainer-clean, realclean, distclean, clean): Call corresponding
12179 make targets in common/Makefile.
12180
12181 2011-02-11 Yao Qi <yao@codesourcery.com>
12182
12183 * configure.ac: Call AC_PROG_RANLIB.
12184 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12185 * configure: Regenerate.
12186
e6edda56
JK
121872011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12188
12189 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12190
e5141119
JB
121912011-03-06 Yao Qi <yao@codesourcery.com>
12192
12193 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12194
64794aa4
JB
121952011-03-05 Yao Qi <yao@codesourcery.com>
12196
12197 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12198 (subdir_do): New make target. Copied from gdb/Makefile.
12199 (maintainer-clean, realclean, distclean, clean): Call corresponding
12200 make targets in common/Makefile.
12201
7a762829
YQ
122022011-03-04 Yao Qi <yao@codesourcery.com>
12203
12204 * Makefile.in: Remove GNU make feature --directory.
12205
348af9f7
MS
122062011-03-04 Michael Snyder <msnyder@vmware.com>
12207
12208 * server.c (queue_stop_reply): Call xmalloc not malloc.
12209
122102011-03-02 Michael Snyder <msnyder@vmware.com>
12211
12212 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12213
9f72fee2
MS
122142011-02-28 Michael Snyder <msnyder@vmware.com>
12215
588eebee
MS
12216 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12217 (cmd_qtframe): Ditto.
12218 (cmd_qtbuffer): Ditto.
12219 (cmd_bigqtbuffer): Ditto.
12220
9f72fee2
MS
12221 * utils.c (decimal2str): Initialize 'width' to nine, then
12222 don't mess with it.
12223
8040bd49
UW
122242011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12225
12226 * hostio.c (require_data): Free *data, not data.
12227
7e52cbd0
JK
122282011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12229
12230 * hostio.c (require_data): Use free, not xfree.
12231
9130f83e
MS
122322011-02-27 Michael Snyder <msnyder@vmware.com>
12233
4b812f4e
MS
12234 * server.c (handle_query): Discard unused value.
12235
9130f83e
MS
12236 * hostio.c (require_data): Free malloc memory before returning
12237 error.
12238
69d37113
MS
122392011-02-26 Michael Snyder <msnyder@vmware.com>
12240
12241 * linux-low.c (list_threads): Call closedir for dirent.
12242
35f5825a
MS
122432011-02-27 Michael Snyder <msnyder@vmware.com>
12244
2a589cef
MS
12245 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12246 a case statement falls through.
12247
0adea5f7
MS
12248 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12249
35f5825a
MS
12250 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12251 in comparison.
12252
238f1c74
MS
122532011-02-26 Michael Snyder <msnyder@vmware.com>
12254
12255 * utils.c (decimal2str): Eliminate dead code and dead param.
12256 (pulongest): Drop dead param from call to decimal2str.
12257 (plongest): Ditto.
12258
633ff500
JB
122592011-02-24 Joel Brobecker <brobecker@adacore.com>
12260
12261 Revert the following patch (not approved yet):
12262 2011-02-21 Hui Zhu <teawater@gmail.com>
12263 * tracepoint.c (tp_printf): New function.
12264 (eval_agent_expr): Handle gdb_agent_op_printf.
12265
f9c6ff72
HZ
122662011-02-21 Hui Zhu <teawater@gmail.com>
12267
12268 * tracepoint.c (tp_printf): New function.
12269 (eval_agent_expr): Handle gdb_agent_op_printf.
12270
94d5e490
TT
122712011-02-18 Tom Tromey <tromey@redhat.com>
12272
12273 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12274 (tracepoint.o): Likewise.
12275 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12276 (gdb_agent_op_names): Likewise.
12277
c7f96d2b
TT
122782011-02-18 Tom Tromey <tromey@redhat.com>
12279
12280 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12281 gdb_agent_op_rot>: New constants.
12282 (gdb_agent_op_names): Add pick and roll.
12283 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12284 cases.
12285
0feedb2c
JK
122862011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12287
12288 * aclocal.m4: Regenerated with aclocal-1.11.1.
12289
b3b9301e
PA
122902011-02-14 Pedro Alves <pedro@codesourcery.com>
12291
12292 * server.c (handle_qxfer_traceframe_info): New.
12293 (qxfer_packets): Register "traceframe-info".
12294 (handle_query): Report support for qXfer:traceframe-info:read+.
12295 * tracepoint.c (match_blocktype): New.
12296 (traceframe_find_block_type): Rename to ...
12297 (traceframe_walk_blocks): ... this. Add callback filter argument,
12298 and use it.
12299 (traceframe_find_block_type): New, reimplemented on top of
12300 traceframe_walk_blocks.
12301 (build_traceframe_info_xml): New.
12302 (traceframe_read_info): New.
12303 * server.h (traceframe_read_info): Declare.
12304
4f3e6fb7
YQ
123052011-02-11 Yao Qi <yao@codesourcery.com>
12306
12307 * configure.ac: Call AC_PROG_RANLIB.
12308 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12309 * configure: Regenerate.
12310
764880b7
PA
123112011-02-07 Pedro Alves <pedro@codesourcery.com>
12312
12313 * server.c (gdb_read_memory): Change return semantics to allow
12314 partial transfers.
12315 (handle_search_memory_1): Adjust.
12316 (process_serial_event) <'m' packet>: Handle partial transfers.
12317 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12318
1c79eb8a
PA
123192011-01-28 Pedro Alves <pedro@codesourcery.com>
12320
12321 * regcache.c (init_register_cache): Initialize
12322 regcache->register_status.
12323 (free_register_cache): Release regcache->register_status.
12324 (regcache_cpy): Copy register_status.
12325 (registers_to_string): Print 'x's for unavailable registers.
12326 (supply_register): Mark the register's status valid or
12327 unavailable, depending on whether a buffer was passed in or not.
12328 (supply_register_zeroed): New.
12329 (supply_regblock): Mark the registers' status valid or
12330 unavailable, depending on whether a buffer was passed in or not.
12331 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12332 (struct regcache): New `register_status' field.
12333 (supply_register_zeroed): Declare.
12334 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12335 supply_register_zeroed, rather than passing a NULL buffer to
12336 supply_register.
12337 * tracepoint.c (fetch_traceframe_registers): Update comment.
12338
85724a0e
PA
123392011-01-28 Pedro Alves <pedro@codesourcery.com>
12340
12341 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12342 buffer explicit.
12343
d08aafef
PA
123442011-01-25 Pedro Alves <pedro@codesourcery.com>
12345
12346 * server.h (decode_xfer_write): Change prototype.
12347 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12348 and don't extract the annex here.
12349 * server.c (decode_xfer_read): Remove `annex' parameter,
12350 and don't extract the annex here.
12351 (decode_xfer): New.
12352 (struct qxfer): New.
12353 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12354 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12355 (handle_qxfer_statictrace): New functions, abstracted out from
12356 handle_query, and made to use the struct qxfer interface.
12357 (handle_threads_qxfer_proper): Rename to ...
12358 (handle_qxfer_threads_proper): ... this.
12359 (handle_threads_qxfer): Rename to ...
12360 (handle_qxfer_threads): ... this. Adjust.
12361 (qxfer_packets): New array.
12362 (handle_qxfer): New function.
12363 (handle_query): Use handle_qxfer.
12364
493e2a69
MS
123652011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12366
12367 * gdbreplay.c: Shorten lines of >= 80 columns.
12368 * linux-low.c: Ditto.
12369 * linux-ppc-low.c: Ditto.
12370 * linux-s390-low.c: Ditto.
12371 * linux-sparc-low.c: Ditto.
12372 * linux-x86-low.c: Ditto.
12373 * linux-xtensa-low.c: Ditto.
12374 * mem-break.c: Ditto.
12375 * nto-low.c: Ditto.
12376 * regcache.h: Ditto.
12377 * remote-utils.c: Ditto.
12378 * server.c: Ditto.
12379 * server.h: Ditto.
12380 * thread-db.c: Ditto.
12381 * tracepoint.c: Ditto.
12382 * utils.c: Ditto.
12383 * win32-low.h: Ditto.
12384
44944448
JB
123852011-01-05 Joel Brobecker <brobecker@adacore.com>
12386
12387 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12388 update.
12389
71ce852c
JB
123902011-01-01 Joel Brobecker <brobecker@adacore.com>
12391
12392 * server.c (gdbserver_version): Update copyright year in version
12393 output.
12394 * gdbreplay.c (gdbreplay_version): Ditto.
12395
eb826dc6
MF
123962010-12-29 Jie Zhang <jie.zhang@analog.com>
12397
12398 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12399 * linux-bfin-low.c: New file.
12400 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12401 PT_DATA_ADDR for BFIN targets.
12402 * Makefile.in (SFILES): Add linux-bfin-low.c.
12403 (clean): Remove reg-bfin.c.
12404 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12405 * README: Mention supported Blackfin targets.
12406
39ab222a
MF
124072010-12-23 Mike Frysinger <vapier@gentoo.org>
12408
12409 * .gitignore: New file.
12410
a1f2ce7d
MF
124112010-11-16 Mike Frysinger <vapier@gentoo.org>
12412
12413 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12414
f474844c
JZ
124152010-10-22 Jie Zhang <jie@codesourcery.com>
12416
12417 * Makefile.in: Add FLAGS_TO_PASS variable.
12418 (install): Remove dependency of install-only and recursively
12419 invoke make for install-only.
12420
f1048712
DE
124212010-10-04 Doug Evans <dje@google.com>
12422
12423 * Makefile.in (uninstall): Use $(DESTDIR).
12424
b53a1623
PA
124252010-09-24 Pedro Alves <pedro@codesourcery.com>
12426
e6ee044d
PA
12427 PR gdb/11842
12428
b53a1623
PA
12429 * linux-x86-low.c (compat_siginfo_from_siginfo)
12430 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12431 si_code is < 0. Check for si_code == SI_TIMER before checking for
12432 si_code < 0.
12433
fa1bd1e4
JB
124342010-09-13 Joel Brobecker <brobecker@adacore.com>
12435
12436 * lynx-i386-low.c: New file.
12437 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12438
47fac8f8
JB
124392010-09-13 Joel Brobecker <brobecker@adacore.com>
12440
12441 * lynx-low.c (ptrace_request_to_str): Remove handling for
12442 request values that have been removed in LynxOS 5.x.
12443
1adfc54d
JB
124442010-09-13 Joel Brobecker <brobecker@adacore.com>
12445
12446 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12447 <ptrace.h>
12448
c2a66c29
NS
124492010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12450
12451 * configure.ac: Add --enable-inprocess-agent option.
12452 * configure: Rebuilt.
12453
32fcada3
YQ
124542010-09-06 Yao Qi <yao@codesourcery.com>
12455
12456 * linux-low.c (linux_kill): Remove unused variable.
12457 (linux_stabilize_threads): Likewise.
12458 * server.c (start_inferior): Likewise.
12459 (queue_stop_reply_callback): Likewise.
12460 * tracepoint.c (do_action_at_tracepoint): Likewise.
12461
0cccb683
YQ
124622010-09-06 Yao Qi <yao@codesourcery.com>
12463
12464 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12465 on return.
12466
423ec54c
JK
124672010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12468
12469 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12470
12ac6819
PA
124712010-09-06 Pedro Alves <pedro@codesourcery.com>
12472
12473 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12474 "$(IPA_DEPFILES)".
12475
8ed54b31
JB
124762010-09-01 Joel Brobecker <brobecker@adacore.com>
12477
12478 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12479 gdbserver/lynx-ppc-low.c: New files.
12480 * Makefile.in (lynx_low_h): New variable.
12481 (lynx-low.o, lynx-ppc-low.o): New rules.
12482 * configure.ac: On LynxOS, link with -lnetinet.
12483 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12484 * configure: regenerate.
12485
bb0116a4
JB
124862010-09-01 Joel Brobecker <brobecker@adacore.com>
12487
12488 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12489 * configure.ac: Add check for vasprintf and vsnprintf.
12490 * configure, config.in: Regenerate.
12491 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12492
a778ab81 124932010-09-01 Joel Brobecker <brobecker@adacore.com>
12494
12495 * gdbreplay.c: Move include of alloca.h up, next to include of
12496 malloc.h.
12497 * server.h: Add include of malloc.h.
12498 * mem-break.c: Remove include of malloc.h.
12499 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12500
8b034a19 125012010-09-01 Joel Brobecker <brobecker@adacore.com>
12502
12503 * Makefile.in (memmem.o): Build with -Wno-error.
12504
125052010-09-01 Joel Brobecker <brobecker@adacore.com>
12506
12507 * utils.c (xsnprintf): Make non-static.
12508 * server.h: Add xsnprintf declaration.
12509 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12510 replace calls to snprintf by calls to xsnprintf throughout.
12511
125122010-09-01 Joel Brobecker <brobecker@adacore.com>
12513
12514 * configure.ac: Add configure check for alloca.
12515 * configure, config.in: Regenerate.
12516 * server.h: Include alloca.h if it exists.
12517 * gdbreplay.c: Include alloca.h if it exists.
12518
1a981360
PA
125192010-08-28 Pedro Alves <pedro@codesourcery.com>
12520
12521 * linux-low.c (__SIGRTMIN): Define if not already defined.
12522 (linux_create_inferior): Check for __ANDROID__ rather than
12523 __SIGRTMIN.
12524 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12525 are already deferred.
12526 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12527 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12528 stopped and already has a pending signal to report.
12529 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12530 a pending signal to report or is moving out of a jump pad.
12531 (linux_init_signals): Check for __ANDROID__ rather than
12532 __SIGRTMIN.
12533
b4d51a55
PA
125342010-08-28 Pedro Alves <pedro@codesourcery.com>
12535
12536 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12537 debug_threads check. Avoid a linear search when not doing debug
12538 output.
12539
ec48365d
PA
125402010-08-27 Pedro Alves <pedro@codesourcery.com>
12541
12542 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12543 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12544 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12545 (process_event): Change local fd's type to gdb_fildes_t.
12546 (create_file_handler): Adjust prototype.
12547 (delete_file_handler): Adjust prototype.
12548 (handle_file_event): Adjust prototype. Use pfildes.
12549 (create_file_event): Adjsut prototype.
12550 * remote-utils.c (remote_desc, listen_desc): Change type to
12551 gdb_fildes_t.
12552 * server.h: New gdb_fildes_t typedef.
12553 [USE_WIN32API]: Include winsock2.h.
12554 (delete_file_handler, add_file_handler): Adjust prototypes.
12555 (pfildes): Declare.
12556 * utils.c (pfildes): New.
12557
854d88f0
PA
125582010-08-27 Pedro Alves <pedro@codesourcery.com>
12559
12560 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12561 * configure: Regenerate.
12562
0146f85b
PA
125632010-08-27 Pedro Alves <pedro@codesourcery.com>
12564
12565 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12566 (linux_done_accessing_memory): ... this.
12567 (linux_target_ops): Adjust.
12568 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12569 * nto-low.c (nto_target_ops): Adjust comment.
12570 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12571 * spu-low.c (spu_target_ops): Adjust comment.
12572 * target.h (target_ops): Rename unprepare_to_access_memory field
12573 to done_accessing_memory.
12574 (unprepare_to_access_memory): Rename to ...
12575 (done_accessing_memory): ... this.
12576
90d74c30
PA
125772010-08-26 Pedro Alves <pedro@codesourcery.com>
12578
12579 * linux-low.c (linux_prepare_to_access_memory): New.
12580 (linux_unprepare_to_access_memory): New.
12581 (linux_target_ops): Install them.
12582 * server.c (read_memory): Rename to ...
12583 (gdb_read_memory): ... this. Use
12584 prepare_to_access_memory/prepare_to_access_memory.
12585 (write_memory): Rename to ...
12586 (gdb_write_memory): ... this. Use
12587 prepare_to_access_memory/prepare_to_access_memory.
12588 (handle_search_memory_1): Adjust.
12589 (process_serial_event): Adjust.
12590 * target.h (struct target_ops): New fields
12591 prepare_to_access_memory and unprepare_to_access_memory.
12592 (prepare_to_access_memory, unprepare_to_access_memory): New.
12593 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12594 prepare_to_access_memory/prepare_to_access_memory.
12595 * nto-low.c (nto_target_ops): Adjust.
12596 * spu-low.c (spu_target_ops): Adjust.
12597 * win32-low.c (win32_target_ops): Adjust.
12598
fd467969
PA
125992010-08-26 Pedro Alves <pedro@codesourcery.com>
12600
12601 * Makefile.in (WARN_CFLAGS): Get it from configure.
12602 (WERROR_CFLAGS): New.
12603 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12604 * configure.ac: Introduce --enable-werror, which adds -Werror to
12605 the compiler command line. Enabled by default. Disable with
12606 --disable-werror. Add -Wdeclaration-after-statement
12607 Wpointer-arith and -Wformat-nonliteral to warning flags.
12608 * configure: Regenerate.
12609
331e2f5f
PA
126102010-08-26 Pedro Alves <pedro@codesourcery.com>
12611
12612 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12613
e581f2b4
PA
126142010-08-26 Pedro Alves <pedro@codesourcery.com>
12615
12616 * gdbreplay.c (remote_error): New.
12617 (gdbchar): New.
12618 (expect): Use gdbchar. Check for error reading from GDB.
12619 Clarify sync error output.
12620 (play): Check for errors writing to GDB.
12621 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12622 * remote-utils.c (getpkt): Check for errors writing to the remote
12623 descriptor.
12624
3c11dd79
PA
126252010-08-25 Pedro Alves <pedro@codesourcery.com>
12626
12627 * linux-low.c (linux_wait_1): Move non-debugging code out of
12628 `debug_threads' control.
12629
d20a8ad9
PA
126302010-08-25 Pedro Alves <pedro@codesourcery.com>
12631
12632 * linux-low.c (linux_wait_1): Don't set last_status here.
12633 * server.c (push_event, queue_stop_reply_callback): Assert we're
12634 not pushing a TARGET_WAITKIND_IGNORE event.
12635 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12636 (myresume, handle_target_event): Set the thread's last_resume_kind
12637 and last_status from the target returned status.
12638
964e4306
PA
126392010-08-25 Pedro Alves <pedro@codesourcery.com>
12640
12641 PR threads/10729
12642
12643 * linux-x86-low.c (update_debug_registers_callback): New.
12644 (i386_dr_low_set_addr): Use it.
12645 (i386_dr_low_get_addr): New.
12646 (i386_dr_low_set_control): Use update_debug_registers_callback.
12647 (i386_dr_low_get_control): New.
12648 (i386_dr_low_get_status): Adjust.
12649 * linux-low.c (linux_stop_lwp): New.
12650 * linux-low.h (linux_stop_lwp): Declare.
12651
12652 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12653 argument instead of a i386_debug_reg_state.
12654 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12655 a i386_debug_reg_state.
12656 (i386_insert_aligned_watchpoint): Adjust.
12657 (i386_remove_aligned_watchpoint): Adjust.
12658 (i386_low_stopped_data_address): Read the debug registers from the
12659 inferior instead of from the mirrors.
12660 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12661 (i386_dr_low_get_addr): Declare.
12662 (i386_dr_low_get_control): Declare.
12663 (i386_dr_low_get_status): Change prototype.
12664
12665 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12666 (i386_dr_low_get_addr): New.
12667 (i386_dr_low_get_control): New.
12668 (i386_dr_low_get_status): Adjust prototype. Return
12669 dr_status_mirror.
12670 (i386_initial_stuff): Clear dr_status_mirror and
12671 dr_control_mirror.
12672 (i386_get_thread_context): Adjust.
12673 (i386_set_thread_context): Adjust.
12674 (i386_thread_added): Adjust.
12675
5f21a75b
PA
126762010-08-24 Pedro Alves <pedro@codesourcery.com>
12677
12678 * linux-low.h (linux_thread_area): Delete declaration.
12679
3e4c1235
TS
126802010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12681
12682 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12683 after its termination.
12684
1971b033
PA
126852010-08-09 Pedro Alves <pedro@codesourcery.com>
12686
12687 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12688 (gdb_wants_all_stopped): Delete.
12689 (linux_wait_1): Don't call them.
12690 * server.c (handle_v_cont): Tag all threads as want-stopped.
12691 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12692 stopped as "client-wants-stopped".
12693
310444ac
PA
126942010-07-31 Pedro Alves <pedro@codesourcery.com>
12695
12696 * Makefile.in (signals_h): New.
12697 (server_h): Depend on it.
12698 (server.o): Don't depend on $(signals_def).
12699 (signals.o): Depend on $(signals_def).
12700
a19cae16
JK
127012010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12702
12703 * Makefile.in (signals_def): New.
12704 (server_h): Append include/gdb/signals.h and signals_def.
12705 (server.o): Append signals_def.
12706
30d50328
JK
127072010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12708
12709 * server.c (handle_target_event): Use target_signal_to_host for
12710 resume_info.sig initialization.
12711 * target.h (struct thread_resume) <sig>: New comment.
12712
5c3216e2
OS
127132010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12714
c6f46ca0
OS
12715 * server.c (handle_query): strcpy() the returned string from paddress()
12716 instead of sprintf().
5c3216e2
OS
12717 * utils.c (paddress): Return phex_nz().
12718
6bd31874
JB
127192010-07-07 Joel Brobecker <brobecker@adacore.com>
12720
12721 * server.c (handle_v_cont): Call mourn_inferior if process
12722 just exited.
12723 (myresume): Likewise.
12724
0fb4aa4b
PA
127252010-07-01 Pedro Alves <pedro@codesourcery.com>
12726
12727 Static tracepoints, and integration with UST.
12728
12729 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12730 * mem-break.c (uninsert_all_breakpoints)
12731 (reinsert_all_breakpoints): New.
12732 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12733 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12734 (gdb_agent_ust_loaded, helper_thread_id)
12735 (gdb_agent_helper_thread_id): New macros.
12736 (struct ipa_sym_addresses): Add addr_ust_loaded,
12737 addr_helper_thread_id, addr_cmd_buf.
12738 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12739 (in_process_agent_loaded_ust): New.
12740 (write_e_ust_not_loaded): New.
12741 (maybe_write_ipa_ust_not_loaded): New.
12742 (struct collect_static_trace_data_action): New.
12743 (enum tracepoint_type) <static_tracepoint>: New.
12744 (struct tracepoint) <handle>: Mention static tracepoints.
12745 (struct static_tracepoint_ctx): New.
12746 (CMD_BUF_SIZE): New.
12747 (add_tracepoint_action): Handle static tracepoint actions.
12748 (unprobe_marker_at): New.
12749 (clear_installed_tracepoints): Handle static tracepoints.
12750 (cmd_qtdp): Handle static tracepoints.
12751 (probe_marker_at): New.
12752 (cmd_qtstart): Handle static tracepoints.
12753 (response_tracepoint): Handle static tracepoints.
12754 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12755 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12756 (get_context_regcache): Handle static tracepoints.
12757 (do_action_at_tracepoint): Handle static tracepoint actions.
12758 (traceframe_find_block_type): Handle static trace data blocks.
12759 (traceframe_read_sdata): New.
12760 (download_tracepoints): Download static tracepoint actions.
12761 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12762 (GDB_PROBE_NAME): New.
12763 (ust_ops): New.
12764 (GET_UST_SYM): New.
12765 (USTF): New.
12766 (dlsym_ust): New.
12767 (ust_marker_to_static_tracepoint): New.
12768 (gdb_probe): New.
12769 (collect_ust_data_at_tracepoint): New.
12770 (gdb_ust_probe): New.
12771 (UNIX_PATH_MAX, SOCK_DIR): New.
12772 (gdb_ust_connect_sync_socket): New.
12773 (resume_thread, stop_thread): New.
12774 (run_inferior_command): New.
12775 (init_named_socket): New.
12776 (gdb_ust_socket_init): New.
12777 (cstr_to_hexstr): New.
12778 (next_st): New.
12779 (first_marker, next_marker): New.
12780 (response_ust_marker): New.
12781 (cmd_qtfstm, cmd_qtsstm): New.
12782 (unprobe_marker_at, probe_marker_at): New.
12783 (cmd_qtstmat, gdb_ust_thread): New.
12784 (gdb_ust_init): New.
12785 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12786 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12787 (ST_REGENTRY): New.
12788 (x86_64_st_collect_regmap): New.
12789 (X86_64_NUM_ST_COLLECT_GREGS): New.
12790 (AMD64_RIP_REGNUM): New.
12791 (supply_static_tracepoint_registers): New.
12792 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12793 (ST_REGENTRY): New.
12794 (i386_st_collect_regmap): New.
12795 (i386_NUM_ST_COLLECT_GREGS): New.
12796 (supply_static_tracepoint_registers): New.
12797 * server.c (handle_query): Handle qXfer:statictrace:read.
12798 <qSupported>: Report support for StaticTracepoints, and
12799 qXfer:statictrace:read features.
12800 * server.h (traceframe_read_sdata)
12801 (supply_static_tracepoint_registers): Declare.
12802 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12803 (unpack_varlen_hex): Include in IPA build.
12804 * Makefile.in (ustlibs, ustinc): New.
12805 (IPA_OBJS): Add remote-utils-ipa.o.
12806 ($(IPA_LIB)): Link -ldl and -lpthread.
12807 (UST_CFLAGS): New.
12808 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12809 * config.in, configure: Regenerate.
12810
9e4344e5
PA
128112010-06-20 Ian Lance Taylor <iant@google.com>
12812 Pedro Alves <pedro@codesourcery.com>
12813
12814 * linux-x86-low.c (always_true): Delete.
12815 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12816 trying to fool the compiler with always_true.
12817
c6beb2cb
PA
128182010-06-20 Pedro Alves <pedro@codesourcery.com>
12819
12820 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12821 conditions in gdbserver.
12822
d2ed6730
UW
128232010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12824
12825 * spu-low.c (spu_read_memory): Wrap around local store limit.
12826 (spu_write_memory): Likewise.
12827
4e29fb54
PA
128282010-06-15 Pedro Alves <pedro@codesourcery.com>
12829
12830 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12831 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12832 LONGEST uses.
12833 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12834 uses.
12835 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12836 uses with LONGEST uses.
12837
6a271cae
PA
128382010-06-14 Stan Shebs <stan@codesourcery.com>
12839 Pedro Alves <pedro@codesourcery.com>
12840
12841 Bytecode compiler.
12842
12843 * linux-x86-low.c: Include limits.h.
12844 (add_insns): New.
12845 (always_true): New.
12846 (EMIT_ASM): New.
12847 (EMIT_ASM32): New.
12848 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12849 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12850 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12851 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12852 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12853 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12854 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12855 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12856 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12857 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12858 (amd64_emit_void_call_2): New.
12859 (amd64_emit_ops): New.
12860 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12861 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12862 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12863 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12864 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12865 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12866 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12867 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12868 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12869 (i386_emit_stack_adjust, i386_emit_int_call_1)
12870 (i386_emit_void_call_2): New.
12871 (i386_emit_ops): New.
12872 (x86_emit_ops): New.
12873 (the_low_target): Install x86_emit_ops.
12874 * server.h (struct emit_ops): New.
12875 (get_raw_reg_func_addr): Declare.
12876 (current_insn_ptr, emit_error): Declare.
12877 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12878 (set_trace_state_variable_value): New defines.
12879 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12880 addr_get_trace_state_variable_value and
12881 addr_set_trace_state_variable_value.
12882 (symbol_list): New fields for get_raw_reg,
12883 get_trace_state_variable_value and set_trace_state_variable_value.
12884 (condfn): New typedef.
12885 (struct tracepoint): New field `compiled_cond'.
12886 (do_action_at_tracepoint): Clear compiled_cond.
12887 (get_trace_state_variable_value, set_trace_state_variable_value):
12888 Export in the IPA.
12889 (condition_true_at_tracepoint): If there's a compiled condition,
12890 run that.
12891 (current_insn_ptr, emit_error): New globals.
12892 (struct bytecode_address): New.
12893 (get_raw_reg_func_addr): New.
12894 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12895 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12896 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12897 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12898 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12899 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12900 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12901 (compile_tracepoint_condition, compile_bytecodes): New.
12902 * target.h (emit_ops): Forward declare.
12903 (struct target_ops): New field emit_ops.
12904 (target_emit_ops): New.
12905 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12906 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12907 * linux-low.c (linux_emit_ops): New.
12908 (linux_target_ops): Install it.
12909 * linux-low.h (struct linux_target_ops): New field emit_ops.
12910
92b72907
UW
129112010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12912
12913 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12914 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12915
fa593d66
PA
129162010-06-01 Pedro Alves <pedro@codesourcery.com>
12917 Stan Shebs <stan@codesourcery.com>
12918
12919 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12920 (all): Depend on $(extra_libraries).
12921 (install-only): Install the IPA.
12922 (IPA_OBJS, IPA_LIB): New.
12923 (clean): Remove the IPA lib.
12924 (IPAGENT_CFLAGS): New.
12925 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12926 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12927 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12928 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12929 * configure.ac: Check for atomic builtins support in the compiler.
12930 (IPA_DEPFILES, extra_libraries): Define.
12931 * configure.srv (ipa_obj): Add description.
12932 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12933 (i[34567]86-*-linux*): Set ipa_obj.
12934 (x86_64-*-linux*): Set ipa_obj.
12935 * linux-low.c (stabilizing_threads): New.
12936 (supports_fast_tracepoints): New.
12937 (linux_detach): Stabilize threads before detaching.
12938 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12939 the lwp is either not stabilizing, or is moving out of a jump pad.
12940 (linux_fast_tracepoint_collecting): New.
12941 (maybe_move_out_of_jump_pad): New.
12942 (enqueue_one_deferred_signal): New.
12943 (dequeue_one_deferred_signal): New.
12944 (linux_wait_for_event_1): If moving out of a jump pad, defer
12945 pending signals to later.
12946 (linux_stabilize_threads): New.
12947 (linux_wait_1): Check if threads need moving out of jump pads, and
12948 do it if so.
12949 (stuck_in_jump_pad_callback): New.
12950 (move_out_of_jump_pad_callback): New.
12951 (lwp_running): New.
12952 (linux_resume_one_lwp): Handle moving out of jump pads.
12953 (linux_set_resume_request): Dequeue deferred signals.
12954 (need_step_over_p): Also step over fast tracepoint jumps.
12955 (start_step_over): Also uninsert fast tracepoint jumps.
12956 (finish_step_over): Also reinsert fast tracepoint jumps.
12957 (linux_install_fast_tracepoint_jump): New.
12958 (linux_target_ops): Install linux_stabilize_threads and
12959 linux_install_fast_tracepoint_jump_pad.
12960 * linux-low.h (linux_target_ops) <get_thread_area,
12961 install_fast_tracepoint_jump_pad>: New fields.
12962 (struct lwp_info) <collecting_fast_tracepoint,
12963 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12964 (linux_get_thread_area): Declare.
12965 * linux-x86-low.c (jump_insn): New.
12966 (x86_get_thread_area): New.
12967 (append_insns): New.
12968 (push_opcode): New.
12969 (amd64_install_fast_tracepoint_jump_pad): New.
12970 (i386_install_fast_tracepoint_jump_pad): New.
12971 (x86_install_fast_tracepoint_jump_pad): New.
12972 (the_low_target): Install x86_get_thread_area and
12973 x86_install_fast_tracepoint_jump_pad.
12974 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12975 (struct fast_tracepoint_jump): New.
12976 (fast_tracepoint_jump_insn): New.
12977 (fast_tracepoint_jump_shadow): New.
12978 (find_fast_tracepoint_jump_at): New.
12979 (fast_tracepoint_jump_here): New.
12980 (delete_fast_tracepoint_jump): New.
12981 (set_fast_tracepoint_jump): New.
12982 (uninsert_fast_tracepoint_jumps_at): New.
12983 (reinsert_fast_tracepoint_jumps_at): New.
12984 (set_breakpoint_at): Use write_inferior_memory.
12985 (uninsert_raw_breakpoint): Use write_inferior_memory.
12986 (check_mem_read): Mask out fast tracepoint jumps.
12987 (check_mem_write): Mask out fast tracepoint jumps.
12988 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12989 (set_fast_tracepoint_jump): Declare.
12990 (delete_fast_tracepoint_jump)
12991 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12992 (reinsert_fast_tracepoint_jumps_at): Declare.
12993 * regcache.c: Don't compile many functions when building the
12994 in-process agent library.
12995 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12996 the register buffer in the heap.
12997 (free_register_cache): If the register buffer isn't owned by the
12998 regcache, don't free it.
12999 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13000 pre-existing register caches.
13001 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13002 type.
13003 (convert_ascii_to_int): : Constify `from' parameter type.
13004 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13005 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13006 the needed buffer in-place.
13007 (relocate_instruction): New.
13008 * server.c (handle_query) <qSymbols>: If the target supports
13009 tracepoints, give it a chance of looking up symbols. Report
13010 support for fast tracepoints.
13011 (handle_status): Stabilize threads.
13012 (process_serial_event): Adjust.
13013 * server.h (struct fast_tracepoint_jump): Forward declare.
13014 (struct process_info) <fast_tracepoint_jumps>: New field.
13015 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13016 (decode_X_packet, decode_M_packet): Adjust.
13017 (relocate_instruction): Declare.
13018 (in_process_agent_loaded): Declare.
13019 (tracepoint_look_up_symbols): Declare.
13020 (struct fast_tpoint_collect_status): Declare.
13021 (fast_tracepoint_collecting): Declare.
13022 (force_unlock_trace_buffer): Declare.
13023 (handle_tracepoint_bkpts): Declare.
13024 (initialize_low_tracepoint)
13025 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13026 * target.h (struct target_ops) <stabilize_threads,
13027 install_fast_tracepoint_jump_pad>: New fields.
13028 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13029 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13030 [HAVE_STDINT_H]: Include stdint.h.
13031 (trace_debug_1): Rename to ...
13032 (trace_vdebug): ... this.
13033 (trace_debug): Rename to ...
13034 (trace_debug_1): ... this. Add `level' parameter.
13035 (trace_debug): New.
13036 (ATTR_USED, ATTR_NOINLINE): New.
13037 (IP_AGENT_EXPORT): New.
13038 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13039 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13040 (about_to_request_buffer_space, trace_buffer_is_full)
13041 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13042 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13043 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13044 (traceframe_write_count, traceframes_created)
13045 (trace_state_variables)
13046 New renaming defines.
13047 (struct ipa_sym_addresses): New.
13048 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13049 (symbol_list): New.
13050 (ipa_sym_addrs): New.
13051 (all_tracepoint_symbols_looked_up): New.
13052 (in_process_agent_loaded): New.
13053 (write_e_ipa_not_loaded): New.
13054 (maybe_write_ipa_not_loaded): New.
13055 (tracepoint_look_up_symbols): New.
13056 (debug_threads) [IN_PROCESS_AGENT]: New.
13057 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13058 (UNKNOWN_SIDE_EFFECTS): New.
13059 (stop_tracing): New.
13060 (flush_trace_buffer): New.
13061 (stop_tracing_bkpt): New.
13062 (flush_trace_buffer_bkpt): New.
13063 (read_inferior_integer): New.
13064 (read_inferior_uinteger): New.
13065 (read_inferior_data_pointer): New.
13066 (write_inferior_data_pointer): New.
13067 (write_inferior_integer): New.
13068 (write_inferior_uinteger): New.
13069 (struct collect_static_trace_data_action): Delete.
13070 (enum tracepoint_type): New.
13071 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13072 <actions_str, step_actions, step_actions_str>: Only include in
13073 GDBserver.
fa593d66
PA
13074 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13075 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13076 (tracepoints): Use IP_AGENT_EXPORT.
13077 (last_tracepoint): Don't include in the IPA.
13078 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13079 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13080 (alloced_trace_state_variables): New.
13081 (trace_state_variables): Use IP_AGENT_EXPORT.
13082 (traceframe_t): Delete unused variable.
13083 (circular_trace_buffer): Don't include in the IPA.
13084 (trace_buffer_start): Delete.
13085 (struct trace_buffer_control): New.
13086 (trace_buffer_free): Delete.
13087 (struct ipa_trace_buffer_control): New.
13088 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13089 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13090 New.
13091 (trace_buffer_ctrl): New.
13092 (TRACE_BUFFER_CTRL_CURR): New.
13093 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13094 Reimplement as macros.
13095 (trace_buffer_wrap): Delete.
13096 (traceframe_write_count, traceframe_read_count)
13097 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13098 (struct tracepoint_hit_ctx) <type>: New field.
13099 (struct fast_tracepoint_ctx): New.
13100 (memory_barrier): New.
13101 (cmpxchg): New.
13102 (record_tracepoint_error): Update atomically in the IPA.
13103 (clear_inferior_trace_buffer): New.
13104 (about_to_request_buffer_space): New.
13105 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13106 updating the same buffer.
13107 (add_tracepoint): Default the tracepoint's type to trap
13108 tracepoint, and orig_size to -1.
13109 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13110 internal variables.
13111 (create_trace_state_variable): New parameter `gdb'. Handle it.
13112 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13113 (cmd_qtdp): Handle fast tracepoints.
13114 (cmd_qtdv): Adjust.
13115 (max_jump_pad_size): New.
13116 (gdb_jump_pad_head): New.
13117 (get_jump_space_head): New.
13118 (claim_jump_space): New.
13119 (sort_tracepoints): New.
13120 (MAX_JUMP_SIZE): New.
13121 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13122 IPA.
13123 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13124 support. Upload fast traceframes, and delete internal IPA
13125 breakpoints.
13126 (stop_tracing_handler): New.
13127 (flush_trace_buffer_handler): New.
13128 (cmd_qtstop): Upload fast tracepoints.
13129 (response_tracepoint): Handle fast tracepoints.
13130 (tracepoint_finished_step): Upload fast traceframes. Set the
13131 tracepoint hit context's tracepoint type.
13132 (handle_tracepoint_bkpts): New.
13133 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13134 type. Add comment about fast tracepoints.
13135 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13136 non-existing action_str field.
13137 (get_context_regcache): Handle fast tracepoints.
13138 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13139 to the regcache.
13140 (fast_tracepoint_from_jump_pad_address): New.
13141 (fast_tracepoint_from_ipa_tpoint_address): New.
13142 (collecting_t): New.
13143 (force_unlock_trace_buffer): New.
13144 (fast_tracepoint_collecting): New.
13145 (collecting): New.
13146 (gdb_collect): New.
13147 (write_inferior_data_ptr): New.
13148 (target_tp_heap): New.
13149 (target_malloc): New.
13150 (download_agent_expr): New.
13151 (UALIGN): New.
13152 (download_tracepoints): New.
13153 (download_trace_state_variables): New.
13154 (upload_fast_traceframes): New.
13155 (IPA_FIRST_TRACEFRAME): New.
13156 (IPA_NEXT_TRACEFRAME_1): New.
13157 (IPA_NEXT_TRACEFRAME): New.
13158 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13159 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13160 (gdb_jump_pad_buffer_end): New.
13161 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13162 (initialize_tracepoint): Adjust.
13163 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13164 buffer. Initialize the low module.
13165 * utils.c (PREFIX, TOOLNAME): New.
13166 (malloc_failure): Use PREFIX.
13167 (error): In the IPA, an error causes an exit.
13168 (fatal, warning): Use PREFIX.
13169 (internal_error): Use TOOLNAME.
13170 (NUMCELLS): Increase to 10.
13171 * configure, config.in: Regenerate.
13172
d149dd1d
PA
131732010-06-01 Pedro Alves <pedro@codesourcery.com>
13174
13175 * server.c (handle_query) <qSupported>: Do two passes over the
13176 qSupported string to avoid nesting strtok.
13177
f6528abd
JK
131782010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13179
13180 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13181 (CDEPS): New.
13182 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13183 -Wl,--dynamic-list.
13184 * configure: Regenerate.
13185 * proc-service.list: New.
13186
ca2a87a0
JK
131872010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13188
13189 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13190 New comment.
13191
363a6e9f
OS
131922010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13193
13194 * gdbreplay.c (remote_open): Check error return from socket() call by
13195 its equality to -1 not by it being negative.
13196 * remote-utils.c (remote_open): Likewise.
13197
d23b6cb1
PA
131982010-05-23 Pedro Alves <pedro@codesourcery.com>
13199
13200 * config.h: Regenerate.
13201
28d3cf85
MK
132022010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13203
13204 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13205 doesn't provide PTRACE_GET_THREAD_AREA.
13206
fea36a59
MK
132072010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13208
13209 * linux-m68k-low.c: Include <asm/ptrace.h>
13210 (ps_get_thread_area): Implement.
13211
24b066ba
DE
132122010-05-03 Doug Evans <dje@google.com>
13213
13214 * event-loop.c (struct callback_event): New struct.
13215 (callback_list): New global.
13216 (append_callback_event, delete_callback_event): New functions.
13217 (process_callback): New function.
13218 (start_event_loop): Call it.
13219 * remote-utils.c (NOT_SCHEDULED): Define.
13220 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13221 moved out of readchar.
13222 (readchar): Rewrite. Call reschedule before returning.
13223 (reset_readchar): New function.
13224 (remote_close): Call it.
13225 (process_remaining, reschedule): New functions.
13226 * server.h (callback_handler_func): New typedef.
13227 (append_callback_event, delete_callback_event): Declare.
13228
9836d6ea
PA
132292010-05-03 Pedro Alves <pedro@codesourcery.com>
13230
13231 * proc-service.c (ps_pglobal_lookup): Use
13232 thread_db_look_up_one_symbol.
13233 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13234 parameter. Use it instead of all_symbols_looked_up.
13235 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13236 field.
13237 (all_symbols_looked_up): Don't declare.
13238 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13239 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13240 field.
13241 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13242 Set all_symbols_looked_up here.
13243 (thread_db_look_up_one_symbol): New.
13244 (thread_db_get_tls_address): Adjust.
13245 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13246 thread_db object on the heap, and tentatively set it in the
13247 process structure.
13248 (thread_db_init): Don't set all_symbols_looked_up here.
13249 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13250
7984d532
PA
132512010-05-03 Pedro Alves <pedro@codesourcery.com>
13252
13253 * linux-low.c (linux_kill, linux_detach): Adjust.
13254 (status_pending_p_callback): Remove redundant statement. Check
13255 for !TARGET_WAITIKIND_IGNORE, instead of
13256 TARGET_WAITKIND_STOPPED.
13257 (handle_tracepoints): Make sure LWP is locked. Adjust.
13258 (linux_wait_for_event_1): Adjust.
13259 (linux_cancel_breakpoints): New.
13260 (unsuspend_one_lwp): New.
13261 (unsuspend_all_lwps): New.
13262 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13263 (send_sigstop_callback): Change return type to int, add new
13264 `except' parameter and handle it.
13265 (suspend_and_send_sigstop_callback): New.
13266 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13267 pass them down. If SUSPEND, also increment the lwp's suspend
13268 count.
13269 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13270 (need_step_over_p): Don't consider suspended LWPs.
13271 (start_step_over): Adjust.
13272 (proceed_one_lwp): Change return type to int, add new `except'
13273 parameter and handle it.
13274 (unsuspend_and_proceed_one_lwp): New.
13275 (proceed_all_lwps): Use find_inferior instead of
13276 for_each_inferior.
13277 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13278 also decrement the suspend count of LWPs. Pass `except' down,
13279 instead of hacking its suspend count.
13280 (linux_pause_all): Add `freeze' parameter. Adjust.
13281 (linux_unpause_all): New.
13282 (linux_target_ops): Install linux_unpause_all.
13283 * server.c (handle_status): Adjust.
13284 * target.h (struct target_ops): New fields `unpause_all' and
13285 `cancel_breakpoints'. Add new parameter to `pause_all'.
13286 (pause_all): Add new `freeze' parameter.
13287 (unpause_all): New.
13288 (cancel_breakpoints): New.
13289 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13290 cancel breakpoints.
13291 (cmd_qtstart): Pause threads.
13292 (stop_tracing): Pause threads, and cancel breakpoints.
13293 * win32-low.c (win32_target_ops): Adjust.
13294
e471f25b
PA
132952010-05-03 Pedro Alves <pedro@codesourcery.com>
13296
13297 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13298 the inferior right away from here...
13299 (linux_wait_1): ... to here, and adjust to check the thread's
13300 last_resume_kind instead of the lwp's step or stop_expected flags.
13301
1915ef4f
PA
133022010-05-02 Pedro Alves <pedro@codesourcery.com>
13303
13304 * README: Use consistent `GDB' and `GDBserver' spellings.
13305
f9e39928
PA
133062010-05-02 Pedro Alves <pedro@codesourcery.com>
13307
13308 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13309 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13310 (linux_detach_one_lwp): Assume the lwp is stopped.
13311 (any_thread_of): Delete.
13312 (linux_detach): Stop all lwps here. Don't blindly delete all
13313 breakpoints.
13314 (delete_lwp_callback): New.
13315 (linux_mourn): Delete all lwps of the process that is gone.
13316 (linux_wait_1): Don't delete the last lwp of the process here.
13317 * mem-break.h (mark_breakpoints_out): Declare.
13318 * mem-break.c (mark_breakpoints_out): New.
13319 (free_all_breakpoints): Use it.
13320 * server.c (handle_target_event): If the process is gone, mark
13321 breakpoints out.
13322 * thread-db.c (struct thread_db) <create_bp>: New field.
13323 (thread_db_enable_reporting): Fix prototype. Store a thread event
13324 breakpoint reference in the thread_db struct.
13325 (thread_db_load_search): Clear the thread_db object.
13326 (try_thread_db_load_1): Ditto.
13327 (switch_to_process): New.
13328 (disable_thread_event_reporting): Use it.
13329 (remove_thread_event_breakpoints): New.
13330 (thread_db_detach, thread_db_mourn): Use it.
13331
1e7fc18c
PA
133322010-05-01 Pedro Alves <pedro@codesourcery.com>
13333
13334 * linux-low.c (linux_enable_event_reporting): New.
13335 (linux_wait_for_event_1, handle_extended_wait): Use it.
13336
02fc4de7
PA
133372010-04-30 Pedro Alves <pedro@codesourcery.com>
13338
13339 * linux-low.c (linux_kill_one_lwp, linux_kill)
13340 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13341 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13342 SIGSTOP even if the LWP is stopped.
13343 (send_sigstop_callback): New.
13344 (stop_all_lwps): Use send_sigstop_callback instead.
13345 (linux_resume_one_thread): Adjust.
13346 (proceed_one_lwp): Still proceed an LWP that the client has
13347 requested to stop, if we haven't reported it as stopped yet. Make
13348 sure that LWPs the client want stopped, have a pending SIGSTOP.
13349
bc3b5632
DE
133502010-04-26 Doug Evans <dje@google.com>
13351
ae1ada35
DE
13352 * server.c (handle_general_set): Make static.
13353
bc3b5632
DE
13354 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13355 Print received char after testing for error/eof instead of before.
13356 (input_interrupt): Tweak comment.
13357
65730243
DE
133582010-04-23 Doug Evans <dje@google.com>
13359
13360 * server.c (start_inferior): Print inferior argv if --debug.
13361
a8ae7dc0
AR
133622010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13363
13364 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13365 * nto-x86-low.c: Include server.h
13366
1c07cc19
PM
133672010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13368
13369 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13370 be consistent with other sources of this directory.
13371 (init_registers_amd64): Correct name of source file of this function
13372 in the comment.
13373
e0a61e09
PM
133742010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13375
13376 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13377 64-bit executables.
13378
54709339
PM
133792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13380
13381 * win32-i386-low.c: Add 64-bit support.
13382 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13383 (init_registers_amd64): Declare.
13384 (mappings): Add 64-bit version of array.
13385 (init_windows_x86): New function.
13386 (the_low_target): Change init_arch field to init_windows_x86.
13387
e8f0053d
PM
133882010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13389
13390 * win32-low.c: Adapt to support also 64-bit architecture.
13391 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13392 (get_image_name): Use SIZE_T type for local variable `done'.
13393 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13394 (toolhelp_get_dll_name): Idem.
13395 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13396 Use uintptr_t typecast to avoid warning.
13397 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13398 (handle_exception): Use phex_nz to avoid warning.
13399 (win32_wait): Remove unused local variable `process'.
13400
c481e77e
PM
134012010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13402
13403 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13404 `amd64-avx.o'.
13405
12ea4b69
PM
134062010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13407
13408 * configure.ac: Use `ws2_32' library for srv_mingw.
13409 * configure: Regenerate.
13410 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13411 * remote-utils.c: Likewise.
13412
f6d1620c
L
134132010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13414
13415 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13416 if __x86_64__ is defined.
13417
8e642873
PM
134182010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13419
13420 * configure: Regenerate.
13421
711e434b
PM
134222010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13423
13424 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13425 * target.h (target_ops): New get_tib_address field.
13426 * win32-low.h (win32_thread_info): Add thread_local_base field.
13427 * win32-low.c (child_add_thread): Add tlb argument.
13428 Set thread_local_base field to TLB.
13429 (get_child_debug_event): Adapt to child_add_thread change.
13430 (win32_get_tib_address): New function.
13431 (win32_target_ops): Set get_tib_address field to
13432 win32_get_tib_address.
13433 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13434
505106cd
PA
134352010-04-12 Pedro Alves <pedro@codesourcery.com>
13436
505106cd
PA
13437 * linux-low.c (linux_mourn): Also remove the process.
13438 * server.c (handle_target_event): Don't remove the process here.
13439 * nto-low.c (nto_mourn): New.
13440 (nto_target_ops): Install it.
13441 * spu-low.c (spu_mourn): New.
13442 (spu_target_ops): Install it.
13443 * win32-low.c (win32_mourn): New.
13444 (win32_target_ops): Install it.
13445
e8470a06
PA
134462010-04-12 Pedro Alves <pedro@codesourcery.com>
13447
13448 * server.h (buffer_xml_printf): Remove redundant `;'.
13449
45ba0d02
PA
134502010-04-12 Pedro Alves <pedro@codesourcery.com>
13451
13452 * regcache.c (set_register_cache): Invalidate regcaches before
13453 changing the register cache layout.
13454 (regcache_invalidate_one): Allow a NULL regcache.
13455 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13456 regcaches before changing the register cache layout or the target
13457 regsets.
13458
59e04013
L
134592010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13460
13461 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13462 variable warning on Linux/x86-64.
13463
8336d594
PA
134642010-04-11 Pedro Alves <pedro@codesourcery.com>
13465
13466 GDBserver disconnected tracing support.
13467
13468 * linux-low.c (linux_remove_process): Delete.
13469 (add_lwp): Don't set last_resume_kind here.
13470 (linux_kill): Use `mourn'.
13471 (linux_detach): Use `thread_db_detach', and `mourn'.
13472 (linux_mourn): New.
13473 (linux_attach_lwp_1): Adjust comment.
13474 (linux_attach): last_resume_kind moved the thread_info; adjust.
13475 (status_pending_p_callback): Adjust.
13476 (linux_wait_for_event_1): Adjust.
13477 (count_events_callback, select_singlestep_lwp_callback)
13478 (select_event_lwp_callback, cancel_breakpoints_callback)
13479 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13480 (proceed_one_lwp): Adjust.
13481 (linux_async): Add debug output.
13482 (linux_thread_stopped): New.
13483 (linux_pause_all): New.
13484 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13485 linux_pause_all.
13486 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13487 (thread_db_free): Delete declaration.
13488 (thread_db_detach, thread_db_mourn): Declare.
13489 * thread-db.c (thread_db_init): Use thread_db_mourn.
13490 (thread_db_free): Delete, split in two.
13491 (disable_thread_event_reporting): New.
13492 (thread_db_detach): New.
13493 (thread_db_mourn): New.
13494
13495 * server.h (struct thread_info) <last_resume_kind>: New field.
13496 <attached>: Add comment.
13497 <gdb_detached>: New field.
13498 (handler_func): Change return type to int.
13499 (handle_serial_event, handle_target_event): Ditto.
13500 (gdb_connected): Declare.
13501 (tracing): Delete.
13502 (disconnected_tracing): Declare.
13503 (stop_tracing): Declare.
13504
13505 * server.c (handle_query) <qSupported>: Report support for
13506 disconnected tracing.
13507 (queue_stop_reply_callback): Account for running threads.
13508 (gdb_wants_thread_stopped): New.
13509 (gdb_wants_all_threads_stopped): New.
13510 (gdb_reattached_process): New.
13511 (handle_status): Clear the `gdb_detached' flag of all processes.
13512 In all-stop, stop all threads.
13513 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13514 (process_serial_event): If the remote connection breaks, or if an
13515 exit was forced with "monitor exit", force an event loop exit.
13516 Handle disconnected tracing on detach.
13517 (handle_serial_event): Adjust.
13518 (handle_target_event): If GDB isn't connected, forward events back
13519 to the inferior, unless the last process exited, in which case,
13520 exit gdbserver. Adjust interface.
13521
13522 * remote-utils.c (remote_open): Don't block in accept. Instead
13523 register an event loop source on the listen socket file
13524 descriptor. Refactor bits into ...
13525 (listen_desc): ... this new global.
13526 (gdb_connected): ... this new function.
13527 (enable_async_notification): ... this new function.
13528 (handle_accept_event): ... this new function.
13529 (remote_close): Clear remote_desc.
13530
13531 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13532
13533 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13534 New fields.
13535 (mourn_inferior): Define.
13536 (target_process_qsupported): Avoid the dangling else problem.
13537 (thread_stopped): Define.
13538 (pause_all): Define.
13539 (target_waitstatus_to_string): Declare.
13540 * target.c (target_waitstatus_to_string): New.
13541
13542 * tracepoint.c (tracing): Make extern.
13543 (disconnected_tracing): New.
13544 (stop_tracing): Make extern. Handle tracing stops due to GDB
13545 disconnecting.
13546 (cmd_qtdisconnected): New.
13547 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13548 (handle_tracepoint_general_set): Handle QTDisconnected.
13549
13550 * event-loop.c (event_handler_func): Change return type to int.
13551 (process_event): Bail out if the event handler wants the event
13552 loop to stop.
13553 (handle_file_event): Ditto.
13554 (start_event_loop): Bail out if the event handler wants the event
13555 loop to stop.
13556
13557 * nto-low.c (nto_target_ops): Adjust.
13558 * spu-low.c (spu_wait): Don't remove the process here.
13559 (spu_target_ops): Adjust.
13560 * win32-low.c (win32_wait): Don't remove the process here.
13561 (win32_target_ops): Adjust.
13562
5d267c4c
PA
135632010-04-11 Pedro Alves <pedro@codesourcery.com>
13564
13565 * regcache.c (realloc_register_cache): Invalidate inferior's
13566 regcache before recreating it.
13567
623ccd72
PA
135682010-04-09 Pedro Alves <pedro@codesourcery.com>
13569
13570 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13571
219f2f23
PA
135722010-04-09 Stan Shebs <stan@codesourcery.com>
13573 Pedro Alves <pedro@codesourcery.com>
13574
13575 * server.h (LONGEST): New.
13576 (struct thread_info) <while_stepping>: New field.
13577 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13578 Declare.
13579 (initialize_tracepoint, handle_tracepoint_general_set)
13580 (handle_tracepoint_query, tracepoint_finished_step)
13581 (tracepoint_was_hit, release_while_stepping_state_list):
13582 (current_traceframe): Declare.
13583 * server.c (handle_general_set): Handle tracepoint packets.
13584 (read_memory): New.
13585 (write_memory): New.
13586 (handle_search_memory_1): Use read_memory.
13587 (handle_query): Report support for conditional tracepoints, trace
13588 state variables, and tracepoint sources. Handle tracepoint
13589 queries.
13590 (main): Initialize the tracepoints module.
13591 (process_serial_event): Handle traceframe reads/writes.
13592
13593 * linux-low.c (handle_tracepoints): New.
13594 (linux_wait_1): Call it.
13595 (linux_resume_one_lwp): Handle while-stepping.
13596 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13597 (linux_target_ops): Install them.
13598 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13599 New field.
13600 * linux-x86-low.c (x86_supports_tracepoints): New.
13601 (the_low_target). Install it.
13602
13603 * mem-break.h (delete_breakpoint): Declare.
13604 * mem-break.c (delete_breakpoint): Make external.
13605
13606 * target.h (struct target_ops): Add `supports_tracepoints',
13607 `read_pc', and `write_pc' fields.
13608 (target_supports_tracepoints): Define.
13609 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13610 (phex_nz): New.
13611
13612 * regcache.h (struct regcache) <registers_owned>: New field.
13613 (init_register_cache, regcache_cpy): Declare.
13614 (regcache_read_pc, regcache_write_pc): Declare.
13615 (register_cache_size): Declare.
13616 (supply_regblock): Declare.
13617 * regcache.c (init_register_cache): New.
13618 (new_register_cache): Use it.
13619 (regcache_cpy): New.
13620 (register_cache_size): New.
13621 (supply_regblock): New.
13622 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13623
219f2f23
PA
13624 * tracepoint.c: New.
13625
13626 * Makefile.in (OBS): Add tracepoint.o.
13627 (tracepoint.o): New rule.
13628
3a13a53b
L
136292010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13630
13631 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13632 (i386-mmx.o): New.
13633 (i386-mmx.c): Likewise.
13634 (i386-mmx-linux.o): Likewise.
13635 (i386-mmx-linux.c): Likewise.
13636
13637 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13638 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13639 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13640 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13641
13642 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13643 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13644 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13645
1570b33e
L
136462010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13647
13648 * Makefile.in (clean): Updated.
13649 (i386-avx.o): New.
13650 (i386-avx.c): Likewise.
13651 (i386-avx-linux.o): Likewise.
13652 (i386-avx-linux.c): Likewise.
13653 (amd64-avx.o): Likewise.
13654 (amd64-avx.c): Likewise.
13655 (amd64-avx-linux.o): Likewise.
13656 (amd64-avx-linux.c): Likewise.
13657
13658 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13659 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13660 (srv_amd64_regobj): Add amd64-avx.o.
13661 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13662 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13663 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13664 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13665 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13666 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13667 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13668
13669 * i387-fp.c: Include "i386-xstate.h".
13670 (i387_xsave): New.
13671 (i387_cache_to_xsave): Likewise.
13672 (i387_xsave_to_cache): Likewise.
13673 (x86_xcr0): Likewise.
13674
13675 * i387-fp.h (i387_cache_to_xsave): Likewise.
13676 (i387_xsave_to_cache): Likewise.
13677 (x86_xcr0): Likewise.
13678
13679 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13680 * linux-crisv32-low.c (target_regsets): Likewise.
13681 * linux-m68k-low.c (target_regsets): Likewise.
13682 * linux-mips-low.c (target_regsets): Likewise.
13683 * linux-ppc-low.c (target_regsets): Likewise.
13684 * linux-s390-low.c (target_regsets): Likewise.
13685 * linux-sh-low.c (target_regsets): Likewise.
13686 * linux-sparc-low.c (target_regsets): Likewise.
13687 * linux-xtensa-low.c (target_regsets): Likewise.
13688
13689 * linux-low.c: Include <sys/uio.h>.
13690 (regsets_fetch_inferior_registers): Support nt_type.
13691 (regsets_store_inferior_registers): Likewise.
13692 (linux_process_qsupported): New.
13693 (linux_target_ops): Add linux_process_qsupported.
13694
13695 * linux-low.h (regset_info): Add nt_type.
13696 (linux_target_ops): Add process_qsupported.
13697
13698 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13699 and <sys/uio.h>.
13700 (init_registers_i386_avx_linux): New.
13701 (init_registers_amd64_avx_linux): Likewise.
13702 (xmltarget_i386_linux_no_xml): Likewise.
13703 (xmltarget_amd64_linux_no_xml): Likewise.
13704 (PTRACE_GETREGSET): Likewise.
13705 (PTRACE_SETREGSET): Likewise.
13706 (x86_fill_xstateregset): Likewise.
13707 (x86_store_xstateregset): Likewise.
13708 (use_xml): Likewise.
13709 (x86_linux_update_xmltarget): Likewise.
13710 (x86_linux_process_qsupported): Likewise.
13711 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13712 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13713 init_registers_i386_linux here. Call
13714 x86_linux_update_xmltarget.
13715 (the_low_target): Add x86_linux_process_qsupported.
13716
13717 * server.c (handle_query): Call target_process_qsupported.
13718
13719 * target.h (target_ops): Add process_qsupported.
13720 (target_process_qsupported): New.
13721
fc7238bb
PA
137222010-04-03 Pedro Alves <pedro@codesourcery.com>
13723
13724 * inferiors.c (add_thread): Set last_status kind to
13725 TARGET_WAITKIND_IGNORE.
13726 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13727 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13728 (linux_wait_1): Move `thread' local definition to block that uses
13729 it. Don't NULL initialize `event_child'.
13730 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13731 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13732 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13733
bdabb078
PA
137342010-04-01 Pedro Alves <pedro@codesourcery.com>
13735
13736 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13737 an extended waitstatus, or by a watchpoint.
13738 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13739 thread was stepping or has been stopped by a watchpoint.
13740
d3bbe7a0
PA
137412010-04-01 Pedro Alves <pedro@codesourcery.com>
13742
13743 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13744 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13745 of another, then delete the previous, and validate all
13746 breakpoints.
13747 (validate_inserted_breakpoint): New.
13748 (delete_disabled_breakpoints): New.
13749 (validate_breakpoints): New.
13750 (check_mem_read): Validate breakpoints before trusting their
13751 shadow. Delete disabled breakpoints.
13752 (check_mem_write): Validate breakpoints before trusting they
13753 should be inserted. Delete disabled breakpoints.
13754 * mem-break.h (validate_breakpoints):
13755 * server.c (handle_query): Validate breakpoints when we see a
13756 qSymbol query.
13757
8b07ae33
PA
137582010-04-01 Pedro Alves <pedro@codesourcery.com>
13759
13760 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13761 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13762 if we could tell there's a GDB breakpoint at stop_pc.
13763 (need_step_over_p): Don't do a step over if we find a GDB
13764 breakpoint at the resume PC.
13765
13766 * mem-break.c (struct raw_breakpoint): New.
13767 (enum bkpt_type): New type `gdb_breakpoint'.
13768 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13769 fields. New field `raw'.
13770 (find_raw_breakpoint_at): New.
13771 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13772 breakpoint instead.
13773 (set_breakpoint_at): Adjust.
13774 (delete_raw_breakpoint): New.
13775 (release_breakpoint): New.
13776 (delete_breakpoint): Rename to...
13777 (delete_breakpoint_1): ... this. Add proc parameter. Use
13778 release_breakpoint. Return ENOENT.
13779 (delete_breakpoint): Reimplement.
13780 (find_breakpoint_at): Delete.
13781 (find_gdb_breakpoint_at): New.
13782 (delete_breakpoint_at): Delete.
13783 (set_gdb_breakpoint_at): New.
13784 (delete_gdb_breakpoint_at): New.
13785 (gdb_breakpoint_here): New.
13786 (set_reinsert_breakpoint): Use release_breakpoint.
13787 (uninsert_breakpoint): Rename to ...
13788 (uninsert_raw_breakpoint): ... this.
13789 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13790 (reinsert_raw_breakpoint): Change parameter type to
13791 raw_breakpoint.
13792 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13793 instead.
13794 (check_breakpoints): Adjust. Use release_breakpoint.
13795 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13796 (breakpoint_inserted_here): Ditto.
13797 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13798 Don't trust the breakpoint's shadow if it is not inserted.
13799 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13800 (delete_all_breakpoints): Adjust.
13801 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13802 use delete_breakpoint_1.
13803
13804 * mem-break.h (breakpoints_supported): Delete declaration.
13805 (set_gdb_breakpoint_at): Declare.
13806 (gdb_breakpoint_here): Declare.
13807 (delete_breakpoint_at): Delete.
13808 (delete_gdb_breakpoint_at): Declare.
13809
13810 * server.h (struct raw_breakpoint): Forward declare.
13811 (struct process_info): New field `raw_breakpoints'.
13812
13813 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13814 breakpoints.
13815
6bf5e0ba
PA
138162010-03-24 Pedro Alves <pedro@codesourcery.com>
13817
13818 * linux-low.c (status_pending_p_callback): Fix comment.
13819 (linux_wait_for_event_1): Move most of the internal breakpoint
13820 handling from here...
13821 (linux_wait_1): ... to here.
13822 (count_events_callback): New.
13823 (select_singlestep_lwp_callback): New.
13824 (select_event_lwp_callback): New.
13825 (cancel_breakpoints_callback): New.
13826 (select_event_lwp): New.
13827 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13828 priority to all LWPs that have had events that should be reported
13829 to the client. Cancel breakpoints when about to reporting the
13830 event to the client, not while stopping lwps. No longer cancel
13831 finished single-steps here.
13832 (cancel_finished_single_step): Delete.
13833 (cancel_finished_single_steps): Delete.
13834
414a389f
PA
138352010-03-24 Pedro Alves <pedro@codesourcery.com>
13836
13837 * mem-break.c (enum bkpt_type): New.
13838 (struct breakpoint): New field `type'.
13839 (set_breakpoint_at): Change return type to struct breakpoint
13840 pointer. Set type to `other_breakpoint' by default.
13841 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13842 in the breakpoint list.
13843 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13844 (reinsert_breakpoint): Rename to ...
13845 (reinsert_raw_breakpoint): ... this.
13846 (reinsert_breakpoints_at): Adjust.
13847 * mem-break.h (struct breakpoint): Declare.
13848 (set_breakpoint_at): Change return type to struct breakpoint
13849 pointer.
13850
2280c721
PA
138512010-03-24 Pedro Alves <pedro@codesourcery.com>
13852
13853 * server.c (handle_query): Assign, not compare.
13854
d50171e4
PA
138552010-03-24 Pedro Alves <pedro@codesourcery.com>
13856
13857 Teach linux gdbserver to step-over-breakpoints.
13858
13859 * linux-low.c (can_hardware_single_step): New.
13860 (supports_breakpoints): New.
13861 (handle_extended_wait): If stopping threads, read the stop pc of
13862 the new cloned LWP.
13863 (get_pc): New.
13864 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13865 low target doesn't support retrieving the PC.
13866 (add_lwp): Set last_resume_kind to resume_continue.
13867 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13868 (linux_attach): Don't clear stop_expected. Set the lwp's
13869 last_resume_kind to resume_stop.
13870 (linux_detach_one_lwp): Don't check for removed breakpoints.
13871 (check_removed_breakpoint): Delete.
13872 (status_pending_p): Rename to ...
13873 (status_pending_p_callback): ... this. Don't check for removed
13874 breakpoints. Don't consider threads that are stopped from GDB's
13875 perspective.
13876 (linux_wait_for_lwp): Always read the stop_pc here.
13877 (cancel_breakpoint): New.
13878 (step_over_bkpt): New global.
13879 (linux_wait_for_event_1): Implement stepping over breakpoints.
13880 (gdb_wants_lwp_stopped): New.
13881 (gdb_wants_all_stopped): New.
13882 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13883 single-step traps here. Store the thread's last reported target
13884 wait status.
13885 (send_sigstop): Don't clear stop_expected. Always set it,
13886 instead.
13887 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13888 (cancel_finished_single_step): New.
13889 (cancel_finished_single_steps): New.
13890 (wait_for_sigstop): Don't cancel finished single-step traps here.
13891 (linux_resume_one_lwp): Don't check for removed breakpoints.
13892 Don't set `step' on non-hardware step archs.
13893 (linux_set_resume_request): Ignore resume_stop requests if already
13894 stopping or stopped. Set the lwp's last_resume_kind.
13895 (resume_status_pending_p): Don't check for removed breakpoints.
13896 (need_step_over_p): New.
13897 (start_step_over): New.
13898 (finish_step_over): New.
13899 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13900 requests. Clear the thread's last reported target waitstatus.
13901 Don't use the `suspended' flag. Don't consider pending breakpoints.
13902 (linux_resume): Start a step-over if necessary.
13903 (proceed_one_lwp): New.
13904 (proceed_all_lwps): New.
13905 (unstop_all_lwps): New.
13906 * linux-low.h (struct lwp_info): Rewrite comment for the
13907 `suspended' flag. Add the `stop_pc' field. Delete the
13908 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13909 Add `'last_resume_kind' and `need_step_over' fields.
13910 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13911 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13912 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13913 (set_raw_breakpoint_at): New.
13914 (set_breakpoint_at): Rewrite to use it.
13915 (reinsert_breakpoint_handler): Delete.
13916 (set_reinsert_breakpoint): New.
13917 (reinsert_breakpoint_by_bp): Delete.
13918 (delete_reinsert_breakpoints): New.
13919 (uninsert_breakpoint): Rewrite.
13920 (uninsert_breakpoints_at): New.
13921 (reinsert_breakpoint): Rewrite.
13922 (reinsert_breakpoints_at): New.
13923 (check_breakpoints): Rewrite.
13924 (breakpoint_here): New.
13925 (breakpoint_inserted_here): New.
13926 (check_mem_read): Adjust.
13927 * mem-break.h (breakpoints_supported, breakpoint_here)
13928 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13929 (reinsert_breakpoint_by_bp): Delete declaration.
13930 (delete_reinsert_breakpoints): Declare.
13931 (reinsert_breakpoint): Delete declaration.
13932 (reinsert_breakpoints_at): Declare.
13933 (uninsert_breakpoint): Delete declaration.
13934 (uninsert_breakpoints_at): Declare.
13935 (check_breakpoints): Adjust prototype.
13936 * server.h: Adjust include order.
13937 (struct thread_info): Declare here. Add a `last_status' field.
13938
30ba68cb
MS
139392010-03-23 Michael Snyder <msnyder@vmware.com>
13940
13941 * server.c (crc32): New function.
13942 (handle_query): Add handling for 'qCRC:' request.
13943
b9a881c2
PA
139442010-03-23 Pedro Alves <pedro@codesourcery.com>
13945
13946 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13947 lwp had been stopped by a watchpoint.
13948
e92d13d5
PA
139492010-03-16 Pedro Alves <pedro@codesourcery.com>
13950
13951 * server.h (internal_error): Declare.
13952 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13953 * utils.c (internal_error): New function.
13954
64daa791
AS
139552010-03-15 Andreas Schwab <schwab@redhat.com>
13956
13957 * configure.srv: Fix typo setting srv_regobj.
13958
f52cd8cd
PA
139592010-03-15 Pedro Alves <pedro@codesourcery.com>
13960
13961 * linux-low.c (fetch_register): Avoid passing a non string literal
13962 format to `error'.
13963 (usr_store_inferior_registers): Ditto.
13964
93ae6fdc
PA
139652010-03-14 Pedro Alves <pedro@codesourcery.com>
13966
13967 * linux-low.c (linux_write_memory): Bail out early if peeking
13968 memory failed.
13969
c3adc08c
PA
139702010-03-14 Pedro Alves <pedro@codesourcery.com>
13971
13972 * linux-low.h (struct lwp_info): New fields
13973 `stopped_by_watchpoint' and `stopped_data_address'.
13974 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13975 here, and cache them in the lwp object.
13976 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13977 directly.
13978 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13979 field.
13980 (linux_stopped_by_watchpoint): Rewrite.
13981 (linux_stopped_data_address): Rewrite.
13982
bce522a2
PA
139832010-03-06 Simo Melenius <simo.melenius@iki.fi>
13984
13985 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13986 switching the current inferior, not before.
13987
90884b2b
L
139882010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13989
13990 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13991 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13992 i386-linux.c and amd64-linux.c.
13993 (reg-i386.o): Removed.
13994 (reg-i386.c): Likewise.
13995 (reg-i386-linux.o): Likewise.
13996 (reg-i386-linux.c): Likewise.
13997 (reg-x86-64.o): Likewise.
13998 (reg-x86-64.c): Likewise.
13999 (reg-x86-64-linux.o): Likewise.
14000 (reg-x86-64-linux.c): Likewise.
14001 (i386.o): New.
14002 (i386.c): Likewise.
14003 (i386-linux.o): Likewise.
14004 (i386-linux.c): Likewise.
14005 (amd64.o): Likewise.
14006 (amd64.c): Likewise.
14007 (amd64-linux.o): Likewise.
14008 (amd64-linux.c): Likewise.
14009
14010 * configure.srv (srv_i386_regobj): New.
14011 (srv_i386_linux_regobj): Likewise.
14012 (srv_amd64_regobj): Likewise.
14013 (srv_amd64_linux_regobj): Likewise.
14014 (srv_i386_32bit_xmlfiles): Likewise.
14015 (srv_i386_64bit_xmlfiles): Likewise.
14016 (srv_i386_xmlfiles): Likewise.
14017 (srv_amd64_xmlfiles): Likewise.
14018 (srv_i386_linux_xmlfiles): Likewise.
14019 (srv_amd64_linux_xmlfiles): Likewise.
14020 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14021 srv_xmlfiles to $srv_i386_xmlfiles.
14022 (i[34567]86-*-mingw32ce*): Likewise.
14023 (i[34567]86-*-mingw*): Likewise.
14024 (i[34567]86-*-nto*): Likewise.
14025 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14026 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14027 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14028 (x86_64-*-linux*): Likewise.
14029
14030 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14031 (init_registers_amd64_linux): New.
14032 (x86_arch_setup): Replace init_registers_x86_64_linux with
14033 init_registers_amd64_linux.
14034
193f13e6
MK
140352010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14036
14037 * configure.ac: Check for libdl. If it is not available link against
14038 static libthread_db.
14039 * configure: Regenerate.
14040
85d721b8
PA
140412010-02-22 Pedro Alves <pedro@codesourcery.com>
14042
14043 PR9605
14044
14045 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14046 handing a read watchpoint.
14047 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14048
6076632b
DE
140492010-02-12 Doug Evans <dje@google.com>
14050
14051 * linux-low.c (linux_supports_tracefork_flag): Document.
14052 (linux_look_up_symbols): Add comment.
14053
3327ccf7
L
140542010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14055
14056 * regcache.c (supply_register): Clear regcache if buf is NULL.
14057
0718675c 140582010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14059 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14060
14061 * inferiors.c (find_inferior): Add function documentation.
14062 (unloaded_dll): Handle the case where the unloaded dll has not
14063 been previously registered in the dll list.
14064
177321bd
DJ
140652010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14066
14067 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14068 (thumb2_breakpoint): New.
14069 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14070
2b009048
DJ
140712010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14072
14073 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14074 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14075 breakpoints.
14076
3be029c7
PA
140772010-01-21 Pedro Alves <pedro@codesourcery.com>
14078
14079 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14080
18f5de3b
JK
140812010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14082
14083 * linux-s390-low.c (s390_collect_ptrace_register)
14084 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14085
3743bb4f
DE
140862010-01-21 Doug Evans <dje@google.com>
14087
14ce3065
DE
14088 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14089 (PTRACE_ARG4_TYPE): New macro.
14090 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14091 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14092 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14093 (usr_store_inferior_registers): Ditto.
14094 (linux_read_memory, linux_write_memory): Ditto.
14095 (linux_test_for_tracefork): Ditto.
14096
3743bb4f
DE
14097 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14098 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14099
8b315be5
PA
141002010-01-21 Pedro Alves <pedro@codesourcery.com>
14101
14102 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14103 target.
14104
85492558
PA
141052010-01-21 Pedro Alves <pedro@codesourcery.com>
14106
14107 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14108 prototype to take a regcache. Adjust.
14109
442ea881
PA
141102010-01-20 Pedro Alves <pedro@codesourcery.com>
14111
14112 * regcache.h (struct thread_info): Forward declare.
14113 (struct regcache): New.
14114 (new_register_cache): Adjust prototype.
14115 (get_thread_regcache): Declare.
14116 (free_register_cache): Adjust prototype.
14117 (registers_to_string, registers_from_string): Ditto.
14118 (supply_register, supply_register_by_name, collect_register)
14119 (collect_register_as_string, collect_register_by_name): Ditto.
14120 * regcache.c (struct inferior_regcache_data): Delete.
14121 (get_regcache): Rename to ...
14122 (get_thread_regcache): ... this. Adjust. Switch inferior before
14123 fetching registers.
14124 (regcache_invalidate_one): Adjust.
14125 (regcache_invalidate): Fix prototype.
14126 (new_register_cache): Return the new register cache.
14127 (free_register_cache): Change prototype.
14128 (realloc_register_cache): Adjust.
14129 (registers_to_string): Change prototype to take a regcache. Adjust.
14130 (registers_from_string): Ditto.
14131 (register_data): Ditto.
14132 (supply_register): Ditto.
14133 (supply_register_by_name): Ditto.
14134 (collect_register): Ditto.
14135 (collect_register_as_string): Ditto.
14136 (collect_register_by_name): Ditto.
14137 * server.c (process_serial_event): Adjust.
14138 * linux-low.h (regset_fill_func, regset_store_func): Change
14139 prototype.
14140 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14141 Change prototype.
14142 * linux-low.c (get_stop_pc): Adjust.
14143 (check_removed_breakpoint): Adjust.
14144 (linux_wait_for_event): Adjust.
14145 (linux_resume_one_lwp): Adjust.
14146 (fetch_register): Add regcache parameter. Adjust.
14147 (usr_store_inferior_registers): Ditto.
14148 (regsets_fetch_inferior_registers): Ditto.
14149 (regsets_store_inferior_registers): Ditto.
14150 (linux_fetch_registers, linux_store_registers): Ditto.
14151 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14152 regcache. Adjust.
43aaf8b6
PA
14153 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14154 Ditto.
442ea881
PA
14155 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14156 prototype to take a regcache.
14157 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14158 * remote-utils.c (convert_ascii_to_int, outreg)
14159 (prepare_resume_reply): Change prototype to take a regcache.
14160 Adjust.
14161 * target.h (struct target_ops) <fetch_registers, store_registers>:
14162 Change prototype to take a regcache.
14163 (fetch_inferior_registers, store_inferior_registers): Change
14164 prototype to take a regcache. Adjust.
14165 * proc-service.c (ps_lgetregs): Adjust.
14166 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14167 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14168 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14169 take a regcache. Adjust.
14170 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14171 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14172 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14173 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14174 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14175 (cris_cannot_fetch_register):
14176 (cris_breakpoint_at): Change prototype to take a regcache.
14177 Adjust.
14178 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14179 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14180 to take a regcache. Adjust.
14181 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14182 Adjust.
14183 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14184 take a regcache. Adjust.
14185 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14186 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14187 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14188 * linux-mips-low.c (mips_get_pc):
14189 (mips_set_pc): Change prototype to take a regcache. Adjust.
14190 (mips_reinsert_addr): Adjust.
14191 (mips_collect_register): Change prototype to take a regcache.
14192 Adjust.
14193 (mips_supply_register):
14194 (mips_collect_register_32bit, mips_supply_register_32bit)
14195 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14196 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14197 * linux-ppc-low.c (ppc_supply_ptrace_register)
14198 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14199 (parse_spufs_run): Adjust.
14200 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14201 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14202 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14203 take a regcache. Adjust.
14204 * linux-s390-low.c (s390_collect_ptrace_register)
14205 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14206 (s390_set_pc): Change prototype to take a regcache. Adjust.
14207 (s390_arch_setup): Adjust.
14208 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14209 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14210 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14211 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14212 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14213 regcache. Adjust.
14214 (sparc_breakpoint_at): Adjust.
14215 * linux-xtensa-low.c (xtensa_fill_gregset):
14216 (xtensa_store_gregset):
14217 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14218 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14219 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14220 prototype to take a regcache. Adjust.
14221 * win32-arm-low.c (arm_fetch_inferior_register)
14222 (arm_store_inferior_register): Change prototype to take a
14223 regcache. Adjust.
14224 * win32-i386-low.c (i386_fetch_inferior_register)
14225 (i386_store_inferior_register): Change prototype to take a
14226 regcache. Adjust.
14227 * win32-low.c (child_fetch_inferior_registers)
14228 (child_store_inferior_registers): Change prototype to take a
14229 regcache. Adjust.
14230 (win32_wait): Adjust.
14231 (win32_fetch_inferior_registers): Change prototype to take a
14232 regcache. Adjust.
14233 (win32_store_inferior_registers): Adjust.
14234 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14235 store_inferior_register>: Change prototype to take a regcache.
14236
60c3d7b0
DE
142372010-01-20 Doug Evans <dje@google.com>
14238
14239 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14240 #ifdef.
14241 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14242 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14243
dc146f7c
VP
142442010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14245
14246 * linux-low.c (linux_core_of_thread): New.
14247 (compare_ints, show_process, list_threads): New.
14248 (linux_qxfer_osdata): Report threads and cores.
14249 (linux_target_op): Register linux_core_of_thread.
14250 * remote-utils.c (prepare_resume_reply): Report the core.
14251 (buffer_xml_printf): Support %d specifier.
14252 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14253 New.
14254 (handle_query): Handle qXfer:threads. Announce availability
14255 thereof.
14256 * target.h (struct target_ops): New field core_of_thread.
14257
7803799a
UW
142582010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14259
14260 * Makefile.in (clean): Remove new generated files.
14261 (reg-s390.o, reg-s390.c): Remove rules.
14262 (reg-s390x.o, reg-s390x.c): Likewise.
14263 (s390-linux32.o, s390-linux32.c): Add rules.
14264 (s390-linux64.o, s390-linux64.c): Likewise.
14265 (s390x-linux64.o, s390x-linux64.c): Likewise.
14266 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14267 * linux-s390-low.c: Include <elf.h>.
14268 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14269 (init_registers_s390): Remove prototype.
14270 (init_registers_s390x): Likewise.
14271 (init_registers_s390_linux32): Add prototype.
14272 (init_registers_s390_linux64): Likewise.
14273 (init_registers_s390x_linux64): Likewise.
14274 (s390_num_regs_3264): New define.
14275 (s390_regmap_3264): New global variable.
14276 (s390_cannot_fetch_register): Remove obsolete check.
14277 (s390_cannot_store_register): Likewise.
14278 (s390_collect_ptrace_register): Handle upper/lower register halves.
14279 (s390_supply_ptrace_register): Likewise.
14280 (s390_fill_gregset): Update to register number changes.
14281 (s390_get_hwcap): New routine.
14282 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14283 Install appropriate regmap and register set.
14284
6e7ffa39
JB
142852010-01-01 Joel Brobecker <brobecker@adacore.com>
14286
14287 * server.c (gdbserver_version): Update copyright year to 2010.
14288 * gdbreplay.c (gdbreplay_version): Likewise.
14289
957f3f49
DE
142902009-12-28 Doug Evans <dje@google.com>
14291
14292 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14293 elf/external.h. Include <elf.h> instead but only if necessary.
14294
ca5c370d
PA
142952009-12-28 Pedro Alves <pedro@codesourcery.com>
14296
14297 * linux-low.c (linux_remove_process): Remove `detaching'
14298 parameter. Don't release/detach from thread_db here.
14299 (linux_kill): Release/detach from thread_db here, ...
14300 (linux_detach): ... and here, before actually detaching.
14301 (linux_wait_1): ... and here, when a process exits.
14302 * thread-db.c (any_thread_of): New.
14303 (thread_db_free): Switch the current inferior to a thread of the
14304 passed in process.
14305
4ee62156
DE
143062009-12-21 Doug Evans <dje@google.com>
14307
d90e6a88
DE
14308 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14309
c5f62d5f
DE
14310 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14311 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14312 warning ifndef __NR_tkill. Move setting of errno there too.
14313 Delete unnecessary resetting of errno after syscall.
14314 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14315
10e86dd7
DE
14316 * configure.ac: Check for dladdr.
14317 * config.in: Regenerate.
14318 * configure: Regenerate.
14319 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14320 (try_thread_db_load): Update.
14321
4ee62156
DE
14322 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14323
00f515da
DE
143242009-12-18 Doug Evans <dje@google.com>
14325
e9464885
DE
14326 * event-loop.c: Include unistd.h if it exists.
14327
07d4f67e
DE
14328 * linux-low.c (my_waitpid): Move definition away from being in
14329 between linux_tracefork_child/linux_test_for_tracefork.
14330
00f515da
DE
14331 * gdb_proc_service.h (psaddr_t): Fix type.
14332 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14333 signature to match glibc.
14334
1de1badb
DE
143352009-12-16 Doug Evans <dje@google.com>
14336
14337 * linux-low.c (linux_read_memory): Fix argument to read.
14338
aeeb81d1
PA
143392009-11-26 Pedro Alves <pedro@codesourcery.com>
14340
14341 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14342 events, don't leave current_inferior pointing at null.
14343
10357975
PA
143442009-11-26 Pedro Alves <pedro@codesourcery.com>
14345
14346 * win32-low.c (LOG): Delete.
14347 (OUTMSG): Output to stderr.
14348 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14349 on compile time LOG macro.
14350 (win32_wait): Fix debug output.
14351
cf6e3471
PA
143522009-11-26 Pedro Alves <pedro@codesourcery.com>
14353
14354 * win32-low.c (win32_add_one_solib): If the dll name is
14355 "ntdll.dll", prepend the system directory to the dll path.
14356
0c85e18e
MK
143572009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14358
14359 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14360
9ac544ce 143612009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14362 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14363
14364 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14365 * configure.ac: Check for __mcoldfire__ and set
14366 gdb_cv_m68k_is_coldfire.
14367 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14368 reg-cf.o and reg-m68k.o.
14369 * configure: Regenerated.
14370
fd7dd3e6
PA
143712009-11-16 Pedro Alves <pedro@codesourcery.com>
14372
14373 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14374 Pass it to thread_db_free.
14375 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14376 proper `detaching' argument to linux_remove_process.
14377 * linux-low.h (thread_db_free): Add `detaching' parameter.
14378 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14379 to thread_db_free.
14380 (thread_db_free): Add `detaching' parameter. Only
14381 call td_ta_clear_event if detaching from process.
14382
75aa492e
MK
143832009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14384
14385 * thread-db.c (thread_db_free): Fix typo.
14386
21e1bee4
PP
143872009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14388
14389 PR gdb/10838
14390 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14391
8838b45e
NS
143922009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14393
14394 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14395 with an i686 compiler.
14396 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14397 needed.
14398 * configure: Rebuilt.
14399
8a35fb51
SL
144002009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14401
14402 PR gdb/10783
14403
14404 * server.c (handle_search_memory_1): Correct read_addr initialization
14405 in loop for searching subsequent chunks.
14406
96f15937
PP
144072009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14408
14409 * configure.ac: New --with-libthread-db option.
14410 * thread-db.c: Allow direct dependence on libthread_db.
14411 (thread_db_free): Adjust.
14412 * config.in: Regenerate.
14413 * configure: Likewise.
889bf7c5 14414
5f7d1694
PP
144152009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14416
14417 PR gdb/10757
14418 * thread-db.c (attach_thread): New function.
14419 (maybe_attach_thread): Return success/failure.
14420 (find_new_threads_callback): Adjust.
889bf7c5
PA
14421 (thread_db_find_new_threads): Loop until no new threads.
14422
88e3b899
PA
144232009-10-13 Pedro Alves <pedro@codesourcery.com>
14424
14425 * proc-service.c (ps_lgetregs): Formatting.
14426
cdbfd419
PP
144272009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14428
14429 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14430 * configure.ac: Adjust.
14431 * linux-low.h (struct process_info_private): Move members to struct
14432 thread_db.
14433 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14434 * linux-low.c (linux_remove_process): Adjust.
14435 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14436 * server.c (handle_query): Move code ...
14437 (handle_monitor_command): ... here. New function.
14438 * target.h (struct target_ops): New member.
14439 * thread-db.c (struct thread_db): New.
14440 (libthread_db_search_path): New variable.
14441 (thread_db_create_event, thread_db_enable_reporting)
14442 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14443 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14444 (try_thread_db_load_1, dladdr_to_soname): New functions.
14445 (try_thread_db_load, thread_db_load_search): New functions.
14446 (thread_db_init): Search for libthread_db.
14447 (thread_db_free): New function.
14448 (thread_db_handle_monitor_command): Likewise.
14449 * config.in: Regenerate.
14450 * configure: Regenerate.
889bf7c5 14451
4168d2d6
UW
144522009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14453
14454 * spu-low.c (spu_kill): Wait for inferior to terminate.
14455 Call clear_inferiors.
14456 (spu_detach): Call clear_inferiors.
14457
81ecdfbb
RW
144582009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14459
14460 * aclocal.m4: Regenerate.
14461 * config.in: Likewise.
14462 * configure: Likewise.
14463
0b9ff2c0
UW
144642009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14465
14466 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14467 (parse_spufs_run): New function.
14468 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14469 (ppc_breakpoint_at): Handle SPU breakpoints.
14470
efcbbd14
UW
144712009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14472
14473 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14474 (SPUFS_MAGIC): Define.
14475 (spu_enumerate_spu_ids): New function.
14476 (linux_qxfer_spu): New function.
14477 (linux_target_ops): Install linux_qxfer_spu.
14478
f4d9bade
UW
144792009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14480
14481 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14482 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14483 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14484 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14485 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14486 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14487 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14488 (init_registers_powerpc_cell32l): Add prototype.
14489 (init_registers_powerpc_cell64l): Likewise.
14490 (ppc_arch_setup): Detect Cell/B.E. architecture.
14491
96e946ca
RW
144922009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14493
14494 * Makefile.in (datarootdir): New variable.
14495
58d6951d
DJ
144962009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14497
14498 * linux-low.c (linux_write_memory): Update debugging output.
14499 * Makefile.in (clean): Add new descriptions.
14500 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14501 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14502 * configure.srv: Add new files for arm*-*-linux*.
14503 * linux-arm-low.c: Add new declarations.
14504 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14505 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14506 (HWCAP_VFPv3D16): New.
14507 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14508 instead of __IWMMXT__.
14509 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14510 (arm_arch_setup): New.
14511 (target_regsets): Remove #ifdef. Add VFP regset.
14512 (the_low_target): Use arm_arch_setup.
14513
12b42a12
DJ
145142009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14515
14516 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14517 the main thread again.
14518
ac8c974e
AR
145192009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14520
14521 Adding Neutrino gdbserver.
14522 * configure: Regenerated.
14523 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14524 * configure.srv (i[34567]86-*-nto*): New target.
14525 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14526 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14527 (nto_comctrl) [__QNX__]: New function.
14528 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14529
4424e0c3 145302009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14531
14532 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14533 srv_tgtobj.
14534
912cf4ba
PA
145352009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14536 Pedro Alves <pedro@codesourcery.com>
14537
14538 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14539 don't support CONTEXT_EXTENDED_REGISTERS.
14540 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14541 (the_low_target): Install them.
14542 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14543 failing with ERROR_PIPE_NOT_CONNECTED.
14544
aa5ca48f
DE
145452009-06-30 Doug Evans <dje@google.com>
14546 Pierre Muller <muller@ics.u-strasbg.fr>
14547
14548 Add h/w watchpoint support to x86-linux, win32-i386.
14549 * Makefile.in (SFILES): Add i386-low.c
14550 (i386_low_h): Define.
14551 (i386-low.o): Add dependencies.
14552 (linux-x86-low.o): Add i386-low.h dependency.
14553 (win32-i386-low.o): Ditto.
14554 * i386-low.c: New file.
14555 * i386-low.h: New file.
14556 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14557 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14558 * linux-low.c (linux_add_process): Initialize arch_private.
14559 (linux_remove_process): Free arch_private.
14560 (add_lwp): Initialize arch_private.
14561 (delete_lwp): Free arch_private.
14562 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14563 provided.
14564 * linux-low.h (process_info_private): New member arch_private.
14565 (lwp_info): New member arch_private.
14566 (linux_target_ops): New members new_process, new_thread,
14567 prepare_to_resume.
14568 (ptid_of): New macro.
14569 * linux-x86-low.c: Include stddef.h, i386-low.h.
14570 (arch_process_info): New struct.
14571 (arch_lwp_info): New struct.
14572 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14573 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14574 (i386_dr_low_get_status): New function.
14575 (x86_insert_point, x86_remove_point): New functions.
14576 (x86_stopped_by_watchpoint): New function.
14577 (x86_stopped_data_address): New function.
14578 (x86_linux_new_process, x86_linux_new_thread): New functions.
14579 (x86_linux_prepare_to_resume): New function.
14580 (the_low_target): Add entries for insert_point, remove_point,
14581 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14582 prepare_to_resume.
14583 * server.c (debug_hw_points): New global.
14584 (monitor_show_help): Document set debug-hw-points.
14585 (handle_query): Process "set debug-hw-points".
14586 * server.h (debug_hw_points): Declare.
14587 (paddress): Declare.
14588 * utils.c (NUMCELLS, CELLSIZE): New macros.
14589 (get_sell, xsnprintf, paddress): New functions.
14590 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14591 remove_point, stopped_by_watchpoint, stopped_data_address.
14592 * win32-i386-low.c: Include i386-low.h.
14593 (debug_reg_state): Replaces dr.
14594 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14595 (i386_dr_low_get_status): New function.
14596 (i386_insert_point, i386_remove_point): New functions.
14597 (i386_stopped_by_watchpoint): New function.
14598 (i386_stopped_data_address): New function.
14599 (i386_initial_stuff): Update.
14600 (get_thread_context,set_thread_context,i386_thread_added): Update.
14601 (the_low_target): Add entries for insert_point,
14602 remove_point, stopped_by_watchpoint, stopped_data_address.
14603 * win32-low.c (win32_insert_watchpoint): New function.
14604 (win32_remove_watchpoint): New function.
14605 (win32_stopped_by_watchpoint): New function.
14606 (win32_stopped_data_address): New function.
14607 (win32_target_ops): Add entries for insert_watchpoint,
14608 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14609 * win32-low.h (win32_target_ops): New members insert_point,
14610 remove_point, stopped_by_watchpoint, stopped_data_address.
14611
d993e290
PA
146122009-06-25 Pedro Alves <pedro@codesourcery.com>
14613
14614 * server.c (process_serial_event): Re-return unsupported, not
14615 error, if the type isn't recognized. Re-allow supporting only
14616 insert or remove packets. Also call require_running for
14617 breakpoints. Add missing break statement to default case. Tidy.
14618 * target.h (struct target_ops): Rename insert_watchpoint to
14619 insert_point, and remove_watchpoint to remove_point.
14620
14621 * linux-low.h (struct linux_target_ops): Likewise.
14622 * linux-low.c (linux_insert_watchpoint): Rename to ...
14623 (linux_insert_point): ... this. Adjust.
14624 (linux_remove_watchpoint): Rename to ...
14625 (linux_remove_point): ... this. Adjust.
14626 (linux_target_ops): Adjust.
14627 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14628 (cris_insert_point): ... this.
14629 (cris_remove_watchpoint): Rename to ...
14630 (cris_remove_point): ... this.
14631 (the_low_target): Adjust.
14632
0f54c268
PM
146332009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14634
14635 * server.c (handle_v_kill): Pass signal_pid to
14636 kill_inferior if multi_process is zero.
14637
c6314022
AR
146382009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14639
14640 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14641 * target.h (target_ops): Comment for *_watchpoint to make it clear
14642 the functions can get types '0' and '1'.
14643
4463ce24
AR
146442009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14645
14646 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14647 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14648 * regcache.c (get_regcache): Likewise.
14649 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14650 * win32-low.c (child_fetch_inferior_registers): Remove check for
14651 regno 0.
14652
cf8fd78b
PA
146532009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14654 Pedro Alves <pedro@codesourcery.com>
14655
14656 * target.h (struct target_ops) <supports_multi_process>: New
14657 callback.
14658 (target_supports_multi_process): New.
14659 * server.c (handle_query): Even if GDB reports support, only
14660 enable multi-process if the target also supports it. Report
14661 multi-process support only if the target backend supports it.
14662 * linux-low.c (linux_supports_multi_process): New function.
14663 (linux_target_ops): Install it as target_supports_multi_process
14664 callback.
14665
47c0c975
DE
146662009-05-24 Doug Evans <dje@google.com>
14667
e09875d4
DE
14668 Global renaming of find_thread_pid to find_thread_ptid.
14669 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14670 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14671 All callers updated.
14672
e27d73f6
DE
14673 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14674 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14675 directly.
14676
47c0c975
DE
14677 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14678 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14679 (linux_resume_one_lwp): Ditto.
14680
2acc282a
DE
146812009-05-23 Doug Evans <dje@google.com>
14682
14683 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14684 from struct inferior_list_entry * to struct lwp_info *.
14685 All callers updated.
14686
9f1036c1
DE
146872009-05-13 Doug Evans <dje@google.com>
14688
14689 * linux-x86-low.c: Don't include assert.h.
14690 (x86_siginfo_fixup): Use fatal, not assert.
14691 (x86_arch_setup): Fix comment.
14692
d0722149
DE
146932009-05-12 Doug Evans <dje@google.com>
14694
14695 Biarch support for i386/amd64 gdbserver.
14696 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14697 Add linux-x86-low.c.
14698 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14699 (linux-x86-low.o): Add.
14700 * linux-x86-64-low.c: Delete.
14701 * linux-i386-low.c: Delete.
14702 * linux-x86-low.c: New file.
14703 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14704 linux-x86-low.o.
14705 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14706 linux-x86-low.o.
14707 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14708 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14709 (linux_child_pid_to_exec_file): New function.
14710 (elf_64_header_p, elf_64_file_p): New functions.
14711 (siginfo_fixup): New function.
14712 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14713 give target a chance to convert layout.
14714 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14715 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14716
fdeb2a12
DE
147172009-05-07 Doug Evans <dje@google.com>
14718
14719 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14720 (regsets_store_inferior_registers): Ditto.
14721
a6dbe5df
PA
147222009-05-06 Pedro Alves <pedro@codesourcery.com>
14723
14724 PR server/10048
14725
14726 * linux-low.c (must_set_ptrace_flags): Delete.
14727 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14728 of the global.
14729 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14730 `lwp->must_set_ptrace_flags' instead.
ba42693b 14731 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14732 (linux_wait_1): ... not here.
14733
5091eb23
DE
147342009-04-30 Doug Evans <dje@google.com>
14735
9f767825
DE
14736 * inferiors.c (started_inferior_callback): New function.
14737 (attached_inferior_callback): New function.
14738 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14739 * server.c (print_started_pid, print_attached_pid): New functions.
14740 (detach_or_kill_for_exit): New function.
14741 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14742 * server.h (have_started_inferiors_p): Declare.
14743 (have_attached_inferiors_p): Declare.
14744
5091eb23
DE
14745 * inferiors.c (remove_process): Fix memory leak, free process.
14746 * linux-low.c (linux_remove_process): New function.
14747 (linux_kill): Call it instead of remove_process.
14748 (linux_detach, linux_wait_1): Ditto.
14749
155c8968
PA
147502009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14751
14752 * configure.srv: Add x86 Windows CE target.
14753
7fe519cb
UW
147542009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14755
14756 * inferiors.c (get_thread_process): Make global.
14757 * server.h (get_thread_process): Add prototype.
14758 * thread-db.c (find_one_thread): Use get_thread_process
14759 instead of current_process.
14760 (thread_db_get_tls_address): Do not crash if called when
14761 thread layer is not yet initialized.
14762
5472f405
UW
147632009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14764
14765 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14766 * spu-low.c (current_tid): Rename to ...
14767 (current_ptid): ... this.
14768 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14769 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14770 ptid_get_lwp (current_ptid) instead of current_tid.
14771 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14772 instead of current_tid. Use find_process_pid to verify pid
14773 argument is valid. Pass proper argument to remove_process.
14774 (spu_thread_alive): Compare current_ptid instead of current_tid.
14775 (spu_resume): Likewise.
14776
55ac2b99
PA
147772009-04-02 Pedro Alves <pedro@codesourcery.com>
14778
14779 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14780 variable.
14781
95954743
PA
147822009-04-01 Pedro Alves <pedro@codesourcery.com>
14783
14784 Implement the multiprocess extensions, and add linux multiprocess
14785 support.
14786
14787 * server.h (ULONGEST): Declare.
14788 (struct ptid, ptid_t): New.
14789 (minus_one_ptid, null_ptid): Declare.
14790 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14791 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14792 (struct inferior_list_entry): Change `id' type from unsigned from
14793 to ptid_t.
14794 (struct sym_cache, struct breakpoint, struct
14795 process_info_private): Forward declare.
14796 (struct process_info): Declare.
14797 (current_process): Declare.
14798 (all_processes): Declare.
14799 (initialize_inferiors): Declare.
14800 (add_thread): Adjust to use ptid_t.
14801 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14802 (add_process, remove_process, find_thread_pid): Declare.
14803 (find_inferior_id): Adjust to use ptid_t.
14804 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14805 (multi_process): Declare.
14806 (push_event): Adjust to use ptid_t.
14807 (read_ptid, write_ptid): Declare.
14808 (prepare_resume_reply): Adjust to use ptid_t.
14809 (clear_symbol_cache): Declare.
14810 * inferiors.c (all_processes): New.
14811 (null_ptid, minus_one_ptid): New.
14812 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14813 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14814 (add_thread): Change unsigned long to ptid. Remove gdb_id
14815 parameter. Adjust.
14816 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14817 (gdb_id_to_thread): Rename to ...
14818 (find_thread_pid): ... this. Change unsigned long to ptid.
14819 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14820 (loaded_dll, pull_pid_from_list): Adjust.
14821 (add_process, remove_process, find_process_pid)
14822 (get_thread_process, current_process, initialize_inferiors): New.
14823 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14824 (struct target_waitstatus) <related_pid>: Ditto.
14825 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14826 return type to int.
14827 (struct target_ops) <join>: Add `pid' argument.
14828 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14829 (struct target_ops) <wait>: Add `ptid' field. Change return type
14830 to ptid.
14831 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14832 (mywait): Add `ptid' argument. Change return type to ptid_t.
14833 (target_pid_to_str): Declare.
14834 * target.c (set_desired_inferior): Adjust to use ptids.
14835 (mywait): Add new `ptid' argument. Adjust.
14836 (target_pid_to_str): New.
14837 * mem-break.h (free_all_breakpoints): Declare.
14838 * mem-break.c (breakpoints): Delelete.
14839 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14840 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14841 to use per-process breakpoint list.
14842 (free_all_breakpoints): New.
14843 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14844 (symbol_cache, all_symbols_looked_up): Delete.
14845 (hexchars): New.
14846 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14847 read_ptid): New.
14848 (prepare_resume_reply): Change ptid argument's type from unsigned
14849 long to ptid_t. Adjust. Implement W;process and X;process.
14850 (free_sym_cache, clear_symbol_cache): New.
14851 (look_up_one_symbol): Adjust to per-process symbol cache. *
14852 * server.c (cont_thread, general_thread, step_thread): Change type
14853 to ptid_t.
14854 (attached): Delete.
14855 (multi_process): New.
14856 (last_ptid): Change type to ptid_t.
14857 (struct vstop_notif) <ptid>: Change type to ptid_t.
14858 (queue_stop_reply, push_event): Change `ptid' argument's type to
14859 ptid_t.
14860 (discard_queued_stop_replies): Add `pid' argument.
14861 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14862 changes. Don't reference the `attached' global.
14863 (attach_inferior): Adjust to mywait interface changes.
14864 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14865 features. Handle and report "multiprocess+". Handle
14866 "qAttached:PID".
14867 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14868 changes.
14869 (handle_v_kill): New.
14870 (handle_v_stopped): Adjust to use target_pid_to_str.
14871 (handle_v_requests): Allow multiple attaches and runs when
14872 multiprocess extensions are in effect. Handle "vKill".
14873 (myresume): Adjust to use ptids.
14874 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14875 (handle_status): Adjust to discard_queued_stop_replies interface
14876 change.
14877 (first_thread_of, kill_inferior_callback)
14878 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14879 (main): Call initialize_inferiors. Adjust to use ptids, killing
14880 and detaching from all inferiors. Handle multiprocess packet
14881 variants.
14882 * linux-low.h: Include gdb_proc_service.h.
14883 (struct process_info_private): New.
14884 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14885 <lwpid_of>: Use ptid_get_lwp.
14886 (get_lwp_thread): Adjust.
14887 (struct lwp_info): Add `dead' member.
14888 (find_lwp_pid): Declare.
14889 * linux-low.c (thread_db_active): Delete.
14890 (new_inferior): Adjust comment.
14891 (inferior_pid): Delete.
14892 (linux_add_process): New.
14893 (handle_extended_wait): Adjust.
14894 (add_lwp): Change unsigned long to ptid.
14895 (linux_create_inferior): Add process to processes table. Adjust
14896 to use ptids. Don't set new_inferior here.
14897 (linux_attach_lwp): Rename to ...
14898 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14899 it. Adjust to use ptids.
14900 (linux_attach_lwp): New.
14901 (linux_attach): Add process to processes table. Don't set
14902 new_inferior here.
14903 (struct counter): New.
14904 (second_thread_of_pid_p, last_thread_of_process_p): New.
14905 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14906 multiple processes.
14907 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14908 processes. Remove process from process table.
14909 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14910 to multiple processes.
14911 (any_thread_of): New.
14912 (linux_detach): Add `pid' argument, and handle it. Remove process
14913 from processes table.
14914 (linux_join): Add `pid' argument. Handle it.
14915 (linux_thread_alive): Change unsighed long argument to ptid_t.
14916 Consider dead lwps as not being alive.
14917 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14918 threads we're not interested in.
14919 (same_lwp, find_lwp_pid): New.
14920 (linux_wait_for_lwp): Change `pid' argument's type from int to
14921 ptid_t. Adjust.
14922 (linux_wait_for_event): Rename to ...
14923 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14924 from int to ptid_t. Adjust.
14925 (linux_wait_for_event): New.
14926 (linux_wait_1): Add `ptid' argument. Change return type to
14927 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14928 that exit from the process table.
14929 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14930 Adjust.
14931 (mark_lwp_dead): New.
14932 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14933 stopping all threads, mark its main lwp as dead.
14934 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14935 ptids.
14936 (fetch_register, usr_store_inferior_registers)
14937 (regsets_fetch_inferior_registers)
14938 (regsets_store_inferior_registers, linux_read_memory)
14939 (linux_write_memory): Inline `inferior_pid'.
14940 (linux_look_up_symbols): Adjust to use per-process
14941 `thread_db_active'.
14942 (linux_request_interrupt): Adjust to use ptids.
14943 (linux_read_auxv): Inline `inferior_pid'.
14944 (initialize_low): Don't reference thread_db_active.
14945 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14946 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14947 (ps_getpid): Return the pid of the current inferior.
14948 * thread-db.c (proc_handle, thread_agent): Delete.
14949 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14950 per-process data.
14951 (find_one_thread): Change argument type to ptid_t. Adjust to
14952 per-process data.
14953 (maybe_attach_thread): Adjust to per-process data and ptids.
14954 (thread_db_find_new_threads): Ditto.
14955 (thread_db_init): Ditto.
14956 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14957 processes table. Adjust to use ptids.
14958 (spu_kill, spu_detach): Adjust interface. Remove process from
14959 processes table.
14960 (spu_join, spu_thread_alive): Adjust interface.
14961 (spu_wait): Adjust interface. Remove process from processes
14962 table. Adjust to use ptids.
14963 * win32-low.c (current_inferior_tid): Delete.
14964 (current_inferior_ptid): New.
14965 (debug_event_ptid): New.
14966 (thread_rec): Take a ptid. Adjust.
14967 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14968 (child_delete_thread): Ditto.
14969 (do_initial_child_stuff): Add `attached' argument. Add process to
14970 processes table.
14971 (child_fetch_inferior_registers, child_store_inferior_registers):
14972 Adjust.
14973 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14974 (win32_attach): Pass 1 to do_initial_child_stuff.
14975 (win32_kill): Adjust interface. Remove process from processes
14976 table.
14977 (win32_detach): Ditto.
14978 (win32_join): Adjust interface.
14979 (win32_thread_alive): Take a ptid.
14980 (win32_resume): Adjust to use ptids.
14981 (get_child_debug_event): Ditto.
14982 (win32_wait): Adjust interface. Remove exiting process from
14983 processes table.
14984
bd99dc85
PA
149852009-04-01 Pedro Alves <pedro@codesourcery.com>
14986
14987 Non-stop mode support.
14988
14989 * server.h (non_stop): Declare.
14990 (gdb_client_data, handler_func): Declare.
14991 (delete_file_handler, add_file_handler, start_event_loop):
14992 Declare.
14993 (handle_serial_event, handle_target_event, push_event)
14994 (putpkt_notif): Declare.
14995 * target.h (enum resume_kind): New.
14996 (struct thread_resume): Replace `step' field by `kind' field.
14997 (TARGET_WNOHANG): Define.
14998 (struct target_ops) <wait>: Add `options' argument.
14999 <supports_non_stop, async, start_non_stop>: New fields.
15000 (target_supports_non_stop, target_async): New.
15001 (start_non_stop): Declare.
15002 (mywait): Add `options' argument.
15003 * target.c (mywait): Add `options' argument. Print child exit
15004 notifications here.
15005 (start_non_stop): New.
15006 * server.c (non_stop, own_buf, mem_buf): New globals.
15007 (struct vstop_notif): New.
15008 (notif_queue): New global.
15009 (queue_stop_reply, push_event, discard_queued_stop_replies)
15010 (send_next_stop_reply): New.
15011 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15012 interface changes.
15013 (attach_inferior): In non-stop mode, don't wait for the target
15014 here.
15015 (handle_general_set): Handle QNonStop.
15016 (handle_query): When handling qC, return the current general
15017 thread, instead of the first thread of the list.
15018 (handle_query): If the backend supports non-stop mode, include
15019 QNonStop+ in the qSupported query response.
15020 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15021 and non-stop mode.
15022 (handle_v_attach, handle_v_run): Handle non-stop mode.
15023 (handle_v_stopped): New.
15024 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15025 (myresume): Adjust to use resume_kind. Handle non-stop.
15026 (queue_stop_reply_callback): New.
15027 (handle_status): Handle non-stop mode.
15028 (main): Clear non_stop flag on reconnection. Use the event-loop.
15029 Refactor serial protocol handling from here ...
15030 (process_serial_event): ... to this new function. When GDB
15031 selects any thread, select one here. In non-stop mode, wait until
15032 GDB acks all pending events before exiting.
15033 (handle_serial_event, handle_target_event): New.
15034 * remote-utils.c (remote_open): Install remote_desc in the event
15035 loop.
15036 (remote_close): Remove remote_desc from the event loop.
15037 (putpkt_binary): Rename to...
15038 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15039 (putpkt_binary): New as wrapper around putpkt_binary_1.
15040 (putpkt_notif): New.
15041 (prepare_resume_reply): In non-stop mode, don't change the
15042 general_thread.
15043 * event-loop.c: New.
15044 * Makefile.in (OBJ): Add event-loop.o.
15045 (event-loop.o): New rule.
15046
15047 * linux-low.h (pid_of): Moved here.
15048 (lwpid_of): New.
15049 (get_lwp_thread): Use lwpid_of.
15050 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15051 * linux-low.c (pid_of): Delete.
15052 (inferior_pid): Use lwpid_of.
15053 (linux_event_pipe): New.
15054 (target_is_async_p): New.
15055 (delete_lwp): New.
15056 (handle_extended_wait): Use lwpid_of.
15057 (add_lwp): Don't set lwpid field.
15058 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15059 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15060 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15061 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15062 first. Adjust to linux_wait_for_event interface changes. Use
15063 lwpid_of.
15064 (linux_detach): Don't delete the main lwp here.
15065 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15066 (status_pending_p): Don't consider explicitly suspended lwps.
15067 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15068 pointer. Add OPTIONS argument. Change return type to int. Use
15069 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15070 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15071 pointer. Add status pointer argument. Return a pid instead of a
15072 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15073 changes. In non-stop mode, don't switch to a random thread.
15074 (linux_wait): Rename to...
15075 (linux_wait_1): ... this. Add target_options argument, and handle
15076 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15077 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15078 clean exit and signal exit code. Don't stop all threads in
15079 non-stop mode. In all-stop mode, only stop all threads when
15080 reporting a stop to GDB. Handle explicit thread stop requests.
15081 (async_file_flush, async_file_mark): New.
15082 (linux_wait): New.
15083 (send_sigstop): Use lwpid_of.
15084 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15085 interface changes. In non-stop mode, don't switch to a random
15086 thread.
15087 (linux_resume_one_lwp): Use lwpid_of.
15088 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15089 (linux_resume_one_thread): ... this. Handle resume_stop. In
15090 non-stop mode, don't look for pending flag in all threads.
15091 (resume_status_pending_p): Don't consider explicitly suspended
15092 threads.
15093 (my_waitpid): Reimplement. Emulate __WALL.
15094 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15095 Use lwpid_of.
15096 (sigchld_handler, linux_supports_non_stop, linux_async)
15097 (linux_start_non_stop): New.
15098 (linux_target_ops): Register linux_supports_non_stop, linux_async
15099 and linux_start_non_stop.
15100 (initialize_low): Install SIGCHLD handler.
15101 * thread-db.c (thread_db_create_event, find_one_thread)
15102 (thread_db_get_tls_address): Use lwpid_of.
15103 * win32-low.c (win32_detach): Adjust to use resume_kind.
15104 (win32_wait): Add `options' argument.
15105 * spu-low.c (spu_resume): Adjust to use resume_kind.
15106 (spu_wait): Add `options' argument.
15107
5b1c542e
PA
151082009-04-01 Pedro Alves <pedro@codesourcery.com>
15109
15110 Decouple target code from remote protocol.
15111
15112 * target.h (enum target_waitkind): New.
15113 (struct target_waitstatus): New.
15114 (struct target_ops) <wait>: Return an unsigned long. Take a
15115 target_waitstatus pointer instead of a char pointer.
15116 (mywait): Likewise.
15117 * target.c (mywait): Change prototype to return an unsigned long.
15118 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15119 * server.h (thread_from_wait, old_thread_from_wait): Delete
15120 declarations.
15121 (prepare_resume_reply): Change prototype to take a
15122 target_waitstatus.
15123 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15124 (last_status, last_ptid): New.
15125 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15126 pid instead of a signal.
15127 (attach_inferior): Remove "status" and "signal" parameters.
15128 Adjust.
15129 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15130 not as an address.
15131 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15132 (handle_v_requests, myresume): Remove "status" and "signal"
15133 parameters. Adjust.
15134 (handle_status): New.
15135 (main): Delete local `status'. Adjust.
15136 * remote-utils.c: Include target.h.
15137 (prepare_resume_reply): Change prototype to take a
15138 target_waitstatus. Adjust.
15139
15140 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15141 interface.
15142 * spu-low.c (spu_wait): Adjust.
15143 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15144 Delete.
15145 (win32_wait): Adjust.
15146
2bd7c093
PA
151472009-04-01 Pedro Alves <pedro@codesourcery.com>
15148
15149 * target.h (struct thread_resume): Delete leave_stopped member.
15150 (struct target_ops): Add a `n' argument to the `resume' callback.
15151 * server.c (start_inferior): Adjust.
15152 (handle_v_cont, myresume): Adjust.
15153 * linux-low.c (check_removed_breakpoint): Adjust to resume
15154 interface change, and to removed leave_stopped field.
15155 (resume_ptr): Delete.
15156 (struct thread_resume_array): New.
15157 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15158 resume interface change.
15159 (linux_continue_one_thread, linux_queue_one_thread)
15160 (resume_status_pending_p): Check if the resume field is NULL
15161 instead of checking the leave_stopped member.
15162 (linux_resume): Adjust to the target resume interface change.
15163 * spu-low.c (spu_resume): Adjust to the target resume interface
15164 change.
15165 * win32-low.c (win32_detach, win32_resume): Ditto.
15166
c35fafde
PA
151672009-04-01 Pedro Alves <pedro@codesourcery.com>
15168
15169 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15170 flag.
15171 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15172 pending.
15173 (linux_continue_one_thread): Only preserve the stepping flag if
15174 there's a pending breakpoint.
15175
0a59d50b
PA
151762009-03-31 Pedro Alves <pedro@codesourcery.com>
15177
15178 * server.c (main): After the inferior having exited, call
15179 remote_close before exiting gdbserver.
15180
f04c6d38
TJB
151812009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15182
15183 Fix size of FPSCR in Power 7 processors.
15184 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15185 (PPC_FEATURE_HAS_DFP): New #define.
15186 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15187 size of the FPSCR.
15188
78e5cee6
PA
151892009-03-23 Pedro Alves <pedro@codesourcery.com>
15190
15191 * server.c (handle_query) Whitespace and formatting.
15192
1b3f6016
PA
151932009-03-22 Pedro Alves <pedro@codesourcery.com>
15194
15195 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15196 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15197 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15198 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15199 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15200 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15201 Makefile.in, configure.ac: Fix whitespace throughout.
15202 * configure: Regenerate.
15203
a07b2135
PA
152042009-03-22 Pedro Alves <pedro@codesourcery.com>
15205
15206 * inferiors.c (find_inferior): Make it safe for the callback
15207 function to delete the currently iterated inferior.
15208
67cc2626
PA
152092009-03-22 Pedro Alves <pedro@codesourcery.com>
15210
15211 * Makefile.in (linuw_low_h): Move higher.
15212 (thread-db.o): Depend on $(linux_low_h).
15213
54a0b537
PA
152142009-03-17 Pedro Alves <pedro@codesourcery.com>
15215
15216 Rename "process" to "lwp" throughout.
15217
15218 * linux-low.c (all_processes): Rename to...
15219 (all_lwps): ... this.
15220 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15221 (add_process): Rename to ...
15222 (add_lwp): ... this. Adjust.
15223 (linux_create_inferior): Adjust.
15224 (linux_attach_lwp): Adjust.
15225 (linux_attach): Adjust.
15226 (linux_kill_one_process): Rename to ...
15227 (linux_kill_one_lwp): ... this. Adjust.
15228 (linux_kill): Adjust.
15229 (linux_detach_one_process): Rename to ...
15230 (linux_detach_one_lwp): ... this. Adjust.
15231 (linux_detach): Adjust.
15232 (check_removed_breakpoint): Adjust.
15233 (status_pending_p): Adjust.
15234 (linux_wait_for_process): Rename to ...
15235 (linux_wait_for_lwp): ... this. Adjust.
15236 (linux_wait_for_event): Adjust.
15237 (send_sigstop): Adjust.
15238 (wait_for_sigstop): Adjust.
15239 (stop_all_processes): Rename to ...
15240 (stop_all_lwps): ... this.
15241 (linux_resume_one_process): Rename to ...
15242 (linux_resume_one_lwp): ... this. Adjust.
15243 (linux_set_resume_request, linux_continue_one_thread)
15244 (linux_queue_one_thread, resume_status_pending_p)
15245 (usr_store_inferior_registers, regsets_store_inferior_registers)
15246 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15247 Adjust.
15248 * linux-low.h (get_process): Rename to ...
15249 (get_lwp): ... this. Adjust.
15250 (get_thread_process): Rename to ...
15251 (get_thread_lwp): ... this. Adjust.
15252 (get_process_thread): Rename to ...
15253 (get_lwp_thread): ... this. Adjust.
15254 (struct process_info): Rename to ...
15255 (struct lwp_info): ... this.
15256 (all_processes): Rename to ...
15257 (all_lwps): ... this.
15258 * proc-service.c (ps_lgetregs): Adjust.
15259 * thread-db.c (thread_db_create_event, find_one_thread)
15260 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15261
0b16c5cf
PA
152622009-03-14 Pedro Alves <pedro@codesourcery.com>
15263
15264 * server.c (handle_query): Handle "qAttached".
15265
32de4b9d
NS
152662009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15267
15268 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15269 GPLv3, update license URL.
15270
2aecd87f
DE
152712009-03-01 Doug Evans <dje@google.com>
15272
93efd302 15273 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15274 (server_h): Add gdb_signals.h.
15275 (signals.o): Update.
15276 * server.h (target_signal_from_host,target_signal_to_host_p)
15277 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15278
86b1f9c5
PM
152792009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15280
15281 * remote-utils.c (getpkt): Also generate remote-debug
15282 information if noack_mode is set.
15283
4aa995e1
PA
152842009-02-06 Pedro Alves <pedro@codesourcery.com>
15285
15286 * server.c (handle_query): Report qXfer:siginfo:read and
15287 qXfer:siginfo:write as supported and handle them.
15288 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15289 * linux-low.c (linux_xfer_siginfo): New.
15290 (linux_target_ops): Set it.
15291
62709adf
PA
152922009-01-26 Pedro Alves <pedro@codesourcery.com>
15293
15294 * server.c (gdbserver_usage): Mention --remote-debug.
15295 (main): Accept '--remote-debug' switch.
15296
aef93bd7
DE
152972009-01-18 Doug Evans <dje@google.com>
15298
15299 * regcache.c (new_register_cache): No need to check result of xcalloc.
15300 * server.c (handle_search_memory): Back out calls to xmalloc,
15301 result is checked and error is returned to user upon failure.
15302 (handle_query): Ditto. Add more checks for result of malloc.
15303 (handle_v_cont): Check result of malloc, report error back to
15304 user upon failure.
15305 (handle_v_run): Ditto. Call freeargv.
15306 * server.h (freeargv): Declare.
15307 * utils.c (freeargv): New fn.
15308
54363045
DE
153092009-01-15 Doug Evans <dje@google.com>
15310
f626972c
DE
15311 * gdbreplay.c (perror_with_name): Make arg const char *.
15312 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15313 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15314 * utils.c (perror_with_name): Make arg const char *.
54363045 15315
18aae699
PA
153162009-01-14 Pedro Alves <pedro@codesourcery.com>
15317
15318 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15319 when handling a EXIT_PROCESS_DEBUG_EVENT.
15320
ff703abe
JB
153212009-01-06 Joel Brobecker <brobecker@adacore.com>
15322
15323 * gdbreplay.c (gdbreplay_version): Update copyright year.
15324 * server.c (gdbserver_version): Likewise.
15325
f21cc1a2 153262009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15327
15328 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15329 (handle_extended_wait): Improve comment.
0e21c1ec 15330
bca929d3
DE
153312008-12-13 Doug Evans <dje@google.com>
15332
15333 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15334 * server.h (ATTR_MALLOC): New macro.
15335 (xmalloc,xcalloc,xstrdup): Declare.
15336 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15337 * inferiors.c: Ditto.
15338 * linux-low.c: Ditto.
15339 * mem-break.c: Ditto.
15340 * regcache.c: Ditto.
15341 * remote-utils.c: Ditto.
15342 * server.c: Ditto.
15343 * target.c: Ditto.
15344 * win32-low.c: Ditto.
15345
97438e3f
DE
153462008-12-12 Doug Evans <dje@google.com>
15347
896c7fbb
DE
15348 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15349 in debugging printf.
15350
97438e3f
DE
15351 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15352
e3b886f8
DE
153532008-12-09 Doug Evans <dje@google.com>
15354
15355 * linux-low.h (struct process_info): Delete member tid, unused.
15356 * thread-db.c (find_one_thread): Update.
15357 (maybe_attach_thread): Update.
15358
07e059b5
VP
153592008-12-02 Pedro Alves <pedro@codesourcery.com>
15360
889bf7c5
PA
15361 * target.h (struct target_ops): Add qxfer_osdata member.
15362 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15363 and dirent.h.
15364 (linux_qxfer_osdata): New functions.
15365 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15366 callback.
15367 * server.c (handle_query): Handle "qXfer:osdata:read:".
15368 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15369 (buffer_xml_printf): New functions.
15370 * server.h (struct buffer): New.
15371 (buffer_grow_str, buffer_grow_str0): New macros.
15372 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15373 (buffer_xml_printf): Declare.
07e059b5 15374
4cab47ab
DE
153752008-11-24 Doug Evans <dje@google.com>
15376
15377 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15378
f142445f
DJ
153792008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15380
15381 * server.c (handle_v_run): Always use the supplied argument list.
15382
d0107bb6 153832008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15384
d0107bb6
BW
15385 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15386 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15387
2c4ad781
TJB
153882008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15389
15390 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15391 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15392 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15393 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15394 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15395 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15396 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15397 XML target descriptions.
15398 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15399 when inferior is running on an ISA 2.05 or later processor. Add
15400 special case to return offset for full 64-bit slot of FPSCR when
15401 in 32-bits.
15402
dfb64f85
DJ
154032008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15404
15405 * Makefile.in (SFILES, clean): Added sparc64 files.
15406 (reg-sparc64.o, reg-sparc64.c): New.
15407 * configure.srv (sparc*-*-linux*): New configuration.
15408 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15409 syscall arguments for SPARC.
15410 (regsets_store_inferior_registers): Likewise.
15411 * linux-sparc-low.c: New file.
15412
66b6e1dd
DE
154132008-10-21 Doug Evans <dje@google.com>
15414
15415 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15416 (READLINE_DIR,READLINE_DEP): Delete.
15417 (INTERNAL_CFLAGS): Update.
15418 (LINTFLAGS): Update.
15419
9b710a42
PA
154202008-10-10 Pedro Alves <pedro@codesourcery.com>
15421
15422 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15423 whole argv from the last run, not just argv[0].
15424
5822d809
PA
154252008-09-08 Pedro Alves <pedro@codesourcery.com>
15426
15427 * regcache.c (new_register_cache): Return NULL if the register
15428 cache size isn't known yet.
15429 (free_register_cache): Avoid dereferencing a NULL regcache.
15430
74aac56f
DJ
154312008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15432
15433 * configure.srv: Merge MIPS and MIPS64.
15434
400b20f5
MR
154352008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15436
15437 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15438
677c5bb1
LM
154392008-08-18 Luis Machado <luisgpm@br.ibm.com>
15440
15441 * Makefile.in: Add required vsx dependencies.
15442
15443 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15444 Declare init_registers_powerpc_vsx32l.
15445 Declare init_registers_powerpc_vsx64l.
15446 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15447 (ppc_arch_setup): Check for VSX in hwcap.
15448 (ppc_fill_vsxregset): New function.
15449 (ppc_store_vsxregset): New function.
15450 Add new VSX entry in regset_info target_regsets.
15451
15452 * configure.srv: Add new VSX dependencies.
15453
a6f3e723
SL
154542008-08-12 Pedro Alves <pedro@codesourcery.com>
15455
15456 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15457 (remote_open): Set or clear transport_is_reliable.
15458 (putpkt_binary): Don't expect acks in noack mode.
15459 (getpkt): Don't send ack/nac in noack mode.
15460 * server.c (handle_general_set): Handle QStartNoAckMode.
15461 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15462 qSupported.
15463 (main): Reset noack_mode on every connection.
15464 * server.h (noack_mode): Declare.
15465
a417dc56
RW
154662008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15467
15468 * Makefile.in (GDBREPLAY_OBS): New variable.
15469 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15470
3221518c
UW
154712008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15472 Daniel Jacobowitz <dan@codesourcery.com>
15473
15474 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15475 (usr_store_inferior_registers): Likewise.
15476 (regsets_store_inferior_registers): Likewise.
15477
ec56be1b
PA
154782008-07-31 Rolf Jansen <rj@surtec.com>
15479 Pedro Alves <pedro@codesourcery.com>
15480
15481 * configure.ac: Check for memmem declaration.
15482 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15483 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15484 (disable_packet_qfThreadInfo): Unconditionally compile.
15485 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15486 * configure, config.in: Regenerate.
15487
2fe5e3ff
DE
154882008-07-28 Doug Kwan <dougkwan@google.com>
15489
15490 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15491 (linux_write_memory): Remove declaration of errno.
15492
836acd6d
UW
154932008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15494
15495 * linux-low.c (handle_extended_wait): Do not use "status"
15496 variable uninitialized.
15497
aeba519e
PA
154982008-07-07 Pedro Alves <pedro@codesourcery.com>
15499
15500 * server.c (handle_v_attach): Inhibit reporting dll changes.
15501
db42f210
PA
155022008-06-27 Pedro Alves <pedro@codesourcery.com>
15503
15504 * remote-utils.c (prepare_resume_reply): If requested, don't
15505 output "thread:TID" in the T stop reply.
15506
15507 * server.c (disable_packet_vCont, disable_packet_Tthread)
15508 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15509 (handle_query): If requested, disable support for qC, qfThreadInfo
15510 and qsThreadInfo.
15511 (handle_v_requests): If requested, disable support for vCont.
15512 (gdbserver_show_disableable): New.
15513 (main): Handle --disable-packet and --disable-packet=LIST.
15514
15515 * server.h (disable_packet_vCont, disable_packet_Tthread)
15516 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15517
8e4c5421
CD
155182008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15519
15520 * server.c (gdbserver_usage): Mention --version.
15521
6e23a804
DJ
155222008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15523
15524 * Makefile.in (gdbreplay.o): New rule.
15525
90aa6a40
JM
155262008-06-06 Joseph Myers <joseph@codesourcery.com>
15527
15528 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15529 message, not gdbserver.
15530
c16158bc 155312008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15532 Nathan Sidwell <nathan@codesourcery.com>
15533 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15534
15535 * acinclude.m4: Include ../../config/acx.m4.
15536 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15537 * configure, config.in: Regenerate.
15538 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15539 * server.c (gdbserver_version): Print PKGVERSION.
15540 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15541 (main): Adjust gdbserver_usage calls.
15542 * gdbreplay.c (version, host_name): Add declarations.
15543 (gdbreplay_version, gdbreplay_usage): New.
15544 (main): Accept --version and --help options.
15545
aeb75bf5
DJ
155462008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15547
15548 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15549 (arm_breakpoint_at): Handle Thumb.
15550 (the_low_target): Add comment.
15551
76b233dd
UW
155522008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15553
15554 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15555
08388c79
DE
155562008-05-09 Doug Evans <dje@google.com>
15557
a3c83fae
DE
15558 * server.h (decode_search_memory_packet): Declare.
15559 * remote-utils.c (decode_search_memory_packet): New fn.
15560 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15561 (handle_search_memory): New fn.
15562 (handle_query): Process qSearch:memory packets.
15563
bb9c3d36
UW
155642008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15565
15566 * regcache.c (registers_length): Remove.
15567 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15568 full register packet.
15569 * regcache.h (registers_length): Remove prototype.
15570 * server.h (PBUFSIZ): Define to 16384.
15571
7284e1be
UW
155722008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15573
15574 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15575 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15576 powerpc-64l.o, and powerpc-altivec64l.o.
15577 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15578 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15579 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15580 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15581 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15582 to srv_xmlfiles.
15583
15584 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15585 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15586 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15587 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15588 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15589 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15590 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15591 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15592 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15593 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15594 (clean): Update.
15595
15596 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15597 (init_registers_powerpc_32l): ... this new prototype.
15598 (init_registers_powerpc_32): Remove, replace by ...
15599 (init_registers_powerpc_altivec32l): ... this new prototype.
15600 (init_registers_powerpc_e500): Remove, replace by ...
15601 (init_registers_powerpc_e500l): ... this new prototype.
15602 (init_registers_ppc64): Remove, replace by ...
15603 (init_registers_powerpc_64l): ... this new prototype.
15604 (init_registers_powerpc_64): Remove, replace by ...
15605 (init_registers_powerpc_altivec64l): ... this new prototype.
15606 (ppc_num_regs): Set to 73.
15607 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15608 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15609 (ppc_cannot_store_register): Handle orig_r3 and trap.
15610 (ppc_arch_setup): Update init_registers_... calls.
15611 (ppc_fill_gregset): Handle orig_r3 and trap.
15612
15613 * inferiors.c (clear_inferiors): Reset current_inferior.
15614
fdc59709
PB
156152008-04-23 Paolo Bonzini <bonzini@gnu.org>
15616
889bf7c5
PA
15617 * acinclude.m4: Add override.m4.
15618 * configure: Regenerate.
fdc59709 15619
c9b2f845
UW
156202008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15621
15622 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15623 initial call to init_register_ppc64.
15624
550512b8
UW
156252008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15626
43aaf8b6
PA
15627 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15628 single powerpc*-*-linux* case.
550512b8
UW
15629 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15630
b6430ec3
UW
156312008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15632
15633 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15634 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15635 from reg_xmlfiles.
15636 * linux-ppc-low.c: Include <elf.h>.
15637 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15638 (ppc_hwcap): New global variable.
15639 (ppc_regmap): Remove __SPE__ #ifdef sections.
15640 (ppc_regmap_e500): New global variable.
15641 (ppc_cannot_store_register): Update __SPE__ special case.
15642 (ppc_get_hwcap): New function.
15643 (ppc_arch_setup): Use it to determine whether inferior supports
15644 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15645 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15646 Do not access registers if target does not support AltiVec.
15647 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15648 Do not access registers if target does not support SPE.
15649 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15650
52fa2412
UW
156512008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15652
15653 * linux-low.c (disabled_regsets, num_regsets): New.
15654 (use_regsets_p): Delete.
15655 (linux_wait_for_process): Clear disabled_regsets.
15656 (regsets_fetch_inferior_registers): Check and set it.
15657 (regsets_store_inferior_registers): Likewise.
15658 (linux_fetch_registers, linux_store_registers): Do not use
15659 use_regsets_p.
15660 (initialize_low): Allocate disabled_regsets.
15661
e28b3332
DJ
156622008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15663
15664 * Makefile.in (LIBOBJS): New.
15665 (OBS): Use LIBOBJS.
15666 (memmem.o): New rule.
15667 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15668 * configure: Regenerated.
15669
4536995d
UW
156702008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15671
15672 * server.c (handle_query): Never return "unsupported" for
15673 qXfer:features:read queries.
15674
221c031f
UW
156752008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15676
15677 * server.c (get_features_xml): Fix inverted condition.
15678 (handle_query): Always support qXfer:feature:read.
15679
ccd213ac
DJ
156802008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15681
15682 * server.c (wrapper_argv): New.
15683 (start_inferior): Handle wrapper_argv. If set, expect an extra
15684 trap.
15685 (gdbserver_usage): Document --wrapper.
15686 (main): Parse --wrapper.
15687
6fe305f7
UW
156882008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15689
15690 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15691 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15692 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15693 (ppc_set_pc): Likewise.
15694 (ppc_arch_setup): New function.
15695 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15696 of collect_register.
889bf7c5 15697 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15698
5b0a002e
UW
156992008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15700
15701 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15702 instead of linux-ppc64-low.o.
15703 * linux-ppc64-low.c: Remove file.
15704 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15705 (linux-ppc64-low.o): Remove rule.
15706
15707 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15708 (init_registers_powerpc_64): Likewise.
15709 (ppc_regmap): Conditionally define depending on __powerpc64__.
15710 (ppc_cannot_store_register): Do not special-case "fpscr" when
15711 compiled on __powerpc64__.
15712 (ppc_collect_ptrace_register): New function.
15713 (ppc_supply_ptrace_register): New function.
15714 (ppc_breakpoint): Change type to "unsigned int".
15715 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15716 (the_low_target): Conditionally provide initializers for the
889bf7c5 15717 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15718 collect_ptrace_register and supply_ptrace_register members.
15719
9b4b61c8
UW
157202008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15721
15722 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15723 * server.c (gdbserver_xmltarget): Define.
15724 (get_features_xml): Use it to replace "target.xml" and arch_string.
15725
15726 * configure.srv: Remove srv_xmltarget. Add XML files that were
15727 mentioned there to srv_xmlfiles instead. Remove conditional tests
15728 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15729 srv_xmlfiles and srv_regobj to include all possible choices.
15730 * configure.ac (srv_xmltarget): Remove.
15731 (srv_xmlfiles): Do not add "target.xml".
15732 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15733 checks for supplementary target information.
15734 * configure: Regenerate.
15735 * Makefile.in (XML_TARGET): Remove.
15736 (target.xml): Remove rule.
15737 (clean): Do not clean up target.xml.
15738 (.PRECIOUS): Do not mention target.xml.
15739
15740 * target.h (struct target_ops): Remove arch_string member.
15741 * linux-low.c (linux_arch_string): Remove.
15742 (linux_target_ops): Remove arch_string initializer.
15743 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15744 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15745 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15746 * spu-low.c (spu_arch_string): Remove.
15747 (spu_target_ops): Remove arch_string initializer.
15748 * win32-low.c (win32_arch_string): Remove.
15749 (win32_target_ops): Remove arch_string initializer.
15750 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15751 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15752 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15753
ee1a7ae4
UW
157542008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15755
15756 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15757 by collect_ptrace_register and supply_ptrace_register hooks.
15758 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15759 instead of checking for the_low_target.left_pad_xfer.
15760 (usr_store_inferior_registers): Use collect_ptrace_register callback
15761 instead of checking for the_low_target.left_pad_xfer.
15762
15763 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15764 (s390_supply_ptrace_register): Likewise.
15765 (s390_fill_gregset): Call s390_collect_ptrace_register.
15766 (the_low_target): Update.
15767
15768 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15769 (ppc_supply_ptrace_register): Likewise.
15770 (the_low_target): Update.
15771
15772 * linux-i386-low.c (the_low_target): Update.
15773 * linux-x86-64-low.c (the_low_target): Update.
15774
d61ddec4
UW
157752008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15776
15777 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15778 reg-s390.o and reg-s390x.o.
15779
15780 * linux-low.c (new_inferior): New global variable.
15781 (linux_create_inferior, linux_attach): Set it.
15782 (linux_wait_for_process): Call the_low_target.arch_setup after the
15783 target has stopped for the first time.
15784 (initialize_low): Do not call the_low_target.arch_setup.
15785
15786 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15787 (s390_set_pc): Likewise.
15788 (s390_arch_setup): New function.
15789 (the_low_target): Use s390_arch_setup as arch_setup routine.
15790
15791 * regcache.c (realloc_register_cache): New function.
15792 (set_register_cache): Call it for each existing regcache.
15793
d05b4ac3
UW
157942008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15795
15796 * server.h (init_registers): Remove prototype.
15797
15798 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15799 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15800 instead of init_registers ().
15801 * linux-arm-low.c (init_registers_arm): Add prototype.
15802 (init_registers_arm_with_iwmmxt): Likewise.
15803 (the_low_target): Add initializer for arch_setup field.
15804 * linux-cris-low.c (init_registers_cris): Add prototype.
15805 (the_low_target): Add initializer for arch_setup field.
15806 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15807 (the_low_target): Add initializer for arch_setup field.
15808 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15809 (the_low_target): Add initializer for arch_setup field.
15810 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15811 (the_low_target): Add initializer for arch_setup field.
15812 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15813 (the_low_target): Add initializer for arch_setup field.
15814 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15815 (the_low_target): Add initializer for arch_setup field.
15816 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15817 (init_registers_mips64_linux): Likewise.
15818 (the_low_target): Add initializer for arch_setup field.
15819 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15820 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15821 (the_low_target): Add initializer for arch_setup field.
15822 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15823 (init_registers_powerpc_64): Likewise.
15824 (the_low_target): Add initializer for arch_setup field.
15825 * linux-s390-low.c (init_registers_s390): Add prototype.
15826 (init_registers_s390x): Likewise.
15827 (the_low_target): Add initializer for arch_setup field.
15828 * linux-sh-low.c (init_registers_sh): Add prototype.
15829 (the_low_target): Add initializer for arch_setup field.
15830 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15831 (the_low_target): Add initializer for arch_setup field.
15832 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15833 (the_low_target): Add initializer for arch_setup field.
15834
15835 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15836 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15837 instead of init_registers ().
15838 * win32-arm-low.c (init_registers_arm): Add prototype.
15839 (the_low_target): Add initializer for arch_setup field.
15840 * win32-i386-low.c (init_registers_i386): Add prototype.
15841 (the_low_target): Add initializer for arch_setup field.
15842
15843 * spu-low.c (init_registers_spu): Add prototype.
15844 (initialize_low): Call initialie_registers_spu () instead of
15845 initialize_registers ().
15846
fd96d250
PA
158472008-02-19 Pedro Alves <pedro@codesourcery.com>
15848
15849 * server.c (handle_v_requests): When handling the vRun and vAttach
15850 packets, if already debugging a process, don't kill it. Return an
15851 error instead.
15852
d41b6bb4
DJ
158532008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15854
15855 * server.c (handle_query): Correct length check.
15856
5ac588cf
PA
158572008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15858
15859 * win32-low.c (do_initial_child_stuff): Add process handle
15860 parameter. Set current_process_handle and current_process_id from the
15861 parameters. Clear globals.
15862 (win32_create_inferior): Don't set current_process_handle and
15863 current_process_id here. Instead pass them on the call to
15864 do_initial_child_stuff.
15865 (win32_attach): Likewise.
15866 (win32_clear_inferiors): New.
15867 (win32_kill): Don't close the current process handle or the
15868 current thread handle here. Instead call win32_clear_inferiors.
15869 (win32_detach): Don't open a new handle to the process. Call
15870 win32_clear_inferiors.
15871 (win32_join): Don't rely on current_process_handle; open a new
15872 handle using the process id.
15873 (win32_wait): Call win32_clear_inferiors when the inferior process
15874 has exited.
15875
ecd7ecbc
DJ
158762008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15877
15878 * server.c (monitor_show_help): Add "exit".
15879
1525d545
MG
158802008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15881
ecd7ecbc 15882 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15883 (clean): Add reg-xtensa.c.
15884 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15885 * configure.srv (xtensa*-*-linux*) New target.
15886 * linux-xtensa-low.c: New.
15887 * xtensa-xtregs.c: New.
1525d545 15888
59a016f0
PA
158892008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15890
15891 * hostio.c: Don't include errno.h.
15892 (errno_to_fileio_errno): Move to hostio-errno.
15893 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15894 error number outputting to the target->hostio_last_error callback.
15895 (hostio_packet_error): Use FILEIO_EINVAL directly.
15896 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15897 calls to hostio_error.
15898 * hostio-errno.c: New.
15899 * server.h (hostio_last_error_from_errno): Declare.
15900 * target.h (target_ops): Add hostio_last_error member.
15901 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15902 as hostio_last_error handler.
889bf7c5 15903 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15904 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15905 (wince_hostio_last_error): New functions.
15906 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15907 as hostio_last_error handler.
15908 (win32_target_ops) [!_WIN32_WCE]: Register
15909 hostio_last_error_from_errno as hostio_last_error handler.
15910 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15911 (hostio-errno.o): New rule.
15912 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15913 * configure.srv (srv_hostio_err_objs): New variable. Default to
15914 hostio-errno.o.
15915 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15916 * configure: Regenerate.
15917
2d717e4f
DJ
159182008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15919
15920 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15921 (linux_kill, linux_detach): Clean up the process list.
15922 * remote-utils.c (remote_open): Improve port number parsing.
15923 (putpkt_binary, input_interrupt): Only send interrupts if the target
15924 is running.
15925 * server.c (extended_protocol): Make static.
15926 (attached): Define earlier.
15927 (exit_requested, response_needed, program_argv): New variables.
15928 (target_running): New.
15929 (start_inferior): Clear attached here.
15930 (attach_inferior): Set attached here.
15931 (require_running): Define.
15932 (handle_query): Use require_running and target_running. Implement
15933 "monitor exit".
15934 (handle_v_attach, handle_v_run): New.
15935 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15936 (gdbserver_usage): Update.
15937 (main): Redo argument parsing. Handle --debug and --multi. Handle
15938 --attach along with other options or after the port. Save
15939 program_argv. Support no initial program. Resynchronize
15940 communication with GDB after an error. Handle "monitor exit".
15941 Use require_running and target_running. Always allow the extended
15942 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15943 restart in extended mode.
15944 * README: Refer to the GDB manual. Update --attach usage.
15945
7407e2de
AS
159462007-12-20 Andreas Schwab <schwab@suse.de>
15947
15948 * linux-low.c (STACK_SIZE): Define.
15949 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15950 (linux_test_for_tracefork): Likewise.
15951
b65d95c5
DJ
159522007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15953
15954 * linux-low.c (linux_wait_for_event): Update messages. Do not
15955 reinsert auto-delete breakpoints.
15956 * mem-break.c (struct breakpoint): Change return type of handler to
15957 int.
15958 (set_breakpoint_at): Update handler type.
15959 (reinsert_breakpoint_handler): Return 1 instead of calling
15960 delete_breakpoint.
15961 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15962 setting a new one.
15963 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15964 * mem-break.h (set_breakpoint_at): Update handler type.
15965 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15966 * win32-low.c (auto_delete_breakpoint): New.
15967 (get_child_debug_event): Use it.
15968
4e799345
DJ
159692007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15970
15971 * configure.ac: Check for pread and pwrite.
15972 * hostio.c (handle_pread): Fall back to lseek and read.
15973 (handle_pwrite): Fall back to lseek and write.
15974 * config.in, configure: Regenerated.
15975
27524b67
DJ
159762007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15977
15978 * server.c (myresume): Add own_buf argument.
15979 (main): Update calls.
15980
a20d5e98
DJ
159812007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15982
15983 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15984 * remote-utils.c (remote_open): Do not call disable_async_io.
15985 (block_async_io): Delete.
15986 (unblock_async_io): Make static.
15987 (initialize_async_io): New.
15988 * server.c (handle_v_cont): Handle async I/O here.
15989 (myresume): Likewise. Move other common resume tasks here...
15990 (main): ... from here. Call initialize_async_io. Disable async
15991 I/O before the main loop.
15992 * server.h (initialize_async_io): Declare.
15993 (block_async_io, unblock_async_io): Delete prototypes.
15994 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15995
b79d787e
DJ
159962007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15997
15998 * remote-utils.c (readchar): Allow binary data in received messages.
15999
d97903b2
PA
160002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16001
16002 * win32-low.c (attaching): New global.
16003 (win32_create_inferior): Clear the `attaching' global.
16004 (win32_attach): Set the `attaching' global.
16005 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16006 attaching. Only set a breakpoint at the entry point if not
16007 attaching.
16008
311de423
PA
160092007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16010
16011 * server.c (main): Don't report dll events on the initial
16012 connection on attaches.
16013
6c2d16d2
PA
160142007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16015
16016 * server.c (main): Relax numerical bases supported for the pid of
16017 the --attach command line argument.
16018
5ca906e6
PA
160192007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16020
16021 * win32-low.c (win32_attach): Call OpenProcess before
16022 DebugActiveProcess, not after. Add last error output to error
16023 call.
16024
9c6c8194
PA
160252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16026
16027 * win32-low.c (win32_get_thread_context)
16028 (win32_set_thread_context): New functions.
16029 (thread_rec): Use win32_get_thread_context.
16030 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16031 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16032 field.
16033
4d5d1aaa
PA
160342007-12-03 Leo Zayas
16035 Pedro Alves <pedro_alves@portugalmail.pt>
16036
16037 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16038 global variables.
16039 (child_add_thread): Minor cleanup.
16040 (child_continue): Resume artificially suspended threads before
16041 calling ContinueDebugEvent.
16042 (suspend_one_thread): New.
16043 (fake_breakpoint_event): New.
16044 (get_child_debug_event): Change return type to int. Check here if
16045 gdb sent an interrupt request. If a soft interrupt was requested,
16046 fake a breakpoint event. Return 0 if there is no event to handle,
16047 and 1 otherwise.
16048 (win32_wait): Don't check here if gdb sent an interrupt request.
16049 Ensure there is a valid event to handle.
16050 (win32_request_interrupt): Add soft interruption method as last
16051 resort.
16052
c436e841
PA
160532007-12-03 Leo Zayas
16054 Pedro Alves <pedro_alves@portugalmail.pt>
16055
16056 * win32-low.h (win32_thread_info): Add descriptions to the
16057 structure members. Replace `suspend_count' counter by a
16058 `suspended' flag.
16059 * win32-low.c (thread_rec): Update condition of when to get the
16060 context from the inferior. Rely on ContextFlags being set if it
16061 has already been retrieved. Only suspend the inferior thread if
16062 we haven't already. Warn if that fails.
16063 (continue_one_thread): s/suspend_count/suspended/. Only call
16064 ResumeThread once. Warn if that fails.
16065
e7b5fa67
PA
160662007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16067
16068 * win32-low.c (win32_wait): Don't read from the inferior when it
16069 has already exited.
16070
a385171d
PA
160712007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16072
16073 * Makefile.in (win32_low_h): New variable.
16074 (win32-low.o): Add dependency on $(win32_low_h).
16075 (win32-arm-low.o, win32-i386-low.o): New rules.
16076
f80c84b3
DJ
160772007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16078
16079 * hostio.c: Correct copyright year.
16080
a6b151f1
DJ
160812007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16082
16083 * Makefile.in (OBS): Add hostio.o.
16084 (hostio.o): New rule.
16085 * server.h (handle_vFile): Declare.
16086 * hostio.c: New file.
16087 * server.c (handle_v_requests): Take packet_len and new_packet_len
16088 for binary packets. Call handle_vFile.
16089 (main): Update call to handle_v_requests.
16090
f9387fc3
DJ
160912007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16092
16093 * linux-low.c: Include <sched.h>.
16094
51c2684e
DJ
160952007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16096
16097 * linux-low.c (linux_tracefork_grandchild): New.
16098 (linux_tracefork_child): Use clone.
16099 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16100
75f83163
JB
161012007-10-31 Joel Brobecker <brobecker@adacore.com>
16102
16103 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16104
da5898ce
DJ
161052007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16106
16107 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16108
24a09b5f
DJ
161092007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16110
16111 * inferiors.c (change_inferior_id): Delete.
16112 (add_pid_to_list, pull_pid_from_list): New.
16113 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16114 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16115 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16116 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16117 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16118 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16119 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16120 (using_threads): Always set to 1.
16121 (handle_extended_wait): New.
16122 (add_process): Do not set TID.
16123 (linux_create_inferior): Set must_set_ptrace_flags.
16124 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16125 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16126 (linux_thread_alive): Rename TID argument to LWPID.
16127 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16128 (linux_wait_for_event): Do not use TID or check using_threads. Update
16129 call to dead_thread_notify. Call handle_extended_wait.
16130 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16131 (send_sigstop): Delete sigstop_sent.
16132 (wait_for_sigstop): Avoid TID.
16133 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16134 (linux_test_for_tracefork): New.
16135 (linux_lookup_signals): Use thread_db_active and
16136 linux_supports_tracefork_flag.
16137 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16138 * linux-low.h (get_process_thread): Avoid TID.
16139 (struct process_ifo): Move thread_known and tid to the end. Remove
16140 sigstop_sent.
16141 (linux_attach_lwp, thread_db_init): Update prototypes.
16142 * server.h (change_inferior_id): Delete prototype.
16143 (add_pid_to_list, pull_pid_from_list): New prototypes.
16144 * thread-db.c (thread_db_use_events): New.
16145 (find_first_thread): Rename to...
16146 (find_one_thread): ...this. Update callers and messages. Do not
16147 call fatal. Check thread_db_use_events. Do not call
16148 change_inferior_id or new_thread_notify.
16149 (maybe_attach_thread): Update. Do not call new_thread_notify.
16150 (thread_db_init): Set thread_db_use_events. Check use_events.
16151 * utils.c (fatal, warning): Correct message prefix.
16152
30ed0a8f
DJ
161532007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16154
16155 * Makefile.in (clean): Remove new files.
16156 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16157 (powerpc-64.o, powerpc-64.c): New rules.
16158 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16159 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16160 with SPE.
16161 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16162 SPE targets.
16163 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16164 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16165 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16166 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16167 (target_regsets): Add AltiVec and SPE register sets.
16168 * configure.ac: Check for AltiVec and SPE.
16169 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16170 (ppc_fill_vrregset, ppc_store_vrregset): New.
16171 (target_regsets): Add AltiVec register set.
16172 * configure: Regenerated.
16173
fd462a61
DJ
161742007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16175
16176 * linux-low.c (O_LARGEFILE): Define.
16177 (linux_read_memory): Use /proc/PID/mem.
16178 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16179 * configure, config.in: Regenerated.
16180
69f223ed
DJ
161812007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16182
16183 * linux-low.c (linux_wait_for_event): Do not pass signals while
16184 single-stepping.
16185
aec18585
PA
161862007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16187
16188 * win32-low.c (create_process): New.
16189 (win32_create_inferior): Use create_process instead of
16190 CreateProcess. If create_process failed retry appending an ".exe"
16191 suffix. Store the GetLastError result immediatelly after
16192 create_process calls and use it on the call to error.
16193
34d86ddd
PA
161942007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16195
16196 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16197
5a0e3bd0
JB
161982007-08-23 Joel Brobecker <brobecker@adacore.com>
16199
16200 * configure.ac: Switch license to GPLv3.
16201
f88c79e6
MS
162022007-08-01 Michael Snyder <msnyder@access-company.com>
16203
16204 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16205
6b3d9b83
PA
162062007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16207
16208 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16209 typedef.
16210 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16211 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16212 CloseToolhelp32Snapshot.
16213 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16214 CloseToolhelp32Snapshot.
16215
c588c53c
MS
162162007-07-27 Michael Snyder <michael.snyder@access-company.com>
16217
16218 * server.c (main): Check for inferior exit before main loop.
16219
aa0403d9
PA
162202007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16221
16222 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16223 instead of on tmp_desc.
16224
255e7678
DJ
162252007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16226 Daniel Jacobowitz <dan@codesourcery.com>
16227
16228 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16229 (add_thread): Minor cleanups.
16230 (clear_inferiors): Move lower in the file. Clear the DLL
16231 list.
16232 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16233 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16234 (xml_escape_text): New.
16235 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16236 for qSupported.
16237 (handle_v_cont): Report errors.
16238 (gdbserver_version): Update.
16239 (main): Correct size of own_buf. Do not report initial DLL events.
16240 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16241 (unloaded_dll, xml_escape_text): New.
16242 * win32-low.c (enum target_waitkind): Update comments.
16243 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16244 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16245 (win32_EnumProcessModules, win32_GetModuleInformation)
16246 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16247 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16248 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16249 (win32_Module32First, win32_Module32Next, load_toolhelp)
16250 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16251 (get_child_debug_event): Handle DLL events.
16252 (win32_wait): Likewise.
16253
0d37add9
DJ
162542007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16255
16256 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16257 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16258
45e2715e
PA
162592007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16260
16261 * win32-low.c (handle_output_debug_string): Ignore event if not
16262 waiting.
16263
c5674cf1
PA
162642007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16265
16266 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16267
2bbe3cc1
DJ
162682007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16269
16270 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16271
ae13219e
DJ
162722007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16273
16274 * inferiors.c (change_inferior_id): Add comment.
16275 * linux-low.c (check_removed_breakpoint): Add an early
16276 prototype. Improve debug output.
16277 (linux_attach): Doc update.
16278 (linux_detach_one_process, linux_detach): Clean up before releasing
16279 each process.
16280 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16281 * linux-low.h (struct process_info): Doc improvement.
16282 * mem-break.c (delete_all_breakpoints): New.
16283 * mem-break.h (delete_all_breakpoints): New prototype.
16284 * thread-db.c (find_first_thread): New.
16285 (thread_db_create_event): Call it instead of
16286 thread_db_find_new_threads. Clean up unused variables.
16287 (maybe_attach_thread): Remove first thread handling.
16288 (thread_db_find_new_threads): Use find_first_thread.
16289 (thread_db_get_tls_address): Likewise.
16290
4105de34
DJ
162912007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16292
16293 * thread-db.c (thread_db_find_new_threads): Add prototype.
16294 (thread_db_create_event): Check for the main thread before adding
16295 a new thread.
16296 (maybe_attach_thread): Only enable event reporting if TID == 0.
16297 (thread_db_get_tls_address): Check for new threads.
16298
2b876972
DJ
162992007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16300
16301 * linux-low.c (linux_create_inferior): Try execv before execvp.
16302 * spu-low.c (spu_create_inferior): Likewise.
16303
7a245884
DJ
163042007-06-13 Mike Frysinger <vapier@gentoo.org>
16305
16306 * linux-low.c (linux_create_inferior): Change execv to execvp.
16307 * spu-low.c (spu_create_inferior): Likewies.
16308
117ce543
DJ
163092007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16310
16311 * Makefile.in (clean): Clean new files instead of deleted ones.
16312 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16313 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16314 rules.
16315 * configure.srv: Specify XML files and new regformats for MIPS and
16316 MIPS64 GNU/Linux.
16317 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16318 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16319 an entry for the restart register.
16320 (mips_cannot_fetch_register, mips_cannot_store_register)
16321 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16322 register names to match the XML descriptions.
16323 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16324 restart register instead of $0.
16325
0e7f50da
UW
163262007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16327 Markus Deuling <deuling@de.ibm.com>
16328
16329 * remote-utils.c (decode_xfer_write): New function.
16330 * server.h (decode_xfer_write): Add prototype.
16331 * server.c (handle_query): Add PACKET_LEN argument. Support
16332 qXfer:spu:read and qXfer:spu:write packets.
16333 (main): Pass packet_len to handle_query.
16334 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16335 * target.h (target_ops): Add qxfer_spu.
16336
374c1d38
UW
163372007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16338
16339 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16340 accessing non-seekable spufs files.
16341
bb63802a
UW
163422007-05-16 Markus Deuling <deuling@de.ibm.com>
16343
889bf7c5 16344 * server.c (handle_query): Add reply for qC packet.
bb63802a 16345
7390519e
PA
163462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16347 Leo Zayas <lerele@champenstudios@com>
16348
16349 * server.h (check_remote_input_interrupt_request): New function.
16350 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16351 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16352 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16353 (check_remote_input_interrupt_request): New function.
16354 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16355 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16356 winapi_GenerateConsoleCtrlEvent): New typedefs.
16357 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16358 to 250 ms.
16359 (win32_wait): Check for remote interrupt request
16360 with check_remote_input_interrupt_request.
16361 (win32_request_interrupt): New function.
16362 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16363
34b34921
PA
163642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16365
16366 * win32-low.c (debug_registers_changed,
16367 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16368 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16369 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16370 (thread_rec): Get context using the low target.
16371 (child_add_thread): Call thread_added on the low target,
16372 which does the same thing.
16373 (regptr): Delete.
16374 (do_initial_child_stuff): Remove debug registers references.
16375 Set context using the low target. Resume threads after
16376 setting the contexts.
16377 (child_continue): Remove dead variable. Remove debug
16378 registers references.
16379 (child_fetch_inferior_registers): Go through the low target.
16380 (do_child_store_inferior_registers): Remove.
16381 (child_store_inferior_registers): Go through the low target.
16382 (win32_resume): Remove debug registers references.
16383 Set context using the low target.
16384 (handle_exception): Change return type to void. Don't record
16385 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16386 first chance exception.
889bf7c5 16387 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16388 goto loop. Always return after waiting for debug event.
16389 (win32_wait): Convert to switch statement. Handle spurious
16390 events.
16391
16392 * win32-i386-low.c (debug_registers_changed,
16393 debug_registers_used): New.
16394 (initial_stuff): Rename to ...
16395 (i386_initial_stuff): ... this. Clear debug registers
16396 state variables.
16397 (store_debug_registers): Delete.
16398 (i386_get_thread_context): New.
16399 (load_debug_registers): Delete.
16400 (i386_set_thread_context): New.
16401 (i386_thread_added): New.
16402 (single_step): Rename to ...
16403 (i386_single_step): ... this.
16404 (do_fetch_inferior_registers): Rename to ...
16405 (i386_fetch_inferior_register): ... this.
16406 (i386_store_inferior_register): New.
16407 (the_low_target): Adapt to new interface.
16408
16409 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16410 (arm_get_thread_context): New.
16411 (arm_set_thread_context): New.
16412 (regptr): New.
16413 (do_fetch_inferior_registers): Rename to ...
16414 (arm_fetch_inferior_register): ... this.
16415 (arm_store_inferior_register): New.
16416 (arm_wince_breakpoint): Reimplement as unsigned long.
16417 (arm_wince_breakpoint_len): Define.
16418 (the_low_target): Adapt to new interface.
16419
16420 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16421 load_debug_registers. Add get_thread_context, set_thread_context,
16422 thread_added and store_inferior_register. Rename
16423 fetch_inferior_registers to fetch_inferior_register.
16424 (regptr): Remove declaration.
16425
dd6953e1
PA
164262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16427
16428 * linux-low.c (linux_detach): Change return type to int. Return 0.
16429 * spu-low.c (spu_detach): Likewise.
16430
444d6139
PA
164312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16432
16433 * target.h (target_ops): Change return type of detach to int.
16434 Add join.
16435 (join_inferior): New.
16436 * server.c (main): Don't skip detach support on mingw32.
16437 If the inferior doesn't support detaching return error.
16438 Call join_inferior instead of using waitpid.
16439 * linux-low.c (linux_join): New.
16440 (linux_target_op): Add linux_join.
16441 * spu-low.c (spu_join): New.
16442 (spu_target_ops): Add spu_join.
16443 * win32-low.c (win32_detach): Adapt to new interface.
16444 Reopen current_process_handle before detaching. Issue a child
16445 resume before detaching.
16446 (win32_join): New.
16447 (win32_target_op): Add win32_join.
16448
1d5315fe
PA
164492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16450
16451 * win32-low.c (win32-attach): Fix return value.
16452 * target.h (target_ops): Describe ATTACH return values.
16453
bf914831
PA
164542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16455
16456 * win32-low.c (GETPROCADDRESS): Define.
16457 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16458 (winapi_DebugSetProcessKillOnExit): Likewise.
16459 (win32_create_inferior): Force usage of ansi CreateProcessA.
16460 (win32_attach): Use GETPROCADDRESS.
16461 (win32_detach): Likewise.
16462
f72f3e60
PA
164632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16464
16465 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16466
ed50f18f
PA
164672007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16468
16469 * win32-low.c: Commit leftover changes from 2007-03-29.
16470
0c2ead7e
DJ
164712007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16472
16473 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16474 fields short instead of int. Add explicit padding.
16475 (i387_cache_to_fsave): Remove unnecessary casts.
16476 (i387_fsave_to_cache): Doc fix.
16477 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16478
73725ff3
DJ
164792007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16480
16481 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16482 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16483
d99f33d8
PA
164842007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16485
16486 * configure.srv (arm*-*-mingw32ce*): Move near the other
16487 arm targets.
16488
68070c10
PA
164892007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16490
2482afc6 16491 * configure.ac: Add errno checking.
68070c10
PA
16492 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16493 sys/file.h and malloc.h.
16494 (AC_CHECK_DECLS): Add perror.
16495 (srv_mingwce): Handle.
2482afc6 16496 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16497 win32-i386-low.o to srv_tgtobj.
16498 (i[34567]86-*-mingw*): Likewise.
16499 (arm*-*-mingw32ce*): Add case.
16500 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16501 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16502 [__MINGW32CE__] (strerror): New function.
16503 [__MINGW32CE__] (errno): Define to GetLastError.
16504 [__MINGW32CE__] (COUNTOF): New macro.
16505 (remote_open): Remove extra close call.
16506 * mem-break.c (delete_breakpoint_at): New function.
16507 * mem-break.h (delete_breakpoint_at): Declare.
16508 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16509 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16510 [USE_WIN32API] (read, write): Add char* casts.
16511 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16512 * server.h: Include wincecompat.h on Windows CE.
16513 [HAVE_ERRNO_H]: Check.
16514 (perror): Declare if not declared.
16515 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16516 (perror_with_name): Remove errno declaration.
16517 * wincecompat.h: New.
16518 * wincecompat.c: New.
16519 * win32-low.h: New.
16520 * win32-arm-low.c: New.
16521 * win32-i386-low.c: New.
16522 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16523 (OUTMSG2): Make it safe.
16524 (_T): New macro.
16525 (COUNTOF): New macro.
16526 (NUM_REGS): Get it from the low target.
16527 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16528 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16529 (thread_rec): Let low target handle debug registers.
16530 (child_add_thread): Likewise.
16531 (child_init_thread_list): Likewise.
16532 (continue_one_thread): Likewise.
16533 (regptr): New.
16534 (do_child_fetch_inferior_registers): Move to ...
16535 * win32-i386-low.c: ... here, and rename to ...
16536 (do_fetch_inferior_registers): ... this.
889bf7c5 16537 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16538 Go through the low target.
16539 (do_child_store_inferior_registers): Use regptr.
16540 (strwinerror): New function.
16541 (win32_create_inferior): Handle Windows CE.
16542 Use strwinerror instead of strerror on Windows error
16543 codes. Add program to the error output.
16544 Don't close the main thread handle on Windows CE.
16545 (win32_attach): Use coredll.dll on Windows CE.
16546 (win32_kill): Close current process and current
16547 thread handles.
16548 (win32_detach): Use coredll.dll on Windows CE.
16549 (win32_resume): Let low target handle debug registers, and
16550 step request.
16551 (handle_exception): Add/Remove initial breakpoint. Avoid
16552 non-existant WSTOPSIG on Windows CE.
16553 (win32_read_inferior_memory): Cast to remove warning.
16554 (win32_arch_string): Go through the low target.
16555 (initialize_low): Call set_breakpoint_data with the low
16556 target's breakpoint.
16557 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16558 FOP_REGNUM, mappings): Move to ...
16559 * win32-i386-low.c: ... here.
16560 * win32-low.c (win32_thread_info): Move to ...
16561 * win32-low.h: ... here.
16562 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16563 win32-arm-low.c and wincecompat.c.
16564 (all:): Add $EXEEXT.
16565 (install-only:): Likewise.
16566 (gdbserver:): Likewise.
16567 (gdbreplay:): Likewise.
16568 * config.in: Regenerate.
16569 * configure: Regenerate.
16570
41093d81
PA
165712007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16572
16573 * win32-low.c: Rename typedef thread_info to
16574 win32_thread_info throughout.
16575
544afa54
PA
165762007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16577
16578 * win32-i386-low.c: Rename to ...
16579 * win32-low.c: ... this.
16580 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16581 * Makefile.in: Likewise.
16582
bce7165d
PA
165832007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16584
16585 * remote-utils.c (monitor_output): Constify msg parameter.
16586 * server.h (monitor_output): Likewise.
16587 * win32-i386-low.c (handle_output_debug_string): New.
16588 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16589 handle_output_debug_string.
16590 (get_child_debug_event): Likewise.
16591
506c7aa0
DJ
165922007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16593
16594 * server.c (main): Correct strtoul check.
16595
42c81e2a
DJ
165962007-03-27 Jon Ringle <jon@ringle.org>
16597
16598 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16599
9453113a
DJ
166002007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16601
16602 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16603
64a69107
DJ
166042007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16605
16606 * terminal.h: Check HAVE_SGTTY_H.
16607
166082007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16609
16610 * remote-utils.c (remote_open): Print out the assigned port number.
16611
c74d0ad8
DJ
166122007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16613
16614 * remote-utils.c (monitor_output): New function.
16615 * server.c (debug_threads): Define here.
16616 (monitor_show_help): New function.
16617 (handle_query): Handle qRcmd.
16618 (main): Do not handle 'd' packet.
16619 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16620 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16621 of debug_threads.
16622
de7c3b4a
PA
166232007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16624
16625 * Makefile.in (EXEEXT): New.
16626 (clean): Use $(EXEEXT).
16627
ef57601b
PA
166282007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16629
16630 * target.h (target_ops): Rename send_signal to request_interrupt,
16631 and remove enum target_signal parameter.
16632 * linux-low.c (linux_request_interrupt): Rename from
16633 linux_send_signal, and always send SIGINT.
16634 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16635 and always send SIGINT.
16636 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16637 of send_signal.
16638 (input_interrupt): Likewise.
16639
820f2bda
PA
166402007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16641
16642 * server.c (get_features_xml): Check if target implemented
16643 arch_string.
16644 * win32-i386-low.c (win32_arch_string): New.
16645 (win32_target_ops): Add win32_arch_string as arch_string member.
16646
ab39bf24
UW
166472007-02-22 Markus Deuling <deuling@de.ibm.com>
16648
16649 * spu-low.c (spu_arch_string): New.
16650 (spu_target_ops): Add spu_arch_string.
16651
61ff6e04
DJ
166522007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16653
16654 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16655 * configure.ac: Do not check for terminal.h.
16656 * configure, config.in: Regenerated.
16657
fb1e4ffc
DJ
166582007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16659
16660 * Makefile.in (OBS): Add $(XML_BUILTIN).
16661 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16662 (clean): Update.
16663 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16664 (arm-with-iwmmxt.c): New.
16665 * config.in, configure: Regenerate.
16666 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16667 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16668 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16669 (arm*-*-linux*): Add iWMMXt and regset support.
16670 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16671 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16672 (arm_store_wmmxregset, target_regsets): New.
16673 * server.c (get_features_xml): Take annex argument. Check builtin
16674 XML documents.
16675 (handle_query): Handle multiple annexes.
16676
0f48aa01
DJ
166772007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16678
16679 * remote-utils.c [USE_WIN32API] (read, write): Define.
16680 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16681 write.
16682
23181151
DJ
166832007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16684
16685 * linux-i386-low.c (the_low_target): Set arch_string.
16686 * linux-x86-64-low.c (the_low_target): Likewise.
16687 * linux-low.c (linux_arch_string): New.
16688 (linux_target_ops): Add it.
16689 * linux-low.h (struct linux_target_ops): Add arch_string.
16690 * server.c (write_qxfer_response): Use const void * for DATA.
16691 (get_features_xml): New.
16692 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16693 * target.h (struct target_ops): Add arch_string method.
16694
9d606399
DJ
166952007-01-03 Denis Pilat <denis.pilat@st.com>
16696 Daniel Jacobowitz <dan@codesourcery.com>
16697
16698 * linux-low.c (linux_kill): Handle being called with no threads.
16699 * win32-i386-low.c (win32_kill): Likewise.
16700 (get_child_debug_event): Clear current_process_handle.
16701
167022006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16703 Daniel Jacobowitz <dan@codesourcery.com>
16704
16705 * remote-utils.c (remote_open): Check the type of specified
16706 serial port devices before opening them.
16707 * server.c (main): Kill the inferior if an error occurs during
16708 the first remote_open.
16709
a5e13d24
DJ
167102006-12-05 Markus Deuling <deuling@de.ibm.com>
16711
16712 * README: Update supported targets.
16713
186947f7
DJ
167142006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16715
16716 * Makefile.in (clean): Remove reg-mips64.c.
16717 (reg-mips64.c, reg-mips64.o): New rules.
16718 * configure.srv: Handle mips64. Include regset support for mips.
16719 * linux-mips-low.c (union mips_register): New.
16720 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16721 (mips_breakpoint, mips_breakpoint_at): Use int.
16722 (mips_collect_register, mips_supply_register)
16723 (mips_collect_register_32bit, mips_supply_register_32bit)
16724 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16725 (mips_store_fpregset, target_regsets): New.
16726 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16727
a13e2c95
UW
167282006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16729
16730 * configure.srv: Add target "spu*-*-*".
16731 * Makefile.in (clean): Remove reg-spu.c.
16732 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16733 * spu-low.c: New file.
16734
cb7283db
DJ
167352006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16736
16737 * configure.ac: Correct td_thr_tls_get_addr test.
16738 * configure: Regenerated.
16739
89be2091
DJ
167402006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16741
16742 * linux-low.c (linux_wait_for_event): Reformat. Use the
16743 pass_signals array.
16744 * remote-utils.c (decode_address_to_semicolon): New.
16745 * server.c (pass_signals, handle_general_set): New.
16746 (handle_query): Mention QPassSignals for qSupported.
16747 (main): Call handle_general_set.
16748 * server.h (pass_signals, decode_address_to_semicolon): New.
16749
000ef4f0
DJ
167502006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16751
16752 * server.c (handle_query): Correct error handling for read_auxv.
16753
b7149293
UW
167542005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16755
16756 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16757 and srv_linux_thread_db to yes.
16758 * linux-s390-low.c (s390_fill_gregset): New function.
16759 (target_regsets): Define data structure.
16760
dae5f5cf
DJ
167612006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16762
16763 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16764 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16765 * config.in, configure: Regenerated.
16766 * inferiors.c (gdb_id_to_thread): New function.
16767 (gdb_id_to_thread_id): Use it.
16768 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16769 * linux-low.h (struct process_info): Add th member.
16770 (thread_db_get_tls_address): New prototype.
16771 * remote-utils.c (decode_address): Make non-static.
16772 * server.c (handle_query): Handle qGetTLSAddr.
16773 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16774 * target.h (struct target_ops): Add get_tls_address.
16775 * thread-db.c (maybe_attach_thread): Save the thread handle.
16776 (thread_db_get_tls_address): New.
16777
32ca6d61
DJ
167782006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16779
16780 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16781 (linux_resume_one_process): Take a siginfo_t *. Update all
16782 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16783 (struct pending_signals): Add a siginfo_t.
16784 (linux_wait_for_process): Always set last_status.
16785 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16786 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16787 * linux-low.h (struct process_info): Add last_status.
16788
5ffff7c1
DJ
167892006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16790
16791 * remote-utils.c (try_rle): New function.
16792 (putpkt_binary): Use it.
16793
8695c747
DJ
167942006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16795
16796 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16797 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16798 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16799 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16800 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16801 point registers.
16802
290fadea
RS
168032006-08-08 Richard Sandiford <richard@codesourcery.com>
16804
16805 * server.c (terminal_fd): New variable.
16806 (old_foreground_pgrp): Likewise.
16807 (restore_old_foreground_pgrp): New function.
16808 (start_inferior): Record the terminal file descriptor in terminal_fd
16809 and its original foreground group in old_foreground_pgrp. Register
16810 restore_old_foreground_pgrp with atexit().
16811
9f2e1e63
DJ
168122006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16813
16814 * server.c (handle_query): Correct qPart to qXfer.
16815
b80864fb
DJ
168162006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16817
16818 * configure.ac: Check for more headers which are missing on
16819 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16820 * configure.srv: Add Cygwin and mingw32.
16821 * remote-utils.c: Don't include headers unconditionally which
16822 are missing on mingw32. Include <winsock.h> for mingw32.
16823 (remote_open): Adjust for mingw32 support. Flush
16824 standard error after writing to it.
16825 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16826 (unblock_async_io, enable_async_io, disable_async_io)
16827 (readchar, getpkt): Update for Winsock support.
16828 (prepare_resume_reply): Expect a protocol signal number.
16829 * server.c: Disable <sys/wait.h> on mingw32.
16830 (start_inferior): Adjust for mingw32 support. Flush
16831 standard error after writing to it.
16832 (attach_inferior): Likewise. Use protocol signal
16833 numbers.
16834 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16835 and names.
16836 * win32-i386-low.c: New file.
16837 * Makefile.in (XM_CLIBS): Set.
16838 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16839 (win32-i386-low.o): New dependency rule.
16840 * linux-low.c (linux_wait): Use target signal numbers.
16841 * target.h (struct target_ops): Doc fix.
16842 * server.h (target_signal_to_name): New prototype.
16843 * gdbreplay.c: Don't include headers unconditionally which
16844 are missing on mingw32. Include <winsock.h> for mingw32.
16845 (remote_close, remote_open): Adjust for Winsock support.
16846 * configure, config.in: Regenerated.
16847
0876f84a
DJ
168482006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16849
16850 * server.c (decode_xfer_read, write_qxfer_response): New.
16851 (handle_query): Take a packet length argument. Handle
16852 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16853 the qSupported response.
16854 (main): Update call to handle_query.
16855
01f9e8fa
DJ
168562006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16857
16858 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16859 (putpkt_binary): Renamed from putpkt and adjusted for binary
16860 data.
16861 (putpkt): New wrapper for putpkt_binary.
16862 (readchar): Don't mask off the high bit.
16863 (decode_X_packet): New function.
16864 * server.c (main): Call putpkt_binary if a handler sets the packet
16865 length. Save the length of the incoming packet. Handle 'X'.
16866 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16867
be2a5f71
DJ
168682006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16869
16870 * server.c (handle_query): Handle qSupported.
16871
ea025f5f
DJ
168722006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16873
16874 * remote-utils.c (all_symbols_looked_up): New variable.
16875 (look_up_one_symbol): Check it.
16876 * server.h (look_up_one_symbol): New declaration.
16877 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16878
9308fc88
DJ
168792006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16880
16881 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16882 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16883 (PTRACE_GET_THREAD_AREA): Define.
16884 (ps_get_thread_area): New function.
16885
52fb6437
NS
168862006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16887
16888 * configure.srv (m68k*-*-uclinux*): New target.
16889 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16890 (linux_resume_one_process): Remove extraneous cast.
16891 (linux_read_offsets): New.
16892 (linux_target_op): Add linux_read_offsets on mmuless systems.
16893 * server.c (handle_query): Add qOffsets logic.
16894 * target.h (struct target_ops): Add read_offsets.
16895
21b0f40c
DJ
168962006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16897
16898 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16899 (PTRACE_GET_THREAD_AREA): Define.
16900 (ps_get_thread_area): New function.
16901 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16902 (linux-x86-64-low.o): Update.
16903
0050a760
DJ
169042006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16905
16906 * configure.ac: Remove checks for prfpregset_t.
16907 * gdb_proc_service.h: New file.
16908 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16909 new "gdb_proc_service.h".
16910 * proc-service.c: Likewise.
16911 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16912 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16913 * Makefile.in (gdb_proc_service_h): Updated.
16914 * configure, config.in: Regenerated.
16915
b92a518e
DJ
169162006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16917
16918 * remote-utils.c (prepare_resume_reply): Move declaration
16919 of gdb_id_from_wait to the top of the block.
16920
545587ee
DJ
169212006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16922
16923 * linux-low.c (regsets_store_inferior_registers): Read the regset
16924 from the target before filling it.
16925
9db87ebd
DJ
169262006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16927
16928 * server.c (attach_inferior): Return SIGTRAP for a successful
16929 attach.
16930
dd24457d
DJ
169312006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16932
16933 * Makefile.in (OBS): Add version.o.
16934 (STAGESTUFF): Delete.
16935 (version.o): Add dependencies.
16936 (version.c): Replace rule.
16937 (clean): Remove version.c.
16938 * server.c (gdbserver_version): New.
16939 (gdbserver_usage): Use printf.
16940 (main): Handle --version and --help.
16941 * server.h (version, host_name): Add declarations.
16942
6f0f660e
EZ
169432005-12-23 Eli Zaretskii <eliz@gnu.org>
16944
889bf7c5
PA
16945 * linux-arm-low.c:
16946 * linux-arm-low.c:
16947 * inferiors.c:
16948 * i387-fp.h:
16949 * i387-fp.c:
16950 * gdbreplay.c:
16951 * regcache.c:
16952 * proc-service.c:
16953 * mem-break.h:
16954 * mem-break.c:
16955 * linux-x86-64-low.c:
16956 * linux-sh-low.c:
16957 * linux-s390-low.c:
16958 * linux-ppc64-low.c:
16959 * linux-ppc-low.c:
16960 * linux-mips-low.c:
16961 * linux-m68k-low.c:
16962 * linux-m32r-low.c:
16963 * linux-low.h:
16964 * linux-low.c:
16965 * linux-ia64-low.c:
16966 * linux-i386-low.c:
16967 * linux-crisv32-low.c:
16968 * thread-db.c:
16969 * terminal.h:
16970 * target.h:
16971 * target.c:
16972 * server.h:
16973 * server.c:
16974 * remote-utils.c:
16975 * regcache.h:
16976 * utils.c:
16977 * Makefile.in:
16978 * configure.ac:
6f0f660e
EZ
16979 * gdbserver.1: Add (C) after Copyright. Update the FSF
16980 address.
16981
9d1fb177
DJ
169822005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16983
16984 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16985 (arm_breakpoint_at): Recognize both breakpoints.
16986 (the_low_target): Use the correct breakpoint instruction.
16987
011a70c2
DJ
169882005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16989
16990 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16991 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16992 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16993 (the_low_target): Update.
16994
7fb85e41
AS
169952005-10-25 Andreas Schwab <schwab@suse.de>
16996
16997 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16998
16999 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17000 (ia64_num_regs): Reduce to 462.
17001
3db0444b
DJ
170022005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17003
17004 * acinclude.m4: Correct quoting.
17005 * aclocal.m4: Regenerated.
17006
17007 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17008 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17009 (thread_db_init): Call thread_db_err_str.
17010 * configure.ac: Check for TD_VERSION.
17011 * config.in, configure: Regenerated.
17012
bee0189a
DJ
170132005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17014
17015 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17016
e9d25b98
DJ
170172005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17018
17019 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17020 is not available. Define HAVE_PTRACE_GETREGS if it is.
17021 * config.in, configure: Regenerated.
17022 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17023 * linux-i386-low.c, linux-m68k-low.c: Update to use
17024 HAVE_PTRACE_GETREGS.
17025 * linux-low.c (regsets_fetch_inferior_registers)
17026 (regsets_store_inferior_registers): Only return 0 if we processed
17027 GENERAL_REGS.
17028 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17029 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17030
a06660f7
DJ
170312005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17032
17033 * inferiors.c (struct thread_info): Add gdb_id.
17034 (add_thread): Add gdb_id argument.
17035 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17036 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17037 calls to add_thread.
17038 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17039 * server.c (handle_query): Use thread_to_gdb_id.
17040 (handle_v_cont, main): Use gdb_id_to_thread_id.
17041 * server.h (add_thread): Update prototype.
17042 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17043 prototypes.
17044
5a1f5858
DJ
170452005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17046
17047 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17048 left-padded registers.
17049 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17050 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17051
e122f1f5
SE
170522005-07-01 Steve Ellcey <sje@cup.hp.com>
17053
17054 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17055 * configure: Regenerate.
17056 * config.in: Regenerate.
17057 * server.h (NEED_DECLARATION_STRERROR):
17058 Replace with !HAVE_DECL_STRERROR.
17059
d592fa2f
DJ
170602005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17061
17062 * linux-low.c (linux_wait, linux_send_signal): Don't test
17063 an unsigned long variable for > 0 if it could be MAX_ULONG.
17064 * server.c (myresume): Likewise.
17065 * target.c (set_desired_inferior): Likewise.
17066
ccbd4912
MK
170672005-06-13 Mark Kettenis <kettenis@gnu.org>
17068
17069 * configure.ac: Simplify and improve check for socklen_t.
17070 * configure, config.in: Regenerate.
17071
f450004a
DJ
170722005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17073
17074 * acconfig.h: Remove.
17075 * configure.ac: Add a test for socklen_t. Use three-argument
17076 AC_DEFINE throughout.
17077 * config.in: Regenerated using autoheader 2.59.
17078 * configure: Regenerated.
17079
17080 * gdbreplay.c (socklen_t): Provide a default.
17081 (remote_open): Use socklen_t.
17082 * remote-utils.c (socklen_t): Provide a default.
17083 (remote_open): Use socklen_t.
17084 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17085 unsigned char.
17086
17087 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17088 char for buffers.
17089 * linux-low.c (linux_read_memory, linux_write_memory)
17090 (linux_read_auxv): Likewise.
17091 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17092 (check_mem_write): Likewise.
17093 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17094 Likewise.
17095 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17096 (registers_from_string, register_data): Likewise.
17097 * server.c (handle_query, main): Likewise.
17098 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17099 (decode_M_packet): Likewise.
17100 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17101 * target.h (struct target_ops): Update read_memory, write_memory,
17102 and read_auxv.
17103 (read_inferior_memory, write_inferior_memory): Update.
17104 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17105 to unsigned char *.
17106 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17107 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17108 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17109 linux-s390-low.c, linux-sh-low.c: Update for changes in
17110 read_inferior_memory and the_low_target->breakpoint.
17111
eee84df1
DJ
171122005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17113
17114 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17115 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17116 * configure.srv: Add powerpc64-*-linux*.
17117 * linux-ppc64-low.c: New file.
17118
45b134e5
OF
171192005-05-23 Orjan Friberg <orjanf@axis.com>
17120
17121 * linux-cris-low.c: New file with support for CRIS.
17122 * linux-crisv32-low.c: Ditto for CRISv32.
17123 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17124 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17125 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17126 reg-crisv32.o, and reg-crisv32.c to make rules.
17127 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17128 recognized targets.
17129
48d93c75
UW
171302005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17131
17132 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17133 of sizeof (PTRACE_XFER_TYPE).
17134 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17135
e013ee27
OF
171362005-05-12 Orjan Friberg <orjanf@axis.com>
17137
889bf7c5 17138 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17139 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17140 pointers for hardware watchpoint support.
17141 * linux-low.h (struct linux_target_ops): Ditto.
17142 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17143 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17144 to linux_target_ops.
17145 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17146 reply packet.
17147 * server.c (main): Recognize 'Z' and 'z' packets.
17148
b0ded00b
UW
171492005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17150
17151 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17152 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17153 (the_low_target): Add new members.
17154
8643e2ad
DJ
171552005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17156
17157 * proc-service.c (ps_lgetregs): Search all_processes instead of
17158 all_threads.
17159
fc620387
DJ
171602005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17161
17162 * server.c (start_inferior): Change return type to int.
17163 (attach_inferior): Change sigptr to int *.
17164 (handle_v_cont, handle_v_requests): Change signal to int *.
17165 (main): Change signal to int.
17166
171672005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17168
17169 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17170 * configure.srv: Add m32r*-*-linux*.
17171 * linux-m32r-low.c: New file.
17172
e0e76420
DJ
171732005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17174
17175 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17176
a1928bad
DJ
171772005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17178
17179 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17180 Take unsigned long arguments for PIDs.
17181 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17182 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17183 (wait_for_sigstop, linux_resume_one_process)
17184 (regsets_fetch_inferior_registers, linux_send_signal)
17185 (linux_read_auxv): Likewise. Update the types of variables holding
17186 PIDs. Update format string specifiers.
17187 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17188 * remote-utils.c (prepare_resume_reply): Likewise.
17189 * server.c (cont_thread, general_thread, step_thread)
17190 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17191 unsigned long.
17192 (handle_query): Update format specifiers.
17193 (handle_v_cont, main): Use strtoul for thread IDs.
17194 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17195 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17196 (general_thread, step_thread, thread_from_wait)
17197 (old_thread_from_wait): Update.
17198 * target.h (struct thread_resume): Use unsigned long for THREAD.
17199 (struct target_ops): Use unsigned long for arguments to attach and
17200 thread_alive.
17201
dcdb98d2
DJ
172022005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17203
17204 * acinclude.m4: Include bfd/bfd.m4 directly.
17205 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17206 <agriffis@toolchain.org>.
17207 * aclocal.m4, configure: Regenerated.
17208
bec39cab
AC
172092005-01-07 Andrew Cagney <cagney@gnu.org>
17210
17211 * configure.ac: Rename configure.in, require autoconf 2.59.
17212 * configure: Re-generate.
17213
434c4c77
DJ
172142004-12-08 Daniel Jacobowitz <dan@debian.org>
17215
17216 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17217 LIBS when finished.
17218 * aclocal.m4: Regenerated.
17219 * configure: Regenerated.
17220
db1d3e1b
AS
172212004-11-21 Andreas Schwab <schwab@suse.de>
17222
17223 * linux-m68k-low.c (m68k_num_gregs): Define.
17224 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17225 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17226 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17227 (m68k_breakpoint_at): New. Add to the_low_target.
17228
17229 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17230 srv_linux_thread_db to yes.
17231
43360365
JB
172322004-10-20 Joel Brobecker <brobecker@gnat.com>
17233
17234 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17235 (ARCH_SET_FS): Likewise.
17236 (ARCH_GET_FS): Likewise.
17237 (ARCH_GET_GS): Likewise.
17238
fd500816
DJ
172392004-10-16 Daniel Jacobowitz <dan@debian.org>
17240
17241 * linux-i386-low.c (ps_get_thread_area): New.
17242 * linux-x86-64-low.c (ps_get_thread_area): New.
17243 * linux-low.c: Include <sys/syscall.h>.
17244 (linux_kill_one_process): Don't kill the first thread here.
17245 (linux_kill): Kill the first thread here.
17246 (kill_lwp): New function.
17247 (send_sigstop, linux_send_signal): Use it.
17248 * proc-service.c: Clean up #ifdefs.
17249 (fpregset_info): Delete.
17250 (ps_lgetregs): Update and enable implementation.
17251 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17252 implementations.
17253 * remote-utils.c (struct sym_cache, symbol_cache): New.
17254 (input_interrupt): Print a clearer message.
17255 (async_io_enabled): New variable.
17256 (enable_async_io, disable_async_io): Use it. Update comments.
17257 (look_up_one_symbol): Use the symbol cache.
17258 * thread-db.c (thread_db_look_up_symbols): New function.
17259 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17260
f6de3c42
DJ
172612004-10-16 Daniel Jacobowitz <dan@debian.org>
17262
17263 * configure.in: Test for -rdynamic.
17264 * configure: Regenerated.
17265 * Makefile (INTERNAL_LDFLAGS): New.
17266 (gdbserver, gdbreplay): Use it.
17267
2c0fc042
AC
172682004-09-02 Andrew Cagney <cagney@gnu.org>
17269
17270 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17271
075b3282
DJ
172722004-03-23 Daniel Jacobowitz <drow@mvista.com>
17273
17274 * linux-low.c (linux_wait): Clear all_processes list also.
17275
fa6a77dc
DJ
172762004-03-12 Daniel Jacobowitz <drow@mvista.com>
17277
17278 * linux-low.c: Include <errno.h>. Remove extern declaration of
17279 errno.
17280
6d782a97
DJ
172812004-03-12 Daniel Jacobowitz <drow@mvista.com>
17282
17283 * gdbreplay.c, server.h, utils.c: Update copyright years.
17284
3a7fb99b
DJ
172852004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17286
17287 * server.c (main): Print child status or termination signal from
17288 variable 'signal', not 'sig'.
17289
c3e735a6
DJ
172902004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17291
17292 * linux-low.c (linux_read_memory): Change return type to
17293 int. Check for and return error from ptrace().
17294 * target.c (read_inferior_memory): Change return type to int. Pass
17295 back return status from the_target->read_memory().
17296 * target.h (struct target_ops): Adapt *read_memory() prototype.
17297 Update comment.
17298 (read_inferior_memory): Adapt prototype.
17299 * server.c (main): Return an error packet if
17300 read_inferior_memory() returns an error.
17301
a59d1c82
DJ
173022004-03-04 Daniel Jacobowitz <drow@mvista.com>
17303
17304 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17305 Unify with other clean targets.
17306
dc3f8883
DJ
173072004-02-29 Daniel Jacobowitz <drow@mvista.com>
17308
17309 * server.c (handle_v_cont): Call set_desired_inferior.
17310
89a208da
DJ
173112004-02-29 Daniel Jacobowitz <drow@mvista.com>
17312
17313 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17314
62ea82f5
DJ
173152004-02-29 Daniel Jacobowitz <drow@mvista.com>
17316
17317 * linux-low.c (linux_wait): Unblock async I/O.
17318 (linux_resume): Block and enable async I/O.
17319 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17320 * server.h (block_async_io, unblock_async_io): Add prototypes.
17321
6910d122
DJ
173222004-02-29 Daniel Jacobowitz <drow@mvista.com>
17323
17324 * remote-utils.c (remote_open): Print a status notice after
17325 opening a TCP port.
17326 * server.c (attach_inferior): Print a status notice after
17327 attaching.
17328
173292004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17330
17331 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17332
c89dc5d4
DJ
173332004-02-26 Daniel Jacobowitz <drow@mvista.com>
17334
17335 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17336 error packet.
17337 * server.c, target.h: Update copyright years.
17338
4b8dad4a
RM
173392004-02-25 Roland McGrath <roland@redhat.com>
17340
17341 * target.h (struct target_ops): New member `read_auxv'.
17342 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17343 * linux-low.c (linux_read_auxv): New function.
17344 (linux_target_ops): Initialize `read_auxv' member to that.
17345
d7446758
JB
173462004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17347
17348 Committed by Jim Blandy <jimb@redhat.com>.
17349
17350 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17351 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17352 instead of GPR_SIZE to distiguish s390 and s390x targets.
17353
5544ad89
DJ
173542004-01-31 Daniel Jacobowitz <drow@mvista.com>
17355
17356 * linux-low.c: Update copyright year.
17357 (check_removed_breakpoint): Clear pending_is_breakpoint.
17358 (linux_set_resume_request, linux_queue_one_thread)
17359 (resume_status_pending_p): New functions.
17360 (linux_continue_one_thread): Use process->resume.
17361 (linux_resume): Only resume threads if there are no pending events.
17362 * linux-low.h (struct process_info): Add resume request
17363 pointer.
17364
2a68b70e
DJ
173652004-01-30 Daniel Jacobowitz <drow@mvista.com>
17366
17367 * regcache.c (new_register_cache): Clear the allocated register
17368 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17369
64386c31
DJ
173702003-10-13 Daniel Jacobowitz <drow@mvista.com>
17371
17372 * linux-low.c (linux_resume): Take a struct thread_resume *
17373 argument.
17374 (linux_wait): Update call.
17375 (resume_ptr): New static variable.
17376 (linux_continue_one_thread): Renamed from
17377 linux_continue_one_process. Use resume_ptr.
17378 (linux_resume): Use linux_continue_one_thread.
17379 * server.c (handle_v_cont, handle_v_requests): New functions.
17380 (myresume): New function.
17381 (main): Handle 'v' case.
17382 * target.h (struct thread_resume): New type.
17383 (struct target_ops): Change argument of "resume" to struct
17384 thread_resume *.
17385 (myresume): Delete macro.
17386
c938e9b0
L
173872003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17388
17389 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17390 (uninstall): Support DESTDIR.
17391
7f313d07
BC
17392Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17393
17394 * configure.srv: Add xscale*linux copy of arm*linux entry.
17395
3b2fc2ea
DJ
173962003-07-24 Daniel Jacobowitz <drow@mvista.com>
17397
17398 * linux-arm-low.c (arm_reinsert_addr): New function.
17399 (the_low_target): Add arm_reinsert_addr.
17400
1c0a559e
MK
174012003-07-08 Mark Kettenis <kettenis@gnu.org>
17402
17403 * mem-break.c: Remove whitespace at end of file.
17404
43d5792c
DJ
174052003-06-28 Daniel Jacobowitz <drow@mvista.com>
17406
17407 * configure.in: Check whether we need to prototype strerror.
17408 * server.h: Optionally prototype strerror.
17409 * gdbreplay.c (perror_with_name): Use strerror.
17410 * linux-low.c (linux_attach_lwp): Use strerror.
17411 * utils.c (perror_with_name): Use strerror.
17412 * config.in, configure: Regenerated.
17413
c8a86edf
DJ
174142003-06-28 Daniel Jacobowitz <drow@mvista.com>
17415
17416 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17417 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17418
73d37363
DJ
174192003-06-20 Daniel Jacobowitz <drow@mvista.com>
17420
17421 * Makefile.in (SFILES): Update.
17422 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17423 low-sun3.c: Remove files.
17424
6ad8ae5c
DJ
174252003-06-17 Daniel Jacobowitz <drow@mvista.com>
17426
17427 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17428 (linux_detach_one_process, linux_detach): New functions.
17429 (linux_target_ops): Add linux_detach.
17430 * server.c (main): Handle 'D' packet.
17431 * target.h (struct target_ops): Add "detach" member.
17432 (detach_inferior): Define.
17433
1581182a
MK
174342003-06-13 Mark Kettenis <kettenis@gnu.org>
17435
17436 From Kelley Cook <kelleycook@wideopenwest.com>:
17437 * configure.srv: Accept i[34567]86 variants.
17438
e5379b03
DJ
174392003-06-05 Daniel Jacobowitz <drow@mvista.com>
17440
17441 * linux-low.c (linux_wait_for_event): Correct comment typos.
17442 (linux_resume_one_process): Call check_removed_breakpoint.
17443 (linux_send_signal): New function.
17444 (linux_target_ops): Add linux_send_signal.
17445 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17446 of kill.
17447 * target.h (struct target_ops): Add send_signal.
17448
2ff29de4
JB
174492003-05-29 Jim Blandy <jimb@redhat.com>
17450
17451 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17452 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17453 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17454 away part of the register's value.
17455
254787d4
DJ
174562003-03-26 Daniel Jacobowitz <drow@mvista.com>
17457
17458 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17459 (linux_wait_for_event, linux_init_signals): Likewise.
17460
94e10508
DJ
174612003-03-17 Daniel Jacobowitz <drow@mvista.com>
17462
17463 * configure.in: Check for stdlib.h.
17464 * configure: Regenerated.
17465 * config.in: Regenerated.
17466
4c0711e0
DJ
174672003-01-04 Andreas Schwab <schwab@suse.de>
17468
17469 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17470
ef66e766
AC
174712003-01-02 Andrew Cagney <ac131313@redhat.com>
17472
17473 * Makefile.in: Remove obsolete code.
17474
a1358604
DJ
174752002-11-20 Daniel Jacobowitz <drow@mvista.com>
17476
17477 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17478 defined(PT_FPR0_HI).
17479
23ce3b1c
DJ
174802002-11-17 Stuart Hughes <seh@zee2.com>
17481
17482 * linux-arm-low.c (arm_num_regs): Increase.
17483 (arm_regmap): Include status register.
17484
174852002-11-17 Daniel Jacobowitz <drow@mvista.com>
17486
17487 * linux-low.c (register_addr): Remove incorrect -1 check.
17488
a9fa9f7d
DJ
174892002-08-29 Daniel Jacobowitz <drow@mvista.com>
17490
17491 * linux-low.c (linux_create_inferior): Call setpgid. Return
17492 the new PID.
17493 (unstopped_p, linux_signal_pid): Remove.
17494 (linux_target_ops): Remove linux_signal_pid.
17495 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17496 global instead of target method.
17497 * target.h (struct target_ops): Remove signal_pid. Update comment
17498 for create_inferior.
17499 * server.c (signal_pid): New variable.
17500 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17501 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17502 (attach_inferior): Set signal_pid.
17503
17574093
DJ
175042002-08-23 Daniel Jacobowitz <drow@mvista.com>
17505
17506 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17507
175082002-08-20 Jim Blandy <jimb@redhat.com>
17509
17510 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17511 default for this.
17512
175132002-08-01 Andrew Cagney <cagney@redhat.com>
17514
17515 * Makefile.in: Make chill references obsolete.
17516
175172002-07-24 Kevin Buettner <kevinb@redhat.com>
17518
17519 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17520 * configure: Regenerate.
17521 * config.in: Regenerate.
17522
175232002-07-09 David O'Brien <obrien@FreeBSD.org>
17524
17525 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17526 (perror_with_name, remote_close, remote_open, expect, play): Static.
17527
175282002-07-04 Michal Ludvig <mludvig@suse.cz>
17529
4b8dad4a 17530 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17531 byte offsets instead of an array of indexes.
17532 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17533
175342002-06-13 Daniel Jacobowitz <drow@mvista.com>
17535
17536 * regcache.c: Add comment.
17537
175382002-06-11 Daniel Jacobowitz <drow@mvista.com>
17539
17540 * thread-db.c: New file.
17541 * proc-service.c: New file.
17542 * acinclude.m4: New file.
17543 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17544 proc-service.o, and thread-db.o.
17545 (linux-low.o): Add USE_THREAD_DB.
17546 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17547 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17548 * aclocal.m4: Regenerated.
17549 * config.in: Regenerated.
17550 * configure: Regenerated.
17551 * configure.in: Check for proc_service.h, sys/procfs.h,
17552 thread_db.h, and linux/elf.h headrs.
17553 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17554 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17555 Check for -lthread_db and thread support.
17556 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17557 PowerPC, and SuperH.
17558 * i387-fp.c: Constify arguments.
17559 * i387-fp.h: Likewise.
17560 * inferiors.c: (struct thread_info): Renamed from
17561 `struct inferior_info'. Remove PID member. Use generic inferior
17562 list header. All uses updated.
17563 (inferiors, signal_pid): Removed.
17564 (all_threads): New variable.
17565 (get_thread): Define.
17566 (add_inferior_to_list): New function.
17567 (for_each_inferior): New function.
17568 (change_inferior_id): New function.
17569 (add_inferior): Removed.
17570 (remove_inferior): New function.
17571 (add_thread): New function.
17572 (free_one_thread): New function.
17573 (remove_thread): New function.
17574 (clear_inferiors): Use for_each_inferior and free_one_thread.
17575 (find_inferior): New function.
17576 (find_inferior_id): New function.
17577 (inferior_target_data): Update argument type.
17578 (set_inferior_target_data): Likewise.
17579 (inferior_regcache_data): Likewise.
17580 (set_inferior_regcache_data): Likewise.
17581 * linux-low.c (linux_bp_reinsert): Remove.
17582 (all_processes, stopping_threads, using_thrads)
17583 (struct pending_signals, debug_threads, pid_of): New.
17584 (inferior_pid): Replace with macro.
17585 (struct inferior_linux_data): Remove.
17586 (get_stop_pc, add_process): New functions.
17587 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17588 Use add_process and add_thread.
17589 (linux_attach_lwp): New function, based on old linux_attach. Use
17590 add_process and add_thread. Set stop_expected for new threads.
17591 (linux_attach): New function.
17592 (linux_kill_one_process): New function.
17593 (linux_kill): Kill all LWPs.
17594 (linux_thread_alive): Use find_inferior_id.
17595 (check_removed_breakpoints, status_pending_p): New functions.
17596 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17597 Update. Use WNOHANG. Wait for cloned processes also. Update process
17598 struct for the found process.
17599 (linux_wait_for_event): New function.
17600 (linux_wait): Use it. Support LWPs.
17601 (send_sigstop, wait_for_sigstop, stop_all_processes)
17602 (linux_resume_one_process, linux_continue_one_process): New functions.
17603 (linux_resume): Support LWPs.
17604 (REGISTER_RAW_SIZE): Remove.
17605 (fetch_register): Use register_size instead. Call supply_register.
17606 (usr_store_inferior_registers): Likewise. Call collect_register.
17607 Fix recursive case.
17608 (regsets_fetch_inferior_registers): Improve error message.
17609 (regsets_store_inferior_registers): Add debugging.
17610 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17611 (unstopped_p, linux_signal_pid): New functions.
17612 (linux_target_ops): Add linux_signal_pid.
17613 (linux_init_signals): New function.
17614 (initialize_low): Call it. Initialize using_threads.
17615 * regcache.c (inferior_regcache_data): Add valid
17616 flag.
17617 (get_regcache): Fetch registers lazily. Add fetch argument
17618 and update all callers.
17619 (regcache_invalidate_one, regcache_invalidate): New
17620 functions.
17621 (new_register_cache): Renamed from create_register_cache.
17622 Return the new regcache.
17623 (free_register_cache): Change argument to a void *.
17624 (registers_to_string, registers_from_string): Call get_regcache
17625 with fetch flag set.
17626 (register_data): Make static. Pass fetch flag to get_regcache.
17627 (supply_register): Call get_regcache with fetch flag clear.
17628 (collect_register): Call get_regcache with fetch flag set.
17629 (collect_register_as_string): New function.
17630 * regcache.h: Update.
17631 * remote-utils.c (putpkt): Flush after debug output and use
17632 stderr.
17633 Handle input interrupts while waiting for an ACK.
17634 (input_interrupt): Use signal_pid method.
17635 (getpkt): Flush after debug output and use stderr.
17636 (outreg): Use collect_register_as_string.
17637 (new_thread_notify, dead_thread_notify): New functions.
17638 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17639 and general_thread.
17640 (look_up_one_symbol): Flush after debug output.
17641 * server.c (step_thread, server_waiting): New variables.
17642 (start_inferior): Don't use signal_pid. Update call to mywait.
17643 (attach_inferior): Update call to mywait.
17644 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17645 (main): Don't fetch/store registers explicitly. Use
17646 set_desired_inferior. Support proposed ``Hs'' packet. Update
17647 calls to mywait.
17648 * server.h: Update.
17649 (struct inferior_list, struct_inferior_list_entry): New.
17650 * target.c (set_desired_inferior): New.
17651 (write_inferior_memory): Constify.
17652 (mywait): New function.
17653 * target.h: Update.
17654 (struct target_ops): New signal_pid method.
17655 (mywait): Removed macro, added prototype.
17656
17657 * linux-low.h (regset_func): Removed.
17658 (regset_fill_func, regset_store_func): New.
17659 (enum regset_type): New.
17660 (struct regset_info): Add type field. Use new operation types.
17661 (struct linux_target_ops): stop_pc renamed to get_pc.
17662 Add decr_pc_after_break and breakpoint_at.
17663 (get_process, get_thread_proess, get_process_thread)
17664 (strut process_info, all_processes, linux_attach_lwp)
17665 (thread_db_init): New.
17666
17667 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17668 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17669 (the_low_target): Add new members.
17670 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17671 (i386_store_fpxregset): Constify.
17672 (target_regsets): Add new kind identifier.
17673 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17674 (i386_set_pc): Add debugging.
17675 (i386_breakpoint_at): New function.
17676 (the_low_target): Add new members.
17677 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17678 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17679 (mips_breakpoint_at): New.
17680 (the_low_target): Add new members.
17681 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17682 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17683 (the_low_target): Add new members.
17684 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17685 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17686 (the_low_target): Add new members.
17687 * linux-x86-64-low.c (target_regsets): Add new kind
17688 identifier.
17689
176902002-05-15 Daniel Jacobowitz <drow@mvista.com>
17691
17692 From Martin Pool <mbp@samba.org>:
17693 * server.c (gdbserver_usage): New function.
17694 (main): Call it.
17695
176962002-05-14 Daniel Jacobowitz <drow@mvista.com>
17697
17698 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17699 stop_at -> stop_pc.
17700
177012002-05-04 Andrew Cagney <ac131313@redhat.com>
17702
17703 * Makefile.in: Remove obsolete code.
17704
177052002-04-24 Michal Ludvig <mludvig@suse.cz>
17706
17707 * linux-low.c (regsets_fetch_inferior_registers),
17708 (regsets_store_inferior_registers): Removed cast to int from
17709 ptrace() calls.
17710 * regcache.h: Added declaration of struct inferior_info.
17711
177122002-04-20 Daniel Jacobowitz <drow@mvista.com>
17713
17714 * inferiors.c (struct inferior_info): Add regcache_data.
17715 (add_inferior): Call create_register_cache.
17716 (clear_inferiors): Call free_register_cache.
17717 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17718 * regcache.c (struct inferior_regcache_data): New.
17719 (registers): Remove.
17720 (get_regcache): New function.
17721 (create_register_cache, free_register_cache): New functions.
17722 (set_register_cache): Don't initialize the register cache here.
17723 (registers_to_string, registers_from_string, register_data): Call
17724 get_regcache.
17725 * regcache.h: Add prototypes.
17726 * server.h: Likewise.
17727
177282002-04-20 Daniel Jacobowitz <drow@mvista.com>
17729
17730 * mem-break.c: New file.
17731 * mem-break.h: New file.
17732 * Makefile.in: Add mem-break.o rule; update server.h
17733 dependencies.
17734 * inferiors.c (struct inferior_info): Add target_data
17735 member.
17736 (clear_inferiors): Free target_data member if set.
17737 (inferior_target_data, set_inferior_target_data): New functions.
17738 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17739 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17740 * linux-low.c (linux_bp_reinsert): New variable.
17741 (struct inferior_linux_data): New.
17742 (linux_create_inferior): Use set_inferior_target_data.
17743 (linux_attach): Likewise. Call add_inferior.
17744 (linux_wait_for_one_inferior): New function.
17745 (linux_wait): Call it.
17746 (linux_write_memory): Add const.
17747 (initialize_low): Call set_breakpoint_data.
17748 * linux-low.h (struct linux_target_ops): Add breakpoint
17749 handling members.
17750 * server.c (attach_inferior): Remove extra add_inferior
17751 call.
17752 * server.h: Include mem-break.h. Update inferior.c
17753 prototypes.
17754 * target.c (read_inferior_memory)
17755 (write_inferior_memory): New functions.
17756 * target.h (read_inferior_memory)
17757 (write_inferior_memory): Change macros to prototypes.
17758 (struct target_ops): Update comments. Add const to write_memory
17759 definition.
17760
177612002-04-11 Daniel Jacobowitz <drow@mvista.com>
17762
17763 * linux-low.c (usr_store_inferior_registers): Support
17764 registers which are allowed to fail to store.
17765 * linux-low.h (linux_target_ops): Likewise.
17766 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17767 (ppc_cannot_store_register): FPSCR may not be storable.
17768
177692002-04-09 Daniel Jacobowitz <drow@mvista.com>
17770
17771 * server.h: Include <string.h> if HAVE_STRING_H.
17772 * ChangeLog: Correct paths in last ChangeLog entry.
17773
177742002-04-09 Daniel Jacobowitz <drow@mvista.com>
17775
17776 * linux-low.h: Remove obsolete prototypes.
17777 (struct linux_target_ops): New.
17778 (extern the_low_target): New.
17779 * linux-low.c (num_regs, regmap): Remove declarations.
17780 (register_addr): Use the_low_target explicitly.
17781 (fetch_register): Likewise.
17782 (usr_fetch_inferior_registers): Likewise.
17783 (usr_store_inferior_registers): Likewise.
17784 * linux-arm-low.c (num_regs): Remove.
17785 (arm_num_regs): Define.
17786 (arm_regmap): Renamed from regmap, made static.
17787 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17788 made static.
17789 (arm_cannot_store_register): Renamed from cannot_store_register,
17790 made static.
17791 (the_low_target): New.
17792 * linux-i386-low.c (num_regs): Remove.
17793 (i386_num_regs): Define.
17794 (i386_regmap): Renamed from regmap, made static.
17795 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17796 made static.
17797 (i386_cannot_store_register): Renamed from cannot_store_register,
17798 made static.
17799 (the_low_target): New.
17800 * linux-ia64-low.c (num_regs): Remove.
17801 (ia64_num_regs): Define.
17802 (ia64_regmap): Renamed from regmap, made static.
17803 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17804 made static.
17805 (ia64_cannot_store_register): Renamed from cannot_store_register,
17806 made static.
17807 (the_low_target): New.
17808 * linux-m68k-low.c (num_regs): Remove.
17809 (m68k_num_regs): Define.
17810 (m68k_regmap): Renamed from regmap, made static.
17811 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17812 made static.
17813 (m68k_cannot_store_register): Renamed from cannot_store_register,
17814 made static.
17815 (the_low_target): New.
17816 * linux-mips-low.c (num_regs): Remove.
17817 (mips_num_regs): Define.
17818 (mips_regmap): Renamed from regmap, made static.
17819 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17820 made static.
17821 (mips_cannot_store_register): Renamed from cannot_store_register,
17822 made static.
17823 (the_low_target): New.
17824 * linux-ppc-low.c (num_regs): Remove.
17825 (ppc_num_regs): Define.
17826 (ppc_regmap): Renamed from regmap, made static.
17827 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17828 made static.
17829 (ppc_cannot_store_register): Renamed from cannot_store_register,
17830 made static.
17831 (the_low_target): New.
17832 * linux-s390-low.c (num_regs): Remove.
17833 (s390_num_regs): Define.
17834 (s390_regmap): Renamed from regmap, made static.
17835 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17836 made static.
17837 (s390_cannot_store_register): Renamed from cannot_store_register,
17838 made static.
17839 (the_low_target): New.
17840 * linux-sh-low.c (num_regs): Remove.
17841 (sh_num_regs): Define.
17842 (sh_regmap): Renamed from regmap, made static.
17843 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17844 made static.
17845 (sh_cannot_store_register): Renamed from cannot_store_register,
17846 made static.
17847 (the_low_target): New.
17848 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17849 (the_low_target): New.
17850
178512002-04-09 Daniel Jacobowitz <drow@mvista.com>
17852
17853 * Makefile.in: Add stamp-h target.
17854 * configure.in: Create stamp-h.
17855 * configure: Regenerated.
17856
178572002-04-09 Daniel Jacobowitz <drow@mvista.com>
17858
17859 * inferiors.c: New file.
17860 * target.c: New file.
17861 * target.h: New file.
17862 * Makefile.in: Add target.o and inferiors.o. Update
17863 dependencies.
17864 * linux-low.c (inferior_pid): New static variable,
17865 moved from server.c.
17866 (linux_create_inferior): Renamed from create_inferior.
17867 Call add_inferior. Return 0 on success instead of a PID.
17868 (linux_attach): Renamed from myattach.
17869 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17870 (linux_thread_alive): Renamed from mythread_alive.
17871 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17872 child dies.
17873 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17874 (regsets_store_inferior_registers): Correct error message.
17875 Add missing ``return 0''.
17876 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17877 (linux_store_registers): Renamed from store_inferior_registers.
17878 (linux_read_memory): Renamed from read_inferior_memory.
17879 (linux_write_memory): Renamed from write_inferior_memory.
17880 (linux_target_ops): New structure.
17881 (initialize_low): Call set_target_ops ().
17882 * remote-utils.c (unhexify): New function.
17883 (hexify): New function.
17884 (input_interrupt): Send signals to ``signal_pid''.
17885 * server.c (inferior_pid): Remove.
17886 (start_inferior): Update create_inferior call.
17887 (attach_inferior): Call add_inferior.
17888 (handle_query): New function.
17889 (main): Call handle_query for `q' packets.
17890 * server.h: Include "target.h". Remove obsolete prototypes.
17891 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17892
178932002-04-09 Daniel Jacobowitz <drow@mvista.com>
17894
17895 * Makefile.in: Add WARN_CFLAGS. Update configury
17896 dependencies.
17897 * configure.in: Check for <string.h>
17898 * configure: Regenerate.
17899 * config.in: Regenerate.
17900 * gdbreplay.c: Include needed system headers.
17901 (remote_open): Remove strchr prototype.
17902 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17903 * regcache.c (supply_register): Change buf argument to const void *.
17904 (supply_register_by_name): Likewise.
17905 (collect_register): Change buf argument to void *.
17906 (collect_register_by_name): Likewise.
17907 * regcache.h: Add missing prototypes.
17908 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17909 * server.c (handle_query): New function.
17910 (attached): New static variable, moved out of main.
17911 (main): Quiet longjmp clobber warnings.
17912 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17913 * utils.c (error): Remove NORETURN.
17914 (fatal): Likewise.
This page took 2.670494 seconds and 4 git commands to generate.