]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdb: add declaration to Python init function
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4025fa09
SM
12020-01-13 Simon Marchi <simon.marchi@efficios.com>
2
3 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4 prerequisite.
5
c0b0a142
SM
62020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
7
8 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
9 * linux-arm-tdesc.h: Include arch/arm.h.
10
bb1183e2
SM
112020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
12
13 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
14
f5df0b5f
SM
152020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
16
17 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
18 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
19
5b6d1e4f
PA
202020-01-10 Pedro Alves <palves@redhat.com>
21
22 * fork-child.c (post_fork_inferior): Pass target down to
23 startup_inferior.
24 * inferiors.c (switch_to_thread): Add process_stratum_target
25 parameter.
26 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
27 * nto-low.c (nto_target_ops): Now a process_stratum_target.
28 * linux-low.c (linux_target_ops): Now a process_stratum_target.
29 * remote-utils.c (prepare_resume_reply): Pass the target to
30 switch_to_thread.
31 * target.c (the_target): Now a process_stratum_target.
32 (done_accessing_memory): Pass the target to switch_to_thread.
33 (set_target_ops): Ajust to use process_stratum_target.
34 * target.h (struct target_ops): Rename to ...
35 (struct process_stratum_target): ... this.
36 (the_target, set_target_ops): Adjust.
37 (prepare_to_access_memory): Adjust comment.
38 * win32-low.c (child_xfer_memory): Adjust to use
39 process_stratum_target.
40 (win32_target_ops): Now a process_stratum_target.
41
559e7e50
EZ
422020-01-06 Eli Zaretskii <eliz@gnu.org>
43 Pedro Alves <palves@redhat.com>
44
45 * win32-low.c (get_child_debug_event): Extract the fatal exception
46 from the exit status and convert to the equivalent Posix signal
47 number.
48 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
49 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
50
48189bec
HD
512020-01-01 Hannes Domani <ssbssa@yahoo.de>
52
53 * Makefile.in: Use INSTALL_PROGRAM_ENV.
54
5dd8bf88
JB
552020-01-01 Joel Brobecker <brobecker@adacore.com>
56
57 * server.c (gdbserver_version): Change copyright year to 2020.
58 * gdbreplay.c (gdbreplay_version): Likewise.
59
0ad6b8ee
CB
602019-12-19 Christian Biesinger <cbiesinger@google.com>
61
62 * configure: Regenerate.
63 * configure.ac: Quote variable arguments of test.
64
1ee7b812
BE
652019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
66
67 * Makefile.in: Fix build with GNU Make 3.81
68
d9fa87f4
TT
692019-12-16 Tom Tromey <tromey@adacore.com>
70
71 * server.c (get_exec_file): Constify result.
72
ab7d13f0
CB
732019-12-10 Christian Biesinger <cbiesinger@google.com>
74
75 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
76 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
77 * config.in: Regenerate.
78 * configure: Regenerate.
79 * configure.ac: Don't check for strerror.
80 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
81 Call safe_strerror instead of strerror.
82 * server.h (strerror): Remove this now-unnecessary declaration.
83 * tracepoint.c (init_named_socket): Call safe_strerror instead of
84 strerror.
85 (gdb_agent_helper_thread): Likewise.
86 * utils.c (perror_with_name): Likewise.
87
4da8c3a8
TT
882019-11-26 Tom Tromey <tom@tromey.com>
89
90 * configure, config.in: Rebuild.
91
21987b9c
TT
922019-11-26 Tom Tromey <tom@tromey.com>
93
94 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
95 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
96 gdb_sigmask.
97 * configure, config.in: Rebuild.
98
5e030278
TT
992019-11-26 Tom Tromey <tom@tromey.com>
100
101 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
102 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
103 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
104 * acinclude.m4: Include ax_pthread.m4.
105 * config.in, configure: Rebuild.
106
6d91ce9a
CB
1072019-11-26 Christian Biesinger <cbiesinger@google.com>
108
109 * debug.c (debug_set_output): Call safe_strerror instead of
110 strerror.
111 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
112 (linux_kill_one_lwp): Likewise.
113 (linux_detach_one_lwp): Likewise.
114 (linux_wait_for_event_filtered): Likewise.
115 (store_register): Likewise.
116 * lynx-low.c (lynx_attach): Likewise.
117 * mem-break.c (insert_memory_breakpoint): Likewise.
118 (remove_memory_breakpoint): Likewise.
119 (delete_fast_tracepoint_jump): Likewise.
120 (set_fast_tracepoint_jump): Likewise.
121 (uninsert_fast_tracepoint_jumps_at): Likewise.
122 (reinsert_fast_tracepoint_jumps_at): Likewise.
123 * nto-low.c (nto_xfer_memory): Likewise.
124 (nto_resume): Likewise.
125
6cdd651f
LM
1262019-11-20 Luis Machado <luis.machado@linaro.org>
127
128 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
129 instead of register count.
130 * tdesc.c (tdesc_contains_feature): New function.
131 * tdesc.h (tdesc_contains_feature): New prototype.
132
cd850b40
CB
1332019-11-15 Christian Biesinger <cbiesinger@google.com>
134
135 * Makefile.in: Add safe-strerror.c.
136 * configure: Regenerate.
137 * configure.ac: Don't source common.host.
138
5abebf3c
CB
1392019-11-15 Christian Biesinger <cbiesinger@google.com>
140
141 * config.in: Regenerate.
142 * configure: Regenerate.
143
e06f3d6e
AB
1442019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
145
146 * ax.c (ax_printf): Handle size_t_arg.
147
ca3a04f6
CB
1482019-11-06 Christian Biesinger <cbiesinger@google.com>
149
150 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
151 * mi/mi-main.c (output_cores): Likewise.
152 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
153 (linux_xfer_osdata_modules): Likewise.
154 * remote.c (register_remote_support_xml): Likewise.
155 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
156 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
157
e48f6033
CB
1582019-11-01 Christian Biesinger <cbiesinger@google.com>
159
160 * configure: Regenerate.
161 * configure.ac: Remove check for strerror_r.
162
e7e97a2e
CB
1632019-10-31 Christian Biesinger <cbiesinger@google.com>
164
165 * config.in: Regenerate.
166 * configure: Regenerate.
167 * configure.ac: Also check for strerror_r.
168
75cafaa6
CB
1692019-10-31 Christian Biesinger <cbiesinger@google.com>
170
171 * ax.h (debug_agent): Remove duplicate declaration.
172
30baf67b
TV
1732019-10-26 Tom de Vries <tdevries@suse.de>
174
175 * linux-aarch64-low.c: Fix typos in comments.
176 * linux-arm-low.c: Same.
177 * linux-low.c: Same.
178 * linux-ppc-low.c: Same.
179 * proc-service.c: Same.
180 * regcache.h: Same.
181 * server.c: Same.
182 * tracepoint.c: Same.
183 * win32-low.c: Same.
184
52c64cf7
TT
1852019-10-25 Tom Tromey <tromey@adacore.com>
186
187 * utils.c (xstrdup): Remove.
188
c12d372d
TT
1892019-10-23 Tom Tromey <tom@tromey.com>
190
191 * configure, config.in: Rebuild.
192
4d0b984b
TT
1932019-10-23 Tom Tromey <tom@tromey.com>
194
195 * configure: Rebuild.
196 * acinclude.m4: Use m4_include, not sinclude.
197
c5adaa19
TT
1982019-10-17 Tom Tromey <tromey@adacore.com>
199
200 * configure: Rebuild.
201 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
202 in AC_CONFIG_FILES invocation.
203 * Makefile.in (stamp-h, Makefile): Use new-style config.status
204 invocation.
205
fec4e896
CB
2062019-10-16 Christian Biesinger <cbiesinger@google.com>
207
208 * server.c: Include xml-builtin.h.
209 (get_xml_features): Don't declare xml_builtins here.
210
00975ff6
AB
2112019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
212
213 * Makefile.in: Remove references to vec-ipa.o.
214
0dc32745
AB
2152019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
216
217 * Makefile.in: Remove references to vec.c.
218
3e6ec53a
CB
2192019-10-02 Christian Biesinger <cbiesinger@google.com>
220
221 * server.c (server_waiting): Change to bool.
222 (extended_protocol): Likewise.
223 (response_needed): Likewise.
224 (exit_requested): Likewise.
225 (run_once): Likewise.
226 (report_no_resumed): Likewise.
227 (non_stop): Likewise.
228 (disable_packet_vCont): Likewise.
229 (disable_packet_Tthread): Likewise.
230 (disable_packet_qC): Likewise.
231 (disable_packet_qfThreadInfo): Likewise.
232 (handle_general_set): Update.
233 (handle_detach): Update.
234 (handle_monitor_command): Update.
235 (handle_query): Update.
236 (captured_main): Update.
237 (process_serial_event): Update.
238 * server.h (server_waiting): Change to bool.
239 (disable_packet_vCont): Likewise.
240 (disable_packet_Tthread): Likewise.
241 (disable_packet_qC): Likewise.
242 (disable_packet_qfThreadInfo): Likewise.
243 (run_once): Likewise.
244 (non_stop): Likewise.
245 * target.c (target_stop_and_wait): Update.
246
80fd2826
TT
2472019-10-02 Tom Tromey <tromey@adacore.com>
248
249 * Makefile.in (SFILES): Add common-inferior.c.
250 (OBS): Add common-inferior.o.
251 * server.c (startup_with_shell): Don't define.
252
46f29a9a
AB
2532019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
254
255 * linux-low.c (linux_low_read_btrace): Update for change to
256 std::vector.
257
f9d949fb
CB
2582019-09-20 Christian Biesinger <cbiesinger@google.com>
259
260 * debug.c (debug_threads): Remove comment in favor of the header.
261 * debug.h (using_threads): Add declaration.
262 (debug_threads): Add comment.
263 * linux-aarch64-low.c: Include debug.h and remove declaration of
264 debug_threads.
265 * nto-low.c: Likewise.
266 * remote-utils.c: Likewise.
267 * thread-db.c: Likewise.
268
abf516c6
UW
2692019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
270
271 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
272 and powerpc-cell64l-ipa.o.
273 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
274 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
275 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
276 (spu*-*-*): Remove.
277
278 * spu-low.c: Remove file.
279
280 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
281 (parse_spufs_run): Remove.
282 (ppc_get_pc): Remove Cell/B.E. support.
283 (ppc_set_pc): Likewise.
284 (ppc_breakpoint_at): Likewise.
285 (ppc_arch_setup): Likewise.
286 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
287 tdesc_powerpc_cell32l.
288 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
289 or init_registers_powerpc_cell32l.
290 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
291 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
292 or init_registers_powerpc_cell32l.
293 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
294 (init_registers_powerpc_cell32l): Remove prototype.
295 (init_registers_powerpc_cell64l): Likewise.
296
297 * target.h (struct target_ops): Remove qxfer_spu member.
298 * server.c (handle_qxfer_spu): Remove.
299 (qxfer_packets): Remove entry for "spu".
300 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
301 * linux-low.c (SPUFS_MAGIC): Remove.
302 (spu_enumerate_spu_ids): Remove.
303 (linux_qxfer_spu): Remove.
304 (linux_target_ops): Remove qxfer_spu member.
305 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
306 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
307 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
308
2d41fa11
SDJ
3092019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
310
311 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
312 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
313 * config.in: Regenerate.
314 * configure: Regenerate.
315
d59b55f0
TT
3162019-08-15 Tom Tromey <tromey@adacore.com>
317
318 * target.c (target_write_memory): Use gdb::byte_vector.
319
4196ab2a
TT
3202019-08-15 Tom Tromey <tromey@adacore.com>
321
322 * tracepoint.c (write_inferior_data_pointer)
323 (write_inferior_integer, write_inferior_int8)
324 (write_inferior_uinteger, m_tracepoint_action_download)
325 (r_tracepoint_action_download, x_tracepoint_action_download)
326 (l_tracepoint_action_download, clear_inferior_trace_buffer)
327 (download_agent_expr, download_tracepoint_1)
328 (download_trace_state_variables, upload_fast_traceframes): Update.
329 * server.c (gdb_write_memory): Update.
330 * remote-utils.c (relocate_instruction): Update.
331 * proc-service.c (ps_pdwrite): Update.
332 * mem-break.c (remove_memory_breakpoint)
333 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
334 (uninsert_fast_tracepoint_jumps_at)
335 (reinsert_fast_tracepoint_jumps_at): Update.
336 * linux-x86-low.c (append_insns)
337 (i386_install_fast_tracepoint_jump_pad)
338 (amd64_write_goto_address, i386_write_goto_address): Update.
339 * linux-s390-low.c (append_insns, s390_write_goto_address):
340 Update.
341 * linux-ppc-low.c (ppc_relocate_instruction)
342 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
343 (ppc_write_goto_address): Update.
344 * linux-aarch64-low.c (append_insns): Update.
345 * target.h (struct target_ops): Update.
346 (write_inferior_memory): Don't declare.
347 * target.c (target_write_memory): Rename from
348 write_inferior_memory. Remove old target_write_memory.
349
c6778d00
TT
3502019-08-15 Tom Tromey <tromey@adacore.com>
351
352 * target.c (write_inferior_memory): Use std::vector.
353
404f2902
FCE
3542019-08-06 Frank Ch. Eigler <fche@redhat.com>
355
356 PR build/24886
357 * configure.ac: Drop enable-libmcheck support.
358 * configure, config.in: Rebuild.
359 * acinclude.m4: Don't include it.
360
4c5aa8e0
AH
3612019-07-19 Alan Hayward <alan.hayward@arm.com>
362
363 * configure.srv: Remove Arm xml files.
364
7cc17433
AH
3652019-07-19 Alan Hayward <alan.hayward@arm.com>
366
367 * configure.srv: Add new files. Remove xml generated files.
368 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
369 registers.
370 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
371 * linux-aarch32-tdesc.c: New file.
372 * linux-aarch32-tdesc.h: New file.
373 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
374 * linux-arm-low.c (init_registers_arm, tdesc_arm)
375 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
376 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
377 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
378 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
379 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
380 (arm_read_description): Call arm_linux_read_description.
381 (initialize_low_arch): Don't init registers.
382 * linux-arm-tdesc.c: New file.
383 * linux-arm-tdesc.h: New file.
384
166a82be
AH
3852019-07-10 Alan Hayward <alan.hayward@arm.com>
386
387 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
388 Move counter inside for.
389 (arm_read_description): Check ptrace earlier.
390 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
391
268a13a5
TT
3922019-07-09 Tom Tromey <tom@tromey.com>
393
394 * configure: Rebuild.
395 * configure.ac: Change common to gdbsupport.
396 * acinclude.m4: Change common to gdbsupport.
397 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
398 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
399 common to gdbsupport.
400 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
401 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
402 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
403 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
404 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
405 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
406 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
407 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
408 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
409 common to gdbsupport.
410
350fab54
AH
4112019-07-04 Alan Hayward <alan.hayward@arm.com>
412
413 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
414 defines.
415 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
416
2b40fda7
AH
4172019-07-04 Alan Hayward <alan.hayward@arm.com>
418
419 * configure.srv: Remove legacy xml.
420 * linux-aarch64-low.c (initialize_low_arch): Remove
421 initialize_low_tdesc call.
422 * linux-aarch64-tdesc-selftest.c: Remove file.
423 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
424 * linux-x86-low.c (initialize_low_arch): Remove
425 initialize_low_tdesc call.
426 * linux-x86-tdesc-selftest.c: Remove file.
427 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
428
7d10623d
TV
4292019-06-20 Tom de Vries <tdevries@suse.de>
430
431 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
432 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
433
8d6a48df
TV
4342019-06-19 Tom de Vries <tdevries@suse.de>
435
436 * debug.h (debug_write): Change return type to ssize_t.
437 * debug.c (debug_write): Same.
438
73cc7272
TT
4392019-06-14 Tom Tromey <tom@tromey.com>
440
441 * configure.ac: Use new path to gnulib.
442 * configure: Rebuild.
443 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
444 to gnulib.
445
08f10e02
TT
4462019-06-11 Tom Tromey <tom@tromey.com>
447
448 * Makefile.in (SFILES): Add alloc.c.
449 (OBS): Add alloc.o.
450 (IPA_OBJS): Add alloc-ipa.o.
451 (alloc-ipa.o): New target.
452 (%.o: ../%.c): New pattern rule.
453
422186a9
TT
4542019-06-10 Tom Tromey <tromey@adacore.com>
455
456 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
457 end warning with a newline.
458 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
459 newline.
460 * thread-db.c (attach_thread): Don't end warning with a newline.
461 (thread_db_notice_clone): Likewise.
462 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
463 newline.
464 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
465 end warning with a newline.
466
b02f78f9
PA
4672019-06-04 Pedro Alves <palves@redhat.com>
468
469 * server.c (captured_main): Use make_unique_xstrdup.
470
88ed7edb
TT
4712019-06-02 Tom Tromey <tom@tromey.com>
472
473 * gdbreplay.c (fromhex): Remove.
474 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
475
33a6bc35
TT
4762019-05-29 Tom Tromey <tromey@adacore.com>
477
478 * configure: Rebuild.
479
e90a813d
KB
4802019-05-06 Kevin Buettner <kevinb@redhat.com>
481
482 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
483 sign extension code on 32-bit builds.
484
353ea2d1
EZ
4852019-05-03 Eli Zaretskii <eliz@gnu.org>
486
487 * remote-utils.c:
488 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
489
b494cdff
TT
4902019-04-19 Tom Tromey <tom@tromey.com>
491
492 * server.c (struct vstop_notif): Derive from notif_event.
493 <base>: Remove.
494 (queue_stop_reply): Update.
495 (remove_all_on_match_ptid): Change type. Rewrite.
496 (discard_queued_stop_replies): Rewrite.
497 (in_queued_stop_replies_ptid): Change type.
498 (in_queued_stop_replies): Rewrite.
499 (notif_stop): Update.
500 (queue_stop_reply_callback): Update.
501 (captured_main): Don't call initialize_notif.
502 (push_stop_notification): Update.
503 * notif.c (notif_write_event, handle_notif_ack)
504 (notif_event_enque, notif_push): Update.
505 (notif_event_xfree, initialize_notif): Remove.
506 * notif.h (struct notif_event): Include <list>, not
507 "common/queue.h".
508 (struct notif_server) <queue>: Now a std::list.
509 (notif_event_p): Remove typedef.
510 (initialize_notif): Don't declare.
511 (struct notif_event): Add virtual destructor.
512
a7e559cc
AH
5132019-04-17 Alan Hayward <alan.hayward@arm.com>
514
515 * ax.c (ax_vdebug): Call debug_printf.
516 * debug.c (debug_write): New function.
517 * debug.h (debug_write): New declaration.
518 * linux-low.c (sigchld_handler): Call debug_write.
519
aeb2e706
AH
5202019-04-17 Alan Hayward <alan.hayward@arm.com>
521
522 * debug.c (debug_set_output): New function.
523 (debug_vprintf): Send output to debug_file.
524 (debug_flush): Likewise.
525 * debug.h (debug_set_output): New declaration.
526 * server.c (handle_monitor_command): Add debug-file option.
527 (captured_main): Likewise.
528
c1bc0935
AH
5292019-04-17 Alan Hayward <alan.hayward@arm.com>
530
531 * debug.c (remote_debug): Add definition.
532 * debug.h (remote_debug): Add declaration.
533 * hostio.c (remote_debug): Remove declaration.
534 * remote-utils.c (struct ui_file): Likewise.
535 (remote_debug): Likewise.
536 * remote-utils.h (remote_debug): Likewise,
537 * server.c (remote_debug): Remove definition.
538
3f52fdbc
KB
5392019-04-10 Kevin Buettner <kevinb@redhat.com>
540
541 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
542 when using a 64-bit gdbserver.
543
b0319eaa
TT
5442019-04-09 Tom Tromey <tromey@adacore.com>
545
546 * linux-low.c (select_event_lwp): Use find_thread_in_random.
547
eedc3f4f
TT
5482019-04-08 Tom Tromey <tom@tromey.com>
549
550 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
551 throw.
552 (linux_resume_one_lwp): Likewise.
553
230d2906
TT
5542019-04-08 Tom Tromey <tom@tromey.com>
555
556 * gdbreplay.c: Update.
557 * linux-low.c: Update.
558 * server.c: Update.
559
a70b8144
TT
5602019-04-08 Tom Tromey <tom@tromey.com>
561
562 * server.c: Use C++ exception handling.
563 * linux-low.c: Use C++ exception handling.
564 * gdbreplay.c: Use C++ exception handling.
565
3d6e9d23
TT
5662019-04-08 Tom Tromey <tom@tromey.com>
567
568 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
569 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
570 (captured_main, main): Update.
571 * gdbreplay.c (main): Update.
572
0570503d
PFC
5732019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
574
575 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
576 value in argument pointer, return 1 if the entry is found and 0
577 otherwise. Move comment.
578 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
579 * linux-low.h (linux_get_auxv): Declare.
580 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
581
227a9e65
TT
5822019-04-05 Tom Tromey <tromey@adacore.com>
583
584 * server.c (gdbserver_usage): Use upper-case for metasyntactic
585 variables.
586
69f4c9cc
AH
5872019-03-28 Alan Hayward <alan.hayward@arm.com>
588
589 * linux-low.c (AT_HWCAP2): Add define if not already included.
590
974c89e0
AH
5912019-03-26 Alan Hayward <alan.hayward@arm.com>
592
593 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
594 (aarch64_arch_setup): Call linux_get_hwcap.
595 * linux-arm-low.c (arm_get_hwcap): Remove function.
596 (arm_read_description): Call linux_get_hwcap.
597 * linux-low.c (linux_get_auxv): New function.
598 (linux_get_hwcap): Likewise.
599 (linux_get_hwcap2): Likewise.
600 * linux-low.h (linux_get_hwcap): New declaration.
601 (linux_get_hwcap2): Likewise.
602 * linux-ppc-low.c (ppc_get_auxv): Remove function.
603 (ppc_arch_setup): Call linux_get_hwcap.
604 * linux-s390-low.c (s390_get_hwcap): Remove function.
605 (s390_arch_setup): Call linux_get_hwcap.
606
1ef53e6b
AH
6072019-03-22 Alan Hayward <alan.hayward@arm.com>
608 Jiong Wang <jiong.wang@arm.com>
609
610 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
611 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
612 to fail.
613 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
614
ee4fbcfa
AH
6152019-03-22 Alan Hayward <alan.hayward@arm.com>
616 Jiong Wang <jiong.wang@arm.com>
617
618 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
619 (aarch64_get_hwcap): New function.
620 (aarch64_arch_setup): Read APIA hwcap.
621
6dc0ebde
AH
6222019-03-22 Alan Hayward <alan.hayward@arm.com>
623 Jiong Wang <jiong.wang@arm.com>
624
625 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
626 (initialize_low_tracepoint): Likewise.
627 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
628 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
629 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
630 (aarch64_linux_read_description): Likewise.
631 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
632
1163a4b7
JB
6332019-03-12 John Baldwin <jhb@FreeBSD.org>
634
635 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
636 i386_create_target_description for 'segments' parameter.
637 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
638 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
639 * win32-i386-low.c (i386_arch_setup): Likewise.
640
d3a70e03
TT
6412019-03-12 Tom Tromey <tromey@adacore.com>
642
643 * linux-low.c (iterate_over_lwps): Update.
644
37991b4f
TT
6452019-03-06 Tom Tromey <tom@tromey.com>
646
647 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
648 (captured_main): Use SCOPE_EXIT.
649
45950eb6
SDJ
6502019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
651
652 * configure.srv: Use '$enable_unittest' instead of '$development'
653 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
654 case.
655
43ac54fc
TT
6562019-02-27 Tom Tromey <tromey@adacore.com>
657
658 * gdbreplay.c (logchar): Handle \r\n.
659
df0da8a2
AH
6602019-02-07 Alan Hayward <alan.hayward@arm.com>
661
662 * linux-low.c (linux_attach): Add process before lwp.
663 * server.c (attach_inferior): Check if already attached.
664
1a5c2598
TT
6652019-02-07 Tom Tromey <tom@tromey.com>
666
667 * x86-tdesc.h: Rename include guard.
668 * x86-low.h: Add include guard.
669 * wincecompat.h: Rename include guard.
670 * win32-low.h: Add include guard.
671 * utils.h: Rename include guard.
672 * tracepoint.h: Rename include guard.
673 * tdesc.h: Rename include guard.
674 * target.h: Rename include guard.
675 * server.h: Rename include guard.
676 * remote-utils.h: Rename include guard.
677 * regcache.h: Rename include guard.
678 * nto-low.h: Rename include guard.
679 * notif.h: Add include guard.
680 * mem-break.h: Rename include guard.
681 * lynx-low.h: Add include guard.
682 * linux-x86-tdesc.h: Add include guard.
683 * linux-s390-tdesc.h: Add include guard.
684 * linux-ppc-tdesc-init.h: Add include guard.
685 * linux-low.h: Add include guard.
686 * linux-aarch64-tdesc.h: Add include guard.
687 * linux-aarch32-low.h: Add include guard.
688 * inferiors.h: Rename include guard.
689 * i387-fp.h: Rename include guard.
690 * hostio.h: Rename include guard.
691 * gdbthread.h: Rename include guard.
692 * gdb_proc_service.h: Rename include guard.
693 * event-loop.h: Rename include guard.
694 * dll.h: Rename include guard.
695 * debug.h: Rename include guard.
696 * ax.h: Rename include guard.
697
956cc47c
SN
6982018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
699
700 PR gdb/23985
701 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
702 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
703
a0707f3c
TT
7042019-01-25 Tom Tromey <tom@tromey.com>
705
706 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
707
0747795c
TT
7082019-01-25 Tom Tromey <tom@tromey.com>
709
710 * win32-low.c: Fix common/ includes.
711 * win32-i386-low.c: Fix common/ includes.
712 * tracepoint.c: Fix common/ includes.
713 * thread-db.c: Fix common/ includes.
714 * target.h: Fix common/ includes.
715 * symbol.c: Fix common/ includes.
716 * spu-low.c: Fix common/ includes.
717 * server.h: Fix common/ includes.
718 * server.c: Fix common/ includes.
719 * remote-utils.c: Fix common/ includes.
720 * regcache.h: Fix common/ includes.
721 * regcache.c: Fix common/ includes.
722 * nto-x86-low.c: Fix common/ includes.
723 * notif.h: Fix common/ includes.
724 * mem-break.h: Fix common/ includes.
725 * lynx-low.c: Fix common/ includes.
726 * lynx-i386-low.c: Fix common/ includes.
727 * linux-x86-tdesc-selftest.c: Fix common/ includes.
728 * linux-x86-low.c: Fix common/ includes.
729 * linux-low.c: Fix common/ includes.
730 * inferiors.h: Fix common/ includes.
731 * i387-fp.c: Fix common/ includes.
732 * hostio.c: Fix common/ includes.
733 * hostio-errno.c: Fix common/ includes.
734 * gdbthread.h: Fix common/ includes.
735 * gdbreplay.c: Fix common/ includes.
736 * fork-child.c: Fix common/ includes.
737 * event-loop.c: Fix common/ includes.
738 * ax.c:
739 (enum gdb_agent_op): Fix common/ includes.
740
be6d4f74
TT
7412019-01-21 Tom Tromey <tom@tromey.com>
742
743 * tracepoint.c: Fix includes.
744 * remote-utils.c: Fix includes.
745 * linux-x86-low.c: Fix includes.
746
66d91b39
JB
7472019-01-01 Joel Brobecker <brobecker@adacore.com>
748
749 * gdbreplay.c (gdbreplay_version): Update copyright year in
750 version message.
751 * server.c (gdbserver_version): Likewise.
752
754e3168
AH
7532018-12-05 Alan Hayward <alan.hayward@arm.com>
754
755 * linux-low.c (add_lwp): Switch ordering.
756
d105de22
TT
7572018-11-29 Tom Tromey <tom@tromey.com>
758
759 * win32-low.c (win32_join): Take pid, not process.
760 * target.h (struct target_ops) <join>: Change argument type.
761 (join_inferior): Change argument name.
762 * spu-low.c (spu_join): Take pid, not process.
763 * server.c (handle_detach): Preserve pid before destroying
764 process.
765 * lynx-low.c (lynx_join): Take pid, not process.
766 * linux-low.c (linux_join): Take pid, not process.
767
50138245
AH
7682018-11-23 Alan Hayward <alan.hayward@arm.com>
769
770 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
771 (aarch64_cannot_fetch_register): Likewise.
772 (struct linux_target_ops): Update references.
773
64f57f3d
PFC
7742018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
775
776 * linux-ppc-low.c: Include nat/linux-ptrace.h.
777
8d619c01
EBM
7782018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
779
780 * configure.srv (ipa_ppc_linux_regobj): Add
781 powerpc-isa207-htm-vsx32l-ipa.o and
782 powerpc-isa207-htm-vsx64l-ipa.o.
783 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
784 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
785 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
786 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
787 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
788 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
789 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
790 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
791 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
792 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
793 (init_registers_powerpc_isa207_htm_vsx32l)
794 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
795 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
796 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
797 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
798 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
799 (ppc_store_tm_ctarregset): New functions.
800 (ppc_regsets): Add entries for HTM regsets.
801 (ppc_arch_setup): Set htm in features struct when needed. Set
802 sizes for the HTM regsets.
803 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
804 (initialize_low_arch): Call
805 init_registers_powerpc_isa207_htm_vsx32l and
806 init_registers_powerpc_isa207_htm_vsx64l.
807 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
808 PPC_TDESC_ISA207_HTM_VSX.
809 (initialize_low_tracepoint): Call
810 init_registers_powerpc_isa207_htm_vsx32l and
811 init_registers_powerpc_isa207_htm_vsx64l.
812
232bfb86
EBM
8132018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
814
815 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
816 rs6000/power-linux-pmu.xml to srv_xmlfiles.
817 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
818 (ppc_store_pmuregset): New functions.
819 (ppc_regsets): Add entries for ebb and pmu regsets.
820 (ppc_arch_setup): Set isa207 in features struct if the ebb and
821 pmu regsets are available. Set sizes for these regsets.
822
f2cf6173
EBM
8232018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
824
825 * configure.srv (ipa_ppc_linux_regobj): Add
826 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
827 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
828 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
829 rs6000/powerpc-isa207-vsx32l.xml, and
830 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
831 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
832 <PPC_TDESC_ISA207_VSX>: New enum value.
833 (init_registers_powerpc_isa207_vsx32l): Declare.
834 (init_registers_powerpc_isa207_vsx64l): Declare.
835 * linux-ppc-low.c (ppc_fill_tarregset): New function.
836 (ppc_store_tarregset): New function.
837 (ppc_regsets): Add entry for the TAR regset.
838 (ppc_arch_setup): Set isa207 in features struct when needed. Set
839 size for the TAR regsets.
840 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
841 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
842 and init_registers_powerpc_isa207_vsx64l.
843 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
844 (initialize_low_tracepoint): Call
845 init_registers_powerpc_isa207_vsx32l and
846 init_registers_powerpc_isa207_vsx64l.
847
7ca18ed6
EBM
8482018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
849 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
850
851 * configure.srv (ipa_ppc_linux_regobj): Add
852 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
853 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
854 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
855 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
856 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
857 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
858 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
859 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
860 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
861 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
862 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
863 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
864 (ppc_hwcap): Add comment.
865 (ppc_hwcap2): New global.
866 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
867 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
868 (ppc_regsets): Add entries for the DSCR and PPR regsets.
869 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
870 when needed. Set sizes for the the DSCR and PPR regsets.
871 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
872 (initialize_low_arch): Call
873 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
874 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
875 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
876 PPC_TDESC_ISA205_PPR_DSCR_VSX.
877 (initialize_low_tracepoint): Call
878 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
879 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
880
5c849b22
PFC
8812018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
882
883 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
884
8ecfd7bd
SDJ
8852018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
886 Simon Marchi <simark@simark.ca>
887
888 * acinclude.m4: Include "../selftest.m4".
889 * configure: Regenerate.
890 * configure.ac: Use "GDB_AC_SELFTEST".
891 * configure.srv: Use "$enable_unittests" instead of
892 "$development" when checking whether unit tests have been
893 enabled.
894 * server.c (captured_main): Update message informing that
895 selftests have been disabled.
896
96643e35
TT
8972018-10-04 Tom Tromey <tom@tromey.com>
898
899 * configure: Rebuild.
900
da4ae14a
TT
9012018-10-04 Tom Tromey <tom@tromey.com>
902
903 * server.c (handle_status): Rename inner "thread".
904 (process_serial_event): Declare "res" in 'm' case.
905 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
906 (iterate_over_lwps): Rename inner "thread".
907 (linux_qxfer_libraries_svr4): Rename inner "len".
908 * gdbthread.h (find_thread_in_random): Rename inner "thread".
909
7c619dbd
GB
9102018-10-01 Gary Benson <gbenson@redhat.com>
911
912 * gdb_proc_service.h: Moved common code to
913 common/gdb_proc_service.h.
914
3795e814
GB
9152018-10-01 Gary Benson <gbenson@redhat.com>
916
917 * gdb_proc_service.h: Synchronize comments and whitespace with
918 GDB's version of this file.
919
49b036f1
TT
9202018-09-25 Tom Tromey <tom@tromey.com>
921
922 * configure: Rebuild.
923 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
924
8ff03f0b
SM
9252018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
926
927 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
928 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
929 ($(IPA_LIB)): Sort IPA_OBJS.
930
a1cd91dc
SM
9312018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
932
933 * Makefile.in: Remove references to $(ADD_DEPS).
934
752312ba
TT
9352018-09-16 Tom Tromey <tom@tromey.com>
936
937 * remote-utils.c (remote_open): Use GNU style for metasyntactic
938 variables.
939 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
940 variables.
941
f1628857
TT
9422018-09-05 Tom Tromey <tom@tromey.com>
943
944 * configure: Rebuild.
945
ad202fcc
SM
9462018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
947
948 PR build/23399
949 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
950
d3d8724a
TT
9512018-08-27 Tom Tromey <tom@tromey.com>
952
953 PR build/23087:
954 * configure: Rebuild.
955
b4f183d2
TT
9562018-08-27 Tom Tromey <tom@tromey.com>
957
958 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
959 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
960 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
961 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
962 (s390x_emit_stack_adjust): Add casts to unsigned char.
963
4e2aa472
SM
9642018-08-22 Simon Marchi <simon.marchi@ericsson.com>
965
966 PR gdb/23374
967 PR gdb/23375
968 * server.h (struct client_state) <disable_randomization>:
969 Initialize to 1.
970
cf4088a9
SM
9712018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
972
973 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
974 variable.
975 (mips_supply_ptrace_register): Likewise.
976
a0de763e
TT
9772018-07-22 Tom Tromey <tom@tromey.com>
978
979 * configure: Rebuild.
980
b0a7723d
TT
9812018-07-22 Tom Tromey <tom@tromey.com>
982
983 * win32-low.c (win32_create_inferior): Remove unused variables.
984 * gdbreplay.c (remote_open): Remove unused variable.
985 * remote-utils.c (remote_prepare): Remove unused variable.
986 * x86-tdesc.h (X86_TDESC_H): Define.
987 (amd64_expedite_regs): Define conditionally.
988 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
989 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
990 * remote-utils.c (readchar): Remove unused variable.
991
a780ef4f
PA
9922018-07-13 Pedro Alves <palves@redhat.com>
993
994 * linux-low.c (linux_kill): Change parameter to process_info
995 pointer instead of pid. Adjust.
996 * lynx-low.c (lynx_kill): Likewise.
997 * nto-low.c (nto_kill): Likewise.
998 * spu-low.c (spu_kill): Likewise.
999 * win32-low.c (win32_kill): Likewise.
1000 * server.c (handle_v_kill, kill_inferior_callback)
1001 (detach_or_kill_for_exit): Adjust.
1002 * target.c (kill_inferior): Change parameter to process_info
1003 pointer instead of pid. Adjust.
1004 * target.h (struct target_ops) <kill>: Change parameter to
1005 process_info pointer instead of pid. Adjust all implementations
1006 and callers.
1007 (kill_inferior): Likewise.
1008
ef2ddb33
PA
10092018-07-13 Pedro Alves <palves@redhat.com>
1010
1011 * linux-low.c (linux_detach, linux_join): Change parameter to
1012 process_info pointer instead of pid. Adjust.
1013 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1014 * nto-low.c (nto_detach): Likewise.
1015 * spu-low.c (spu_detach, spu_join): Likewise.
1016 * win32-low.c (win32_detach, win32_join): Likewise.
1017 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1018 * target.h (struct target_ops) <detach, join>: Change parameter to
1019 process_info pointer instead of pid. Adjust all implementations
1020 and callers.
1021 (detach_inferior, join_inferior): Rename 'pid' parameter to
1022 'proc'.
1023
c7ab0aef
SDJ
10242018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1025 Jan Kratochvil <jan.kratochvil@redhat.com>
1026 Paul Fertser <fercerpav@gmail.com>
1027 Tsutomu Seki <sekiriki@gmail.com>
1028
1029 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1030 (OBS): Add 'common/netstuff.o'.
1031 (GDBREPLAY_OBS): Likewise.
1032 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1033 (remote_open): Implement support for IPv6
1034 connections.
1035 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1036 and 'wspiapi.h'.
1037 (handle_accept_event): Accept connections from IPv6 sources.
1038 (remote_prepare): Handle IPv6-style hostnames; implement
1039 support for IPv6 connections.
1040 (remote_open): Implement support for printing connections from
1041 IPv6 sources.
1042
31445d10
PA
10432018-07-11 Pedro Alves <palves@redhat.com>
1044
1045 PR gdb/23377
1046 * mem-break.c (any_persistent_commands): Add process_info
1047 parameter and use it instead of relying on the current process.
1048 Change return type to bool.
1049 * mem-break.h (any_persistent_commands): Add process_info
1050 parameter and change return type to bool.
1051 * server.c (handle_detach): Remove require_running_or_return call.
1052 Look up the process_info for the process we're about to detach.
1053 If not found, return back error to GDB. Adjust
1054 any_persistent_commands call to pass down a process pointer.
1055
cb197132
PA
10562018-07-11 Pedro Alves <palves@redhat.com>
1057
1058 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1059 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1060 instead of collect_register_by_name.
1061 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1062 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1063
1b919490
VB
10642018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1065 Pedro Alves <palves@redhat.com>
1066
1067 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1068
d7e15655
TT
10692018-07-03 Tom Tromey <tom@tromey.com>
1070
1071 * linux-low.c: Update.
1072 * lynx-low.c: Update.
1073 * mem-break.c: Update.
1074 * nto-low.c: Update.
1075 * remote-utils.c: Update.
1076 * server.c: Update.
1077 * spu-low.c: Update.
1078 * target.c: Update.
1079 * win32-low.c: Update.
1080
26a57c92
TT
10812018-07-03 Tom Tromey <tom@tromey.com>
1082
1083 * server.c: Update.
1084
0e998d96
TT
10852018-07-03 Tom Tromey <tom@tromey.com>
1086
1087 * linux-low.c: Update.
1088
cc6bcb54
TT
10892018-07-03 Tom Tromey <tom@tromey.com>
1090
1091 * target.c: Update.
1092
e38504b3
TT
10932018-07-03 Tom Tromey <tom@tromey.com>
1094
1095 * linux-low.c: Update.
1096 * linux-mips-low.c: Update.
1097 * lynx-low.c: Update.
1098 * nto-low.c: Update.
1099 * remote-utils.c: Update.
1100 * server.c: Update.
1101 * spu-low.c: Update.
1102 * target.c: Update.
1103 * thread-db.c: Update.
1104
e99b03dc
TT
11052018-07-03 Tom Tromey <tom@tromey.com>
1106
1107 * linux-low.c: Update.
1108 * linux-mips-low.c: Update.
1109 * lynx-low.c: Update.
1110 * mem-break.c: Update.
1111 * nto-low.c: Update.
1112 * remote-utils.c: Update.
1113 * server.c: Update.
1114 * spu-low.c: Update.
1115 * target.c: Update.
1116 * tracepoint.c: Update.
1117
f2907e49
TT
11182018-07-03 Tom Tromey <tom@tromey.com>
1119
1120 * linux-low.c: Update.
1121 * linux-ppc-low.c: Update.
1122 * linux-x86-low.c: Update.
1123 * proc-service.c: Update.
1124 * server.c: Update.
1125 * spu-low.c: Update.
1126 * thread-db.c: Update.
1127 * win32-low.c: Update.
1128
fd79271b
TT
11292018-07-03 Tom Tromey <tom@tromey.com>
1130
1131 * linux-low.c: Update.
1132 * lynx-low.c: Update.
1133 * nto-low.c: Update.
1134 * remote-utils.c: Update.
1135 * spu-low.c: Update.
1136 * thread-db.c: Update.
1137 * win32-low.c: Update.
1138
c0867626
SDJ
11392018-06-29 Joel Brobecker <brobecker@adacore.com>
1140
1141 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1142 parameter in call to 'amd64_create_target_description'.
1143
2512d7ef
JK
11442018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1145
1146 * x86-tdesc.h: Remove executable permission flag.
1147
d0ac1c44
SM
11482018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1149
1150 * configure.ac: Remove AC_PREREQ, add missing quoting.
1151 * configure: Re-generate.
1152 * config.in: Re-generate.
1153 * aclocal.m4: Re-generate.
1154
c4eb05ff
SM
11552018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1156
1157 * tracepoint.h (current_traceframe): Remove declaration.
1158
02895270
AH
11592018-06-18 Alan Hayward <alan.hayward@arm.com>
1160
1161 * linux-aarch64-low.c (is_sve_tdesc): New function.
1162 (aarch64_sve_regs_copy_to_regcache): Likewise.
1163 (aarch64_sve_regs_copy_from_regcache): Likewise.
1164 (aarch64_regs_info): Add SVE checks.
1165 (initialize_low_arch): Initialize SVE.
1166
e9902bfc
AH
11672018-06-18 Alan Hayward <alan.hayward@arm.com>
1168
1169 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1170
fefa175e
AH
11712018-06-11 Alan Hayward <alan.hayward@arm.com>
1172
1173 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1174 (initialize_low_tracepoint): Likewise
1175 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1176 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1177 param.
1178 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1179 checks.
1180 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1181
b91ad3ff
AH
11822018-06-11 Alan Hayward <alan.hayward@arm.com>
1183
1184 * server.h (PBUFSIZ): Increase size
1185
f868386e
AH
11862018-06-11 Alan Hayward <alan.hayward@arm.com>
1187
1188 * regcache.c (regcache::raw_compare): New function.
1189 * regcache.h (regcache::raw_compare): New declaration.
1190
9c861883
AH
11912018-06-11 Alan Hayward <alan.hayward@arm.com>
1192
1193 * regcache.c (new_register_cache): Use new.
1194 (free_register_cache): Use delete.
1195 (register_data): Use const.
1196 (supply_register): Move body inside regcache.
1197 (regcache::raw_supply): New override function.
1198 (collect_register): Move body inside regcache.
1199 (regcache::raw_collect): New override function.
1200 (regcache::get_register_status): New override function.
1201 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1202
40591844
TT
12032018-06-09 Tom Tromey <tom@tromey.com>
1204
1205 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1206 declare queue.
1207 (event_queue): Use std::queue.
1208 (gdb_event_xfree): Remove.
1209 (initialize_event_loop, process_event, wait_for_event): Update.
1210
6341380d
SC
12112018-06-08 Stan Cox <scox@redhat.com>
1212
1213 * win32-low.c (win32_create_inferior): last_ptid and last_status
1214 moved to client_state.
1215
03349c93
PA
12162018-06-08 Pedro Alves <palves@redhat.com>
1217
1218 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1219 common/common-exceptions.o, common/common-utils.o,
1220 common/errors.o, common/print-utils.o and utils.o.
1221 * gdbreplay.c: Include "common-defs.h" instead of the two
1222 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1223 string.h or alloca.h.
1224 (perror_with_name): Delete.
1225 (remote_open): Use xstrdup instead of strdup.
1226 (main): Rename to ...
1227 (captured_main): ... this.
1228 (main): New.
1229
8dcc53b3
TT
12302018-06-08 Tom Tromey <tom@tromey.com>
1231
1232 * linux-low.c (linux_low_read_btrace): Update.
1233
c12a5089
SC
12342018-06-04 Stan Cox <scox@redhat.com>
1235
1236 * server.h (struct client_state): New.
1237 * server.c (cont_thread, general_thread, multi_process)
1238 (report_fork_events, report_vfork_events, report_exec_events)
1239 (report_thread_events, swbreak_feature, hwbreak_feature)
1240 (vCont_supported, disable_randomization, pass_signals)
1241 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1242 Moved to client_state.
1243 * remote-utils.c (remote_debug, noack_mode)
1244 (transport_is_reliable): Moved to client_state.
1245 * tracepoint.c (current_traceframe): Moved to client_state.
1246
1247 Update all callers.
1248 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1249 linux-low.c, remote-utils.h, target.c: Use client_state.
1250
122394f1
AH
12512018-05-31 Alan Hayward <alan.hayward@arm.com>
1252
1253 * configure.srv: Add new c/h file.
1254
95228a0d
AH
12552018-05-31 Alan Hayward <alan.hayward@arm.com>
1256
1257 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1258 null VQ.
1259
d8dab6c3
MR
12602018-05-25 Maciej W. Rozycki <macro@mips.com>
1261
1262 * gdb.arch/mips-fpregset-core.exp: New test.
1263 * gdb.arch/mips-fpregset-core.c: New test source.
1264
81e25b7c
EK
12652018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1266
1267 PR server/23198
1268 * hostio.c (require_int): Do not report overflow for integers
1269 between 0xfffffff and 0x7fffffff.
1270
7e947ad3
MR
12712018-05-22 Maciej W. Rozycki <macro@mips.com>
1272
1273 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1274 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1275 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1276 functions.
1277 (the_low_target): Wire them.
1278
1d75a658
PFC
12792018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1280
1281 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1282 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1283 mode. Call collect_register_by_name with vscr using
1284 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1285 (ppc_store_vrregset): Add and set vscr_offset variable as in
1286 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1287 vscr_offset.
1288
d078308a
PFC
12892018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1290
1291 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1292 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1293 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1294
7273b5fc
PFC
12952018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1296
1297 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1298 (ppc_store_vsxregset): Likewise.
1299 (ppc_fill_vrregset): Likewise.
1300 (ppc_store_vrregset): Likewise.
1301 (ppc_fill_evrregset): Likewise.
1302 (ppc_store_evrregset): Likewise.
1303 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1304 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1305 needed.
1306
2e077f5e
PFC
13072018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1308
1309 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1310 wordsize of the inferior. Call ppc_linux_target_wordsize.
1311
bd64614e
PFC
13122018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1313
1314 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1315 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1316 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1317 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1318 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1319 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1320 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1321 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1322 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1323 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1324 (tdesc_powerpc_e500l): Remove.
1325 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1326 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1327 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1328 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1329 linux-ppc-tdesc.h.
1330 (ppc_arch_setup): Remove target description matching code. Fill a
1331 ppc_linux_features struct and call ppc_linux_match_description
1332 with it.
1333
75d74cca
MR
13342018-05-22 Maciej W. Rozycki <macro@mips.com>
1335
1336 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1337 width of the requested register exceeds the width of the
1338 `ptrace' data type.
1339 (mips_cannot_store_register): Likewise.
1340
e4439e43
MR
13412018-05-21 Maciej W. Rozycki <macro@mips.com>
1342
1343 * linux-mips-low.c (mips_fetch_register): New function. Update
1344 preceding comment.
1345 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1346 (the_low_target): Wire `mips_fetch_register'.
1347
55271bf9
JB
13482018-05-10 Joel Brobecker <brobecker@adacore.com>
1349
1350 * lynx-i386-low.c (LYNXOS_178): New macro.
1351 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1352 the layout on LynxOS-178.
1353 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1354 handle floating point registers that are not supported by
1355 LynxOS-178.
1356
1a34f210
TT
13572018-05-10 Tom Tromey <tom@tromey.com>
1358
1359 * configure: Rebuild.
1360
190852c8
JB
13612018-05-10 Joel Brobecker <brobecker@adacore.com>
1362
1363 PR server/23158:
1364 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1365 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1366 Use it to set the expedite_regs field in the given tdesc.
1367 * x86-tdesc.h: New file.
1368 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1369 Adjust following the addition of the new expedite_regs parameter
1370 to init_target_desc.
1371 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1372 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1373 (i386_linux_read_description, amd64_linux_read_description):
1374 Adjust following the addition of the new expedite_regs parameter
1375 to init_target_desc.
1376 * lynx-i386-low.c: #include "x86-tdesc.h".
1377 (lynx_i386_arch_setup): Adjust following the addition of the new
1378 expedite_regs parameter to init_target_desc.
1379 * nto-x86-low.c: #include "x86-tdesc.h".
1380 (nto_x86_arch_setup): Adjust following the addition of the new
1381 expedite_regs parameter to init_target_desc.
1382 * win32-i386-low.c: #include "x86-tdesc.h".
1383 (i386_arch_setup): Adjust following the addition of the new
1384 expedite_regs parameter to init_target_desc.
1385
7dbac825
JB
13862018-05-10 Joel Brobecker <brobecker@adacore.com>
1387
1388 PR server/23158:
1389 * win32-low.c (win32_create_inferior): Add call to my_wait
1390 setting last_status global.
1391
906994d9
JB
13922018-05-10 Joel Brobecker <brobecker@adacore.com>
1393
1394 PR server/23158:
1395 * win32-low.c (create_process): Only call gdb_tilde_expand if
1396 inferior_cwd is not NULL.
1397
8ee22052
AB
13982018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1399
1400 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1401 registers to the cache if their values have changed.
1402 (i387_xsave_to_cache): Provide default values for x87 control
1403 registers when these features are available, but disabled.
1404 * regcache.c (supply_register_by_name_zeroed): New function.
1405 * regcache.h (supply_register_by_name_zeroed): Declare new
1406 function.
1407
aff689d3
TT
14082018-05-07 Tom Tromey <tom@tromey.com>
1409
1410 * configure: Rebuild.
1411
85e26832
TT
14122018-05-04 Tom Tromey <tom@tromey.com>
1413
1414 * configure: Rebuild.
1415
a3b60e45
JK
14162018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1417 Pedro Alves <palves@redhat.com>
1418
1419 * linux-aarch64-low.c (aarch64_stopped_data_address):
1420 Likewise.
1421
632e107b
TT
14222018-04-27 Tom Tromey <tom@tromey.com>
1423
1424 * configure: Rebuild.
1425
458412c3
TT
14262018-04-23 Tom Tromey <tom@tromey.com>
1427
1428 * configure: Rebuild.
1429
f31c089e
SM
14302018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1431
1432 * Makefile.in (depcomp): Add "..".
1433 (all_deps_files): New and use it.
1434
b319b098
AH
14352018-04-18 Alan Hayward <alan.hayward@arm.com>
1436
1437 * configure.srv (aarch64*-*-linux*): Don't include xml.
1438 (i[34567]86-*-cygwin*): Likewise.
1439 (i[34567]86-*-linux*): Likewise.
1440 (i[34567]86-*-lynxos*): Likewise.
1441 (i[34567]86-*-mingw32ce*): Likewise.
1442 (i[34567]86-*-mingw*): Likewise.
1443 (i[34567]86-*-nto*): Likewise.
1444 (tic6x-*-uclinux): Likewise.
1445 (x86_64-*-linux*): Likewise.
1446 (x86_64-*-mingw*): Likewise.
1447 (x86_64-*-cygwin*): Likewise.
1448
3b74854b
AH
14492018-04-18 Alan Hayward <alan.hayward@arm.com>
1450
1451 * tdesc.c: Remove xml parameter.
1452
e98577a9
AH
14532018-04-18 Alan Hayward <alan.hayward@arm.com>
1454
1455 * server.c (get_features_xml): Remove cast.
1456 * tdesc.c (void target_desc::accept): Fill in function.
1457 (tdesc_get_features_xml): Remove old xml creation.
1458 (print_xml_feature::visit_pre): Add xml vistor.
1459 * tdesc.h (struct target_desc): Make xmltarget mutable.
1460 (tdesc_get_features_xml): Remove declaration.
1461
d278f585
AH
14622018-04-18 Alan Hayward <alan.hayward@arm.com>
1463
1464 * tdesc.c (tdesc_architecture_name): Add new function.
1465 (tdesc_osabi_name): Likewise.
1466 (tdesc_get_features_xml): Use new functions.
1467
eee8a18d
AH
14682018-04-18 Alan Hayward <alan.hayward@arm.com>
1469
1470 * tdesc.c (tdesc_create_flags): Remove.
1471 (tdesc_add_flag): Likewise.
1472 (tdesc_named_type): Likewise.
1473 (tdesc_create_union): Likewise.
1474 (tdesc_create_struct): Likewise.
1475 (tdesc_create_vector): Likewise.
1476 (tdesc_add_bitfield): Likewise.
1477 (tdesc_add_field): Likewise.
1478 (tdesc_set_struct_size): Likewise.
1479
82ec9bc7
AH
14802018-04-18 Alan Hayward <alan.hayward@arm.com>
1481
1482 * tdesc.c (~target_desc): Remove implictly deleted items.
1483 (init_target_desc): Iterate all features.
1484 (tdesc_get_features_xml): Use vector.
1485 (tdesc_create_feature): Create feature.
1486 * tdesc.h (tdesc_feature) Remove
1487 (target_desc): Add features.
1488
ea3e7d71
AH
14892018-04-18 Alan Hayward <alan.hayward@arm.com>
1490
1491 * Makefile.in: Add common/tdesc.c
1492 * tdesc.c (init_target_desc): init all reg_defs from register
1493 vector.
1494 (tdesc_create_reg): Create tdesc_reg.
1495 * tdesc.h (tdesc_feature): Add register vector.
1496
17d08cd4
SM
14972018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1498
1499 * tdesc.h (struct target_desc) <features>: Change type to
1500 std::vector<std::string>.
1501 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1502 changes.
1503 (tdesc_get_features_xml): Likewise.
1504 (tdesc_create_feature): Likewise.
1505
5cd3e386
AH
15062018-03-26 Alan Hayward <alan.hayward@arm.com>
1507
1508 * regcache.c (find_register_by_number): Return a ref.
1509 (find_regno): Use references.
1510 (register_size): Likewise.
1511 (register_data): Likewise.
1512 * tdesc.c (target_desc::~target_desc): Remove free calls.
1513 (target_desc::operator==): Use std::vector compare.
1514 (init_target_desc): Use reference.
1515 (tdesc_create_reg): Use reg constructors.
1516 * tdesc.h (struct target_desc): Replace pointer with object.
1517
dff7492c
AH
15182018-03-23 Alan Hayward <alan.hayward@arm.com>
1519
1520 * regcache.c (find_register_by_number): Make static.
1521 (find_regno): Use find_register_by_number
1522 * regcache.h (struct reg): Remove declaration.
1523
d80e5242
AH
15242018-03-23 Alan Hayward <alan.hayward@arm.com>
1525
1526 * tdesc.c (target_desc::~target_desc): Move to here.
1527 (target_desc::operator==): Likewise.
1528 * tdesc.h (target_desc::~target_desc): Move from here.
1529 (target_desc::operator==): Likewise.
1530
f69c5afb
AA
15312018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1532
1533 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1534
ce29f843
AA
15352018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1536
1537 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1538 S390_TDESC_GS.
1539 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1540 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1541 and init_registers_s390_gs_linux64.
1542
c49bd90b
AA
15432018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1544
1545 * linux-s390-low.c (s390_fill_gs): Remove function.
1546 (s390_fill_gsbc): Remove function.
1547 (s390_regsets): Set fill functions for the guarded storage regsets
1548 to NULL.
1549
7edb9bd3
AA
15502018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1551
1552 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1553 the word size. Add comment.
1554 (s390_get_wordsize): New function.
1555 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1556 pswm with it. Instead, use s390_get_wordsize to determine the
1557 word size first and derive the correct tdesc from that directly.
1558
39be3c7e
SM
15592018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1560
1561 * Makefile.in: Include silent-rules.mk.
1562 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1563 (COMPILE): Add ECHO_CXX.
1564 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1565 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1566 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1567 (version-generated.c): Add ECHO_GEN.
1568 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1569 (IPAGENT_COMPILE): Add ECHO_CXX.
1570 (%-generated.c): Add ECHO_REGDAT.
1571
3ae9ce5d
TT
15722018-03-14 Tom Tromey <tom@tromey.com>
1573
1574 PR cli/14977:
1575 * ax.c (ax_printf): Special case for NULL.
1576
e6a58aa8
SM
15772018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1578
1579 * linux-low.c (linux_qxfer_libraries_svr4): Use
1580 xml_escape_text_append.
1581
f6e8a41e
SM
15822018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1583
1584 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1585
b9671caf
SM
15862018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1587
1588 * server.c (handle_general_set): Remove unnecessary xstrdup.
1589
e80aaf61
SM
15902018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1591
1592 * server.c (parse_debug_format_options): Adjust to
1593 delim_string_to_char_ptr_vec changes.
1594 * thread-db.c (thread_db_load_search): Adjust to
1595 dirnames_to_char_ptr_vec changes.
1596
b1223e78
MM
15972018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1598
1599 * target.h (target_enable_btrace, target_disable_btrace)
1600 (target_read_btrace, target_read_btrace_conf): Turn macro into
1601 inline function. Throw error if target method is not defined.
1602 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1603 check for btrace target method. Be prepared to handle exceptions
1604 from btrace target methods.
1605
81561546
SDJ
16062018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1607
1608 * server.c (captured_main): Change order of error message printed
1609 when the current working directory cannot be found.
1610
25e3c82c
SDJ
16112018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1612
1613 * server.c: Include "filenames.h" and "pathstuff.h".
1614 (program_name): Delete variable.
1615 (program_path): New anonymous class.
1616 (get_exec_wrapper): Use "program_path" instead of
1617 "program_name".
1618 (handle_v_run): Likewise.
1619 (captured_main): Likewise.
1620 (process_serial_event): Likewise.
1621
b4987c95
SDJ
16222018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1623
1624 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1625 (OBJS): Add "pathstuff.o".
1626 * server.c (current_directory): New global variable.
1627 (captured_main): Initialize "current_directory".
1628
f46cd62a
AH
16292018-02-26 Alan Hayward <alan.hayward@arm.com>
1630
1631 * tdesc.c: Use common/tdesc.h.
1632 * tdesc.h: Likewise.
1633
a543c5ca
AH
16342018-02-20 Alan Hayward <alan.hayward@arm.com>
1635 Simon Marchi <simon.marchi@ericsson.com>
1636
1637 * Makefile.in: Switch order of make rules.
1638
b5884fa7
AH
16392018-02-19 Alan Hayward <alan.hayward@arm.com>
1640
1641 * Makefile.in: Add common directory in build.
1642 * configure.ac: Add common reference.
1643 * configure: Regenerate.
1644
de6242d3
MM
16452018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1646
1647 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1648 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1649 * spu-low.c (spu_target_ops): Likewise.
1650 * win32-low.c (win32_target_ops): Likewise.
1651 * server.c (supported_btrace_packets): Report packets unconditionally.
1652 * target.h (target_ops) <supports_btrace>: Remove.
1653 (target_supports_btrace): Remove.
1654
9ee23a85
MM
16552018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1656
1657 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1658 (handle_btrace_disable): Change return type to void. Use exceptions
1659 to report errors.
1660 (handle_btrace_general_set): Catch exception and copy message to
1661 return message.
1662
8ce47547
TT
16632018-02-08 Tom Tromey <tom@tromey.com>
1664
1665 * linux-low.c (install_software_single_step_breakpoints): Use
1666 make_scoped_restore.
1667 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1668 (do_restore_current_thread_cleanup): Remove.
1669 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1670 declare.
1671
45dd3607
TT
16722018-02-08 Tom Tromey <tom@tromey.com>
1673
1674 * mem-break.c (set_raw_breakpoint_at): Use
1675 gdb::unique_xmalloc_ptr.
1676
e671cd59
PA
16772018-01-30 Pedro Alves <palves@redhat.com>
1678
1679 PR gdb/13211
1680 * target.c (target_terminal::terminal_state): Rename to ...
1681 (target_terminal::m_terminal_state): ... this.
1682
a0aad537
JC
16832018-01-19 James Clarke <jrtc27@jrtc27.com>
1684
1685 * linux-low.c (handle_extended_wait): Surround call to
1686 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1687
4d9b86e1
SM
16882018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1689
1690 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1691 linux_ptrace_attach_fail_reason_string now returning an
1692 std::string.
1693 (linux_attach): Likewise.
1694 * thread-db.c (attach_thread): Likewise.
1695
f517c180
EA
16962018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1697
1698 PR gdb/21559
1699 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1700 checking for fs_base/gs_base fields in struct user_regs_struct.
1701 * configure: Regenerate.
1702
9a70f35c
YQ
17032018-01-16 Yao Qi <yao.qi@linaro.org>
1704
1705 PR gdb/18749
1706 * linux-low.c (fetch_register): Call supply_register instead of
1707 error.
1708
605fd3c6
YQ
17092018-01-08 Yao Qi <yao.qi@linaro.org>
1710 Simon Marchi <simon.marchi@ericsson.com>
1711
1712 * Makefile.in (OBS): Remove selftest.o.
1713 * configure.ac: Set srv_selftest_objs if $development is true.
1714 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1715 * configure: Re-generated.
1716 * server.c (captured_main): Wrap variable selftest_filter with
1717 GDB_SELF_TEST.
1718
2cc05030
SM
17192018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1720
1721 * server.c (parse_debug_format_options): Return std::string.
1722 (handle_monitor_command, captured_main): Adjust.
1723
e379cee6
PA
17242018-01-05 Pedro Alves <palves@redhat.com>
1725
1726 PR gdb/18653
1727 * server.c (captured_main): Pass quiet=false to
1728 save_original_signals_state.
1729
82e1e79a
JB
17302018-01-01 Joel Brobecker <brobecker@adacore.com>
1731
1732 * gdbreplay.c (gdbreplay_version): Update copyright year in
1733 version message.
1734 * server.c (gdbserver_version): Likewise.
1735
8e481c3b
TT
17362017-12-08 Tom Tromey <tom@tromey.com>
1737
1738 * ax.c (ax_printf): Update.
1739
a8806230
YQ
17402017-12-07 Yao Qi <yao.qi@linaro.org>
1741
1742 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1743 aarch64_linux_read_description.
1744 * linux-amd64-ipa.c (idx2mask): New array.
1745 (get_ipa_tdesc): Move idx2mask out.
1746 (initialize_low_tracepoint): Initialize target descriptions.
1747 * linux-i386-ipa.c (idx2mask): New array.
1748 (get_ipa_tdesc): Move idx2mask out.
1749 (initialize_low_tracepoint): Initialize target descriptions.
1750
d4a0e8b5
SM
17512017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1752
1753 * tdesc.c (struct tdesc_type): Change return type.
1754 (tdesc_add_flag): Change parameter type.
1755 (tdesc_add_bitfield): Likewise.
1756 (tdesc_add_field): Likewise.
1757 (tdesc_set_struct_size): Likewise.
1758
798a7429
SM
17592017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1760
1761 * regcache.c (registers_to_string): Remove unused variable.
1762
c0e15c9b
SM
17632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1764
1765 * inferiors.c (for_each_inferior_with_data): Remove.
1766 * inferiors.h (for_each_inferior_with_data): Remove.
1767 * server.c (handle_qxfer_threads_worker): Change parameter type.
1768 (handle_qxfer_threads_proper): Use for_each_thread.
1769
f0045347
SM
17702017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1771
1772 * inferiors.c (for_each_inferior): Remove.
1773 (clear_inferiors): Use for_each_thread.
1774 * inferiors.h (for_each_inferior): Remove.
1775 * linux-low.c (linux_wait_for_event_filtered): Use
1776 for_each_thread.
1777 (linux_stabilize_threads): Likewise.
1778 * regcache.c (regcache_release): Likewise.
1779 * server.c (gdb_wants_all_threads_stopped): Likewise.
1780 (clear_pending_status_callback): Remove.
1781 (handle_status): Use for_each_thread.
1782 (captured_main): Likewise.
1783 * win32-low.c (child_init_thread_list): Likewise.
1784 (win32_clear_inferiors): Likewise.
1785 (fake_breakpoint_event): Likewise.
1786
9521758b
SM
17872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1788
1789 * inferiors.h (find_inferior): Remove.
1790 * inferiors.c (find_inferior): Remove.
1791
8f86d7aa
SM
17922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1793
1794 * linux-low.c (resume_status_pending_p): Update comment.
1795 (need_step_over_p): Update comment.
1796
e2b44075
SM
17972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1798
1799 * linux-low.c (proceed_one_lwp): Return void, change parameter
1800 type.
1801 (unsuspend_and_proceed_one_lwp): Likewise.
1802 (proceed_all_lwps): Use for_each_thread.
1803 (unstop_all_lwps): Likewise.
1804
c80825ff
SM
18052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1806
1807 * linux-low.c (linux_resume_one_thread): Return void, take
1808 parameter directly.
1809 (linux_resume): Use for_each_thread.
1810
df3e4dbe
SM
18112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1812
1813 * linux-low.c (send_sigstop_callback): Return void, change
1814 parameter type. Rename to...
1815 (send_sigstop): ... this.
1816 (suspend_and_send_sigstop_callback): Return void, change parameter
1817 type. Rename to...
1818 (suspend_and_send_sigstop): ... this.
1819 (stop_all_lwps): Use for_each_thread.
1820
5a6b0a41
SM
18212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1822
1823 * linux-low.c (lwp_running): Return bool, remove unused
1824 argument.
1825 (linux_stabilize_threads): Use find_thread.
1826
39a64da5
SM
18272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1828
1829 * linux-low.c (select_singlestep_lwp_callback): Remove.
1830 (count_events_callback): Remove.
1831 (select_event_lwp_callback): Remove.
1832 (select_event_lwp): Use find_thread/for_each_thread.
1833
a1385b7b
SM
18342017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1835
1836 * linux-low.c (not_stopped_callback): Return bool, take filter
1837 argument directly.
1838 (linux_wait_for_event_filtered): Use find_thread.
1839 (linux_wait_1): Likewise.
1840
454296a2
SM
18412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1842
1843 * linux-low.c (same_lwp): Remove.
1844 (find_lwp_pid): Use find_thread.
1845
6b2a85da
SM
18462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1847
1848 * linux-low.c (delete_lwp_callback): Remove.
1849 (linux_mourn): Use for_each_thread.
1850
798a38e8
SM
18512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1852
1853 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1854 args parameter, don't check for pid.
1855 (linux_detach): Use for_each_thread.
1856
e4eb0dec
SM
18572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1858
1859 * linux-low.c (struct counter): Remove.
1860 (second_thread_of_pid_p): Remove.
1861 (last_thread_of_process_p): Use find_thread.
1862
83e1b6c1
SM
18632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1864
1865 * inferiors.c (find_inferior_in_random): Remove.
1866 * inferiors.h (find_inferior_in_random): Remove.
1867 * linux-low.c (status_pending_p_callback): Return bool, accept
1868 parameter ptid directly.
1869 (linux_wait_for_event_filtered): Use find_thread_in_random.
1870 (linux_wait_1): Likewise.
1871
8dc7b443
SM
18722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1873
1874 * inferiors.c (find_inferior_id): Remove.
1875 (find_thread_ptid): Move implemention from find_inferior_id to
1876 here.
1877 * inferiors.h (find_inferior_id): Remove.
1878 * server.c (handle_status): Use find_thread_ptid.
1879 (process_serial_event): Likewise.
1880 * thread-db.c (find_one_thread): Likewise.
1881 (thread_db_thread_handle): Likewise.
1882 * win32-low.c (thread_rec): Likewise.
1883 (child_delete_thread): Likewise.
1884 (win32_thread_alive): Likewise.
1885 (get_child_debug_event): Likewise.
1886
da25033c
SM
18872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1888
1889 * linux-mips-low.c (update_watch_registers_callback): Return
1890 void, remove pid_p parameter, don't check for pid.
1891 (mips_insert_point, mips_remove_point): Use for_each_thread.
1892
c91bb56b
SM
18932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1894
1895 * lynx.low (lynx_delete_thread_callback): Remove.
1896 (lynx_mourn): Use for_each_thread.
1897
634a3254
SM
18982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1899
1900 * regcache.c (regcache_invalidate_one): Remove.
1901 (regcache_invalidate_pid): use for_each_thread.
1902
41272101
TT
19032017-11-26 Tom Tromey <tom@tromey.com>
1904
1905 * linux-low.c (linux_create_inferior): Update.
1906
f5291a6f
UW
19072017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1908
1909 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1910
6654d750
AH
19112017-11-24 Alan Hayward <alan.hayward@arm.com>
1912
1913 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1914 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1915 * linux-aarch64-tdesc-selftest.c: New file.
1916 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1917
19182017-11-24 Alan Hayward <alan.hayward@arm.com>
1919
1920 * configure.srv: Add new file.
1921 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1922 * linux-aarch64-tdesc-selftest.c: New file.
1923 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1924
49bdb7ee
AH
19252017-11-24 Alan Hayward <alan.hayward@arm.com>
1926
1927 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1928 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1929 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1930
d6d7ce56
AH
19312017-11-24 Alan Hayward <alan.hayward@arm.com>
1932
1933 * configure.srv: Add new files.
1934 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1935 aarch64_linux_read_description.
1936 * linux-aarch64-low.c (aarch64_linux_read_description):
1937 Merge with aarch64_arch_setup.
1938 (aarch64_arch_setup): Call aarch64_linux_read_description.
1939 * linux-aarch64-tdesc.c: New file.
1940 * linux-aarch64-tdesc.h: New file.
1941
506fe5f4
YQ
19422017-11-24 Yao Qi <yao.qi@linaro.org>
1943
1944 * configure.srv: Set $srv_regobj for tic6x-linux.
1945 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1946 (tic6x_read_description): Move some code to tic6x_arch_setup.
1947 (tic6x_tdesc_test): New function.
1948 (initialize_low_arch): Call selftests::register_test.
1949
29f9a567
YQ
19502017-11-22 Yao Qi <yao.qi@linaro.org>
1951
1952 * remote-utils.c (prepare_resume_reply): Use memcpy.
1953
578290ec
SM
19542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1955
1956 * linux-low.c (kill_one_lwp_callback): Return void, take
1957 argument directly, don't filter on pid.
1958 (linux_kill): Use for_each_thread.
1959
eca55aec
SM
19602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1961
1962 * linux-low.c (need_step_over_p): Return bool, remove dummy
1963 argument.
1964 (linux_resume, proceed_all_lwps): Use find_thread.
1965
25c28b4d
SM
19662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1967
1968 * linux-low.c (resume_status_pending_p): Return bool, remove
1969 flag_p argument.
1970 (linux_resume): Use find_thread.
1971
5fdda392
SM
19722017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1973
1974 * linux-low.c (struct thread_resume_array): Remove.
1975 (linux_set_resume_request): Return void, take arguments
1976 directly.
1977 (linux_resume): Use for_each_thread.
1978
fcb056a5
SM
19792017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1980
1981 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1982 return bool, remove data argument.
1983 (linux_stabilize_threads): Use find_thread.
1984
139720c5
SM
19852017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1986
1987 * linux-low.c (unsuspend_one_lwp): Remove.
1988 (unsuspend_all_lwps): Use for_each_thread, inline code from
1989 unsuspend_one_lwp.
1990
6d1e5673
SM
19912017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1992
1993 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1994 * linux-low.c (struct iterate_over_lwps_args): Remove.
1995 (iterate_over_lwps_filter): Remove.
1996 (iterate_over_lwps): Use find_thread.
1997
bbf550d5
SM
19982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1999
2000 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2001 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2002 code from reset_lwp_ptrace_options_callback.
2003
00192f77
SM
20042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2005
2006 * linux-arm-low.c (struct update_registers_data): Remove.
2007 (update_registers_callback): Return void, take arguments
2008 directly, don't check thread's pid.
2009 (arm_insert_point, arm_remove_point): Use for_each_thread.
2010
2bee2b6c
SM
20112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2012
2013 * win32-low.c (continue_one_thread): Return void, take argument
2014 directly.
2015 (child_continue): Use for_each_thread.
2016
0b360f19
SM
20172017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2018
2019 * win32-i386-low.c (update_debug_registers_callback): Rename
2020 to ...
2021 (update_debug_registers): ... this, return void, remove pid_p arg.
2022 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2023
f27866ba
SM
20242017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2025
2026 * inferiors.h (struct process_info): Add constructor, initialize
2027 fields..
2028 <syscalls_to_catch>: Change type to std::vector<int>.
2029 * inferiors.c (add_process): Allocate process_info with new.
2030 (remove_process): Free process_info with delete.
2031 * linux-low.c (handle_extended_wait): Adjust.
2032 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2033 * server.c (handle_general_set): Adjust.
2034
e849ea89
PA
20352017-11-16 Pedro Alves <palves@redhat.com>
2036
2037 * remote-utils.c (remote_close): Block SIGIO signals instead of
2038 uninstalling the SIGIO handler.
2039
1d0aa65c
AH
20402017-11-16 Alan Hayward <alan.hayward@arm.com>
2041
2042 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2043
3491a34c
YQ
20442017-11-16 Yao Qi <yao.qi@linaro.org>
2045
2046 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2047 (tic6x_store_gregset): Likewise.
2048 (tic6x_usrregs_info): Move it up.
2049
a602f924
AH
20502017-11-15 Alan Hayward <alan.hayward@arm.com>
2051
2052 * Makefile.in: Update arch rules.
2053 * configure.srv: Explicitly mark arch/ files.
2054
5616b6c3
AS
20552017-11-13 Andreas Schwab <schwab@suse.de>
2056
2057 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2058 function.
2059 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2060
d1928160
PA
20612017-11-06 Pedro Alves <palves@redhat.com>
2062
2063 * config.in, configure: Regenerate.
2064
bac608e7
SM
20652017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2066
2067 * target.c (struct thread_search): Remove.
2068 (thread_search_callback): Remove.
2069 (prepare_to_access_memory): Use for_each_thread instead of
2070 find_inferior. Inline code from thread_search_callback.
2071
eaddb425
SM
20722017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2073
2074 * server.c (struct visit_actioned_threads_data): Remove.
2075 (visit_actioned_threads): Change prototype to take arguments
2076 directly.
2077 (resume): Use find_thread instead of find_inferior.
2078
99078d34
SM
20792017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2080
2081 * server.c (queue_stop_reply_callback): Change prototype, return
2082 void.
2083 (find_status_pending_thread_callback): Remove.
2084 (handle_status): Replace find_inferior with find_thread and
2085 for_each_thread.
2086
cc628f3d
AH
20872017-10-25 Alan Hayward <alan.hayward@arm.com>
2088
2089 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2090 with REGNO.
2091 (aarch64_store_gregset): Likewise.
2092 (aarch64_fill_fpregset): Likewise.
2093 (aarch64_store_fpregset): Likewise.
2094
4d3bb80e
SM
20952017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2096
2097 * gdbthread.h (find_thread, for_each_thread): New functions.
2098 * inferiors.c (thread_of_pid): Remove.
2099 (find_any_thread_of_pid): Use find_thread.
2100 * linux-low.c (num_lwps): Use for_each_thread.
2101
7a7cdfa0
YQ
21022017-10-17 Yao Qi <yao.qi@linaro.org>
2103
2104 * Makefile.in: Remove one rule.
2105 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2106
e675d170
YQ
21072017-10-17 Yao Qi <yao.qi@linaro.org>
2108
2109 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2110 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2111
7eb4e0f9
YQ
21122017-10-17 Yao Qi <yao.qi@linaro.org>
2113
2114 * configure.srv: Rename arm.o with arch/arm.o.
2115
60d6cfc9
YQ
21162017-10-17 Yao Qi <yao.qi@linaro.org>
2117
2118 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2119 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2120 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2121 (arch-i386.o, arch-amd64.o): Remove rules.
2122 (arch/%.o): New rule.
2123 Update POSTCOMPILE and COMPILE.pre.
2124 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2125 * configure: Re-generated.
2126 * configure.srv: Replace arch-i386.o with arch/i386.o.
2127 Replace arch-amd64.o with arch/amd64.o.
2128
5bfda255
YQ
21292017-10-16 Yao Qi <yao.qi@linaro.org>
2130
2131 * configure: Regenerated.
2132
9c80ecd6
SM
21332017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2134
2135 * inferiors.h: (struct inferior_list): Remove.
2136 (struct inferior_list_entry); Remove.
2137 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2138 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2139 get_first_inferior): Remove.
2140 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2141 find_inferior_id, find_inferior_in_random): Change signature.
2142 * inferiors.c (all_threads): Change type to
2143 std::list<thread_info *>.
2144 (get_thread): Remove macro.
2145 (find_inferior, find_inferior_id): Change signature, implement
2146 using find_thread.
2147 (find_inferior_in_random): Change signature, implement using
2148 find_thread_in_random.
2149 (for_each_inferior, for_each_inferior_with_data): Change
2150 signature, implement using for_each_thread.
2151 (add_inferior_to_list, remove_inferior): Remove.
2152 (add_thread, get_first_thread, thread_of_pid,
2153 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2154 (get_first_inferior, one_inferior_p, clear_inferior_list):
2155 Remove.
2156 (clear_inferiors, get_thread_process): Update.
2157 * gdbthread.h: Include <list>.
2158 (struct thread_info) <entry>: Remove field.
2159 <id>: New field.
2160 (all_threads): Change type to std::list<thread_info *>.
2161 (get_first_inferior): Add doc.
2162 (find_thread, for_each_thread, find_thread_in_random): New
2163 functions.
2164 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2165 * linux-arm-low.c (update_registers_callback): Update.
2166 * linux-low.c (second_thread_of_pid_p): Update.
2167 (kill_one_lwp_callback, linux_detach_lwp_callback,
2168 delete_lwp_callback, status_pending_p_callback, same_lwp,
2169 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2170 iterate_over_lwps, not_stopped_callback,
2171 resume_stopped_resumed_lwps, count_events_callback,
2172 select_singlestep_lwp_callback, select_event_lwp_callback,
2173 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2174 suspend_and_send_sigstop_callback, wait_for_sigstop,
2175 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2176 lwp_running, linux_set_resume_request, resume_status_pending_p,
2177 need_step_over_p, start_step_over, linux_resume_one_thread,
2178 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2179 reset_lwp_ptrace_options_callback): Update.
2180 * linux-mips-low.c (update_watch_registers_callback): Update.
2181 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2182 Update.
2183 (free_register_cache_thread_one): Remove.
2184 (regcache_release): Update.
2185 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2186 handle_qxfer_threads_worker): Update.
2187 (handle_query): Update, use list iterator.
2188 (visit_actioned_threads, handle_pending_status,
2189 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2190 clear_pending_status_callback, set_pending_status_callback,
2191 find_status_pending_thread_callback, handle_status,
2192 process_serial_event): Update.
2193 * target.c (thread_search_callback): Update.
2194 * thread-db.c (thread_db_get_tls_address): Update.
2195 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2196 Update.
2197 * win32-i386-low.c (update_debug_registers_callback): Update.
2198 * win32-low.c (delete_thread_info, child_delete_thread,
2199 continue_one_thread, suspend_one_thread,
2200 get_child_debug_event): Adjust.
2201
9179355e
SM
22022017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2203
2204 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2205 * inferiors.h: Include <list>.
2206 (struct process_info) <entry>: Remove field.
2207 <pid>: New field.
2208 (pid_of): Change macro to function.
2209 (ptid_of, lwpid_of): Remove macro.
2210 (all_processes): Change type to std::list<process_info *>.
2211 (ALL_PROCESSES): Remove macro.
2212 (for_each_process, find_process): New function.
2213 * inferiors.c (all_processes): Change type to
2214 std::list<process_info *>.
2215 (find_thread_process): Adjust.
2216 (add_process): Likewise.
2217 (remove_process): Likewise.
2218 (find_process_pid): Likewise.
2219 (get_first_process): Likewise.
2220 (started_inferior_callback): Remove.
2221 (have_started_inferiors_p): Adjust.
2222 (attached_inferior_callback): Remove.
2223 (have_attached_inferiors_p): Adjust.
2224 * linux-low.c (check_zombie_leaders): Likewise.
2225 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2226 (x86_linux_update_xmltarget): Adjust.
2227 * server.c (handle_query): Likewise.
2228 (gdb_reattached_process): Remove.
2229 (handle_status): Adjust.
2230 (kill_inferior_callback): Likewise.
2231 (detach_or_kill_inferior): Remove.
2232 (print_started_pid): Likewise.
2233 (print_attached_pid): Likewise.
2234 (detach_or_kill_for_exit): Update.
2235 (process_serial_event): Likewise.
2236 * linux-arm-low.c (arm_new_fork): Likewise.
2237
c9cb8905
SM
22382017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2239
2240 * dll.h: Include <list>.
2241 (struct dll_info): Add constructor.
2242 <entry>: Remove field.
2243 (all_dlls): Change type to std::list<dll_info>.
2244 * dll.c: Include <algorithm>.
2245 (get_dll): Remove macro.
2246 (all_dlls): Change type to std::list<dll_info *>.
2247 (free_one_dll): Remove.
2248 (match_dll): Likewise.
2249 (loaded_dll): Adjust.
2250 (unloaded_dll): Adjust to all_dlls type change, use
2251 std::find_if. Inline code from match_dll.
2252 (clear_dlls): Adjust to all_dlls type change.
2253 * server.c (emit_dll_description): Remove.
2254 (handle_qxfer_libraries): Adjust to all_dlls type change,
2255 integrate emit_dll_description's functionality.
2256
04ec7890
SM
22572017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2258
2259 * linux-low.h (struct linux_target_ops) <delete_process>: New
2260 field.
2261 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2262 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2263 (struct linux_target_ops): Add delete_process callback.
2264 * linux-arm-low.c (arm_delete_process): New.
2265 (struct linux_target_ops): Add delete_process callback.
2266 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2267 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2268 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2269 * linux-mips-low.c (mips_linux_delete_process): New.
2270 (struct linux_target_ops): Add delete_process callback.
2271 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2272 * linux-s390-low.c (struct linux_target_ops): Likewise.
2273 * linux-sh-low.c (struct linux_target_ops): Likewise.
2274 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2275 * linux-tile-low.c (struct linux_target_ops): Likewise.
2276 * linux-x86-low.c (x86_linux_delete_process): New.
2277 (struct linux_target_ops): Add delete_process callback.
2278 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2279
466eecee
SM
22802017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2281
2282 * linux-aarch64-low.c (the_low_target): Add thread delete
2283 callback.
2284 * linux-arm-low.c (arm_delete_thread): New function.
2285 (the_low_target): Add thread delete callback.
2286 * linux-bfin-low.c (the_low_target): Likewise.
2287 * linux-crisv32-low.c (the_low_target): Likewise.
2288 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2289 set.
2290 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2291 field.
2292 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2293 * linux-mips-low.c (mips_linux_delete_thread): New function.
2294 (the_low_target): Add thread delete callback.
2295 * linux-ppc-low.c (the_low_target): Likewise.
2296 * linux-s390-low.c (the_low_target): Likewise.
2297 * linux-sh-low.c (the_low_target): Likewise.
2298 * linux-tic6x-low.c (the_low_target): Likewise.
2299 * linux-tile-low.c (the_low_target): Likewise.
2300 * linux-x86-low.c (the_low_target): Likewise.
2301 * linux-xtensa-low.c (the_low_target): Likewise.
2302
b79f7801
YZ
23032017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2304
2305 * win32-low.c: Include "common-inferior.h".
2306
bc3b087d
SDJ
23072017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2308
2309 * inferiors.c (set_inferior_cwd): New function.
2310 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2311 (handle_query): Inform that QSetWorkingDir is supported.
2312 * win32-low.c (create_process): Pass the inferior's cwd to
2313 CreateProcess.
2314
d092c5a2
SDJ
23152017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2316
2317 * inferiors.c (current_inferior_cwd): New global variable.
2318 (get_inferior_cwd): New function.
2319 * inferiors.h (struct process_info) <cwd>: New field.
2320
7da0a886
SDJ
23212017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2322
2323 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2324 (OBS): Add gdb_tilde_expand.o.
2325
289a6840
SM
23262017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2327
2328 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2329 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2330
256642e8
PA
23312017-09-29 Pedro Alves <palves@redhat.com>
2332
2333 * ax.c (gdb_parse_agent_expr): Constify.
2334 * ax.h (gdb_parse_agent_expr): Constify.
2335 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2336 Constify.
2337 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2338 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2339 * remote-utils.h (read_ptid): Constify.
2340 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2341 (process_point_options, process_serial_event): Constify.
2342 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2343 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2344 (cmd_qtbuffer): Constify.
2345
5b9ca4d4
PA
23462017-09-29 Pedro Alves <palves@redhat.com>
2347
2348 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2349 fails.
2350
94c207e0
PA
23512017-09-29 Pedro Alves <palves@redhat.com>
2352
2353 * linux-low.c (handle_extended_wait): Pass parent thread instead
2354 of process to thread_db_notice_clone.
2355 * linux-low.h (thread_db_notice_clone): Replace parent process
2356 parameter with parent thread parameter.
2357 * thread-db.c (find_one_thread): Add comment.
2358 (thread_db_notice_clone): Replace parent process parameter with
2359 parent thread parameter. Temporarily switch to the parent thread.
2360
75352e28
SDJ
23612017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2362
2363 * gdbthread.h: Include "common-gdbthread.h".
2364 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2365 "if" when validating the ptid.
2366 * remote-utils.c: Include "gdbthread.h".
2367 (prepare_resume_reply): Use "switch_to_thread".
2368 * target.c (done_accessing_memory): Likewise.
2369
ad339634
AA
23702017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2371
2372 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2373 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2374 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2375 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2376 s390x-gs-linux64-ipa.o to ipa_obj.
2377 * linux-s390-low.c (HWCAP_S390_GS): New define.
2378 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2379 New functions.
2380 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2381 (s390_arch_setup): Check for guarded-storage support and choose
2382 appropriate tdesc.
2383 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2384 init_registers_s390x_gs_linux64.
2385 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2386 enum value.
2387 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2388 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2389
cc4d742f
SM
23902017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2391
2392 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2393
f6327dcb
KB
23942017-09-21 Kevin Buettner <kevinb@redhat.com>
2395
2396 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2397 (thread_db_thread_handle): Declare.
2398 * linux-low.c (linux_target_ops): Initialize thread_handle.
2399 * server.c (handle_qxfer_threads_worker): Add support for
2400 "handle" attribute.
2401 * target.h (struct target_ops): Add new function pointer,
2402 thread_handle.
2403 (target_thread_handle): Define.
2404 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2405 field in lwp.
2406 (thread_db_thread_handle): New function.
2407
86299109
KB
24082017-09-21 Kevin Buettner <kevinb@redhat.com>
2409
2410 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2411 * linux-low.h (thread_db_notice_clone): Declare.
2412 * thread-db.c (thread_db_notice_clone): New function.
2413
f557a88a
PA
24142017-09-21 Pedro Alves <palves@redhat.com>
2415
2416 * server.c (gdb_read_memory, handle_status, process_serial_event)
2417 (handle_serial_event, handle_target_event): Adjust to
2418 set_desired_thread prototype change.
2419 * target.c (set_desired_thread): Remove 'use_general' parameter
2420 and adjust.
2421 * target.h (set_desired_thread): Remove 'use_general' parameter.
2422
223ffa71
TT
24232017-09-20 Tom Tromey <tom@tromey.com>
2424
2425 * target.c (target_terminal::terminal_state): Define.
2426 (target_terminal::init): Rename from target_terminal_init.
2427 (target_terminal::inferior): Rename from
2428 target_terminal_inferior.
2429 (target_terminal::ours): Rename from target_terminal_ours.
2430 (target_terminal::ours_for_output, target_terminal::info): New.
2431
04fd3ba9
SM
24322017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2433
2434 * server.c (accumulate_file_name_length): Remove.
2435 (emit_dll_description): Adjust to std::string change.
2436 (handle_qxfer_libraries): Use std::string to hold document.
2437
5e187554
SM
24382017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2439
2440 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2441 return type of xml_escape_text.
2442 * server.c (emit_dll_description): Likewise.
2443
1526853e
SM
24442017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2445
2446 * server.c (captured_main): Accept argument for --selftest.
2447 Update run_tests call.
2448 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2449 when registering selftests.
2450
c4dfafab
SDJ
24512017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2452
2453 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2454 instead of "VEC" for "target_desc.reg_defs".
2455 (regcache_cpy): Likewise.
2456 (registers_to_string): Likewise.
2457 (registers_from_string): Likewise.
2458 (find_regno): Likewise.
2459 (supply_regblock): Likewise.
2460 (regcache_raw_read_unsigned): Likewise.
2461 * tdesc.c (init_target_desc): Likewise.
2462 (tdesc_create_reg): Likewise.
2463 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2464 (struct target_desc) <reg_defs>: Convert to "std::vector".
2465 (target_desc): Do not initialize "reg_defs".
2466 (~target_desc): Update code to use "std::vector" instead of "VEC"
2467 for "target_desc.reg_defs".
2468 (operator==): Likewise.
2469
124aceb4
SM
24702017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2471
2472 * inferiors.h (thread_to_gdb_id): Remove.
2473 * inferiors.c (thread_to_gdb_id): Remove.
2474 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2475 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2476 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2477 Likewise.
2478 * nto-low.c (nto_fetch_registers, nto_store_registers,
2479 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2480
96cde54f
SM
24812017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2482
2483 * inferiors.h (gdb_id_to_thread_id): Remove.
2484 * inferiors.c (gdb_id_to_thread_id): Remove.
2485 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2486 removal. Move pid declaration closer to where it's used.
2487
e8ca139e
SM
24882017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2489
2490 * server.c (handle_detach): New function.
2491 (process_serial_event): Move code out, call handle_detach.
2492
f8a4e119
SM
24932017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2494
2495 * server.c (require_running): Rename to ...
2496 (require_running_or_return): ... this ...
2497 (require_running_or_break): ... and this.
2498 (handle_query, process_serial_event): Adjust.
2499
0eb0a407
SM
25002017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2501
2502 * linux-low.c (linux_set_resume_request): Remove unused
2503 variables.
2504
785922a5
SM
25052017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2506
2507 * server.c (first_thread_of): Remove.
2508 (process_serial_event): Replace usage of first_thread_of with
2509 find_any_thread_of_pid.
2510 * tracepoint.c (same_process_p): Remove.
2511 (gdb_agent_about_to_close): Replace usage of same_process_p with
2512 find_any_thread_of_pid.
2513 * linux-x86-low.c (same_process_callback): Remove.
2514 (x86_arch_setup_process_callback): Replace usage of
2515 same_process_callback with find_any_thread_of_pid.
2516 * thread-db.c (any_thread_of): Remove.
2517 (switch_to_process): Replace usage of any_thread_of with
2518 find_any_thread_of_pid.
2519 * inferiors.c (thread_pid_matches_callback): Remove.
2520 (find_thread_process): Adjust to use find_any_thread_of_pid.
2521
a059f00c
SDJ
25222017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2523
2524 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2525 with "!VEC_empty".
a059f00c 2526
cc397f3a
SDJ
25272017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2528
2529 * linux-low.c (handle_extended_wait): Use
2530 "allocate_target_description" instead of "XNEW".
2531 * linux-x86-low.c (initialize_low_arch): Likewise.
2532
22916b07
YQ
25332017-09-05 Yao Qi <yao.qi@linaro.org>
2534
2535 * configure.srv (srv_i386_regobj): Remove.
2536 (srv_amd64_regobj): Remove.
2537 (srv_regobj): Set it to "" for x86 non-linux targets.
2538 * linux-x86-tdesc.c (i386_linux_read_description):
2539 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2540 (init_registers_i386): Remove the declaration.
2541 (tdesc_i386): Remove the declaration.
2542 (lynx_i386_arch_setup): Call i386_create_target_description.
2543 * nto-x86-low.c: Likewise.
2544 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2545 [!__x86_64__]: include arch/i386.h.
2546 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2547
38602d55
YQ
25482017-09-05 Yao Qi <yao.qi@linaro.org>
2549
2550 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2551 i386/amd64-XXX-linux from it.
2552
44b886ff
YQ
25532017-09-05 Yao Qi <yao.qi@linaro.org>
2554
2555 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2556 false.
2557 (ipa_amd64_linux_regobj): Remove.
2558 (ipa_x32_linux_regobj): Remove.
2559
b4570e4b
YQ
25602017-09-05 Yao Qi <yao.qi@linaro.org>
2561
2562 * Makefile.in (arch-amd64.o): New rule.
2563 * configure.srv: Append arch-amd64.o.
2564 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2565 (get_ipa_tdesc): Call amd64_linux_read_description.
2566 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2567 and init_registers_amd64_XXX.
2568 * linux-x86-low.c (x86_linux_read_description): Call
2569 amd64_linux_read_description.
2570 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2571 (initialize_low_arch): Don't call init_registers_x32_XXX and
2572 init_registers_amd64_XXX.
2573 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2574 and tdesc_amd64_XXX.
2575 [__x86_64__] (amd64_tdesc_test): New function.
2576 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2577 and init_registers_amd64_XXX.
2578 * linux-x86-tdesc.c: Include arch/amd64.h.
2579 (xcr0_to_tdesc_idx): New function.
2580 (i386_linux_read_description): New function.
2581 (amd64_get_ipa_tdesc_idx): New function.
2582 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2583 (amd64_get_ipa_tdesc): Declare.
2584
d1f28ea2
YQ
25852017-09-05 Yao Qi <yao.qi@linaro.org>
2586
2587 * configure.srv (srv_i386_linux_xmlfiles): Remove
2588 i386/i386-XXX-linux.xml from it.
2589
25a93583
YQ
25902017-09-05 Yao Qi <yao.qi@linaro.org>
2591
2592 * configure.srv: Set srv_i386_linux_regobj empty if $development
2593 is false.
2594 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2595 initialize_low_tdesc.
2596 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2597 with #if initialize_low_tdesc.
2598 * linux-x86-tdesc-selftest.c: New file.
2599 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2600
5f035c07
YQ
26012017-09-05 Yao Qi <yao.qi@linaro.org>
2602
2603 * Makefile.in (arch-i386.o): New rule.
2604 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2605 (x86_64-*-linux*): Likewise.
2606 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2607 include arch/i386.h.
2608 (i386_linux_read_description): Remove code and call
2609 i386_create_target_description.
2610 * tdesc.c (allocate_target_description): New function.
2611 * tdesc.h (set_tdesc_architecture): Remove declaration.
2612 (set_tdesc_osabi): Likewise.
2613
0abe8a89
YQ
26142017-09-05 Yao Qi <yao.qi@linaro.org>
2615
2616 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2617 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2618 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2619 .xmltarget.
2620 * server.c (get_features_xml): Call tdesc_get_features_xml.
2621 * tdesc.c (set_tdesc_architecture): New function.
2622 (set_tdesc_osabi): New function.
2623 (tdesc_get_features_xml): New function.
2624 (tdesc_create_feature): Add an argument.
2625 * tdesc.h (struct target_desc) <features>: New field.
2626 <arch, osabi>: New field.
2627 (~target_desc): xfree features, arch, and osabi.
2628 (target_desc::oerator==): Don't compare .xmltarget.
2629 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2630 (set_tdesc_osabi): Likewise.
2631 (tdesc_get_features_xml): Likewise.
2632
0a188386
YQ
26332017-09-05 Yao Qi <yao.qi@linaro.org>
2634
2635 * linux-x86-tdesc.c: Include selftest.h.
2636 (i386_tdesc_test): New function.
2637 (initialize_low_tdesc): Call selftests::register_test.
2638 * tdesc.h: Include regdef.h.
2639 (target_desc): Override operator == and !=.
2640
f49ff000
YQ
26412017-09-05 Yao Qi <yao.qi@linaro.org>
2642
2643 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2644 (ipa_obj): Likewise.
2645 * linux-i386-ipa.c: Include common/x86-xstate.h
2646 (get_ipa_tdesc): Call i386_linux_read_description.
2647 (initialize_low_tracepoint): Don't call init_registers_XXX
2648 functions, call initialize_low_tdesc instead.
2649 * linux-x86-low.c (x86_linux_read_description): Call
2650 i386_linux_read_description.
2651 (initialize_low_arch): Don't call init_registers_i386_XXX
2652 functions, call initialize_low_tdesc.
2653 * linux-x86-tdesc.c: New file.
2654 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2655 (i386_get_ipa_tdesc_idx): Declare.
2656 (i386_get_ipa_tdesc): Declare.
2657 (initialize_low_tdesc): Declare.
2658
2b68ef2f
YQ
26592017-09-05 Yao Qi <yao.qi@linaro.org>
2660
2661 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2662 instead of 0.
2663
f7000548
YQ
26642017-09-05 Yao Qi <yao.qi@linaro.org>
2665
2666 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2667 * regcache.c (get_thread_regcache): Use VEC_length.
2668 (init_register_cache): Likewise.
2669 (regcache_cpy): Likewise.
2670 (registers_to_string): Iterate reg_defs via VEC_iterate.
2671 (find_regno): Likewise.
2672 (find_register_by_number): Use VEC_index.
2673 (register_size): Call find_register_by_number.
2674 (register_data): Call find_register_by_number.
2675 (supply_regblock): Use VEC_length.
2676 (regcache_raw_read_unsigned): Likewise.
2677 * tdesc.c (init_target_desc): Iterate reg_defs via
2678 VEC_iterate.
2679 (default_description): Update initializer.
2680 (copy_target_description): Don't update field num_registers.
2681 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2682 <num_registers>: Remove.
2683
50a421ac
SM
26842017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2685
2686 * Makefile.in (.SECONDARY): Define target.
2687
23fdd69e
SM
26882017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2689
2690 * linux-low.c (linux_wait_1): Adjust.
2691 * server.c (queue_stop_reply_callback): Adjust.
2692
0a2dde4a
SDJ
26932017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2694
2695 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2696 QEnvironmentUnset and QEnvironmentReset packets.
2697 (handle_query): Inform remote that QEnvironmentHexEncoded,
2698 QEnvironmentUnset and QEnvironmentReset are supported.
2699
6afd337d
SM
27002017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2701
2702 * inferiors.h (inferior_target_data): Rename to ...
2703 (thread_target_data): ... this.
2704 (inferior_regcache_data): Rename to ...
2705 (thread_regcache_data): ... this.
2706 (set_inferior_regcache_data): Rename to ...
2707 (set_thread_regcache_data): ... this.
2708 * inferiors.c (inferior_target_data): Rename to ...
2709 (thread_target_data): ... this.
2710 (inferior_regcache_data): Rename to ...
2711 (thread_regcache_data): ... this.
2712 (set_inferior_regcache_data): Rename to ...
2713 (set_thread_regcache_data): ... this.
2714 (free_one_thread): Update.
2715 * linux-low.h (get_thread_lwp): Update.
2716 * regcache.c (get_thread_regcache): Update.
2717 (regcache_invalidate_thread): Update.
2718 (free_register_cache_thread): Update.
2719 * win32-i386-low.c (update_debug_registers_callback): Update.
2720 (win32_get_current_dr): Update.
2721 * win32-low.c (thread_rec): Update.
2722 (delete_thread_info): Update.
2723 (continue_one_thread): Update.
2724 (suspend_one_thread): Update.
2725
a160cc46
SM
27262017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2727
2728 * inferiors.c (set_inferior_target_data): Remove.
2729 * inferiors.h (set_inferior_target_data): Remove.
2730
6d580b63
YQ
27312017-08-18 Yao Qi <yao.qi@linaro.org>
2732
2733 * Makefile.in (OBS): Add selftest.o.
2734 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2735 * configure, config.in: Re-generated.
2736 * server.c: Include common/sefltest.h.
2737 (captured_main): Handle option --selftest.
2738
f5a29eb0
YQ
27392017-08-09 Yao Qi <yao.qi@linaro.org>
2740
2741 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2742 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2743 i386-avx-mpx.o and i386-mmx.o.
2744 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2745 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2746 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2747 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2748 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2749 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2750 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2751 i386/amd64-avx-mpx.xml.
2752
57757c2f
YQ
27532017-08-09 Yao Qi <yao.qi@linaro.org>
2754
2755 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2756 and x32-avx-avx512.o.
2757 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2758 i386/x32-avx-avx512.xml.
2759
229d26fc
SM
27602017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2761
2762 * tracepoint.h (enum class fast_tpoint_collect_result): New
2763 enumeration.
2764 (fast_tracepoint_collecting): Change return type to
2765 fast_tpoint_collect_result.
2766 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2767 * linux-low.h: Include tracepoint.h.
2768 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2769 fast_tpoint_collect_result.
2770 * linux-low.c (handle_tracepoints): Adjust.
2771 (linux_fast_tracepoint_collecting): Change return type to
2772 fast_tpoint_collect_result.
2773 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2774 linux_wait_1, stuck_in_jump_pad_callback,
2775 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2776 proceed_one_lwp): Adjust to type change.
2777
2e1e43e1
YQ
27782017-07-10 Yao Qi <yao.qi@linaro.org>
2779
2780 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2781
adc764e7
YQ
27822017-06-29 Yao Qi <yao.qi@linaro.org>
2783
2784 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2785 Remove.
2786 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2787
a206891a
SM
27882017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2789
2790 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2791
9a6c7d9c
SDJ
27922017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2793
2794 * linux-low.c (linux_create_inferior): Adjust code to access the
2795 environment information via 'gdb_environ' class.
2796 * lynx-low.c (lynx_create_inferior): Likewise.
2797 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2798 (get_environ): Return a pointer to 'our_environ'.
2799 (captured_main): Initialize 'our_environ'.
2800 * server.h (get_environ): Adjust prototype.
2801 * spu-low.c (spu_create_inferior): Adjust code to access the
2802 environment information via 'gdb_environ' class.
2803
ae3e2ccf
SM
28042017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2805
2806 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2807 usage of "register" keyword.
2808
3e019bdc
SM
28092017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2810
2811 * configure: Re-generate.
2812
8465943a
SM
28132017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2814
2815 * configure: Re-generate.
2816
cf0dd6f0
SM
28172017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2818
2819 * Makefile.in (COMPILE.pre): Add "-x c++".
2820
9845682b
SDJ
28212017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2822
2823 * fork-child.c: Conditionally include <signal.h>.
2824
aefd8b33
SDJ
28252017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2826
2827 * server.c (handle_general_set): Handle new packet
2828 "QStartupWithShell".
2829 (handle_query): Add "QStartupWithShell" to the list of supported
2830 packets.
2831 (gdbserver_usage): Add help text explaining the
2832 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2833 options.
2834 (captured_main): Recognize and act upon the presence of the new
2835 CLI options.
2836
2090129c
SDJ
28372017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2838 Pedro Alves <palves@redhat.com>
2839
2840 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2841 * configure: Regenerate.
2842 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2843 "fork-inferior.o".
2844 (i[34567]86-*-lynxos*): Likewise.
2845 (spu*-*-*): Likewise.
2846 * fork-child.c: New file.
2847 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2848 and "environ.h".
2849 (linux_ptrace_fun): New function.
2850 (linux_create_inferior): Adjust function prototype to reflect
2851 change on "target.h". Adjust function code to use
2852 "fork_inferior".
2853 (linux_request_interrupt): Delete "signal_pid".
2854 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2855 (lynx_ptrace_fun): New function.
2856 (lynx_create_inferior): Adjust function prototype to reflect
2857 change on "target.h". Adjust function code to use
2858 "fork_inferior".
2859 * nto-low.c (nto_create_inferior): Adjust function prototype and
2860 code to reflect change on "target.h". Update comments.
2861 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2862 "common-terminal.h" and "environ.h".
2863 (terminal_fd): Moved to fork-child.c.
2864 (old_foreground_pgrp): Likewise.
2865 (restore_old_foreground_pgrp): Likewise.
2866 (last_status): Make it global.
2867 (last_ptid): Likewise.
2868 (our_environ): New variable.
2869 (startup_with_shell): Likewise.
2870 (program_name): Likewise.
2871 (program_argv): Rename to...
2872 (program_args): ...this.
2873 (wrapper_argv): New variable.
2874 (start_inferior): Delete function.
2875 (get_exec_wrapper): New function.
2876 (get_exec_file): Likewise.
2877 (get_environ): Likewise.
2878 (prefork_hook): Likewise.
2879 (post_fork_inferior): Likewise.
2880 (postfork_hook): Likewise.
2881 (postfork_child_hook): Likewise.
2882 (handle_v_run): Update code to deal with arguments coming from the
2883 remote host. Update calls from "start_inferior" to
2884 "create_inferior".
2885 (captured_main): Likewise. Initialize environment variable. Call
2886 "have_job_control".
2887 * server.h (post_fork_inferior): New prototype.
2888 (get_environ): Likewise.
2889 (last_status): Declare.
2890 (last_ptid): Likewise.
2891 (signal_pid): Likewise.
2892 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2893 (spu_ptrace_fun): New function.
2894 (spu_create_inferior): Adjust function prototype to reflect change
2895 on "target.h". Adjust function code to use "fork_inferior".
2896 * target.c (target_terminal_init): New function.
2897 (target_terminal_inferior): Likewise.
2898 (target_terminal_ours): Likewise.
2899 * target.h: Include <vector>.
2900 (struct target_ops) <create_inferior>: Update prototype.
2901 (create_inferior): Update macro.
2902 * utils.c (gdb_flush_out_err): New function.
2903 * win32-low.c (win32_create_inferior): Adjust function prototype
2904 and code to reflect change on "target.h".
2905
043a4934
SDJ
29062017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2907
2908 * inferiors.c (switch_to_thread): New function.
2909
15652511
SDJ
29102017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2911
2912 * Makefile.in (SFILE): Add "common/job-control.c".
2913 (OBS): Add "job-control.o".
2914
21ea5acd
SDJ
29152017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2916
2917 * Makefile: Remove "@host_makefile_frag@".
2918
e13cb306
PA
29192017-05-05 Pedro Alves <palves@redhat.com>
2920
2921 * configure: Regenerate.
2922
c94fee56
SDJ
29232017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2924
2925 * configure: Regenerate.
2926
a0ff9e1a
SM
29272017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2928
2929 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2930 software_single_step change of return type to
2931 std::vector<CORE_ADDR>.
2932 * linux-low.c (install_software_single_step_breakpoints):
2933 Likewise.
2934 * linux-low.h (install_software_single_step_breakpoints):
2935 Likewise.
2936
be628ab8
SDJ
29372017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2938
2939 * remote-utils.c: Include "gdb_termios.h" instead of
2940 "terminal.h".
2941 * terminal.h: Delete file.
2942
7c5ded6a
SDJ
29432017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2944
2945 * server.c: Include <vector>.
2946 <program_argv, wrapper_argv>: Convert to std::vector.
2947 (start_inferior): Rewrite function to use C++.
2948 (handle_v_run): Likewise. Update code that calculates the argv
2949 based on the vRun packet; use C++.
2950 (captured_main): Likewise.
2951
436252de
SM
29522017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2953
2954 * server.c (handle_v_cont): Initialize thread_resume::thread
2955 with null_ptid.
2956
9bf2a700
PA
29572017-04-05 Pedro Alves <palves@redhat.com>
2958
2959 * configure: Regenerate.
2960
a121b7c1
PA
29612017-04-05 Pedro Alves <palves@redhat.com>
2962
2963 * gdbreplay.c (sync_error): Constify.
2964 * linux-x86-low.c (push_opcode): Constify.
2965
21c8a587
PA
29662017-04-05 Pedro Alves <palves@redhat.com>
2967
2968 * win32-low.c (get_child_debug_event)
2969 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2970 Report TARGET_WAITKIND_SPURIOUS instead.
2971
fb32b4f7
PA
29722017-04-05 Pedro Alves <palves@redhat.com>
2973
e79be6e5
SM
2974 * remote-utils.c (remote_prepare, remote_open): Constify.
2975 * remote-utils.h (remote_prepare, remote_open): Constify.
2976 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2977
65dd1e59
SM
29782017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2979
2980 * Makefile.in (clean): Clear .deps.
2981
8fa5b777
SM
29822017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2983
2984 * .gitignore: Remove generated files, replace with wildcard.
2985 * (clean): Replace removal of generated files with wildcard.
2986 (version.c): Replace with...
2987 (version-generated.c): ...this.
2988 (xml-builtin.c): Replace with...
2989 (xml-builtin-generated.c): ...this.
2990 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2991 (%.c: *regformats*): Replace with...
2992 (%-generated.c: *regformats*): ...this.
2993
a12e714b
MF
29942017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2995
2996 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2997 (xtensa_fill_gregset): Call collect_register_by_name for
2998 threadptr register.
2999 (xtensa_store_gregset): Call supply_register_by_name for
3000 threadptr register.
3001
1a09b50a
MF
30022017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3003
3004 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3005 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3006 (xtensa_store_gregset): Call supply_register for all registers in
3007 a0_regnum..a0_regnum + C0_NREGS range.
3008
1a01e7c6
SM
30092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3010
3011 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3012 (ax-ipa.o: ax.c): Remove.
3013 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3014 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3015 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3016 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3017 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3018
36bc18a8
SM
30192017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3020
3021 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3022 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3023 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3024 (errors-ipa.o: ../common/errors.c): Remove.
3025 (format-ipa.o: ../common/format.c): Remove.
3026 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3027
a8ebe3d5
SM
30282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3029
3030 * Makefile.in (%-ipa.o: %.c): New rule.
3031 (tracepoint-ipa.o: tracepoint.c): Remove.
3032 (utils-ipa.o: utils.c): Remove.
3033 (remote-utils-ipa.o: remote-utils.c): Remove.
3034 (regcache-ipa.o: regcache.c): Remove.
3035 (i386-linux-ipa.o: i386-linux.c): Remove.
3036 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3037 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3038 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3039 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3040 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3041 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3042 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3043 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3044 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3045 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3046 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3047 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3048 (aarch64-ipa.o: aarch64.c): Remove.
3049 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3050 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3051 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3052 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3053 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3054 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3055 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3056 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3057 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3058 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3059 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3060 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3061 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3062 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3063 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3064 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3065 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3066 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3067 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3068 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3069 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3070 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3071 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3072 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3073 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3074 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3075 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3076 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3077 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3078 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3079 (tdesc-ipa.o: tdesc.c): Remove.
3080 (x32-linux-ipa.o: x32-linux.c): Remove.
3081 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3082 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3083
50cfacb7
SM
30842017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3085
3086 * Makefile.in (%.o: ../arch/%.c): New rule.
3087 (arm.o: ../arch/arm.c): Remove.
3088 (arm-linux.o: ../arch/arm-linux.c): Remove.
3089 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3090 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3091
c5a22423
SM
30922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3093
3094 * Makefile.in (%.o: ../nat/%.c): New rule.
3095 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3096 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3097 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3098 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3099 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3100 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3101 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3102 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3103 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3104 (linux-personality.o: ../nat/linux-personality.c): Remove.
3105 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3106 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3107 (x86-linux.o: ../nat/x86-linux.c): Remove.
3108 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3109 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3110
6bda016b
SM
31112017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3112
3113 * Makefile.in (%.o: ../common/%.c): New rule.
3114 (signals.o: ../common/signals.c): Remove.
3115 (print-utils.o: ../common/print-utils.c): Remove.
3116 (rsp-low.o: ../common/rsp-low.c): Remove.
3117 (common-utils.o: ../common/common-utils.c): Remove.
3118 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3119 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3120 (vec.o: ../common/vec.c): Remove.
3121 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3122 (xml-utils.o: ../common/xml-utils.c): Remove.
3123 (ptid.o: ../common/ptid.c): Remove.
3124 (buffer.o: ../common/buffer.c): Remove.
3125 (format.o: ../common/format.c): Remove.
3126 (filestuff.o: ../common/filestuff.c): Remove.
3127 (agent.o: ../common/agent.c): Remove.
3128 (errors.o: ../common/errors.c): Remove.
3129 (environ.o: ../common/environ.c): Remove.
3130 (common-debug.o: ../common/common-debug.c): Remove.
3131 (cleanups.o: ../common/cleanups.c): Remove.
3132 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3133 (fileio.o: ../common/fileio.c): Remove.
3134 (common-regcache.o: ../common/common-regcache.c): Remove.
3135 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3136 (new-op.o: ../common/new-op.c): Remove.
3137 (btrace-common.o: ../common/btrace-common.c): Remove.
3138
21122961
SM
31392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3140
3141 * Makefile.in (%.o: ../target/%.c): New rule.
3142 (waitstatus.o: ../target/waitstatus.c): Remove.
3143
c362e621
SM
31442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3145
3146 * Makefile.in
3147 (%.c: ../regformats/%.dat,
3148 (%.c: ../regformats/arm/%.dat,
3149 (%.c: ../regformats/i386/%.dat,
3150 (%.c: ../regformats/rs6000/%.dat): New rules.
3151 (aarch64.c): Remove.
3152 (reg-arm.c): Remove.
3153 (arm-with-iwmmxt.c): Remove.
3154 (arm-with-vfpv2.c): Remove.
3155 (arm-with-vfpv3.c): Remove.
3156 (arm-with-neon.c): Remove.
3157 (reg-bfin.c): Remove.
3158 (reg-cris.c): Remove.
3159 (reg-crisv32.c): Remove.
3160 (i386.c): Remove.
3161 (i386-linux.c): Remove.
3162 (i386-avx.c): Remove.
3163 (i386-avx-linux.c): Remove.
3164 (i386-avx-avx512.c): Remove.
3165 (i386-avx-avx512-linux.c): Remove.
3166 (i386-mpx.c): Remove.
3167 (i386-mpx-linux.c): Remove.
3168 (i386-avx-mpx-avx512-pku.c): Remove.
3169 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3170 (i386-avx-mpx.c): Remove.
3171 (i386-avx-mpx-linux.c): Remove.
3172 (i386-mmx.c): Remove.
3173 (i386-mmx-linux.c): Remove.
3174 (reg-ia64.c): Remove.
3175 (reg-m32r.c): Remove.
3176 (reg-m68k.c): Remove.
3177 (reg-cf.c): Remove.
3178 (mips-linux.c): Remove.
3179 (mips-dsp-linux.c): Remove.
3180 (mips64-linux.c): Remove.
3181 (mips64-dsp-linux.c): Remove.
3182 (nios2-linux.c): Remove.
3183 (powerpc-32.c): Remove.
3184 (powerpc-32l.c): Remove.
3185 (powerpc-altivec32l.c): Remove.
3186 (powerpc-cell32l.c): Remove.
3187 (powerpc-vsx32l.c): Remove.
3188 (powerpc-isa205-32l.c): Remove.
3189 (powerpc-isa205-altivec32l.c): Remove.
3190 (powerpc-isa205-vsx32l.c): Remove.
3191 (powerpc-e500l.c): Remove.
3192 (powerpc-64l.c): Remove.
3193 (powerpc-altivec64l.c): Remove.
3194 (powerpc-cell64l.c): Remove.
3195 (powerpc-vsx64l.c): Remove.
3196 (powerpc-isa205-64l.c): Remove.
3197 (powerpc-isa205-altivec64l.c): Remove.
3198 (powerpc-isa205-vsx64l.c): Remove.
3199 (s390-linux32.c): Remove.
3200 (s390-linux32v1.c): Remove.
3201 (s390-linux32v2.c): Remove.
3202 (s390-linux64.c): Remove.
3203 (s390-linux64v1.c): Remove.
3204 (s390-linux64v2.c): Remove.
3205 (s390-te-linux64.c): Remove.
3206 (s390-vx-linux64.c): Remove.
3207 (s390-tevx-linux64.c): Remove.
3208 (s390x-linux64.c): Remove.
3209 (s390x-linux64v1.c): Remove.
3210 (s390x-linux64v2.c): Remove.
3211 (s390x-te-linux64.c): Remove.
3212 (s390x-vx-linux64.c): Remove.
3213 (s390x-tevx-linux64.c): Remove.
3214 (tic6x-c64xp-linux.c): Remove.
3215 (tic6x-c64x-linux.c): Remove.
3216 (tic6x-c62x-linux.c): Remove.
3217 (reg-sh.c): Remove.
3218 (reg-sparc64.c): Remove.
3219 (reg-spu.c): Remove.
3220 (amd64.c): Remove.
3221 (amd64-linux.c): Remove.
3222 (amd64-avx.c): Remove.
3223 (amd64-avx-linux.c): Remove.
3224 (amd64-avx-avx512.c): Remove.
3225 (amd64-avx-avx512-linux.c): Remove.
3226 (amd64-mpx.c): Remove.
3227 (amd64-mpx-linux.c): Remove.
3228 (amd64-avx-mpx-avx512-pku.c): Remove.
3229 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3230 (amd64-avx-mpx.c): Remove.
3231 (amd64-avx-mpx-linux.c): Remove.
3232 (x32.c): Remove.
3233 (x32-linux.c): Remove.
3234 (x32-avx.c): Remove.
3235 (x32-avx-linux.c): Remove.
3236 (x32-avx-avx512.c): Remove.
3237 (x32-avx-avx512-linux.c): Remove.
3238 (reg-xtensa.c): Remove.
3239 (reg-tilegx.c): Remove.
3240 (reg-tilegx32.c): Remove.
3241
1672e0d9
SDJ
32422017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3243
3244 * Makefile.in (SFILES): Add "common/environ.c".
3245 (OBJS): Add "common/environ.h".
3246
239b6d10
WT
32472017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3248
3249 * configure.ac: Check if the fs_base and gs_base members of
3250 `struct user_regs_struct' exist.
3251 * config.in: Regenerated.
3252 * configure: Likewise.
3253
694b382c
AT
32542017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3255
3256 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3257 target_read_memory.
3258 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3259 (get_next_pcs_syscall_next_pc): Likewise.
3260
7dc53023
LM
32612016-12-23 Luis Machado <lgustavo@codesourcery.com>
3262
3263 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3264 * nto-x86-low.c: Likewise.
3265
ad02e4fe
SM
32662016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3267
3268 * Makefile.in: Include disable-implicit-rules.mk.
3269
dcb07cfa
PA
32702016-11-23 Pedro Alves <palves@redhat.com>
3271
3272 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3273 (debug_vprintf): Use std::chrono::steady_clock instead of
3274 gettimeofday. Use '.' instead of ':'.
3275 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3276 (get_timestamp): Use std::chrono::steady_clock instead of
3277 gettimeofday.
3278
8629c02c
SM
32792016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3280
3281 * Makefile.in: Fix whitespace formatting.
3282
b593ecca
SM
32832016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3284
3285 * Makefile.in (SFILES, OBS): Flatten list and order
3286 alphabetically.
3287
9986ba08
PA
32882016-11-23 Pedro Alves <palves@redhat.com>
3289
3290 * event-loop.c (handle_file_event): Use warning.
3291 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3292 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3293 Use warning.
3294
4eefa7bc
PA
32952016-11-23 Pedro Alves <palves@redhat.com>
3296
3297 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3298 output.
3299 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3300 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3301 debug_printf and debug_flush for debug output.
3302 * server.c (handle_general_set): Likewise.
3303 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3304 output.
3305
5443506e
SM
33062016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3307
3308 * Makefile.in (.c.o): Replace rule with ...
3309 (%.o: %.c): ... this one.
3310
3b165252
SM
33112016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3312
3313 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3314 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3315 make.
3316 * configure.ac: Remove checks for the make program.
3317 * configure: Re-generate.
3318
0bcda685
PA
33192016-10-28 Pedro Alves <palves@redhat.com>
3320
3321 * Makefile.in (CXX_DIALECT): Get from configure.
3322 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3323 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3324 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3325 * config.in: Regenerate.
3326 * configure: Regenerate.
3327
c3805894
YQ
33282016-10-27 Yao Qi <yao.qi@linaro.org>
3329
3330 * linux-low.c (linux_supports_range_stepping): Return true if
3331 can_software_single_step return true.
3332
89342618
YQ
33332016-10-27 Yao Qi <yao.qi@linaro.org>
3334
3335 * inferiors.c (find_inferior_in_random): New function.
3336 * inferiors.h (find_inferior_in_random): Declare.
3337 * linux-low.c (linux_wait_for_event_filtered): Call
3338 find_inferior_in_random instead of find_inferior.
3339
e3652c84
YQ
33402016-10-27 Yao Qi <yao.qi@linaro.org>
3341
3342 * linux-low.c (linux_wait_1): If single-step breakpoints are
3343 inserted, remove them.
3344
5a04c4cf
PA
33452016-10-26 Pedro Alves <palves@redhat.com>
3346
3347 * linux-low.c (handle_extended_wait): Link parent/child fork
3348 threads.
3349 (linux_wait_1): Unlink them.
3350 (linux_set_resume_request): Ignore resume requests for
3351 already-resumed and unhandled fork child threads.
3352 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3353 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3354 New functions.
3355 (handle_v_requests) <vCont>: Don't call require_running.
3356 * server.h (in_queued_stop_replies): New declaration.
3357
cb93dc7f
YQ
33582016-10-24 Yao Qi <yao.qi@linaro.org>
3359
3360 PR server/20733
3361 * linux-aarch64-low.c (append_insns): Cast the return value to
3362 'uint32_t *'.
3363
a1078bea
YQ
33642016-10-10 Yao Qi <yao.qi@linaro.org>
3365
3366 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3367
1fb77080
SDJ
33682016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3369
3370 * target.c (target_supports_multi_process): New function, moved
3371 from...
3372 * target.h (target_supports_multi_process): ... here. Remove
3373 macro.
3374
39b5a3b9
TT
33752016-10-05 Tom Tromey <tom@tromey.com>
3376
3377 PR remote/20655:
3378 * tracepoint.c (handle_tracepoint_bkpts): Check
3379 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3380
c1d0b70a
YQ
33812016-10-05 Yao Qi <yao.qi@linaro.org>
3382
3383 * configure.srv: Update the path of arm-*.xml files.
3384
0a69eedb
YQ
33852016-10-05 Terry Guo <terry.guo@arm.com>
3386 Yao Qi <yao.qi@linaro.org>
3387
3388 * Makefile.in: Adjust the path of rules.
3389 * configure.srv: Update the path of xml files.
3390 * regformats/arm-with-iwmmxt.dat: Regenerated.
3391 * regformats/arm-with-neon.dat: Likewise.
3392 * regformats/arm-with-vfpv2.dat: Likewise.
3393 * regformats/arm-with-vfpv3.dat Likewise.
3394
17e16485
YQ
33952016-09-30 Yao Qi <yao.qi@linaro.org>
3396
3397 PR gdbserver/20627
3398 * target.c (target_stop_and_wait): Don't call
3399 target_continue_no_signal, use resume_stop instead.
3400
edeeb602
YQ
34012016-09-26 Yao Qi <yao.qi@linaro.org>
3402
3403 * linux-low.c (linux_wait_1): Call debug_exit.
3404
503b1c39
PA
34052016-09-23 Pedro Alves <palves@redhat.com>
3406
3407 * Makefile.in (SFILES): Add common/new-op.c.
3408 (OBS): Add common/new-op.o.
3409 (new-op.o): New rule.
3410
74172ecf
SM
34112016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3412
3413 * .gitinore: Ignore more files.
3414
fc6cda2e
YQ
34152016-09-21 Yao Qi <yao.qi@linaro.org>
3416
3417 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3418 23.
3419
bc1e6c81
SDJ
34202016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3421
3422 * server.c (start_inferior): Call target_mourn_inferior instead of
3423 mourn_inferior; pass ptid_t argument to it.
3424 (resume): Likewise.
3425 (handle_target_event): Likewise.
3426 * target.c (target_mourn_inferior): New function.
3427 * target.h (mourn_inferior): Delete macro.
3428
0e00e962
AA
34292016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3430
3431 * linux-low.c (lwp_is_stepping): New function.
3432
1d8cb77d
CL
34332016-09-06 Carl Love <cel@us.ibm.com>
3434
3435 * server.c (start_inferior): Fixed comment, requested comment change
3436 didn't get updated correctly. Removed reference to ptrace () call as
3437 it is only true on Linux systems.
3438
7313bced
CL
34392016-09-06 Carl Love <cel@us.ibm.com>
3440
3441 * server.c (start_inferior): Do not call
3442 function target_post_create_inferior () if the
3443 inferior process has already exited.
3444
cf6de44d
PA
34452016-09-05 Pedro Alves <palves@redhat.com>
3446
3447 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3448 (COMPILE.pre, CC_LD): Use CXX directly.
3449 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3450 * acinclude.m4: Don't include build-with-cxx.m4.
3451 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3452 * configure: Regenerate.
3453
c1da6748
AT
34542016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3455
3456 PR gdb/19495
3457 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3458 call writing data to own_buf.
3459
f2b9e3df
SDJ
34602016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3461
3462 * target.c (mywait): Call target_wait instead of
3463 the_target->wait.
3464 (target_wait): New function.
3465
049a8570
SDJ
34662016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3467
3468 * server.c (start_inferior): New variable 'ptid'. Replace calls
3469 to the_target->resume by target_continue{,_no_signal}, depending
3470 on the case.
3471 * target.c (target_stop_and_wait): Call target_continue_no_signal
3472 instead of the_target->resume.
3473 (target_continue): New function.
3474
3aa5cfa0
AT
34752016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3476
3477 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3478
754653a7
AZ
34792016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3480
3481 PR server/20491
3482 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3483 ps_prochandle.
3484 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3485 * linux-arm-low.c (ps_get_thread_area): Likewise.
3486 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3487 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3488 * linux-mips-low.c (ps_get_thread_area): Likewise.
3489 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3490 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3491 * linux-x86-low.c (ps_get_thread_area): Likewise.
3492 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3493
ed036b40
PA
34942016-08-19 Pedro Alves <palves@redhat.com>
3495
3496 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3497
c8ef42ee
PA
34982016-08-19 Pedro Alves <palves@redhat.com>
3499
3500 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3501 comment. Use memcpy instead of casting through unsigned long.
3502
9c235a72
PA
35032016-08-19 Pedro Alves <palves@redhat.com>
3504
3505 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3506 allocating around 0x80000000.
3507
201506da
PA
35082016-08-19 Pedro Alves <palves@redhat.com>
3509
3510 PR gdb/20415
3511 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3512 (x32-avx512-linux-ipa.o): New rules.
3513 * configure.ac (x86_64-*-linux*): New x32 check.
3514 * configure.srv (ipa_x32_linux_regobj): New.
3515 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3516 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3517 descriptions.
3518 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3519 descriptions.
3520 * configure: Regenerate.
3521
f348d89a
PA
35222016-08-09 Pedro Alves <palves@redhat.com>
3523
3524 PR gdb/18653
3525 * Makefile.in (OBS): Add signals-state-save-restore.o.
3526 (signals-state-save-restore.o): New rule.
3527 * config.in: Regenerate.
3528 * configure: Regenerate.
3529 * linux-low.c: Include "signals-state-save-restore.h".
3530 (linux_create_inferior): Call
3531 restore_original_signals_state.
3532 * server.c: Include "dispositions-save-restore.h".
3533 (captured_main): Call save_original_signals_state.
3534
1baf5149
PA
35352016-08-05 Pedro Alves <palves@redhat.com>
3536
3537 * configure: Regenerate.
3538
fcd4a73d
YQ
35392016-08-04 Yao Qi <yao.qi@linaro.org>
3540
3541 * linux-low.c (regsets_fetch_inferior_registers): Check
3542 errno is ESRCH or not.
3543
979659d0
YQ
35442016-08-02 Yao Qi <yao.qi@linaro.org>
3545
3546 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3547 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3548 (thread_db_load_search): Update.
3549 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3550 td_ta_set_event and td_ta_event_getmsg.
3551
6598661d
PA
35522016-07-26 Pedro Alves <palves@redhat.com>
3553
3554 PR server/20414
3555 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3556 of unsigned long for 64-bit registers and use uint32_t instead of
3557 unsigned int for 32-bit registers.
3558
9cf12d57
PA
35592016-07-26 Pedro Alves <palves@redhat.com>
3560
3561 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3562 to 'ptrace'.
3563
305450ed
TT
35642016-07-21 Tom Tromey <tom@tromey.com>
3565
3566 * configure: Rebuild.
3567
2583da7c
YQ
35682016-07-21 Yao Qi <yao.qi@linaro.org>
3569
3570 * mem-break.c (find_gdb_breakpoint): Cast bp to
3571 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3572
21536b36
YQ
35732016-07-21 Yao Qi <yao.qi@linaro.org>
3574
3575 * server.c (handle_v_requests): Support s and S actions
3576 if target_supports_software_single_step return true.
3577
8901d193
YQ
35782016-07-21 Yao Qi <yao.qi@linaro.org>
3579
3580 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3581 is resume_step, call maybe_hw_step.
3582 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3583 and unstop them.
3584 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3585 breakpoints or not.
3586 (proceed_one_lwp): If resume request is resume_step, install
3587 reinsert breakpoints and call maybe_hw_step.
3588
0e9a339e
YQ
35892016-07-21 Yao Qi <yao.qi@linaro.org>
3590
3591 * linux-low.c (proceed_one_lwp): Declare.
3592 (linux_resume_one_thread): Remove local variable 'step'.
3593 Lift code enqueue signal. Call proceed_one_lwp instead of
3594 linux_resume_one_lwp.
3595
4281b351
YQ
35962016-07-21 Yao Qi <yao.qi@linaro.org>
3597
3598 * linux-low.c (linux_resume_one_thread): Call
3599 enqueue_pending_signal.
3600
984a2c04
YQ
36012016-07-21 Yao Qi <yao.qi@linaro.org>
3602
3603 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3604 * inferiors.c (do_restore_current_thread_cleanup): New function.
3605 (make_cleanup_restore_current_thread): Likewise.
3606 * linux-low.c (install_software_single_step_breakpoints): Call
3607 make_cleanup_restore_current_thread. Switch current_thread to
3608 thread.
3609
bec903c9
YQ
36102016-07-21 Yao Qi <yao.qi@linaro.org>
3611
3612 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3613 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3614 (clone_one_breakpoint): Likewise.
3615 (delete_reinsert_breakpoints): Change parameter to thread.
3616 Callers updated.
3617 (has_reinsert_breakpoints): Likewise.
3618 (uninsert_reinsert_breakpoints): Likewise.
3619 (reinsert_reinsert_breakpoints): Likewise.
3620 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3621 (delete_reinsert_breakpoints): Likewise.
3622 (reinsert_reinsert_breakpoints): Likewise.
3623 (uninsert_reinsert_breakpoints): Likewise.
3624 (has_reinsert_breakpoints): Likewise.
3625
63c40ec7
YQ
36262016-07-21 Yao Qi <yao.qi@linaro.org>
3627
3628 * inferiors.c (get_thread_process): Make parameter const.
3629 * inferiors.h (get_thread_process): Update declaration.
3630 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3631 Add new parameters child_thread and parent_thread. Callers
3632 updated.
3633 * mem-break.h (clone_all_breakpoints): Update declaration.
3634
9aa76cd0
YQ
36352016-07-21 Yao Qi <yao.qi@linaro.org>
3636
3637 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3638 <command_list, handler>: Remove.
3639 (struct gdb_breakpoint): New.
3640 (struct other_breakpoint): New.
3641 (struct reinsert_breakpoint): New.
3642 (is_gdb_breakpoint): New function.
3643 (any_persistent_commands): Update command_list if
3644 is_gdb_breakpoint returns true.
3645 (set_breakpoint): Create breakpoints according to their types.
3646 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3647 (set_gdb_breakpoint_1): Likewise.
3648 (set_gdb_breakpoint): Likewise.
3649 (clear_breakpoint_conditions): Change parameter type to
3650 'struct gdb_breakpoint *'.
3651 (clear_breakpoint_commands): Likewise.
3652 (clear_breakpoint_conditions_and_commands): Likewise.
3653 (add_condition_to_breakpoint): Likewise.
3654 (add_breakpoint_condition): Likewise.
3655 (add_commands_to_breakpoint): Likewise.
3656 (check_breakpoints): Check other_breakpoint.
3657 (clone_one_breakpoint): Clone breakpopint according to its type.
3658 * mem-break.h (struct gdb_breakpoint): Declare.
3659 (set_gdb_breakpoint): Update declaration.
3660 (clear_breakpoint_conditions_and_commands): Likewise.
3661 (add_breakpoint_condition): Likewise.
3662 (add_breakpoint_commands): Likewise.
3663 * server.c (process_point_options): Change parameter type to
3664 'struct gdb_breakpoint *'.
3665
811f8301
YQ
36662016-07-21 Yao Qi <yao.qi@linaro.org>
3667
3668 * mem-break.c (set_breakpoint_at): Rename it to ...
3669 (set_breakpoint_type_at): ... it.
3670 (set_breakpoint_at): Call set_breakpoint_type_at.
3671 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3672 * mem-break.h (set_breakpoint_at): Update comments.
3673
b1c51e36
CLT
36742016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3675
3676 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3677 to buf parameter.
3678 (nios2_store_gregset): Likewise.
3679
ced2dffb
PA
36802016-07-01 Pedro Alves <palves@redhat.com>
3681 Antoine Tremblay <antoine.tremblay@ericsson.com>
3682
3683 * linux-low.c: Change interface to take the target lwp_info
3684 pointer directly and return void. Handle detaching from a zombie
3685 thread.
3686 (linux_detach_lwp_callback): New function.
3687 (linux_detach): Detach from the leader thread after detaching from
3688 the clone threads.
3689
2ac09a5b
YQ
36902016-06-28 Yao Qi <yao.qi@linaro.org>
3691
3692 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3693 for variable new_offset.
3694 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3695 (aarch64_ftrace_insn_reloc_cb): Likewise.
3696 (aarch64_ftrace_insn_reloc_tb): Likewise.
3697 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3698 PRIx64 instead of PRIx32.
3699
79e7fd4f
YQ
37002016-06-28 Yao Qi <yao.qi@linaro.org>
3701
3702 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3703 (the_low_target): Install arm_get_syscall_trapinfo.
3704
061fc021
YQ
37052016-06-28 Yao Qi <yao.qi@linaro.org>
3706
3707 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3708 function.
3709 (the_low_target): Install aarch64_get_syscall_trapinfo.
3710
4cc32bec
YQ
37112016-06-28 Yao Qi <yao.qi@linaro.org>
3712
3713 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3714 Callers updated.
3715 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3716 Remove parameter sysno.
3717 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3718 sysret.
3719
782c1122
AA
37202016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3721
3722 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3723 (s390_emit_ne_goto): Likewise.
3724 (s390_emit_lt_goto): Likewise.
3725 (s390_emit_le_goto): Likewise.
3726 (s390_emit_gt_goto): Likewise.
3727 (s390_emit_ge_goto): Likewise.
3728 (s390x_emit_eq_goto): Likewise.
3729 (s390x_emit_ne_goto): Likewise.
3730 (s390x_emit_lt_goto): Likewise.
3731 (s390x_emit_le_goto): Likewise.
3732 (s390x_emit_gt_goto): Likewise.
3733 (s390x_emit_ge_goto): Likewise.
3734 (s390_emit_ops_impl): Mark variable static.
3735 (s390x_emit_ops): Likewise.
3736
2e7b624b
YQ
37372016-06-17 Yao Qi <yao.qi@linaro.org>
3738
3739 * linux-low.c (handle_extended_wait): Call
3740 uninsert_reinsert_breakpoints for the parent process. Remove
3741 reinsert breakpoints from the child process. Reinsert them to
3742 the parent process when vfork is done.
3743 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3744 (reinsert_reinsert_breakpoints): New function.
3745 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3746 (reinsert_reinsert_breakpoints): Declare.
3747
8a81c5d7
YQ
37482016-06-17 Yao Qi <yao.qi@linaro.org>
3749
3750 * linux-low.c (handle_extended_wait): If the parent is doing
3751 step-over, remove the reinsert breakpoints from the forked child.
3752
f50bf8e5
YQ
37532016-06-17 Yao Qi <yao.qi@linaro.org>
3754
3755 * linux-low.c (unsuspend_all_lwps): Declare.
3756 (linux_low_filter_event): If thread exited, call finish_step_over.
3757 If step-over is finished, unsuspend other threads.
3758
8376a3cb
YQ
37592016-06-17 Yao Qi <yao.qi@linaro.org>
3760
3761 * linux-low.c (linux_resume_one_lwp_throw): Assert
3762 has_reinsert_breakpoints returns false.
3763 * mem-break.c (delete_disabled_breakpoints): Assert
3764 bp type isn't reinsert_breakpoint.
3765
f79b145d
YQ
37662016-06-17 Yao Qi <yao.qi@linaro.org>
3767
3768 * linux-low.c (maybe_hw_step): New function.
3769 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3770 (finish_step_over): Switch current_thread to lwp temporarily,
3771 and assert has_reinsert_breakpoints returns true.
3772 (proceed_one_lwp): Call maybe_hw_step.
3773 * mem-break.c (has_reinsert_breakpoints): New function.
3774 * mem-break.h (has_reinsert_breakpoints): Declare.
3775
0ae534d2
JT
37762016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3777
3778 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3779
fcdad592
YQ
37802016-05-17 Yao Qi <yao.qi@linaro.org>
3781
3782 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3783 instead of find_inferior.
3784
9e784964
YQ
37852016-05-05 Yao Qi <yao.qi@linaro.org>
3786
3787 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3788 Initialize res to zero.
3789
cf2ebb6e
YQ
37902016-05-05 Yao Qi <yao.qi@linaro.org>
3791
3792 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3793 to uint32_t.
3794
c1aebf87
UW
37952016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3796
3797 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3798 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3799 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3800
35fd2deb 38012016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3802 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3803
3804 * tracepoint.c (write_inferior_int8): New function.
3805 (cmd_qtenable_disable): Write enable flag using
3806 write_inferior_int8.
3807
484b3c32
YQ
38082016-04-25 Yao Qi <yao.qi@linaro.org>
3809
3810 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3811 (need_step_over_p): Return zero if the LWP has pending signals
3812 can be delivered on software single step target.
3813
85ba7d86
YQ
38142016-04-25 Yao Qi <yao.qi@linaro.org>
3815
3816 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3817 return instead of error.
3818
3539aa13
YQ
38192016-04-22 Yao Qi <yao.qi@linaro.org>
3820
3821 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3822 to 23.
3823
5b061e98
YQ
38242016-04-22 Yao Qi <yao.qi@linaro.org>
3825
3826 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3827 signal when stepping over breakpoint with software single
3828 step.
3829
3451269c
PA
38302016-04-21 Pedro Alves <palves@redhat.com>
3831
3832 * linux-s390-low.c (s390_collect_ptrace_register)
3833 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3834 add casts.
3835 (s390_check_regset): Use void * instead of gdb_byte *.
3836
a2358508
PA
38372016-04-20 Pedro Alves <palves@redhat.com>
3838
3839 * configure: Renegerate.
3840
6885166d
YQ
38412016-04-20 Yao Qi <yao.qi@linaro.org>
3842
3843 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3844 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3845 number 16.
3846 (arm_store_gregset): Likewise.
3847
2b863f51
WT
38482016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3849
3850 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3851 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3852 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3853 (amd64-avx-mpx-linux.c): New rules.
3854 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3855 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3856 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3857 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3858 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3859 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3860 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3861 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3862 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3863 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3864 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3865 * linux-x86-low.c (x86_linux_read_description): Add case for
3866 X86_XSTATE_AVX_MPX_MASK.
3867 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3868 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3869 init_registers_i386_avx_mpx_linux.
3870 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3871 (initialize_low_tracepoint): Call
3872 init_registers_i386_avx_mpx_linux.
3873 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3874 (initialize_low_tracepoint): Call
3875 init_registers_amd64_avx_mpx_linux.
3876 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3877 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3878 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3879 declarations.
3880
9b30624b
PA
38812016-04-18 Pedro Alves <palves@redhat.com>
3882
3883 * configure: Regenerate.
3884
45e3745e
AT
38852016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3886
3887 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3888 (aarch64_emit_sub): Likewise.
3889
2afc13ff
PA
38902016-04-12 Pedro Alves <palves@redhat.com>
3891
3892 * utils.c (prepare_to_throw_exception): Delete.
3893
6e774b13
SM
38942016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3895
3896 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3897
4dca19f8
MK
38982016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3899
3900 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3901
d0a9981f
MK
39022016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3903
3904 * linux-aarch64-ipa.c: Add <elf.h> include.
3905 * linux-ppc-ipa.c: Add <elf.h> include.
3906 * linux-s390-ipa.c: Add <elf.h> include.
3907
252db07e
MK
39082016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3909
3910 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3911 (get_raw_reg_ptr): Likewise.
3912 (get_trace_state_variable_value_ptr): Likewise.
3913 (set_trace_state_variable_value_ptr): Likewise.
3914 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3915 char *.
3916
14e2b6d9
MK
39172016-03-31 Wei-cheng Wang <cole945@gmail.com>
3918 Marcin Kościelnicki <koriakin@0x04.net>
3919
3920 PR/17221
3921 * linux-ppc-low.c (emit_insns): New function.
3922 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3923 (ppc_emit_prologue): New function.
3924 (ppc_emit_epilogue): New function.
3925 (ppc_emit_add): New function.
3926 (ppc_emit_sub): New function.
3927 (ppc_emit_mul): New function.
3928 (ppc_emit_lsh): New function.
3929 (ppc_emit_rsh_signed): New function.
3930 (ppc_emit_rsh_unsigned): New function.
3931 (ppc_emit_ext): New function.
3932 (ppc_emit_zero_ext): New function.
3933 (ppc_emit_log_not): New function.
3934 (ppc_emit_bit_and): New function.
3935 (ppc_emit_bit_or): New function.
3936 (ppc_emit_bit_xor): New function.
3937 (ppc_emit_bit_not): New function.
3938 (ppc_emit_equal): New function.
3939 (ppc_emit_less_signed): New function.
3940 (ppc_emit_less_unsigned): New function.
3941 (ppc_emit_ref): New function.
3942 (ppc_emit_const): New function.
3943 (ppc_emit_reg): New function.
3944 (ppc_emit_pop): New function.
3945 (ppc_emit_stack_flush): New function.
3946 (ppc_emit_swap): New function.
3947 (ppc_emit_stack_adjust): New function.
3948 (ppc_emit_call): New function.
3949 (ppc_emit_int_call_1): New function.
3950 (ppc_emit_void_call_2): New function.
3951 (ppc_emit_if_goto): New function.
3952 (ppc_emit_goto): New function.
3953 (ppc_emit_eq_goto): New function.
3954 (ppc_emit_ne_goto): New function.
3955 (ppc_emit_lt_goto): New function.
3956 (ppc_emit_le_goto): New function.
3957 (ppc_emit_gt_goto): New function.
3958 (ppc_emit_ge_goto): New function.
3959 (ppc_write_goto_address): New function.
3960 (ppc_emit_ops_impl): New static variable.
3961 (ppc64v1_emit_prologue): New function.
3962 (ppc64v2_emit_prologue): New function.
3963 (ppc64_emit_epilogue): New function.
3964 (ppc64_emit_add): New function.
3965 (ppc64_emit_sub): New function.
3966 (ppc64_emit_mul): New function.
3967 (ppc64_emit_lsh): New function.
3968 (ppc64_emit_rsh_signed): New function.
3969 (ppc64_emit_rsh_unsigned): New function.
3970 (ppc64_emit_ext): New function.
3971 (ppc64_emit_zero_ext): New function.
3972 (ppc64_emit_log_not): New function.
3973 (ppc64_emit_bit_and): New function.
3974 (ppc64_emit_bit_or): New function.
3975 (ppc64_emit_bit_xor): New function.
3976 (ppc64_emit_bit_not): New function.
3977 (ppc64_emit_equal): New function.
3978 (ppc64_emit_less_signed): New function.
3979 (ppc64_emit_less_unsigned): New function.
3980 (ppc64_emit_ref): New function.
3981 (ppc64_emit_const): New function.
3982 (ppc64v1_emit_reg): New function.
3983 (ppc64v2_emit_reg): New function.
3984 (ppc64_emit_pop): New function.
3985 (ppc64_emit_stack_flush): New function.
3986 (ppc64_emit_swap): New function.
3987 (ppc64v1_emit_call): New function.
3988 (ppc64v2_emit_call): New function.
3989 (ppc64v1_emit_int_call_1): New function.
3990 (ppc64v2_emit_int_call_1): New function.
3991 (ppc64v1_emit_void_call_2): New function.
3992 (ppc64v2_emit_void_call_2): New function.
3993 (ppc64_emit_if_goto): New function.
3994 (ppc64_emit_eq_goto): New function.
3995 (ppc64_emit_ne_goto): New function.
3996 (ppc64_emit_lt_goto): New function.
3997 (ppc64_emit_le_goto): New function.
3998 (ppc64_emit_gt_goto): New function.
3999 (ppc64_emit_ge_goto): New function.
4000 (ppc64v1_emit_ops_impl): New static variable.
4001 (ppc64v2_emit_ops_impl): New static variable.
4002 (ppc_emit_ops): New function.
4003 (linux_low_target): Wire in ppc_emit_ops.
4004
a2174ba4
MK
40052016-03-31 Wei-cheng Wang <cole945@gmail.com>
4006 Marcin Kościelnicki <koriakin@0x04.net>
4007
4008 PR/17221
4009 * Makefile.in: Add powerpc-*-ipa.o
4010 * configure.srv: Add ipa_obj for powerpc*-linux.
4011 * linux-ppc-ipa.c: New file.
4012 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4013 includes.
4014 (PPC_FIELD): New macro.
4015 (PPC_SEXT): New macro.
4016 (PPC_OP6): New macro.
4017 (PPC_BO): New macro.
4018 (PPC_LI): New macro.
4019 (PPC_BD): New macro.
4020 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4021 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4022 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4023 (ppc_get_thread_area): New function.
4024 (is_elfv2_inferior): New function.
4025 (gen_ds_form): New function.
4026 (GEN_STD): New macro.
4027 (GEN_STDU): New macro.
4028 (GEN_LD): New macro.
4029 (GEN_LDU): New macro.
4030 (gen_d_form): New function.
4031 (GEN_ADDI): New macro.
4032 (GEN_ADDIS): New macro.
4033 (GEN_LI): New macro.
4034 (GEN_LIS): New macro.
4035 (GEN_ORI): New macro.
4036 (GEN_ORIS): New macro.
4037 (GEN_LWZ): New macro.
4038 (GEN_STW): New macro.
4039 (GEN_STWU): New macro.
4040 (gen_xfx_form): New function.
4041 (GEN_MFSPR): New macro.
4042 (GEN_MTSPR): New macro.
4043 (GEN_MFCR): New macro.
4044 (GEN_MTCR): New macro.
4045 (GEN_SYNC): New macro.
4046 (GEN_LWSYNC): New macro.
4047 (gen_x_form): New function.
4048 (GEN_OR): New macro.
4049 (GEN_MR): New macro.
4050 (GEN_LWARX): New macro.
4051 (GEN_STWCX): New macro.
4052 (GEN_CMPW): New macro.
4053 (gen_md_form): New function.
4054 (GEN_RLDICL): New macro.
4055 (GEN_RLDICR): New macro.
4056 (gen_i_form): New function.
4057 (GEN_B): New macro.
4058 (GEN_BL): New macro.
4059 (gen_b_form): New function.
4060 (GEN_BNE): New macro.
4061 (GEN_LOAD): New macro.
4062 (GEN_STORE): New macro.
4063 (gen_limm): New function.
4064 (gen_atomic_xchg): New function.
4065 (gen_call): New function.
4066 (ppc_relocate_instruction): New function.
4067 (ppc_install_fast_tracepoint_jump_pad): New function.
4068 (ppc_get_min_fast_tracepoint_insn_len): New function.
4069 (ppc_get_ipa_tdesc_idx): New function.
4070 (the_low_target): Wire in the new functions.
4071 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4072 tdescs.
4073 * linux-ppc-tdesc.h: New file.
4074
a13c4696
MK
40752016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4076
4077 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4078 (alloc_jump_pad_buffer): New function.
4079 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4080 (alloc_jump_pad_buffer): New function.
4081 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4082 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4083 (alloc_jump_pad_buffer): New function.
4084 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4085 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4086 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4087 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4088
1cda1512
MK
40892016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4090
4091 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4092 * linux-amd64-ipa.c: Likewise.
4093 * linux-i386-ipa.c: Likewise.
4094 * linux-s390-ipa.c: Likewise.
4095 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4096 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4097 set_trace_state_variable_value_ptr.
4098 (struct ipa_sym_addresses): Likewise.
4099 (symbol_list): Likewise.
4100 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4101 accessing gdb_collect directly.
4102 (gdb_collect_ptr_type): New typedef.
4103 (get_raw_reg_ptr_type): New typedef.
4104 (get_trace_state_variable_value_ptr_type): New typedef.
4105 (set_trace_state_variable_value_ptr_type): New typedef.
4106 (gdb_collect_ptr): New global.
4107 (get_raw_reg_ptr): New global.
4108 (get_trace_state_variable_value_ptr): New global.
4109 (set_trace_state_variable_value_ptr): New global.
4110 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4111 accessing get_raw_reg directly.
4112 (get_get_tsv_func_addr): Likewise for
4113 get_trace_state_variable_value_ptr.
4114 (get_set_tsv_func_addr): Likewise for
4115 set_trace_state_variable_value_ptr.
4116 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4117
72fb5488
SM
41182016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4119
4120 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4121
28170b88
MK
41222016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4123
4124 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4125 packets.
4126 (relocate_instruction): Remove own_buf.
4127 * server.c (own_buf): Make global.
4128 (handle_v_requests): Make global.
4129 * server.h (own_buf): New declaration.
4130 (handle_v_requests): New prototype.
4131
f39e8743
MK
41322016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4133
4134 PR 18377
4135 * linux-s390-low.c (add_insns): New function.
4136 (s390_emit_prologue): New function.
4137 (s390_emit_epilogue): New function.
4138 (s390_emit_add): New function.
4139 (s390_emit_sub): New function.
4140 (s390_emit_mul): New function.
4141 (s390_emit_lsh): New function.
4142 (s390_emit_rsh_signed): New function.
4143 (s390_emit_rsh_unsigned): New function.
4144 (s390_emit_ext): New function.
4145 (s390_emit_log_not): New function.
4146 (s390_emit_bit_and): New function.
4147 (s390_emit_bit_or): New function.
4148 (s390_emit_bit_xor): New function.
4149 (s390_emit_bit_not): New function.
4150 (s390_emit_equal): New function.
4151 (s390_emit_less_signed): New function.
4152 (s390_emit_less_unsigned): New function.
4153 (s390_emit_ref): New function.
4154 (s390_emit_if_goto): New function.
4155 (s390_emit_goto): New function.
4156 (s390_write_goto_address): New function.
4157 (s390_emit_litpool): New function.
4158 (s390_emit_const): New function.
4159 (s390_emit_call): New function.
4160 (s390_emit_reg): New function.
4161 (s390_emit_pop): New function.
4162 (s390_emit_stack_flush): New function.
4163 (s390_emit_zero_ext): New function.
4164 (s390_emit_swap): New function.
4165 (s390_emit_stack_adjust): New function.
4166 (s390_emit_set_r2): New function.
4167 (s390_emit_int_call_1): New function.
4168 (s390_emit_void_call_2): New function.
4169 (s390_emit_eq_goto): New function.
4170 (s390_emit_ne_goto): New function.
4171 (s390_emit_lt_goto): New function.
4172 (s390_emit_le_goto): New function.
4173 (s390_emit_gt_goto): New function.
4174 (s390_emit_ge_goto): New function.
4175 (s390x_emit_prologue): New function.
4176 (s390x_emit_epilogue): New function.
4177 (s390x_emit_add): New function.
4178 (s390x_emit_sub): New function.
4179 (s390x_emit_mul): New function.
4180 (s390x_emit_lsh): New function.
4181 (s390x_emit_rsh_signed): New function.
4182 (s390x_emit_rsh_unsigned): New function.
4183 (s390x_emit_ext): New function.
4184 (s390x_emit_log_not): New function.
4185 (s390x_emit_bit_and): New function.
4186 (s390x_emit_bit_or): New function.
4187 (s390x_emit_bit_xor): New function.
4188 (s390x_emit_bit_not): New function.
4189 (s390x_emit_equal): New function.
4190 (s390x_emit_less_signed): New function.
4191 (s390x_emit_less_unsigned): New function.
4192 (s390x_emit_ref): New function.
4193 (s390x_emit_if_goto): New function.
4194 (s390x_emit_const): New function.
4195 (s390x_emit_call): New function.
4196 (s390x_emit_reg): New function.
4197 (s390x_emit_pop): New function.
4198 (s390x_emit_stack_flush): New function.
4199 (s390x_emit_zero_ext): New function.
4200 (s390x_emit_swap): New function.
4201 (s390x_emit_stack_adjust): New function.
4202 (s390x_emit_int_call_1): New function.
4203 (s390x_emit_void_call_2): New function.
4204 (s390x_emit_eq_goto): New function.
4205 (s390x_emit_ne_goto): New function.
4206 (s390x_emit_lt_goto): New function.
4207 (s390x_emit_le_goto): New function.
4208 (s390x_emit_gt_goto): New function.
4209 (s390x_emit_ge_goto): New function.
4210 (s390_emit_ops): New function.
4211 (struct linux_target_ops): Fill in emit_ops hook.
4212
abd9baf9
MK
42132016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4214
4215 PR 18377
4216 * Makefile.in: Add s390 IPA files.
4217 * configure.srv: Build IPA for s390.
4218 * linux-s390-ipa.c: New file.
4219 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4220 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4221 (tdesc_s390_linux32): Likewise.
4222 (init_registers_s390_linux32v1): Likewise.
4223 (tdesc_s390_linux32v1): Likewise.
4224 (init_registers_s390_linux32v2): Likewise.
4225 (tdesc_s390_linux32v2): Likewise.
4226 (init_registers_s390_linux64): Likewise.
4227 (tdesc_s390_linux64): Likewise.
4228 (init_registers_s390_linux64v1): Likewise.
4229 (tdesc_s390_linux64v1): Likewise.
4230 (init_registers_s390_linux64v2): Likewise.
4231 (tdesc_s390_linux64v2): Likewise.
4232 (init_registers_s390_te_linux64): Likewise.
4233 (tdesc_s390_te_linux64): Likewise.
4234 (init_registers_s390_vx_linux64): Likewise.
4235 (tdesc_s390_vx_linux64): Likewise.
4236 (init_registers_s390_tevx_linux64): Likewise.
4237 (tdesc_s390_tevx_linux64): Likewise.
4238 (init_registers_s390x_linux64): Likewise.
4239 (tdesc_s390x_linux64): Likewise.
4240 (init_registers_s390x_linux64v1): Likewise.
4241 (tdesc_s390x_linux64v1): Likewise.
4242 (init_registers_s390x_linux64v2): Likewise.
4243 (tdesc_s390x_linux64v2): Likewise.
4244 (init_registers_s390x_te_linux64): Likewise.
4245 (tdesc_s390x_te_linux64): Likewise.
4246 (init_registers_s390x_vx_linux64): Likewise.
4247 (tdesc_s390x_vx_linux64): Likewise.
4248 (init_registers_s390x_tevx_linux64): Likewise.
4249 (tdesc_s390x_tevx_linux64): Likewise.
4250 (have_hwcap_s390_vx): New static variable.
4251 (s390_arch_setup): Fill have_hwcap_s390_vx.
4252 (s390_get_thread_area): New function.
4253 (s390_ft_entry_gpr_esa): New const.
4254 (s390_ft_entry_gpr_zarch): New const.
4255 (s390_ft_entry_misc): New const.
4256 (s390_ft_entry_fr): New const.
4257 (s390_ft_entry_vr): New const.
4258 (s390_ft_main_31): New const.
4259 (s390_ft_main_64): New const.
4260 (s390_ft_exit_fr): New const.
4261 (s390_ft_exit_vr): New const.
4262 (s390_ft_exit_misc): New const.
4263 (s390_ft_exit_gpr_esa): New const.
4264 (s390_ft_exit_gpr_zarch): New const.
4265 (append_insns): New function.
4266 (s390_relocate_instruction): New function.
4267 (s390_install_fast_tracepoint_jump_pad): New function.
4268 (s390_get_min_fast_tracepoint_insn_len): New function.
4269 (s390_get_ipa_tdesc_idx): New function.
4270 (struct linux_target_ops): Wire in the above functions.
4271 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4272 * linux-s390-tdesc.h: New file.
4273
a4105d04
MK
42742016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4275
4276 * linux-s390-low.c (s390_supports_tracepoints): New function.
4277 (struct linux_target_ops): Fill supports_tracepoints hook.
4278
35ac8b3e
YQ
42792016-03-18 Yao Qi <yao.qi@linaro.org>
4280
4281 * linux-low.c (lwp_signal_can_be_delivered): New function.
4282 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4283
94610ec4
YQ
42842016-03-18 Yao Qi <yao.qi@linaro.org>
4285
4286 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4287 0 if signal is enqueued. Remove 'signal' from one debugging
4288 message. Move one debugging message to some lines below.
4289 Remove code setting 'signal' to 0.
4290
80aea927
YQ
42912016-03-18 Yao Qi <yao.qi@linaro.org>
4292
4293 * linux-low.c (linux_low_filter_event): Remove redundant
4294 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4295
b04fd3be
MK
42962016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4297
4298 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4299 (struct linux_target_ops): Wire in the above.
4300
c40c8d4b
YQ
43012016-03-03 Yao Qi <yao.qi@linaro.org>
4302
4303 * linux-low.c: Update comments to start_step_over.
4304
0f8288ae
YQ
43052016-03-03 Yao Qi <yao.qi@linaro.org>
4306
4307 PR server/19736
4308 * linux-low.c (handle_extended_wait): Set child suspended
4309 if event_lwp->bp_reinsert isn't zero.
4310
fdbd04a8
YQ
43112016-03-02 Yao Qi <yao.qi@linaro.org>
4312
4313 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4314 enqueue_pending_signal.
4315
6896a8fa
MK
43162016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4317
4318 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4319 is actually loaded.
4320
ab503087
MK
43212016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4322
4323 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4324 (s390_regmap_3264) [!__s390x__]: New global.
4325 (s390_collect_ptrace_register): Skip map entries containing -1.
4326 (s390_supply_ptrace_register): Ditto.
4327 (s390_fill_gprs_high): New function.
4328 (s390_store_gprs_high): New function.
4329 (s390_regsets): Add NT_S390_HIGH_GPRS.
4330 (s390_get_hwcap): Enable on 31-bit.
4331 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4332 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4333 Detect NT_S390_HIGH_GPRS.
4334 (s390_usrregs_info_3264): Enable on 31-bit.
4335 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4336 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4337
ae91f625
MK
43382016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4339
4340 PR gdb/13808
4341 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4342 * configure.srv: Ditto.
4343 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4344 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4345 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4346 (init_registers_amd64_linux): Remove prototype.
4347 (tdesc_amd64_linux): Remove declaration.
4348 (get_ipa_tdesc): New function.
4349 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4350 initialize remaining tdescs.
4351 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4352 (init_registers_i386_linux): Remove prototype.
4353 (tdesc_i386_linux): Remove declaration.
4354 (get_ipa_tdesc): New function.
4355 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4356 initialize remaining tdescs.
4357 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4358 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4359 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4360 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4361 (x86_get_ipa_tdesc_idx): New function.
4362 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4363 * linux-x86-tdesc.h: New file.
4364 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4365 (target_get_ipa_tdesc_idx): New macro.
4366 * tracepoint.c (ipa_tdesc_idx): New macro.
4367 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4368 (symbol_list): Add ipa_tdesc_idx.
4369 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4370 (ipa_tdesc): Remove.
4371 (ipa_tdesc_idx): New variable.
4372 (get_context_regcache): Use get_ipa_tdesc.
4373 (gdb_collect): Ditto.
4374 (gdb_probe): Ditto.
4375 * tracepoint.h (get_ipa_tdesc): New prototype.
4376 (ipa_tdesc): Remove.
4377
e7ad2f14
PA
43782016-02-24 Pedro Alves <palves@redhat.com>
4379
4380 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4381 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4382 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4383 Factor out common code between the USE_SIGTRAP_SIGINFO and
4384 !USE_SIGTRAP_SIGINFO blocks.
4385 (linux_low_filter_event): Call save_stop_reason instead of
4386 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4387 Update comments.
4388 (linux_wait_1): Update comments.
4389
657f9cde
WW
43902016-02-24 Wei-cheng Wang <cole945@gmail.com>
4391
4392 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4393 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4394 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4395 ppc_insert_point, ppc_remove_point.
4396
b00b61e1
MK
43972016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4398
4399 * linux-s390-low.c (s390_supports_z_point_type): New function.
4400 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4401
553cb527
YQ
44022016-02-16 Yao Qi <yao.qi@linaro.org>
4403
4404 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4405 PC. Get pc from regcache_read_pc.
4406
a5652c21
YQ
44072016-02-12 Yao Qi <yao.qi@linaro.org>
4408
4409 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4410 or linux_get_pc_32bit.
4411 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4412
ed443b61
YQ
44132016-02-12 Yao Qi <yao.qi@linaro.org>
4414
4415 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4416 arm_linux_get_next_pcs_fixup.
4417
020ecd38
MK
44182016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4419
4420 * tracepoint.c (x_tracepoint_action_download): Change
4421 write_inferior_data_ptr to write_inferior_data_pointer.
4422 (cmd_qtstart): Likewise.
4423 (write_inferior_data_ptr): Remove.
4424 (download_agent_expr): Change write_inferior_data_ptr to
4425 write_inferior_data_pointer.
4426 (download_tracepoint_1): Likewise.
4427 (download_tracepoint): Likewise.
4428 (download_trace_state_variables): Likewise.
4429
7cae9051
WW
44302016-02-11 Wei-cheng Wang <cole945@gmail.com>
4431 Marcin Kościelnicki <koriakin@0x04.net>
4432
4433 * tracepoint.c (struct tracepoint_action_ops): Remove.
4434 (struct tracepoint_action): Remove ops.
4435 (m_tracepoint_action_download, r_tracepoint_action_download)
4436 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4437 size and offset accordingly.
4438 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4439 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4440 (tracepoint_action_send, tracepoint_action_download): New functions.
4441 Helpers for trace action handlers.
4442 (add_tracepoint_action): Remove setup actions ops.
4443 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4444
9f6a71b4
YQ
44452016-02-10 Yao Qi <yao.qi@linaro.org>
4446
4447 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4448
1e94266c
SM
44492016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4450
4451 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4452 to AC_OUTPUT.
4453 * configure: Regenerate.
4454
8adce034
SM
44552016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4456
4457 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4458 void * to gdb_byte *.
4459 * linux-low.c (siginfo_fixup): Likewise.
4460 (linux_xfer_siginfo): Likewise.
4461 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4462 Likewise.
4463 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4464
93813b37
WT
44652016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4466
4467 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4468 to srv_tgtobj.
4469 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4470 to srv_tgtobj.
4471 * linux-x86-low.c [__x86_64__]: Include
4472 "nat/amd64-linux-siginfo.h".
4473 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4474 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4475 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4476 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4477 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4478 (cpt_si_fd, si_timerid, si_overrun): Move from
4479 nat/amd64-linux-siginfo.c.
4480 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4481
8424cc97
SM
44822016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4483
4484 * server.c (skip_to_semicolon): Remove.
4485 (process_point_options): Use strchrnul instead of
4486 skip_to_semicolon.
4487
4d18591b
YQ
44882016-01-26 Yao Qi <yao.qi@linaro.org>
4489
4490 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4491 * linux-low.c (install_software_single_step_breakpoints): Don't
4492 call regcache_read_pc.
4493 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4494 argument pc.
4495
d8020970
YQ
44962016-01-26 Yao Qi <yao.qi@linaro.org>
4497
4498 * linux-low.c (install_software_single_step_breakpoints): Call
4499 regcache_read_pc instead of get_pc.
4500
8b207339
YQ
45012016-01-26 Yao Qi <yao.qi@linaro.org>
4502
4503 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4504 (unblock_async_io): Rename to ...
4505 (block_unblock_async_io): ... it. New function.
4506 (enable_async_io): Don't install SIGIO handler. Unblock it
4507 instead.
4508 (disable_async_io): Don't ignore SIGIO. Block it instead.
4509 (initialize_async_io): Install SIGIO handler. Don't call
4510 unblock_async_io.
4511
18879fef
YQ
45122016-01-26 Yao Qi <yao.qi@linaro.org>
4513
4514 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4515 first character is '\003', call *the_target->request_interrupt.
4516
a0f8e08a
YQ
45172016-01-25 Yao Qi <yao.qi@linaro.org>
4518
4519 * remote-utils.c (new_thread_notify): Remove.
4520 (dead_thread_notify): Likewise.
4521 * remote-utils.h (new_thread_notify): Remove declaration.
4522 (dead_thread_notify): Likewise.
4523
cc5fd9ab
MK
45242016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4525
4526 * gdb.trace/pending.exp: Fix expected message on continue.
4527
99e8eb11
MK
45282016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4529
4530 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4531 it works properly on big-endian machines where sizeof (CORE_ADDR)
4532 != sizeof (void *).
4533
a994041d
PA
45342016-01-21 Pedro Alves <palves@redhat.com>
4535
4536 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4537 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4538 * configure: Regenerate.
4539
f7a6a40d
YQ
45402016-01-21 Yao Qi <yao.qi@linaro.org>
4541
4542 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4543 is_thumb and set it according to CPSR saved on the stack.
4544 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4545 arm_sigreturn_next_pc.
4546
6f69e520
YQ
45472016-01-18 Yao Qi <yao.qi@linaro.org>
4548
4549 * linux-low.c (linux_set_pc_64bit): New function.
4550 (linux_get_pc_64bit): New function.
4551 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4552 Declare.
4553 * linux-sparc-low.c (debug_threads): Remove declaration.
4554 (sparc_get_pc): Remove.
4555 (the_low_target): Use linux_get_pc_64bit instead of
4556 sparc_get_pc.
4557 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4558 (the_low_target): Use linux_get_pc_64bit and
4559 linux_set_pc_64bit.
4560
276d4552
YQ
45612016-01-18 Yao Qi <yao.qi@linaro.org>
4562
4563 * linux-arm-low.c (debug_threads): Remove declaration.
4564 (arm_get_pc, arm_set_pc): Remove.
4565 (the_low_target): Use linux_get_pc_32bit and
4566 linux_set_pc_32bit.
4567 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4568 (the_low_target): Use linux_get_pc_32bit and
4569 linux_set_pc_32bit.
4570 * linux-cris-low.c (debug_threads): Remove declaration.
4571 (cris_get_pc, cris_set_pc,): Remove.
4572 (the_low_target): Use linux_get_pc_32bit and
4573 linux_set_pc_32bit.
4574 * linux-crisv32-low.c (debug_threads): Remove declaration.
4575 (cris_get_pc, cris_set_pc): Remove.
4576 (the_low_target): Use linux_get_pc_32bit and
4577 linux_set_pc_32bit.
4578 * linux-low.c: Include inttypes.h.
4579 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4580 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4581 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4582 (the_low_target): Use linux_get_pc_32bit and
4583 linux_set_pc_32bit.
4584 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4585 (the_low_target): Use linux_get_pc_32bit and
4586 linux_set_pc_32bit.
4587 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4588 (the_low_target): Use linux_get_pc_32bit and
4589 linux_set_pc_32bit.
4590 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4591 (the_low_target): Use linux_get_pc_32bit and
4592 linux_set_pc_32bit.
4593 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4594 (the_low_target): Use linux_get_pc_32bit and
4595 linux_set_pc_32bit.
4596
eb0edac8
GB
45972016-01-18 Gary Benson <gbenson@redhat.com>
4598
4599 * configure.ac (AC_FUNC_FORK): New check.
4600 * config.in: Regenerate.
4601 * configure: Likewise.
4602
1b451dda
YQ
46032016-01-14 Yao Qi <yao.qi@linaro.org>
4604
4605 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4606 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4607 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4608 arm_get_next_pcs_ctor.
4609
82075af2
JS
46102016-01-12 Josh Stone <jistone@redhat.com>
4611 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4612
4613 * inferiors.h: Include "gdb_vecs.h".
4614 (struct process_info): Add syscalls_to_catch.
4615 * inferiors.c (remove_process): Free syscalls_to_catch.
4616 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4617 syscall_return stops.
4618 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4619 * server.c (handle_general_set): Handle QCatchSyscalls.
4620 (handle_query): Report support for QCatchSyscalls.
4621 * target.h (struct target_ops): Add supports_catch_syscall.
4622 (target_supports_catch_syscall): New macro.
4623 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4624 (struct lwp_info): Add syscall_state.
4625 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4626 Maintain syscall_state and syscalls_to_catch across exec.
4627 (get_syscall_trapinfo): New function, proxy to the_low_target.
4628 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4629 (linux_low_filter_event): Toggle syscall_state entry/return for
4630 syscall traps, and set it ignored for all others.
4631 (gdb_catching_syscalls_p): New function.
4632 (gdb_catch_this_syscall_p): New function.
4633 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4634 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4635 (linux_supports_catch_syscall): New function.
4636 (linux_target_ops): Install it.
4637 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4638 (the_low_target): Install it.
4639
8f13a3ce
MF
46402016-01-12 Mike Frysinger <vapier@gentoo.org>
4641
4642 * acinclude.m4: Include new ../warning.m4 file.
4643 * configure: Regenerated.
4644 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4645
5b3da067
MF
46462016-01-12 Mike Frysinger <vapier@gentoo.org>
4647
4648 * ax.c (is_goto_target): Mark static.
4649 * linux-low.c (register_addr): Likewise.
4650 (linux_fetch_registers, linux_store_registers): Likewise.
4651 * mem-break.c (any_persistent_commands): Fix old prototype.
4652 (add_commands_to_breakpoint): Mark static.
4653 * regcache.c (find_register_by_name): Delete unused func.
4654 * remote-utils.c (hex_or_minus_one): Mark static.
4655 * server.c (monitor_show_help): Mark static.
4656 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4657 handle_v_requests): Likewise.
4658
bc504a31
PA
46592016-01-12 Pedro Alves <palves@redhat.com>
4660
4661 Remove use of the registered trademark symbol throughout.
4662
5a0dd67a
YQ
46632016-01-08 Yao Qi <yao.qi@linaro.org>
4664
4665 * remote-utils.c (getpkt): If c is '\003', call target hook
4666 request_interrupt.
4667
b2ca446f
YQ
46682016-01-06 Yao Qi <yao.qi@linaro.org>
4669
4670 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4671 linux-aarch32-low.c.
4672 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4673 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4674 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4675 (thumb2_breakpoint): Declare.
4676 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4677 linux-aarch32-low.h.
4678 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4679 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4680 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4681
edd88788
JB
46822016-01-01 Joel Brobecker <brobecker@adacore.com>
4683
4684 * gdbreplay.c (gdbreplay_version): Change copyright year in
4685 version message.
4686 * server.c (gdbserver_version): Likewise.
4687
65da7f14
PP
46882015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4689
4690 * server.c (crc32_table): Delete.
4691 (crc32): Use libiberty's xcrc32 function.
4692
4abd5ed2
JB
46932015-12-22 Joel Brobecker <brobecker@adacore.com>
4694
4695 * lynx-low.c (lynx_delete_thread_callback): New function.
4696 (lynx_mourn): Properly delete our process and all of its
4697 threads. Remove call to clear_inferiors.
4698
0e50fe5c
JB
46992015-12-22 Joel Brobecker <brobecker@adacore.com>
4700
4701 * target.c (thread_search_callback): Add check that
4702 the thread_stopped target callback is not NULL before
4703 calling it.
4704
35adc03f
YQ
47052015-12-21 Yao Qi <yao.qi@linaro.org>
4706
4707 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4708 arm breakpoint.
4709
bd2b2909
AT
47102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4711
4712 * server.c (handle_query): Call target_supports_software_single_step.
4713
7fe5e27e
AT
47142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4715
4716 * linux-low.c (single_step): New function.
4717 (linux_resume_one_lwp_throw): Call single_step.
4718 (start_step_over): Likewise.
4719
d9311bfa
AT
47202015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4721
4722 * Makefile.in (SFILES): Append arch/arm-linux.c,
4723 arch/arm-get-next-pcs.c.
4724 (arm-linux.o): New rule.
4725 (arm-get-next-pcs.o): New rule.
4726 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4727 arm-linux.o.
4728 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4729 to linux-aarch32-low.c.
4730 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4731 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4732 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4733 (thumb2_breakpoint_len): Likewise.
4734 (arm_is_thumb_mode): Make non-static.
4735 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4736 from linux-aarch32-low.c.
4737 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4738 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4739 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4740 (thumb2_breakpoint_len): Likewise.
4741 (arm_is_thumb_mode): New declaration.
4742 * linux-arm-low.c: Include arch/arm-linux.h
4743 aarch/arm-get-next-pcs.h, sys/syscall.h.
4744 (get_next_pcs_ops): New struct.
4745 (get_next_pcs_addr_bits_remove): New function.
4746 (get_next_pcs_is_thumb): New function.
4747 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4748 (arm_sigreturn_next_pc): Likewise.
4749 (get_next_pcs_syscall_next_pc): Likewise.
4750 (arm_gdbserver_get_next_pcs): Likewise.
4751 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4752 Initialize.
4753 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4754 * server.h: Include gdb_vecs.h.
4755
68ce2059
AT
47562015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4757
4758 * Makefile.in (SFILES): Append common/common-regcache.c.
4759 (OBS): Append common-regcache.o.
4760 (common-regcache.o): New rule.
4761 * regcache.c (init_register_cache): Initialize cache to
4762 REG_UNAVAILABLE.
4763 (regcache_raw_read_unsigned): New function.
4764 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4765 register_status enum.
4766
fa5308bd
AT
47672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4768
4769 * linux-aarch64-low.c (the_low_targets): Rename
4770 breakpoint_reinsert_addr to get_next_pcs.
4771 * linux-arm-low.c (the_low_targets): Likewise.
4772 * linux-bfin-low.c (the_low_targets): Likewise.
4773 * linux-cris-low.c (the_low_targets): Likewise.
4774 * linux-crisv32-low.c (the_low_targets): Likewise.
4775 * linux-low.c (can_software_single_step): Likewise.
4776 (install_software_single_step_breakpoints): New function.
4777 (start_step_over): Use install_software_single_step_breakpoints.
4778 * linux-low.h: New CORE_ADDR vector.
4779 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4780 get_next_pcs.
4781 * linux-mips-low.c (the_low_targets): Likewise.
4782 * linux-nios2-low.c (the_low_targets): Likewise.
4783 * linux-sparc-low.c (the_low_targets): Likewise.
4784
4a6ed09b
PA
47852015-12-17 Pedro Alves <palves@redhat.com>
4786
4787 * linux-low.c (linux_kill_one_lwp): Remove references to
4788 LinuxThreads.
4789 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4790 to 'kill'.
4791 (linux_init_signals): Delete.
4792 (initialize_low): Adjust.
4793 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4794
7544db95
PA
47952015-12-16 Pedro Alves <palves@redhat.com>
4796
4797 * configure.ac (compiler warning flags): When testing a
4798 -Wno-foo option, check whether -Wfoo works instead.
4799 * configure: Regenerate.
4800
8020350c
DB
48012015-12-11 Don Breazeal <donb@codesourcery.com>
4802
4803 * server.c (process_serial_event): Don't exit from gdbserver
4804 in remote mode if there are still active inferiors.
4805
db91f502
YQ
48062015-12-11 Yao Qi <yao.qi@linaro.org>
4807
4808 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4809 arm_breakpoint_at if the process is 32-bit.
4810
b37a6290
YQ
48112015-12-11 Yao Qi <yao.qi@linaro.org>
4812
4813 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4814 arm breakpoint.
4815
17b1509a
YQ
48162015-12-07 Yao Qi <yao.qi@linaro.org>
4817
4818 * configure.srv: Append arm.o to srv_tgtobj for
4819 aarch64*-*-linux* target.
4820 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4821 from linux-arm-low.c.
4822 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4823 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4824 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4825 (thumb2_breakpoint_len): Likewise.
4826 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4827 (arm_breakpoint_kinds): Likewise.
4828 (arm_breakpoint_kind_from_pc): Likewise.
4829 (arm_sw_breakpoint_from_kind): Likewise.
4830 (arm_breakpoint_kind_from_current_state): Likewise.
4831 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4832 (arm_sw_breakpoint_from_kind): Declare.
4833 (arm_breakpoint_kind_from_current_state): Declare.
4834 (arm_breakpoint_at): Declare.
4835 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4836 arm_sw_breakpoint_from_kind if process is 32-bit.
4837 (aarch64_breakpoint_kind_from_pc): New function.
4838 (aarch64_breakpoint_kind_from_current_state): New function.
4839 (the_low_target): Initialize fields breakpoint_kind_from_pc
4840 and breakpoint_kind_from_current_state.
4841 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4842 linux-aarch32-low.c.
4843 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4844 (arm_breakpoint, arm_breakpoint_len): Likewise.
4845 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4846 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4847 (arm_is_thumb_mode): Likewise.
4848 (arm_breakpoint_at): Likewise.
4849 (arm_breakpoint_kind_from_pc): Likewise.
4850 (arm_sw_breakpoint_from_kind): Likewise.
4851 (arm_breakpoint_kind_from_current_state): Likewise.
4852
4853 Revert:
4854 2015-08-04 Yao Qi <yao.qi@linaro.org>
4855
4856 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4857 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4858 * server.c (extended_protocol): Remove "static".
4859 * server.h (extended_protocol): Declare it.
4860
ece66d65
JS
48612015-12-04 Josh Stone <jistone@redhat.com>
4862
4863 * target.h (struct target_ops) <arch_setup>: Rename to ...
4864 (struct target_ops) <post_create_inferior>: ... this.
4865 (target_arch_setup): Rename to ...
4866 (target_post_create_inferior): ... this, calling post_create_inferior.
4867 * server.c (start_inferior): Update target_arch_setup calls to
4868 target_post_create_inferior.
4869 * linux-low.c (linux_low_ptrace_options): Forward declare.
4870 (linux_arch_setup): Update its comment for general use.
4871 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4872 (struct linux_target_ops): Use linux_post_create_inferior.
4873 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4874 to post_create_inferior.
4875 * nto-low.c (struct nto_target_ops): Likewise.
4876 * spu-low.c (struct spu_target_ops): Likewise.
4877 * win32-low.c (struct win32_target_ops): Likewise.
4878
e58c48b4
AT
48792015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4880
4881 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4882
fbec8956
AT
48832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4884
4885 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4886 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4887 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4888 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4889 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4890 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4891 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4892 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4893 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4894 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4895 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4896 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4897
9b4c5f87
AT
48982015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4899
4900 * linux-low.c (linux_look_up_symbols): Don't call
4901 linux_supports_traceclone.
4902 * linux-low.h (thread_db_init): Remove use_events argument.
4903 * thread-db.c (thread_db_use_event): Remove global variable.
4904 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4905 (struct thread_db) <td_create_bp>: Remove field.
4906 (thread_db_create_event): Remove function.
4907 (thread_db_enable_reporting): Likewise.
4908 (find_one_thread): Don't check for thread_db_use_events.
4909 (attach_thread): Likewise.
4910 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4911 (try_thread_db_load_1): Don't check for thread_db_use_events.
4912 (thread_db_init): Remove use_events argument and thread events
4913 handling.
4914 (remove_thread_event_breakpoints): Remove function.
4915 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4916
7d00775e
AT
49172015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4918
4919 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4920 New function.
4921 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4922 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4923 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4924 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4925 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4926 Initialize.
4927 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4928 New function.
4929 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4930 * linux-low.c (can_hardware_single_step): Use
4931 supports_hardware_single_step.
4932 (can_software_single_step): New function.
4933 (start_step_over): Call can_software_single_step.
4934 (linux_supports_hardware_single_step): New function.
4935 (struct target_ops) <supports_software_single_step>: Initialize.
4936 * linux-low.h (struct linux_target_ops)
4937 <supports_hardware_single_step>: Initialize.
4938 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4939 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4940 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4941 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4942 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4943 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4944 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4945 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4946 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4947 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4948 Initialize.
4949 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4950 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4951 Initialize.
4952 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4953 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4954 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4955 New function.
4956 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4957 * target.h (struct target_ops): <supports_software_single_step>:
4958 New field.
4959 (target_supports_software_single_step): New macro.
4960
2d97cd35
AT
49612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4962
4963 * linux-low.c (linux_wait_1): Fix pc advance condition.
4964 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4965 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4966
769ef81f
AT
49672015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4968
4969 * linux-arm-low.c (arm_is_thumb_mode): New function.
4970 (arm_breakpoint_at): Use arm_is_thumb_mode.
4971 (arm_breakpoint_kind_from_current_state): New function.
4972 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4973 Initialize.
4974 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4975 (linux_breakpoint_kind_from_current_state): New function.
4976 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4977 * linux-low.h (struct linux_target_ops)
4978 <breakpoint_kind_from_current_state>: New field.
4979 * target.h (struct target_ops): Likewise.
4980 (target_breakpoint_kind_from_current_state): New macro.
4981
1bebeeca
PA
49822015-11-30 Pedro Alves <palves@redhat.com>
4983
4984 * linux-low.c (linux_resume): Wake up the event loop before
4985 returning.
4986
a67a9fae
PA
49872015-11-30 Pedro Alves <palves@redhat.com>
4988
4989 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4990 check.
4991 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4992 to -1.
4993 * target.c (struct thread_search): New structure.
4994 (thread_search_callback): New function.
4995 (prev_general_thread): New global.
4996 (prepare_to_access_memory, done_accessing_memory): New functions.
4997 * target.h (prepare_to_access_memory, done_accessing_memory):
4998 Replace macros with function declarations.
4999
f2faf941
PA
50002015-11-30 Pedro Alves <palves@redhat.com>
5001
5002 PR 14618
5003 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5004 report TARGET_WAITKIND_NO_RESUMED.
5005 * remote-utils.c (prepare_resume_reply): Handle
5006 TARGET_WAITKIND_NO_RESUMED.
5007 * server.c (report_no_resumed): New global.
5008 (handle_query) <qSupported>: Handle "no-resumed+". Report
5009 "no-resumed+" support.
5010 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5011 return error if the client doesn't support no-resumed events.
5012 (push_stop_notification): New function.
5013 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5014 events if the client supports them.
5015
a681f9c9
PA
50162015-11-30 Pedro Alves <palves@redhat.com>
5017
5018 * linux-low.c (thread_still_has_status_pending_p): Don't check
5019 vCont;t here.
5020 (lwp_resumed): New function.
5021 (status_pending_p_callback): Return early if the LWP is not
5022 supposed to be resumed.
5023
65706a29
PA
50242015-11-30 Pedro Alves <palves@redhat.com>
5025
5026 * linux-low.c (handle_extended_wait): Assert that the LWP's
5027 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5028 thread create events, leave the new child's status pending.
5029 (linux_low_filter_event): If GDB wants to hear about thread exit
5030 events, leave the LWP marked dead and don't delete it.
5031 (linux_wait_for_event_filtered): Don't check for thread exit.
5032 (filter_exit_event): New function.
5033 (linux_wait_1): Use it, when returning an exit event.
5034 (linux_resume_one_lwp_throw): Assert that the LWP's
5035 waitstatus is TARGET_WAITKIND_IGNORE.
5036 * remote-utils.c (prepare_resume_reply): Handle
5037 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5038 * server.c (report_thread_events): New global.
5039 (handle_general_set): Handle QThreadEvents.
5040 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5041 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5042 TARGET_WAITKIND_THREAD_EXITED.
5043 * server.h (report_thread_events): Declare.
5044
56cf4bed
PA
50452015-11-30 Pedro Alves <palves@redhat.com>
5046
5047 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5048 the thread's last_resume_kind was resume_stop.
5049
500c1d85
PA
50502015-11-30 Pedro Alves <palves@redhat.com>
5051
5052 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5053 before returning.
5054
de979965
PA
50552015-11-30 Pedro Alves <palves@redhat.com>
5056
5057 * server.c (handle_v_requests): Handle vCtrlC.
5058
34c65914
PA
50592015-11-30 Pedro Alves <palves@redhat.com>
5060
5061 * gdbthread.h (find_any_thread_of_pid): Declare.
5062 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5063 functions.
5064 * server.c (handle_query): If current_thread is NULL, look for
5065 another thread of the selected process.
5066
79efa585 50672015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5068 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5069
5070 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5071 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5072 name in reply.
5073 * target.h (struct target_ops) <thread_name>: New field.
5074 (target_thread_name): New macro.
5075
80d82c19
JB
50762015-11-23 Joel Brobecker <brobecker@adacore.com>
5077
5078 * regcache.h (regcache_invalidate_pid): Add declaration.
5079 * regcache.c (regcache_invalidate_pid): New function, extracted
5080 from regcache_invalidate.
5081 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5082 Add trivial documentation comment.
5083 * lynx-low.c: Use regcache_invalidate_pid instead of
5084 regcache_invalidate.
5085
64da5dd5
JB
50862015-11-23 Joel Brobecker <brobecker@adacore.com>
5087
5088 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5089 and Elf64_auxv_t if the target is Android.
5090
37ce4055
DE
50912015-11-22 Doug Evans <xdje42@gmail.com>
5092
5093 * target.h: #include <sys/types.h>.
5094
06e03fff
PA
50952015-11-19 Pedro Alves <palves@redhat.com>
5096
5097 * linux-low.c (linux_process_qsupported): Change prototype.
5098 Adjust.
5099 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5100 Change prototype.
5101 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5102 and adjust to loop over all features.
5103 * server.c (handle_query) <qSupported>: Adjust to call
5104 target_process_qsupported once, passing it a vector of unprocessed
5105 features.
5106 * target.h (struct target_ops) <process_qsupported>: Change
5107 prototype.
5108 (target_process_qsupported): Adjust.
5109
9a084706
PA
51102015-11-19 Pedro Alves <palves@redhat.com>
5111
5112 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5113 mode.
5114 * configure: Regenerate.
5115
dad44a1f
PA
51162015-11-19 Pedro Alves <palves@redhat.com>
5117
5118 * configure: Regenerate.
5119
231c0592
YQ
51202015-11-19 Yao Qi <yao.qi@linaro.org>
5121
5122 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5123 type to uint32_t.
5124
6c1c9a8b
YQ
51252015-11-19 Yao Qi <yao.qi@linaro.org>
5126
5127 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5128 (struct aarch64_operand): Move enum out.
5129
9caa3311
YQ
51302015-11-19 Yao Qi <yao.qi@linaro.org>
5131
5132 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5133 struct user_fpsimd_state *.
5134 (aarch64_store_fpregset): Likewise.
5135
6a69a054
YQ
51362015-11-19 Yao Qi <yao.qi@linaro.org>
5137
5138 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5139 struct user_pt_regs *.
5140 (aarch64_store_gregset): Likewise.
5141
1798301e
PA
51422015-11-18 Pedro Alves <palves@redhat.com>
5143
5144 * Makefile.in (all_object_files): Add $IPA_OBJS.
5145
ce7715e2
PA
51462015-11-17 Pedro Alves <palves@redhat.com>
5147
5148 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5149 GDB_SIGNAL_0 and gdb_signal_to_string.
5150
c0879059
PA
51512015-11-17 Pedro Alves <palves@redhat.com>
5152
5153 * win32-low.c (handle_output_debug_string): Remove parameter.
5154 (win32_kill): Remove our_status local and adjust call to
5155 handle_output_debug_string.
5156 (get_child_debug_event): Adjust call to
5157 handle_output_debug_string.
5158
1996e237
SM
51592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5160
5161 * linux-mips-low.c (mips_fill_gregset): Add cast.
5162 (mips_store_gregset): Likewise.
5163 (mips_fill_fpregset): Likewise.
5164 (mips_store_fpregset): Likewise.
5165
cbec665b
SM
51662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5167
5168 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5169 priv.
5170
eb3e3c67
SM
51712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5172
5173 * linux-mips-low.c (mips_linux_new_thread): Change type of
5174 watch_type to enum target_hw_bp_type.
5175
171de4b8
SM
51762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5177
5178 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5179 Change return type to arm_hwbp_type.
5180
04248ead
SM
51812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5182
5183 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5184 (arm_store_gregset): Likewise.
5185 * linux-arm-low.c (arm_get_hwcap): Likewise.
5186 (arm_read_description): Likewise.
5187
04b3479c
SM
51882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5189
5190 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5191
2bc84e8a
SM
51922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5193
5194 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5195 (ppc_fill_vsxregset): Likewise.
5196 (ppc_store_vsxregset): Likewise.
5197 (ppc_fill_vrregset): Likewise.
5198 (ppc_store_vrregset): Likewise.
5199 (ppc_fill_evrregset): Likewise.
5200 (ppc_store_evrregset): Likewise.
5201
e6c5bb05
SM
52022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5203
5204 * linux-ppc-low.c (ppc_usrregs_info): Remove
5205 forward-declaration.
5206 (ppc_arch_setup): Move lower in file.
5207
7ea45d72
SM
52082015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5209
5210 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5211 (ps_pdwrite): Likewise.
5212
69291610
HW
52132015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5214
5215 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5216 to after assert checks.
5217
b42945fd
SM
52182015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5219
5220 * proc-service.c (ps_pdread): Add/adjust casts.
5221 (ps_pdwrite): Add/adjust casts.
5222
d6f85c84
SM
52232015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5224
5225 * server.c (handle_search_memory_1): Cast return value of
5226 memmem.
5227
f98cd059
SM
52282015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5229
5230 * server.c (write_qxfer_response): Change type of data to
5231 gdb_byte *.
5232
d2412fa5
PA
52332015-10-29 Pedro Alves <palves@redhat.com>
5234
5235 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5236
c17414a2
PA
52372015-10-29 Pedro Alves <palves@redhat.com>
5238
5239 * tracepoint.c (clear_installed_tracepoints): Add casts.
5240
e053fbc4
PA
52412015-10-29 Pedro Alves <palves@redhat.com>
5242
5243 * server.c (handle_v_cont, process_serial_event): Add enum
5244 gdb_signal casts to signal parsing code.
5245
add67df8
PA
52462015-10-29 Pedro Alves <palves@redhat.com>
5247
5248 * linux-low.h (NULL_REGSET): Define.
5249 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5250 * linux-arm-low.c (arm_regsets): Likewise.
5251 * linux-crisv32-low.c (cris_regsets): Likewise.
5252 * linux-m68k-low.c (m68k_regsets): Likewise.
5253 * linux-mips-low.c (mips_regsets): Likewise.
5254 * linux-nios2-low.c (nios2_regsets): Likewise.
5255 * linux-ppc-low.c (ppc_regsets): Likewise.
5256 * linux-s390-low.c (s390_regsets): Likewise.
5257 * linux-sh-low.c (sh_regsets): Likewise.
5258 * linux-sparc-low.c (sparc_regsets): Likewise.
5259 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5260 * linux-tile-low.c (tile_regsets): Likewise.
5261 * linux-x86-low.c (x86_regsets): Likewise.
5262 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5263
50bc912a
PA
52642015-10-29 Pedro Alves <palves@redhat.com>
5265
5266 * linux-low.h (NULL_REGSET): Define.
5267 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5268 * linux-arm-low.c (arm_regsets): Likewise.
5269 * linux-crisv32-low.c (cris_regsets): Likewise.
5270 * linux-m68k-low.c (m68k_regsets): Likewise.
5271 * linux-mips-low.c (mips_regsets): Likewise.
5272 * linux-nios2-low.c (nios2_regsets): Likewise.
5273 * linux-ppc-low.c (ppc_regsets): Likewise.
5274 * linux-s390-low.c (s390_regsets): Likewise.
5275 * linux-sh-low.c (sh_regsets): Likewise.
5276 * linux-sparc-low.c (sparc_regsets): Likewise.
5277 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5278 * linux-tile-low.c (tile_regsets): Likewise.
5279 * linux-x86-low.c (x86_regsets): Likewise.
5280 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5281
682b2546
DE
52822015-10-26 Doug Evans <dje@google.com>
5283
5284 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5285
963843d4
DE
52862015-10-26 Doug Evans <dje@google.com>
5287
5288 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5289
d41401ac
DE
52902015-10-26 Doug Evans <dje@google.com>
5291
5292 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5293 for debug_printf.
5294 (attach_thread, find_new_threads_callback): Ditto.
5295
3db28855
AT
52962015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5297
5298 * mem-break.h (set_breakpoint_data): Remove.
5299
fb78e89c
AT
53002015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5301
5302 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5303 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5304 (initialize_low): Remove set_breakpoint_data call.
5305 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5306 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5307 (initialize_low): Remove set_breakpoint_data call.
5308 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5309 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5310 (initialize_low): Remove set_breakpoint_data call.
5311
2e6ee069
AT
53122015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5313
5314 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5315 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5316 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5317 * target.h (target_breakpoint_kind_from_pc): New macro.
5318
1652a986
AT
53192015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5320
5321 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5322 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5323 the default breakpoint kind.
5324
abeead09
AT
53252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5326
5327 * linux-arm-low.c (arm_supports_z_point_type): Add software
5328 breakpoint support.
5329
b0b4b501
AT
53302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5331
5332 * linux-arm-low.c: Refactor breakpoint definitions.
5333 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5334 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5335
8689682c
AT
53362015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5337
5338 * Makefile.in: Add arm.c/o.
5339 * configure.srv: Likewise.
5340 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5341 (arm_breakpoint_kind_from_pc): New function.
5342 (arm_sw_breakpoint_from_kind): Return proper kind.
5343 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5344
27165294
AT
53452015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5346
5347 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5348 removal.
5349 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5350 (struct raw_breakpoint) <size>: Remove.
5351 (struct raw_breakpoint) <kind>: Add.
5352 (bp_size): New function.
5353 (bp_opcode): Likewise.
5354 (find_raw_breakpoint_at): Adjust for kind.
5355 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5356 (remove_memory_breakpoint): Adjust for kind call bp_size.
5357 (set_raw_breakpoint_at): Adjust for kind.
5358 (set_breakpoint): Likewise.
5359 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5360 (delete_raw_breakpoint): Adjust for kind.
5361 (delete_breakpoint): Likewise.
5362 (find_gdb_breakpoint): Likewise.
5363 (set_gdb_breakpoint_1): Likewise.
5364 (set_gdb_breakpoint): Likewise.
5365 (delete_gdb_breakpoint_1): Likewise.
5366 (delete_gdb_breakpoint): Likewise.
5367 (uninsert_raw_breakpoint): Likewise.
5368 (reinsert_raw_breakpoint): Likewise.
5369 (set_breakpoint_data): Remove.
5370 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5371 (check_mem_read): Adjust for kind call bp_size.
5372 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5373 (clone_one_breakpoint): Adjust for kind.
5374 * mem-break.h (set_gdb_breakpoint): Likewise.
5375 (delete_gdb_breakpoint): Likewise.
5376 * server.c (process_serial_event): Likewise.
5377
dd373349
AT
53782015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5379
5380 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5381 (struct linux_target_ops) <breakpoint>: Remove.
5382 (struct linux_target_ops) <breakpoint_len>: Remove.
5383 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5384 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5385 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5386 (arm_sw_breakpoint_from_kind): New function.
5387 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5388 (struct linux_target_ops) <breakpoint>: Remove.
5389 (struct linux_target_ops) <breakpoint_len>: Remove.
5390 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5391 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5392 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5393 (struct linux_target_ops) <breakpoint>: Remove.
5394 (struct linux_target_ops) <breakpoint_len>: Remove.
5395 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5396 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5397 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5398 (struct linux_target_ops) <breakpoint>: Remove.
5399 (struct linux_target_ops) <breakpoint_len>: Remove.
5400 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5401 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5402 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5403 and sw_breakpoint_from_kind to increment the pc.
5404 (linux_breakpoint_kind_from_pc): New function.
5405 (linux_sw_breakpoint_from_kind): New function.
5406 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5407 (initialize_low): Call breakpoint_kind_from_pc and
5408 sw_breakpoint_from_kind to replace breakpoint_data/len.
5409 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5410 New field.
5411 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5412 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5413 (struct linux_target_ops) <breakpoint>: Remove.
5414 (struct linux_target_ops) <breakpoint_len>: Remove.
5415 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5416 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5417 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5418 (struct linux_target_ops) <breakpoint>: Remove.
5419 (struct linux_target_ops) <breakpoint_len>: Remove.
5420 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5421 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5422 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5423 (struct linux_target_ops) <breakpoint>: Remove.
5424 (struct linux_target_ops) <breakpoint_len>: Remove.
5425 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5426 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5427 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5428 (struct linux_target_ops) <breakpoint>: Remove.
5429 (struct linux_target_ops) <breakpoint_len>: Remove.
5430 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5431 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5432 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5433 (struct linux_target_ops) <breakpoint>: Remove.
5434 (struct linux_target_ops) <breakpoint_len>: Remove.
5435 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5436 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5437 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5438 (struct linux_target_ops) <breakpoint>: Remove.
5439 (struct linux_target_ops) <breakpoint_len>: Remove.
5440 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5441 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5442 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5443 (struct linux_target_ops) <breakpoint>: Remove.
5444 (struct linux_target_ops) <breakpoint_len>: Remove.
5445 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5446 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5447 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5448 (struct linux_target_ops) <breakpoint>: Remove.
5449 (struct linux_target_ops) <breakpoint_len>: Remove.
5450 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5451 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5452 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5453 (struct linux_target_ops) <breakpoint>: Remove.
5454 (struct linux_target_ops) <breakpoint_len>: Remove.
5455 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5456 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5457 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5458 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5459 (struct linux_target_ops) <breakpoint>: Remove.
5460 (struct linux_target_ops) <breakpoint_len>: Remove.
5461 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5462 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5463 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5464 (struct linux_target_ops) <breakpoint>: Remove.
5465 (struct linux_target_ops) <breakpoint_len>: Remove.
5466 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5467 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5468
4cd98a19
AT
54692015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5470
5471 * linux-cris-low.c (cris_get_pc): Remove void arg.
5472
774ee6d2
AR
54732015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5474
5475 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5476 variable name.
5477
833dcd29
AR
54782015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5479
5480 * inferiors.c (thread_pid_matches_callback): New function.
5481 (find_thread_process): New function.
5482 (remove_thread): Reset current_thread.
5483 (remove_process): Assert threads have been removed first.
5484
8d689ee5
YQ
54852015-10-15 Yao Qi <yao.qi@linaro.org>
5486
5487 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5488 if it is 3.
5489 (aarch64_remove_point): Likewise.
5490 * regcache.c (regcache_register_size): New function.
5491
1c2e1515
YQ
54922015-10-12 Yao Qi <yao.qi@linaro.org>
5493
5494 * linux-aarch64-low.c: Update all callers as emit_load_store
5495 is renamed to aarch64_emit_load_store.
5496
e1c587c3
YQ
54972015-10-12 Yao Qi <yao.qi@linaro.org>
5498
5499 * linux-aarch64-low.c: Update all callers of function renaming
5500 from emit_insn to aarch64_emit_insn.
5501
b6542f81
YQ
55022015-10-12 Yao Qi <yao.qi@linaro.org>
5503
5504 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5505 arch/aarch64-insn.h.
5506 (struct aarch64_memory_operand): Likewise.
5507 (ENCODE): Likewise.
5508 (emit_insn): Move to arch/aarch64-insn.c.
5509 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5510 (emit_load_store): Move to arch/aarch64-insn.c.
5511 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5512 (can_encode_int32): Remove.
5513
246994ce
YQ
55142015-10-12 Yao Qi <yao.qi@linaro.org>
5515
5516 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5517 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5518 (aarch64_relocate_instruction): Likewise.
5519 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5520 (struct aarch64_insn_visitor): Likewise.
5521
0badd99f
YQ
55222015-10-12 Yao Qi <yao.qi@linaro.org>
5523
5524 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5525 (struct aarch64_insn_visitor): New.
5526 (struct aarch64_insn_relocation_data): New.
5527 (aarch64_ftrace_insn_reloc_b): New function.
5528 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5529 (aarch64_ftrace_insn_reloc_cb): Likewise.
5530 (aarch64_ftrace_insn_reloc_tb): Likewise.
5531 (aarch64_ftrace_insn_reloc_adr): Likewise.
5532 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5533 (aarch64_ftrace_insn_reloc_others): Likewise.
5534 (visitor): New.
5535 (aarch64_relocate_instruction): Use visitor.
5536
dfaffe9d
YQ
55372015-10-12 Yao Qi <yao.qi@linaro.org>
5538
5539 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5540 int. Add argument buf.
5541 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5542 aarch64_relocate_instruction.
5543
70b439f0
YQ
55442015-10-12 Yao Qi <yao.qi@linaro.org>
5545
5546 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5547 argument insn. Remove local variable insn. Don't call
5548 target_read_uint32.
5549 (aarch64_install_fast_tracepoint_jump_pad): Call
5550 target_read_uint32.
5551
7781c06f
YQ
55522015-09-30 Yao Qi <yao.qi@linaro.org>
5553
5554 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5555 (emit_load_store_pair): Likewise.
5556
9a3c8263
SM
55572015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5558
5559 * dll.c (match_dll): Add cast(s).
5560 (unloaded_dll): Likewise.
5561 * linux-low.c (second_thread_of_pid_p): Likewise.
5562 (delete_lwp_callback): Likewise.
5563 (count_events_callback): Likewise.
5564 (select_event_lwp_callback): Likewise.
5565 (linux_set_resume_request): Likewise.
5566 * server.c (accumulate_file_name_length): Likewise.
5567 (emit_dll_description): Likewise.
5568 (handle_qxfer_threads_worker): Likewise.
5569 (visit_actioned_threads): Likewise.
5570 * thread-db.c (any_thread_of): Likewise.
5571 * tracepoint.c (same_process_p): Likewise.
5572 (match_blocktype): Likewise.
5573 (build_traceframe_info_xml): Likewise.
5574
224c3ddb
SM
55752015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5576
5577 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5578 assignment.
5579 (gdb_unparse_agent_expr): Likewise.
5580 * hostio.c (require_data): Likewise.
5581 (handle_pread): Likewise.
5582 * linux-low.c (disable_regset): Likewise.
5583 (fetch_register): Likewise.
5584 (store_register): Likewise.
5585 (get_dynamic): Likewise.
5586 (linux_qxfer_libraries_svr4): Likewise.
5587 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5588 (set_fast_tracepoint_jump): Likewise.
5589 (uninsert_fast_tracepoint_jumps_at): Likewise.
5590 (reinsert_fast_tracepoint_jumps_at): Likewise.
5591 (validate_inserted_breakpoint): Likewise.
5592 (clone_agent_expr): Likewise.
5593 * regcache.c (init_register_cache): Likewise.
5594 * remote-utils.c (putpkt_binary_1): Likewise.
5595 (decode_M_packet): Likewise.
5596 (decode_X_packet): Likewise.
5597 (look_up_one_symbol): Likewise.
5598 (relocate_instruction): Likewise.
5599 (monitor_output): Likewise.
5600 * server.c (handle_search_memory): Likewise.
5601 (handle_qxfer_exec_file): Likewise.
5602 (handle_qxfer_libraries): Likewise.
5603 (handle_qxfer): Likewise.
5604 (handle_query): Likewise.
5605 (handle_v_cont): Likewise.
5606 (handle_v_run): Likewise.
5607 (captured_main): Likewise.
5608 * target.c (write_inferior_memory): Likewise.
5609 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5610 * tracepoint.c (init_trace_buffer): Likewise.
5611 (add_tracepoint_action): Likewise.
5612 (add_traceframe): Likewise.
5613 (add_traceframe_block): Likewise.
5614 (cmd_qtdpsrc): Likewise.
5615 (cmd_qtdv): Likewise.
5616 (cmd_qtstatus): Likewise.
5617 (response_source): Likewise.
5618 (response_tsv): Likewise.
5619 (cmd_qtnotes): Likewise.
5620 (gdb_collect): Likewise.
5621 (initialize_tracepoint): Likewise.
5622
afbe19f8
PL
56232015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5624
5625 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5626 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5627 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5628 <NOP>: New.
5629 (enum aarch64_condition_codes): New enum.
5630 (w0): New static global.
5631 (fp): Likewise.
5632 (lr): Likewise.
5633 (struct aarch64_memory_operand) <type>: New
5634 MEMORY_OPERAND_POSTINDEX type.
5635 (postindex_memory_operand): New helper function.
5636 (emit_ret): New function.
5637 (emit_load_store_pair): New function, factored out of emit_stp
5638 with support for MEMORY_OPERAND_POSTINDEX.
5639 (emit_stp): Rewrite using emit_load_store_pair.
5640 (emit_ldp): New function.
5641 (emit_load_store): Likewise.
5642 (emit_ldr): Mention post-index instruction in comment.
5643 (emit_ldrh): New function.
5644 (emit_ldrb): New function.
5645 (emit_ldrsw): Mention post-index instruction in comment.
5646 (emit_str): Likewise.
5647 (emit_subs): New function.
5648 (emit_cmp): Likewise.
5649 (emit_and): Likewise.
5650 (emit_orr): Likewise.
5651 (emit_orn): Likewise.
5652 (emit_eor): Likewise.
5653 (emit_mvn): Likewise.
5654 (emit_lslv): Likewise.
5655 (emit_lsrv): Likewise.
5656 (emit_asrv): Likewise.
5657 (emit_mul): Likewise.
5658 (emit_sbfm): Likewise.
5659 (emit_sbfx): Likewise.
5660 (emit_ubfm): Likewise.
5661 (emit_ubfx): Likewise.
5662 (emit_csinc): Likewise.
5663 (emit_cset): Likewise.
5664 (emit_nop): Likewise.
5665 (emit_ops_insns): New helper function.
5666 (emit_pop): Likewise.
5667 (emit_push): Likewise.
5668 (aarch64_emit_prologue): New function.
5669 (aarch64_emit_epilogue): Likewise.
5670 (aarch64_emit_add): Likewise.
5671 (aarch64_emit_sub): Likewise.
5672 (aarch64_emit_mul): Likewise.
5673 (aarch64_emit_lsh): Likewise.
5674 (aarch64_emit_rsh_signed): Likewise.
5675 (aarch64_emit_rsh_unsigned): Likewise.
5676 (aarch64_emit_ext): Likewise.
5677 (aarch64_emit_log_not): Likewise.
5678 (aarch64_emit_bit_and): Likewise.
5679 (aarch64_emit_bit_or): Likewise.
5680 (aarch64_emit_bit_xor): Likewise.
5681 (aarch64_emit_bit_not): Likewise.
5682 (aarch64_emit_equal): Likewise.
5683 (aarch64_emit_less_signed): Likewise.
5684 (aarch64_emit_less_unsigned): Likewise.
5685 (aarch64_emit_ref): Likewise.
5686 (aarch64_emit_if_goto): Likewise.
5687 (aarch64_emit_goto): Likewise.
5688 (aarch64_write_goto_address): Likewise.
5689 (aarch64_emit_const): Likewise.
5690 (aarch64_emit_call): Likewise.
5691 (aarch64_emit_reg): Likewise.
5692 (aarch64_emit_pop): Likewise.
5693 (aarch64_emit_stack_flush): Likewise.
5694 (aarch64_emit_zero_ext): Likewise.
5695 (aarch64_emit_swap): Likewise.
5696 (aarch64_emit_stack_adjust): Likewise.
5697 (aarch64_emit_int_call_1): Likewise.
5698 (aarch64_emit_void_call_2): Likewise.
5699 (aarch64_emit_eq_goto): Likewise.
5700 (aarch64_emit_ne_goto): Likewise.
5701 (aarch64_emit_lt_goto): Likewise.
5702 (aarch64_emit_le_goto): Likewise.
5703 (aarch64_emit_gt_goto): Likewise.
5704 (aarch64_emit_ge_got): Likewise.
5705 (aarch64_emit_ops_impl): New static global variable.
5706 (aarch64_emit_ops): New target function, return
5707 &aarch64_emit_ops_impl.
5708 (struct linux_target_ops): Install it.
5709
bb903df0
PL
57102015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5711
5712 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5713 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5714 aarch64-ipa.o.
5715 * linux-aarch64-ipa.c: New file.
5716 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5717 and endian.h.
5718 (aarch64_get_thread_area): New target method.
5719 (extract_signed_bitfield): New helper function.
5720 (aarch64_decode_ldr_literal): New function.
5721 (enum aarch64_opcodes): New enum.
5722 (struct aarch64_register): New struct.
5723 (struct aarch64_operand): New struct.
5724 (x0): New static global.
5725 (x1): Likewise.
5726 (x2): Likewise.
5727 (x3): Likewise.
5728 (x4): Likewise.
5729 (w2): Likewise.
5730 (ip0): Likewise.
5731 (sp): Likewise.
5732 (xzr): Likewise.
5733 (aarch64_register): New helper function.
5734 (register_operand): Likewise.
5735 (immediate_operand): Likewise.
5736 (struct aarch64_memory_operand): New struct.
5737 (offset_memory_operand): New helper function.
5738 (preindex_memory_operand): Likewise.
5739 (enum aarch64_system_control_registers): New enum.
5740 (ENCODE): New macro.
5741 (emit_insn): New helper function.
5742 (emit_b): New function.
5743 (emit_bcond): Likewise.
5744 (emit_cb): Likewise.
5745 (emit_tb): Likewise.
5746 (emit_blr): Likewise.
5747 (emit_stp): Likewise.
5748 (emit_ldp_q_offset): Likewise.
5749 (emit_stp_q_offset): Likewise.
5750 (emit_load_store): Likewise.
5751 (emit_ldr): Likewise.
5752 (emit_ldrsw): Likewise.
5753 (emit_str): Likewise.
5754 (emit_ldaxr): Likewise.
5755 (emit_stxr): Likewise.
5756 (emit_stlr): Likewise.
5757 (emit_data_processing_reg): Likewise.
5758 (emit_data_processing): Likewise.
5759 (emit_add): Likewise.
5760 (emit_sub): Likewise.
5761 (emit_mov): Likewise.
5762 (emit_movk): Likewise.
5763 (emit_mov_addr): Likewise.
5764 (emit_mrs): Likewise.
5765 (emit_msr): Likewise.
5766 (emit_sevl): Likewise.
5767 (emit_wfe): Likewise.
5768 (append_insns): Likewise.
5769 (can_encode_int32_in): New helper function.
5770 (aarch64_relocate_instruction): New function.
5771 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5772 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5773 (struct linux_target_ops): Install aarch64_get_thread_area,
5774 aarch64_install_fast_tracepoint_jump_pad and
5775 aarch64_get_min_fast_tracepoint_insn_len.
5776
787749ea
PL
57772015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5778
5779 * Makefile.in (aarch64-insn.o): New rule.
5780 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5781
9812b2e6
YQ
57822015-09-21 Yao Qi <yao.qi@linaro.org>
5783
5784 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5785
18fe412b
YQ
57862015-09-21 Yao Qi <yao.qi@linaro.org>
5787
5788 * tracepoint.c (max_jump_pad_size): Remove.
5789
a0cc84cd
YQ
57902015-09-18 Yao Qi <yao.qi@linaro.org>
5791
5792 * linux-aarch64-low.c: Don't include sys/uio.h.
5793 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5794
d78908cf
WW
57952015-09-16 Wei-cheng Wang <cole945@gmail.com>
5796
5797 * tracepoint.c (eval_result_type): Change prototype.
5798 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5799
d57e0d50
PA
58002015-09-15 Pedro Alves <palves@redhat.com>
5801
5802 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5803 Check whether to report exec events instead of checking whether
5804 multiprocess is enabled.
5805
5a676acc
PA
58062015-09-15 Pedro Alves <palves@redhat.com>
5807
5808 PR remote/18965
5809 * remote-utils.c (prepare_resume_reply): Merge
5810 TARGET_WAITKIND_VFORK_DONE switch case with the
5811 TARGET_WAITKIND_FORKED case.
5812
7c5d0fad
YQ
58132015-09-15 Yao Qi <yao.qi@linaro.org>
5814
5815 * server.c (handle_query): Check string comparison using
5816 "else if" instead of "if".
5817
750ce8d1
YQ
58182015-09-15 Yao Qi <yao.qi@linaro.org>
5819
5820 * server.c (vCont_supported): New global variable.
5821 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5822 matches. Append ";vContSupported+" to own_buf.
5823 (handle_v_requests): Append ";s;S" to own_buf if target supports
5824 hardware single step or vCont_supported is false.
5825 (capture_main): Set vCont_supported to zero.
5826
70b90b91
YQ
58272015-09-15 Yao Qi <yao.qi@linaro.org>
5828
5829 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5830 it to ...
5831 (linux_supports_hardware_single_step): ... New function.
5832 (linux_target_ops): Update.
5833 * lynx-low.c (lynx_target_ops): Set field
5834 supports_hardware_single_step to target_can_do_hardware_single_step.
5835 * nto-low.c (nto_target_ops): Likewise.
5836 * spu-low.c (spu_target_ops): Likewise.
5837 * win32-low.c (win32_target_ops): Likewise.
5838 * target.c (target_can_do_hardware_single_step): New function.
5839 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5840 Remove. <supports_hardware_single_step>: New field.
5841 (target_supports_conditional_breakpoints): Remove.
5842 (target_supports_hardware_single_step): New macro.
5843 (target_can_do_hardware_single_step): Declare.
5844 * server.c (handle_query): Use target_supports_hardware_single_step
5845 instead of target_supports_conditional_breakpoints.
5846
ade90bde
YQ
58472015-09-15 Yao Qi <yao.qi@linaro.org>
5848
5849 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5850 function.
5851 (struct linux_target_ops the_low_target): Install
5852 aarch64_linux_siginfo_fixup.
5853
94585166
DB
58542015-09-11 Don Breazeal <donb@codesourcery.com>
5855 Luis Machado <lgustavo@codesourcery.com>
5856
5857 * linux-low.c (linux_mourn): Static declaration.
5858 (linux_arch_setup): Move in front of
5859 handle_extended_wait.
5860 (linux_arch_setup_thread): New function.
5861 (handle_extended_wait): Handle exec events. Call
5862 linux_arch_setup_thread. Make event_lwp argument a
5863 pointer-to-a-pointer.
5864 (check_zombie_leaders): Do not check stopped threads.
5865 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5866 (linux_low_filter_event): Add lwp and thread for exec'ing
5867 non-leader thread if leader thread has been deleted.
5868 Refactor code into linux_arch_setup_thread and call it.
5869 Pass child lwp pointer by reference to handle_extended_wait.
5870 (linux_wait_for_event_filtered): Update comment.
5871 (linux_wait_1): Prevent clobbering exec event status.
5872 (linux_supports_exec_events): New function.
5873 (linux_target_ops) <supports_exec_events>: Initialize new member.
5874 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5875 new member.
5876 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5877 * server.c (report_exec_events): New global variable.
5878 (handle_query): Handle qSupported query for exec-events feature.
5879 (captured_main): Initialize report_exec_events.
5880 * server.h (report_exec_events): Declare new global variable.
5881 * target.h (struct target_ops) <supports_exec_events>: New
5882 member.
5883 (target_supports_exec_events): New macro.
5884 * win32-low.c (win32_target_ops) <supports_exec_events>:
5885 Initialize new member.
5886
0568462b
MM
58872015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5888
5889 * linux-low.c (linux_low_enable_btrace): Remove.
5890 (linux_target_ops): Replace linux_low_enable_btrace with
5891 linux_enable_btrace.
5892
39edd165
YQ
58932015-09-03 Yao Qi <yao.qi@linaro.org>
5894
5895 * linux-aarch64-low.c (aarch64_insert_point): Call
5896 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5897 returns true.
5898
1db33b5a
UW
58992015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5900
5901 * linux-low.c (check_stopped_by_breakpoint): Use
5902 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5903
ab290430
PA
59042015-08-27 Pedro Alves <palves@redhat.com>
5905
5906 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5907
8d749320
SM
59082015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5909
6711b7f8
SM
5910 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5911 the XNEW-family equivalent.
8d749320
SM
5912 (compile_bytecodes): Likewise.
5913 * dll.c (loaded_dll): Likewise.
5914 * event-loop.c (append_callback_event): Likewise.
5915 (create_file_handler): Likewise.
5916 (create_file_event): Likewise.
5917 * hostio.c (handle_open): Likewise.
5918 * inferiors.c (add_thread): Likewise.
5919 (add_process): Likewise.
5920 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5921 * linux-arm-low.c (arm_new_process): Likewise.
5922 (arm_new_thread): Likewise.
5923 * linux-low.c (add_to_pid_list): Likewise.
5924 (linux_add_process): Likewise.
5925 (handle_extended_wait): Likewise.
5926 (add_lwp): Likewise.
5927 (enqueue_one_deferred_signal): Likewise.
5928 (enqueue_pending_signal): Likewise.
5929 (linux_resume_one_lwp_throw): Likewise.
5930 (linux_resume_one_thread): Likewise.
5931 (linux_read_memory): Likewise.
5932 (linux_write_memory): Likewise.
5933 * linux-mips-low.c (mips_linux_new_process): Likewise.
5934 (mips_linux_new_thread): Likewise.
5935 (mips_add_watchpoint): Likewise.
5936 * linux-x86-low.c (initialize_low_arch): Likewise.
5937 * lynx-low.c (lynx_add_process): Likewise.
5938 * mem-break.c (set_raw_breakpoint_at): Likewise.
5939 (set_breakpoint): Likewise.
5940 (add_condition_to_breakpoint): Likewise.
5941 (add_commands_to_breakpoint): Likewise.
5942 (clone_agent_expr): Likewise.
5943 (clone_one_breakpoint): Likewise.
5944 * regcache.c (new_register_cache): Likewise.
5945 * remote-utils.c (look_up_one_symbol): Likewise.
5946 * server.c (queue_stop_reply): Likewise.
5947 (start_inferior): Likewise.
5948 (queue_stop_reply_callback): Likewise.
5949 (handle_target_event): Likewise.
5950 * spu-low.c (fetch_ppc_memory): Likewise.
5951 (store_ppc_memory): Likewise.
5952 * target.c (set_target_ops): Likewise.
5953 * thread-db.c (thread_db_load_search): Likewise.
5954 (try_thread_db_load_1): Likewise.
5955 * tracepoint.c (add_tracepoint): Likewise.
5956 (add_tracepoint_action): Likewise.
5957 (create_trace_state_variable): Likewise.
5958 (cmd_qtdpsrc): Likewise.
5959 (cmd_qtro): Likewise.
5960 (add_while_stepping_state): Likewise.
5961 * win32-low.c (child_add_thread): Likewise.
5962 (get_image_name): Likewise.
5963
ed8b7b42
YQ
59642015-08-25 Yao Qi <yao.qi@linaro.org>
5965
5966 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5967
db3cb7cb
YQ
59682015-08-25 Yao Qi <yao.qi@linaro.org>
5969
5970 * Makefile.in (aarch64-linux.o): New rule.
5971 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5972 srv_tgtobj.
5973 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5974 (aarch64_init_debug_reg_state): Make it extern.
5975 (aarch64_linux_prepare_to_resume): Remove.
5976
f6011a1c
YQ
59772015-08-25 Yao Qi <yao.qi@linaro.org>
5978
5979 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5980 lwp_arch_private_info and ptid_of_lwp.
5981
88e2cf7e
YQ
59822015-08-25 Yao Qi <yao.qi@linaro.org>
5983
5984 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5985 Find proc_info by find_process_pid. All callers updated.
5986
5e35436e
YQ
59872015-08-25 Yao Qi <yao.qi@linaro.org>
5988
5989 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5990 Remove.
5991 (debug_reg_change_callback): Remove.
5992 (aarch64_notify_debug_reg_change): Remove.
5993
4a8a7965
YQ
59942015-08-25 Yao Qi <yao.qi@linaro.org>
5995
5996 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5997 Call current_lwp_ptid.
5998
32a271ee
YQ
59992015-08-25 Yao Qi <yao.qi@linaro.org>
6000
6001 * linux-aarch64-low.c (debug_reg_change_callback): Use
6002 debug_printf.
6003
0d51c8d7
YQ
60042015-08-25 Yao Qi <yao.qi@linaro.org>
6005
6006 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6007
31a43dd5
YQ
60082015-08-25 Yao Qi <yao.qi@linaro.org>
6009
6010 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6011
8ee52567
YQ
60122015-08-25 Yao Qi <yao.qi@linaro.org>
6013
6014 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6015 the code.
6016
ff3f0f45
YQ
60172015-08-25 Yao Qi <yao.qi@linaro.org>
6018
6019 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6020 Remove.
6021 (debug_reg_change_callback): Remove argument entry and add argument
6022 lwp. Remove local variable thread. Don't print thread id in the
6023 debugging output. Don't check whether pid of thread equals to pid.
6024 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6025 iterate_over_lwps instead find_inferior.
6026
3d40fbb5
PA
60272015-08-24 Pedro Alves <palves@redhat.com>
6028
6029 * inferiors.c (get_first_process): New function.
6030 * inferiors.h (get_first_process): New declaration.
6031 * remote-utils.c (read_ptid): Default to the first process in the
6032 list, instead of to the current thread's process.
6033
438e1e42
PA
60342015-08-24 Pedro Alves <palves@redhat.com>
6035
6036 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6037 * event-loop.c: Likewise.
6038 * remote-utils.c: Likewise.
6039 * tracepoint.c: Likewise.
6040
a8c6d4fc
PA
60412015-08-24 Pedro Alves <palves@redhat.com>
6042
6043 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6044 ptid_get_lwp.
6045
99b0bb12
PA
60462015-08-21 Pedro Alves <palves@redhat.com>
6047
6048 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6049 instead of literal 1.
6050
f8904751
PA
60512015-08-21 Pedro Alves <palves@redhat.com>
6052
6053 * tdesc.c (default_description): Explicitly zero-initialize.
6054
465a859e
PA
60552015-08-21 Pedro Alves <palves@redhat.com>
6056
6057 PR gdb/18749
6058 * inferiors.c (remove_thread): Discard any pending stop reply for
6059 this thread.
6060 * server.c (remove_all_on_match_pid): Rename to ...
6061 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6062 instead of a pid.
6063 (discard_queued_stop_replies): Change parameter to a ptid. Now
6064 extern.
6065 (handle_v_kill, kill_inferior_callback, captured_main)
6066 (process_serial_event): Adjust.
6067 * server.h (discard_queued_stop_replies): Declare.
6068
f0db101d
PA
60692015-08-21 Pedro Alves <palves@redhat.com>
6070
6071 * linux-low.c (wait_for_sigstop): Always switch to no thread
6072 selected if the previously current thread dies.
6073 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6074 process instead of the current thread's.
6075 * remote-utils.c (input_interrupt): Don't check if there's no
6076 current thread.
6077 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6078 current thread to the general thread fails, error out.
6079 (handle_qxfer_auxv, handle_qxfer_libraries)
6080 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6081 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6082 (handle_query): Check if there's a thread selected instead of
6083 checking whether there's any thread in the thread list.
6084 (handle_qxfer_threads, handle_qxfer_btrace)
6085 (handle_qxfer_btrace_conf): Don't error out early if there's no
6086 thread in the thread list.
6087 (handle_v_cont, myresume): Don't set the current thread to the
6088 continue thread.
6089 (process_serial_event) <Hg handling>: Also set thread_id if the
6090 previous general thread is still alive.
6091 (process_serial_event) <g/G handling>: If setting the current
6092 thread to the general thread fails, error out.
6093 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6094 thread's lwp instead of the current thread's.
6095 * target.c (set_desired_thread): If the desired thread was not
6096 found, leave the current thread pointing to NULL. Return an int
6097 (boolean) indicating success.
6098 * target.h (set_desired_thread): Change return type to int.
6099
40045d91
MF
61002015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6101
6102 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6103 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6104 #includes.
6105 (ps_get_thread_area): New function.
6106
45face3b
GB
61072015-08-19 Gary Benson <gbenson@redhat.com>
6108
6109 * hostio.c (handle_pread): Do not attempt to read more data
6110 than hostio_reply_with_data can fit in a packet.
6111
16d5f642
JB
61122015-08-18 Joel Brobecker <brobecker@adacore.com>
6113
6114 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6115
a738da3a
MF
61162015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6117
6118 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6119
33ebda9d
PA
61202015-08-06 Pedro Alves <palves@redhat.com>
6121
6122 * tracepoint.c (expr_eval_result): Now an int.
6123
a44892be
PA
61242015-08-06 Pedro Alves <palves@redhat.com>
6125
6126 * gdbthread.h (struct regcache): Forward declare.
6127 (struct thread_info) <regcache_data>: Now a struct regcache
6128 pointer.
6129 * inferiors.c (inferior_regcache_data)
6130 (set_inferior_regcache_data): Now work with struct regcache
6131 pointers.
6132 * inferiors.h (struct regcache): Forward declare.
6133 (inferior_regcache_data, set_inferior_regcache_data): Now work
6134 with struct regcache pointers.
6135 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6136 (free_register_cache_thread): Remove struct regcache pointer
6137 casts.
6138
608a1e46
PA
61392015-08-06 Pedro Alves <palves@redhat.com>
6140
6141 * server.c (captured_main): On error, print the exception message
6142 to stderr, and if run_once is set, throw a quit.
6143
f0ce0d3a
PA
61442015-08-06 Pedro Alves <palves@redhat.com>
6145
6146 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6147 the current thread.
6148
bf47e248
PA
61492015-08-06 Pedro Alves <palves@redhat.com>
6150
6151 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6152 reading beyond the passed in buffer length.
6153
b6b9ffcc
PL
61542015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6155
6156 * tracepoint.c (symbol_list) <required>: Remove.
6157
863d01bd
PA
61582015-08-06 Pedro Alves <palves@redhat.com>
6159
6160 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6161 count if stopping and suspending threads.
6162 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6163 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6164 (linux_detach): Complete an ongoing step-over.
6165 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6166 throughout.
6167 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6168 (linux_wait_1): If passing a signal to the inferior after
6169 finishing a step-over, unsuspend and re-resume all lwps. If we
6170 see a single-step event but the thread should be continuing, don't
6171 pass the trap to gdb.
6172 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6173 internal_error instead of gdb_assert.
6174 (enqueue_pending_signal): New function.
6175 (check_ptrace_stopped_lwp_gone): Add debug output.
6176 (start_step_over): Use internal_error instead of gdb_assert.
6177 (complete_ongoing_step_over): New function.
6178 (linux_resume_one_thread): Don't resume a suspended thread.
6179 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6180 it stepping.
6181
00db26fa
PA
61822015-08-06 Pedro Alves <palves@redhat.com>
6183
6184 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6185 (linux_thread_alive): Use lwp_is_marked_dead.
6186 (extended_event_reported): Delete.
6187 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6188 instead of extended_event_reported.
6189 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6190 as well.
6191 (lwp_is_marked_dead): New function.
6192 (lwp_running): Use lwp_is_marked_dead.
6193 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6194 comment.
6195
ad071a30
PA
61962015-08-06 Pedro Alves <palves@redhat.com>
6197
6198 * linux-low.c (linux_wait_1): Move fork event output out of the
6199 !report_to_gdb check. Pass event_child->waitstatus to
6200 target_waitstatus_to_string instead of ourstatus.
6201
524b57e6
YQ
62022015-08-04 Yao Qi <yao.qi@linaro.org>
6203
6204 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6205 if current_thread is 32 bit.
6206
6085d6f6
YQ
62072015-08-04 Yao Qi <yao.qi@linaro.org>
6208
6209 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6210 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6211 * server.c (extended_protocol): Remove "static".
6212 * server.h (extended_protocol): Declare it.
6213
8a7e4587
YQ
62142015-08-04 Yao Qi <yao.qi@linaro.org>
6215
6216 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6217 both aarch64 and aarch32.
6218 (aarch64_set_pc): Likewise.
6219
3b53ae99
YQ
62202015-08-04 Yao Qi <yao.qi@linaro.org>
6221
6222 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6223 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6224 arm-with-neon.xml to srv_xmlfiles.
6225 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6226 (is_64bit_tdesc): New function.
6227 (aarch64_linux_read_description): New function.
6228 (aarch64_arch_setup): Call aarch64_linux_read_description.
6229 (regs_info): Rename to regs_info_aarch64.
6230 (aarch64_regs_info): Return right regs_info.
6231 (initialize_low_arch): Call initialize_low_arch_aarch32.
6232
bd9e6534
YQ
62332015-08-04 Yao Qi <yao.qi@linaro.org>
6234
6235 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6236 * linux-aarch32-low.c: New file.
6237 * linux-aarch32-low.h: New file.
6238 * linux-arm-low.c (arm_fill_gregset): Move it to
6239 linux-aarch32-low.c.
6240 (arm_store_gregset): Likewise.
6241 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6242 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6243 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6244 (regs_info): Rename to regs_info_arm.
6245 (arm_regs_info): Return regs_info_aarch32 if
6246 have_ptrace_getregset is 1 and target description is
6247 arm_with_neon or arm_with_vfpv3.
6248 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6249 Call initialize_low_arch_aarch32 instead.
6250
ded48a5e
YQ
62512015-08-04 Yao Qi <yao.qi@linaro.org>
6252
6253 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6254 * linux-low.c: ... here.
6255 * linux-low.h (have_ptrace_getregset): Declare it.
6256
96e9210f
PA
62572015-08-04 Pedro Alves <palves@redhat.com>
6258
6259 * thread-db.c (struct thread_db): Use new typedefs.
6260 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6261 CHK calls.
6262 (disable_thread_event_reporting): Cast result of dlsym to
6263 destination function pointer type.
6264 (thread_db_mourn): Use td_ta_delete_ftype.
6265
af60a1ef
SL
62662015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6267
6268 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6269 arch variant.
6270 (CDX_BREAKPOINT): Define for R2.
6271 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6272 (the_low_target): Add comments.
6273
e8b41681
YQ
62742015-07-30 Yao Qi <yao.qi@linaro.org>
6275
6276 * linux-arm-low.c (arm_hwcap): Remove it.
6277 (arm_read_description): New local variable arm_hwcap. Don't
6278 set arm_hwcap to zero.
6279
89abb039
YQ
62802015-07-30 Yao Qi <yao.qi@linaro.org>
6281
6282 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6283 Use regcache->tdesc instead.
6284 (arm_store_wmmxregset): Likewise.
6285 (arm_fill_vfpregset): Likewise.
6286 (arm_store_vfpregset): Likewise.
6287
deca266c
YQ
62882015-07-30 Yao Qi <yao.qi@linaro.org>
6289
6290 * linux-arm-low.c: Include arch/arm.h.
6291 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6292 (arm_store_gregset): Likewise.
6293
aa58a496
SM
62942015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6295
6296 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6297 ptrace's 4th parameter.
6298
50904b25
YQ
62992015-07-27 Yao Qi <yao.qi@linaro.org>
6300
6301 * configure.srv (case aarch64*-*-linux*): Don't set
6302 srv_linux_usrregs.
6303
5826e159
PA
63042015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6305
6306 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6307 sys/ptrace.h.
6308 * linux-arm-low.c: Likewise.
6309 * linux-cris-low.c: Likewise.
6310 * linux-crisv32-low.c: Likewise.
6311 * linux-low.c: Likewise.
6312 * linux-m68k-low.c: Likewise.
6313 * linux-mips-low.c: Likewise.
6314 * linux-nios2-low.c: Likewise.
6315 * linux-s390-low.c: Likewise.
6316 * linux-sparc-low.c: Likewise.
6317 * linux-tic6x-low.c: Likewise.
6318 * linux-tile-low.c: Likewise.
6319 * linux-x86-low.c: Likewise.
6320
54019719
PA
63212015-07-24 Pedro Alves <palves@redhat.com>
6322
6323 * config.in: Regenerate.
6324 * configure: Regenerate.
6325
eb7aa561
PA
63262015-07-24 Pedro Alves <palves@redhat.com>
6327
6328 * acinclude.m4: Include ../ptrace.m4.
6329 * configure.ac: Call GDB_AC_PTRACE.
6330 * config.in, configure: Regenerate.
6331
55d7b841
YQ
63322015-07-24 Yao Qi <yao.qi@linaro.org>
6333
6334 * linux-low.c (linux_create_inferior): Remove setting to
6335 proc->priv->new_inferior.
6336 (linux_attach): Likewise.
6337 (linux_low_filter_event): Likewise.
6338 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6339
c06cbd92
YQ
63402015-07-24 Yao Qi <yao.qi@linaro.org>
6341
6342 * linux-low.c (linux_arch_setup): New function.
6343 (linux_low_filter_event): If proc->tdesc is NULL and
6344 proc->attached is true, call the_low_target.arch_setup.
6345 Otherwise, keep status pending, and return.
6346 (linux_resume_one_lwp_throw): Don't call get_pc if
6347 thread->while_stepping isn't NULL. Don't call
6348 get_thread_regcache if proc->tdesc is NULL.
6349 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6350 (linux_target_ops): Install arch_setup.
6351 * server.c (start_inferior): Call the_target->arch_setup.
6352 * target.h (struct target_ops) <arch_setup>: New field.
6353 (target_arch_setup): New marco.
6354 * lynx-low.c (lynx_target_ops): Update.
6355 * nto-low.c (nto_target_ops): Update.
6356 * spu-low.c (spu_target_ops): Update.
6357 * win32-low.c (win32_target_ops): Update.
6358
5ae3ebba
YQ
63592015-07-24 Yao Qi <yao.qi@linaro.org>
6360
6361 * linux-low.c (linux_add_process): Don't set
6362 proc->priv->new_inferior.
6363 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6364 (linux_attach): Likewise.
6365
eb97750b
YQ
63662015-07-24 Yao Qi <yao.qi@linaro.org>
6367
6368 * server.c (start_inferior): Code refactor.
6369
51aee833
YQ
63702015-07-24 Yao Qi <yao.qi@linaro.org>
6371
6372 * server.c (process_serial_event): Set general_thread.
6373
af1b22f3
YQ
63742015-07-21 Yao Qi <yao.qi@linaro.org>
6375
6376 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6377 aarch64_linux_get_debug_reg_capacity.
6378
554717a3
YQ
63792015-07-17 Yao Qi <yao.qi@linaro.org>
6380
6381 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6382 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6383 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6384 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6385 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6386 (AARCH64_HWP_ALIGNMENT): Likewise.
6387 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6388 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6389 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6390 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6391 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6392 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6393 (struct aarch64_debug_reg_state): Likewise.
6394 (struct arch_lwp_info): Likewise.
6395 (aarch64_align_watchpoint): Likewise.
6396 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6397 (aarch64_watchpoint_length): Likewise.
6398 (aarch64_point_encode_ctrl_reg): Likewise
6399 (aarch64_point_is_aligned): Likewise.
6400 (aarch64_align_watchpoint): Likewise.
6401 (aarch64_linux_set_debug_regs):
6402 (aarch64_dr_state_insert_one_point): Likewise.
6403 (aarch64_dr_state_remove_one_point): Likewise.
6404 (aarch64_handle_breakpoint): Likewise.
6405 (aarch64_handle_aligned_watchpoint): Likewise.
6406 (aarch64_handle_unaligned_watchpoint): Likewise.
6407 (aarch64_handle_watchpoint): Likewise.
6408
c67ca4de
YQ
64092015-07-17 Yao Qi <yao.qi@linaro.org>
6410
6411 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6412 and don't aarch64_get_debug_reg_state. All callers update.
6413 (aarch64_handle_aligned_watchpoint): Likewise.
6414 (aarch64_handle_unaligned_watchpoint): Likewise.
6415 (aarch64_handle_watchpoint): Likewise.
6416 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6417 (aarch64_remove_point): Likewise.
6418
25abf979
YQ
64192015-07-17 Yao Qi <yao.qi@linaro.org>
6420
6421 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6422 debug_printf.
6423 (aarch64_handle_unaligned_watchpoint): Likewise.
6424
db1ff28b
JK
64252015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6426
6427 Revert the previous 3 commits:
6428 Move gdb_regex* to common/
6429 Move linux_find_memory_regions_full & co.
6430 gdbserver build-id attribute generator
6431
700ca40f
JK
64322015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6433 Jan Kratochvil <jan.kratochvil@redhat.com>
6434
6435 gdbserver build-id attribute generator.
6436 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6437 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6438 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6439 (find_phdr): New.
6440 (get_dynamic): Use find_pdhr to traverse program headers.
6441 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6442 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6443 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6444 (get_hex_build_id): New.
6445 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6446 to reply XML document.
6447
9904185c
JK
64482015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6449 Jan Kratochvil <jan.kratochvil@redhat.com>
6450
6451 * target.c: Include target/target-utils.h and fcntl.h.
6452 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6453 (target_fileio_read_stralloc): New functions.
6454
6e5b4429
JK
64552015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6456
6457 * Makefile.in (OBS): Add gdb_regex.o.
6458 (gdb_regex.o): New.
6459 * config.in: Rebuilt.
6460 * configure: Rebuilt.
6461
ddc98fbf
JK
64622015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6463 Jan Kratochvil <jan.kratochvil@redhat.com>
6464
6465 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6466 * Makefile.in (OBS): Add target-utils.o.
6467 (linux-maps.o, target-utils.o): New.
6468 * configure.srv (srv_linux_obj): Add linux-maps.o.
6469
e57bb7a0
PL
64702015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6471
6472 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6473 function, return 1.
6474 (the_low_target): Install it.
6475
586b02a9
PA
64762015-07-14 Pedro Alves <palves@redhat.com>
6477
6478 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6479 Instead, ignore ECHILD, and throw an error for other errnos.
6480
58c1b36c
PA
64812015-07-10 Pedro Alves <palves@redhat.com>
6482
6483 * event-loop.c (struct callback_event) <data>: Change type to
6484 gdb_client_data instance instead of gdb_client_data pointer.
6485 (append_callback_event): Adjust.
6486
421530db
PL
64872015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6488
6489 * linux-aarch64-low.c: Add comments for each linux_target_ops
6490 method. Remove comments already covered in target_ops and
6491 linux_target_ops definitions.
6492 (the_low_target): Add comments for each unimplemented method.
6493
c2d65f38
YQ
64942015-07-09 Yao Qi <yao.qi@linaro.org>
6495
6496 * linux-aarch64-low.c (aarch64_regmap): Remove.
6497 (aarch64_usrregs_info): Remove.
6498 (regs_info): Set field usrregs to NULL.
6499
b20a6524
MM
65002015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6501
6502 * linux-low.c: Include "rsp-low.h"
6503 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6504 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6505 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6506 (handle_btrace_enable_pt): New.
6507 (handle_btrace_general_set): Support "pt".
6508 (handle_btrace_conf_general_set): Support "pt:size".
6509
96c97461
PL
65102015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6511
6512 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6513 Z_PACKET_SW_BP.
6514
37d66942
PL
65152015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6516
6517 * linux-aarch64-low.c: Remove comment about endianness.
6518 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6519 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6520 memcmp.
6521
dc06243f
GB
65222015-06-24 Gary Benson <gbenson@redhat.com>
6523
6524 * linux-i386-ipa.c (stdint.h): Do not include.
6525 * lynx-i386-low.c (stdint.h): Likewise.
6526 * lynx-ppc-low.c (stdint.h): Likewise.
6527 * mem-break.c (stdint.h): Likewise.
6528 * thread-db.c (stdint.h): Likewise.
6529 * tracepoint.c (stdint.h): Likewise.
6530 * win32-low.c (stdint.h): Likewise.
6531
124e13d9
SM
65322015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6533
6534 * server.c (write_qxfer_response): Update call to
6535 remote_escape_output.
6536
909c2cda
JK
65372015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6538 Jan Kratochvil <jan.kratochvil@redhat.com>
6539
6540 Merge multiple hex conversions.
6541 * gdbreplay.c (tohex): Rename to 'fromhex'.
6542 (logchar): Use fromhex.
6543
24c05f46
JK
65442015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6545
6546 * server.c (handle_qxfer_libraries): Set `version' attribute for
6547 <library-list>.
6548
14d2069a
GB
65492015-06-10 Gary Benson <gbenson@redhat.com>
6550
6551 * target.h (struct target_ops) <multifs_open>: New field.
6552 <multifs_unlink>: Likewise.
6553 <multifs_readlink>: Likewise.
6554 * linux-low.c (nat/linux-namespaces.h): New include.
6555 (linux_target_ops): Initialize the_target->multifs_open,
6556 the_target->multifs_unlink and the_target->multifs_readlink.
6557 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6558 * hostio.c (hostio_fs_pid): New static variable.
6559 (hostio_handle_new_gdb_connection): New function.
6560 (handle_setfs): Likewise.
6561 (handle_open): Use the_target->multifs_open as appropriate.
6562 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6563 (handle_readlink): Use the_target->multifs_readlink as
6564 appropriate.
6565 (handle_vFile): Handle vFile:setfs packets.
6566 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6567 after target_handle_new_gdb_connection.
6568
4b8b5e72
GB
65692015-06-10 Gary Benson <gbenson@redhat.com>
6570
6571 * configure.ac (AC_CHECK_FUNCS): Add setns.
6572 * config.in: Regenerate.
6573 * configure: Likewise.
6574 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6575 (linux-namespaces.o): New rule.
6576 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6577
3ac2e371
GB
65782015-06-09 Gary Benson <gbenson@redhat.com>
6579
6580 * hostio.c (handle_open): Process mode argument with
6581 fileio_to_host_mode.
6582
ca9b78ce
YQ
65832015-06-01 Yao Qi <yao.qi@linaro.org>
6584
6585 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6586 * linux-x86-low.c: Likewise.
6587
bfacd19d
DB
65882015-05-28 Don Breazeal <donb@codesourcery.com>
6589
6590 * linux-low.c (handle_extended_wait): Initialize
6591 thread_info.last_resume_kind for new fork children.
6592
452003ef
PA
65932015-05-15 Pedro Alves <palves@redhat.com>
6594
6595 * target.h (target_handle_new_gdb_connection): Rewrite using if
6596 wrapped in do/while.
6597
1041a03c
JB
65982015-05-14 Joel Brobecker <brobecker@adacore.com>
6599
6600 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6601 * configure, config.in: Regenerate.
6602 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6603 Declare typedef.
6604
c269dbdb
DB
66052015-05-12 Don Breazeal <donb@codesourcery.com>
6606
6607 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6608 PTRACE_EVENT_VFORK_DONE.
6609 (linux_low_ptrace_options, extended_event_reported): Add vfork
6610 events.
6611 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6612 and "vforkdone" for RSP 'T' Stop Reply Packet.
6613 * server.h (report_vfork_events): Declare
6614 global variable.
6615
3a8a0396
DB
66162015-05-12 Don Breazeal <donb@codesourcery.com>
6617
6618 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6619 (the_low_target) <new_fork>: Initialize new member.
6620 * linux-arm-low.c (arm_new_fork): New function.
6621 (the_low_target) <new_fork>: Initialize new member.
6622 * linux-low.c (handle_extended_wait): Call new target function
6623 new_fork.
6624 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6625 * linux-mips-low.c (mips_add_watchpoint): New function
6626 extracted from mips_insert_point.
6627 (the_low_target) <new_fork>: Initialize new member.
6628 (mips_linux_new_fork): New function.
6629 (mips_insert_point): Call mips_add_watchpoint.
6630 * linux-x86-low.c (x86_linux_new_fork): New function.
6631 (the_low_target) <new_fork>: Initialize new member.
6632
de0d863e
DB
66332015-05-12 Don Breazeal <donb@codesourcery.com>
6634
6635 * linux-low.c (handle_extended_wait): Implement return value,
6636 rename argument 'event_child' to 'event_lwp', handle
6637 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6638 (linux_low_ptrace_options): New function.
6639 (linux_low_filter_event): Call linux_low_ptrace_options,
6640 use different argument fo linux_enable_event_reporting,
6641 use return value from handle_extended_wait.
6642 (extended_event_reported): New function.
6643 (linux_wait_1): Call extended_event_reported and set
6644 status to report fork events.
6645 (linux_write_memory): Add pid to debug message.
6646 (reset_lwp_ptrace_options_callback): New function.
6647 (linux_handle_new_gdb_connection): New function.
6648 (linux_target_ops): Initialize new structure member.
6649 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6650 * lynx-low.c: Initialize new structure member.
6651 * remote-utils.c (prepare_resume_reply): Implement stop reason
6652 "fork" for "T" stop message.
6653 * server.c (handle_query): Call handle_new_gdb_connection.
6654 * server.h (report_fork_events): Declare global flag.
6655 * target.h (struct target_ops) <handle_new_gdb_connection>:
6656 New member.
6657 (target_handle_new_gdb_connection): New macro.
6658 * win32-low.c: Initialize new structure member.
6659
ddcbc397
DB
66602015-05-12 Don Breazeal <donb@codesourcery.com>
6661
6662 * mem-break.c (APPEND_TO_LIST): Define macro.
6663 (clone_agent_expr): New function.
6664 (clone_one_breakpoint): New function.
6665 (clone_all_breakpoints): New function.
6666 * mem-break.h: Declare new functions.
6667
89245bc0
DB
66682015-05-12 Don Breazeal <donb@codesourcery.com>
6669
6670 * linux-low.c (linux_supports_fork_events): New function.
6671 (linux_supports_vfork_events): New function.
6672 (linux_target_ops): Initialize new structure members.
6673 (initialize_low): Call linux_check_ptrace_features.
6674 * lynx-low.c (lynx_target_ops): Initialize new structure
6675 members.
6676 * server.c (report_fork_events, report_vfork_events):
6677 New global flags.
6678 (handle_query): Add new features to qSupported packet and
6679 response.
6680 (captured_main): Initialize new global variables.
6681 * target.h (struct target_ops) <supports_fork_events>:
6682 New member.
6683 <supports_vfork_events>: New member.
6684 (target_supports_fork_events): New macro.
6685 (target_supports_vfork_events): New macro.
6686 * win32-low.c (win32_target_ops): Initialize new structure
6687 members.
6688
835205d0
GB
66892015-05-12 Gary Benson <gbenson@redhat.com>
6690
6691 * server.c (handle_qxfer_exec_file): Use current process
6692 if annex is empty.
6693
21e94bd9
SL
66942015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6695
6696 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6697 Remove HAVE_PTRACE_GETREGS conditionals.
6698 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6699 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6700
45614f15
YQ
67012015-05-08 Yao Qi <yao.qi@linaro.org>
6702
6703 * linux-low.c (linux_supports_conditional_breakpoints): New
6704 function.
6705 (linux_target_ops): Install new target method.
6706 * lynx-low.c (lynx_target_ops): Install NULL hook for
6707 supports_conditional_breakpoints.
6708 * nto-low.c (nto_target_ops): Likewise.
6709 * spu-low.c (spu_target_ops): Likewise.
6710 * win32-low.c (win32_target_ops): Likewise.
6711 * server.c (handle_query): Check
6712 target_supports_conditional_breakpoints.
6713 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6714 New field.
6715 (target_supports_conditional_breakpoints): New macro.
6716
80ad801e
PA
67172015-05-06 Pedro Alves <palves@redhat.com>
6718
6719 PR server/18081
6720 * server.c (start_inferior): If the process exits, mourn it.
6721
819843c7
GB
67222015-04-21 Gary Benson <gbenson@redhat.com>
6723
6724 * hostio.c (fileio_open_flags_to_host): Factored out to
6725 fileio_to_host_openflags in common/fileio.c. Single use
6726 updated.
6727
a2d5a9d7
MF
67282015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6729
6730 * linux-xtensa-low.c (xtensa_fill_gregset)
6731 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6732 XCHAL_HAVE_LOOP.
6733
deb44829
MF
67342015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6735
6736 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6737 (regs_info): Replace usrregs pointer with NULL.
6738
e57f1de3
GB
67392015-04-17 Gary Benson <gbenson@redhat.com>
6740
6741 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6742 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6743 * server.c (handle_qxfer_exec_file): New function.
6744 (qxfer_packets): Add exec-file entry.
6745 (handle_query): Report qXfer:exec-file:read as supported packet.
6746
62828379
RN
67472015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6748
6749 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6750
b88bb450
GB
67512015-04-09 Gary Benson <gbenson@redhat.com>
6752
6753 * hostio-errno.c (errno_to_fileio_error): Remove function.
6754 Update caller to use remote_fileio_to_fio_error.
6755
c8f4bfdd
YQ
67562015-04-09 Yao Qi <yao.qi@linaro.org>
6757
6758 * linux-low.c (linux_insert_point): Call
6759 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6760 (linux_remove_point): Call remove_memory_breakpoint if type is
6761 raw_bkpt_type_sw.
6762 * linux-x86-low.c (x86_insert_point): Don't call
6763 insert_memory_breakpoint.
6764 (x86_remove_point): Don't call remove_memory_breakpoint.
6765
41f98f02
PA
67662015-04-01 Pedro Alves <palves@redhat.com>
6767 Cleber Rosa <crosa@redhat.com>
6768
6769 * server.c (gdbserver_usage): Reorganize and extend the usage
6770 message.
6771
2bf6fb9d
PA
67722015-03-24 Pedro Alves <palves@redhat.com>
6773
6774 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6775 output. Also dump TRAP_TRACE.
6776 (linux_low_filter_event): In debug output, distinguish a
6777 resume_stop SIGSTOP from a delayed SIGSTOP.
6778
369f6daa
GB
67792015-03-24 Gary Benson <gbenson@redhat.com>
6780
6781 * linux-x86-low.c (x86_linux_new_thread): Moved to
6782 nat/x86-linux.c.
6783 (x86_linux_prepare_to_resume): Likewise.
6784
8e5d4070
GB
67852015-03-24 Gary Benson <gbenson@redhat.com>
6786
6787 * Makefile.in (x86-linux-dregs.o): New rule.
6788 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6789 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6790 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6791 (x86_linux_dr_get): Likewise.
6792 (x86_linux_dr_set): Likewise.
6793 (update_debug_registers_callback): Likewise.
6794 (x86_linux_dr_set_addr): Likewise.
6795 (x86_linux_dr_get_addr): Likewise.
6796 (x86_linux_dr_set_control): Likewise.
6797 (x86_linux_dr_get_control): Likewise.
6798 (x86_linux_dr_get_status): Likewise.
6799 (x86_linux_update_debug_registers): Likewise.
6800
2b95d440
GB
68012015-03-24 Gary Benson <gbenson@redhat.com>
6802
6803 * linux-x86-low.c (x86_linux_update_debug_registers):
6804 New function, factored out from...
6805 (x86_linux_prepare_to_resume): ...this.
6806
14b0bc68
GB
68072015-03-24 Gary Benson <gbenson@redhat.com>
6808
6809 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6810 (x86_linux_dr_set): Likewise.
6811 (update_debug_registers_callback): Likewise.
6812 (x86_linux_dr_set_addr): Likewise.
6813 (x86_linux_dr_get_addr): Likewise.
6814 (x86_linux_dr_set_control): Likewise.
6815 (x86_linux_dr_get_control): Likewise.
6816 (x86_linux_dr_get_status): Likewise.
6817 (x86_linux_prepare_to_resume): Likewise.
6818
5dfe6ca8
GB
68192015-03-24 Gary Benson <gbenson@redhat.com>
6820
6821 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6822 Use perror_with_name. Pass string through gettext.
6823 (x86_linux_dr_set): Likewise.
6824
d33472ad
GB
68252015-03-24 Gary Benson <gbenson@redhat.com>
6826
6827 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6828 (x86_linux_dr_set_addr): ...this.
6829 (x86_dr_low_get_addr): Rename to...
6830 (x86_linux_dr_get_addr): ...this.
6831 (x86_dr_low_set_control): Rename to...
6832 (x86_linux_dr_set_control): ...this.
6833 (x86_dr_low_get_control): Rename to...
6834 (x86_linux_dr_get_control): ...this.
6835 (x86_dr_low_get_status): Rename to...
6836 (x86_linux_dr_get_status): ...this.
6837 (x86_dr_low): Update with new function names.
6838
4b134ca1
GB
68392015-03-24 Gary Benson <gbenson@redhat.com>
6840
6841 * Makefile.in (x86-linux.o): New rule.
6842 * configure.srv: Add x86-linux.o to relevant targets.
6843 * linux-low.c (lwp_set_arch_private_info): New function.
6844 (lwp_arch_private_info): Likewise.
6845 * linux-x86-low.c: Include nat/x86-linux.h.
6846 (arch_lwp_info): Removed structure.
6847 (update_debug_registers_callback):
6848 Use lwp_set_debug_registers_changed.
6849 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6850 and lwp_set_debug_registers_changed.
6851 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6852
34c703da
GB
68532015-03-24 Gary Benson <gbenson@redhat.com>
6854
6855 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6856 * linux-arm-low.c (arm_new_thread): Likewise.
6857 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6858 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6859 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6860 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6861
cff068da
GB
68622015-03-24 Gary Benson <gbenson@redhat.com>
6863
6864 * linux-low.c (ptid_of_lwp): New function.
6865 (lwp_is_stopped): Likewise.
6866 (lwp_stop_reason): Likewise.
6867 * linux-x86-low.c (update_debug_registers_callback):
6868 Use lwp_is_stopped.
6869 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6870 lwp_stop_reason.
6871
b2f7c7e8
GB
68722015-03-24 Gary Benson <gbenson@redhat.com>
6873
6874 * linux-low.h (linux_stop_lwp): Remove declaration.
6875
6d4ee8c6
GB
68762015-03-24 Gary Benson <gbenson@redhat.com>
6877
6878 * linux-low.h: Include nat/linux-nat.h.
6879 * linux-low.c (iterate_over_lwps_args): New structure.
6880 (iterate_over_lwps_filter): New function.
6881 (iterate_over_lwps): Likewise.
6882 * linux-x86-low.c (update_debug_registers_callback):
6883 Update signature to what iterate_over_lwps expects.
6884 Remove PID check that iterate_over_lwps now performs.
6885 (x86_dr_low_set_addr): Use iterate_over_lwps.
6886 (x86_dr_low_set_control): Likewise.
6887
70a0bb6b
GB
68882015-03-24 Gary Benson <gbenson@redhat.com>
6889
6890 * linux-x86-low.c (x86_debug_reg_state): New function.
6891 (x86_linux_prepare_to_resume): Use the above.
6892
7b669087
GB
68932015-03-24 Gary Benson <gbenson@redhat.com>
6894
6895 * linux-low.c (current_lwp_ptid): New function.
6896 * linux-x86-low.c: Include nat/linux-nat.h.
6897 (x86_dr_low_get_addr): Use current_lwp_ptid.
6898 (x86_dr_low_get_control): Likewise.
6899 (x86_dr_low_get_status): Likewise.
6900
eef49a3d
PA
69012015-03-20 Pedro Alves <palves@redhat.com>
6902
6903 * tracepoint.c (cmd_qtstatus): Make "str" const.
6904
b2333d22
PA
69052015-03-20 Pedro Alves <palves@redhat.com>
6906
6907 * server.c (handle_general_set): Make "req_str" const.
6908
23f238d3
PA
69092015-03-19 Pedro Alves <palves@redhat.com>
6910
6911 * linux-low.c (linux_resume_one_lwp): Rename to ...
6912 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6913 instead call perror_with_name.
6914 (check_ptrace_stopped_lwp_gone): New function.
6915 (linux_resume_one_lwp): Reimplement as wrapper around
6916 linux_resume_one_lwp_throw that swallows errors if the LWP is
6917 gone.
6918
91baf43f
PA
69192015-03-19 Pedro Alves <palves@redhat.com>
6920
6921 * linux-low.c (count_events_callback, select_event_lwp_callback):
6922 No longer check whether the thread has resume_stop as last resume
6923 kind.
6924
8bf3b159
PA
69252015-03-19 Pedro Alves <palves@redhat.com>
6926
6927 * linux-low.c (count_events_callback, select_event_lwp_callback):
6928 Use the lwp's status_pending_p field, not the thread's.
6929
b90fc188
PA
69302015-03-19 Pedro Alves <palves@redhat.com>
6931
6932 * linux-low.c (select_event_lwp_callback): Update comments to
6933 no longer mention SIGTRAP.
6934
464b0089
GB
69352015-03-18 Gary Benson <gbenson@redhat.com>
6936
6937 * server.c (handle_query): Do not report vFile:fstat as supported.
6938
aa9e327f
GB
69392015-03-11 Gary Benson <gbenson@redhat.com>
6940
6941 * hostio.c (sys/types.h): New include.
6942 (sys/stat.h): Likewise.
6943 (common-remote-fileio.h): Likewise.
6944 (handle_fstat): New function.
6945 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6946
791c0056
GB
69472015-03-11 Gary Benson <gbenson@redhat.com>
6948
6949 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6950 struct stat.st_blocks and struct stat.st_blksize.
6951 * configure: Regenerate.
6952 * config.in: Likewise.
6953 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6954 (OBS): Add common-remote-fileio.o.
6955 (common-remote-fileio.o): New rule.
6956
9a9df970
PA
69572015-03-09 Pedro Alves <palves@redhat.com>
6958
6959 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6960 'struct sockaddr' pointer in 'accept' call.
6961
9eb1356e
PA
69622015-03-09 Pedro Alves <palves@redhat.com>
6963
6964 Revert:
6965 2015-03-07 Pedro Alves <palves@redhat.com>
6966 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6967 or <winsock2.h> here. Instead include "gdb_socket.h".
6968 (remote_open): Use union gdb_sockaddr_u.
6969 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6970 or <winsock2.h> here. Instead include "gdb_socket.h".
6971 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6972 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6973 or <sys/un.h>.
6974 (init_named_socket, gdb_agent_helper_thread): Use union
6975 gdb_sockaddr_u.
6976
aac331e4
PA
69772015-03-07 Pedro Alves <palves@redhat.com>
6978
6979 * configure.ac (build_warnings): Move
6980 -Wdeclaration-after-statement to the C-specific set.
6981 * configure: Regenerate.
6982
366c75fc
PA
69832015-03-07 Pedro Alves <palves@redhat.com>
6984
6985 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6986 or <winsock2.h> here. Instead include "gdb_socket.h".
6987 (remote_open): Use union gdb_sockaddr_u.
6988 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6989 or <winsock2.h> here. Instead include "gdb_socket.h".
6990 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6991 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6992 or <sys/un.h>.
6993 (init_named_socket, gdb_agent_helper_thread): Use union
6994 gdb_sockaddr_u.
6995
492d29ea
PA
69962015-03-07 Pedro Alves <palves@redhat.com>
6997
6998 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6999 instead.
7000
60a191ed
YQ
70012015-03-06 Yao Qi <yao.qi@linaro.org>
7002
7003 * linux-aarch64-low.c (aarch64_insert_point): Use
7004 show_debug_regs as a boolean.
7005 (aarch64_remove_point): Likewise.
7006
f5771b1d
PA
70072015-03-05 Pedro Alves <palves@redhat.com>
7008
7009 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7010 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7011 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7012 * nto-low.c (nto_target_ops): Likewise.
7013 * spu-low.c (spu_target_ops): Likewise.
7014 * win32-low.c (win32_target_ops): Likewise.
7015
3e572f71
PA
70162015-03-04 Pedro Alves <palves@redhat.com>
7017
72f4393d 7018 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7019 Decide whether a breakpoint triggered based on the SIGTRAP's
7020 siginfo.si_code.
72f4393d
L
7021 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7022 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7023 (linux_low_filter_event): Check for breakpoints before checking
7024 watchpoints.
7025 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7026 siginfo.si_code.
72f4393d
L
7027 (linux_stopped_by_sw_breakpoint)
7028 (linux_supports_stopped_by_sw_breakpoint)
7029 (linux_stopped_by_hw_breakpoint)
7030 (linux_supports_stopped_by_hw_breakpoint): New functions.
7031 (linux_target_ops): Install new target methods.
3e572f71 7032
1ec68e26
PA
70332015-03-04 Pedro Alves <palves@redhat.com>
7034
7035 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7036 * server.c (swbreak_feature, hwbreak_feature): New globals.
7037 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7038 (captured_main): Clear swbreak_feature and hwbreak_feature.
7039 * server.h (swbreak_feature, hwbreak_feature): Declare.
7040 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7041 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7042 supports_stopped_by_hw_breakpoint>: New fields.
7043 (target_supports_stopped_by_sw_breakpoint)
7044 (target_stopped_by_sw_breakpoint)
7045 (target_supports_stopped_by_hw_breakpoint)
7046 (target_stopped_by_hw_breakpoint): Declare.
7047
15c66dd6
PA
70482015-03-04 Pedro Alves <palves@redhat.com>
7049
7050 enum lwp_stop_reason -> enum target_stop_reason
7051 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7052 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7053 (linux_wait_1, stuck_in_jump_pad_callback)
7054 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7055 (linux_stopped_by_watchpoint):
7056 * linux-low.h (enum lwp_stop_reason): Delete.
7057 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7058 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7059
98fc70d6
YQ
70602015-03-04 Yao Qi <yao.qi@linaro.org>
7061
7062 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7063
dd2ac174
GB
70642015-03-03 Gary Benson <gbenson@redhat.com>
7065
7066 * hostio.c (handle_vFile): Fix prefix lengths.
7067
d68e53f4
MM
70682015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7069
7070 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7071 ptr_bits.
7072
bf2d68ab
AA
70732015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7074
7075 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7076 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7077 (clean): Add "rm -f" for above C files.
7078 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7079 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7080 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7081 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7082 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7083 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7084 (init_registers_s390x_vx_linux64)
7085 (init_registers_s390x_tevx_linux64)
7086 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7087 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7088 declarations.
7089 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7090 (s390_store_vxrs_high): New functions.
7091 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7092 NT_S390_VXRS_HIGH.
7093 (s390_arch_setup): Add logic for selecting one of the new target
7094 descriptions. Activate the new vector regsets if applicable.
7095 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7096 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7097 and init_registers_s390x_tevx_linux64.
7098
c966a859
PA
70992015-03-01 Pedro Alves <palves@redhat.com>
7100
7101 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7102 parameter.
7103
4180215b
PA
71042015-02-27 Pedro Alves <palves@redhat.com>
7105
7106 * linux-x86-low.c (u_debugreg_offset): New function.
7107 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7108
749bab01
PA
71092015-02-27 Pedro Alves <palves@redhat.com>
7110
7111 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7112 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7113 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7114 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7115 (ps_lsetfpregs, ps_getpid)
7116 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7117 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7118 (ps_lsetxregs, ps_plog): Declare.
7119
3c14e5a3
PA
71202015-02-27 Pedro Alves <palves@redhat.com>
7121
7122 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7123 IP_AGENT_EXPORT_FUNC.
7124 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7125 IP_AGENT_EXPORT_FUNC.
7126 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7127 (IP_AGENT_EXPORT): Delete.
7128 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7129 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7130 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7131 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7132 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7133 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7134 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7135 (traceframe_read_count, traceframe_write_count)
7136 (traceframes_created, trace_state_variables, get_raw_reg)
7137 (get_trace_state_variable_value, set_trace_state_variable_value)
7138 (ust_loaded, helper_thread_id, cmd_buf): Use
7139 IPA_SYM_EXPORTED_NAME.
7140 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7141 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7142 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7143 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7144 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7145 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7146 EXTERN_C_PUSH/EXTERN_C_POP.
7147 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7148 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7149 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7150 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7151 (traceframe_write_count, traceframe_read_count)
7152 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7153 (about_to_request_buffer_space, get_trace_state_variable_value)
7154 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7155 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7156 EXTERN_C_PUSH/EXTERN_C_POP.
7157 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7158 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7159 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7160 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7161 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7162 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7163 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7164 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7165 Define.
7166 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7167 (IP_AGENT_EXPORT_VAR_DECL): Define.
7168 (tracing): Declare.
7169 (gdb_agent_get_raw_reg): Declare.
7170
fe978cb0
PA
71712015-02-27 Tom Tromey <tromey@redhat.com>
7172 Pedro Alves <palves@redhat.com>
7173
7174 Rename symbols whose names are reserved C++ keywords throughout.
7175
3bc3d82a
PA
71762015-02-27 Pedro Alves <palves@redhat.com>
7177
7178 * Makefile.in (COMPILER): New, get it from autoconf.
7179 (CXX): Get from autoconf instead.
7180 (COMPILE.pre): Use COMPILER.
7181 (CC-LD): Rename to ...
7182 (CC_LD): ... this. Use COMPILER.
7183 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7184 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7185 * acinclude.m4: Include build-with-cxx.m4.
7186 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7187 Disable -Werror by default if building in C++ mode.
7188 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7189 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7190 the C++ compiler. Save/restore CXXFLAGS too.
7191 * configure: Regenerate.
7192
07697489
PA
71932015-02-27 Pedro Alves <palves@redhat.com>
7194
7195 * acinclude.m4: Include libiberty.m4.
7196 * configure.ac: Call libiberty_INIT.
7197 * config.in, configure: Regenerate.
7198
9beb7c4e
PA
71992015-02-26 Pedro Alves <palves@redhat.com>
7200
7201 * linux-low.c (linux_wait_1): When incrementing the PC past a
7202 program breakpoint always use the_low_target.breakpoint_len as
7203 increment, rather than the maximum between that and
7204 the_low_target.decr_pc_after_break.
7205
8090aef2
PA
72062015-02-23 Pedro Alves <palves@redhat.com>
7207
7208 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7209 thread was doing a step-over; always adjust the PC if
7210 we stepped over a permanent breakpoint.
7211 (linux_wait_1): If we stepped over breakpoint that was on top of a
7212 permanent breakpoint, manually advance the PC past it.
7213
bc9540e8
PA
72142015-02-23 Pedro Alves <palves@redhat.com>
7215
7216 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7217 modes.
7218 (x86_fill_gregset, x86_store_gregset): Use it when handling
7219 $orig_eax.
7220
2db9a427
PA
72212015-02-20 Pedro Alves <palves@redhat.com>
7222
7223 * thread-db.c: Include "nat/linux-procfs.h".
7224 (thread_db_init): Skip listing new threads if the kernel supports
7225 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7226
afa8d396
PA
72272015-02-20 Pedro Alves <palves@redhat.com>
7228
7229 * linux-low.c (status_pending_p_callback): Use ptid_match.
7230
c9587f88
AT
72312015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7232
7233 PR breakpoints/16812
7234 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7235 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7236 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7237
b05ec7a5
AT
72382015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7239
7240 PR breakpoints/15956
7241 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7242
d33501a5
MM
72432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7244
7245 * linux-low.c (linux_low_btrace_conf): Print size.
7246 * server.c (handle_btrace_conf_general_set): New.
7247 (hanle_general_set): Call handle_btrace_conf_general_set.
7248 (handle_query): Report Qbtrace-conf:bts:size as supported.
7249
f4abbc16
MM
72502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7251
7252 * linux-low.c (linux_low_enable_btrace): Update parameters.
7253 (linux_low_btrace_conf): New.
7254 (linux_target_ops)<to_btrace_conf>: Initialize.
7255 * server.c (current_btrace_conf): New.
7256 (handle_btrace_enable): Rename to ...
7257 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7258 to target_enable_btrace. Update comment. Update users.
7259 (handle_qxfer_btrace_conf): New.
7260 (qxfer_packets): Add btrace-conf entry.
7261 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7262 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7263 (target_ops)<read_btrace_conf>: New.
7264 (target_enable_btrace): Update parameters.
7265 (target_read_btrace_conf): New.
7266
043c3577
MM
72672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7268
7269 * server.c (handle_btrace_general_set): Remove call to
7270 target_supports_btrace.
7271 (supported_btrace_packets): New.
7272 (handle_query): Call supported_btrace_packets.
7273 * target.h: include btrace-common.h.
7274 (btrace_target_info): Removed.
7275 (supports_btrace, target_supports_btrace): Update parameters.
7276
734b0e4b
MM
72772015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7278
7279 * Makefile.in (SFILES): Add common/btrace-common.c.
7280 (OBS): Add common/btrace-common.o.
7281 (btrace-common.o): Add build rules.
7282 * linux-low: Include btrace-common.h.
7283 (linux_low_read_btrace): Use struct btrace_data. Call
7284 btrace_data_init and btrace_data_fini.
7285
d6c146e9
PA
72862015-02-06 Pedro Alves <palves@redhat.com>
7287
7288 * thread-db.c (find_new_threads_callback): Add debug output.
7289
20ba1ce6
PA
72902015-02-04 Pedro Alves <palves@redhat.com>
7291
7292 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7293 (resume_stopped_resumed_lwps): New function.
7294 (linux_wait_for_event_filtered): Use it.
7295
8cc73a39
SDJ
72962015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7297
7298 * Makefile.in (SFILES): Add linux-personality.c.
7299 (linux-personality.o): New rule.
7300 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7301 list of objects to be built.
7302 * linux-low.c: Include nat/linux-personality.h.
7303 (linux_create_inferior): Remove code to disable address space
7304 randomization (moved to ../nat/linux-personality.c). Create
7305 cleanup to disable address space randomization.
7306
fb23d554
SDJ
73072015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7308
7309 * Makefile.in (posix-strerror.o): New rule.
7310 (mingw-strerror.o): Likewise.
7311 * configure: Regenerated.
7312 * configure.ac: Source file ../common/common.host. Initialize new
7313 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7314
cdf43629
YQ
73152015-01-14 Yao Qi <yao@codesourcery.com>
7316
7317 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7318 (ppc-linux.o): New rule.
7319 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7320 * configure.ac: AC_CHECK_FUNCS(getauxval).
7321 * config.in: Re-generated.
7322 * configure: Re-generated.
7323 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7324 ppc64_64bit_inferior_p
7325
514c5338
YQ
73262015-01-14 Yao Qi <yao@codesourcery.com>
7327
7328 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7329 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7330 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7331 (PT_ORIG_R3, PT_TRAP): Likewise.
7332 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7333 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7334 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7335
3368c1e5
JB
73362015-01-10 Joel Brobecker <brobecker@adacore.com>
7337
7338 * i387-fp.c (i387_cache_to_xsave): In look over
7339 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7340 zmmh_low_space field by use of zmmh_high_space.
7341
582511be
PA
73422015-01-09 Pedro Alves <palves@redhat.com>
7343
7344 * linux-low.c (step_over_bkpt): Move higher up in the file.
7345 (handle_extended_wait): Don't store the stop_pc here.
7346 (get_stop_pc): Adjust comments and rename to ...
7347 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7348 stopped for a software breakpoint or hardware breakpoint.
7349 (thread_still_has_status_pending_p): New function.
7350 (status_pending_p_callback): Use
7351 thread_still_has_status_pending_p. If the event is no longer
7352 interesting, resume the LWP.
7353 (handle_tracepoints): Add assert.
7354 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7355 (wstatus_maybe_breakpoint): New function.
7356 (cancel_breakpoint): Delete function.
7357 (check_stopped_by_watchpoint): New function, factored out from
7358 linux_low_filter_event.
7359 (lp_status_maybe_breakpoint): Delete function.
7360 (linux_low_filter_event): Remove filter_ptid argument.
7361 Leave thread group exits pending here. Store the LWP's stop PC.
7362 Always leave events pending.
7363 (linux_wait_for_event_filtered): Pull all events out of the
7364 kernel, and leave them all pending.
7365 (count_events_callback, select_event_lwp_callback): Consider all
7366 events.
7367 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7368 (select_event_lwp): Only give preference to the stepping LWP in
7369 all-stop mode. Adjust comments.
7370 (ignore_event): New function.
7371 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7372 references to cancel_breakpoints. Adjust to renames. Also give
7373 equal priority to all LWPs that have had events in non-stop mode.
7374 If reporting a software breakpoint event, unadjust the LWP's PC.
7375 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7376 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7377 Adjust.
7378 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7379 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7380 (linux_stopped_by_watchpoint): Adjust.
7381 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7382 * linux-low.h (enum lwp_stop_reason): New.
7383 (struct lwp_info) <stop_pc>: Adjust comment.
7384 <stopped_by_watchpoint>: Delete field.
7385 <stop_reason>: New field.
7386 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7387 * mem-break.c (software_breakpoint_inserted_here)
7388 (hardware_breakpoint_inserted_here): New function.
7389 * mem-break.h (software_breakpoint_inserted_here)
7390 (hardware_breakpoint_inserted_here): Declare.
7391 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7392 (cancel_breakpoints): Delete.
7393 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7394 (upload_fast_traceframes): Remove references to
7395 cancel_breakpoints.
7396
a33e3959
PA
73972015-01-09 Pedro Alves <palves@redhat.com>
7398
7399 * thread-db.c (find_new_threads_callback): Ignore thread if the
7400 kernel thread ID is -1.
7401
8784d563
PA
74022015-01-09 Pedro Alves <palves@redhat.com>
7403
7404 * linux-low.c (linux_attach_fail_reason_string): Move to
7405 nat/linux-ptrace.c, and rename.
7406 (linux_attach_lwp): Update comment.
7407 (attach_proc_task_lwp_callback): New function.
7408 (linux_attach): Adjust to rename and use
7409 linux_proc_attach_tgid_threads.
7410 (linux_attach_fail_reason_string): Delete declaration.
7411
76f2b779
JB
74122015-01-01 Joel Brobecker <brobecker@adacore.com>
7413
7414 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7415 * server.c (gdbserver_version): Likewise.
7416
fafcc06a
SDJ
74172014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7418
7419 * remote-utils.c: Include ctype.h.
7420 (input_interrupt): Explicitly handle the case when the char
7421 received is the NUL byte. Improve the printing of non-ASCII
7422 characters.
7423
beed38b8
JB
74242014-12-16 Joel Brobecker <brobecker@adacore.com>
7425
7426 * linux-low.c (linux_low_filter_event): Update call to
7427 linux_enable_event_reporting following the addition of
7428 a new parameter to that function.
7429
bf330350
CU
74302014-12-16 Catalin Udma <catalin.udma@freescale.com>
7431
7432 PR server/17457
7433 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7434 (AARCH64_FPCR_REGNO): Likewise.
7435 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7436 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7437 (aarch64_store_fpregset): Likewise.
7438
5227d625
JB
74392014-12-15 Joel Brobecker <brobecker@adacore.com>
7440
7441 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7442 Remove FIXME comment about assumption about N.
7443
f93b65a0
JB
74442014-12-13 Joel Brobecker <brobecker@adacore.com>
7445
7446 * configure.ac: If large-file support is disabled in GDBserver,
7447 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7448 * configure: Regenerate.
7449
e5a9158d
AA
74502014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7451
7452 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7453 warning upon ENODATA from ptrace.
7454 * linux-s390-low.c (s390_store_tdb): New.
7455 (s390_regsets): Add regset for NT_S390_TDB.
7456
feea5f36
AA
74572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7458
7459 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7460 without a fill_function.
7461 * linux-s390-low.c (s390_fill_last_break): Remove.
7462 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7463 (s390_arch_setup): Use regset's size instead of fill_function for
7464 loop end condition.
7465
098dbe61
AA
74662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7467
7468 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7469 the regset's store function when ptrace returned an error.
7470 * regcache.c (get_thread_regcache): Invalidate register cache
7471 before fetching inferior's registers.
7472
28eef672
AA
74732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7474
7475 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7476 while-loop as for-loop.
7477 (regsets_store_inferior_registers): Likewise.
7478
bdca27a2
YQ
74792014-11-28 Yao Qi <yao@codesourcery.com>
7480
7481 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7482 * config.in, configure: Re-generate.
7483 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7484 is defined.
7485
9c232dda
YQ
74862014-11-21 Yao Qi <yao@codesourcery.com>
7487
7488 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7489 (AC_CHECK_HEADERS): Remove malloc.h.
7490 * configure: Re-generated.
7491 * config.in: Re-generated.
7492 * server.h: Don't include alloca.h and malloc.h.
7493 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7494 Don't include malloc.h.
7495
43968415
JB
74962014-11-17 Joel Brobecker <brobecker@adacore.com>
7497
7498 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7499 corresponding ERRNO check in same block.
7500
40e91bc7
PA
75012014-11-12 Pedro Alves <palves@redhat.com>
7502
7503 * server.c (cont_thread): Update comment.
7504 (start_inferior, attach_inferior): No longer clear cont_thread.
7505 (handle_v_cont): No longer set cont_thread.
7506 (captured_main): Clear cont_thread each time a GDB connects.
7507
c2c118cf
PA
75082014-11-12 Pedro Alves <palves@redhat.com>
7509
7510 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7511 thread, and don't resume all threads if the Hc thread has exited.
7512
78708b7c
PA
75132014-11-12 Pedro Alves <palves@redhat.com>
7514
7515 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7516 the process group instead of to a specific LWP.
7517
a2abc7de
PA
75182014-10-15 Pedro Alves <palves@redhat.com>
7519
7520 PR server/17487
7521 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7522 parameter.
7523 (arm_set_thread_context): Delete.
7524 (the_low_target): Adjust.
7525 * win32-i386-low.c (debug_registers_changed)
7526 (debug_registers_used): Delete.
7527 (update_debug_registers_callback): New function.
7528 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7529 needing to update their debug registers.
7530 (win32_get_current_dr): New function.
7531 (x86_dr_low_get_addr, x86_dr_low_get_control)
7532 (x86_dr_low_get_status): Fetch the debug register from the thread
7533 record's context.
7534 (i386_initial_stuff): Adjust.
7535 (i386_get_thread_context): Remove current_event parameter. Don't
7536 clear debug_registers_changed nor copy DR values to
7537 debug_reg_state.
7538 (i386_set_thread_context): Delete.
7539 (i386_prepare_to_resume): New function.
7540 (i386_thread_added): Mark the thread as needing to update irs
7541 debug registers.
7542 (the_low_target): Remove i386_set_thread_context and install
7543 i386_prepare_to_resume.
7544 * win32-low.c (win32_get_thread_context): Adjust.
7545 (win32_set_thread_context): Use SetThreadContext
7546 directly.
7547 (win32_prepare_to_resume): New function.
7548 (win32_require_context): New function, factored out from ...
7549 (thread_rec): ... this.
7550 (continue_one_thread): Call win32_prepare_to_resume on each thread
7551 we're about to continue.
7552 (win32_resume): Call win32_prepare_to_resume on the event thread.
7553 * win32-low.h (struct win32_thread_info)
7554 <debug_registers_changed>: New field.
7555 (struct win32_target_ops): Change prototype of set_thread_context,
7556 delete set_thread_context and add prepare_to_resume.
7557 (win32_require_context): New declaration.
7558
a442d071
GB
75592014-10-08 Gary Benson <gbenson@redhat.com>
7560
7561 * server.h: Do not include common-exceptions.h.
7562
6f1947e8
GB
75632014-10-08 Gary Benson <gbenson@redhat.com>
7564
7565 * server.h: Do not include cleanups.h.
7566
63b434a4
JH
75672014-09-30 James Hogan <james.hogan@imgtec.com>
7568
7569 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7570 mips64-dsp-linux.c.
7571
c4d9ceb6
YQ
75722014-09-23 Yao Qi <yao@codesourcery.com>
7573
7574 * linux-low.c (lp_status_maybe_breakpoint): New function.
7575 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7576 (count_events_callback): Likewise.
7577 (select_event_lwp_callback): Likewise.
7578 (cancel_breakpoints_callback): Likewise.
7579
89a5711c
DB
75802014-09-19 Don Breazeal <donb@codesourcery.com>
7581
7582 * linux-low.c (handle_extended_wait): Call
7583 linux_ptrace_get_extended_event.
7584 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7585 linux_is_extended_waitstatus.
7586
bffc0964
JB
75872014-09-16 Joel Brobecker <brobecker@adacore.com>
7588
7589 * Makefile.in (CPPFLAGS): Define.
7590 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7591 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7592
0bfdf32f
GB
75932014-09-16 Gary Benson <gbenson@redhat.com>
7594
7595 * inferiors.h (current_inferior): Renamed as...
7596 (current_thread): New variable. All uses updated.
7597 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7598 (maybe_move_out_of_jump_pad): Likewise.
7599 (cancel_breakpoint): Likewise.
7600 (linux_low_filter_event): Likewise.
7601 (wait_for_sigstop): Likewise.
7602 (linux_resume_one_lwp): Likewise.
7603 (need_step_over_p): Likewise.
7604 (start_step_over): Likewise.
7605 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7606 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7607 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7608 and save_inferior as saved_thread.
7609 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7610 saved_thread.
7611 (regcache_invalidate_thread): Likewise.
7612 * remote-utils.c (prepare_resume_reply): Likewise.
7613 * thread-db.c (thread_db_get_tls_address): Likewise.
7614 (disable_thread_event_reporting): Likewise.
7615 (remove_thread_event_breakpoints): Likewise.
7616 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7617 as saved_thread.
7618 * target.h (set_desired_inferior): Renamed as...
7619 (set_desired_thread): New declaration. All uses updated.
7620 * server.c (myresume): Updated comment to reference thread instead
7621 of inferior.
7622 (handle_serial_event): Likewise.
7623 (handle_target_event): Likewise.
7624
361c8ade
GB
76252014-09-12 Tom Tromey <tromey@redhat.com>
7626 Gary Benson <gbenson@redhat.com>
7627
7628 * regcache.h: Include common-regcache.h.
7629 (regcache_read_pc): Don't declare.
7630 * regcache.c (get_thread_regcache_for_ptid): New function.
7631
bd9269f7
GB
76322014-09-11 Tom Tromey <tromey@redhat.com>
7633 Gary Benson <gbenson@redhat.com>
7634
7635 * symbol.c: New file.
7636 * Makefile.in (SFILES): Add symbol.c.
7637 (OBS): Add symbol.o.
7638
f8c1d06b
GB
76392014-09-11 Gary Benson <gbenson@redhat.com>
7640
7641 * target.c (target_stop_ptid, target_continue_ptid): New
7642 functions.
7643
721ec300
GB
76442014-09-11 Tom Tromey <tromey@redhat.com>
7645 Gary Benson <gbenson@redhat.com>
7646
7647 * target.h: Include target/target.h.
7648 * target.c (target_read_memory, target_read_uint32)
7649 (target_write_memory): New functions.
7650
c5e92cca
GB
76512014-09-11 Gary Benson <gbenson@redhat.com>
7652
7653 * server.h (debug_hw_points): Don't declare.
7654 * server.c (debug_hw_points): Don't define. Replace all uses
7655 with show_debug_regs.
7656 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7657 all uses with show_debug_regs.
7658
2e4bb98a
EBM
76592014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7660
7661 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7662 endianness into account.
7663 (ppc_supply_ptrace_register): Likewise.
7664
ac740bc7
JH
76652014-09-03 James Hogan <james.hogan@imgtec.com>
7666
7667 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7668 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7669
97ea6506
GB
76702014-09-03 Gary Benson <gbenson@redhat.com>
7671
7672 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7673 ALL_DEBUG_ADDRESS_REGISTERS.
7674
df7e5265
GB
76752014-09-02 Gary Benson <gbenson@redhat.com>
7676
7677 * i386-low.h: Renamed as...
7678 * x86-low.h: New file. All type, function and variable name
7679 prefixes changed from "i386_" to "x86_". All references updated.
7680 * i386-low.c: Renamed as...
7681 * x86-low.c: New file. All type, function and variable name
7682 prefixes changed from "i386_" to "x86_". All references updated.
7683
ed859da7
GB
76842014-09-02 Gary Benson <gbenson@redhat.com>
7685
7686 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7687 (x86_linux_new_thread): Likewise.
7688
860789c7
GB
76892014-08-29 Gary Benson <gbenson@redhat.com>
7690
7691 * server.h (setjmp.h): Do not include.
7692 (toplevel): Do not declare.
7693 (common-exceptions.h): Include.
7694 (cleanups.h): Likewise.
7695 * server.c (toplevel): Do not define.
7696 (exit_code): New static global.
7697 (detach_or_kill_for_exit_cleanup): New function.
7698 (main): New function. Original main renamed to...
7699 (captured_main): New function.
7700 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7701
ff55e1b5
GB
77022014-08-29 Gary Benson <gbenson@redhat.com>
7703
7704 * Makefile.in (SFILES): Add common/common-exceptions.c.
7705 (OBS): Add common-exceptions.o.
7706 (common-exceptions.o): New rule.
7707 * utils.c (prepare_to_throw_exception): New function.
7708
e9bcb658
GB
77092014-08-29 Gary Benson <gbenson@redhat.com>
7710
7711 * config.in: Regenerate.
7712 * configure: Likewise.
7713
e3180625
GB
77142014-08-29 Gary Benson <gbenson@redhat.com>
7715
7716 * Makefile.in (SFILES): Add common/cleanups.c.
7717 (OBS): cleanups.o.
7718 (cleanups.o): New rule.
7719
e3d6ba5d
GB
77202014-08-29 Gary Benson <gbenson@redhat.com>
7721
7722 * utils.c (internal_vwarning): New function.
7723
7096e886
GB
77242014-08-28 Gary Benson <gbenson@redhat.com>
7725
7726 * utils.h (fatal): Remove declaration.
7727 * utils.c (fatal): Remove function.
7728
14ce3192
GB
77292014-08-28 Gary Benson <gbenson@redhat.com>
7730
7731 * tracepoint.c (gdb_agent_init): Replace fatal with
7732 perror_with_name.
7733 (initialize_tracepoint): Likewise.
7734
50278d59
GB
77352014-08-28 Gary Benson <gbenson@redhat.com>
7736
7737 * remote-utils.c (remote_prepare): Replace fatal with error.
7738
aa96c426
GB
77392014-08-28 Gary Benson <gbenson@redhat.com>
7740
7741 * linux-low.c (linux_async): Replace fatal with warning.
7742 Tidy up and return.
7743 (linux_start_non_stop): Return -1 if linux_async failed.
7744
f7160e97
GB
77452014-08-28 Gary Benson <gbenson@redhat.com>
7746
7747 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7748 gdb_assert.
7749 (i386_dr_low_get_addr): Remove vague comment.
7750 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7751 gdb_assert.
7752
38e08fca
GB
77532014-08-28 Gary Benson <gbenson@redhat.com>
7754
7755 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7756 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7757 internal_error.
7758 (linux_resume_one_lwp): Likewise.
7759 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7760 gdb_assert.
7761 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7762 with internal_error.
7763 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7764 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7765 (find_register_by_name): Replace fatal with internal_error.
7766 (find_regno): Likewise.
7767 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7768 * thread-db.c (thread_db_create_event): Likewise.
7769 (thread_db_load_search): Likewise.
7770 (try_thread_db_load_1): Likewise.
7771 * tracepoint.c (get_jump_space_head): Replace fatal with
7772 internal_error.
7773 (claim_trampoline_space): Likewise.
7774 (have_fast_tracepoint_trampoline_buffer): Likewise.
7775 (cmd_qtstart): Likewise.
7776 (stop_tracing): Likewise.
7777 (fast_tracepoint_collecting): Likewise.
7778 (target_malloc): Likewise.
7779 (download_tracepoint): Likewise.
7780 (download_trace_state_variables): Replace check with gdb_assert.
7781 (upload_fast_traceframes): Replace fatal with internal_error.
7782
34abf635
GB
77832014-08-19 Tom Tromey <tromey@redhat.com>
7784 Gary Benson <gbenson@redhat.com>
7785
7786 * Makefile.in (SFILES): Add common/common-debug.c.
7787 (OBS): Add common-debug.o.
7788 (common-debug.o): New rule.
7789 * debug.h (debug_printf): Don't declare.
7790 * debug.c (debug_printf): Renamed and rewritten as...
7791 (debug_vprintf): New function.
7792
f6e94d78
GB
77932014-08-19 Gary Benson <gbenson@redhat.com>
7794
7795 * utils.h: Do not include print-utils.h.
7796
9239eeab
GB
77972014-08-19 Tom Tromey <tromey@redhat.com>
7798 Gary Benson <gbenson@redhat.com>
7799
7800 * server.h: Add static assertion.
7801 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7802
ef87c8bb
GB
78032014-08-19 Tom Tromey <tromey@redhat.com>
7804 Gary Benson <gbenson@redhat.com>
7805
7806 * Makefile.in (SFILES): Add common/errors.c.
7807 (OBS): Add errors.o.
7808 (IPA_OBS): Add errors-ipa.o.
7809 (errors.o): New rule.
7810 (errors-ipa.o): Likewise.
7811 * utils.h (perror_with_name, error, warning): Don't declare.
7812 * utils.c (warning): Renamed and rewritten as...
7813 (vwarning): New function.
7814 (error): Renamed and rewritten as...
7815 (verror): New function.
7816 (internal_error): Renamed and rewritten as...
7817 (internal_verror): New function.
7818
bb974a24
GB
78192014-08-07 Gary Benson <gbenson@redhat.com>
7820
7821 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7822 * configure: Regenerate.
7823 * config.in: Likewise.
7824 * server.h: Do not include errno.h.
7825 * event-loop.c: Likewise.
7826 * hostio-errno.c: Likewise.
7827 * linux-low.c: Likewise.
7828 * remote-utils.c: Likewise.
7829 * spu-low.c: Likewise.
7830 * utils.c: Likewise.
7831 * gdbreplay.c: Unconditionally include errno.h.
7832
6d3d12eb
GB
78332014-08-07 Gary Benson <gbenson@redhat.com>
7834
7835 * server.h: Do not include string.h.
7836 * event-loop.c: Likewise.
7837 * linux-low.c: Likewise.
7838 * regcache.c: Likewise.
7839 * remote-utils.c: Likewise.
7840 * spu-low.c: Likewise.
7841 * utils.c: Likewise.
7842
dccbb609
GB
78432014-08-07 Gary Benson <gbenson@redhat.com>
7844
7845 * server.h: Do not include gdb_assert.h.
7846
e76df0d0
GB
78472014-08-07 Gary Benson <gbenson@redhat.com>
7848
7849 * server.h: Do not include common-utils.h.
7850
4cb9c816
GB
78512014-08-07 Gary Benson <gbenson@redhat.com>
7852
7853 * server.h: Do not include ptid.h.
7854 * notif.h: Likewise.
7855
3995eeee
GB
78562014-08-07 Gary Benson <gbenson@redhat.com>
7857
7858 * server.h: Do not include gdb_locale.h.
7859
cb9f1a9b
GB
78602014-08-07 Gary Benson <gbenson@redhat.com>
7861
7862 * server.h: Do not include gdb/signals.h.
7863 * win32-low.c: Likewise.
7864
a5fceff8
GB
78652014-08-07 Gary Benson <gbenson@redhat.com>
7866
7867 * server.h: Do not include pathmax.h.
7868
b9391142
GB
78692014-08-07 Gary Benson <gbenson@redhat.com>
7870
7871 * server.h: Do not include libiberty.h.
7872 * linux-bfin-low.c: Likewise.
7873
0e443c87
GB
78742014-08-07 Gary Benson <gbenson@redhat.com>
7875
7876 * server.h: Do not include ansidecl.h.
7877
8ebb3f56
GB
78782014-08-07 Gary Benson <gbenson@redhat.com>
7879
7880 * linux-x86-low.c: Do not include stddef.h.
7881 * lynx-ppc-low.c: Likewise.
7882 * tracepoint.c: Likewise.
7883
8980bdf6
GB
78842014-08-07 Gary Benson <gbenson@redhat.com>
7885
7886 * server.h: Do not include stdarg.h.
7887 * nto-low.c: Likewise.
7888
d7096f71
GB
78892014-08-07 Gary Benson <gbenson@redhat.com>
7890
7891 * server.h: Do not include stdlib.h.
7892 * inferiors.c: Likewise.
7893 * linux-low.c: Likewise.
7894 * regcache.c: Likewise.
7895 * spu-low.c: Likewise.
7896 * tracepoint.c: Likewise.
7897 * utils.c: Likewise.
7898
d02f550d
GB
78992014-08-07 Gary Benson <gbenson@redhat.com>
7900
7901 * server.h: Do not include stdio.h.
7902 * linux-low.c: Likewise.
7903 * remote-utils.c: Likewise.
7904 * spu-low.c: Likewise.
7905 * utils.c: Likewise.
7906 * wincecompat.c: Likewise.
7907
87f6c4e3
GB
79082014-08-06 Gary Benson <gbenson@redhat.com>
7909
7910 * regcache.c (init_register_cache): Move conditionals inside if.
7911
7089dca4
GB
79122014-08-06 Gary Benson <gbenson@redhat.com>
7913
7914 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7915
462f517e
GB
79162014-07-31 Gary Benson <gbenson@redhat.com>
7917
7918 * ax.h: Do not include server.h.
7919 * gdbthread.h: Likewise.
7920 * lynx-low.h: Likewise.
7921 * notif.h: Likewise.
7922
976411d6
GB
79232014-07-30 Gary Benson <gbenson@redhat.com>
7924
7925 * server.h: Include common-defs.h.
7926 Do not include config.h or build-gnulib-gdbserver/config.h.
7927
d41f6d8e
GB
79282014-07-30 Gary Benson <gbenson@redhat.com>
7929
7930 * hostio-errno.c: Move server.h to top of includes list.
7931 * inferiors.c: Likewise.
7932 * linux-x86-low.c: Likewise.
7933 * notif.c: Include server.h.
7934
314c6a35
TT
79352014-07-24 Tom Tromey <tromey@redhat.com>
7936 Gary Benson <gbenson@redhat.com>
7937
7938 * server.h (CORE_ADDR): Now unsigned.
7939
69ff6be5
PA
79402014-07-16 Pedro Alves <palves@redhat.com>
7941
7942 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7943
ce9e3fe7
PA
79442014-07-15 Pedro Alves <palves@redhat.com>
7945
7946 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7947 copy.
7948
e76126e8
PA
79492014-07-11 Pedro Alves <palves@redhat.com>
7950
7951 * linux-low.c (kill_wait_lwp): New function, based on
7952 kill_one_lwp_callback, but use my_waitpid directly.
7953 (kill_one_lwp_callback, linux_kill): Use it.
7954
8e9db26e
PA
79552014-06-23 Pedro Alves <palves@redhat.com>
7956
7957 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7958 before setting DR0..DR3.
7959
698b3e08
GB
79602014-06-20 Gary Benson <gbenson@redhat.com>
7961
7962 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7963 * configure: Regenerated.
7964 * config.in: Likewise.
7965
125f8a3d
GB
79662014-06-20 Gary Benson <gbenson@redhat.com>
7967
7968 * Makefile.in (SFILES): Update locations for files moved
7969 from common to nat.
7970 (object file files): Reordered.
7971
42995dbd
GB
79722014-06-20 Gary Benson <gbenson@redhat.com>
7973
7974 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7975 (i386_dr_low_set_addr): Likewise.
7976 (i386_dr_low_get_addr): Likewise.
7977 (i386_dr_low_can_set_control): Likewise.
7978 (i386_dr_low_set_control): Likewise.
7979 (i386_dr_low_get_control): Likewise.
7980 (i386_dr_low_get_status): Likewise.
7981 (i386_get_debug_register_length): Likewise.
7982 * linux-x86-low.c (i386_dr_low_set_addr):
7983 Changed signature. Made static.
7984 (i386_dr_low_get_addr): Likewise.
7985 (i386_dr_low_set_control): Likewise.
7986 (i386_dr_low_get_control): Likewise.
7987 (i386_dr_low_get_status): Likewise.
7988 (i386_dr_low): New global variable.
7989 * win32-i386-low.c (i386_dr_low_set_addr):
7990 Changed signature. Made static.
7991 (i386_dr_low_get_addr): Likewise.
7992 (i386_dr_low_set_control): Likewise.
7993 (i386_dr_low_get_control): Likewise.
7994 (i386_dr_low_get_status): Likewise.
7995 (i386_dr_low): New global variable.
7996
e1d2394b
MS
79972014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7998
7999 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8000 * Makefile.in (AR, AR_FLAGS): Define.
8001 * configure: Regenerate.
8002
3a8ee006
GB
80032014-06-19 Gary Benson <gbenson@redhat.com>
8004
8005 * Makefile.in (i386-dregs.o): New rule.
8006 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8007 * i386-low.c (target.h): Remove include.
8008 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8009 (DR_CONTROL_SHIFT): Likewise.
8010 (DR_CONTROL_SIZE): Likewise.
8011 (DR_RW_EXECUTE): Likewise.
8012 (DR_RW_WRITE): Likewise.
8013 (DR_RW_READ): Likewise.
8014 (DR_RW_IORW): Likewise.
8015 (DR_LEN_1): Likewise.
8016 (DR_LEN_2): Likewise.
8017 (DR_LEN_4): Likewise.
8018 (DR_LEN_8): Likewise.
8019 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8020 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8021 (DR_ENABLE_SIZE): Likewise.
8022 (DR_LOCAL_SLOWDOWN): Likewise.
8023 (DR_GLOBAL_SLOWDOWN): Likewise.
8024 (DR_CONTROL_RESERVED): Likewise.
8025 (I386_DR_CONTROL_MASK): Likewise.
8026 (I386_DR_VACANT): Likewise.
8027 (I386_DR_LOCAL_ENABLE): Likewise.
8028 (I386_DR_GLOBAL_ENABLE): Likewise.
8029 (I386_DR_DISABLE): Likewise.
8030 (I386_DR_SET_RW_LEN): Likewise.
8031 (I386_DR_GET_RW_LEN): Likewise.
8032 (I386_DR_WATCH_HIT): Likewise.
8033 (i386_wp_op_t): Likewise.
8034 (i386_show_dr): Likewise.
8035 (i386_length_and_rw_bits): Likewise.
8036 (i386_insert_aligned_watchpoint): Likewise.
8037 (i386_remove_aligned_watchpoint): Likewise.
8038 (i386_handle_nonaligned_watchpoint): Likewise.
8039 i386_update_inferior_debug_regs(): Likewise.
8040 (i386_dr_insert_watchpoint): Likewise.
8041 (i386_dr_remove_watchpoint): Likewise.
8042 (i386_dr_region_ok_for_watchpoint): Likewise.
8043 (i386_dr_stopped_data_address): Likewise.
8044 (i386_dr_stopped_by_watchpoint): Likewise.
8045
8f26655c
GB
80462014-06-19 Gary Benson <gbenson@redhat.com>
8047
8048 * i386-low.c (i386_dr_show): Renamed to
8049 i386_show_dr and made static. All uses updated.
8050 (i386_dr_length_and_rw_bits): Renamed to
8051 i386_length_and_rw_bits and made static.
8052 All uses updated.
8053 (i386_dr_insert_aligned_watchpoint): Renamed to
8054 i386_insert_aligned_watchpoint and made static.
8055 All uses updated.
8056 (i386_dr_remove_aligned_watchpoint): Renamed to
8057 i386_remove_aligned_watchpoint and made static.
8058 All uses updated.
8059 (i386_dr_update_inferior_debug_regs): Renamed to
8060 i386_update_inferior_debug_regs and made static.
8061 All uses updated.
8062
b9228891
GB
80632014-06-18 Gary Benson <gbenson@redhat.com>
8064
5171def3
GB
8065 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8066 (i386_dr_low_can_set_control): Likewise.
8067 (i386_get_debug_register_length): Likewise.
8068 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8069 (i386_dr_low_can_set_control): Likewise.
8070 (i386_get_debug_register_length): Likewise.
8071
80722014-06-17 Gary Benson <gbenson@redhat.com>
8073
b9228891
GB
8074 * i386-low.h (i386-dregs.h): New include.
8075 (DR_FIRSTADDR): Now in i386-dregs.h.
8076 (DR_LASTADDR): Likewise.
8077 (DR_NADDR): Likewise.
8078 (DR_STATUS): Likewise.
8079 (DR_CONTROL): Likewise.
8080 (i386_debug_reg_state): Likewise.
8081 (i386_dr_insert_watchpoint): Likewise.
8082 (i386_dr_remove_watchpoint): Likewise.
8083 (i386_dr_region_ok_for_watchpoint): Likewise.
8084 (i386_dr_stopped_data_address): Likewise.
8085 (i386_dr_stopped_by_watchpoint): Likewise.
8086 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8087
4be83cc2
GB
80882014-06-18 Gary Benson <gbenson@redhat.com>
8089
8090 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8091 i386_dr_insert_watchpoint.
8092 (i386_low_remove_watchpoint): Renamed to
8093 i386_dr_remove_watchpoint.
8094 (i386_low_region_ok_for_watchpoint): Renamed to
8095 i386_dr_region_ok_for_watchpoint.
8096 (i386_low_stopped_data_address): Renamed to
8097 i386_dr_stopped_data_address.
8098 (i386_low_stopped_by_watchpoint): Renamed to
8099 i386_dr_stopped_by_watchpoint.
8100 * i386-low.c (i386_show_dr): Renamed to
8101 i386_dr_show and made nonstatic. All uses updated.
8102 (i386_length_and_rw_bits): Renamed to
8103 i386_dr_length_and_rw_bits and made nonstatic.
8104 All uses updated.
8105 (i386_insert_aligned_watchpoint): Renamed to
8106 i386_dr_insert_aligned_watchpoint and made nonstatic.
8107 All uses updated.
8108 (i386_remove_aligned_watchpoint): Renamed to
8109 i386_dr_remove_aligned_watchpoint and made nonstatic.
8110 All uses updated.
8111 (i386_update_inferior_debug_regs): Renamed to
8112 i386_dr_update_inferior_debug_regs and made nonstatic.
8113 All uses updated.
8114 (i386_low_insert_watchpoint): Renamed to
8115 i386_dr_insert_watchpoint. All uses updated.
8116 (i386_low_remove_watchpoint): Renamed to
8117 i386_dr_remove_watchpoint. All uses updated.
8118 (i386_low_region_ok_for_watchpoint): Renamed to
8119 i386_dr_region_ok_for_watchpoint. All uses updated.
8120 (i386_low_stopped_data_address): Renamed to
8121 i386_dr_stopped_data_address. All uses updated.
8122 (i386_low_stopped_by_watchpoint): Renamed to
8123 i386_dr_stopped_by_watchpoint. All uses updated.
8124
131aa0d4
GB
81252014-06-18 Gary Benson <gbenson@redhat.com>
8126
8127 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8128 (i386_dr_low_can_set_control): Likewise.
8129 (i386_insert_aligned_watchpoint): New check.
8130
d9305f7f
GB
81312014-06-18 Gary Benson <gbenson@redhat.com>
8132
8133 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8134 Renamed to state.
8135
e927c9fc
GB
81362014-06-18 Gary Benson <gbenson@redhat.com>
8137
8138 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8139 instead of fatal and error.
8140 (i386_handle_nonaligned_watchpoint): Likewise.
8141
1b6d4134
GB
81422014-06-18 Gary Benson <gbenson@redhat.com>
8143
8144 * i386-low.c (i386_get_debug_register_length): New macro.
8145 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8146 (i386_show_dr): Use debug_printf instead of fprintf. Use
8147 phex to format values.
8148
6e62758f
GB
81492014-06-18 Gary Benson <gbenson@redhat.com>
8150
8151 * i386-low.h: Comment changes.
8152 * i386-low.c: Likewise.
8153
fc6e2f03
GB
81542014-06-18 Gary Benson <gbenson@redhat.com>
8155
8156 * i386-low.c: Whitespace changes.
8157
f9d1eeed
TT
81582014-06-12 Tom Tromey <tromey@redhat.com>
8159
8160 * utils.c (freeargv): Remove.
8161
0b04e523
TT
81622014-06-12 Tom Tromey <tromey@redhat.com>
8163
8164 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8165 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8166 (parse_debug_format_options): Likewise.
8167 (gdbserver_usage): Likewise.
8168 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8169 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8170 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8171 against libiberty.
8172 ($(LIBGNU)): Depend on libiberty.
8173 (all-lib): Recurse into all subdirs.
8174 (install-only): Invoke "install" target in subdirs.
8175 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8176 targets.
8177 * configure: Rebuild.
8178 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8179 for vasprintf, vsnprintf, or gettimeofday.
8180 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8181 srv_tgtobj.
8182
270c9937
JB
81832014-06-05 Joel Brobecker <brobecker@adacore.com>
8184
8185 * development.sh: Delete.
8186 * Makefile.in (config.status): Adjust dependency on development.sh.
8187 * configure.ac: Adjust development.sh source call.
8188 * configure: Regenerate.
8189
0a261ed8
PA
81902014-06-02 Pedro Alves <palves@redhat.com>
8191
8192 * ax.c (gdb_free_agent_expr): New function.
8193 * ax.h (gdb_free_agent_expr): New declaration.
8194 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8195 list.
8196 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8197 static.
8198 (clear_breakpoint_conditions_and_commands): New function.
8199 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8200 (clear_breakpoint_conditions_and_commands): New declaration.
8201
e9dae05e
RR
82022014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8203
8204 * linux-aarch64-low.c (asm/ptrace.h): Include.
8205
5876f503
JK
82062014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8207
8208 Fix TLS access for -static -pthread.
8209 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8210 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8211 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8212
802e8e6d
PA
82132014-05-20 Pedro Alves <palves@redhat.com>
8214
8215 * linux-aarch64-low.c (aarch64_insert_point)
8216 (aarch64_remove_point): No longer check whether the type is
8217 supported here. Adjust to new interface.
8218 (the_low_target): Install aarch64_supports_z_point_type as
8219 supports_z_point_type method.
8220 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8221 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8222 instead of a Z packet char. Adjust.
8223 (arm_supports_z_point_type): New function.
8224 (arm_insert_point, arm_remove_point): Adjust to new interface.
8225 (the_low_target): Install arm_supports_z_point_type.
8226 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8227 (cris_insert_point, cris_remove_point): Adjust to new interface.
8228 Don't check whether the type is supported here.
8229 (the_low_target): Install cris_supports_z_point_type.
8230 * linux-low.c (linux_supports_z_point_type): New function.
8231 (linux_insert_point, linux_remove_point): Adjust to new interface.
8232 * linux-low.h (struct linux_target_ops) <insert_point,
8233 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8234 raw_breakpoint pointer parameter.
8235 <supports_z_point_type>: New method.
8236 * linux-mips-low.c (mips_supports_z_point_type): New function.
8237 (mips_insert_point, mips_remove_point): Adjust to new interface.
8238 Use mips_supports_z_point_type.
8239 (the_low_target): Install mips_supports_z_point_type.
8240 * linux-ppc-low.c (the_low_target): Install NULL as
8241 supports_z_point_type method.
8242 * linux-s390-low.c (the_low_target): Install NULL as
8243 supports_z_point_type method.
8244 * linux-sparc-low.c (the_low_target): Install NULL as
8245 supports_z_point_type method.
8246 * linux-x86-low.c (x86_supports_z_point_type): New function.
8247 (x86_insert_point): Adjust to new insert_point interface. Use
8248 insert_memory_breakpoint. Adjust to new
8249 i386_low_insert_watchpoint interface.
8250 (x86_remove_point): Adjust to remove_point interface. Use
8251 remove_memory_breakpoint. Adjust to new
8252 i386_low_remove_watchpoint interface.
8253 (the_low_target): Install x86_supports_z_point_type.
8254 * lynx-low.c (lynx_target_ops): Install NULL as
8255 supports_z_point_type callback.
8256 * nto-low.c (nto_supports_z_point_type): New.
8257 (nto_insert_point, nto_remove_point): Adjust to new interface.
8258 (nto_target_ops): Install nto_supports_z_point_type.
8259 * mem-break.c: Adjust intro comment.
8260 (struct raw_breakpoint) <raw_type, size>: New fields.
8261 <inserted>: Update comment.
8262 <shlib_disabled>: Delete field.
8263 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8264 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8265 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8266 (raw_bkpt_type_to_target_hw_bp_type): New function.
8267 (find_enabled_raw_code_breakpoint_at): New function.
8268 (find_raw_breakpoint_at): New type and size parameters. Use them.
8269 (insert_memory_breakpoint): New function, based off
8270 set_raw_breakpoint_at.
8271 (remove_memory_breakpoint): New function.
8272 (set_raw_breakpoint_at): Reimplement.
8273 (set_breakpoint): New, based on set_breakpoint_at.
8274 (set_breakpoint_at): Reimplement.
8275 (delete_raw_breakpoint): Go through the_target->remove_point
8276 instead of assuming memory breakpoints.
8277 (find_gdb_breakpoint_at): Delete.
8278 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8279 (find_gdb_breakpoint): New function.
8280 (set_gdb_breakpoint_at): Delete.
8281 (z_type_supported): New function.
8282 (set_gdb_breakpoint_1): New function, loosely based off
8283 set_gdb_breakpoint_at.
8284 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8285 (delete_gdb_breakpoint_at): Delete.
8286 (delete_gdb_breakpoint_1): New function, loosely based off
8287 delete_gdb_breakpoint_at.
8288 (delete_gdb_breakpoint): New function.
8289 (clear_gdb_breakpoint_conditions): Rename to ...
8290 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8291 breakpoint.
8292 (add_condition_to_breakpoint): Make static.
8293 (add_breakpoint_condition): Take a struct breakpoint pointer
8294 instead of an address. Adjust.
8295 (gdb_condition_true_at_breakpoint): Rename to ...
8296 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8297 z_type parameter.
8298 (gdb_condition_true_at_breakpoint): Reimplement.
8299 (add_breakpoint_commands): Take a struct breakpoint pointer
8300 instead of an address. Adjust.
8301 (gdb_no_commands_at_breakpoint): Rename to ...
8302 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8303 parameter. Return true if no breakpoint was found. Change debug
8304 output.
8305 (gdb_no_commands_at_breakpoint): Reimplement.
8306 (run_breakpoint_commands): Rename to ...
8307 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8308 and change return type to boolean.
8309 (run_breakpoint_commands): New function.
8310 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8311 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8312 breakpoint. Go through the_target->remove_point instead of
8313 assuming memory breakpoint.
8314 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8315 software and hardware breakpoints.
8316 (reinsert_raw_breakpoint): Go through the_target->insert_point
8317 instead of assuming memory breakpoint.
8318 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8319 software and hardware breakpoints.
8320 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8321 Check both software and hardware breakpoints.
8322 (validate_inserted_breakpoint): Assert the breakpoint is a
8323 software breakpoint. Set the inserted flag to -1 instead of
8324 setting shlib_disabled.
8325 (delete_disabled_breakpoints): Adjust.
8326 (validate_breakpoints): Only validate software breakpoints.
8327 Adjust to inserted flag change.
8328 (check_mem_read, check_mem_write): Skip breakpoint types other
8329 than software breakpoints. Adjust to inserted flag change.
8330 * mem-break.h (enum raw_bkpt_type): New enum.
8331 (raw_breakpoint, struct process_info): Forward declare.
8332 (Z_packet_to_target_hw_bp_type): Delete declaration.
8333 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8334 (set_gdb_breakpoint, delete_gdb_breakpoint)
8335 (clear_breakpoint_conditions): New declarations.
8336 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8337 (breakpoint_inserted_here): Update comment.
8338 (add_breakpoint_condition, add_breakpoint_commands): Replace
8339 address parameter with a breakpoint pointer parameter.
8340 (gdb_breakpoint_here): Update comment.
8341 (delete_gdb_breakpoint_at): Delete.
8342 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8343 * server.c (process_point_options): Take a struct breakpoint
8344 pointer instead of an address. Adjust.
8345 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8346 delete_gdb_breakpoint.
8347 * spu-low.c (spu_target_ops): Install NULL as
8348 supports_z_point_type method.
8349 * target.h: Include mem-break.h.
8350 (struct target_ops) <prepare_to_access_memory>: Update comment.
8351 <supports_z_point_type>: New field.
8352 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8353 instead of a char. Also take a raw breakpoint pointer.
8354 * win32-arm-low.c (the_low_target): Install NULL as
8355 supports_z_point_type.
8356 * win32-i386-low.c (i386_supports_z_point_type): New function.
8357 (i386_insert_point, i386_remove_point): Adjust to new interface.
8358 (the_low_target): Install i386_supports_z_point_type.
8359 * win32-low.c (win32_supports_z_point_type): New function.
8360 (win32_insert_point, win32_remove_point): Adjust to new interface.
8361 (win32_target_ops): Install win32_supports_z_point_type.
8362 * win32-low.h (struct win32_target_ops):
8363 <supports_z_point_type>: New method.
8364 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8365 instead of a char. Also take a raw breakpoint pointer.
8366
932539e3
PA
83672014-05-20 Pedro Alves <palves@redhat.com>
8368
8369 * mem-break.h: Include break-common.h.
8370 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8371 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8372 (Z_packet_to_target_hw_bp_type): New declaration.
8373 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8374 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8375 (Z_PACKET_ACCESS_WP): Delete macros.
8376 (Z_packet_to_hw_type): Delete function.
8377 * i386-low.h: Don't include break-common.h here.
8378 (Z_packet_to_hw_type): Delete declaration.
8379 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8380 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8381 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8382 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8383 * linux-aarch64-low.c: Don't include break-common.h here.
8384 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8385 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8386 (Z_packet_to_target_hw_bp_type): Delete function.
8387 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8388 function.
8389 (mips_insert_point, mips_remove_point): Use
8390 Z_packet_to_target_hw_bp_type.
8391
4ff0d3d8
PA
83922014-05-20 Pedro Alves <palves@redhat.com>
8393
8394 * linux-aarch64-low.c: Include break-common.h.
8395 (enum target_point_type): Delete.
8396 (Z_packet_to_point_type): Rename to ...
8397 (Z_packet_to_target_hw_bp_type): ... this, and return a
8398 target_hw_bp_type instead.
8399 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8400 instead of an enum target_point_type.
8401 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8402 breakpoint type.
8403 (aarch64_dr_state_insert_one_point)
8404 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8405 (aarch64_handle_aligned_watchpoint)
8406 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8407 Take an enum target_hw_bp_type instead of an enum
8408 target_point_type.
8409 (aarch64_supports_z_point_type): New function.
8410 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8411 use Z_packet_to_target_hw_bp_type.
8412
786dc519
JB
84132014-05-20 Joel Brobecker <brobecker@adacore.com>
8414
8415 * configure.ac: Only use -Werror by default when DEVELOPMENT
8416 is true.
8417 * configure: Regenerate.
8418
9e0aa64f
JK
84192014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8420
8421 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8422 * linux-x86-low.c (X86_64_USER_REGS): New.
8423 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8424
2b577b92
YQ
84252014-04-28 Yao Qi <yao@codesourcery.com>
8426
8427 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8428 name.
8429
94611da2
PA
84302014-04-25 Pedro Alves <palves@redhat.com>
8431
8432 PR server/16255
8433 * linux-low.c (linux_attach_fail_reason_string): New function.
8434 (linux_attach_lwp): Delete.
8435 (linux_attach_lwp_1): Rename to ...
8436 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8437 argument. Remove "initial" parameter. Return int instead of
8438 void. Don't error or warn here.
8439 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8440 failure to attach to the tgid. Call warning when failing to
8441 attach to an lwp.
8442 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8443 argument. Remove "initial" parameter. Return int instead of
8444 void. Don't error or warn here.
8445 (linux_attach_fail_reason_string): New declaration.
8446 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8447 interface change. Use linux_attach_fail_reason_string.
8448
01f9f808
MS
84492014-04-24 Michael Sturm <michael.sturm@mintel.com>
8450 Walfred Tedeschi <walfred.tedeschi@intel.com>
8451
8452 * Makefile.in: Added rules to handle new files
8453 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8454 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8455 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8456 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8457 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8458 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8459 x32-avx512-linux.o.
8460 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8461 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8462 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8463 i386/x32-avx512.xml.
8464 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8465 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8466 i386/x32-avx512-linux.xml.
8467 * i387-fp.c (num_avx512_k_registers): New constant for number
8468 of K registers.
8469 (num_avx512_zmmh_low_registers): New constant for number of
8470 lower ZMM registers (0-15).
8471 (num_avx512_zmmh_high_registers): New constant for number of
8472 higher ZMM registers (16-31).
8473 (num_avx512_ymmh_registers): New contant for number of higher
8474 YMM registers (ymm16-31 added by avx521 on x86_64).
8475 (num_avx512_xmm_registers): New constant for number of higher
8476 XMM registers (xmm16-31 added by AVX512 on x86_64).
8477 (struct i387_xsave): Add space for AVX512 registers.
8478 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8479 Add code to handle AVX512 registers.
8480 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8481 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8482 prototypei from generated file.
8483 (tdesc_amd64_avx512_linux): Likewise.
8484 (init_registers_x32_avx512_linux): Likewise.
8485 (tdesc_x32_avx512_linux): Likewise.
8486 (init_registers_i386_avx512_linux): Likewise.
8487 (tdesc_i386_avx512_linux): Likewise.
8488 (x86_64_regmap): Add AVX512 registers.
8489 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8490 mask.
8491 (initialize_low_arch): Add code to initialize AVX512 registers.
8492
51aa91f9
PA
84932014-04-23 Pedro Alves <palves@redhat.com>
8494
8495 * mem-break.c (find_gdb_breakpoint_at): Make static.
8496 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8497
a4165e94
PA
84982014-04-23 Pedro Alves <palves@redhat.com>
8499
8500 * i386-low.c: Don't include break-common.h here.
8501 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8502 prototype to take target_hw_bp_type as argument instead of a Z
8503 packet char.
8504 * i386-low.h: Include break-common.h here.
8505 (Z_packet_to_hw_type): Declare.
8506 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8507 prototypes.
8508 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8509 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8510 (x86_remove_point): Convert the packet number to a
8511 target_hw_bp_type before calling i386_low_remove_watchpoint.
8512 * win32-i386-low.c (i386_insert_point): Convert the packet number
8513 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8514 (i386_remove_point): Convert the packet number to a
8515 target_hw_bp_type before calling i386_low_remove_watchpoint.
8516
b8acf843
PA
85172014-04-23 Pedro Alves <palves@redhat.com>
8518
8519 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8520
d708bcd1
PA
85212014-04-10 Pedro Alves <palves@redhat.com>
8522
8523 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8524 Check if the condition or command is NULL before checking if the
8525 breakpoint is known. On success, return true.
8526 * mem-break.h (add_breakpoint_condition): Document return.
8527 (add_breakpoint_commands): Add describing comment.
8528 * server.c (skip_to_semicolon): New function.
8529 (process_point_options): Use it.
8530
2eec7d5b
PA
85312014-04-09 Pedro Alves <palves@redhat.com>
8532
8533 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8534 to lwpid_of.
8535
fa96cb38
PA
85362014-02-27 Pedro Alves <palves@redhat.com>
8537
8538 PR 12702
8539 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8540 macros.
8541 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8542 output.
8543 (last_thread_of_process_p): Take a PID argument instead of a
8544 thread pointer.
8545 (linux_wait_for_lwp): Delete.
8546 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8547 functions.
8548 (linux_low_filter_event): New function, party factored out from
8549 linux_wait_for_event.
8550 (linux_wait_for_event): Rename to ...
8551 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8552 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8553 sigsuspend. Check for zombie leaders.
8554 (linux_wait_for_event): Reimplement as wrapper around
8555 linux_wait_for_event_filtered.
8556 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8557 a normal or signal exit is seen, it's the whole process exiting.
8558 (wait_for_sigstop): No longer a for_each_inferior callback.
8559 Rewrite on top of linux_wait_for_event_filtered.
8560 (stop_all_lwps): Call wait_for_sigstop directly.
8561 * server.c (resume, handle_target_event): Handle
8562 TARGET_WAITKIND_NO_RESUMED.
8563
d763de10
JB
85642014-02-26 Joel Brobecker <brobecker@adacore.com>
8565
8566 * win32-low.c (psapi_get_dll_name,
8567 * win32_CreateToolhelp32Snapshot): Delete.
8568 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8569 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8570 Delete.
8571 (handle_load_dll): Add function description.
8572 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8573
850a0f76
JB
85742014-02-26 Joel Brobecker <brobecker@adacore.com>
8575
8576 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8577 Add comment.
8578 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8579 base address when calling win32_add_one_solib.
8580 (handle_load_dll): Delete local variable load_addr.
8581 Remove 0x1000 offset applied to DLL base address when calling
8582 win32_add_one_solib.
8583 (handle_unload_dll): Add comment.
8584
f25b3fc3
JB
85852014-02-26 Joel Brobecker <brobecker@adacore.com>
8586
8587 * win32-low.c (win32_add_all_dlls): Renames
8588 win32_ensure_ntdll_loaded. Rewrite function documentation.
8589 Adjust implementation to always load all DLLs.
8590 Add 0x1000 offset to DLL base address when calling
8591 win32_add_one_solib.
8592 (child_initialization_done): New static global.
8593 (do_initial_child_stuff): Set child_initialization_done to
8594 zero during child initialization, and 1 after. Replace call
8595 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8596 Add comment.
8597 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8598 (handle_unload_dll): Add function documentation.
8599 (get_child_debug_event): Ignore load and unload DLL events
8600 during child initialization.
8601
d86d4aaf
DE
86022014-02-20 Doug Evans <dje@google.com>
8603
3bc32da3 8604 Remove global all_lwps.
d86d4aaf
DE
8605 * inferiors.h (ptid_of): Move here from linux-low.h.
8606 (pid_of, lwpid_of): Ditto.
8607 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8608 parameter is a struct thread_info * now.
8609 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8610 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8611 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8612 directly.
8613 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8614 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8615 * linux-arm-low.c (update_registers_callback): Update, "entry"
8616 parameter is a struct thread_info * now.
8617 Fetch lwpid from current_inferior directly.
8618 (arm_insert_point): Pass &all_threads to find_inferior instead of
8619 &all_lwps.
8620 (arm_remove_point): Ditto.
8621 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8622 (arm_prepare_to_resume): Fetch pid from thread.
8623 (arm_read_description): Fetch lwpid from current_inferior directly.
8624 * linux-low.c (all_lwps): Delete.
8625 (delete_lwp): Delete call to remove_inferior.
8626 (handle_extended_wait): Fetch lwpid from thread.
8627 (add_lwp): Don't set lwp->entry.id. Remove call to
8628 add_inferior_to_list.
8629 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8630 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8631 (kill_one_lwp_callback): Ditto.
8632 (linux_kill): Don't dereference NULL pointer.
8633 Fetch ptid,lwpid from thread.
8634 (get_detach_signal): Fetch ptid from thread.
8635 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8636 Simplify call to regcache_invalidate_thread.
8637 (delete_lwp_callback): Update, "entry" parameter is a
8638 struct thread_info * now. Fetch pid from thread.
8639 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8640 (status_pending_p_callback): Update, "entry" parameter is a
8641 struct thread_info * now. Fetch ptid from thread.
8642 (find_lwp_pid): Update, "entry" parameter is a
8643 struct thread_info * now.
8644 (linux_wait_for_lwp): Fetch pid from thread.
8645 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8646 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8647 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8648 (dequeue_one_deferred_signal): Ditto.
8649 (cancel_breakpoint): Fetch ptid from current_inferior.
8650 (linux_wait_for_event): Pass &all_threads to find_inferior,
8651 not &all_lwps. Fetch ptid, lwpid from thread.
8652 (count_events_callback): Update, "entry" parameter is a
8653 struct thread_info * now.
8654 (select_singlestep_lwp_callback): Ditto.
8655 (select_event_lwp_callback): Ditto.
8656 (cancel_breakpoints_callback): Ditto.
8657 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8658 not &all_lwps.
8659 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8660 (unsuspend_one_lwp): Update, "entry" parameter is a
8661 struct thread_info * now.
8662 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8663 not &all_lwps.
8664 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8665 Fetch lwpid from thread, not lwp.
8666 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8667 Pass &all_threads to find_inferior, not &all_lwps.
8668 (send_sigstop): Fetch lwpid from thread, not lwp.
8669 (send_sigstop_callback): Update, "entry" parameter is a
8670 struct thread_info * now.
8671 (suspend_and_send_sigstop_callback): Ditto.
8672 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8673 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8674 struct thread_info * now.
8675 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8676 from thread, lwp.
8677 (lwp_running): Update, "entry" parameter is a
8678 struct thread_info * now.
8679 (stop_all_lwps): Fetch ptid from thread.
8680 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8681 (linux_resume_one_lwp): Fetch lwpid from thread.
8682 (linux_set_resume_request): Update, "entry" parameter is a
8683 struct thread_info * now. Fetch pid, lwpid from thread.
8684 (resume_status_pending_p): Update, "entry" parameter is a
8685 struct thread_info * now.
8686 (need_step_over_p): Ditto. Fetch lwpid from thread.
8687 (start_step_over): Fetch lwpid from thread.
8688 (linux_resume_one_thread): Update, "entry" parameter is a
8689 struct thread_info * now. Fetch lwpid from thread.
8690 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8691 (proceed_one_lwp): Update, "entry" parameter is a
8692 struct thread_info * now. Fetch lwpid from thread.
8693 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8694 struct thread_info * now.
8695 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8696 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8697 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8698 directly.
8699 (regsets_store_inferior_registers): Ditto.
8700 (fetch_register, store_register): Ditto.
8701 (linux_read_memory, linux_write_memory): Ditto.
8702 (linux_request_interrupt): Ditto.
8703 (linux_read_auxv): Ditto.
8704 (linux_xfer_siginfo): Ditto.
8705 (linux_qxfer_spu): Ditto.
8706 (linux_qxfer_libraries_svr4): Ditto.
8707 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8708 moved to inferiors.h.
8709 (get_lwp): Delete.
8710 (get_thread_lwp): Update.
8711 (struct lwp_info): Delete member "entry". Simplify comment for
8712 member "thread".
8713 (all_lwps): Delete.
8714 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8715 current_inferior directly.
8716 (update_watch_registers_callback): Update, "entry" parameter is a
8717 struct thread_info * now. Fetch pid from thread.
8718 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8719 (mips_insert_point): Fetch lwpid from current_inferior.
8720 Pass &all_threads to find_inferior, not &all_lwps.
8721 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8722 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8723 directly.
8724 (mips_stopped_data_address): Ditto.
8725 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8726 directly.
8727 * linux-tile-low.c (tile_arch_setup): Ditto.
8728 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8729 (update_debug_registers_callback): Update, "entry" parameter is a
8730 struct thread_info * now. Fetch pid from thread.
8731 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8732 Pass &all_threads to find_inferior, not &all_lwps.
8733 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8734 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8735 Pass &all_threads to find_inferior, not &all_lwps.
8736 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8737 (i386_dr_low_get_status): Ditto.
8738 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8739 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8740 (x86_linux_read_description): Ditto.
8741 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8742
3b8361aa
DE
87432014-02-20 Doug Evans <dje@google.com>
8744
8745 * inferiors.c (get_first_inferior): Fix buglet.
8746
f7667f0d
DE
87472014-02-19 Doug Evans <dje@google.com>
8748
8749 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8750 * inferiors.c (add_thread): Change result type to struct thread_info *.
8751 All callers updated.
8752 (add_lwp): Call add_thread here instead of in callers.
8753 All callers updated.
8754 * linux-low.h (get_lwp_thread): Rewrite.
8755 (struct lwp_info): New member "thread".
8756
b3312d80
DE
87572014-02-19 Doug Evans <dje@google.com>
8758
8759 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8760 All callers updated.
8761
ecc6f45c
DE
87622014-02-19 Doug Evans <dje@google.com>
8763
8764 * inferiors.c (add_thread): Fix whitespace.
8765
649ebbca
DE
87662014-02-19 Doug Evans <dje@google.com>
8767
8768 * dll.c (clear_dlls): Replace accessing list implemention details
8769 with API function.
8770 * gdbthread.h (get_first_thread): Declare.
8771 * inferiors.c (for_each_inferior_with_data): New function.
8772 (get_first_thread): New function.
8773 (find_thread_ptid): Simplify.
8774 (get_first_inferior): New function.
8775 (clear_list): Delete.
8776 (one_inferior_p): New function.
8777 (clear_inferior_list): New function.
8778 (clear_inferiors): Update.
8779 * inferiors.h (for_each_inferior_with_data): Declare.
8780 (clear_inferior_list): Declare.
8781 (one_inferior_p): Declare.
8782 (get_first_inferior): Declare.
8783 * linux-low.c (linux_wait_for_event): Replace accessing list
8784 implemention details with API function.
8785 * server.c (target_running): Ditto.
8786 (accumulate_file_name_length): New function.
8787 (emit_dll_description): New function.
8788 (handle_qxfer_libraries): Replace accessing list implemention
8789 details with API function.
8790 (handle_qxfer_threads_worker): New function.
8791 (handle_qxfer_threads_proper): Replace accessing list implemention
8792 details with API function.
8793 (handle_query): Ditto.
8794 (visit_actioned_threads_callback_ftype): New typedef.
8795 (visit_actioned_threads_data): New struct.
8796 (visit_actioned_threads): Rewrite to be find_inferior callback.
8797 (resume): Call find_inferior.
8798 (handle_status): Replace accessing list implemention
8799 details with API function.
8800 (process_serial_event): Replace accessing list implemention details
8801 with API function.
8802 * target.c (set_desired_inferior): Replace accessing list implemention
8803 details with API function.
8804 * tracepoint.c (same_process_p): New function.
8805 (gdb_agent_about_to_close): Replace accessing list implemention
8806 details with API function.
8807 * win32-low.c (child_delete_thread): Replace accessing list
8808 implemention details with API function.
8809 (match_dll_by_basename): New function.
8810 (dll_is_loaded_by_basename): New function.
8811 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8812 details call to dll_is_loaded_by_basename.
8813
80894984
DE
88142014-02-19 Doug Evans <dje@google.com>
8815
8816 * dll.h (struct dll_info): Add comment.
8817 * gdbthread.h (struct thread_info): Add comment.
8818 (current_ptid): Simplify.
8819 * inferiors.c (add_process): Update.
8820 (remove_process): Update.
8821 * inferiors.h (struct process_info): Rename member "head" to "entry".
8822 * linux-low.c (delete_lwp): Update.
8823 (add_lwp): Update.
8824 (last_thread_of_process_p): Update.
8825 (kill_one_lwp_callback, linux_kill): Update.
8826 (status_pending_p_callback): Update.
8827 (wait_for_sigstop): Update. Simplify read of ptid.
8828 (start_step_over): Update.
8829 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8830 (get_lwp_thread): Update.
8831 (struct lwp_info): Rename member "head" to "entry".
8832 * regcache.h (inferior_list_entry): Delete.
8833 * server.c (kill_inferior_callback): Update.
8834 (detach_or_kill_inferior_callback): Update.
8835 (print_started_pid): Update.
8836 (print_attached_pid): Update.
8837 (process_serial_event): Simplify read of ptid.
8838 * thread-db.c (thread_db_create_event): Update.
8839 (thread_db_get_tls_address): Update.
8840 * win32-low.c (current_inferior_ptid): Simplify.
8841
46917d26
TT
88422014-02-19 Tom Tromey <tromey@redhat.com>
8843
8844 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8845 argument.
8846 (target_supports_btrace): Update.
8847
0759a81e
YQ
88482014-02-14 Yao Qi <yao@codesourcery.com>
8849
8850 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8851 (rsp-low-ipa.o): New target.
8852
a7191e8b
TT
88532014-02-12 Tom Tromey <tromey@redhat.com>
8854
8855 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8856 convert_ascii_to_int.
8857 * regcache.c (registers_to_string): Likewise.
8858 * remote-utils.c (decode_M_packet): Likewise.
8859 * server.c (process_serial_event): Likewise.
8860
ff0e980e
TT
88612014-02-12 Tom Tromey <tromey@redhat.com>
8862
8863 * server.c (handle_query, handle_v_run): Use hex2bin, not
8864 unhexify.
8865 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8866
e9371aff
TT
88672014-02-12 Tom Tromey <tromey@redhat.com>
8868
8869 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8870 convert_int_to_ascii.
8871 * regcache.c (registers_to_string, collect_register_as_string):
8872 Likewise.
8873 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8874 Likewise.
8875 * server.c (process_serial_event): Likewise.
8876 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8877 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8878
971dc0b8
TT
88792014-02-12 Tom Tromey <tromey@redhat.com>
8880
8881 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8882 bin2hex, not hexify.
8883 * tracepoint.c (cmd_qtstatus): Likewise.
8884
0a822afb
TT
88852014-02-12 Tom Tromey <tromey@redhat.com>
8886
8887 * remote-utils.c (monitor_output): Pass explicit length to
8888 hexify.
8889
9c3d6531
TT
88902014-02-12 Tom Tromey <tromey@redhat.com>
8891
8892 * tracepoint.c: Include rsp-low.h.
8893 * server.c: Include rsp-low.h.
8894 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8895 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8896 declare.
8897 * remote-utils.c: Include rsp-low.h.
8898 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8899 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8900 (convert_int_to_ascii, convert_ascii_to_int): Move to
8901 common/rsp-low.c.
8902 * regcache.c: Include rsp-low.h.
8903 * ax.c: Include rsp-low.h.
8904 * Makefile.in (SFILES): Add common/rsp-low.c.
8905 (OBS): Add rsp-low.o.
8906 (rsp-low.o): New target.
8907
01fd3ea5
TT
89082014-02-12 Tom Tromey <tromey@redhat.com>
8909
8910 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8911 Include print-utils.h.
8912 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8913 (plongest, thirty_two, phex_nz): Remove.
8914 * Makefile.in (SFILES): Add common/print-utils.c.
8915 (OBS): Add print-utils.o.
8916 (print-utils-ipa.o): New target.
8917 (print-utils.o): New target.
8918 (IPA_OBJS): Add print-utils-ipa.o.
8919
e99dc820
TT
89202014-02-06 Tom Tromey <tromey@redhat.com>
8921
8922 * Makefile.in (SFILES): Fix indentation.
8923
ee1e2d4f
DE
89242014-02-05 Doug Evans <dje@google.com>
8925
8926 * linux-low.c (linux_wait_for_event): Improve comment.
8927 (linux_wait_1): Keep current_inferior in sync with event_child.
8928
f5a02773
DE
89292014-01-22 Doug Evans <dje@google.com>
8930
8931 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8932
87ce2a04
DE
89332014-01-22 Doug Evans <dje@google.com>
8934
8935 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8936 * configure: Regenerate.
8937 * config.in: Regenerate.
8938 * Makefile.in (SFILES): Add debug.c.
8939 (OBS): Add debug.o.
8940 * debug.c: New file.
8941 * debug.h: New file.
8942 * linux-aarch64-low.c (*): Update all debugging printfs to use
8943 debug_printf instead of fprintf.
8944 * linux-arm-low.c (*): Ditto.
8945 * linux-cris-low.c (*): Ditto.
8946 * linux-crisv32-low.c (*): Ditto.
8947 * linux-m32r-low.c (*): Ditto.
8948 * linux-sparc-low.c (*): Ditto.
8949 * linux-x86.c (*): Ditto.
8950 * linux-low.c (*): Ditto.
8951 (linux_wait_1): Add calls to debug_enter, debug_exit.
8952 (linux_wait): Remove redundant debugging printf.
8953 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8954 (linux_resume, unstop_all_lwps): Ditto.
8955 * mem-break.c (*): Update all debugging printfs to use
8956 debug_printf instead of fprintf.
8957 * remote-utils.c (*): Ditto.
8958 * thread-db.c (*): Ditto.
8959 * server.c #include <ctype.h>, "gdb_vecs.h".
8960 (debug_threads): Moved to debug.c.
8961 (*): Update all debugging printfs to use debug_printf instead of
8962 fprintf.
8963 (start_inferior): Replace call to fflush with call to debug_flush.
8964 (monitor_show_help): Mention set debug-format.
8965 (parse_debug_format_options): New function.
8966 (handle_monitor_command): Handle "monitor set debug-format".
8967 (gdbserver_usage): Mention --debug-format.
8968 (main): Parse --debug-format.
8969 * server.h (debug_threads): Declaration moved to debug.h.
8970 #include "debug.h".
8971 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8972 trace_debug_1 that uses debug_printf.
8973 (tracepoint_look_up_symbols): Update all debugging printfs to use
8974 debug_printf instead of fprintf.
8975
e671835b
BS
89762014-01-20 Baruch Siach <baruch@tkos.co.il>
8977
8978 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8979 sys/ptrace.h.
8980
b5737fa9
PA
89812014-01-17 Pedro Alves <palves@redhat.com>
8982
ea38d2a9 8983 PR build/16445
c7faa97a
PA
8984 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8985 defined after including gdb_proc_service.h.
b5737fa9 8986
40ed484e
DE
89872014-01-16 Doug Evans <dje@google.com>
8988
8989 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8990 (match_dll): Use it.
8991
969c39fb
MM
89922014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8993
8994 * target.h (target_ops) <read_btrace>: Change parameters and
8995 return type to allow error reporting.
8996 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8997 trace reading errors on.
8998 * linux-low.c (linux_low_read_btrace): Pass trace reading
8999 errors on.
9000 (linux_low_disable_btrace): New.
9001
ab7f45ba
DE
90022014-01-15 Doug Evans <dje@google.com>
9003
9004 * inferiors.c (thread_id_to_gdb_id): Delete.
9005 * inferiors.h (thread_id_to_gdb_id): Delete.
9006
66af0f44
EZ
90072014-01-13 Eli Zaretskii <eliz@gnu.org>
9008
9009 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9010 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9011 versions.
9012
9939e131
PA
90132014-01-08 Pedro Alves <palves@redhat.com>
9014
9015 * server.c (handle_status): Don't discard previous queued stop
9016 replies or thread's pending status here.
9017 (main) <disconnection>: Do it here instead.
9018
b7ea362b
PA
90192014-01-08 Pedro Alves <palves@redhat.com>
9020
9021 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9022 * server.c (visit_actioned_threads, handle_pending_status): New
9023 function.
9024 (handle_v_cont): Factor out parts to ...
9025 (resume): ... this new function. If in all-stop, and a thread
9026 being resumed has a pending status, report it without actually
9027 resuming.
9028 (myresume): Adjust to use the new 'resume' function.
9029 (clear_pending_status_callback, set_pending_status_callback)
9030 (find_status_pending_thread_callback): New functions.
9031 (handle_status): Handle the case of multiple threads having
9032 interesting statuses to report. Report threads' real last signal
9033 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9034 with an interesting thread to report the status for, instead of
9035 always reporting the status of the first thread.
9036
28498c42
JB
90372014-01-01 Joel Brobecker <brobecker@adacore.com>
9038
9039 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9040 * gdbreplay.c (gdbreplay_version): Likewise.
9041
f45c82da
YZ
90422013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9043
9044 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9045 iov.iov_len with the real length in use.
9046
379a5e2d
JB
90472013-12-13 Joel Brobecker <brobecker@adacore.com>
9048
9049 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9050 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9051 for all targets that use win32-low.c.
9052 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9053 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9054
4210d83e
PA
90552013-12-13 Pedro Alves <palves@redhat.com>
9056
9057 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9058 if equal to TARGET_WAITKIND_LOADED.
9059 * win32-low.c (cached_status): New static global.
9060 (win32_wait): Add declaration.
9061 (do_initial_child_stuff): Flush all initial pending debug events
9062 up to the initial breakpoint.
9063 (win32_wait): If CACHED_STATUS was set, return that instead
9064 of doing a real wait. Remove the code resuming the execution
9065 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9066 during the initial phase. Also remove the code changing
9067 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9068 TARGET_WAITKIND_STOPPED.
9069
e7f0d979
YQ
90702013-12-11 Yao Qi <yao@codesourcery.com>
9071
9072 * notif.c (handle_notif_ack): Return 0 if no notification
9073 matches.
9074
ebcf782c
DE
90752013-11-20 Doug Evans <dje@google.com>
9076
9077 * linux-low.c (linux_set_resume_request): Fix comment.
9078
20ad9378
DE
90792013-11-20 Doug Evans <dje@google.com>
9080
9081 * linux-low.c (resume_status_pending_p): Tweak comment.
9082
a196ebeb
WT
90832013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9084
9085 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9086 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9087 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9088 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9089 (srv_amd64_regobj): Add amd64-mpx.o.
9090 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9091 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9092 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9093 * i387-fp.c (num_pl_bnd_register) Added constant.
9094 (num_pl_bnd_cfg_registers) Added constant.
9095 (struct i387_xsave) Added reserved area and MPX fields.
9096 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9097 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9098 function.
9099 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9100 (init_registers_amd64_mpx_linux): Declare new function.
9101 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9102 (x86_64_regmap): Add MPX registers.
9103 (x86_linux_read_description): Add MPX case.
9104 (initialize_low_arch): Initialize MPX targets.
9105
0080a2f6
TT
91062013-11-18 Tom Tromey <tromey@redhat.com>
9107
9108 * configure: Rebuild.
9109 * configure.ac: Don't check for stdlib.h.
9110 * gdbreplay.c: Unconditionally include stdlib.h.
9111
2978b111
TT
91122013-11-18 Tom Tromey <tromey@redhat.com>
9113
9114 * config.in: Rebuild.
9115 * configure: Rebuild.
9116 * configure.ac: Don't use AC_HEADER_DIRENT.
9117
a3d08894
TT
91182013-11-18 Tom Tromey <tromey@redhat.com>
9119
9120 * server.h: Don't check HAVE_STRING_H.
9121 * gdbreplay.c: Don't check HAVE_STRING_H.
9122 * configure: Rebuild.
9123
0a5dd17d
TT
91242013-11-18 Tom Tromey <tromey@redhat.com>
9125
9126 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9127 LIBGNU.
9128
1bd2f0ba
TT
91292013-11-08 Tom Tromey <tromey@redhat.com>
9130
9131 * configure, config.in: Rebuild.
9132 * configure.ac: Remove unused configury.
9133
3266f10b
TT
91342013-11-08 Tom Tromey <tromey@redhat.com>
9135
9136 * acinclude.m4: Include common.m4, codeset.m4.
9137 * configure, config.in: Rebuild.
9138 * configure.ac: Use GDB_AC_COMMON.
9139
6682d959
AA
91402013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9141
9142 * linux-s390-low.c (HWCAP_S390_TE): New define.
9143 (s390_arch_setup): Consider the TE field in the HWCAP for
9144 determining 'have_regset_tdb'.
9145
fd0a4d76
SDJ
91462013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9147
9148 PR gdb/16014
9149 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9150 call to sizeof.
9151
1a3d890b
PA
91522013-10-02 Pedro Alves <palves@redhat.com>
9153
9154 * server.c (process_serial_event): Don't output "GDBserver
9155 exiting" if GDB is connected through stdio.
9156 * target.c (mywait): Likewise, be silent if GDB is connected
9157 through stdio.
9158
97ad4581
JB
91592013-10-01 Joel Brobecker <brobecker@adacore.com>
9160
9161 * lynx-low.c (lynx_add_threads_after_attach): New function.
9162 (lynx_attach): Remove call to add_thread. Add call to
9163 lynx_add_threads_after_attach instead.
9164
5b4e221c
MF
91652013-09-28 Mike Frysinger <vapier@gentoo.org>
9166
9167 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9168 * config.in, configure: Regenerated.
9169
ee47b2f8
YQ
91702013-09-18 Yao Qi <yao@codesourcery.com>
9171
9172 PR server/15959
9173 * server.c (start_inferior): Clear 'resume_info'.
9174
d6707650 91752013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9176
d6707650
JW
9177 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9178 for each register.
9179
9243dd0e 91802013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9181
9243dd0e
JW
9182 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9183 linux-tile-low.o to srv_tgtobj.
9184
c623a6ef
WN
91852013-09-16 Will Newton <will.newton@linaro.org>
9186
9187 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9188 out regs.
9189
fb71d39e
PA
91902013-09-06 Pedro Alves <palves@redhat.com>
9191
9192 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9193 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9194 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9195 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9196 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9197 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9198
8e7e9910
PA
91992013-09-06 Pedro Alves <palves@redhat.com>
9200
9201 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9202 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9203
7c3a12ca
PA
92042013-09-06 Pedro Alves <palves@redhat.com>
9205
9206 * linux-amd64-ipa.c: Include tracepoint.h.
9207 * linux-i386-ipa.c: Include tracepoint.h.
9208
8eb3d7b6
RW
92092013-09-06 Ricard Wanderlof <ricardw@axis.com>
9210
9211 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9212 (ps_get_thread_area): New function.
9213
eddddb9d
RW
92142013-09-06 Ricard Wanderlof <ricardw@axis.com>
9215
9216 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9217 (initialize_low_arch): Call init_registers_crisv32 rather than
9218 init_register_crisv32.
9219
533b0600
PA
92202013-09-05 Pedro Alves <palves@redhat.com>
9221
9222 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9223 to ...
9224 * hostio.h: ... this new file.
9225 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9226 win32-low.c: Include hostio.h.
9227
0ce3d3b5
PA
92282013-09-05 Pedro Alves <palves@redhat.com>
9229
9230 * server.h (gdb_client_data, handler_func, callback_handler_func)
9231 (delete_file_handler, add_file_handler, append_callback_event)
9232 (delete_callback_event, start_event_loop, initialize_event_loop):
9233 Move to event-loop.h and include it.
9234 * event-loop.h: New file.
9235
799cdc37
PA
92362013-09-05 Pedro Alves <palves@redhat.com>
9237
9238 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9239 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9240 (loaded_dll, unloaded_dll): Move to ...
9241 * dll.h: ... this new file.
9242 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9243
6a6bbd9d
PA
92442013-09-05 Pedro Alves <palves@redhat.com>
9245
9246 * server.h (current_process, get_thread_process, all_processes)
9247 (add_inferior_to_list, for_each_inferior, current_inferior)
9248 (remove_inferior, add_process, remove_process, find_process_pid)
9249 (have_started_inferiors_p, have_attached_inferiors_p)
9250 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9251 (clear_inferiors, find_inferior, find_inferior_id)
9252 (inferior_target_data, set_inferior_target_data)
9253 (inferior_regcache_data, set_inferior_regcache_data): Move to
9254 inferiors.h, and include it.
9255 * inferiors.h: New file.
9256
f699aaba
PA
92572013-09-05 Pedro Alves <palves@redhat.com>
9258
9259 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9260 Move ...
72f4393d 9261 * ax.h: ... here.
f699aaba 9262
c144c7a0
PA
92632013-09-05 Pedro Alves <palves@redhat.com>
9264
9265 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9266 tracepoint.h.
9267 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9268 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9269 (handle_tracepoint_general_set, handle_tracepoint_query)
9270 (tracepoint_finished_step, tracepoint_was_hit)
9271 (release_while_stepping_state_list, current_traceframe)
9272 (in_readonly_region, traceframe_read_mem)
9273 (fetch_traceframe_registers, traceframe_read_sdata)
9274 (traceframe_read_info, struct fast_tpoint_collect_status)
9275 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9276 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9277 (supply_fast_tracepoint_registers)
9278 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9279 (ipa_tdesc, claim_trampoline_space)
9280 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9281 (agent_mem_read, agent_get_trace_state_variable_value)
9282 (agent_set_trace_state_variable_value, agent_tsv_read)
9283 (agent_mem_read_string, get_raw_reg_func_addr)
9284 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9285 * tracepoint.h: ... this new file.
9286
ff42e6ab
PA
92872013-09-05 Pedro Alves <palves@redhat.com>
9288
9289 * server.h (perror_with_name, error, fatal, warning, paddress)
9290 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9291 include it.
9292 * utils.h: New file.
9293
541af0f4
PA
92942013-09-05 Pedro Alves <palves@redhat.com>
9295
9296 * server.h (remote_debug, noack_mode, transport_is_reliable)
9297 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9298 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9299 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9300 (write_enn, initialize_async_io, enable_async_io)
9301 (disable_async_io, check_remote_input_interrupt_request)
9302 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9303 (dead_thread_notify, prepare_resume_reply)
9304 (decode_address_to_semicolon, decode_address, decode_m_packet)
9305 (decode_M_packet, decode_X_packet, decode_xfer_write)
9306 (decode_search_memory_packet, unhexify, hexify)
9307 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9308 (look_up_one_symbol, relocate_instruction)
9309 (monitor_output): Move to remote-utils.h, and include it.
9310 * remote-utils.h: New file.
9311
eebdf26b
PA
93122013-09-05 Pedro Alves <palves@redhat.com>
9313
9314 * server.h (_): Delete.
9315
3aafd2ff
PA
93162013-09-02 Pedro Alves <palves@redhat.com>
9317
9318 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9319 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9320 allocated.
9321 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9322
cee83bcb
PM
93232013-09-02 Pierre Muller <muller@sourceware.org>
9324
9325 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9326 or WriteProcessMemory complete successfully and handle
9327 ERROR_PARTIAL_COPY error.
9328
9a13b2fa
PA
93292013-09-02 Pedro Alves <palves@redhat.com>
9330
9331 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9332 error instead of EIO.
9333
602e3198
JK
93342013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9335
9336 PR server/15604
9337 * linux-low.c: Include filestuff.h.
9338 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9339 * lynx-low.c: Include filestuff.h.
9340 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9341 * server.c: Include filestuff.h.
9342 (main): Call notice_open_fds.
9343 * spu-low.c: Include filestuff.h.
9344 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9345
96d7229d
LM
93462013-08-22 Luis Machado <lgustavo@codesourcery.com>
9347
9348 * Makefile.in: Explain why ../target and ../nat are not
9349 listed as include file search paths.
9350 (linux-waitpid.o): New object file rule.
9351 * configure.srv (srv_native_linux_obj): New variable.
9352 Replace all occurrences of linux native object files with
9353 $srv_native_linux_obj.
9354 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9355 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9356 (linux_enable_event_reporting): Remove declaration.
9357 (my_waitpid): Moved to common/linux-waitpid.c.
9358 (linux_wait_for_event): Pass ptid when calling
9359 linux_enable_event_reporting.
9360 (linux_supports_tracefork_flag): Remove.
9361 (linux_enable_event_reporting): Likewise.
9362 (linux_tracefork_grandchild): Remove.
9363 (STACK_SIZE): Moved to common/linux-ptrace.c.
9364 (linux_tracefork_child): Remove.
9365 (linux_test_for_tracefork): Remove.
9366 (linux_look_up_symbols): Call linux_supports_traceclone.
9367 (initialize_low): Remove call to linux_test_for_tracefork.
9368 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9369 common/linux-ptrace.h.
9370 (PTRACE_TYPE_ARG4): Likewise.
9371 Include linux-ptrace.h.
9372
32940073
PA
93732013-08-21 Pedro Alves <palves@redhat.com>
9374
9375 * config.in: Renegerate.
9376
33b60d58 93772013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9378
33b60d58
LM
9379 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9380 (SFILES): Remove $(srcdir)/common/target-common.c and
9381 add $(srcdir)/target/waitstatus.c.
9382 (OBS): Remove target-common.o and add waitstatus.o.
9383 (server_h): Remove $(srcdir)/../common/target-common.h and
9384 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9385 and $(srcdir)/../target/waitstatus.h.
9386 (target-common.o): Remove.
9387 (waitstatus.o): New target object file.
9388 * target.h: Do not include target-common.h and
9389 include target/resume.h, target/wait.h and
9390 target/waitstatus.h.
9391
b8e1b30e
LM
93922013-08-13 Luis Machado <lgustavo@codesourcery.com>
9393
9394 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9395 to PTRACE_TYPE_ARG3.
9396 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9397 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9398 PTRACE_TYPE_ARG4.
9399 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9400 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9401
7a60ad40
YQ
94022013-07-27 Jie Zhang <jie@codesourcery.com>
9403 Daniel Jacobowitz <dan@codesourcery.com>
9404 Yao Qi <yao@codesourcery.com>
9405
9406 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9407 (mips-linux-watch.o): New rule.
9408 (mips_linux_watch_h): New variable.
9409 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9410 srv_tgtobj.
9411 * linux-mips-low.c: Include mips-linux-watch.h.
9412 (struct arch_process_info, struct arch_lwp_info): New.
9413 (update_watch_registers_callback): New function.
9414 (mips_linux_new_process, mips_linux_new_thread) New functions.
9415 (mips_linux_prepare_to_resume, mips_insert_point): New
9416 functions.
9417 (mips_remove_point, mips_stopped_by_watchpoint): New
9418 functions.
9419 (rsp_bp_type_to_target_hw_bp_type): New function.
9420 (mips_stopped_data_address): New function.
9421 (the_low_target): Add watchpoint support functions.
9422
de6f69ad
YQ
94232013-07-27 Yao Qi <yao@codesourcery.com>
9424
9425 * i386-low.c: Include break-common.h.
9426 (enum target_hw_bp_type): Remove.
9427
3360c0bf
LM
94282013-07-24 Luis Machado <lgustavo@codesourcery.com>
9429
9430 * Makefile.in (SFILES): /common/target-common.c.
9431 (OBS): Add target-common.o.
9432 (server_h): Add $(srcdir)/../common/target-common.h.
9433 (target-common.o): New target.
9434 * server.c (queue_stop_reply_callback): Free
9435 status string after use.
9436 * target.c (target_waitstatus_to_string): Remove.
9437 * target.h: Include target-common.h.
9438 (resume_kind): Likewise.
9439 (target_waitkind): Likewise.
9440 (target_waitstatus): Likewise.
9441 (TARGET_WNOHANG): Likewise.
9442
bd885420
YQ
94432013-07-04 Yao Qi <yao@codesourcery.com>
9444
9445 * Makefile.in (host_alias): Use @host_noncanonical@.
9446 (target_alias): Use @target_noncanonical@.
9447 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9448 ACX_NONCANONICAL_HOST.
9449 * configure: Regenerated.
9450
9451 Revert:
9452 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9453
9454 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9455 * configure: Rebuild.
9456 * Makefile.in (version_host, version_target): Get from configure.
9457 (version.c): Use $(version_host) and $(version_target).
9458
17ef446e
PA
94592013-07-03 Pedro Alves <palves@redhat.com>
9460
9461 * Makefile.in (config.status): Depend on development.sh.
9462 * acinclude.m4: Include libmcheck.m4.
9463 * configure: Regenerate.
9464
7a9a7487
MG
94652013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9466
9467 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9468 attribute inside the parentheses.
9469 (winapi_DebugSetProcessKillOnExit): Ditto.
9470 (winapi_DebugBreakProcess): Ditto.
9471 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9472
49b64de6
MG
94732013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9474
9475 * notif.h (notif_event): Add a dummy member to avoid compiler
9476 errors.
9477
d5749ee7
PA
94782013-07-01 Pedro Alves <palves@redhat.com>
9479
9480 * hostio.c (HOSTIO_PATH_MAX): Define.
9481 (require_filename, handle_open, handle_unlink, handle_readlink):
9482 Use it.
9483
d8d2a3ee
PA
94842013-07-01 Pedro Alves <palves@redhat.com>
9485
9486 * server.h: Include "pathmax.h".
9487 * linux-low.c: Don't include sys/param.h.
9488 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9489 MAXPATHLEN.
9490 * win32-low.c: Don't include sys/param.h.
9491 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9492
bc7dea8d
PA
94932013-07-01 Pedro Alves <palves@redhat.com>
9494
9495 * event-loop.c: Don't check HAVE_UNISTD_H before including
9496 <unistd.h>.
9497 * gdbreplay.c: Likewise.
9498 * remote-utils.c: Likewise.
9499 * server.c: Likewise.
9500 * configure.ac: Don't check for unistd.h.
9501 * configure: Regenerate.
9502
d6c2da54
TT
95032013-06-28 Tom Tromey <tromey@redhat.com>
9504
9505 * Makefile.in (version.c): Use version.in, not
9506 common/version.in.
9507
257b6bec
MG
95082013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9509
9510 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9511 * configure: Rebuild.
9512 * Makefile.in (version_host, version_target): Get from configure.
9513 (version.c): Use $(version_host) and $(version_target).
9514
86ebe149
DK
95152013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9516
9517 Fix trace-status to output user name without trailing colon.
9518 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9519
f30aa5af
DK
95202013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9521
9522 Fix trace-status to output proper start-time and stop-time.
9523 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9524 output start time and stop time in hex as gdb expects.
9525
28a93511
YQ
95262013-06-26 Pedro Alves <pedro@codesourcery.com>
9527
9528 * tracepoint.c (build_traceframe_info_xml): Output trace state
9529 variables present in the trace buffer.
9530
01208463
TT
95312013-06-24 Tom Tromey <tromey@redhat.com>
9532
9533 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9534 create-version.sh.
9535 (version.o): Remove.
9536 * gdbreplay.c: Include version.h.
9537 (version, host_name): Don't declare.
9538 * server.h: Include version.h.
9539 (version, host_name): Don't declare.
9540
760256f9
PA
95412013-06-12 Pedro Alves <palves@redhat.com>
9542
9543 * linux-x86-low.c (linux_is_elf64): Delete global.
9544 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9545 with local linux_pid_exe_is_elf_64_file use.
9546
030031ee
PA
95472013-06-11 Pedro Alves <palves@redhat.com>
9548
9549 * linux-low.c (regset_disabled, disable_regset): New functions.
9550 (regsets_fetch_inferior_registers)
9551 (regsets_store_inferior_registers): Use them.
9552 (initialize_regsets_info); Don't allocate the disabled_regsets
9553 array here.
9554 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9555 comment.
9556
5da6eb0a
PA
95572013-06-11 Pedro Alves <palves@redhat.com>
9558
9559 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9560 xmalloc.
9561
7e5aaa09
PA
95622013-06-11 Pedro Alves <palves@redhat.com>
9563
9564 * linux-x86-low.c (initialize_low_arch): Call
9565 init_registers_x32_avx_linux.
9566
d878444c
JK
95672013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9568
9569 Fix compatibility with Android Bionic.
9570 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9571 it is not empty.
9572
3aee8918
PA
95732013-06-07 Pedro Alves <palves@redhat.com>
9574
5f2b57b5 9575 PR server/14823
3aee8918
PA
9576 * Makefile.in (OBS): Add tdesc.o.
9577 (IPA_OBJS): Add tdesc-ipa.o.
9578 (tdesc-ipa.o): New rule.
9579 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9580 interface.
9581 * linux-low.c (new_inferior): Delete.
9582 (disabled_regsets, num_regsets): Delete.
9583 (linux_add_process): Adjust to set the new per-process
9584 new_inferior flag.
9585 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9586 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9587 was a stop. When calling arch_setup, switch the current inferior
9588 to the thread that got an event.
9589 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9590 (regsets_fetch_inferior_registers)
9591 (regsets_store_inferior_registers): New regsets_info parameter.
9592 Adjust to use it.
9593 (linux_register_in_regsets): New regs_info parameter. Adjust to
9594 use it.
9595 (register_addr, fetch_register, store_register): New usrregs_info
9596 parameter. Adjust to use it.
9597 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9598 parameter regs_info. Adjust to use it.
9599 (linux_fetch_registers): Get the current inferior's regs_info, and
9600 adjust to use it.
9601 (linux_store_registers): Ditto.
9602 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9603 (initialize_low): Don't initialize the target_regsets here. Call
9604 initialize_low_arch.
9605 * linux-low.h (target_regsets): Delete declaration.
9606 (struct regsets_info): New.
9607 (struct usrregs_info): New.
9608 (struct regs_info): New.
9609 (struct process_info_private) <new_inferior>: New field.
9610 (struct linux_target_ops): Delete the num_regs, regmap, and
9611 regset_bitmap fields. New field regs_info.
9612 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9613 * i387-fp.c (num_xmm_registers): Delete.
9614 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9615 calls to new interface.
9616 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9617 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9618 Infer the number of xmm registers from the regcache's target
9619 description.
9620 * i387-fp.h (num_xmm_registers): Delete.
9621 * inferiors.c (add_thread): Don't install the thread's regcache
9622 here.
9623 * proc-service.c (gregset_info): Fetch the current inferior's
9624 regs_info. Adjust to use it.
9625 * regcache.c: Include tdesc.h.
9626 (register_bytes, reg_defs, num_registers)
9627 (gdbserver_expedite_regs): Delete.
9628 (get_thread_regcache): If the thread doesn't have a regcache yet,
9629 create one, instead of aborting gdbserver.
9630 (regcache_invalidate_one): Rename to ...
9631 (regcache_invalidate_thread): ... this.
9632 (regcache_invalidate_one): New.
9633 (regcache_invalidate): Only invalidate registers of the current
9634 process.
9635 (init_register_cache): Add target_desc parameter, and use it.
9636 (new_register_cache): Ditto. Assert the target description has a
9637 non zero registers_size.
9638 (regcache_cpy): Add assertions. Adjust.
9639 (realloc_register_cache, set_register_cache): Delete.
9640 (registers_to_string, registers_from_string): Adjust.
9641 (find_register_by_name, find_regno, find_register_by_number)
9642 (register_cache_size): Add target_desc parameter, and use it.
9643 (free_register_cache_thread, free_register_cache_thread_one)
9644 (regcache_release, register_cache_size): New.
9645 (register_size): Add target_desc parameter, and use it.
9646 (register_data, supply_register, supply_register_zeroed)
9647 (supply_regblock, supply_register_by_name, collect_register)
9648 (collect_register_as_string, collect_register_by_name): Adjust.
9649 * regcache.h (struct target_desc): Forward declare.
9650 (struct regcache) <tdesc>: New field.
9651 (init_register_cache, new_register_cache): Add target_desc
9652 parameter.
9653 (regcache_invalidate_thread): Declare.
9654 (regcache_invalidate_one): Delete declaration.
9655 (regcache_release): Declare.
9656 (find_register_by_number, register_cache_size, register_size)
9657 (find_regno): Add target_desc parameter.
9658 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9659 declarations.
9660 * remote-utils.c: Include tdesc.h.
9661 (outreg, prepare_resume_reply): Adjust.
9662 * server.c: Include tdesc.h.
9663 (gdbserver_xmltarget): Delete declaration.
9664 (get_features_xml, process_serial_event): Adjust.
9665 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9666 declare.
9667 (struct process_info) <tdesc>: New field.
9668 (ipa_tdesc): Declare.
9669 * tdesc.c: New file.
9670 * tdesc.h: New file.
9671 * tracepoint.c: Include tdesc.h.
9672 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9673 (get_context_regcache): Adjust to pass ipa_tdesc down.
9674 (do_action_at_tracepoint): Adjust to get the register cache size
9675 from the context regcache's description.
9676 (traceframe_walk_blocks): Adjust to get the register cache size
9677 from the current trace frame's description.
9678 (traceframe_get_pc): Adjust to get current trace frame's
9679 description and pass it down.
9680 (gdb_collect): Adjust to get the register cache size from the
9681 IPA's description.
9682 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9683 (gdbserver_xmltarget): Delete.
9684 (initialize_low_tracepoint): Set the ipa's target description.
9685 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9686 (initialize_low_tracepoint): Set the ipa's target description.
9687 * linux-x86-low.c: Include tdesc.h.
9688 [__x86_64__] (is_64bit_tdesc): New.
9689 (ps_get_thread_area, x86_get_thread_area): Use it.
9690 (i386_cannot_store_register): Rename to ...
9691 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9692 (i386_cannot_fetch_register): Rename to ...
9693 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9694 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9695 to new interface.
9696 (target_regsets): Rename to ...
9697 (x86_regsets): ... this.
9698 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9699 interface.
9700 (x86_siginfo_fixup): Use is_64bit_tdesc.
9701 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9702 (tdesc_x32_avx_linux, tdesc_x32_linux)
9703 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9704 Declare.
9705 (x86_linux_update_xmltarget): Delete.
9706 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9707 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9708 (AMD64_LINUX_USER64_CS): New.
9709 (x86_linux_read_description): New, based on
9710 x86_linux_update_xmltarget.
9711 (same_process_callback): New.
9712 (x86_arch_setup_process_callback): New.
9713 (x86_linux_update_xmltarget): New.
9714 (x86_regsets_info): New.
9715 (amd64_linux_regs_info): New.
9716 (i386_linux_usrregs_info): New.
9717 (i386_linux_regs_info): New.
9718 (x86_linux_regs_info): New.
9719 (x86_arch_setup): Reimplement.
9720 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9721 (x86_emit_ops): Ditto.
9722 (the_low_target): Adjust. Install x86_linux_regs_info,
9723 x86_cannot_fetch_register, and x86_cannot_store_register.
9724 (initialize_low_arch): New.
9725 * linux-ia64-low.c (tdesc_ia64): Declare.
9726 (ia64_fetch_register): Adjust.
9727 (ia64_usrregs_info, regs_info): New globals.
9728 (ia64_regs_info): New function.
9729 (the_low_target): Adjust.
9730 (initialize_low_arch): New function.
9731 * linux-sparc-low.c (tdesc_sparc64): Declare.
9732 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9733 Adjust.
9734 (sparc_arch_setup): New function.
9735 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9736 (the_low_target): Adjust.
9737 (initialize_low_arch): New function.
9738 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9739 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9740 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9741 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9742 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9743 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9744 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9745 (tdesc_powerpc_isa205_vsx64l): Declare.
9746 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9747 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9748 (ppc_set_pc, ppc_get_hwcap): Adjust.
9749 (ppc_usrregs_info): Forward declare.
9750 (!__powerpc64__) ppc_regmap_adjusted: New global.
9751 (ppc_arch_setup): Adjust to the current process'es target
9752 description.
9753 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9754 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9755 (ppc_store_evrregset): Adjust.
9756 (target_regsets): Rename to ...
9757 (ppc_regsets): ... this, and make static.
9758 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9759 (ppc_regs_info): New function.
9760 (the_low_target): Adjust.
9761 (initialize_low_arch): New function.
9762 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9763 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9764 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9765 (tdesc_s390x_linux64v2): Declare.
9766 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9767 (s390_fill_gregset, s390_store_last_break): Adjust.
9768 (target_regsets): Rename to ...
9769 (s390_regsets): ... this, and make static.
9770 (s390_get_pc, s390_set_pc): Adjust.
9771 (s390_get_hwcap): New target_desc parameter, and use it.
9772 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9773 (s390_arch_setup): Adjust to set the current process'es target
9774 description. Don't adjust the regmap.
9775 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9776 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9777 (regs_info_3264): New globals.
9778 (s390_regs_info): New function.
9779 (the_low_target): Adjust.
9780 (initialize_low_arch): New function.
9781 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9782 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9783 [__mips64] (init_registers_mips_linux)
9784 (init_registers_mips_dsp_linux): Delete defines.
9785 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9786 (have_dsp): New global.
9787 (mips_read_description): New, based on mips_arch_setup.
9788 (mips_arch_setup): Reimplement.
9789 (get_usrregs_info): New function.
9790 (mips_cannot_fetch_register, mips_cannot_store_register)
9791 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9792 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9793 (target_regsets): Rename to ...
9794 (mips_regsets): ... this, and make static.
9795 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9796 (dsp_regs_info, regs_info): New globals.
9797 (mips_regs_info): New function.
9798 (the_low_target): Adjust.
9799 (initialize_low_arch): New function.
9800 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9801 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9802 Declare.
9803 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9804 (arm_read_description): New, with bits factored from
9805 arm_arch_setup.
9806 (arm_arch_setup): Reimplement.
9807 (target_regsets): Rename to ...
9808 (arm_regsets): ... this, and make static.
9809 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9810 (arm_regs_info): New function.
9811 (the_low_target): Adjust.
9812 (initialize_low_arch): New function.
9813 * linux-m68k-low.c (tdesc_m68k): Declare.
9814 (target_regsets): Rename to ...
9815 (m68k_regsets): ... this, and make static.
9816 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9817 (m68k_regs_info): New function.
9818 (m68k_arch_setup): New function.
9819 (the_low_target): Adjust.
9820 (initialize_low_arch): New function.
9821 * linux-sh-low.c (tdesc_sharch): Declare.
9822 (target_regsets): Rename to ...
9823 (sh_regsets): ... this, and make static.
9824 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9825 (sh_regs_info, sh_arch_setup): New functions.
9826 (the_low_target): Adjust.
9827 (initialize_low_arch): New function.
9828 * linux-bfin-low.c (tdesc_bfin): Declare.
9829 (bfin_arch_setup): New function.
9830 (bfin_usrregs_info, regs_info): New globals.
9831 (bfin_regs_info): New function.
9832 (the_low_target): Adjust.
9833 (initialize_low_arch): New function.
9834 * linux-cris-low.c (tdesc_cris): Declare.
9835 (cris_arch_setup): New function.
9836 (cris_usrregs_info, regs_info): New globals.
9837 (cris_regs_info): New function.
9838 (the_low_target): Adjust.
9839 (initialize_low_arch): New function.
9840 * linux-cris-low.c (tdesc_crisv32): Declare.
9841 (cris_arch_setup): New function.
9842 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9843 (cris_regs_info): New function.
9844 (the_low_target): Adjust.
9845 (initialize_low_arch): New function.
9846 * linux-m32r-low.c (tdesc_m32r): Declare.
9847 (m32r_arch_setup): New function.
9848 (m32r_usrregs_info, regs_info): New globals.
9849 (m32r_regs_info): Adjust.
9850 (initialize_low_arch): New function.
9851 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9852 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9853 (tic6x_usrregs_info): Forward declare.
9854 (tic6x_read_description): New function, based on ...
9855 (tic6x_arch_setup): ... this. Reimplement.
9856 (target_regsets): Rename to ...
9857 (tic6x_regsets): ... this, and make static.
9858 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9859 (tic6x_regs_info): New function.
9860 (the_low_target): Adjust.
9861 (initialize_low_arch): New function.
9862 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9863 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9864 (target_regsets): Rename to ...
9865 (xtensa_regsets): ... this, and make static.
9866 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9867 globals.
9868 (xtensa_arch_setup, xtensa_regs_info): New functions.
9869 (the_low_target): Adjust.
9870 (initialize_low_arch): New function.
9871 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9872 (nios2_arch_setup): Set the current process'es tdesc.
9873 (target_regsets): Rename to ...
9874 (nios2_regsets): ... this.
9875 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9876 (nios2_regs_info): New function.
9877 (the_low_target): Adjust.
9878 (initialize_low_arch): New function.
a261b8f5
PA
9879 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9880 (aarch64_arch_setup): Set the current process'es tdesc.
9881 (target_regsets): Rename to ...
9882 (aarch64_regsets): ... this.
9883 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9884 (aarch64_regs_info): New function.
9885 (the_low_target): Adjust.
9886 (initialize_low_arch): New function.
3aee8918
PA
9887 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9888 globals.
9889 (target_regsets): Rename to ...
9890 (tile_regsets): ... this.
9891 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9892 (tile_regs_info): New function.
9893 (tile_arch_setup): Set the current process'es tdesc.
9894 (the_low_target): Adjust.
9895 (initialize_low_arch): New function.
9896 * spu-low.c (tdesc_spu): Declare.
9897 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9898 * win32-arm-low.c (tdesc_arm): Declare.
9899 (arm_arch_setup): New function.
9900 (the_low_target): Install arm_arch_setup instead of
9901 init_registers_arm.
9902 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9903 (init_windows_x86): Rename to ...
9904 (i386_arch_setup): ... this. Set `win32_tdesc'.
9905 (the_low_target): Adjust.
9906 * win32-low.c (win32_tdesc): New global.
9907 (child_add_thread): Don't create the thread cache here.
9908 (do_initial_child_stuff): Set the new process'es tdesc.
9909 * win32-low.h (struct target_desc): Forward declare.
9910 (win32_tdesc): Declare.
9911 * lynx-i386-low.c (tdesc_i386): Declare global.
9912 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9913 * lynx-low.c (lynx_tdesc): New global.
9914 (lynx_add_process): Set the new process'es tdesc.
9915 * lynx-low.h (struct target_desc): Forward declare.
9916 (lynx_tdesc): Declare global.
9917 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9918 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9919 * nto-low.c (nto_tdesc): New global.
9920 (do_attach): Set the new process'es tdesc.
9921 * nto-low.h (struct target_desc): Forward declare.
9922 (nto_tdesc): Declare.
9923 * nto-x86-low.c (tdesc_i386): Declare.
9924 (nto_x86_arch_setup): Set `nto_tdesc'.
9925
b1fbec62
GB
99262013-06-04 Gary Benson <gbenson@redhat.com>
9927
9928 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9929 to qSupported response when appropriate.
9930 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9931 with nonzero-length annex.
9932 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9933 arguments supplied in annex.
9934
d1ec4ce7
DE
99352013-05-31 Doug Evans <dje@google.com>
9936
ac44adcb 9937 PR server/15594
d1ec4ce7
DE
9938 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9939 64 bits in 64-cross-32 environment.
9940
9b25f2d3
PA
99412013-05-28 Pedro Alves <palves@redhat.com>
9942
9943 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9944 (aarch64-without-fpu.c): Delete rule.
9945 * configure.srv (aarch64*-*-linux*): Remove references to
9946 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9947 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9948 declaration.
9949
6740dc9c
PA
99502013-05-24 Pedro Alves <palves@redhat.com>
9951
9952 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9953 instead of strchr/decode_address. Error if the range isn't split
9954 with a ','. Don't assume there's be a ':' in the action.
9955
c2d6af84
PA
99562013-05-23 Yao Qi <yao@codesourcery.com>
9957 Pedro Alves <palves@redhat.com>
9958
9959 * linux-low.c (lwp_in_step_range): New function.
9960 (linux_wait_1): If the thread was range stepping and stopped
9961 outside the stepping range, report the stop to GDB. Otherwise,
9962 continue stepping. Add range stepping debug output.
9963 (linux_set_resume_request): Copy the step range from the resume
9964 request to the lwp.
9965 (linux_supports_range_stepping): New.
9966 (linux_target_ops) <supports_range_stepping>: Set to
9967 linux_supports_range_stepping.
9968 * linux-low.h (struct linux_target_ops)
9969 <supports_range_stepping>: New field.
9970 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9971 * linux-x86-low.c (x86_supports_range_stepping): New.
9972 (the_low_target) <supports_range_stepping>: Set to
9973 x86_supports_range_stepping.
9974 * server.c (handle_v_cont): Handle 'r' action.
9975 (handle_v_requests): Append ";r" if the target supports range
9976 stepping.
9977 * target.h (struct thread_resume) <step_range_start,
9978 step_range_end>: New fields.
9979 (struct target_ops) <supports_range_stepping>:
9980 New field.
9981 (target_supports_range_stepping): New macro.
9982
58794e1a
JB
99832013-05-17 Joel Brobecker <brobecker@adacore.com>
9984
9985 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9986 confusion in comment.
9987
d631c5a7
JB
99882013-05-17 Joel Brobecker <brobecker@adacore.com>
9989
9990 * lynx-low.c (struct process_info_private): New type.
9991 (lynx_add_process): New function.
9992 (lynx_create_inferior, lynx_attach): Replace calls to
9993 add_process by calls to lynx_add_process.
9994 (lynx_resume): If PTID is null, then try using
9995 current_process()->private->last_wait_event_ptid.
9996 Add comments.
9997 (lynx_clear_inferiors): Delete. The contents of that function
9998 has been inlined in lynx_mourn;
9999 (lynx_wait_1): Save the ptid in the process's private data.
10000 (lynx_mourn): Free the process' private data. Replace call
10001 to lynx_clear_inferiors by call to clear_inferiors.
10002
96f7a20f
YQ
100032013-05-17 Yao Qi <yao@codesourcery.com>
10004
10005 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10006 the right place.
10007
db0dfaa0
LM
100082013-05-16 Luis Machado <lgustavo@codesourcery.com>
10009
10010 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10011 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10012 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10013 PT_TEXT_END_ADDR guards. Update comments.
10014 (linux_target_op) <read_offsets>: Conditionally define to
10015 linux_read_offsets if the target is UCLIBC and if it defines
10016 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10017
68f5f838
SL
100182013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10019 Andrew Jenner <andrew@codesourcery.com>
10020
10021 * Makefile.in (SFILES): Add linux-nios2-low.c.
10022 (clean): Add action to delete nios2-linux.c.
10023 (nios2-linux.c): New rule.
10024 * configure.srv: Add nios2*-*-linux*.
10025 * linux-nios2-low.c: New.
10026
1ebff1fd
HAQ
100272013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10028
10029 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10030
f6150862
HZ
100312013-04-25 Hui Zhu <hui@codesourcery.com>
10032
10033 PR gdb/15186
f6150862
HZ
10034 * ax.c (ax_printf): Add fflush.
10035
614c279d
TT
100362013-04-22 Tom Tromey <tromey@redhat.com>
10037
10038 * Makefile.in (SFILES): Add filestuff.c.
10039 (OBS): Add filestuff.o.
10040 (filestuff.o): New target.
10041 * config.in, configure: Rebuild.
10042 * configure.ac: Check for fdwalk, pipe2.
10043
7d4e5717
PA
100442013-04-17 Pedro Alves <palves@redhat.com>
10045
10046 * configure.ac (USE_THREAD_DB): Delete variable.
10047 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10048 Don't AC_SUBST USE_THREAD_DB.
10049 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10050 * config.in, configure: Regenerate.
10051
d5c93e41
PA
100522013-04-16 Pedro Alves <palves@redhat.com>
10053
10054 * linux-low.h (struct lwp_info) <thread_known>: Move under
10055 the USE_THREAD_DB #ifdef.
10056
04f5fe89
PA
100572013-04-16 Pedro Alves <palves@redhat.com>
10058
10059 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10060 (linux-low.o): Delete rule.
10061 * linux-low.h: Always include "gdb_thread_db.h" instead of
10062 conditionally including thread_db.h.
10063 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10064 HAVE_THREAD_DB_H.
10065
480b27bf
JK
100662013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10067
10068 * Makefile.in (install-only): Fix make install regression.
10069
43662968
JK
100702013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10071
10072 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10073 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10074 installation.
10075 * gdbserver.1: Remove.
10076
3e74e146
PA
100772013-03-22 Pedro Alves <palves@redhat.com>
10078
10079 * linux-low.c (handle_extended_wait): Don't call
10080 linux_enable_event_reporting.
10081
a8347a2a
TT
100822013-03-15 Tony Theodore <tonyt@logyst.com>
10083
10084 PR build/9098:
10085 * Makefile.in (SHELL): Use @SHELL@.
10086
eeb56fa7
SDJ
100872013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10088
10089 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10090 compiler warning.
10091
4fa7e2ff
JB
100922013-03-13 Joel Brobecker <brobecker@adacore.com>
10093
10094 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10095 Remove extraneous NULL element.
10096
8ddb1965
YQ
100972013-03-13 Yao Qi <yao@codesourcery.com>
10098
10099 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10100 'V' block in trace frame.
10101
9accd112
MM
101022013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10103
10104 * target.h (struct target_ops): Add btrace ops.
10105 (target_supports_btrace): New macro.
10106 (target_enable_btrace): New macro.
10107 (target_disable_btrace): New macro.
10108 (target_read_btrace): New macro.
10109 * gdbthread.h (struct thread_info): Add btrace field.
10110 * server.c: Include btrace-common.h.
10111 (handle_btrace_general_set): New function.
10112 (handle_btrace_enable): New function.
10113 (handle_btrace_disable): New function.
10114 (handle_general_set): Call handle_btrace_general_set.
10115 (handle_qxfer_btrace): New function.
10116 (struct qxfer qxfer_packets[]): Add btrace entry.
10117 * inferiors.c (remove_thread): Disable btrace.
10118 * linux-low: Include linux-btrace.h.
10119 (linux_low_enable_btrace): New function.
10120 (linux_low_read_btrace): New function.
10121 (linux_target_ops): Add btrace ops.
10122 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10123 Add srv_linux_btrace=yes.
10124 (x86_64-*-linux*): Add linux-btrace.o.
10125 Add srv_linux_btrace=yes.
10126 * configure.ac: Define HAVE_LINUX_BTRACE.
10127 * config.in: Regenerated.
10128 * configure: Regenerated.
10129
5cc22e4c
MM
101302013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10131
10132 * server.c (handle_qxfer): Preserve error message if -3 is
10133 returned.
10134 (qxfer): Document the -3 return value.
10135
7c97f91e
MM
101362013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10137
10138 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10139 (linux_btrace_h): New variable.
10140 (linux-btrace.o): New rule.
10141
be9a119c 101422013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10143 Hafiz Abid Qadeer <abidh@codesourcery.com>
10144
10145 * tracepoint.c (trace_buffer_size): New global.
10146 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10147 (init_trace_buffer): Change to one-argument function. Allocate
10148 trace buffer memory.
10149 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10150 handle QTBuffer:size packet.
10151 (cmd_bigqtbuffer_size): New function.
10152 (initialize_tracepoint): Call init_trace_buffer with
10153 DEFAULT_TRACE_BUFFER_SIZE.
10154 * server.c (handle_query): Add QTBuffer:size in the
10155 supported packets.
10156
e64f7499
YQ
101572013-03-07 Yao Qi <yao@codesourcery.com>
10158
10159 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10160 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10161 of -1.
10162 (cmd_qtsp): Adjust condition. Do post increment.
10163 Set cur_action and cur_step_action back to 0.
10164
f0ae6fc3
PA
101652013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10166
10167 PR server/15236
10168 * linux-low.c (linux_write_memory): Return early success if LEN is
10169 zero.
10170
b5b0b0af
CV
101712013-03-05 Corinna Vinschen <vinschen@redhat.de>
10172
334ad4a8 10173 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10174
589bc927
TT
101752013-02-28 Tom Tromey <tromey@redhat.com>
10176
10177 * configure.ac: Invoke AC_SYS_LARGEFILE.
10178 * configure, config.in: Rebuild.
10179
dfe07582
CV
101802013-02-28 Corinna Vinschen <vinschen@redhat.com>
10181
10182 * win32-low.c: Throughout, fix format strings and casts of
10183 printf-like functions to avoid type related warnings on all
10184 platforms.
10185 (get_child_debug_event): Print dwDebugEventCode as hex since
10186 that's how it's usually documented.
10187
736cd585
YQ
101882013-02-28 Yao Qi <yao@codesourcery.com>
10189
10190 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10191 pulongest.
10192
e1f58301
JW
101932013-02-27 Jiong Wang <jiwang@tilera.com>
10194
10195 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10196 (reg-tilegx32.c): New rule.
10197 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10198 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10199 different register info initializer according to elf class.
10200 (init_registers_tilgx32): New function. The tilegx32 register info
10201 initializer.
10202 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10203 (tile_store_gregset): Likewise.
10204
d171ca78
YQ
102052013-02-27 Yao Qi <yao@codesourcery.com>
10206
10207 * server.c (process_point_options): Print debug message when
10208 debug_threads is true.
10209
282bbdf3
YQ
102102013-02-26 Yao Qi <yao@codesourcery.com>
10211
10212 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10213
aca22551
PA
102142013-02-19 Pedro Alves <palves@redhat.com>
10215 Kai Tietz <ktietz@redhat.com>
10216
10217 PR gdb/15161
10218
10219 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10220 instead of strtoul to extract address from packet.
10221 (process_serial_event) <'z'>: Likewise.
10222
4f3cee1c
YQ
102232013-02-18 Yao Qi <yao@codesourcery.com>
10224
10225 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10226
8e1d55a3
PA
102272013-02-14 Pedro Alves <palves@redhat.com>
10228
10229 Plug memory leak.
10230
10231 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10232 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10233
458820da
PA
102342013-02-14 Pedro Alves <palves@redhat.com>
10235
10236 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10237
baea0dae
PA
102382013-02-14 Pedro Alves <palves@redhat.com>
10239
10240 * tracepoint.c (save_string): Delete.
10241 (add_tracepoint_action): Use savestring instead of save_string.
10242
0b1afbb3
PA
102432013-02-12 Pedro Alves <palves@redhat.com>
10244
10245 * linux-xtensa-low.c: Ditto.
10246 * xtensa-xtregs.c: Ditto.
10247
8a4ac37e
PA
102482013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10249
10250 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10251 thread_db.
10252
148de6bb
MS
102532013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10254
10255 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10256 aarch64_num_wp_regs and aarch64_num_bp_regs to
10257 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10258
55fac6e0
MS
102592013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10260
10261 * linux-aarch64-low.c (ps_get_thread_area): Replace
10262 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10263
176eb98c
MS
102642013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10265 Marcus Shawcroft <marcus.shawcroft@arm.com>
10266 Nigel Stephens <nigel.stephens@arm.com>
10267 Yufeng Zhang <yufeng.zhang@arm.com>
10268
10269 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10270 (aarch64.c, aarch64-without-fpu.c): New targets.
10271 * configure.srv (aarch64*-*-linux*): New.
10272 * linux-aarch64-low.c: New file.
10273
56f7af9c
MS
102742013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10275
43aaf8b6 10276 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10277 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10278 (dequeue_one_deferred_signal, linux_resume_one_thread)
10279 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10280 (linux_tracefork_grandchild, linux_test_for_tracefork)
10281 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10282 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10283 where the argument is 0.
10284
60f662b0
YQ
102852013-01-25 Yao Qi <yao@codesourcery.com>
10286
10287 * event-loop.c: Include "queue.h".
10288 (gdb_event_p): New typedef.
10289 (struct gdb_event) <next_event>: Remove.
10290 (event_queue): Change to QUEUE(gdb_event_p).
10291 (async_queue_event): Remove.
10292 (gdb_event_xfree): New.
10293 (initialize_event_loop): New.
10294 (process_event): Use API from QUEUE.
10295 (wait_for_event): Likewise.
10296 * server.c (main): Call initialize_event_loop.
10297 * server.h (initialize_event_loop): Declare.
10298
5ae4861a
YQ
102992013-01-18 Yao Qi <yao@codesourcery.com>
10300
10301 * ax.h (struct eval_agent_expr_context): New.
10302 (gdb_eval_agent_expr): Update declaration.
10303 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10304 TFRAME. Add new argument CTX.
10305 * server.h (struct eval_agent_expr_context): Declare.
10306 (agent_mem_read, agent_tsv_read): Update declaration.
10307 (agent_mem_read_string): Likewise.
10308 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10309 (add_traceframe_block): Add new argument TPOINT.
10310 Increase TPOINT->traceframe_usage.
10311 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10312 eval_tracepoint_agent_expr.
10313 (condition_true_at_tracepoint): Likewise.
10314 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10315 (agent_mem_read_string, agent_tsv_read): Likewise.
10316
85e00e85
YQ
103172013-01-16 Yao Qi <yao@codesourcery.com>
10318
10319 * linux-low.c (linux_resume_one_lwp): Don't check
10320 'lwp->bp_reinsert != 0'.
10321
4039cf45
JB
103222013-01-07 Joel Brobecker <brobecker@adacore.com>
10323 Pedro Alves <palves@redhat.com>
10324
10325 * lynx-low.c (ptrace_request_to_str): Define a temporary
10326 macro and use it to simplify this function's implementation.
10327
9044dee2
JB
103282013-01-07 Joel Brobecker <brobecker@adacore.com>
10329
10330 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10331 sets errno.
10332
e6352c8f
JB
103332013-01-07 Joel Brobecker <brobecker@adacore.com>
10334
10335 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10336
50681a27
JB
103372013-01-07 Joel Brobecker <brobecker@adacore.com>
10338
10339 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10340
3f6e77ef
JB
103412013-01-07 Joel Brobecker <brobecker@adacore.com>
10342
10343 * lynx-low.c (lynx_resume): Use the resume_info parameter
10344 to determine the ptid for the lynx_ptrace call, unless
10345 it is equal to minus_one_ptid, in which case we use the
10346 ptid of the current_inferior.
10347 (lynx_wait_1): After having received a thread create/exit
10348 event, resume the inferior's execution using the signaling
10349 thread's ptid, rather than the old ptid.
10350
7fda33ae
JB
103512013-01-07 Joel Brobecker <brobecker@adacore.com>
10352
10353 * lynx-low.c (lynx_resume): Delete variable ret.
10354
b9786c74
JB
103552013-01-01 Joel Brobecker <brobecker@adacore.com>
10356
10357 * gdbreplay.c (gdbreplay_version): Update copyright year.
10358 * server.c (gdbserver_version): Likewise.
10359
8b93d60f
JB
103602012-12-17 Joel Brobecker <brobecker@adacore.com>
10361
10362 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10363 new thread.
10364
037335a7
JB
103652012-12-17 Joel Brobecker <brobecker@adacore.com>
10366
10367 * lynx-low.c (ptrace_request_to_str): Add handling for
10368 PTRACE_GETTRACESIG.
10369
52d4cbd8
JB
103702012-12-17 Joel Brobecker <brobecker@adacore.com>
10371
10372 * lynx-low.c (lynx_attach): Delete variable new_process.
10373
ab8f6ca9
JB
103742012-12-17 Joel Brobecker <brobecker@adacore.com>
10375
10376 * lynx-low.c (lynx_create_inferior): Delete variable
10377 new_process.
10378
78cbc024
JB
103792012-12-17 Joel Brobecker <brobecker@adacore.com>
10380
10381 * lynx-low.c (ptrace_request_to_str): Do not handle
10382 PTRACE_GETTHREADLIST if this macro does not exist.
10383
14a00470
YQ
103842012-12-15 Yao Qi <yao@codesourcery.com>
10385
10386 * Makefile.in (OBS): Add notif.o.
10387 * notif.c, notif.h: New.
10388 * server.c: Include "notif.h".
10389 (struct vstop_notif) <next>: Remove.
10390 <base>: New field.
10391 (queue_stop_reply): Update.
10392 (push_event, send_next_stop_reply): Remove.
10393 (discard_queued_stop_replies): Update.
10394 (notif_stop): New variable.
10395 (handle_v_stopped): Remove.
10396 (handle_v_requests): Don't call handle_v_stopped. Call
10397 handle_ack_notif instead.
10398 (queue_stop_reply_callback): Call notif_event_enque instead
10399 of queue_stop_reply.
10400 (handle_status): Don't call send_next_stop_reply, call
10401 notif_write_event instead.
10402 (kill_inferior_callback): Likewise.
10403 (detach_or_kill_inferior_callback): Likewise.
10404 (main): Call initialize_notif.
10405 (process_serial_event): Call QUEUE_is_empty.
10406 (handle_target_event): Call notif_push instead of push event.
10407 * server.h (push_event): Remove declaration.
10408
61c125b9
TT
104092012-12-10 Tom Tromey <tromey@redhat.com>
10410
10411 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10412 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10413 macros.
10414 (.c.o): Rewrite.
10415 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10416 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10417 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10418 (amd64-linux-ipa.o, ax.o): Rewrite.
10419 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10420 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10421 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10422 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10423 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10424 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10425 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10426 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10427 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10428 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10429 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10430 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10431 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10432 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10433 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10434 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10435 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10436 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10437 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10438 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10439 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10440 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10441 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10442 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10443 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10444 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10445 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10446 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10447 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10448 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10449 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10450 (reg-tilegx.o): Remove.
10451 (all_object_files): New macro.
10452 Include .deps files.
10453 * aclocal.m4, configure: Rebuild.
10454 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10455 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10456 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10457
e90e9ad9
TT
104582012-12-05 Tom Tromey <tromey@redhat.com>
10459
10460 PR gdb/14917:
10461 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10462
02d403bf 104632012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10464
10465 * configure.ac: Check for linux/perf_event.h.
10466 * config.in: Regenerated.
10467 * configure: Regenerated.
10468
0270a750
PA
104692012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10470
10471 * hostio.c (handle_readlink): Decrease buffer size
10472 parameter passed to readlink by one byte.
10473
8c29b58e
YQ
104742012-11-26 Yao Qi <yao@codesourcery.com>
10475
10476 * configure.ac (build_warnings): Append '-Wempty-body'.
10477 * configure: Regenerated.
10478 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10479 body.
10480
8bdce1ff
PM
104812012-11-15 Pierre Muller <muller@sourceware.org>
10482
10483 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10484 * config.in: Regenerate.
10485 * configure: Regenerate.
10486 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10487 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10488 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10489 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10490 header.
10491 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10492 instead of <sys/wait.h> header.
10493 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10494
02d403bf 104952012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10496
10497 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10498 (various make rules): Remove -DGDBSERVER
10499
fbd5db48
YQ
105002012-11-09 Yao Qi <yao@codesourcery.com>
10501
10502 * spu-low.c (current_ptid): Move it to ..
10503 * gdbthread.h: ... here. New.
10504 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10505 * server.c (myresume, process_serial_event): Likewise.
10506 * thread-db.c (thread_db_find_new_threads): Likewise.
10507 * tracepoint.c (run_inferior_command): Likewise.
10508
b3dc46ff
AB
105092012-10-01 Andrew Burgess <aburgess@broadcom.com>
10510
10511 * server.c (handle_search_memory_1): Include access length in
10512 warning message.
10513
07c04788
HPN
105142012-09-05 Michael Brandt <michael.brandt@axis.com>
10515
10516 * linux-crisv32-low.c: Fix compile errors.
10517
918d227b
YQ
105182012-09-04 Yao Qi <yao@codesourcery.com>
10519
10520 * tracepoint.c (cmd_qtsv): Adjust debug message.
10521 Don't check CUR_TPOINT.
10522
18c1b81a
YQ
105232012-08-28 Yao Qi <yao@codesourcery.com>
10524
10525 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10526 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10527 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10528 Remove declarations of xmalloc, xreallloc, xstrdup and
10529 freeargv.
10530 * Makefile.in (libiberty_h): New.
10531 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10532 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10533
dc82f37b
YQ
105342012-08-23 Yao Qi <yao@codesourcery.com>
10535
10536 * server.h: Remove declaration of 'xsnprintf'.
10537
406b1477
KS
105382012-08-22 Keith Seitz <keiths@redhat.com>
10539
10540 * server.h: Include build-gnulib-gbserver/config.h.
10541 * gdbreplay.c: Likewise.
10542
e6712ff1
DE
105432012-08-08 Doug Evans <dje@google.com>
10544
10545 * Makefile.in (SFILES): Add gdb_vecs.c.
10546 (OBS): Add gdb_vecs.o.
10547 (gdb_vecs_h, host_defs_h): New variables.
10548 (thread-db.o): Add $(gdb_vecs_h) dependency.
10549 (gdb_vecs.o): New rule.
10550 * thread-db.c: #include "gdb_vecs.h".
10551 (thread_db_load_search): Use a vector to iterate over path elements.
10552 Handle text appearing after "$pdir".
10553
10554 * configure.ac: Add check for strstr.
10555 * config.in: Regenerate.
10556 * configure: Regenerate.
10557
7c3270ae
UW
105582012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10559
10560 * hostio.c (handle_pread): If pread fails, fall back to attempting
10561 lseek/read.
10562 (handle_pwrite): Likewise for pwrite.
10563
b62e2b27
UW
105642012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10565
10566 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10567 between unsupported TYPE and unimplementable ADDR/LEN combination.
10568 (arm_insert_point): Act on new return value.
10569
78a99e91
PA
105702012-07-31 Pedro Alves <palves@redhat.com>
10571
10572 * server.c (process_point_options): Only skip tokens if we find
10573 one that is unrecognized. Don't treat 'X' specially while
10574 skipping unrecognized tokens.
10575
fcf303ab
UW
105762012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10577
10578 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10579 to 4-byte-align HW breakpoint addresses for Thumb.
10580
7255706c
YQ
105812012-07-27 Yao Qi <yao@codesourcery.com>
10582
10583 PR remote/14161.
10584
10585 * server.h: Declare gdb_agent_about_to_close.
10586 * target.c (kill_inferior): Include "agent.h".
10587 New. Send command 'kill'.
10588 * target.h (kill_inferior): Removed macro.
10589 * tracepoint.c (gdb_agent_about_to_close): New.
10590 (gdb_agent_helper_thread): Handle command 'close'.
10591 Wait endlessly until the inferior stops.
10592 Install gdb_agent_remove_socket to atexit hook.
10593 (agent_socket_name): New static variable.
10594 (gdb_agent_socket_init): Replace local variable 'name' with
10595 'agent_socket_name'.
10596 (gdb_agent_remove_socket): New.
10597
5a3f286f
YQ
105982012-07-27 Yao Qi <yao@codesourcery.com>
10599
10600 * server.c (process_point_options): Stop at 'X' when parsing.
10601
961bd387
ME
106022012-07-19 Michael Eager <eager@eagercon.com>
10603
a261b8f5 10604 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10605 to hw_execute.
10606 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10607 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10608 hardware breakpoint.
10609
aa7c7447
JK
106102012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10611
10612 * gdbserver/linux-low.c (initialize_low): Call
10613 linux_ptrace_init_warnings.
10614
7f216e7c
DE
106152012-07-02 Doug Evans <dje@google.com>
10616
10617 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10618 pointer to int.
10619
d3ce09f5
SS
106202012-07-02 Stan Shebs <stan@codesourcery.com>
10621
10622 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10623 (ax.o): Add it to build rule.
10624 (ax-ipa.o): Ditto.
10625 (OBS): Add format.o.
10626 (IPA_OBS): Add format.o.
10627 * server.c (handle_query): Claim support for breakpoint commands.
10628 (process_point_options): Add command case.
10629 (process_serial_event): Leave running if there are printfs in
10630 effect.
10631 * mem-break.h (any_persistent_commands): Declare.
10632 (add_breakpoint_commands): Declare.
10633 (gdb_no_commands_at_breakpoint): Declare.
10634 (run_breakpoint_commands): Declare.
10635 * mem-break.c (struct point_command_list): New struct.
10636 (struct breakpoint): New field command_list.
10637 (any_persistent_commands): New function.
10638 (add_commands_to_breakpoint): New function.
10639 (add_breakpoint_commands): New function.
10640 (gdb_no_commands_at_breakpoint): New function.
10641 (run_breakpoint_commands): New function.
10642 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10643 locally.
10644 * ax.c: Include format.h.
10645 (ax_printf): New function.
10646 (gdb_eval_agent_expr): Add printf opcode.
10647
2f8f6aed
YQ
106482012-06-13 Yao Qi <yao@codesourcery.com>
10649
10650 * server.c (start_inferior): Remove duplicated writes to fields
10651 'last_resume_kind' and 'last_status' of 'current_inferior'.
10652
0c9070b3
YQ
106532012-06-12 Yao Qi <yao@codesourcery.com>
10654 Pedro Alves <palves@redhat.com>
10655
10656 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10657 comment.
10658 * server.c (handle_v_cont): Extend comment.
10659
c52daf70
YQ
106602012-06-11 Yao Qi <yao@codesourcery.com>
10661
10662 * linux-low.c (linux_attach): Add 'static'.
10663
d38bbb0a
YQ
106642012-06-06 Yao Qi <yao@codesourcery.com>
10665
10666 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10667
89dc0afd
JK
106682012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10669
10670 Fix gcc -flto compilation warning.
10671 * server.c (main): Make variable multi_mode and attach volatile.
10672
75f62ce7
TJB
106732012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10674
10675 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10676 if the platform doesn't know about it.
10677
65f479b6
PA
106782012-05-30 Jeff Kenton <jkenton@tilera.com>
10679
10680 * Makefile.in (SFILES): Add linux-tile-low.c.
10681 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10682 * configure.srv: Handle tilegx-*-linux*.
10683 * linux-tile-low.c: New file.
10684
0c5bf5a9
JK
106852012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10686
10687 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10688
a493e3e2
PA
106892012-05-24 Pedro Alves <palves@redhat.com>
10690
10691 PR gdb/7205
10692
43aaf8b6 10693 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10694
2ea28649
PA
106952012-05-24 Pedro Alves <palves@redhat.com>
10696
10697 PR gdb/7205
10698
10699 Replace target_signal with gdb_signal throughout.
10700
8d409d16
MR
107012012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10702
10703 * linux-low.c (linux_store_registers): Avoid the copying sequence
10704 when no data has been retrieved by ptrace.
10705
23512c01
MGD
107062012-05-22 Will Deacon <will.deacon@arm.com>
10707
10708 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10709 Include asm/ptrace.h.
10710 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10711 already defined.
10712
4934b29e
MR
107132012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10714
10715 * linux-low.c (linux_store_registers): Don't re-retrieve data
10716 with ptrace that has already been obtained from /proc. Always
10717 copy any data retrieved with ptrace to the buffer supplied.
10718
bde24c0a
PA
107192012-05-11 Yao Qi <yao@codesourcery.com>
10720 Pedro Alves <palves@redhat.com>
10721
10722 * linux-low.c (enum stopping_threads_kind): New.
10723 (stopping_threads): Change type to `enum stopping_threads_kind'.
10724 (handle_extended_wait): If stopping and suspending threads, leave
10725 the new_lwp suspended too.
10726 (linux_wait_for_event): Adjust.
10727 (stop_all_lwps): Set `stopping_threads' to
10728 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10729 whether we're suspending threads or just stopping them. Assert no
10730 recursion happens.
10731
623b6bdf
YQ
107322012-04-29 Yao Qi <yao@codesourcery.com>
10733
10734 * server.h: Move some code to ...
10735 * gdbthread.h: ... here. New.
10736 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10737 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10738 (nto-low.o, win32-low.o): Likewise.
10739 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10740 * regcache.c, remote-utils.c, server.c: Likewise.
10741 * target.c, tracepoint.c, win32-low.c: Likewise.
10742
f15f9948
TJB
107432012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10744
10745 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10746 (PTRACE_ARG4_TYPE): Likewise.
10747 (PTRACE_XFER_TYPE): Likewise.
10748 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10749 ptrace to PTRACE_ARG3_TYPE.
10750 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10751 (PTRACE_ARG4_TYPE): Likewise.
10752 (PTRACE_XFER_TYPE): Likewise.
10753 (linux_detach_one_lwp): Cast fourth argument of
10754 ptrace to long then PTRACE_ARG4_TYPE.
10755 (regsets_fetch_inferior_registers): Cast third argument of
10756 ptrace to long then PTRACE_ARG3_TYPE.
10757 (regsets_store_inferior_registers): Likewise.
10758
38ea300a
PA
107592012-04-20 Pedro Alves <palves@redhat.com>
10760
10761 * configure: Regenerate.
10762
c971b7fa
PA
107632012-04-19 Pedro Alves <palves@redhat.com>
10764
43aaf8b6 10765 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10766 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10767 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10768 (all, install-only, uninstall, clean-info, all-lib, clean): No
10769 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10770 (maintainer-clean realclean distclean): Use subdir_do.
10771 (subdir_do): New.
10772 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10773 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10774 * acinclude.m4: Include acx_configure_dir.m4.
10775 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10776 calls. Call AC_PROG_RANLIB. Configure gnulib using
10777 ACX_CONFIGURE_DIR.
10778 (GNULIB): New.
10779 (GNULIB_STDINT_H): Adjust.
10780 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10781 * gdbreplay.c: Include build-gnulib/config.h.
10782 * server.h: Likewise.
10783 * aclocal.m4: Regenerate.
10784 * config.in: Regenerate.
10785 * configure: Regenerate.
c971b7fa 10786
809277f8
PA
107872012-04-19 Pedro Alves <palves@redhat.com>
10788
10789 * Makefile.in (LIBGNU, INCGNU): Adjust.
10790 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10791 (all, install-only, uninstall, clean-info, all-lib, clean)
10792 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10793 * configure.ac: Adjust AC_OUTPUT output.
10794 * aclocal.m4: Regenerate.
10795 * configure: Regenerate.
10796
fd9bb8b8
PA
107972012-04-19 Pedro Alves <palves@redhat.com>
10798
10799 * Makefile.in (generated_files): New.
10800 (server_h): Remove the explicit dependency on config.h, and depend
10801 on $generated_files.
10802
1c298c66
PA
108032012-04-19 Pedro Alves <palves@redhat.com>
10804
10805 * Makefile.in (INCGNU): Add -Ignulib.
10806
57c4b50b
PA
108072012-04-19 Pedro Alves <palves@redhat.com>
10808
10809 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10810 (INCGNU): ... this, and spell out -I here.
10811 (GNULIB_LIB): Rename to ...
10812 (LIBGNU): ... this.
10813 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10814
1030e047
PA
108152012-04-19 Pedro Alves <palves@redhat.com>
10816
10817 * config.in: Regenerate.
10818
447d4319
PA
108192012-04-19 Pedro Alves <palves@redhat.com>
10820
10821 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10822 * server.h (memmem): Remove declaration.
10823 * config.in: Regenerate.
10824 * configure: Regenerate.
10825
aad9eab9
YQ
108262012-04-19 Yao Qi <yao@codesourcery.com>
10827
10828 * Makefile.in (SFILES): Add common/vec.c.
10829 (OBS): Add vec.o.
10830 (vec.o): New rule.
10831
3e10640f
YQ
108322012-04-19 Yao Qi <yao@codesourcery.com>
10833
10834 * remote-utils.c (prepare_resume_reply): Replace with macro
10835 target_core_of_thread.
10836 * server.c (handle_qxfer_threads_proper): Likewise.
10837 * target.h (traget_core_of_thread): New macro.
10838
71622373
PA
108392012-04-18 Pedro Alves <palves@redhat.com>
10840
10841 * aclocal.m4: Regenerate.
10842 * configure: Regenerate.
10843
80d26939
YQ
108442012-04-16 Yao Qi <yao@codesourcery.com>
10845
10846 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10847 duplicated on address.
10848
42476b70
YQ
108492012-04-16 Yao Qi <yao@codesourcery.com>
10850
10851 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10852 (struct tracepoint_action_ops) <send>: New field.
10853 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10854 (agent_expr_send, x_tracepoint_action_send): New.
10855 (l_tracepoint_action_send): New.
10856 (cmd_qtdp): Download and install tracepoint
10857 according to `use_agent'.
10858 (run_inferior_command): Add one more parameter `len'.
10859 Update callers.
10860 (tracepoint_send_agent): New.
10861 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10862
7bc83639
YQ
108632012-04-16 Yao Qi <yao@codesourcery.com>
10864
10865 * tracepoint.c (download_tracepoints): Moved to ...
10866 (cmd_qtstart): ... here.
10867
5f18041e
YQ
108682012-04-14 Yao Qi <yao@codesourcery.com>
10869
10870 * tracepoint.c: Include inttypes.h.
10871 (struct collect_memory_action): Use sized types.
10872 (struct tracepoint): Likewise.
10873 (cmd_qtdp, stop_tracing): Update print specifiers.
10874 (cmd_qtp, response_tracepoint): Likewise.
10875 (collect_data_at_tracepoint): Likewise.
10876 (collect_data_at_step): Likewise.
10877
55a8c076
YQ
108782012-04-14 Yao Qi <yao@codesourcery.com>
10879
10880 Import gnulib module inttypes.
10881 * aclocal.m4, config.in, configure: Regenerated.
10882
dc750257
YQ
108832012-04-14 Yao Qi <yao@codesourcery.com>
10884
10885 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10886 Makefile and config.status at last.
10887
0ab5faf9
YQ
108882012-04-13 Yao Qi <yao@codesourcery.com>
10889
10890 * tracepoint.c: Include stdint.h unconditionally.
10891
18f5fd81
TJB
108922012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10893
10894 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10895 on BFD_HAVE_SYS_PROCFS_TYPE.
10896 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10897 * configure: Regenerate.
10898 * config.in: Likewise.
10899
4d47af5c
L
109002012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10901
10902 * Makefile.in (clean): Also remove x32.c x32-linux.c
10903 x32-avx.c x32-avx-linux.c.
10904 (x32.o): New target.
10905 (x32.c): Likewise.
10906 (x32-linux.o): Likewise.
10907 (x32-linux.c): Likewise.
10908 (x32-avx.o): Likewise.
10909 (x32-avx.c): Likewise.
10910 (x32-avx-linux.o): Likewise.
10911 (x32-avx-linux.c): Likewise.
10912
10913 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10914 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10915 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10916 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10917 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10918 i386/x32-avx-linux.xml.
10919
10920 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10921 (init_registers_x32_avx_linux): Likwise.
10922 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10923 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10924
ecedbe58
PA
109252012-04-13 Pedro Alves <palves@redhat.com>
10926
10927 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10928 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10929 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10930 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10931 the sub-make.
10932
c92b5177
L
109332012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10934
10935 * linux-x86-low.c (compat_x32_clock_t): New.
10936 (compat_x32_siginfo_t): Likewise.
10937 (compat_x32_siginfo_from_siginfo): Likewise.
10938 (siginfo_from_compat_x32_siginfo): Likewise.
10939 (linux_is_elf64): Likewise.
10940 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10941 and siginfo_from_compat_x32_siginfo for x32.
10942 (x86_arch_setup): Set linux_is_elf64.
10943
214d508e
L
109442012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10945
10946 PR gdb/13969
10947 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10948 e_machine field.
10949 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10950 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10951 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10952 compatible with process.
10953
c9a1864a
YQ
109542012-04-12 Yao Qi <yao@codesourcery.com>
10955
10956 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10957 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10958 (install-only, install-info, clean): Handle sub dir gnulib.
10959 (all-lib, am--refresh): New targets.
10960 (memmem.o): Remove target.
10961 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10962 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10963 (AC_REPLACE_FUNCS): Remove memmem.
10964 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10965 (AC_OUTPUT): Generate Makefile in gnulib/.
10966 * aclocal.m4, config.in, configure: Regenerated.
10967
367ba2c2
MR
109682012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10969
10970 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10971
9d236627
PA
109722012-04-05 Pedro Alves <palves@redhat.com>
10973
10974 -Werror=strict-aliasing
10975
10976 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10977 pointer.
10978
111217b3
PA
109792012-04-04 Pedro Alves <palves@redhat.com>
10980
10981 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10982 (sparc_store_gregset_from_stack, sparc_store_gregset)
10983 (sparc_breakpoint_at): Fix formatting.
10984
8365dcf5
TJB
109852012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10986
10987 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10988 are available.
10989 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10990 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10991 * config.in: Regenerate.
10992 * configure: Likewise.
10993
689cc2ae
PA
109942012-03-29 Pedro Alves <palves@redhat.com>
10995
10996 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10997 Correct ptrace arguments.
10998
c14dfd32
PA
109992012-03-28 Pedro Alves <palves@redhat.com>
11000
11001 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11002 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11003 (IA64_FR1_REGNUM): New defines.
11004 (ia64_fetch_register): New.
11005 (the_low_target): Install it.
11006 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11007 field.
11008 * linux-low.c (linux_fetch_registers): Try the
11009 the_low_target.fetch_register hook first.
11010
11011 * linux-arm-low.c (the_low_target): Adjust.
11012 * linux-bfin-low.c (the_low_target): Adjust.
11013 * linux-cris-low.c (the_low_target): Adjust.
11014 * linux-crisv32-low.c (the_low_target): Adjust.
11015 * linux-m32r-low.c (the_low_target): Adjust.
11016 * linux-m68k-low.c (the_low_target): Adjust.
11017 * linux-mips-low.c (the_low_target): Adjust.
11018 * linux-ppc-low.c (the_low_target): Adjust.
11019 * linux-s390-low.c (the_low_target): Adjust.
11020 * linux-sh-low.c (the_low_target): Adjust.
11021 * linux-sparc-low.c (the_low_target): Adjust.
11022 * linux-tic6x-low.c (the_low_target): Adjust.
11023 * linux-x86-low.c (the_low_target): Adjust.
11024 * linux-xtensa-low.c (the_low_target): Adjust.
11025
63c88e13
PA
110262012-03-26 Pedro Alves <palves@redhat.com>
11027
11028 * server.c (handle_qxfer_libraries): Don't bail early if
11029 the_target->qxfer_libraries_svr4 is not NULL.
11030
fb723180
PA
110312012-03-26 Pedro Alves <palves@redhat.com>
11032
11033 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11034
0afae3cf
PA
110352012-03-23 Pedro Alves <palves@redhat.com>
11036
11037 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11038 "library-list-svr4" element's start tag when the the DSO list is
11039 empty.
11040
485f1ee4
PA
110412012-03-23 Pedro Alves <palves@redhat.com>
11042
11043 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11044 a variable whose type size is the same as the inferior's pointer
11045 size.
11046
a5362b9a
TS
110472012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11048
11049 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11050 struct siginfo.
11051 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11052 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11053 * linux-low.h: Include <signal.h>.
11054 (struct siginfo): Remove forward declaration.
11055 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11056 struct siginfo.
11057
d226c142
MF
110582012-03-21 Mike Frysinger <vapier@gentoo.org>
11059
11060 * .gitignore: Ignore more files.
11061
122f36ef
PA
110622012-03-19 Pedro Alves <palves@redhat.com>
11063 Jan Kratochvil <jan.kratochvil@redhat.com>
11064
11065 * server.c (cont_thread, general_thread): Add describing comments.
11066 (start_inferior): Clear `cont_thread'.
11067 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11068 of a process.
11069
fc3e5175
YQ
110702012-03-15 Yao Qi <yao@codesourcery.com>
11071
11072 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11073 handling to ...
11074 (cmd_qtdp): ... here.
11075
8d0d92cd
YQ
110762012-03-15 Yao Qi <yao@codesourcery.com>
11077
11078 * tracepoint.c (struct tracepoint_action_ops): New.
11079 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11080 (m_tracepoint_action_download): New.
11081 (r_tracepoint_action_download): New.
11082 (x_tracepoint_action_download): New.
11083 (l_tracepoint_action_download): New.
11084 (add_tracepoint_action): Install `action->ops' according type.
11085 (download_tracepoint_1): Move code `download' function pointer
11086 of various tracepoint_action_ops.
11087
87b0bb13
JK
110882012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11089
11090 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11091 linux_ptrace_attach_warnings.
11092
5f572dec
JK
110932012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11094
11095 * Makefile.in (linux-ptrace.o): New.
11096 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11097 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11098 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11099 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11100 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11101 of these targets.
11102 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11103
f4647387
YQ
111042012-03-08 Yao Qi <yao@codesourcery.com>
11105 Pedro Alves <palves@redhat.com>
11106
11107 Fix PR server/13392.
11108 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11109 offset of JMP insn.
11110 * tracepoint.c (remove_tracepoint): New.
11111 (cmd_qtdp): Call remove_tracepoint when failed to install.
11112
9b224c5e
PA
111132012-03-07 Pedro Alves <palves@redhat.com>
11114
11115 * linux-low.c (get_detach_signal): New.
11116 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11117 Pass on pending signals to PTRACE_DETACH. Check the result of the
11118 ptrace call.
11119 * server.c (program_signals, program_signals_p): New.
11120 (handle_general_set): Handle QProgramSignals.
11121 * server.h (program_signals, program_signals_p): Declare.
11122
e237a7e2
JK
111232012-03-05 Pedro Alves <palves@redhat.com>
11124 Jan Kratochvil <jan.kratochvil@redhat.com>
11125
11126 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11127 New comment why.
11128
5808517f
YQ
111292012-03-03 Yao Qi <yao@codesourcery.com>
11130
11131 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11132 agent_look_up_symbols.
11133
58b4daa5
YQ
111342012-03-03 Yao Qi <yao@codesourcery.com>
11135
11136 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11137 (linux-x86-low.o): Likewise.
11138 * server.h: Remove in_process_agent_loaded.
11139 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11140 common/agent.c.
11141 Update callers.
11142
8ffcbaaf
YQ
111432012-03-03 Yao Qi <yao@codesourcery.com>
11144
11145 * tracepoint.c (gdb_agent_capability): New global.
11146 (in_process_agent_loaded_ust): Renamed to
11147 `in_process_agent_supports_ust'.
11148 Update callers.
11149 (in_process_agent_supports_ust): Call agent_capability_check.
11150 (clear_installed_tracepoints): Assert that agent supports
11151 agent.
11152
d1feda86
YQ
111532012-03-03 Yao Qi <yao@codesourcery.com>
11154
11155 * linux-low.c (linux_supports_agent): New.
11156 (linux_target_ops): Initialize field `supports_agent' with
11157 linux_supports_agent.
11158 * target.h (struct target_ops) <supports_agent>: New.
11159 (target_supports_agent): New macro.
11160 * server.c (handle_general_set): Handle packet 'QAgent'.
11161 (handle_query): Send `QAgent+'.
11162 * Makefile.in (server.o): Depends on agent.h.
11163
2fa291ac
YQ
111642012-03-03 Yao Qi <yao@codesourcery.com>
11165
11166 * Makefile.in (OBS): Add agent.o.
11167 Add new rule for agent.o.
11168 Track dependence of tracepoint.c on agent.h.
11169 * tracepoint.c (run_inferior_command_1):
11170 (run_inferior_command): Call agent_run_command.
11171 (gdb_ust_connect_sync_socket): Deleted. Move it to
11172 common/agent.c.
11173 (resume_thread, stop_thread): Likewise.
11174 (gdb_ust_socket_init): Renamed to ...
11175 (gdb_agent_socket_init): ... New.
11176 (gdb_ust_thread): Renamed to ...
11177 (gdb_agent_helper_thread): ... New.
11178 (gdb_ust_init): Move some code to ...
11179 (gdb_agent_init): ... here. New.
11180 [HAVE_UST]: Call gdb_ust_init.
11181 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11182 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11183 * config.in, configure: Regenerated.
11184
05044653
PA
111852012-03-02 Pedro Alves <palves@redhat.com>
11186
11187 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11188 * linux-low.c (struct simple_pid_list): New.
11189 (stopped_pids): New a struct simple_pid_list pointer.
11190 (add_to_pid_list, pull_pid_from_list): New.
11191 (handle_extended_wait): Don't assume the first signal new children
11192 report is SIGSTOP. Adjust call to pull_pid_from_list.
11193 (linux_wait_for_lwp): Adjust.
11194
8d00225b
YQ
111952012-03-02 Yao Qi <yao@codesourcery.com>
11196
11197 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11198 debug log.
11199
19560ba5
YQ
112002012-03-02 Yao Qi <yao@codesourcery.com>
11201
11202 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11203 `stop_pc' and `tpoint'. Update caller.
11204
1faeff08
MR
112052012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11206
11207 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11208 * linux-low.c (use_linux_regsets): New macro.
11209 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11210 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11211 (linux_register_in_regsets): New function.
11212 (usr_fetch_inferior_registers): Skip registers covered by
11213 regsets.
11214 (usr_store_inferior_registers): Likewise.
11215 (usr_fetch_inferior_registers): New macro.
11216 (usr_store_inferior_registers): Likewise.
11217 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11218 (linux_store_registers): Likewise.
11219 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11220 prototype.
11221 (init_registers_mips64_dsp_linux): Likewise.
11222 (init_registers_mips_linux): New macro.
11223 (init_registers_mips_dsp_linux): Likewise.
11224 (mips_dsp_num_regs): Likewise.
11225 (DSP_BASE, DSP_CONTROL): New fallback macros.
11226 (mips_base_regs): New macro.
11227 (mips_regmap): Use it. Fix the size.
11228 (mips_dsp_regmap): New variable.
11229 (mips_dsp_regset_bitmap): Likewise.
11230 (mips_arch_setup): New function.
11231 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11232 than mips_regmap.
11233 (mips_cannot_store_register): Likewise.
11234 (the_low_target): Update .arch_setup, .num_regs and .regmap
11235 initializers. Add .regset_bitmap initializer.
11236 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11237 initializer.
11238 * linux-bfin-low.c (the_low_target): Likewise.
11239 * linux-cris-low.c (the_low_target): Likewise.
11240 * linux-crisv32-low.c (the_low_target): Likewise.
11241 * linux-ia64-low.c (the_low_target): Likewise.
11242 * linux-m32r-low.c (the_low_target): Likewise.
11243 * linux-m68k-low.c (the_low_target): Likewise.
11244 * linux-ppc-low.c (the_low_target): Likewise.
11245 * linux-s390-low.c (the_low_target): Likewise.
11246 * linux-sh-low.c (the_low_target): Likewise.
11247 * linux-sparc-low.c (the_low_target): Likewise.
11248 * linux-tic6x-low.c (the_low_target): Likewise.
11249 * linux-x86-low.c (the_low_target): Likewise.
11250 * linux-xtensa-low.c (the_low_target): Likewise.
11251 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11252 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11253 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11254 srv_xmlfiles.
11255 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11256 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11257
c03e6ccc
YQ
112582012-02-29 Yao Qi <yao@codesourcery.com>
11259 Pedro Alves <palves@redhat.com>
11260
11261 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11262 `step_over_finished' is true.
11263
644cebc9
PA
112642012-02-27 Pedro Alves <palves@redhat.com>
11265
11266 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11267 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11268
c14d7ab2
PA
112692012-02-27 Pedro Alves <palves@redhat.com>
11270
11271 PR server/9684
11272 * linux-low.c (pid_is_stopped): New.
11273 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11274
412c89dd
LM
112752012-02-25 Luis Machado <lgustavo@codesourcery.com>
11276
11277 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11278 of conditions.
11279
b745defe
MR
112802012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11281
11282 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11283
9f3a5c85
LM
112842012-02-24 Luis Machado <lgustavo@codesourcery>
11285
11286 * server.c (handle_query): Advertise support for target-side
11287 breakpoint condition evaluation.
11288 (process_point_options): New function.
11289 (process_serial_event): When inserting a breakpoint, check for
11290 a target-side condition that should be evaluated.
11291
11292 * mem-break.c: Include regcache.h and ax.h.
11293 (point_cond_list_t): New data structure.
11294 (breakpoint) <cond_list>: New field.
11295 (find_gdb_breakpoint_at): Make non-static.
11296 (delete_gdb_breakpoint_at): Clear any target-side
11297 conditions.
11298 (clear_gdb_breakpoint_conditions): New function.
11299 (add_condition_to_breakpoint): Likewise.
11300 (add_breakpoint_condition): Likewise.
11301 (gdb_condition_true_at_breakpoint): Likewise.
11302 (gdb_breakpoint_here): Return result directly instead
11303 of going through a local variable.
11304
11305 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11306 (clear_gdb_breakpoint_conditions): Likewise.
11307 (add_breakpoint_condition): Likewise.
11308 (gdb_condition_true_at_breakpoint): Likewise.
11309
11310 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11311 (need_step_over_p): Take target-side breakpoint condition into
11312 consideration.
11313
5e1dc496
LM
113142012-02-24 Luis Machado <lgustavo@codesourcery>
11315
11316 * server.h: Include tracepoint.h.
11317 (agent_mem_read, agent_get_trace_state_variable_value,
11318 agent_set_trace_state_variable_value,
11319 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11320 get_set_tsv_func_addr): New prototypes.
11321
11322 * ax.h: New include file.
11323 * ax.c: New source file.
11324
11325 * tracepoint.c: Include ax.h.
11326 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11327 agent_expr, eval_result_type): Move to ax.h.
11328 (parse_agent_expr): Rename to ...
11329 (gdb_parse_agent_expr): ... this, make it non-static and move
11330 to ax.h.
11331 (unparse_agent_expr) Rename to ...
11332 (gdb_unparse_agent_expr): ... this, make it non-static and move
11333 to ax.h.
11334 (eval_agent_expr): Rename to ...
11335 (eval_tracepoint_agent_expr): ... this.
11336 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11337 forward declarations.
11338 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11339 (agent_get_trace_state_variable_value): New function.
11340 (agent_set_trace_state_variable_value): New function.
11341 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11342 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11343 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11344 (condition_true_at_tracepoint): Likewise.
11345 (parse_agent_expr): Rename to ...
11346 (gdb_parse_agent_expr): ... this and move to ax.c.
11347 (unparse_agent_expr): Rename to ...
11348 (gdb_unparse_agent_expr): ... this and move to ax.c.
11349 (gdb_agent_op_name): Move to ax.c.
11350 (eval_agent_expr): Rename to ...
11351 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11352 and move to ax.c.
11353 (eval_tracepoint_agent_expr): New function.
11354 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11355 non-static.
5e1dc496
LM
11356 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11357 ax.c.
11358 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11359 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11360 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11361 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11362 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11363 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11364 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11365 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11366 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11367 (compile_bytecodes): Remove forward declaration.
11368 (is_goto_target): Move to ax.c.
11369 (compile_bytecodes): Move to ax.c and call
11370 agent_get_trace_state_variable_value (...) and
11371 agent_set_trace_state_variable_value (...).
11372
11373 * Makefile.in: Update ax.c and IPA dependencies.
11374
277e4e52
PA
113752012-02-24 Pedro Alves <palves@redhat.com>
11376
11377 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11378 (cmd_bigqtbuffer_circular): ... this. Only handle
11379 'QTBuffer:circular:'.
11380 (handle_tracepoint_general_set): Adjust.
11381
bf4c19f7
YQ
113822012-02-16 Yao Qi <yao@codesourcery.com>
11383
11384 * inferiors.c: Move code to ...
11385 * dll.c: .... here. New.
11386 * server.h: Declare clear_dlls.
11387 * Makefile.in (SFILES): Add dll.c.
11388 (OBS): Add dll.o
11389 (dll.o): New rule.
11390
d73f2619
YQ
113912012-02-11 Yao Qi <yao@codesourcery.com>
11392
11393 * server.c: (handle_monitor_command): Add a new parameter
11394 `own_buf'.
11395 (handle_query): Update caller.
11396
f8255c2a
JB
113972012-02-09 Joel Brobecker <brobecker@adacore.com>
11398
11399 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11400 * configure, config.in: Regenerate.
11401 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11402 is not defined.
11403
da84f473
PA
114042012-02-02 Pedro Alves <palves@redhat.com>
11405
11406 Try SIGKILL first, then PTRACE_KILL.
11407 * linux-low.c (linux_kill_one_lwp): New.
11408 (linux_kill_one_lwp): Rename to ...
11409 (kill_one_lwp_callback): ... this. Use the new
11410 linux_kill_one_lwp.
11411
e886a173
PA
114122012-02-02 Pedro Alves <palves@redhat.com>
11413
11414 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11415 inferior.
11416
be07f1a2
PA
114172012-01-27 Pedro Alves <palves@redhat.com>
11418
11419 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11420 (elf_64_file_p): Make static.
11421 (linux_pid_exe_is_elf_64_file): New.
11422 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11423 Delete declarations.
11424 (linux_pid_exe_is_elf_64_file): Declare.
11425 * linux-x86-low.c (x86_arch_setup): Use
11426 linux_pid_exe_is_elf_64_file.
11427
d8301ad1
JK
114282012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11429
11430 * linux-low.c (linux_wait_for_event_1): Rename to ...
11431 (linux_wait_for_event): ... here and merge it with former
11432 linux_wait_for_event - new variable wait_ptid, use it.
11433 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11434
01b17894
PA
114352012-01-23 Pedro Alves <palves@redhat.com>
11436
11437 * server.c (main): Avoid yet another case of infinite loop while
11438 detaching/killing after a longjmp.
11439
e825046f
JK
114402012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11441
11442 Code cleanup.
11443 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11444
b9e7b9c3
UW
114452012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11446
11447 * hostio.c (handle_readlink): New function.
11448 (handle_vFile): Call it to handle "vFile:readlink" packets.
11449
901f9912
UW
114502012-01-20 Pedro Alves <palves@redhat.com>
11451 Ulrich Weigand <ulrich.weigand@linaro.org>
11452
11453 * server.c (handle_v_requests): Only support vAttach and vRun to
11454 start multiple processes when in extended protocol mode.
11455
fc1ab1a0
PA
114562012-01-17 Pedro Alves <palves@redhat.com>
11457
11458 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11459 memalign plus mprotect to allocate the scratch buffer.
11460
7d5d4e98
PA
114612012-01-13 Pedro Alves <palves@redhat.com>
11462
11463 * server.c (attach_inferior): Clear `cont_thread'.
11464
f128d5e9
PA
114652012-01-13 Pedro Alves <palves@redhat.com>
11466
11467 * server.c (main): Avoid infinite loop while detaching/killing
11468 after a longjmp.
11469
06db92f0
DE
114702012-01-09 Doug Evans <dje@google.com>
11471
11472 * server.c (start_inferior): Set last_ptid in --wrapper case.
11473
32d92999
YQ
114742012-01-06 Yao Qi <yao@codesourcery.com>
11475
11476 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11477 defined.
11478 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11479
5e0a92a9
YQ
114802012-01-04 Yao Qi <yao@codesourcery.com>
11481
11482 * tracepoint.c (cmd_qtdp): Print debug message
11483 for static tracepoint.
11484
ae639e8c
YQ
114852012-01-04 Yao Qi <yao@codesourcery.com>
11486
11487 * tracepoint.c (trace_vdebug): Differentiate debug message
11488 between gdbserver and IPA.
11489
f72429c5
YQ
114902012-01-03 Yao Qi <yao@codesourcery.com>
11491
11492 * tracepoint.c (tracepoint_was_hit): Don't collect for
11493 static tracepoint.
11494
12c3e59c
JB
114952012-01-02 Joel Brobecker <brobecker@adacore.com>
11496
11497 * terminal.h: Reformat copyright header.
11498
67827812
JB
114992012-01-02 Joel Brobecker <brobecker@adacore.com>
11500
11501 * server.c (gdbserver_version): Update copyright year.
11502 * gdbreplay.c (gdbreplay_version): Likewise.
11503
3e52c33d
JK
115042011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11505
11506 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11507
11508 Revert:
11509 2011-12-18 Hui Zhu <teawater@gmail.com>
11510 * linux-low.c (linux_create_inferior): Save return value to ret.
11511
66f1260e
HZ
115122011-12-18 Hui Zhu <teawater@gmail.com>
11513
11514 * linux-low.c (linux_create_inferior): Save return value to ret.
11515
e77616d7
DE
115162011-12-16 Doug Evans <dje@google.com>
11517
e7b06c57
DE
11518 * linux-low.c (linux_create_inferior): If stdio connection,
11519 redirect stdin from /dev/null, stdout to stderr.
11520 * remote-utils.c (remote_is_stdio): New static global.
11521 (remote_connection_is_stdio): New function.
11522 (remote_prepare): Handle stdio connection.
11523 (remote_open): Ditto.
11524 (remote_close): Don't close stdin for stdio connections.
11525 (read_prim,write_prim): New functions. Replace all calls to
11526 read/write to these.
11527 * server.c (main): Watch for "-" argument. Move call to
11528 remote_prepare before start_inferior.
11529 * server.h (STDIO_CONNECTION_NAME): New macro.
11530 (remote_connection_is_stdio): Declare.
11531
e77616d7
DE
11532 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11533 in debugging output.
11534
82067193
YQ
115352011-12-15 Yao Qi <yao@codesourcery.com>
11536
11537 * tracepoint.c: Include sys/syscall.h.
11538 (gdb_ust_thread): Remove preprocessor conditional.
11539
82bfbe7e
PA
115402011-12-14 Pedro Alves <pedro@codesourcery.com>
11541
11542 * linux-low.c (linux_detach_one_lwp): Call
11543 the_low_target.prepare_to_resume before detaching.
11544
712c6575
YQ
115452011-12-14 Yao Qi <yao@codesourcery.com>
11546
11547 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11548 of write.
11549
d54d1edf
YQ
115502011-12-14 Yao Qi <yao@codesourcery.com>
11551
11552 * i386-low.c (i386_low_stopped_data_address): Initialize local
11553 variable `control'.
11554
6210a125
PA
115552011-12-13 Pedro Alves <pedro@codesourcery.com>
11556
11557 PR remote/13492
11558
11559 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11560 DR_CONTROL unless necessary. Extend comments.
11561 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11562 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11563
2ece8244
YQ
115642011-12-13 Yao Qi <yao@codesourcery.com>
11565
11566 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11567 macros.
11568 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11569
784867a5
JK
115702011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11571
11572 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11573 Print new debug message for such case.
11574
6bf36717
JK
115752011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11576
11577 Fix overlapping memcpy.
11578 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11579 the read_inferior_memory transfer.
11580 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11581 write_inferior_memory transfer.
11582 (set_fast_tracepoint_jump): New variable buf. Use it for the
11583 read_inferior_memory and write_inferior_memory transfers.
11584 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11585 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11586 Use it for the write_inferior_memory transfer.
11587 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11588 buffers.
11589
50275556
MR
115902011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11591
11592 * linux-low.c (fetch_register, store_register): Make code
11593 consistent, fix formatting.
11594
7325beb4
MR
115952011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11596
11597 * linux-low.c (usr_store_inferior_registers): Factor out code
11598 to handle individual registers into...
11599 (store_register): ... this new function.
11600
c642a434
UW
116012011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11602
11603 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11604 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11605 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11606 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11607 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11608 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11609 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11610 (srv_xmlfiles): Add new XML files.
11611
11612 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11613 and <sys/uio.h>.
11614 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11615 (init_registers_s390_linux32v1): Add prototype.
11616 (init_registers_s390_linux32v2): Likewise.
11617 (init_registers_s390_linux64v1): Likewise.
11618 (init_registers_s390_linux64v2): Likewise.
11619 (init_registers_s390x_linux64v1): Likewise.
11620 (init_registers_s390x_linux64v2): Likewise.
11621 (s390_num_regs): Increment to 52.
11622 (s390_regmap): Add orig_r2 register.
11623 (s390_num_regs_3264): Increment to 68.
11624 (s390_regmap_3264): Add orig_r2 register.
11625 (s390_collect_ptrace_register): Handle orig_r2 register.
11626 (s390_supply_ptrace_register): Likewise.
11627 (s390_fill_last_break): New function.
11628 (s390_store_last_break): Likewise.
11629 (s390_fill_system_call): New function.
11630 (s390_store_system_call): Likewise.
11631 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11632 register sets.
11633 (s390_check_regset): New function.
11634 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11635 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11636 Update target_regsets for available register sets.
11637
2268b414
JK
116382011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11639 Jan Kratochvil <jan.kratochvil@redhat.com>
11640
11641 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11642 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11643 New.
11644 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11645 * linux-low.h (struct process_info_private): New member r_debug.
11646 * server.c (handle_qxfer_libraries): Call
11647 the_target->qxfer_libraries_svr4.
11648 (handle_qxfer_libraries_svr4): New function.
11649 (qxfer_packets): New entry "libraries-svr4".
11650 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11651 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11652 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11653 PACKET_qXfer_libraries_svr4.
11654
d6db1fab
UW
116552011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11656
11657 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11658 PSW address/mask between 8-byte and 16-byte formats.
11659 (s390_supply_ptrace_register): Likewise.
11660 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11661 basic addressing mode bit.
11662
242f5f1c
SS
116632011-11-24 Stan Shebs <stan@codesourcery.com>
11664
11665 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11666
f196051f
SS
116672011-11-17 Stan Shebs <stan@codesourcery.com>
11668
11669 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11670 (tracing_start_time): New global.
11671 (tracing_stop_time): New global.
11672 (tracing_user_name): New global.
11673 (tracing_notes): New global.
11674 (tracing_stop_note): New global.
11675 (cmd_qtstart): Set traceframe_usage, start_time.
11676 (stop_tracing): Set stop_time.
11677 (cmd_qtstatus): Report additional status.
11678 (cmd_qtp): New function.
11679 (handle_tracepoint_query): Call it.
11680 (cmd_qtnotes): New function.
11681 (handle_tracepoint_general_set): Call it.
11682 (get_timestamp): Rename from tsv_get_timestamp.
11683
405f8e94
SS
116842011-11-14 Stan Shebs <stan@codesourcery.com>
11685 Kwok Cheung Yeung <kcy@codesourcery.com>
11686
11687 * linux-x86-low.c (small_jump_insn): New.
11688 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11689 trampoline and error message, build a trampoline and issue a small
11690 jump instruction to it.
11691 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11692 trampoline and error message.
11693 (x86_get_min_fast_tracepoint_insn_len): New.
11694 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11695 * linux-low.h (struct linux_target_ops): Add arguments to
11696 install_fast_tracepoint_jump_pad operation, add new operation.
11697 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11698 arguments.
11699 (linux_get_min_fast_tracepoint_insn_len): New function.
11700 (linux_target_op): Add new operation.
11701 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11702 (gdb_trampoline_buffer_end): Ditto.
11703 (gdb_trampoline_buffer_error): Ditto.
11704 (struct ipa_sym_addresses): Add fields for new IPA variables.
11705 (symbol_list): Add entries for new IPA variables.
11706 (struct tracepoint): Add fields to hold the address range of the
11707 trampoline used by the tracepoint.
11708 (trampoline_buffer_head): New static variable.
11709 (trampoline_buffer_tail): Ditto.
11710 (claim_trampoline_space): New function.
11711 (have_fast_tracepoint_trampoline_buffer): New function.
11712 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11713 structure.
11714 (install_fast_tracepoint): Ditto, also add error buffer argument.
11715 (cmd_qtminftpilen): New function.
11716 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11717 (fast_tracepoint_from_trampoline_address): New function.
11718 (fast_tracepoint_collecting): Handle trampoline as part of jump
11719 pad space.
11720 (set_trampoline_buffer_space): New function.
11721 (initialize_tracepoint): Initialize new IPA variables.
11722 * target.h (struct target_ops): Add arguments to
11723 install_fast_tracepoint_jump_pad operation, add new
11724 get_min_fast_tracepoint_insn_len operation.
11725 (target_get_min_fast_tracepoint_insn_len): New.
11726 (install_fast_tracepoint_jump_pad): Add arguments.
11727 * server.h (IPA_BUFSIZ): Define.
11728 * linux-i386-ipa.c: Include extra header files.
11729 (initialize_fast_tracepoint_trampoline_buffer): New function.
11730 (initialize_low_tracepoint): Call it.
11731 * server.h (set_trampoline_buffer_space): Declare.
11732 (claim_trampoline_space): Ditto.
11733 (have_fast_tracepoint_trampoline_buffer): Ditto.
11734
1e4d1764
YQ
117352011-11-14 Yao Qi <yao@codesourcery.com>
11736
11737 * server.c (handle_query): Handle InstallInTrace for qSupported.
11738 * tracepoint.c (add_tracepoint): Sort list.
11739 (install_tracepoint, download_tracepoint): New.
11740 (cmd_qtdp): Call them to install and download tracepoints.
11741 (sort_tracepoints): Removed.
11742 (cmd_qtstart): Update.
11743
5c73ff4e
YQ
117442011-11-14 Yao Qi <yao@codesourcery.com>
11745
11746 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11747 * mem-break.h: Declare.
11748 * tracepoint.c (cmd_qtstart): Move some code to ...
11749 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11750 New.
11751 (download_tracepoints): Move some code to ...
11752 (download_tracepoint_1): ... here. New.
11753
86a30030
YQ
117542011-11-08 Yao Qi <yao@codesourcery.com>
11755
11756 * remote-utils.c (relocate_instruction): A comment fix.
11757
8d26e50c
JB
117582011-11-07 Joel Brobecker <brobecker@adacore.com>
11759
11760 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11761 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11762 dr_status_mirror and dr_control_mirror from debug_reg_state.
11763 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11764 (i386_initial_stuff): Remove use of deleted globals.
11765 (i386_get_thread_context, i386_set_thread_context,
11766 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11767 from debug_reg_state.
11768
a59306a3
YQ
117692011-11-05 Yao Qi <yao@codesourcery.com>
11770
11771 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11772 address as TPOINT's.
11773
3065dfb6
SS
117742011-11-02 Stan Shebs <stan@codesourcery.com>
11775
11776 * tracepoint.c (agent_mem_read_string): New function.
11777 (eval_agent_expr): Call it for tracenz.
11778 * server.c (handle_query): Report support for tracenz.
11779
fd0d8c7c
YQ
117802011-11-02 Yao Qi <yao@codesourcery.com>
11781
11782 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11783
609086b1
YQ
117842011-11-02 Yao Qi <yao@codesourcery.com>
11785
11786 * target.h: Fix a typo in comment.
11787
b9fd1791
PA
117882011-10-31 Pedro Alves <pedro@codesourcery.com>
11789
11790 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11791 clobber the breakpoints' shadows with fast tracepoint jumps.
11792 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11793 * target.c (write_inferior_memory): Also pass MYADDR down to
11794 check_mem_write.
11795
03583c20
UW
117962011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11797
11798 * configure.ac: Check support for personality routine.
11799 * configure: Regenerate.
11800 * config.in: Likewise.
11801 * linux-low.c: Include <sys/personality.h>.
11802 Define ADDR_NO_RANDOMIZE if necessary.
11803 (linux_create_inferior): Disable address space randomization when
11804 forking inferior, if requested.
11805 (linux_supports_disable_randomization): New function.
11806 (linux_target_ops): Install it.
11807 * server.h (disable_randomization): Declare.
11808 * server.c (disable_randomization): New global variable.
11809 (handle_general_set): Handle QDisableRandomization.
11810 (handle_query): Likewise for qSupported.
11811 (main): Support --disable-randomization and --no-disable-randomization
11812 command line arguments.
11813 * target.h (struct target_ops): Add supports_disable_randomization.
11814 (target_supports_disable_randomization): New macro.
11815
723b724b
MF
118162011-09-29 Mike Frysinger <vapier@gentoo.org>
11817
11818 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11819 ifdef check.
11820 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11821 [!PT_GETDSBT] (target_loadmap): New definition.
11822 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11823 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11824 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11825 and PT_GETDSBT to LINUX_LOADMAP.
11826 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11827 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11828
55329a5c 118292011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11830
11831 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11832 (arm_linux_hwbp_cap): New static variable.
11833 (arm_linux_get_hwbp_cap): Replace by ...
11834 (arm_linux_init_hwbp_cap): ... this new function.
11835 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11836 (arm_linux_get_hw_watchpoint_count): Likewise.
11837 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11838 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11839 (arm_prepare_to_resume): Use perror_with_name instead of error.
11840
55329a5c 118412011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11842
11843 * linux-arm-low.c: Include <signal.h>.
11844 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11845 (struct arm_linux_hwbp_cap): New data type.
11846 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11847 (struct arm_linux_hw_breakpoint): New data type.
11848 (MAX_BPTS, MAX_WPTS): Define.
11849 (struct arch_process_info, struct arch_lwp_info): New data types.
11850 (arm_linux_get_hwbp_cap): New function.
11851 (arm_linux_get_hw_breakpoint_count): Likewise.
11852 (arm_linux_get_hw_watchpoint_count): Likewise.
11853 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11854 (arm_hwbp_control_initialize): Likewise.
11855 (arm_hwbp_control_is_enabled): Likewise.
11856 (arm_hwbp_control_is_initialized): Likewise.
11857 (arm_hwbp_control_disable): Likewise.
11858 (arm_linux_hw_breakpoint_equal): Likewise.
11859 (arm_linux_hw_point_initialize): Likewise.
11860 (struct update_registers_data): New data structure.
11861 (update_registers_callback: New function.
11862 (arm_insert_point): Likewise.
11863 (arm_remove_point): Likewise.
11864 (arm_stopped_by_watchpoint): Likewise.
11865 (arm_stopped_data_address): Likewise.
11866 (arm_new_process): Likewise.
11867 (arm_new_thread): Likewise.
11868 (arm_prepare_to_resume): Likewise.
11869 (the_low_target): Register arm_insert_point, arm_remove_point,
11870 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11871 arm_new_thread, and arm_prepare_to_resume.
11872
6b9801d4
SS
118732011-09-15 Stan Shebs <stan@codesourcery.com>
11874
11875 * server.h (struct emit_ops): Add compare-goto fields.
11876 * tracepoint.c (gdb_agent_op_sizes): New table.
11877 (emit_eq_goto): New function.
11878 (emit_ne_goto): New function.
11879 (emit_lt_goto): New function.
11880 (emit_le_goto): New function.
11881 (emit_gt_goto): New function.
11882 (emit_ge_goto): New function.
11883 (is_goto_target): New function.
11884 (compile_bytecodes): Recognize special cases of compare-goto
11885 combinations and call specialized emitters for them.
11886 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11887 (amd64_emit_ne_goto): New function.
11888 (amd64_emit_lt_goto): New function.
11889 (amd64_emit_le_goto): New function.
11890 (amd64_emit_gt_goto): New function.
11891 (amd64_emit_ge_goto): New function.
11892 (amd64_emit_ops): Add the new functions.
11893 (i386_emit_eq_goto): New function.
11894 (i386_emit_ne_goto): New function.
11895 (i386_emit_lt_goto): New function.
11896 (i386_emit_le_goto): New function.
11897 (i386_emit_gt_goto): New function.
11898 (i386_emit_ge_goto): New function.
11899 (i386_emit_ops): Add the new functions.
11900
bf15cbda
SS
119012011-09-08 Stan Shebs <stan@codesourcery.com>
11902
11903 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11904 (i386_emit_epilogue): Restore %ebx.
11905
943ca1dd
JZ
119062011-08-31 Jie Zhang <jzhang918@gmail.com>
11907
11908 * server.c (step_thread): Remove definition.
11909 (process_serial_event): Don't handle Hs.
11910 * server.h (step_thread): Remove declaration.
11911 * target.c (set_desired_inferior): Remove use of step_thread.
11912
e3deef73
LM
119132011-08-24 Luis Machado <lgustavo@codesourcery.com>
11914
11915 * linux-low.c: Include linux-procfs.h.
11916 (linux_attach_lwp_1): Update comments.
11917 (linux_attach): Scan for existing threads when attaching to a
11918 process that is the tgid.
11919 * Makefile.in: Update dependencies.
11920
13da1c97
LM
119212011-08-24 Luis Machado <lgustavo@codesourcery.com>
11922
11923 * configure.srv: Add linux-procfs.o dependencies.
11924
881127c9
YQ
119252011-08-14 Yao Qi <yao@codesourcery.com>
11926
11927 * target.h (struct target_ops): Fix indent.
11928 * win32-low.c (win32_target_ops): Fix comment.
11929
58dbd541
YQ
119302011-08-14 Andrew Jenner <andrew@codesourcery.com>
11931 Yao Qi <yao@codesourcery.com>
11932
11933 * Makefile.in (clean): Remove tic6x-*.c files.
11934 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11935 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11936 (tic6x-c64xp-linux.c): Likewise.
11937 * configure.srv: Add support for tic6x-*-uclinux.
11938 * linux-tic6x-low.c: New.
11939 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11940
78d85199
YQ
119412011-08-14 Andrew Stubbs <ams@codesourcery.com>
11942 Yao Qi <yao@codesourcery.com>
11943
11944 * target.h (struct target_ops): Add read_loadmap.
11945 * linux-low.c (struct target_loadseg): New type.
11946 (struct target_loadmap): New type.
11947 (linux_read_loadmap): New function.
11948 (linux_target_ops): Add linux_read_loadmap.
11949 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11950 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11951 to NULL.
78d85199 11952
a959a88d
EZ
119532011-08-05 Eli Zaretskii <eliz@gnu.org>
11954
11955 * win32-low.c: Include <stdint.h>.
11956
1ced966e
PA
119572011-07-22 Pedro Alves <pedro@codesourcery.com>
11958
11959 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11960 to the inferior here.
11961 (i386_remove_aligned_watchpoint): Ditto.
11962 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11963 fit part of the watchpoint in the debug registers.
11964 (i386_update_inferior_debug_regs): New.
11965 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11966 registers, and only update the inferior on success.
11967 (i386_low_remove_watchpoint): Ditto.
11968
d26e3629
KY
119692011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11970
11971 * linux-low.c (compare_ints, unique, list_threads, show_process,
11972 linux_core_of_thread): Delete.
11973 (linux_target_ops): Change linux_core_of_thread to
11974 linux_common_core_of_thread.
11975 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11976 * utils.c (malloc_failure): Change type of argument.
11977 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11978 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11979 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11980 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11981 (IPA_OBJS): Add common-utils-ipa.o.
11982 (ptid_h, linux_osdata_h): New macros.
11983 (server_h): Add common/common-utils.h, common/xml-utils.h,
11984 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11985 common/ptid.h.
11986 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11987 ptid.o, buffer.o): New rules.
11988 (linux-low.o): Add common/linux-osdata.h as a dependency.
11989 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11990 * configure.ac: Add AC_HEADER_DIRENT check.
11991 * config.in: Regenerate.
11992 * configure: Regenerate.
11993 * remote-utils.c (xml_escape_text): Delete.
11994 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11995 buffer_xml_printf): Move to common/buffer.c.
11996 * server.c (main): Remove call to initialize_inferiors.
11997 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11998 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11999 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12000 internal_error, gdb_assert, gdb_assert_fail): Delete.
12001 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12002 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12003 common/buffer.h.
12004 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12005 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12006 initialize_inferiors): Delete.
12007
2275a1a7
PA
120082011-07-20 Pedro Alves <pedro@codesourcery.com>
12009
12010 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12011 symbol error.
12012
0a5b1e09
PA
120132011-05-31 Pedro Alves <pedro@codesourcery.com>
12014
12015 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12016 assertion.
12017 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12018
6938fd34
YQ
120192011-05-26 Yao Qi <yao@codesourcery.com>
12020
12021 * Makefile.in (thread-db.o): Track dependence to
12022 common/gdb_thread_db.h.
12023 * thread-db.c: include gdb_thread_db.h from right place.
12024
b481f9e0
TT
120252011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12026
12027 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12028 __FILE__ and __LINE__ to internal_error.
12029
98a5dd13
DE
120302011-05-13 Doug Evans <dje@google.com>
12031
12032 * thread-db.c (try_thread_db_load_from_sdir): New function.
12033 (try_thread_db_load_from_dir): New function.
12034 (thread_db_load_search): Handle $sdir, ignore $pdir.
12035 Remove trying of system directories if search of
12036 libthread-db-search-path fails, that is now done via $sdir.
12037
d248b706
KY
120382011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12039
12040 * server.c (handle_query): Add EnableDisableTracepoints to the list
12041 of supported features.
43aaf8b6 12042 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12043 tracepoints.
43aaf8b6
PA
12044 (cmd_qtenable_disable): New.
12045 (cmd_qtstart): Install tracepoints even if disabled.
12046 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12047 receiving a QTEnable or QTDisable packet.
12048 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12049 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12050 tracepoints.
12051 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12052
84e578fb
DE
120532011-05-10 Doug Evans <dje@google.com>
12054
12055 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12056
71f55dd8
DE
120572011-05-04 Doug Evans <dje@google.com>
12058
12059 * linux-low.c (linux_join): Skip process lookup.
12060 * spu-low.c (spu_join): Ditto.
12061 * server.c (join_inferiors_callback): Delete.
12062 (process_serial_event): For 'D' packet (detach) call join_inferior
12063 directly.
12064
4d393d60
JM
120652011-05-04 Joseph Myers <joseph@codesourcery.com>
12066
12067 * README: Don't mention xscale*-*-linux*.
12068 * configure.srv (xscale*-*-linux*): Don't handle target.
12069
b00ad6ff
NF
120702011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12071
12072 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12073 casting pointers.
12074 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12075 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12076 (i386_emit_void_call_2): Likewise.
12077
af96c192
YQ
120782011-04-26 Yao Qi <yao@codesourcery.com>
12079
43aaf8b6
PA
12080 * linux-low.c: Move common macros to linux-ptrace.h.
12081 Include linux-ptrace.h.
af96c192
YQ
12082 * Makefile.in (linux_ptrace_h): New.
12083 (linux-low.o): Depends on linux-ptrace.h.
12084
03f2bd59
JK
120852011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12086
12087 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12088 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12089 (remote_prepare): New function with most of the TCP code from ...
12090 (remote_open): ... here. Detect PORT here unconditionally. Move also
12091 setting transport_is_reliable.
12092 * server.c (run_once): New variable.
12093 (gdbserver_usage): Document it.
12094 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12095 the first run if RUN_ONCE.
12096 * server.h (run_once, remote_prepare): New declarations.
12097
7a9dd1b2
TT
120982011-04-19 Tom Tromey <tromey@redhat.com>
12099
12100 * win32-low.c (handle_load_dll): Remove duplicate "the".
12101
81239425
PM
121022011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12103
12104 Remove support for old Cygwin 1.5 versions.
12105 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12106 function to avoid warning.
12107 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12108 warning.
12109
9e0627f1
PM
121102011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12111
12112 * gdbserver/server.h (Macro _): Define it if not available.
12113
588eebee
MS
121142011-03-14 Michael Snyder <msnyder@vmware.com>
12115
348af9f7 12116 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12117
43f70d4c
JB
121182011-03-10 Joel Brobecker <brobecker@adacore.com>
12119
12120 * Makefile.in (maintainer-clean realclean distclean): Remove
12121 "make ... subdir_do" command.
12122
348af9f7
MS
121232011-03-10 Michael Snyder <msnyder@vmware.com>
12124
12125 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12126
12127 * server.c (handle_v_run): Free alloced buffer on early return.
12128
e637a4f5
YQ
121292011-03-09 Yao Qi <yao@codesourcery.com>
12130
12131 Revert:
12132 2011-03-04 Yao Qi <yao@codesourcery.com>
12133
12134 * Makefile.in: Remove GNU make feature --directory.
12135
12136 2011-03-05 Yao Qi <yao@codesourcery.com>
12137
12138 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12139 (subdir_do): New make target. Copied from gdb/Makefile.
12140 (maintainer-clean, realclean, distclean, clean): Call corresponding
12141 make targets in common/Makefile.
12142
12143 2011-02-11 Yao Qi <yao@codesourcery.com>
12144
12145 * configure.ac: Call AC_PROG_RANLIB.
12146 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12147 * configure: Regenerate.
12148
e6edda56
JK
121492011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12150
12151 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12152
e5141119
JB
121532011-03-06 Yao Qi <yao@codesourcery.com>
12154
12155 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12156
64794aa4
JB
121572011-03-05 Yao Qi <yao@codesourcery.com>
12158
12159 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12160 (subdir_do): New make target. Copied from gdb/Makefile.
12161 (maintainer-clean, realclean, distclean, clean): Call corresponding
12162 make targets in common/Makefile.
12163
7a762829
YQ
121642011-03-04 Yao Qi <yao@codesourcery.com>
12165
12166 * Makefile.in: Remove GNU make feature --directory.
12167
348af9f7
MS
121682011-03-04 Michael Snyder <msnyder@vmware.com>
12169
12170 * server.c (queue_stop_reply): Call xmalloc not malloc.
12171
121722011-03-02 Michael Snyder <msnyder@vmware.com>
12173
12174 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12175
9f72fee2
MS
121762011-02-28 Michael Snyder <msnyder@vmware.com>
12177
588eebee
MS
12178 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12179 (cmd_qtframe): Ditto.
12180 (cmd_qtbuffer): Ditto.
12181 (cmd_bigqtbuffer): Ditto.
12182
9f72fee2
MS
12183 * utils.c (decimal2str): Initialize 'width' to nine, then
12184 don't mess with it.
12185
8040bd49
UW
121862011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12187
12188 * hostio.c (require_data): Free *data, not data.
12189
7e52cbd0
JK
121902011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12191
12192 * hostio.c (require_data): Use free, not xfree.
12193
9130f83e
MS
121942011-02-27 Michael Snyder <msnyder@vmware.com>
12195
4b812f4e
MS
12196 * server.c (handle_query): Discard unused value.
12197
9130f83e
MS
12198 * hostio.c (require_data): Free malloc memory before returning
12199 error.
12200
69d37113
MS
122012011-02-26 Michael Snyder <msnyder@vmware.com>
12202
12203 * linux-low.c (list_threads): Call closedir for dirent.
12204
35f5825a
MS
122052011-02-27 Michael Snyder <msnyder@vmware.com>
12206
2a589cef
MS
12207 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12208 a case statement falls through.
12209
0adea5f7
MS
12210 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12211
35f5825a
MS
12212 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12213 in comparison.
12214
238f1c74
MS
122152011-02-26 Michael Snyder <msnyder@vmware.com>
12216
12217 * utils.c (decimal2str): Eliminate dead code and dead param.
12218 (pulongest): Drop dead param from call to decimal2str.
12219 (plongest): Ditto.
12220
633ff500
JB
122212011-02-24 Joel Brobecker <brobecker@adacore.com>
12222
12223 Revert the following patch (not approved yet):
12224 2011-02-21 Hui Zhu <teawater@gmail.com>
12225 * tracepoint.c (tp_printf): New function.
12226 (eval_agent_expr): Handle gdb_agent_op_printf.
12227
f9c6ff72
HZ
122282011-02-21 Hui Zhu <teawater@gmail.com>
12229
12230 * tracepoint.c (tp_printf): New function.
12231 (eval_agent_expr): Handle gdb_agent_op_printf.
12232
94d5e490
TT
122332011-02-18 Tom Tromey <tromey@redhat.com>
12234
12235 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12236 (tracepoint.o): Likewise.
12237 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12238 (gdb_agent_op_names): Likewise.
12239
c7f96d2b
TT
122402011-02-18 Tom Tromey <tromey@redhat.com>
12241
12242 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12243 gdb_agent_op_rot>: New constants.
12244 (gdb_agent_op_names): Add pick and roll.
12245 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12246 cases.
12247
0feedb2c
JK
122482011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12249
12250 * aclocal.m4: Regenerated with aclocal-1.11.1.
12251
b3b9301e
PA
122522011-02-14 Pedro Alves <pedro@codesourcery.com>
12253
12254 * server.c (handle_qxfer_traceframe_info): New.
12255 (qxfer_packets): Register "traceframe-info".
12256 (handle_query): Report support for qXfer:traceframe-info:read+.
12257 * tracepoint.c (match_blocktype): New.
12258 (traceframe_find_block_type): Rename to ...
12259 (traceframe_walk_blocks): ... this. Add callback filter argument,
12260 and use it.
12261 (traceframe_find_block_type): New, reimplemented on top of
12262 traceframe_walk_blocks.
12263 (build_traceframe_info_xml): New.
12264 (traceframe_read_info): New.
12265 * server.h (traceframe_read_info): Declare.
12266
4f3e6fb7
YQ
122672011-02-11 Yao Qi <yao@codesourcery.com>
12268
12269 * configure.ac: Call AC_PROG_RANLIB.
12270 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12271 * configure: Regenerate.
12272
764880b7
PA
122732011-02-07 Pedro Alves <pedro@codesourcery.com>
12274
12275 * server.c (gdb_read_memory): Change return semantics to allow
12276 partial transfers.
12277 (handle_search_memory_1): Adjust.
12278 (process_serial_event) <'m' packet>: Handle partial transfers.
12279 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12280
1c79eb8a
PA
122812011-01-28 Pedro Alves <pedro@codesourcery.com>
12282
12283 * regcache.c (init_register_cache): Initialize
12284 regcache->register_status.
12285 (free_register_cache): Release regcache->register_status.
12286 (regcache_cpy): Copy register_status.
12287 (registers_to_string): Print 'x's for unavailable registers.
12288 (supply_register): Mark the register's status valid or
12289 unavailable, depending on whether a buffer was passed in or not.
12290 (supply_register_zeroed): New.
12291 (supply_regblock): Mark the registers' status valid or
12292 unavailable, depending on whether a buffer was passed in or not.
12293 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12294 (struct regcache): New `register_status' field.
12295 (supply_register_zeroed): Declare.
12296 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12297 supply_register_zeroed, rather than passing a NULL buffer to
12298 supply_register.
12299 * tracepoint.c (fetch_traceframe_registers): Update comment.
12300
85724a0e
PA
123012011-01-28 Pedro Alves <pedro@codesourcery.com>
12302
12303 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12304 buffer explicit.
12305
d08aafef
PA
123062011-01-25 Pedro Alves <pedro@codesourcery.com>
12307
12308 * server.h (decode_xfer_write): Change prototype.
12309 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12310 and don't extract the annex here.
12311 * server.c (decode_xfer_read): Remove `annex' parameter,
12312 and don't extract the annex here.
12313 (decode_xfer): New.
12314 (struct qxfer): New.
12315 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12316 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12317 (handle_qxfer_statictrace): New functions, abstracted out from
12318 handle_query, and made to use the struct qxfer interface.
12319 (handle_threads_qxfer_proper): Rename to ...
12320 (handle_qxfer_threads_proper): ... this.
12321 (handle_threads_qxfer): Rename to ...
12322 (handle_qxfer_threads): ... this. Adjust.
12323 (qxfer_packets): New array.
12324 (handle_qxfer): New function.
12325 (handle_query): Use handle_qxfer.
12326
493e2a69
MS
123272011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12328
12329 * gdbreplay.c: Shorten lines of >= 80 columns.
12330 * linux-low.c: Ditto.
12331 * linux-ppc-low.c: Ditto.
12332 * linux-s390-low.c: Ditto.
12333 * linux-sparc-low.c: Ditto.
12334 * linux-x86-low.c: Ditto.
12335 * linux-xtensa-low.c: Ditto.
12336 * mem-break.c: Ditto.
12337 * nto-low.c: Ditto.
12338 * regcache.h: Ditto.
12339 * remote-utils.c: Ditto.
12340 * server.c: Ditto.
12341 * server.h: Ditto.
12342 * thread-db.c: Ditto.
12343 * tracepoint.c: Ditto.
12344 * utils.c: Ditto.
12345 * win32-low.h: Ditto.
12346
44944448
JB
123472011-01-05 Joel Brobecker <brobecker@adacore.com>
12348
12349 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12350 update.
12351
71ce852c
JB
123522011-01-01 Joel Brobecker <brobecker@adacore.com>
12353
12354 * server.c (gdbserver_version): Update copyright year in version
12355 output.
12356 * gdbreplay.c (gdbreplay_version): Ditto.
12357
eb826dc6
MF
123582010-12-29 Jie Zhang <jie.zhang@analog.com>
12359
12360 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12361 * linux-bfin-low.c: New file.
12362 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12363 PT_DATA_ADDR for BFIN targets.
12364 * Makefile.in (SFILES): Add linux-bfin-low.c.
12365 (clean): Remove reg-bfin.c.
12366 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12367 * README: Mention supported Blackfin targets.
12368
39ab222a
MF
123692010-12-23 Mike Frysinger <vapier@gentoo.org>
12370
12371 * .gitignore: New file.
12372
a1f2ce7d
MF
123732010-11-16 Mike Frysinger <vapier@gentoo.org>
12374
12375 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12376
f474844c
JZ
123772010-10-22 Jie Zhang <jie@codesourcery.com>
12378
12379 * Makefile.in: Add FLAGS_TO_PASS variable.
12380 (install): Remove dependency of install-only and recursively
12381 invoke make for install-only.
12382
f1048712
DE
123832010-10-04 Doug Evans <dje@google.com>
12384
12385 * Makefile.in (uninstall): Use $(DESTDIR).
12386
b53a1623
PA
123872010-09-24 Pedro Alves <pedro@codesourcery.com>
12388
e6ee044d
PA
12389 PR gdb/11842
12390
b53a1623
PA
12391 * linux-x86-low.c (compat_siginfo_from_siginfo)
12392 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12393 si_code is < 0. Check for si_code == SI_TIMER before checking for
12394 si_code < 0.
12395
fa1bd1e4
JB
123962010-09-13 Joel Brobecker <brobecker@adacore.com>
12397
12398 * lynx-i386-low.c: New file.
12399 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12400
47fac8f8
JB
124012010-09-13 Joel Brobecker <brobecker@adacore.com>
12402
12403 * lynx-low.c (ptrace_request_to_str): Remove handling for
12404 request values that have been removed in LynxOS 5.x.
12405
1adfc54d
JB
124062010-09-13 Joel Brobecker <brobecker@adacore.com>
12407
12408 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12409 <ptrace.h>
12410
c2a66c29
NS
124112010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12412
12413 * configure.ac: Add --enable-inprocess-agent option.
12414 * configure: Rebuilt.
12415
32fcada3
YQ
124162010-09-06 Yao Qi <yao@codesourcery.com>
12417
12418 * linux-low.c (linux_kill): Remove unused variable.
12419 (linux_stabilize_threads): Likewise.
12420 * server.c (start_inferior): Likewise.
12421 (queue_stop_reply_callback): Likewise.
12422 * tracepoint.c (do_action_at_tracepoint): Likewise.
12423
0cccb683
YQ
124242010-09-06 Yao Qi <yao@codesourcery.com>
12425
12426 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12427 on return.
12428
423ec54c
JK
124292010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12430
12431 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12432
12ac6819
PA
124332010-09-06 Pedro Alves <pedro@codesourcery.com>
12434
12435 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12436 "$(IPA_DEPFILES)".
12437
8ed54b31
JB
124382010-09-01 Joel Brobecker <brobecker@adacore.com>
12439
12440 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12441 gdbserver/lynx-ppc-low.c: New files.
12442 * Makefile.in (lynx_low_h): New variable.
12443 (lynx-low.o, lynx-ppc-low.o): New rules.
12444 * configure.ac: On LynxOS, link with -lnetinet.
12445 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12446 * configure: regenerate.
12447
bb0116a4
JB
124482010-09-01 Joel Brobecker <brobecker@adacore.com>
12449
12450 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12451 * configure.ac: Add check for vasprintf and vsnprintf.
12452 * configure, config.in: Regenerate.
12453 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12454
a778ab81 124552010-09-01 Joel Brobecker <brobecker@adacore.com>
12456
12457 * gdbreplay.c: Move include of alloca.h up, next to include of
12458 malloc.h.
12459 * server.h: Add include of malloc.h.
12460 * mem-break.c: Remove include of malloc.h.
12461 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12462
8b034a19 124632010-09-01 Joel Brobecker <brobecker@adacore.com>
12464
12465 * Makefile.in (memmem.o): Build with -Wno-error.
12466
124672010-09-01 Joel Brobecker <brobecker@adacore.com>
12468
12469 * utils.c (xsnprintf): Make non-static.
12470 * server.h: Add xsnprintf declaration.
12471 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12472 replace calls to snprintf by calls to xsnprintf throughout.
12473
124742010-09-01 Joel Brobecker <brobecker@adacore.com>
12475
12476 * configure.ac: Add configure check for alloca.
12477 * configure, config.in: Regenerate.
12478 * server.h: Include alloca.h if it exists.
12479 * gdbreplay.c: Include alloca.h if it exists.
12480
1a981360
PA
124812010-08-28 Pedro Alves <pedro@codesourcery.com>
12482
12483 * linux-low.c (__SIGRTMIN): Define if not already defined.
12484 (linux_create_inferior): Check for __ANDROID__ rather than
12485 __SIGRTMIN.
12486 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12487 are already deferred.
12488 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12489 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12490 stopped and already has a pending signal to report.
12491 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12492 a pending signal to report or is moving out of a jump pad.
12493 (linux_init_signals): Check for __ANDROID__ rather than
12494 __SIGRTMIN.
12495
b4d51a55
PA
124962010-08-28 Pedro Alves <pedro@codesourcery.com>
12497
12498 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12499 debug_threads check. Avoid a linear search when not doing debug
12500 output.
12501
ec48365d
PA
125022010-08-27 Pedro Alves <pedro@codesourcery.com>
12503
12504 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12505 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12506 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12507 (process_event): Change local fd's type to gdb_fildes_t.
12508 (create_file_handler): Adjust prototype.
12509 (delete_file_handler): Adjust prototype.
12510 (handle_file_event): Adjust prototype. Use pfildes.
12511 (create_file_event): Adjsut prototype.
12512 * remote-utils.c (remote_desc, listen_desc): Change type to
12513 gdb_fildes_t.
12514 * server.h: New gdb_fildes_t typedef.
12515 [USE_WIN32API]: Include winsock2.h.
12516 (delete_file_handler, add_file_handler): Adjust prototypes.
12517 (pfildes): Declare.
12518 * utils.c (pfildes): New.
12519
854d88f0
PA
125202010-08-27 Pedro Alves <pedro@codesourcery.com>
12521
12522 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12523 * configure: Regenerate.
12524
0146f85b
PA
125252010-08-27 Pedro Alves <pedro@codesourcery.com>
12526
12527 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12528 (linux_done_accessing_memory): ... this.
12529 (linux_target_ops): Adjust.
12530 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12531 * nto-low.c (nto_target_ops): Adjust comment.
12532 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12533 * spu-low.c (spu_target_ops): Adjust comment.
12534 * target.h (target_ops): Rename unprepare_to_access_memory field
12535 to done_accessing_memory.
12536 (unprepare_to_access_memory): Rename to ...
12537 (done_accessing_memory): ... this.
12538
90d74c30
PA
125392010-08-26 Pedro Alves <pedro@codesourcery.com>
12540
12541 * linux-low.c (linux_prepare_to_access_memory): New.
12542 (linux_unprepare_to_access_memory): New.
12543 (linux_target_ops): Install them.
12544 * server.c (read_memory): Rename to ...
12545 (gdb_read_memory): ... this. Use
12546 prepare_to_access_memory/prepare_to_access_memory.
12547 (write_memory): Rename to ...
12548 (gdb_write_memory): ... this. Use
12549 prepare_to_access_memory/prepare_to_access_memory.
12550 (handle_search_memory_1): Adjust.
12551 (process_serial_event): Adjust.
12552 * target.h (struct target_ops): New fields
12553 prepare_to_access_memory and unprepare_to_access_memory.
12554 (prepare_to_access_memory, unprepare_to_access_memory): New.
12555 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12556 prepare_to_access_memory/prepare_to_access_memory.
12557 * nto-low.c (nto_target_ops): Adjust.
12558 * spu-low.c (spu_target_ops): Adjust.
12559 * win32-low.c (win32_target_ops): Adjust.
12560
fd467969
PA
125612010-08-26 Pedro Alves <pedro@codesourcery.com>
12562
12563 * Makefile.in (WARN_CFLAGS): Get it from configure.
12564 (WERROR_CFLAGS): New.
12565 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12566 * configure.ac: Introduce --enable-werror, which adds -Werror to
12567 the compiler command line. Enabled by default. Disable with
12568 --disable-werror. Add -Wdeclaration-after-statement
12569 Wpointer-arith and -Wformat-nonliteral to warning flags.
12570 * configure: Regenerate.
12571
331e2f5f
PA
125722010-08-26 Pedro Alves <pedro@codesourcery.com>
12573
12574 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12575
e581f2b4
PA
125762010-08-26 Pedro Alves <pedro@codesourcery.com>
12577
12578 * gdbreplay.c (remote_error): New.
12579 (gdbchar): New.
12580 (expect): Use gdbchar. Check for error reading from GDB.
12581 Clarify sync error output.
12582 (play): Check for errors writing to GDB.
12583 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12584 * remote-utils.c (getpkt): Check for errors writing to the remote
12585 descriptor.
12586
3c11dd79
PA
125872010-08-25 Pedro Alves <pedro@codesourcery.com>
12588
12589 * linux-low.c (linux_wait_1): Move non-debugging code out of
12590 `debug_threads' control.
12591
d20a8ad9
PA
125922010-08-25 Pedro Alves <pedro@codesourcery.com>
12593
12594 * linux-low.c (linux_wait_1): Don't set last_status here.
12595 * server.c (push_event, queue_stop_reply_callback): Assert we're
12596 not pushing a TARGET_WAITKIND_IGNORE event.
12597 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12598 (myresume, handle_target_event): Set the thread's last_resume_kind
12599 and last_status from the target returned status.
12600
964e4306
PA
126012010-08-25 Pedro Alves <pedro@codesourcery.com>
12602
12603 PR threads/10729
12604
12605 * linux-x86-low.c (update_debug_registers_callback): New.
12606 (i386_dr_low_set_addr): Use it.
12607 (i386_dr_low_get_addr): New.
12608 (i386_dr_low_set_control): Use update_debug_registers_callback.
12609 (i386_dr_low_get_control): New.
12610 (i386_dr_low_get_status): Adjust.
12611 * linux-low.c (linux_stop_lwp): New.
12612 * linux-low.h (linux_stop_lwp): Declare.
12613
12614 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12615 argument instead of a i386_debug_reg_state.
12616 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12617 a i386_debug_reg_state.
12618 (i386_insert_aligned_watchpoint): Adjust.
12619 (i386_remove_aligned_watchpoint): Adjust.
12620 (i386_low_stopped_data_address): Read the debug registers from the
12621 inferior instead of from the mirrors.
12622 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12623 (i386_dr_low_get_addr): Declare.
12624 (i386_dr_low_get_control): Declare.
12625 (i386_dr_low_get_status): Change prototype.
12626
12627 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12628 (i386_dr_low_get_addr): New.
12629 (i386_dr_low_get_control): New.
12630 (i386_dr_low_get_status): Adjust prototype. Return
12631 dr_status_mirror.
12632 (i386_initial_stuff): Clear dr_status_mirror and
12633 dr_control_mirror.
12634 (i386_get_thread_context): Adjust.
12635 (i386_set_thread_context): Adjust.
12636 (i386_thread_added): Adjust.
12637
5f21a75b
PA
126382010-08-24 Pedro Alves <pedro@codesourcery.com>
12639
12640 * linux-low.h (linux_thread_area): Delete declaration.
12641
3e4c1235
TS
126422010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12643
12644 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12645 after its termination.
12646
1971b033
PA
126472010-08-09 Pedro Alves <pedro@codesourcery.com>
12648
12649 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12650 (gdb_wants_all_stopped): Delete.
12651 (linux_wait_1): Don't call them.
12652 * server.c (handle_v_cont): Tag all threads as want-stopped.
12653 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12654 stopped as "client-wants-stopped".
12655
310444ac
PA
126562010-07-31 Pedro Alves <pedro@codesourcery.com>
12657
12658 * Makefile.in (signals_h): New.
12659 (server_h): Depend on it.
12660 (server.o): Don't depend on $(signals_def).
12661 (signals.o): Depend on $(signals_def).
12662
a19cae16
JK
126632010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12664
12665 * Makefile.in (signals_def): New.
12666 (server_h): Append include/gdb/signals.h and signals_def.
12667 (server.o): Append signals_def.
12668
30d50328
JK
126692010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12670
12671 * server.c (handle_target_event): Use target_signal_to_host for
12672 resume_info.sig initialization.
12673 * target.h (struct thread_resume) <sig>: New comment.
12674
5c3216e2
OS
126752010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12676
c6f46ca0
OS
12677 * server.c (handle_query): strcpy() the returned string from paddress()
12678 instead of sprintf().
5c3216e2
OS
12679 * utils.c (paddress): Return phex_nz().
12680
6bd31874
JB
126812010-07-07 Joel Brobecker <brobecker@adacore.com>
12682
12683 * server.c (handle_v_cont): Call mourn_inferior if process
12684 just exited.
12685 (myresume): Likewise.
12686
0fb4aa4b
PA
126872010-07-01 Pedro Alves <pedro@codesourcery.com>
12688
12689 Static tracepoints, and integration with UST.
12690
12691 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12692 * mem-break.c (uninsert_all_breakpoints)
12693 (reinsert_all_breakpoints): New.
12694 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12695 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12696 (gdb_agent_ust_loaded, helper_thread_id)
12697 (gdb_agent_helper_thread_id): New macros.
12698 (struct ipa_sym_addresses): Add addr_ust_loaded,
12699 addr_helper_thread_id, addr_cmd_buf.
12700 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12701 (in_process_agent_loaded_ust): New.
12702 (write_e_ust_not_loaded): New.
12703 (maybe_write_ipa_ust_not_loaded): New.
12704 (struct collect_static_trace_data_action): New.
12705 (enum tracepoint_type) <static_tracepoint>: New.
12706 (struct tracepoint) <handle>: Mention static tracepoints.
12707 (struct static_tracepoint_ctx): New.
12708 (CMD_BUF_SIZE): New.
12709 (add_tracepoint_action): Handle static tracepoint actions.
12710 (unprobe_marker_at): New.
12711 (clear_installed_tracepoints): Handle static tracepoints.
12712 (cmd_qtdp): Handle static tracepoints.
12713 (probe_marker_at): New.
12714 (cmd_qtstart): Handle static tracepoints.
12715 (response_tracepoint): Handle static tracepoints.
12716 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12717 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12718 (get_context_regcache): Handle static tracepoints.
12719 (do_action_at_tracepoint): Handle static tracepoint actions.
12720 (traceframe_find_block_type): Handle static trace data blocks.
12721 (traceframe_read_sdata): New.
12722 (download_tracepoints): Download static tracepoint actions.
12723 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12724 (GDB_PROBE_NAME): New.
12725 (ust_ops): New.
12726 (GET_UST_SYM): New.
12727 (USTF): New.
12728 (dlsym_ust): New.
12729 (ust_marker_to_static_tracepoint): New.
12730 (gdb_probe): New.
12731 (collect_ust_data_at_tracepoint): New.
12732 (gdb_ust_probe): New.
12733 (UNIX_PATH_MAX, SOCK_DIR): New.
12734 (gdb_ust_connect_sync_socket): New.
12735 (resume_thread, stop_thread): New.
12736 (run_inferior_command): New.
12737 (init_named_socket): New.
12738 (gdb_ust_socket_init): New.
12739 (cstr_to_hexstr): New.
12740 (next_st): New.
12741 (first_marker, next_marker): New.
12742 (response_ust_marker): New.
12743 (cmd_qtfstm, cmd_qtsstm): New.
12744 (unprobe_marker_at, probe_marker_at): New.
12745 (cmd_qtstmat, gdb_ust_thread): New.
12746 (gdb_ust_init): New.
12747 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12748 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12749 (ST_REGENTRY): New.
12750 (x86_64_st_collect_regmap): New.
12751 (X86_64_NUM_ST_COLLECT_GREGS): New.
12752 (AMD64_RIP_REGNUM): New.
12753 (supply_static_tracepoint_registers): New.
12754 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12755 (ST_REGENTRY): New.
12756 (i386_st_collect_regmap): New.
12757 (i386_NUM_ST_COLLECT_GREGS): New.
12758 (supply_static_tracepoint_registers): New.
12759 * server.c (handle_query): Handle qXfer:statictrace:read.
12760 <qSupported>: Report support for StaticTracepoints, and
12761 qXfer:statictrace:read features.
12762 * server.h (traceframe_read_sdata)
12763 (supply_static_tracepoint_registers): Declare.
12764 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12765 (unpack_varlen_hex): Include in IPA build.
12766 * Makefile.in (ustlibs, ustinc): New.
12767 (IPA_OBJS): Add remote-utils-ipa.o.
12768 ($(IPA_LIB)): Link -ldl and -lpthread.
12769 (UST_CFLAGS): New.
12770 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12771 * config.in, configure: Regenerate.
12772
9e4344e5
PA
127732010-06-20 Ian Lance Taylor <iant@google.com>
12774 Pedro Alves <pedro@codesourcery.com>
12775
12776 * linux-x86-low.c (always_true): Delete.
12777 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12778 trying to fool the compiler with always_true.
12779
c6beb2cb
PA
127802010-06-20 Pedro Alves <pedro@codesourcery.com>
12781
12782 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12783 conditions in gdbserver.
12784
d2ed6730
UW
127852010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12786
12787 * spu-low.c (spu_read_memory): Wrap around local store limit.
12788 (spu_write_memory): Likewise.
12789
4e29fb54
PA
127902010-06-15 Pedro Alves <pedro@codesourcery.com>
12791
12792 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12793 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12794 LONGEST uses.
12795 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12796 uses.
12797 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12798 uses with LONGEST uses.
12799
6a271cae
PA
128002010-06-14 Stan Shebs <stan@codesourcery.com>
12801 Pedro Alves <pedro@codesourcery.com>
12802
12803 Bytecode compiler.
12804
12805 * linux-x86-low.c: Include limits.h.
12806 (add_insns): New.
12807 (always_true): New.
12808 (EMIT_ASM): New.
12809 (EMIT_ASM32): New.
12810 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12811 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12812 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12813 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12814 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12815 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12816 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12817 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12818 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12819 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12820 (amd64_emit_void_call_2): New.
12821 (amd64_emit_ops): New.
12822 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12823 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12824 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12825 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12826 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12827 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12828 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12829 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12830 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12831 (i386_emit_stack_adjust, i386_emit_int_call_1)
12832 (i386_emit_void_call_2): New.
12833 (i386_emit_ops): New.
12834 (x86_emit_ops): New.
12835 (the_low_target): Install x86_emit_ops.
12836 * server.h (struct emit_ops): New.
12837 (get_raw_reg_func_addr): Declare.
12838 (current_insn_ptr, emit_error): Declare.
12839 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12840 (set_trace_state_variable_value): New defines.
12841 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12842 addr_get_trace_state_variable_value and
12843 addr_set_trace_state_variable_value.
12844 (symbol_list): New fields for get_raw_reg,
12845 get_trace_state_variable_value and set_trace_state_variable_value.
12846 (condfn): New typedef.
12847 (struct tracepoint): New field `compiled_cond'.
12848 (do_action_at_tracepoint): Clear compiled_cond.
12849 (get_trace_state_variable_value, set_trace_state_variable_value):
12850 Export in the IPA.
12851 (condition_true_at_tracepoint): If there's a compiled condition,
12852 run that.
12853 (current_insn_ptr, emit_error): New globals.
12854 (struct bytecode_address): New.
12855 (get_raw_reg_func_addr): New.
12856 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12857 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12858 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12859 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12860 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12861 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12862 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12863 (compile_tracepoint_condition, compile_bytecodes): New.
12864 * target.h (emit_ops): Forward declare.
12865 (struct target_ops): New field emit_ops.
12866 (target_emit_ops): New.
12867 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12868 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12869 * linux-low.c (linux_emit_ops): New.
12870 (linux_target_ops): Install it.
12871 * linux-low.h (struct linux_target_ops): New field emit_ops.
12872
92b72907
UW
128732010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12874
12875 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12876 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12877
fa593d66
PA
128782010-06-01 Pedro Alves <pedro@codesourcery.com>
12879 Stan Shebs <stan@codesourcery.com>
12880
12881 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12882 (all): Depend on $(extra_libraries).
12883 (install-only): Install the IPA.
12884 (IPA_OBJS, IPA_LIB): New.
12885 (clean): Remove the IPA lib.
12886 (IPAGENT_CFLAGS): New.
12887 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12888 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12889 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12890 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12891 * configure.ac: Check for atomic builtins support in the compiler.
12892 (IPA_DEPFILES, extra_libraries): Define.
12893 * configure.srv (ipa_obj): Add description.
12894 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12895 (i[34567]86-*-linux*): Set ipa_obj.
12896 (x86_64-*-linux*): Set ipa_obj.
12897 * linux-low.c (stabilizing_threads): New.
12898 (supports_fast_tracepoints): New.
12899 (linux_detach): Stabilize threads before detaching.
12900 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12901 the lwp is either not stabilizing, or is moving out of a jump pad.
12902 (linux_fast_tracepoint_collecting): New.
12903 (maybe_move_out_of_jump_pad): New.
12904 (enqueue_one_deferred_signal): New.
12905 (dequeue_one_deferred_signal): New.
12906 (linux_wait_for_event_1): If moving out of a jump pad, defer
12907 pending signals to later.
12908 (linux_stabilize_threads): New.
12909 (linux_wait_1): Check if threads need moving out of jump pads, and
12910 do it if so.
12911 (stuck_in_jump_pad_callback): New.
12912 (move_out_of_jump_pad_callback): New.
12913 (lwp_running): New.
12914 (linux_resume_one_lwp): Handle moving out of jump pads.
12915 (linux_set_resume_request): Dequeue deferred signals.
12916 (need_step_over_p): Also step over fast tracepoint jumps.
12917 (start_step_over): Also uninsert fast tracepoint jumps.
12918 (finish_step_over): Also reinsert fast tracepoint jumps.
12919 (linux_install_fast_tracepoint_jump): New.
12920 (linux_target_ops): Install linux_stabilize_threads and
12921 linux_install_fast_tracepoint_jump_pad.
12922 * linux-low.h (linux_target_ops) <get_thread_area,
12923 install_fast_tracepoint_jump_pad>: New fields.
12924 (struct lwp_info) <collecting_fast_tracepoint,
12925 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12926 (linux_get_thread_area): Declare.
12927 * linux-x86-low.c (jump_insn): New.
12928 (x86_get_thread_area): New.
12929 (append_insns): New.
12930 (push_opcode): New.
12931 (amd64_install_fast_tracepoint_jump_pad): New.
12932 (i386_install_fast_tracepoint_jump_pad): New.
12933 (x86_install_fast_tracepoint_jump_pad): New.
12934 (the_low_target): Install x86_get_thread_area and
12935 x86_install_fast_tracepoint_jump_pad.
12936 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12937 (struct fast_tracepoint_jump): New.
12938 (fast_tracepoint_jump_insn): New.
12939 (fast_tracepoint_jump_shadow): New.
12940 (find_fast_tracepoint_jump_at): New.
12941 (fast_tracepoint_jump_here): New.
12942 (delete_fast_tracepoint_jump): New.
12943 (set_fast_tracepoint_jump): New.
12944 (uninsert_fast_tracepoint_jumps_at): New.
12945 (reinsert_fast_tracepoint_jumps_at): New.
12946 (set_breakpoint_at): Use write_inferior_memory.
12947 (uninsert_raw_breakpoint): Use write_inferior_memory.
12948 (check_mem_read): Mask out fast tracepoint jumps.
12949 (check_mem_write): Mask out fast tracepoint jumps.
12950 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12951 (set_fast_tracepoint_jump): Declare.
12952 (delete_fast_tracepoint_jump)
12953 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12954 (reinsert_fast_tracepoint_jumps_at): Declare.
12955 * regcache.c: Don't compile many functions when building the
12956 in-process agent library.
12957 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12958 the register buffer in the heap.
12959 (free_register_cache): If the register buffer isn't owned by the
12960 regcache, don't free it.
12961 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12962 pre-existing register caches.
12963 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12964 type.
12965 (convert_ascii_to_int): : Constify `from' parameter type.
12966 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12967 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12968 the needed buffer in-place.
12969 (relocate_instruction): New.
12970 * server.c (handle_query) <qSymbols>: If the target supports
12971 tracepoints, give it a chance of looking up symbols. Report
12972 support for fast tracepoints.
12973 (handle_status): Stabilize threads.
12974 (process_serial_event): Adjust.
12975 * server.h (struct fast_tracepoint_jump): Forward declare.
12976 (struct process_info) <fast_tracepoint_jumps>: New field.
12977 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12978 (decode_X_packet, decode_M_packet): Adjust.
12979 (relocate_instruction): Declare.
12980 (in_process_agent_loaded): Declare.
12981 (tracepoint_look_up_symbols): Declare.
12982 (struct fast_tpoint_collect_status): Declare.
12983 (fast_tracepoint_collecting): Declare.
12984 (force_unlock_trace_buffer): Declare.
12985 (handle_tracepoint_bkpts): Declare.
12986 (initialize_low_tracepoint)
12987 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12988 * target.h (struct target_ops) <stabilize_threads,
12989 install_fast_tracepoint_jump_pad>: New fields.
12990 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12991 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12992 [HAVE_STDINT_H]: Include stdint.h.
12993 (trace_debug_1): Rename to ...
12994 (trace_vdebug): ... this.
12995 (trace_debug): Rename to ...
12996 (trace_debug_1): ... this. Add `level' parameter.
12997 (trace_debug): New.
12998 (ATTR_USED, ATTR_NOINLINE): New.
12999 (IP_AGENT_EXPORT): New.
13000 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13001 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13002 (about_to_request_buffer_space, trace_buffer_is_full)
13003 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13004 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13005 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13006 (traceframe_write_count, traceframes_created)
13007 (trace_state_variables)
13008 New renaming defines.
13009 (struct ipa_sym_addresses): New.
13010 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13011 (symbol_list): New.
13012 (ipa_sym_addrs): New.
13013 (all_tracepoint_symbols_looked_up): New.
13014 (in_process_agent_loaded): New.
13015 (write_e_ipa_not_loaded): New.
13016 (maybe_write_ipa_not_loaded): New.
13017 (tracepoint_look_up_symbols): New.
13018 (debug_threads) [IN_PROCESS_AGENT]: New.
13019 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13020 (UNKNOWN_SIDE_EFFECTS): New.
13021 (stop_tracing): New.
13022 (flush_trace_buffer): New.
13023 (stop_tracing_bkpt): New.
13024 (flush_trace_buffer_bkpt): New.
13025 (read_inferior_integer): New.
13026 (read_inferior_uinteger): New.
13027 (read_inferior_data_pointer): New.
13028 (write_inferior_data_pointer): New.
13029 (write_inferior_integer): New.
13030 (write_inferior_uinteger): New.
13031 (struct collect_static_trace_data_action): Delete.
13032 (enum tracepoint_type): New.
13033 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13034 <actions_str, step_actions, step_actions_str>: Only include in
13035 GDBserver.
fa593d66
PA
13036 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13037 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13038 (tracepoints): Use IP_AGENT_EXPORT.
13039 (last_tracepoint): Don't include in the IPA.
13040 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13041 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13042 (alloced_trace_state_variables): New.
13043 (trace_state_variables): Use IP_AGENT_EXPORT.
13044 (traceframe_t): Delete unused variable.
13045 (circular_trace_buffer): Don't include in the IPA.
13046 (trace_buffer_start): Delete.
13047 (struct trace_buffer_control): New.
13048 (trace_buffer_free): Delete.
13049 (struct ipa_trace_buffer_control): New.
13050 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13051 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13052 New.
13053 (trace_buffer_ctrl): New.
13054 (TRACE_BUFFER_CTRL_CURR): New.
13055 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13056 Reimplement as macros.
13057 (trace_buffer_wrap): Delete.
13058 (traceframe_write_count, traceframe_read_count)
13059 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13060 (struct tracepoint_hit_ctx) <type>: New field.
13061 (struct fast_tracepoint_ctx): New.
13062 (memory_barrier): New.
13063 (cmpxchg): New.
13064 (record_tracepoint_error): Update atomically in the IPA.
13065 (clear_inferior_trace_buffer): New.
13066 (about_to_request_buffer_space): New.
13067 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13068 updating the same buffer.
13069 (add_tracepoint): Default the tracepoint's type to trap
13070 tracepoint, and orig_size to -1.
13071 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13072 internal variables.
13073 (create_trace_state_variable): New parameter `gdb'. Handle it.
13074 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13075 (cmd_qtdp): Handle fast tracepoints.
13076 (cmd_qtdv): Adjust.
13077 (max_jump_pad_size): New.
13078 (gdb_jump_pad_head): New.
13079 (get_jump_space_head): New.
13080 (claim_jump_space): New.
13081 (sort_tracepoints): New.
13082 (MAX_JUMP_SIZE): New.
13083 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13084 IPA.
13085 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13086 support. Upload fast traceframes, and delete internal IPA
13087 breakpoints.
13088 (stop_tracing_handler): New.
13089 (flush_trace_buffer_handler): New.
13090 (cmd_qtstop): Upload fast tracepoints.
13091 (response_tracepoint): Handle fast tracepoints.
13092 (tracepoint_finished_step): Upload fast traceframes. Set the
13093 tracepoint hit context's tracepoint type.
13094 (handle_tracepoint_bkpts): New.
13095 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13096 type. Add comment about fast tracepoints.
13097 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13098 non-existing action_str field.
13099 (get_context_regcache): Handle fast tracepoints.
13100 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13101 to the regcache.
13102 (fast_tracepoint_from_jump_pad_address): New.
13103 (fast_tracepoint_from_ipa_tpoint_address): New.
13104 (collecting_t): New.
13105 (force_unlock_trace_buffer): New.
13106 (fast_tracepoint_collecting): New.
13107 (collecting): New.
13108 (gdb_collect): New.
13109 (write_inferior_data_ptr): New.
13110 (target_tp_heap): New.
13111 (target_malloc): New.
13112 (download_agent_expr): New.
13113 (UALIGN): New.
13114 (download_tracepoints): New.
13115 (download_trace_state_variables): New.
13116 (upload_fast_traceframes): New.
13117 (IPA_FIRST_TRACEFRAME): New.
13118 (IPA_NEXT_TRACEFRAME_1): New.
13119 (IPA_NEXT_TRACEFRAME): New.
13120 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13121 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13122 (gdb_jump_pad_buffer_end): New.
13123 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13124 (initialize_tracepoint): Adjust.
13125 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13126 buffer. Initialize the low module.
13127 * utils.c (PREFIX, TOOLNAME): New.
13128 (malloc_failure): Use PREFIX.
13129 (error): In the IPA, an error causes an exit.
13130 (fatal, warning): Use PREFIX.
13131 (internal_error): Use TOOLNAME.
13132 (NUMCELLS): Increase to 10.
13133 * configure, config.in: Regenerate.
13134
d149dd1d
PA
131352010-06-01 Pedro Alves <pedro@codesourcery.com>
13136
13137 * server.c (handle_query) <qSupported>: Do two passes over the
13138 qSupported string to avoid nesting strtok.
13139
f6528abd
JK
131402010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13141
13142 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13143 (CDEPS): New.
13144 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13145 -Wl,--dynamic-list.
13146 * configure: Regenerate.
13147 * proc-service.list: New.
13148
ca2a87a0
JK
131492010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13150
13151 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13152 New comment.
13153
363a6e9f
OS
131542010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13155
13156 * gdbreplay.c (remote_open): Check error return from socket() call by
13157 its equality to -1 not by it being negative.
13158 * remote-utils.c (remote_open): Likewise.
13159
d23b6cb1
PA
131602010-05-23 Pedro Alves <pedro@codesourcery.com>
13161
13162 * config.h: Regenerate.
13163
28d3cf85
MK
131642010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13165
13166 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13167 doesn't provide PTRACE_GET_THREAD_AREA.
13168
fea36a59
MK
131692010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13170
13171 * linux-m68k-low.c: Include <asm/ptrace.h>
13172 (ps_get_thread_area): Implement.
13173
24b066ba
DE
131742010-05-03 Doug Evans <dje@google.com>
13175
13176 * event-loop.c (struct callback_event): New struct.
13177 (callback_list): New global.
13178 (append_callback_event, delete_callback_event): New functions.
13179 (process_callback): New function.
13180 (start_event_loop): Call it.
13181 * remote-utils.c (NOT_SCHEDULED): Define.
13182 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13183 moved out of readchar.
13184 (readchar): Rewrite. Call reschedule before returning.
13185 (reset_readchar): New function.
13186 (remote_close): Call it.
13187 (process_remaining, reschedule): New functions.
13188 * server.h (callback_handler_func): New typedef.
13189 (append_callback_event, delete_callback_event): Declare.
13190
9836d6ea
PA
131912010-05-03 Pedro Alves <pedro@codesourcery.com>
13192
13193 * proc-service.c (ps_pglobal_lookup): Use
13194 thread_db_look_up_one_symbol.
13195 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13196 parameter. Use it instead of all_symbols_looked_up.
13197 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13198 field.
13199 (all_symbols_looked_up): Don't declare.
13200 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13201 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13202 field.
13203 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13204 Set all_symbols_looked_up here.
13205 (thread_db_look_up_one_symbol): New.
13206 (thread_db_get_tls_address): Adjust.
13207 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13208 thread_db object on the heap, and tentatively set it in the
13209 process structure.
13210 (thread_db_init): Don't set all_symbols_looked_up here.
13211 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13212
7984d532
PA
132132010-05-03 Pedro Alves <pedro@codesourcery.com>
13214
13215 * linux-low.c (linux_kill, linux_detach): Adjust.
13216 (status_pending_p_callback): Remove redundant statement. Check
13217 for !TARGET_WAITIKIND_IGNORE, instead of
13218 TARGET_WAITKIND_STOPPED.
13219 (handle_tracepoints): Make sure LWP is locked. Adjust.
13220 (linux_wait_for_event_1): Adjust.
13221 (linux_cancel_breakpoints): New.
13222 (unsuspend_one_lwp): New.
13223 (unsuspend_all_lwps): New.
13224 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13225 (send_sigstop_callback): Change return type to int, add new
13226 `except' parameter and handle it.
13227 (suspend_and_send_sigstop_callback): New.
13228 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13229 pass them down. If SUSPEND, also increment the lwp's suspend
13230 count.
13231 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13232 (need_step_over_p): Don't consider suspended LWPs.
13233 (start_step_over): Adjust.
13234 (proceed_one_lwp): Change return type to int, add new `except'
13235 parameter and handle it.
13236 (unsuspend_and_proceed_one_lwp): New.
13237 (proceed_all_lwps): Use find_inferior instead of
13238 for_each_inferior.
13239 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13240 also decrement the suspend count of LWPs. Pass `except' down,
13241 instead of hacking its suspend count.
13242 (linux_pause_all): Add `freeze' parameter. Adjust.
13243 (linux_unpause_all): New.
13244 (linux_target_ops): Install linux_unpause_all.
13245 * server.c (handle_status): Adjust.
13246 * target.h (struct target_ops): New fields `unpause_all' and
13247 `cancel_breakpoints'. Add new parameter to `pause_all'.
13248 (pause_all): Add new `freeze' parameter.
13249 (unpause_all): New.
13250 (cancel_breakpoints): New.
13251 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13252 cancel breakpoints.
13253 (cmd_qtstart): Pause threads.
13254 (stop_tracing): Pause threads, and cancel breakpoints.
13255 * win32-low.c (win32_target_ops): Adjust.
13256
e471f25b
PA
132572010-05-03 Pedro Alves <pedro@codesourcery.com>
13258
13259 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13260 the inferior right away from here...
13261 (linux_wait_1): ... to here, and adjust to check the thread's
13262 last_resume_kind instead of the lwp's step or stop_expected flags.
13263
1915ef4f
PA
132642010-05-02 Pedro Alves <pedro@codesourcery.com>
13265
13266 * README: Use consistent `GDB' and `GDBserver' spellings.
13267
f9e39928
PA
132682010-05-02 Pedro Alves <pedro@codesourcery.com>
13269
13270 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13271 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13272 (linux_detach_one_lwp): Assume the lwp is stopped.
13273 (any_thread_of): Delete.
13274 (linux_detach): Stop all lwps here. Don't blindly delete all
13275 breakpoints.
13276 (delete_lwp_callback): New.
13277 (linux_mourn): Delete all lwps of the process that is gone.
13278 (linux_wait_1): Don't delete the last lwp of the process here.
13279 * mem-break.h (mark_breakpoints_out): Declare.
13280 * mem-break.c (mark_breakpoints_out): New.
13281 (free_all_breakpoints): Use it.
13282 * server.c (handle_target_event): If the process is gone, mark
13283 breakpoints out.
13284 * thread-db.c (struct thread_db) <create_bp>: New field.
13285 (thread_db_enable_reporting): Fix prototype. Store a thread event
13286 breakpoint reference in the thread_db struct.
13287 (thread_db_load_search): Clear the thread_db object.
13288 (try_thread_db_load_1): Ditto.
13289 (switch_to_process): New.
13290 (disable_thread_event_reporting): Use it.
13291 (remove_thread_event_breakpoints): New.
13292 (thread_db_detach, thread_db_mourn): Use it.
13293
1e7fc18c
PA
132942010-05-01 Pedro Alves <pedro@codesourcery.com>
13295
13296 * linux-low.c (linux_enable_event_reporting): New.
13297 (linux_wait_for_event_1, handle_extended_wait): Use it.
13298
02fc4de7
PA
132992010-04-30 Pedro Alves <pedro@codesourcery.com>
13300
13301 * linux-low.c (linux_kill_one_lwp, linux_kill)
13302 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13303 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13304 SIGSTOP even if the LWP is stopped.
13305 (send_sigstop_callback): New.
13306 (stop_all_lwps): Use send_sigstop_callback instead.
13307 (linux_resume_one_thread): Adjust.
13308 (proceed_one_lwp): Still proceed an LWP that the client has
13309 requested to stop, if we haven't reported it as stopped yet. Make
13310 sure that LWPs the client want stopped, have a pending SIGSTOP.
13311
bc3b5632
DE
133122010-04-26 Doug Evans <dje@google.com>
13313
ae1ada35
DE
13314 * server.c (handle_general_set): Make static.
13315
bc3b5632
DE
13316 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13317 Print received char after testing for error/eof instead of before.
13318 (input_interrupt): Tweak comment.
13319
65730243
DE
133202010-04-23 Doug Evans <dje@google.com>
13321
13322 * server.c (start_inferior): Print inferior argv if --debug.
13323
a8ae7dc0
AR
133242010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13325
13326 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13327 * nto-x86-low.c: Include server.h
13328
1c07cc19
PM
133292010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13330
13331 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13332 be consistent with other sources of this directory.
13333 (init_registers_amd64): Correct name of source file of this function
13334 in the comment.
13335
e0a61e09
PM
133362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13337
13338 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13339 64-bit executables.
13340
54709339
PM
133412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13342
13343 * win32-i386-low.c: Add 64-bit support.
13344 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13345 (init_registers_amd64): Declare.
13346 (mappings): Add 64-bit version of array.
13347 (init_windows_x86): New function.
13348 (the_low_target): Change init_arch field to init_windows_x86.
13349
e8f0053d
PM
133502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13351
13352 * win32-low.c: Adapt to support also 64-bit architecture.
13353 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13354 (get_image_name): Use SIZE_T type for local variable `done'.
13355 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13356 (toolhelp_get_dll_name): Idem.
13357 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13358 Use uintptr_t typecast to avoid warning.
13359 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13360 (handle_exception): Use phex_nz to avoid warning.
13361 (win32_wait): Remove unused local variable `process'.
13362
c481e77e
PM
133632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13364
13365 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13366 `amd64-avx.o'.
13367
12ea4b69
PM
133682010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13369
13370 * configure.ac: Use `ws2_32' library for srv_mingw.
13371 * configure: Regenerate.
13372 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13373 * remote-utils.c: Likewise.
13374
f6d1620c
L
133752010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13376
13377 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13378 if __x86_64__ is defined.
13379
8e642873
PM
133802010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13381
13382 * configure: Regenerate.
13383
711e434b
PM
133842010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13385
13386 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13387 * target.h (target_ops): New get_tib_address field.
13388 * win32-low.h (win32_thread_info): Add thread_local_base field.
13389 * win32-low.c (child_add_thread): Add tlb argument.
13390 Set thread_local_base field to TLB.
13391 (get_child_debug_event): Adapt to child_add_thread change.
13392 (win32_get_tib_address): New function.
13393 (win32_target_ops): Set get_tib_address field to
13394 win32_get_tib_address.
13395 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13396
505106cd
PA
133972010-04-12 Pedro Alves <pedro@codesourcery.com>
13398
505106cd
PA
13399 * linux-low.c (linux_mourn): Also remove the process.
13400 * server.c (handle_target_event): Don't remove the process here.
13401 * nto-low.c (nto_mourn): New.
13402 (nto_target_ops): Install it.
13403 * spu-low.c (spu_mourn): New.
13404 (spu_target_ops): Install it.
13405 * win32-low.c (win32_mourn): New.
13406 (win32_target_ops): Install it.
13407
e8470a06
PA
134082010-04-12 Pedro Alves <pedro@codesourcery.com>
13409
13410 * server.h (buffer_xml_printf): Remove redundant `;'.
13411
45ba0d02
PA
134122010-04-12 Pedro Alves <pedro@codesourcery.com>
13413
13414 * regcache.c (set_register_cache): Invalidate regcaches before
13415 changing the register cache layout.
13416 (regcache_invalidate_one): Allow a NULL regcache.
13417 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13418 regcaches before changing the register cache layout or the target
13419 regsets.
13420
59e04013
L
134212010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13422
13423 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13424 variable warning on Linux/x86-64.
13425
8336d594
PA
134262010-04-11 Pedro Alves <pedro@codesourcery.com>
13427
13428 GDBserver disconnected tracing support.
13429
13430 * linux-low.c (linux_remove_process): Delete.
13431 (add_lwp): Don't set last_resume_kind here.
13432 (linux_kill): Use `mourn'.
13433 (linux_detach): Use `thread_db_detach', and `mourn'.
13434 (linux_mourn): New.
13435 (linux_attach_lwp_1): Adjust comment.
13436 (linux_attach): last_resume_kind moved the thread_info; adjust.
13437 (status_pending_p_callback): Adjust.
13438 (linux_wait_for_event_1): Adjust.
13439 (count_events_callback, select_singlestep_lwp_callback)
13440 (select_event_lwp_callback, cancel_breakpoints_callback)
13441 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13442 (proceed_one_lwp): Adjust.
13443 (linux_async): Add debug output.
13444 (linux_thread_stopped): New.
13445 (linux_pause_all): New.
13446 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13447 linux_pause_all.
13448 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13449 (thread_db_free): Delete declaration.
13450 (thread_db_detach, thread_db_mourn): Declare.
13451 * thread-db.c (thread_db_init): Use thread_db_mourn.
13452 (thread_db_free): Delete, split in two.
13453 (disable_thread_event_reporting): New.
13454 (thread_db_detach): New.
13455 (thread_db_mourn): New.
13456
13457 * server.h (struct thread_info) <last_resume_kind>: New field.
13458 <attached>: Add comment.
13459 <gdb_detached>: New field.
13460 (handler_func): Change return type to int.
13461 (handle_serial_event, handle_target_event): Ditto.
13462 (gdb_connected): Declare.
13463 (tracing): Delete.
13464 (disconnected_tracing): Declare.
13465 (stop_tracing): Declare.
13466
13467 * server.c (handle_query) <qSupported>: Report support for
13468 disconnected tracing.
13469 (queue_stop_reply_callback): Account for running threads.
13470 (gdb_wants_thread_stopped): New.
13471 (gdb_wants_all_threads_stopped): New.
13472 (gdb_reattached_process): New.
13473 (handle_status): Clear the `gdb_detached' flag of all processes.
13474 In all-stop, stop all threads.
13475 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13476 (process_serial_event): If the remote connection breaks, or if an
13477 exit was forced with "monitor exit", force an event loop exit.
13478 Handle disconnected tracing on detach.
13479 (handle_serial_event): Adjust.
13480 (handle_target_event): If GDB isn't connected, forward events back
13481 to the inferior, unless the last process exited, in which case,
13482 exit gdbserver. Adjust interface.
13483
13484 * remote-utils.c (remote_open): Don't block in accept. Instead
13485 register an event loop source on the listen socket file
13486 descriptor. Refactor bits into ...
13487 (listen_desc): ... this new global.
13488 (gdb_connected): ... this new function.
13489 (enable_async_notification): ... this new function.
13490 (handle_accept_event): ... this new function.
13491 (remote_close): Clear remote_desc.
13492
13493 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13494
13495 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13496 New fields.
13497 (mourn_inferior): Define.
13498 (target_process_qsupported): Avoid the dangling else problem.
13499 (thread_stopped): Define.
13500 (pause_all): Define.
13501 (target_waitstatus_to_string): Declare.
13502 * target.c (target_waitstatus_to_string): New.
13503
13504 * tracepoint.c (tracing): Make extern.
13505 (disconnected_tracing): New.
13506 (stop_tracing): Make extern. Handle tracing stops due to GDB
13507 disconnecting.
13508 (cmd_qtdisconnected): New.
13509 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13510 (handle_tracepoint_general_set): Handle QTDisconnected.
13511
13512 * event-loop.c (event_handler_func): Change return type to int.
13513 (process_event): Bail out if the event handler wants the event
13514 loop to stop.
13515 (handle_file_event): Ditto.
13516 (start_event_loop): Bail out if the event handler wants the event
13517 loop to stop.
13518
13519 * nto-low.c (nto_target_ops): Adjust.
13520 * spu-low.c (spu_wait): Don't remove the process here.
13521 (spu_target_ops): Adjust.
13522 * win32-low.c (win32_wait): Don't remove the process here.
13523 (win32_target_ops): Adjust.
13524
5d267c4c
PA
135252010-04-11 Pedro Alves <pedro@codesourcery.com>
13526
13527 * regcache.c (realloc_register_cache): Invalidate inferior's
13528 regcache before recreating it.
13529
623ccd72
PA
135302010-04-09 Pedro Alves <pedro@codesourcery.com>
13531
13532 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13533
219f2f23
PA
135342010-04-09 Stan Shebs <stan@codesourcery.com>
13535 Pedro Alves <pedro@codesourcery.com>
13536
13537 * server.h (LONGEST): New.
13538 (struct thread_info) <while_stepping>: New field.
13539 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13540 Declare.
13541 (initialize_tracepoint, handle_tracepoint_general_set)
13542 (handle_tracepoint_query, tracepoint_finished_step)
13543 (tracepoint_was_hit, release_while_stepping_state_list):
13544 (current_traceframe): Declare.
13545 * server.c (handle_general_set): Handle tracepoint packets.
13546 (read_memory): New.
13547 (write_memory): New.
13548 (handle_search_memory_1): Use read_memory.
13549 (handle_query): Report support for conditional tracepoints, trace
13550 state variables, and tracepoint sources. Handle tracepoint
13551 queries.
13552 (main): Initialize the tracepoints module.
13553 (process_serial_event): Handle traceframe reads/writes.
13554
13555 * linux-low.c (handle_tracepoints): New.
13556 (linux_wait_1): Call it.
13557 (linux_resume_one_lwp): Handle while-stepping.
13558 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13559 (linux_target_ops): Install them.
13560 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13561 New field.
13562 * linux-x86-low.c (x86_supports_tracepoints): New.
13563 (the_low_target). Install it.
13564
13565 * mem-break.h (delete_breakpoint): Declare.
13566 * mem-break.c (delete_breakpoint): Make external.
13567
13568 * target.h (struct target_ops): Add `supports_tracepoints',
13569 `read_pc', and `write_pc' fields.
13570 (target_supports_tracepoints): Define.
13571 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13572 (phex_nz): New.
13573
13574 * regcache.h (struct regcache) <registers_owned>: New field.
13575 (init_register_cache, regcache_cpy): Declare.
13576 (regcache_read_pc, regcache_write_pc): Declare.
13577 (register_cache_size): Declare.
13578 (supply_regblock): Declare.
13579 * regcache.c (init_register_cache): New.
13580 (new_register_cache): Use it.
13581 (regcache_cpy): New.
13582 (register_cache_size): New.
13583 (supply_regblock): New.
13584 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13585
219f2f23
PA
13586 * tracepoint.c: New.
13587
13588 * Makefile.in (OBS): Add tracepoint.o.
13589 (tracepoint.o): New rule.
13590
3a13a53b
L
135912010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13592
13593 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13594 (i386-mmx.o): New.
13595 (i386-mmx.c): Likewise.
13596 (i386-mmx-linux.o): Likewise.
13597 (i386-mmx-linux.c): Likewise.
13598
13599 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13600 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13601 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13602 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13603
13604 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13605 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13606 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13607
1570b33e
L
136082010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13609
13610 * Makefile.in (clean): Updated.
13611 (i386-avx.o): New.
13612 (i386-avx.c): Likewise.
13613 (i386-avx-linux.o): Likewise.
13614 (i386-avx-linux.c): Likewise.
13615 (amd64-avx.o): Likewise.
13616 (amd64-avx.c): Likewise.
13617 (amd64-avx-linux.o): Likewise.
13618 (amd64-avx-linux.c): Likewise.
13619
13620 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13621 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13622 (srv_amd64_regobj): Add amd64-avx.o.
13623 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13624 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13625 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13626 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13627 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13628 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13629 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13630
13631 * i387-fp.c: Include "i386-xstate.h".
13632 (i387_xsave): New.
13633 (i387_cache_to_xsave): Likewise.
13634 (i387_xsave_to_cache): Likewise.
13635 (x86_xcr0): Likewise.
13636
13637 * i387-fp.h (i387_cache_to_xsave): Likewise.
13638 (i387_xsave_to_cache): Likewise.
13639 (x86_xcr0): Likewise.
13640
13641 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13642 * linux-crisv32-low.c (target_regsets): Likewise.
13643 * linux-m68k-low.c (target_regsets): Likewise.
13644 * linux-mips-low.c (target_regsets): Likewise.
13645 * linux-ppc-low.c (target_regsets): Likewise.
13646 * linux-s390-low.c (target_regsets): Likewise.
13647 * linux-sh-low.c (target_regsets): Likewise.
13648 * linux-sparc-low.c (target_regsets): Likewise.
13649 * linux-xtensa-low.c (target_regsets): Likewise.
13650
13651 * linux-low.c: Include <sys/uio.h>.
13652 (regsets_fetch_inferior_registers): Support nt_type.
13653 (regsets_store_inferior_registers): Likewise.
13654 (linux_process_qsupported): New.
13655 (linux_target_ops): Add linux_process_qsupported.
13656
13657 * linux-low.h (regset_info): Add nt_type.
13658 (linux_target_ops): Add process_qsupported.
13659
13660 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13661 and <sys/uio.h>.
13662 (init_registers_i386_avx_linux): New.
13663 (init_registers_amd64_avx_linux): Likewise.
13664 (xmltarget_i386_linux_no_xml): Likewise.
13665 (xmltarget_amd64_linux_no_xml): Likewise.
13666 (PTRACE_GETREGSET): Likewise.
13667 (PTRACE_SETREGSET): Likewise.
13668 (x86_fill_xstateregset): Likewise.
13669 (x86_store_xstateregset): Likewise.
13670 (use_xml): Likewise.
13671 (x86_linux_update_xmltarget): Likewise.
13672 (x86_linux_process_qsupported): Likewise.
13673 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13674 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13675 init_registers_i386_linux here. Call
13676 x86_linux_update_xmltarget.
13677 (the_low_target): Add x86_linux_process_qsupported.
13678
13679 * server.c (handle_query): Call target_process_qsupported.
13680
13681 * target.h (target_ops): Add process_qsupported.
13682 (target_process_qsupported): New.
13683
fc7238bb
PA
136842010-04-03 Pedro Alves <pedro@codesourcery.com>
13685
13686 * inferiors.c (add_thread): Set last_status kind to
13687 TARGET_WAITKIND_IGNORE.
13688 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13689 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13690 (linux_wait_1): Move `thread' local definition to block that uses
13691 it. Don't NULL initialize `event_child'.
13692 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13693 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13694 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13695
bdabb078
PA
136962010-04-01 Pedro Alves <pedro@codesourcery.com>
13697
13698 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13699 an extended waitstatus, or by a watchpoint.
13700 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13701 thread was stepping or has been stopped by a watchpoint.
13702
d3bbe7a0
PA
137032010-04-01 Pedro Alves <pedro@codesourcery.com>
13704
13705 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13706 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13707 of another, then delete the previous, and validate all
13708 breakpoints.
13709 (validate_inserted_breakpoint): New.
13710 (delete_disabled_breakpoints): New.
13711 (validate_breakpoints): New.
13712 (check_mem_read): Validate breakpoints before trusting their
13713 shadow. Delete disabled breakpoints.
13714 (check_mem_write): Validate breakpoints before trusting they
13715 should be inserted. Delete disabled breakpoints.
13716 * mem-break.h (validate_breakpoints):
13717 * server.c (handle_query): Validate breakpoints when we see a
13718 qSymbol query.
13719
8b07ae33
PA
137202010-04-01 Pedro Alves <pedro@codesourcery.com>
13721
13722 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13723 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13724 if we could tell there's a GDB breakpoint at stop_pc.
13725 (need_step_over_p): Don't do a step over if we find a GDB
13726 breakpoint at the resume PC.
13727
13728 * mem-break.c (struct raw_breakpoint): New.
13729 (enum bkpt_type): New type `gdb_breakpoint'.
13730 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13731 fields. New field `raw'.
13732 (find_raw_breakpoint_at): New.
13733 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13734 breakpoint instead.
13735 (set_breakpoint_at): Adjust.
13736 (delete_raw_breakpoint): New.
13737 (release_breakpoint): New.
13738 (delete_breakpoint): Rename to...
13739 (delete_breakpoint_1): ... this. Add proc parameter. Use
13740 release_breakpoint. Return ENOENT.
13741 (delete_breakpoint): Reimplement.
13742 (find_breakpoint_at): Delete.
13743 (find_gdb_breakpoint_at): New.
13744 (delete_breakpoint_at): Delete.
13745 (set_gdb_breakpoint_at): New.
13746 (delete_gdb_breakpoint_at): New.
13747 (gdb_breakpoint_here): New.
13748 (set_reinsert_breakpoint): Use release_breakpoint.
13749 (uninsert_breakpoint): Rename to ...
13750 (uninsert_raw_breakpoint): ... this.
13751 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13752 (reinsert_raw_breakpoint): Change parameter type to
13753 raw_breakpoint.
13754 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13755 instead.
13756 (check_breakpoints): Adjust. Use release_breakpoint.
13757 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13758 (breakpoint_inserted_here): Ditto.
13759 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13760 Don't trust the breakpoint's shadow if it is not inserted.
13761 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13762 (delete_all_breakpoints): Adjust.
13763 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13764 use delete_breakpoint_1.
13765
13766 * mem-break.h (breakpoints_supported): Delete declaration.
13767 (set_gdb_breakpoint_at): Declare.
13768 (gdb_breakpoint_here): Declare.
13769 (delete_breakpoint_at): Delete.
13770 (delete_gdb_breakpoint_at): Declare.
13771
13772 * server.h (struct raw_breakpoint): Forward declare.
13773 (struct process_info): New field `raw_breakpoints'.
13774
13775 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13776 breakpoints.
13777
6bf5e0ba
PA
137782010-03-24 Pedro Alves <pedro@codesourcery.com>
13779
13780 * linux-low.c (status_pending_p_callback): Fix comment.
13781 (linux_wait_for_event_1): Move most of the internal breakpoint
13782 handling from here...
13783 (linux_wait_1): ... to here.
13784 (count_events_callback): New.
13785 (select_singlestep_lwp_callback): New.
13786 (select_event_lwp_callback): New.
13787 (cancel_breakpoints_callback): New.
13788 (select_event_lwp): New.
13789 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13790 priority to all LWPs that have had events that should be reported
13791 to the client. Cancel breakpoints when about to reporting the
13792 event to the client, not while stopping lwps. No longer cancel
13793 finished single-steps here.
13794 (cancel_finished_single_step): Delete.
13795 (cancel_finished_single_steps): Delete.
13796
414a389f
PA
137972010-03-24 Pedro Alves <pedro@codesourcery.com>
13798
13799 * mem-break.c (enum bkpt_type): New.
13800 (struct breakpoint): New field `type'.
13801 (set_breakpoint_at): Change return type to struct breakpoint
13802 pointer. Set type to `other_breakpoint' by default.
13803 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13804 in the breakpoint list.
13805 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13806 (reinsert_breakpoint): Rename to ...
13807 (reinsert_raw_breakpoint): ... this.
13808 (reinsert_breakpoints_at): Adjust.
13809 * mem-break.h (struct breakpoint): Declare.
13810 (set_breakpoint_at): Change return type to struct breakpoint
13811 pointer.
13812
2280c721
PA
138132010-03-24 Pedro Alves <pedro@codesourcery.com>
13814
13815 * server.c (handle_query): Assign, not compare.
13816
d50171e4
PA
138172010-03-24 Pedro Alves <pedro@codesourcery.com>
13818
13819 Teach linux gdbserver to step-over-breakpoints.
13820
13821 * linux-low.c (can_hardware_single_step): New.
13822 (supports_breakpoints): New.
13823 (handle_extended_wait): If stopping threads, read the stop pc of
13824 the new cloned LWP.
13825 (get_pc): New.
13826 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13827 low target doesn't support retrieving the PC.
13828 (add_lwp): Set last_resume_kind to resume_continue.
13829 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13830 (linux_attach): Don't clear stop_expected. Set the lwp's
13831 last_resume_kind to resume_stop.
13832 (linux_detach_one_lwp): Don't check for removed breakpoints.
13833 (check_removed_breakpoint): Delete.
13834 (status_pending_p): Rename to ...
13835 (status_pending_p_callback): ... this. Don't check for removed
13836 breakpoints. Don't consider threads that are stopped from GDB's
13837 perspective.
13838 (linux_wait_for_lwp): Always read the stop_pc here.
13839 (cancel_breakpoint): New.
13840 (step_over_bkpt): New global.
13841 (linux_wait_for_event_1): Implement stepping over breakpoints.
13842 (gdb_wants_lwp_stopped): New.
13843 (gdb_wants_all_stopped): New.
13844 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13845 single-step traps here. Store the thread's last reported target
13846 wait status.
13847 (send_sigstop): Don't clear stop_expected. Always set it,
13848 instead.
13849 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13850 (cancel_finished_single_step): New.
13851 (cancel_finished_single_steps): New.
13852 (wait_for_sigstop): Don't cancel finished single-step traps here.
13853 (linux_resume_one_lwp): Don't check for removed breakpoints.
13854 Don't set `step' on non-hardware step archs.
13855 (linux_set_resume_request): Ignore resume_stop requests if already
13856 stopping or stopped. Set the lwp's last_resume_kind.
13857 (resume_status_pending_p): Don't check for removed breakpoints.
13858 (need_step_over_p): New.
13859 (start_step_over): New.
13860 (finish_step_over): New.
13861 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13862 requests. Clear the thread's last reported target waitstatus.
13863 Don't use the `suspended' flag. Don't consider pending breakpoints.
13864 (linux_resume): Start a step-over if necessary.
13865 (proceed_one_lwp): New.
13866 (proceed_all_lwps): New.
13867 (unstop_all_lwps): New.
13868 * linux-low.h (struct lwp_info): Rewrite comment for the
13869 `suspended' flag. Add the `stop_pc' field. Delete the
13870 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13871 Add `'last_resume_kind' and `need_step_over' fields.
13872 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13873 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13874 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13875 (set_raw_breakpoint_at): New.
13876 (set_breakpoint_at): Rewrite to use it.
13877 (reinsert_breakpoint_handler): Delete.
13878 (set_reinsert_breakpoint): New.
13879 (reinsert_breakpoint_by_bp): Delete.
13880 (delete_reinsert_breakpoints): New.
13881 (uninsert_breakpoint): Rewrite.
13882 (uninsert_breakpoints_at): New.
13883 (reinsert_breakpoint): Rewrite.
13884 (reinsert_breakpoints_at): New.
13885 (check_breakpoints): Rewrite.
13886 (breakpoint_here): New.
13887 (breakpoint_inserted_here): New.
13888 (check_mem_read): Adjust.
13889 * mem-break.h (breakpoints_supported, breakpoint_here)
13890 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13891 (reinsert_breakpoint_by_bp): Delete declaration.
13892 (delete_reinsert_breakpoints): Declare.
13893 (reinsert_breakpoint): Delete declaration.
13894 (reinsert_breakpoints_at): Declare.
13895 (uninsert_breakpoint): Delete declaration.
13896 (uninsert_breakpoints_at): Declare.
13897 (check_breakpoints): Adjust prototype.
13898 * server.h: Adjust include order.
13899 (struct thread_info): Declare here. Add a `last_status' field.
13900
30ba68cb
MS
139012010-03-23 Michael Snyder <msnyder@vmware.com>
13902
13903 * server.c (crc32): New function.
13904 (handle_query): Add handling for 'qCRC:' request.
13905
b9a881c2
PA
139062010-03-23 Pedro Alves <pedro@codesourcery.com>
13907
13908 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13909 lwp had been stopped by a watchpoint.
13910
e92d13d5
PA
139112010-03-16 Pedro Alves <pedro@codesourcery.com>
13912
13913 * server.h (internal_error): Declare.
13914 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13915 * utils.c (internal_error): New function.
13916
64daa791
AS
139172010-03-15 Andreas Schwab <schwab@redhat.com>
13918
13919 * configure.srv: Fix typo setting srv_regobj.
13920
f52cd8cd
PA
139212010-03-15 Pedro Alves <pedro@codesourcery.com>
13922
13923 * linux-low.c (fetch_register): Avoid passing a non string literal
13924 format to `error'.
13925 (usr_store_inferior_registers): Ditto.
13926
93ae6fdc
PA
139272010-03-14 Pedro Alves <pedro@codesourcery.com>
13928
13929 * linux-low.c (linux_write_memory): Bail out early if peeking
13930 memory failed.
13931
c3adc08c
PA
139322010-03-14 Pedro Alves <pedro@codesourcery.com>
13933
13934 * linux-low.h (struct lwp_info): New fields
13935 `stopped_by_watchpoint' and `stopped_data_address'.
13936 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13937 here, and cache them in the lwp object.
13938 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13939 directly.
13940 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13941 field.
13942 (linux_stopped_by_watchpoint): Rewrite.
13943 (linux_stopped_data_address): Rewrite.
13944
bce522a2
PA
139452010-03-06 Simo Melenius <simo.melenius@iki.fi>
13946
13947 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13948 switching the current inferior, not before.
13949
90884b2b
L
139502010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13951
13952 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13953 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13954 i386-linux.c and amd64-linux.c.
13955 (reg-i386.o): Removed.
13956 (reg-i386.c): Likewise.
13957 (reg-i386-linux.o): Likewise.
13958 (reg-i386-linux.c): Likewise.
13959 (reg-x86-64.o): Likewise.
13960 (reg-x86-64.c): Likewise.
13961 (reg-x86-64-linux.o): Likewise.
13962 (reg-x86-64-linux.c): Likewise.
13963 (i386.o): New.
13964 (i386.c): Likewise.
13965 (i386-linux.o): Likewise.
13966 (i386-linux.c): Likewise.
13967 (amd64.o): Likewise.
13968 (amd64.c): Likewise.
13969 (amd64-linux.o): Likewise.
13970 (amd64-linux.c): Likewise.
13971
13972 * configure.srv (srv_i386_regobj): New.
13973 (srv_i386_linux_regobj): Likewise.
13974 (srv_amd64_regobj): Likewise.
13975 (srv_amd64_linux_regobj): Likewise.
13976 (srv_i386_32bit_xmlfiles): Likewise.
13977 (srv_i386_64bit_xmlfiles): Likewise.
13978 (srv_i386_xmlfiles): Likewise.
13979 (srv_amd64_xmlfiles): Likewise.
13980 (srv_i386_linux_xmlfiles): Likewise.
13981 (srv_amd64_linux_xmlfiles): Likewise.
13982 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13983 srv_xmlfiles to $srv_i386_xmlfiles.
13984 (i[34567]86-*-mingw32ce*): Likewise.
13985 (i[34567]86-*-mingw*): Likewise.
13986 (i[34567]86-*-nto*): Likewise.
13987 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13988 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13989 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13990 (x86_64-*-linux*): Likewise.
13991
13992 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13993 (init_registers_amd64_linux): New.
13994 (x86_arch_setup): Replace init_registers_x86_64_linux with
13995 init_registers_amd64_linux.
13996
193f13e6
MK
139972010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13998
13999 * configure.ac: Check for libdl. If it is not available link against
14000 static libthread_db.
14001 * configure: Regenerate.
14002
85d721b8
PA
140032010-02-22 Pedro Alves <pedro@codesourcery.com>
14004
14005 PR9605
14006
14007 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14008 handing a read watchpoint.
14009 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14010
6076632b
DE
140112010-02-12 Doug Evans <dje@google.com>
14012
14013 * linux-low.c (linux_supports_tracefork_flag): Document.
14014 (linux_look_up_symbols): Add comment.
14015
3327ccf7
L
140162010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14017
14018 * regcache.c (supply_register): Clear regcache if buf is NULL.
14019
0718675c 140202010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14021 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14022
14023 * inferiors.c (find_inferior): Add function documentation.
14024 (unloaded_dll): Handle the case where the unloaded dll has not
14025 been previously registered in the dll list.
14026
177321bd
DJ
140272010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14028
14029 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14030 (thumb2_breakpoint): New.
14031 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14032
2b009048
DJ
140332010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14034
14035 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14036 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14037 breakpoints.
14038
3be029c7
PA
140392010-01-21 Pedro Alves <pedro@codesourcery.com>
14040
14041 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14042
18f5de3b
JK
140432010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14044
14045 * linux-s390-low.c (s390_collect_ptrace_register)
14046 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14047
3743bb4f
DE
140482010-01-21 Doug Evans <dje@google.com>
14049
14ce3065
DE
14050 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14051 (PTRACE_ARG4_TYPE): New macro.
14052 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14053 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14054 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14055 (usr_store_inferior_registers): Ditto.
14056 (linux_read_memory, linux_write_memory): Ditto.
14057 (linux_test_for_tracefork): Ditto.
14058
3743bb4f
DE
14059 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14060 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14061
8b315be5
PA
140622010-01-21 Pedro Alves <pedro@codesourcery.com>
14063
14064 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14065 target.
14066
85492558
PA
140672010-01-21 Pedro Alves <pedro@codesourcery.com>
14068
14069 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14070 prototype to take a regcache. Adjust.
14071
442ea881
PA
140722010-01-20 Pedro Alves <pedro@codesourcery.com>
14073
14074 * regcache.h (struct thread_info): Forward declare.
14075 (struct regcache): New.
14076 (new_register_cache): Adjust prototype.
14077 (get_thread_regcache): Declare.
14078 (free_register_cache): Adjust prototype.
14079 (registers_to_string, registers_from_string): Ditto.
14080 (supply_register, supply_register_by_name, collect_register)
14081 (collect_register_as_string, collect_register_by_name): Ditto.
14082 * regcache.c (struct inferior_regcache_data): Delete.
14083 (get_regcache): Rename to ...
14084 (get_thread_regcache): ... this. Adjust. Switch inferior before
14085 fetching registers.
14086 (regcache_invalidate_one): Adjust.
14087 (regcache_invalidate): Fix prototype.
14088 (new_register_cache): Return the new register cache.
14089 (free_register_cache): Change prototype.
14090 (realloc_register_cache): Adjust.
14091 (registers_to_string): Change prototype to take a regcache. Adjust.
14092 (registers_from_string): Ditto.
14093 (register_data): Ditto.
14094 (supply_register): Ditto.
14095 (supply_register_by_name): Ditto.
14096 (collect_register): Ditto.
14097 (collect_register_as_string): Ditto.
14098 (collect_register_by_name): Ditto.
14099 * server.c (process_serial_event): Adjust.
14100 * linux-low.h (regset_fill_func, regset_store_func): Change
14101 prototype.
14102 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14103 Change prototype.
14104 * linux-low.c (get_stop_pc): Adjust.
14105 (check_removed_breakpoint): Adjust.
14106 (linux_wait_for_event): Adjust.
14107 (linux_resume_one_lwp): Adjust.
14108 (fetch_register): Add regcache parameter. Adjust.
14109 (usr_store_inferior_registers): Ditto.
14110 (regsets_fetch_inferior_registers): Ditto.
14111 (regsets_store_inferior_registers): Ditto.
14112 (linux_fetch_registers, linux_store_registers): Ditto.
14113 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14114 regcache. Adjust.
43aaf8b6
PA
14115 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14116 Ditto.
442ea881
PA
14117 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14118 prototype to take a regcache.
14119 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14120 * remote-utils.c (convert_ascii_to_int, outreg)
14121 (prepare_resume_reply): Change prototype to take a regcache.
14122 Adjust.
14123 * target.h (struct target_ops) <fetch_registers, store_registers>:
14124 Change prototype to take a regcache.
14125 (fetch_inferior_registers, store_inferior_registers): Change
14126 prototype to take a regcache. Adjust.
14127 * proc-service.c (ps_lgetregs): Adjust.
14128 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14129 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14130 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14131 take a regcache. Adjust.
14132 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14133 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14134 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14135 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14136 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14137 (cris_cannot_fetch_register):
14138 (cris_breakpoint_at): Change prototype to take a regcache.
14139 Adjust.
14140 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14141 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14142 to take a regcache. Adjust.
14143 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14144 Adjust.
14145 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14146 take a regcache. Adjust.
14147 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14148 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14149 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14150 * linux-mips-low.c (mips_get_pc):
14151 (mips_set_pc): Change prototype to take a regcache. Adjust.
14152 (mips_reinsert_addr): Adjust.
14153 (mips_collect_register): Change prototype to take a regcache.
14154 Adjust.
14155 (mips_supply_register):
14156 (mips_collect_register_32bit, mips_supply_register_32bit)
14157 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14158 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14159 * linux-ppc-low.c (ppc_supply_ptrace_register)
14160 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14161 (parse_spufs_run): Adjust.
14162 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14163 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14164 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14165 take a regcache. Adjust.
14166 * linux-s390-low.c (s390_collect_ptrace_register)
14167 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14168 (s390_set_pc): Change prototype to take a regcache. Adjust.
14169 (s390_arch_setup): Adjust.
14170 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14171 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14172 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14173 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14174 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14175 regcache. Adjust.
14176 (sparc_breakpoint_at): Adjust.
14177 * linux-xtensa-low.c (xtensa_fill_gregset):
14178 (xtensa_store_gregset):
14179 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14180 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14181 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14182 prototype to take a regcache. Adjust.
14183 * win32-arm-low.c (arm_fetch_inferior_register)
14184 (arm_store_inferior_register): Change prototype to take a
14185 regcache. Adjust.
14186 * win32-i386-low.c (i386_fetch_inferior_register)
14187 (i386_store_inferior_register): Change prototype to take a
14188 regcache. Adjust.
14189 * win32-low.c (child_fetch_inferior_registers)
14190 (child_store_inferior_registers): Change prototype to take a
14191 regcache. Adjust.
14192 (win32_wait): Adjust.
14193 (win32_fetch_inferior_registers): Change prototype to take a
14194 regcache. Adjust.
14195 (win32_store_inferior_registers): Adjust.
14196 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14197 store_inferior_register>: Change prototype to take a regcache.
14198
60c3d7b0
DE
141992010-01-20 Doug Evans <dje@google.com>
14200
14201 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14202 #ifdef.
14203 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14204 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14205
dc146f7c
VP
142062010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14207
14208 * linux-low.c (linux_core_of_thread): New.
14209 (compare_ints, show_process, list_threads): New.
14210 (linux_qxfer_osdata): Report threads and cores.
14211 (linux_target_op): Register linux_core_of_thread.
14212 * remote-utils.c (prepare_resume_reply): Report the core.
14213 (buffer_xml_printf): Support %d specifier.
14214 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14215 New.
14216 (handle_query): Handle qXfer:threads. Announce availability
14217 thereof.
14218 * target.h (struct target_ops): New field core_of_thread.
14219
7803799a
UW
142202010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14221
14222 * Makefile.in (clean): Remove new generated files.
14223 (reg-s390.o, reg-s390.c): Remove rules.
14224 (reg-s390x.o, reg-s390x.c): Likewise.
14225 (s390-linux32.o, s390-linux32.c): Add rules.
14226 (s390-linux64.o, s390-linux64.c): Likewise.
14227 (s390x-linux64.o, s390x-linux64.c): Likewise.
14228 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14229 * linux-s390-low.c: Include <elf.h>.
14230 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14231 (init_registers_s390): Remove prototype.
14232 (init_registers_s390x): Likewise.
14233 (init_registers_s390_linux32): Add prototype.
14234 (init_registers_s390_linux64): Likewise.
14235 (init_registers_s390x_linux64): Likewise.
14236 (s390_num_regs_3264): New define.
14237 (s390_regmap_3264): New global variable.
14238 (s390_cannot_fetch_register): Remove obsolete check.
14239 (s390_cannot_store_register): Likewise.
14240 (s390_collect_ptrace_register): Handle upper/lower register halves.
14241 (s390_supply_ptrace_register): Likewise.
14242 (s390_fill_gregset): Update to register number changes.
14243 (s390_get_hwcap): New routine.
14244 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14245 Install appropriate regmap and register set.
14246
6e7ffa39
JB
142472010-01-01 Joel Brobecker <brobecker@adacore.com>
14248
14249 * server.c (gdbserver_version): Update copyright year to 2010.
14250 * gdbreplay.c (gdbreplay_version): Likewise.
14251
957f3f49
DE
142522009-12-28 Doug Evans <dje@google.com>
14253
14254 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14255 elf/external.h. Include <elf.h> instead but only if necessary.
14256
ca5c370d
PA
142572009-12-28 Pedro Alves <pedro@codesourcery.com>
14258
14259 * linux-low.c (linux_remove_process): Remove `detaching'
14260 parameter. Don't release/detach from thread_db here.
14261 (linux_kill): Release/detach from thread_db here, ...
14262 (linux_detach): ... and here, before actually detaching.
14263 (linux_wait_1): ... and here, when a process exits.
14264 * thread-db.c (any_thread_of): New.
14265 (thread_db_free): Switch the current inferior to a thread of the
14266 passed in process.
14267
4ee62156
DE
142682009-12-21 Doug Evans <dje@google.com>
14269
d90e6a88
DE
14270 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14271
c5f62d5f
DE
14272 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14273 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14274 warning ifndef __NR_tkill. Move setting of errno there too.
14275 Delete unnecessary resetting of errno after syscall.
14276 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14277
10e86dd7
DE
14278 * configure.ac: Check for dladdr.
14279 * config.in: Regenerate.
14280 * configure: Regenerate.
14281 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14282 (try_thread_db_load): Update.
14283
4ee62156
DE
14284 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14285
00f515da
DE
142862009-12-18 Doug Evans <dje@google.com>
14287
e9464885
DE
14288 * event-loop.c: Include unistd.h if it exists.
14289
07d4f67e
DE
14290 * linux-low.c (my_waitpid): Move definition away from being in
14291 between linux_tracefork_child/linux_test_for_tracefork.
14292
00f515da
DE
14293 * gdb_proc_service.h (psaddr_t): Fix type.
14294 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14295 signature to match glibc.
14296
1de1badb
DE
142972009-12-16 Doug Evans <dje@google.com>
14298
14299 * linux-low.c (linux_read_memory): Fix argument to read.
14300
aeeb81d1
PA
143012009-11-26 Pedro Alves <pedro@codesourcery.com>
14302
14303 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14304 events, don't leave current_inferior pointing at null.
14305
10357975
PA
143062009-11-26 Pedro Alves <pedro@codesourcery.com>
14307
14308 * win32-low.c (LOG): Delete.
14309 (OUTMSG): Output to stderr.
14310 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14311 on compile time LOG macro.
14312 (win32_wait): Fix debug output.
14313
cf6e3471
PA
143142009-11-26 Pedro Alves <pedro@codesourcery.com>
14315
14316 * win32-low.c (win32_add_one_solib): If the dll name is
14317 "ntdll.dll", prepend the system directory to the dll path.
14318
0c85e18e
MK
143192009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14320
14321 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14322
9ac544ce 143232009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14324 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14325
14326 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14327 * configure.ac: Check for __mcoldfire__ and set
14328 gdb_cv_m68k_is_coldfire.
14329 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14330 reg-cf.o and reg-m68k.o.
14331 * configure: Regenerated.
14332
fd7dd3e6
PA
143332009-11-16 Pedro Alves <pedro@codesourcery.com>
14334
14335 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14336 Pass it to thread_db_free.
14337 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14338 proper `detaching' argument to linux_remove_process.
14339 * linux-low.h (thread_db_free): Add `detaching' parameter.
14340 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14341 to thread_db_free.
14342 (thread_db_free): Add `detaching' parameter. Only
14343 call td_ta_clear_event if detaching from process.
14344
75aa492e
MK
143452009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14346
14347 * thread-db.c (thread_db_free): Fix typo.
14348
21e1bee4
PP
143492009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14350
14351 PR gdb/10838
14352 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14353
8838b45e
NS
143542009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14355
14356 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14357 with an i686 compiler.
14358 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14359 needed.
14360 * configure: Rebuilt.
14361
8a35fb51
SL
143622009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14363
14364 PR gdb/10783
14365
14366 * server.c (handle_search_memory_1): Correct read_addr initialization
14367 in loop for searching subsequent chunks.
14368
96f15937
PP
143692009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14370
14371 * configure.ac: New --with-libthread-db option.
14372 * thread-db.c: Allow direct dependence on libthread_db.
14373 (thread_db_free): Adjust.
14374 * config.in: Regenerate.
14375 * configure: Likewise.
889bf7c5 14376
5f7d1694
PP
143772009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14378
14379 PR gdb/10757
14380 * thread-db.c (attach_thread): New function.
14381 (maybe_attach_thread): Return success/failure.
14382 (find_new_threads_callback): Adjust.
889bf7c5
PA
14383 (thread_db_find_new_threads): Loop until no new threads.
14384
88e3b899
PA
143852009-10-13 Pedro Alves <pedro@codesourcery.com>
14386
14387 * proc-service.c (ps_lgetregs): Formatting.
14388
cdbfd419
PP
143892009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14390
14391 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14392 * configure.ac: Adjust.
14393 * linux-low.h (struct process_info_private): Move members to struct
14394 thread_db.
14395 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14396 * linux-low.c (linux_remove_process): Adjust.
14397 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14398 * server.c (handle_query): Move code ...
14399 (handle_monitor_command): ... here. New function.
14400 * target.h (struct target_ops): New member.
14401 * thread-db.c (struct thread_db): New.
14402 (libthread_db_search_path): New variable.
14403 (thread_db_create_event, thread_db_enable_reporting)
14404 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14405 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14406 (try_thread_db_load_1, dladdr_to_soname): New functions.
14407 (try_thread_db_load, thread_db_load_search): New functions.
14408 (thread_db_init): Search for libthread_db.
14409 (thread_db_free): New function.
14410 (thread_db_handle_monitor_command): Likewise.
14411 * config.in: Regenerate.
14412 * configure: Regenerate.
889bf7c5 14413
4168d2d6
UW
144142009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14415
14416 * spu-low.c (spu_kill): Wait for inferior to terminate.
14417 Call clear_inferiors.
14418 (spu_detach): Call clear_inferiors.
14419
81ecdfbb
RW
144202009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14421
14422 * aclocal.m4: Regenerate.
14423 * config.in: Likewise.
14424 * configure: Likewise.
14425
0b9ff2c0
UW
144262009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14427
14428 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14429 (parse_spufs_run): New function.
14430 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14431 (ppc_breakpoint_at): Handle SPU breakpoints.
14432
efcbbd14
UW
144332009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14434
14435 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14436 (SPUFS_MAGIC): Define.
14437 (spu_enumerate_spu_ids): New function.
14438 (linux_qxfer_spu): New function.
14439 (linux_target_ops): Install linux_qxfer_spu.
14440
f4d9bade
UW
144412009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14442
14443 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14444 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14445 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14446 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14447 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14448 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14449 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14450 (init_registers_powerpc_cell32l): Add prototype.
14451 (init_registers_powerpc_cell64l): Likewise.
14452 (ppc_arch_setup): Detect Cell/B.E. architecture.
14453
96e946ca
RW
144542009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14455
14456 * Makefile.in (datarootdir): New variable.
14457
58d6951d
DJ
144582009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14459
14460 * linux-low.c (linux_write_memory): Update debugging output.
14461 * Makefile.in (clean): Add new descriptions.
14462 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14463 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14464 * configure.srv: Add new files for arm*-*-linux*.
14465 * linux-arm-low.c: Add new declarations.
14466 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14467 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14468 (HWCAP_VFPv3D16): New.
14469 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14470 instead of __IWMMXT__.
14471 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14472 (arm_arch_setup): New.
14473 (target_regsets): Remove #ifdef. Add VFP regset.
14474 (the_low_target): Use arm_arch_setup.
14475
12b42a12
DJ
144762009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14477
14478 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14479 the main thread again.
14480
ac8c974e
AR
144812009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14482
14483 Adding Neutrino gdbserver.
14484 * configure: Regenerated.
14485 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14486 * configure.srv (i[34567]86-*-nto*): New target.
14487 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14488 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14489 (nto_comctrl) [__QNX__]: New function.
14490 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14491
4424e0c3 144922009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14493
14494 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14495 srv_tgtobj.
14496
912cf4ba
PA
144972009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14498 Pedro Alves <pedro@codesourcery.com>
14499
14500 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14501 don't support CONTEXT_EXTENDED_REGISTERS.
14502 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14503 (the_low_target): Install them.
14504 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14505 failing with ERROR_PIPE_NOT_CONNECTED.
14506
aa5ca48f
DE
145072009-06-30 Doug Evans <dje@google.com>
14508 Pierre Muller <muller@ics.u-strasbg.fr>
14509
14510 Add h/w watchpoint support to x86-linux, win32-i386.
14511 * Makefile.in (SFILES): Add i386-low.c
14512 (i386_low_h): Define.
14513 (i386-low.o): Add dependencies.
14514 (linux-x86-low.o): Add i386-low.h dependency.
14515 (win32-i386-low.o): Ditto.
14516 * i386-low.c: New file.
14517 * i386-low.h: New file.
14518 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14519 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14520 * linux-low.c (linux_add_process): Initialize arch_private.
14521 (linux_remove_process): Free arch_private.
14522 (add_lwp): Initialize arch_private.
14523 (delete_lwp): Free arch_private.
14524 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14525 provided.
14526 * linux-low.h (process_info_private): New member arch_private.
14527 (lwp_info): New member arch_private.
14528 (linux_target_ops): New members new_process, new_thread,
14529 prepare_to_resume.
14530 (ptid_of): New macro.
14531 * linux-x86-low.c: Include stddef.h, i386-low.h.
14532 (arch_process_info): New struct.
14533 (arch_lwp_info): New struct.
14534 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14535 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14536 (i386_dr_low_get_status): New function.
14537 (x86_insert_point, x86_remove_point): New functions.
14538 (x86_stopped_by_watchpoint): New function.
14539 (x86_stopped_data_address): New function.
14540 (x86_linux_new_process, x86_linux_new_thread): New functions.
14541 (x86_linux_prepare_to_resume): New function.
14542 (the_low_target): Add entries for insert_point, remove_point,
14543 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14544 prepare_to_resume.
14545 * server.c (debug_hw_points): New global.
14546 (monitor_show_help): Document set debug-hw-points.
14547 (handle_query): Process "set debug-hw-points".
14548 * server.h (debug_hw_points): Declare.
14549 (paddress): Declare.
14550 * utils.c (NUMCELLS, CELLSIZE): New macros.
14551 (get_sell, xsnprintf, paddress): New functions.
14552 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14553 remove_point, stopped_by_watchpoint, stopped_data_address.
14554 * win32-i386-low.c: Include i386-low.h.
14555 (debug_reg_state): Replaces dr.
14556 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14557 (i386_dr_low_get_status): New function.
14558 (i386_insert_point, i386_remove_point): New functions.
14559 (i386_stopped_by_watchpoint): New function.
14560 (i386_stopped_data_address): New function.
14561 (i386_initial_stuff): Update.
14562 (get_thread_context,set_thread_context,i386_thread_added): Update.
14563 (the_low_target): Add entries for insert_point,
14564 remove_point, stopped_by_watchpoint, stopped_data_address.
14565 * win32-low.c (win32_insert_watchpoint): New function.
14566 (win32_remove_watchpoint): New function.
14567 (win32_stopped_by_watchpoint): New function.
14568 (win32_stopped_data_address): New function.
14569 (win32_target_ops): Add entries for insert_watchpoint,
14570 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14571 * win32-low.h (win32_target_ops): New members insert_point,
14572 remove_point, stopped_by_watchpoint, stopped_data_address.
14573
d993e290
PA
145742009-06-25 Pedro Alves <pedro@codesourcery.com>
14575
14576 * server.c (process_serial_event): Re-return unsupported, not
14577 error, if the type isn't recognized. Re-allow supporting only
14578 insert or remove packets. Also call require_running for
14579 breakpoints. Add missing break statement to default case. Tidy.
14580 * target.h (struct target_ops): Rename insert_watchpoint to
14581 insert_point, and remove_watchpoint to remove_point.
14582
14583 * linux-low.h (struct linux_target_ops): Likewise.
14584 * linux-low.c (linux_insert_watchpoint): Rename to ...
14585 (linux_insert_point): ... this. Adjust.
14586 (linux_remove_watchpoint): Rename to ...
14587 (linux_remove_point): ... this. Adjust.
14588 (linux_target_ops): Adjust.
14589 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14590 (cris_insert_point): ... this.
14591 (cris_remove_watchpoint): Rename to ...
14592 (cris_remove_point): ... this.
14593 (the_low_target): Adjust.
14594
0f54c268
PM
145952009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14596
14597 * server.c (handle_v_kill): Pass signal_pid to
14598 kill_inferior if multi_process is zero.
14599
c6314022
AR
146002009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14601
14602 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14603 * target.h (target_ops): Comment for *_watchpoint to make it clear
14604 the functions can get types '0' and '1'.
14605
4463ce24
AR
146062009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14607
14608 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14609 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14610 * regcache.c (get_regcache): Likewise.
14611 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14612 * win32-low.c (child_fetch_inferior_registers): Remove check for
14613 regno 0.
14614
cf8fd78b
PA
146152009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14616 Pedro Alves <pedro@codesourcery.com>
14617
14618 * target.h (struct target_ops) <supports_multi_process>: New
14619 callback.
14620 (target_supports_multi_process): New.
14621 * server.c (handle_query): Even if GDB reports support, only
14622 enable multi-process if the target also supports it. Report
14623 multi-process support only if the target backend supports it.
14624 * linux-low.c (linux_supports_multi_process): New function.
14625 (linux_target_ops): Install it as target_supports_multi_process
14626 callback.
14627
47c0c975
DE
146282009-05-24 Doug Evans <dje@google.com>
14629
e09875d4
DE
14630 Global renaming of find_thread_pid to find_thread_ptid.
14631 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14632 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14633 All callers updated.
14634
e27d73f6
DE
14635 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14636 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14637 directly.
14638
47c0c975
DE
14639 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14640 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14641 (linux_resume_one_lwp): Ditto.
14642
2acc282a
DE
146432009-05-23 Doug Evans <dje@google.com>
14644
14645 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14646 from struct inferior_list_entry * to struct lwp_info *.
14647 All callers updated.
14648
9f1036c1
DE
146492009-05-13 Doug Evans <dje@google.com>
14650
14651 * linux-x86-low.c: Don't include assert.h.
14652 (x86_siginfo_fixup): Use fatal, not assert.
14653 (x86_arch_setup): Fix comment.
14654
d0722149
DE
146552009-05-12 Doug Evans <dje@google.com>
14656
14657 Biarch support for i386/amd64 gdbserver.
14658 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14659 Add linux-x86-low.c.
14660 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14661 (linux-x86-low.o): Add.
14662 * linux-x86-64-low.c: Delete.
14663 * linux-i386-low.c: Delete.
14664 * linux-x86-low.c: New file.
14665 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14666 linux-x86-low.o.
14667 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14668 linux-x86-low.o.
14669 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14670 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14671 (linux_child_pid_to_exec_file): New function.
14672 (elf_64_header_p, elf_64_file_p): New functions.
14673 (siginfo_fixup): New function.
14674 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14675 give target a chance to convert layout.
14676 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14677 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14678
fdeb2a12
DE
146792009-05-07 Doug Evans <dje@google.com>
14680
14681 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14682 (regsets_store_inferior_registers): Ditto.
14683
a6dbe5df
PA
146842009-05-06 Pedro Alves <pedro@codesourcery.com>
14685
14686 PR server/10048
14687
14688 * linux-low.c (must_set_ptrace_flags): Delete.
14689 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14690 of the global.
14691 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14692 `lwp->must_set_ptrace_flags' instead.
ba42693b 14693 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14694 (linux_wait_1): ... not here.
14695
5091eb23
DE
146962009-04-30 Doug Evans <dje@google.com>
14697
9f767825
DE
14698 * inferiors.c (started_inferior_callback): New function.
14699 (attached_inferior_callback): New function.
14700 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14701 * server.c (print_started_pid, print_attached_pid): New functions.
14702 (detach_or_kill_for_exit): New function.
14703 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14704 * server.h (have_started_inferiors_p): Declare.
14705 (have_attached_inferiors_p): Declare.
14706
5091eb23
DE
14707 * inferiors.c (remove_process): Fix memory leak, free process.
14708 * linux-low.c (linux_remove_process): New function.
14709 (linux_kill): Call it instead of remove_process.
14710 (linux_detach, linux_wait_1): Ditto.
14711
155c8968
PA
147122009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14713
14714 * configure.srv: Add x86 Windows CE target.
14715
7fe519cb
UW
147162009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14717
14718 * inferiors.c (get_thread_process): Make global.
14719 * server.h (get_thread_process): Add prototype.
14720 * thread-db.c (find_one_thread): Use get_thread_process
14721 instead of current_process.
14722 (thread_db_get_tls_address): Do not crash if called when
14723 thread layer is not yet initialized.
14724
5472f405
UW
147252009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14726
14727 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14728 * spu-low.c (current_tid): Rename to ...
14729 (current_ptid): ... this.
14730 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14731 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14732 ptid_get_lwp (current_ptid) instead of current_tid.
14733 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14734 instead of current_tid. Use find_process_pid to verify pid
14735 argument is valid. Pass proper argument to remove_process.
14736 (spu_thread_alive): Compare current_ptid instead of current_tid.
14737 (spu_resume): Likewise.
14738
55ac2b99
PA
147392009-04-02 Pedro Alves <pedro@codesourcery.com>
14740
14741 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14742 variable.
14743
95954743
PA
147442009-04-01 Pedro Alves <pedro@codesourcery.com>
14745
14746 Implement the multiprocess extensions, and add linux multiprocess
14747 support.
14748
14749 * server.h (ULONGEST): Declare.
14750 (struct ptid, ptid_t): New.
14751 (minus_one_ptid, null_ptid): Declare.
14752 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14753 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14754 (struct inferior_list_entry): Change `id' type from unsigned from
14755 to ptid_t.
14756 (struct sym_cache, struct breakpoint, struct
14757 process_info_private): Forward declare.
14758 (struct process_info): Declare.
14759 (current_process): Declare.
14760 (all_processes): Declare.
14761 (initialize_inferiors): Declare.
14762 (add_thread): Adjust to use ptid_t.
14763 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14764 (add_process, remove_process, find_thread_pid): Declare.
14765 (find_inferior_id): Adjust to use ptid_t.
14766 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14767 (multi_process): Declare.
14768 (push_event): Adjust to use ptid_t.
14769 (read_ptid, write_ptid): Declare.
14770 (prepare_resume_reply): Adjust to use ptid_t.
14771 (clear_symbol_cache): Declare.
14772 * inferiors.c (all_processes): New.
14773 (null_ptid, minus_one_ptid): New.
14774 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14775 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14776 (add_thread): Change unsigned long to ptid. Remove gdb_id
14777 parameter. Adjust.
14778 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14779 (gdb_id_to_thread): Rename to ...
14780 (find_thread_pid): ... this. Change unsigned long to ptid.
14781 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14782 (loaded_dll, pull_pid_from_list): Adjust.
14783 (add_process, remove_process, find_process_pid)
14784 (get_thread_process, current_process, initialize_inferiors): New.
14785 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14786 (struct target_waitstatus) <related_pid>: Ditto.
14787 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14788 return type to int.
14789 (struct target_ops) <join>: Add `pid' argument.
14790 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14791 (struct target_ops) <wait>: Add `ptid' field. Change return type
14792 to ptid.
14793 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14794 (mywait): Add `ptid' argument. Change return type to ptid_t.
14795 (target_pid_to_str): Declare.
14796 * target.c (set_desired_inferior): Adjust to use ptids.
14797 (mywait): Add new `ptid' argument. Adjust.
14798 (target_pid_to_str): New.
14799 * mem-break.h (free_all_breakpoints): Declare.
14800 * mem-break.c (breakpoints): Delelete.
14801 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14802 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14803 to use per-process breakpoint list.
14804 (free_all_breakpoints): New.
14805 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14806 (symbol_cache, all_symbols_looked_up): Delete.
14807 (hexchars): New.
14808 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14809 read_ptid): New.
14810 (prepare_resume_reply): Change ptid argument's type from unsigned
14811 long to ptid_t. Adjust. Implement W;process and X;process.
14812 (free_sym_cache, clear_symbol_cache): New.
14813 (look_up_one_symbol): Adjust to per-process symbol cache. *
14814 * server.c (cont_thread, general_thread, step_thread): Change type
14815 to ptid_t.
14816 (attached): Delete.
14817 (multi_process): New.
14818 (last_ptid): Change type to ptid_t.
14819 (struct vstop_notif) <ptid>: Change type to ptid_t.
14820 (queue_stop_reply, push_event): Change `ptid' argument's type to
14821 ptid_t.
14822 (discard_queued_stop_replies): Add `pid' argument.
14823 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14824 changes. Don't reference the `attached' global.
14825 (attach_inferior): Adjust to mywait interface changes.
14826 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14827 features. Handle and report "multiprocess+". Handle
14828 "qAttached:PID".
14829 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14830 changes.
14831 (handle_v_kill): New.
14832 (handle_v_stopped): Adjust to use target_pid_to_str.
14833 (handle_v_requests): Allow multiple attaches and runs when
14834 multiprocess extensions are in effect. Handle "vKill".
14835 (myresume): Adjust to use ptids.
14836 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14837 (handle_status): Adjust to discard_queued_stop_replies interface
14838 change.
14839 (first_thread_of, kill_inferior_callback)
14840 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14841 (main): Call initialize_inferiors. Adjust to use ptids, killing
14842 and detaching from all inferiors. Handle multiprocess packet
14843 variants.
14844 * linux-low.h: Include gdb_proc_service.h.
14845 (struct process_info_private): New.
14846 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14847 <lwpid_of>: Use ptid_get_lwp.
14848 (get_lwp_thread): Adjust.
14849 (struct lwp_info): Add `dead' member.
14850 (find_lwp_pid): Declare.
14851 * linux-low.c (thread_db_active): Delete.
14852 (new_inferior): Adjust comment.
14853 (inferior_pid): Delete.
14854 (linux_add_process): New.
14855 (handle_extended_wait): Adjust.
14856 (add_lwp): Change unsigned long to ptid.
14857 (linux_create_inferior): Add process to processes table. Adjust
14858 to use ptids. Don't set new_inferior here.
14859 (linux_attach_lwp): Rename to ...
14860 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14861 it. Adjust to use ptids.
14862 (linux_attach_lwp): New.
14863 (linux_attach): Add process to processes table. Don't set
14864 new_inferior here.
14865 (struct counter): New.
14866 (second_thread_of_pid_p, last_thread_of_process_p): New.
14867 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14868 multiple processes.
14869 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14870 processes. Remove process from process table.
14871 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14872 to multiple processes.
14873 (any_thread_of): New.
14874 (linux_detach): Add `pid' argument, and handle it. Remove process
14875 from processes table.
14876 (linux_join): Add `pid' argument. Handle it.
14877 (linux_thread_alive): Change unsighed long argument to ptid_t.
14878 Consider dead lwps as not being alive.
14879 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14880 threads we're not interested in.
14881 (same_lwp, find_lwp_pid): New.
14882 (linux_wait_for_lwp): Change `pid' argument's type from int to
14883 ptid_t. Adjust.
14884 (linux_wait_for_event): Rename to ...
14885 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14886 from int to ptid_t. Adjust.
14887 (linux_wait_for_event): New.
14888 (linux_wait_1): Add `ptid' argument. Change return type to
14889 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14890 that exit from the process table.
14891 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14892 Adjust.
14893 (mark_lwp_dead): New.
14894 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14895 stopping all threads, mark its main lwp as dead.
14896 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14897 ptids.
14898 (fetch_register, usr_store_inferior_registers)
14899 (regsets_fetch_inferior_registers)
14900 (regsets_store_inferior_registers, linux_read_memory)
14901 (linux_write_memory): Inline `inferior_pid'.
14902 (linux_look_up_symbols): Adjust to use per-process
14903 `thread_db_active'.
14904 (linux_request_interrupt): Adjust to use ptids.
14905 (linux_read_auxv): Inline `inferior_pid'.
14906 (initialize_low): Don't reference thread_db_active.
14907 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14908 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14909 (ps_getpid): Return the pid of the current inferior.
14910 * thread-db.c (proc_handle, thread_agent): Delete.
14911 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14912 per-process data.
14913 (find_one_thread): Change argument type to ptid_t. Adjust to
14914 per-process data.
14915 (maybe_attach_thread): Adjust to per-process data and ptids.
14916 (thread_db_find_new_threads): Ditto.
14917 (thread_db_init): Ditto.
14918 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14919 processes table. Adjust to use ptids.
14920 (spu_kill, spu_detach): Adjust interface. Remove process from
14921 processes table.
14922 (spu_join, spu_thread_alive): Adjust interface.
14923 (spu_wait): Adjust interface. Remove process from processes
14924 table. Adjust to use ptids.
14925 * win32-low.c (current_inferior_tid): Delete.
14926 (current_inferior_ptid): New.
14927 (debug_event_ptid): New.
14928 (thread_rec): Take a ptid. Adjust.
14929 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14930 (child_delete_thread): Ditto.
14931 (do_initial_child_stuff): Add `attached' argument. Add process to
14932 processes table.
14933 (child_fetch_inferior_registers, child_store_inferior_registers):
14934 Adjust.
14935 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14936 (win32_attach): Pass 1 to do_initial_child_stuff.
14937 (win32_kill): Adjust interface. Remove process from processes
14938 table.
14939 (win32_detach): Ditto.
14940 (win32_join): Adjust interface.
14941 (win32_thread_alive): Take a ptid.
14942 (win32_resume): Adjust to use ptids.
14943 (get_child_debug_event): Ditto.
14944 (win32_wait): Adjust interface. Remove exiting process from
14945 processes table.
14946
bd99dc85
PA
149472009-04-01 Pedro Alves <pedro@codesourcery.com>
14948
14949 Non-stop mode support.
14950
14951 * server.h (non_stop): Declare.
14952 (gdb_client_data, handler_func): Declare.
14953 (delete_file_handler, add_file_handler, start_event_loop):
14954 Declare.
14955 (handle_serial_event, handle_target_event, push_event)
14956 (putpkt_notif): Declare.
14957 * target.h (enum resume_kind): New.
14958 (struct thread_resume): Replace `step' field by `kind' field.
14959 (TARGET_WNOHANG): Define.
14960 (struct target_ops) <wait>: Add `options' argument.
14961 <supports_non_stop, async, start_non_stop>: New fields.
14962 (target_supports_non_stop, target_async): New.
14963 (start_non_stop): Declare.
14964 (mywait): Add `options' argument.
14965 * target.c (mywait): Add `options' argument. Print child exit
14966 notifications here.
14967 (start_non_stop): New.
14968 * server.c (non_stop, own_buf, mem_buf): New globals.
14969 (struct vstop_notif): New.
14970 (notif_queue): New global.
14971 (queue_stop_reply, push_event, discard_queued_stop_replies)
14972 (send_next_stop_reply): New.
14973 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14974 interface changes.
14975 (attach_inferior): In non-stop mode, don't wait for the target
14976 here.
14977 (handle_general_set): Handle QNonStop.
14978 (handle_query): When handling qC, return the current general
14979 thread, instead of the first thread of the list.
14980 (handle_query): If the backend supports non-stop mode, include
14981 QNonStop+ in the qSupported query response.
14982 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14983 and non-stop mode.
14984 (handle_v_attach, handle_v_run): Handle non-stop mode.
14985 (handle_v_stopped): New.
14986 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14987 (myresume): Adjust to use resume_kind. Handle non-stop.
14988 (queue_stop_reply_callback): New.
14989 (handle_status): Handle non-stop mode.
14990 (main): Clear non_stop flag on reconnection. Use the event-loop.
14991 Refactor serial protocol handling from here ...
14992 (process_serial_event): ... to this new function. When GDB
14993 selects any thread, select one here. In non-stop mode, wait until
14994 GDB acks all pending events before exiting.
14995 (handle_serial_event, handle_target_event): New.
14996 * remote-utils.c (remote_open): Install remote_desc in the event
14997 loop.
14998 (remote_close): Remove remote_desc from the event loop.
14999 (putpkt_binary): Rename to...
15000 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15001 (putpkt_binary): New as wrapper around putpkt_binary_1.
15002 (putpkt_notif): New.
15003 (prepare_resume_reply): In non-stop mode, don't change the
15004 general_thread.
15005 * event-loop.c: New.
15006 * Makefile.in (OBJ): Add event-loop.o.
15007 (event-loop.o): New rule.
15008
15009 * linux-low.h (pid_of): Moved here.
15010 (lwpid_of): New.
15011 (get_lwp_thread): Use lwpid_of.
15012 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15013 * linux-low.c (pid_of): Delete.
15014 (inferior_pid): Use lwpid_of.
15015 (linux_event_pipe): New.
15016 (target_is_async_p): New.
15017 (delete_lwp): New.
15018 (handle_extended_wait): Use lwpid_of.
15019 (add_lwp): Don't set lwpid field.
15020 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15021 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15022 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15023 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15024 first. Adjust to linux_wait_for_event interface changes. Use
15025 lwpid_of.
15026 (linux_detach): Don't delete the main lwp here.
15027 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15028 (status_pending_p): Don't consider explicitly suspended lwps.
15029 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15030 pointer. Add OPTIONS argument. Change return type to int. Use
15031 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15032 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15033 pointer. Add status pointer argument. Return a pid instead of a
15034 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15035 changes. In non-stop mode, don't switch to a random thread.
15036 (linux_wait): Rename to...
15037 (linux_wait_1): ... this. Add target_options argument, and handle
15038 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15039 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15040 clean exit and signal exit code. Don't stop all threads in
15041 non-stop mode. In all-stop mode, only stop all threads when
15042 reporting a stop to GDB. Handle explicit thread stop requests.
15043 (async_file_flush, async_file_mark): New.
15044 (linux_wait): New.
15045 (send_sigstop): Use lwpid_of.
15046 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15047 interface changes. In non-stop mode, don't switch to a random
15048 thread.
15049 (linux_resume_one_lwp): Use lwpid_of.
15050 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15051 (linux_resume_one_thread): ... this. Handle resume_stop. In
15052 non-stop mode, don't look for pending flag in all threads.
15053 (resume_status_pending_p): Don't consider explicitly suspended
15054 threads.
15055 (my_waitpid): Reimplement. Emulate __WALL.
15056 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15057 Use lwpid_of.
15058 (sigchld_handler, linux_supports_non_stop, linux_async)
15059 (linux_start_non_stop): New.
15060 (linux_target_ops): Register linux_supports_non_stop, linux_async
15061 and linux_start_non_stop.
15062 (initialize_low): Install SIGCHLD handler.
15063 * thread-db.c (thread_db_create_event, find_one_thread)
15064 (thread_db_get_tls_address): Use lwpid_of.
15065 * win32-low.c (win32_detach): Adjust to use resume_kind.
15066 (win32_wait): Add `options' argument.
15067 * spu-low.c (spu_resume): Adjust to use resume_kind.
15068 (spu_wait): Add `options' argument.
15069
5b1c542e
PA
150702009-04-01 Pedro Alves <pedro@codesourcery.com>
15071
15072 Decouple target code from remote protocol.
15073
15074 * target.h (enum target_waitkind): New.
15075 (struct target_waitstatus): New.
15076 (struct target_ops) <wait>: Return an unsigned long. Take a
15077 target_waitstatus pointer instead of a char pointer.
15078 (mywait): Likewise.
15079 * target.c (mywait): Change prototype to return an unsigned long.
15080 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15081 * server.h (thread_from_wait, old_thread_from_wait): Delete
15082 declarations.
15083 (prepare_resume_reply): Change prototype to take a
15084 target_waitstatus.
15085 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15086 (last_status, last_ptid): New.
15087 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15088 pid instead of a signal.
15089 (attach_inferior): Remove "status" and "signal" parameters.
15090 Adjust.
15091 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15092 not as an address.
15093 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15094 (handle_v_requests, myresume): Remove "status" and "signal"
15095 parameters. Adjust.
15096 (handle_status): New.
15097 (main): Delete local `status'. Adjust.
15098 * remote-utils.c: Include target.h.
15099 (prepare_resume_reply): Change prototype to take a
15100 target_waitstatus. Adjust.
15101
15102 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15103 interface.
15104 * spu-low.c (spu_wait): Adjust.
15105 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15106 Delete.
15107 (win32_wait): Adjust.
15108
2bd7c093
PA
151092009-04-01 Pedro Alves <pedro@codesourcery.com>
15110
15111 * target.h (struct thread_resume): Delete leave_stopped member.
15112 (struct target_ops): Add a `n' argument to the `resume' callback.
15113 * server.c (start_inferior): Adjust.
15114 (handle_v_cont, myresume): Adjust.
15115 * linux-low.c (check_removed_breakpoint): Adjust to resume
15116 interface change, and to removed leave_stopped field.
15117 (resume_ptr): Delete.
15118 (struct thread_resume_array): New.
15119 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15120 resume interface change.
15121 (linux_continue_one_thread, linux_queue_one_thread)
15122 (resume_status_pending_p): Check if the resume field is NULL
15123 instead of checking the leave_stopped member.
15124 (linux_resume): Adjust to the target resume interface change.
15125 * spu-low.c (spu_resume): Adjust to the target resume interface
15126 change.
15127 * win32-low.c (win32_detach, win32_resume): Ditto.
15128
c35fafde
PA
151292009-04-01 Pedro Alves <pedro@codesourcery.com>
15130
15131 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15132 flag.
15133 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15134 pending.
15135 (linux_continue_one_thread): Only preserve the stepping flag if
15136 there's a pending breakpoint.
15137
0a59d50b
PA
151382009-03-31 Pedro Alves <pedro@codesourcery.com>
15139
15140 * server.c (main): After the inferior having exited, call
15141 remote_close before exiting gdbserver.
15142
f04c6d38
TJB
151432009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15144
15145 Fix size of FPSCR in Power 7 processors.
15146 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15147 (PPC_FEATURE_HAS_DFP): New #define.
15148 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15149 size of the FPSCR.
15150
78e5cee6
PA
151512009-03-23 Pedro Alves <pedro@codesourcery.com>
15152
15153 * server.c (handle_query) Whitespace and formatting.
15154
1b3f6016
PA
151552009-03-22 Pedro Alves <pedro@codesourcery.com>
15156
15157 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15158 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15159 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15160 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15161 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15162 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15163 Makefile.in, configure.ac: Fix whitespace throughout.
15164 * configure: Regenerate.
15165
a07b2135
PA
151662009-03-22 Pedro Alves <pedro@codesourcery.com>
15167
15168 * inferiors.c (find_inferior): Make it safe for the callback
15169 function to delete the currently iterated inferior.
15170
67cc2626
PA
151712009-03-22 Pedro Alves <pedro@codesourcery.com>
15172
15173 * Makefile.in (linuw_low_h): Move higher.
15174 (thread-db.o): Depend on $(linux_low_h).
15175
54a0b537
PA
151762009-03-17 Pedro Alves <pedro@codesourcery.com>
15177
15178 Rename "process" to "lwp" throughout.
15179
15180 * linux-low.c (all_processes): Rename to...
15181 (all_lwps): ... this.
15182 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15183 (add_process): Rename to ...
15184 (add_lwp): ... this. Adjust.
15185 (linux_create_inferior): Adjust.
15186 (linux_attach_lwp): Adjust.
15187 (linux_attach): Adjust.
15188 (linux_kill_one_process): Rename to ...
15189 (linux_kill_one_lwp): ... this. Adjust.
15190 (linux_kill): Adjust.
15191 (linux_detach_one_process): Rename to ...
15192 (linux_detach_one_lwp): ... this. Adjust.
15193 (linux_detach): Adjust.
15194 (check_removed_breakpoint): Adjust.
15195 (status_pending_p): Adjust.
15196 (linux_wait_for_process): Rename to ...
15197 (linux_wait_for_lwp): ... this. Adjust.
15198 (linux_wait_for_event): Adjust.
15199 (send_sigstop): Adjust.
15200 (wait_for_sigstop): Adjust.
15201 (stop_all_processes): Rename to ...
15202 (stop_all_lwps): ... this.
15203 (linux_resume_one_process): Rename to ...
15204 (linux_resume_one_lwp): ... this. Adjust.
15205 (linux_set_resume_request, linux_continue_one_thread)
15206 (linux_queue_one_thread, resume_status_pending_p)
15207 (usr_store_inferior_registers, regsets_store_inferior_registers)
15208 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15209 Adjust.
15210 * linux-low.h (get_process): Rename to ...
15211 (get_lwp): ... this. Adjust.
15212 (get_thread_process): Rename to ...
15213 (get_thread_lwp): ... this. Adjust.
15214 (get_process_thread): Rename to ...
15215 (get_lwp_thread): ... this. Adjust.
15216 (struct process_info): Rename to ...
15217 (struct lwp_info): ... this.
15218 (all_processes): Rename to ...
15219 (all_lwps): ... this.
15220 * proc-service.c (ps_lgetregs): Adjust.
15221 * thread-db.c (thread_db_create_event, find_one_thread)
15222 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15223
0b16c5cf
PA
152242009-03-14 Pedro Alves <pedro@codesourcery.com>
15225
15226 * server.c (handle_query): Handle "qAttached".
15227
32de4b9d
NS
152282009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15229
15230 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15231 GPLv3, update license URL.
15232
2aecd87f
DE
152332009-03-01 Doug Evans <dje@google.com>
15234
93efd302 15235 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15236 (server_h): Add gdb_signals.h.
15237 (signals.o): Update.
15238 * server.h (target_signal_from_host,target_signal_to_host_p)
15239 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15240
86b1f9c5
PM
152412009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15242
15243 * remote-utils.c (getpkt): Also generate remote-debug
15244 information if noack_mode is set.
15245
4aa995e1
PA
152462009-02-06 Pedro Alves <pedro@codesourcery.com>
15247
15248 * server.c (handle_query): Report qXfer:siginfo:read and
15249 qXfer:siginfo:write as supported and handle them.
15250 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15251 * linux-low.c (linux_xfer_siginfo): New.
15252 (linux_target_ops): Set it.
15253
62709adf
PA
152542009-01-26 Pedro Alves <pedro@codesourcery.com>
15255
15256 * server.c (gdbserver_usage): Mention --remote-debug.
15257 (main): Accept '--remote-debug' switch.
15258
aef93bd7
DE
152592009-01-18 Doug Evans <dje@google.com>
15260
15261 * regcache.c (new_register_cache): No need to check result of xcalloc.
15262 * server.c (handle_search_memory): Back out calls to xmalloc,
15263 result is checked and error is returned to user upon failure.
15264 (handle_query): Ditto. Add more checks for result of malloc.
15265 (handle_v_cont): Check result of malloc, report error back to
15266 user upon failure.
15267 (handle_v_run): Ditto. Call freeargv.
15268 * server.h (freeargv): Declare.
15269 * utils.c (freeargv): New fn.
15270
54363045
DE
152712009-01-15 Doug Evans <dje@google.com>
15272
f626972c
DE
15273 * gdbreplay.c (perror_with_name): Make arg const char *.
15274 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15275 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15276 * utils.c (perror_with_name): Make arg const char *.
54363045 15277
18aae699
PA
152782009-01-14 Pedro Alves <pedro@codesourcery.com>
15279
15280 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15281 when handling a EXIT_PROCESS_DEBUG_EVENT.
15282
ff703abe
JB
152832009-01-06 Joel Brobecker <brobecker@adacore.com>
15284
15285 * gdbreplay.c (gdbreplay_version): Update copyright year.
15286 * server.c (gdbserver_version): Likewise.
15287
f21cc1a2 152882009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15289
15290 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15291 (handle_extended_wait): Improve comment.
0e21c1ec 15292
bca929d3
DE
152932008-12-13 Doug Evans <dje@google.com>
15294
15295 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15296 * server.h (ATTR_MALLOC): New macro.
15297 (xmalloc,xcalloc,xstrdup): Declare.
15298 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15299 * inferiors.c: Ditto.
15300 * linux-low.c: Ditto.
15301 * mem-break.c: Ditto.
15302 * regcache.c: Ditto.
15303 * remote-utils.c: Ditto.
15304 * server.c: Ditto.
15305 * target.c: Ditto.
15306 * win32-low.c: Ditto.
15307
97438e3f
DE
153082008-12-12 Doug Evans <dje@google.com>
15309
896c7fbb
DE
15310 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15311 in debugging printf.
15312
97438e3f
DE
15313 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15314
e3b886f8
DE
153152008-12-09 Doug Evans <dje@google.com>
15316
15317 * linux-low.h (struct process_info): Delete member tid, unused.
15318 * thread-db.c (find_one_thread): Update.
15319 (maybe_attach_thread): Update.
15320
07e059b5
VP
153212008-12-02 Pedro Alves <pedro@codesourcery.com>
15322
889bf7c5
PA
15323 * target.h (struct target_ops): Add qxfer_osdata member.
15324 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15325 and dirent.h.
15326 (linux_qxfer_osdata): New functions.
15327 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15328 callback.
15329 * server.c (handle_query): Handle "qXfer:osdata:read:".
15330 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15331 (buffer_xml_printf): New functions.
15332 * server.h (struct buffer): New.
15333 (buffer_grow_str, buffer_grow_str0): New macros.
15334 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15335 (buffer_xml_printf): Declare.
07e059b5 15336
4cab47ab
DE
153372008-11-24 Doug Evans <dje@google.com>
15338
15339 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15340
f142445f
DJ
153412008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15342
15343 * server.c (handle_v_run): Always use the supplied argument list.
15344
d0107bb6 153452008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15346
d0107bb6
BW
15347 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15348 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15349
2c4ad781
TJB
153502008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15351
15352 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15353 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15354 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15355 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15356 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15357 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15358 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15359 XML target descriptions.
15360 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15361 when inferior is running on an ISA 2.05 or later processor. Add
15362 special case to return offset for full 64-bit slot of FPSCR when
15363 in 32-bits.
15364
dfb64f85
DJ
153652008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15366
15367 * Makefile.in (SFILES, clean): Added sparc64 files.
15368 (reg-sparc64.o, reg-sparc64.c): New.
15369 * configure.srv (sparc*-*-linux*): New configuration.
15370 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15371 syscall arguments for SPARC.
15372 (regsets_store_inferior_registers): Likewise.
15373 * linux-sparc-low.c: New file.
15374
66b6e1dd
DE
153752008-10-21 Doug Evans <dje@google.com>
15376
15377 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15378 (READLINE_DIR,READLINE_DEP): Delete.
15379 (INTERNAL_CFLAGS): Update.
15380 (LINTFLAGS): Update.
15381
9b710a42
PA
153822008-10-10 Pedro Alves <pedro@codesourcery.com>
15383
15384 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15385 whole argv from the last run, not just argv[0].
15386
5822d809
PA
153872008-09-08 Pedro Alves <pedro@codesourcery.com>
15388
15389 * regcache.c (new_register_cache): Return NULL if the register
15390 cache size isn't known yet.
15391 (free_register_cache): Avoid dereferencing a NULL regcache.
15392
74aac56f
DJ
153932008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15394
15395 * configure.srv: Merge MIPS and MIPS64.
15396
400b20f5
MR
153972008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15398
15399 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15400
677c5bb1
LM
154012008-08-18 Luis Machado <luisgpm@br.ibm.com>
15402
15403 * Makefile.in: Add required vsx dependencies.
15404
15405 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15406 Declare init_registers_powerpc_vsx32l.
15407 Declare init_registers_powerpc_vsx64l.
15408 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15409 (ppc_arch_setup): Check for VSX in hwcap.
15410 (ppc_fill_vsxregset): New function.
15411 (ppc_store_vsxregset): New function.
15412 Add new VSX entry in regset_info target_regsets.
15413
15414 * configure.srv: Add new VSX dependencies.
15415
a6f3e723
SL
154162008-08-12 Pedro Alves <pedro@codesourcery.com>
15417
15418 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15419 (remote_open): Set or clear transport_is_reliable.
15420 (putpkt_binary): Don't expect acks in noack mode.
15421 (getpkt): Don't send ack/nac in noack mode.
15422 * server.c (handle_general_set): Handle QStartNoAckMode.
15423 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15424 qSupported.
15425 (main): Reset noack_mode on every connection.
15426 * server.h (noack_mode): Declare.
15427
a417dc56
RW
154282008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15429
15430 * Makefile.in (GDBREPLAY_OBS): New variable.
15431 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15432
3221518c
UW
154332008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15434 Daniel Jacobowitz <dan@codesourcery.com>
15435
15436 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15437 (usr_store_inferior_registers): Likewise.
15438 (regsets_store_inferior_registers): Likewise.
15439
ec56be1b
PA
154402008-07-31 Rolf Jansen <rj@surtec.com>
15441 Pedro Alves <pedro@codesourcery.com>
15442
15443 * configure.ac: Check for memmem declaration.
15444 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15445 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15446 (disable_packet_qfThreadInfo): Unconditionally compile.
15447 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15448 * configure, config.in: Regenerate.
15449
2fe5e3ff
DE
154502008-07-28 Doug Kwan <dougkwan@google.com>
15451
15452 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15453 (linux_write_memory): Remove declaration of errno.
15454
836acd6d
UW
154552008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15456
15457 * linux-low.c (handle_extended_wait): Do not use "status"
15458 variable uninitialized.
15459
aeba519e
PA
154602008-07-07 Pedro Alves <pedro@codesourcery.com>
15461
15462 * server.c (handle_v_attach): Inhibit reporting dll changes.
15463
db42f210
PA
154642008-06-27 Pedro Alves <pedro@codesourcery.com>
15465
15466 * remote-utils.c (prepare_resume_reply): If requested, don't
15467 output "thread:TID" in the T stop reply.
15468
15469 * server.c (disable_packet_vCont, disable_packet_Tthread)
15470 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15471 (handle_query): If requested, disable support for qC, qfThreadInfo
15472 and qsThreadInfo.
15473 (handle_v_requests): If requested, disable support for vCont.
15474 (gdbserver_show_disableable): New.
15475 (main): Handle --disable-packet and --disable-packet=LIST.
15476
15477 * server.h (disable_packet_vCont, disable_packet_Tthread)
15478 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15479
8e4c5421
CD
154802008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15481
15482 * server.c (gdbserver_usage): Mention --version.
15483
6e23a804
DJ
154842008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15485
15486 * Makefile.in (gdbreplay.o): New rule.
15487
90aa6a40
JM
154882008-06-06 Joseph Myers <joseph@codesourcery.com>
15489
15490 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15491 message, not gdbserver.
15492
c16158bc 154932008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15494 Nathan Sidwell <nathan@codesourcery.com>
15495 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15496
15497 * acinclude.m4: Include ../../config/acx.m4.
15498 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15499 * configure, config.in: Regenerate.
15500 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15501 * server.c (gdbserver_version): Print PKGVERSION.
15502 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15503 (main): Adjust gdbserver_usage calls.
15504 * gdbreplay.c (version, host_name): Add declarations.
15505 (gdbreplay_version, gdbreplay_usage): New.
15506 (main): Accept --version and --help options.
15507
aeb75bf5
DJ
155082008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15509
15510 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15511 (arm_breakpoint_at): Handle Thumb.
15512 (the_low_target): Add comment.
15513
76b233dd
UW
155142008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15515
15516 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15517
08388c79
DE
155182008-05-09 Doug Evans <dje@google.com>
15519
a3c83fae
DE
15520 * server.h (decode_search_memory_packet): Declare.
15521 * remote-utils.c (decode_search_memory_packet): New fn.
15522 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15523 (handle_search_memory): New fn.
15524 (handle_query): Process qSearch:memory packets.
15525
bb9c3d36
UW
155262008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15527
15528 * regcache.c (registers_length): Remove.
15529 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15530 full register packet.
15531 * regcache.h (registers_length): Remove prototype.
15532 * server.h (PBUFSIZ): Define to 16384.
15533
7284e1be
UW
155342008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15535
15536 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15537 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15538 powerpc-64l.o, and powerpc-altivec64l.o.
15539 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15540 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15541 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15542 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15543 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15544 to srv_xmlfiles.
15545
15546 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15547 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15548 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15549 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15550 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15551 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15552 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15553 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15554 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15555 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15556 (clean): Update.
15557
15558 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15559 (init_registers_powerpc_32l): ... this new prototype.
15560 (init_registers_powerpc_32): Remove, replace by ...
15561 (init_registers_powerpc_altivec32l): ... this new prototype.
15562 (init_registers_powerpc_e500): Remove, replace by ...
15563 (init_registers_powerpc_e500l): ... this new prototype.
15564 (init_registers_ppc64): Remove, replace by ...
15565 (init_registers_powerpc_64l): ... this new prototype.
15566 (init_registers_powerpc_64): Remove, replace by ...
15567 (init_registers_powerpc_altivec64l): ... this new prototype.
15568 (ppc_num_regs): Set to 73.
15569 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15570 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15571 (ppc_cannot_store_register): Handle orig_r3 and trap.
15572 (ppc_arch_setup): Update init_registers_... calls.
15573 (ppc_fill_gregset): Handle orig_r3 and trap.
15574
15575 * inferiors.c (clear_inferiors): Reset current_inferior.
15576
fdc59709
PB
155772008-04-23 Paolo Bonzini <bonzini@gnu.org>
15578
889bf7c5
PA
15579 * acinclude.m4: Add override.m4.
15580 * configure: Regenerate.
fdc59709 15581
c9b2f845
UW
155822008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15583
15584 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15585 initial call to init_register_ppc64.
15586
550512b8
UW
155872008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15588
43aaf8b6
PA
15589 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15590 single powerpc*-*-linux* case.
550512b8
UW
15591 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15592
b6430ec3
UW
155932008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15594
15595 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15596 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15597 from reg_xmlfiles.
15598 * linux-ppc-low.c: Include <elf.h>.
15599 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15600 (ppc_hwcap): New global variable.
15601 (ppc_regmap): Remove __SPE__ #ifdef sections.
15602 (ppc_regmap_e500): New global variable.
15603 (ppc_cannot_store_register): Update __SPE__ special case.
15604 (ppc_get_hwcap): New function.
15605 (ppc_arch_setup): Use it to determine whether inferior supports
15606 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15607 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15608 Do not access registers if target does not support AltiVec.
15609 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15610 Do not access registers if target does not support SPE.
15611 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15612
52fa2412
UW
156132008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15614
15615 * linux-low.c (disabled_regsets, num_regsets): New.
15616 (use_regsets_p): Delete.
15617 (linux_wait_for_process): Clear disabled_regsets.
15618 (regsets_fetch_inferior_registers): Check and set it.
15619 (regsets_store_inferior_registers): Likewise.
15620 (linux_fetch_registers, linux_store_registers): Do not use
15621 use_regsets_p.
15622 (initialize_low): Allocate disabled_regsets.
15623
e28b3332
DJ
156242008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15625
15626 * Makefile.in (LIBOBJS): New.
15627 (OBS): Use LIBOBJS.
15628 (memmem.o): New rule.
15629 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15630 * configure: Regenerated.
15631
4536995d
UW
156322008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15633
15634 * server.c (handle_query): Never return "unsupported" for
15635 qXfer:features:read queries.
15636
221c031f
UW
156372008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15638
15639 * server.c (get_features_xml): Fix inverted condition.
15640 (handle_query): Always support qXfer:feature:read.
15641
ccd213ac
DJ
156422008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15643
15644 * server.c (wrapper_argv): New.
15645 (start_inferior): Handle wrapper_argv. If set, expect an extra
15646 trap.
15647 (gdbserver_usage): Document --wrapper.
15648 (main): Parse --wrapper.
15649
6fe305f7
UW
156502008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15651
15652 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15653 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15654 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15655 (ppc_set_pc): Likewise.
15656 (ppc_arch_setup): New function.
15657 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15658 of collect_register.
889bf7c5 15659 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15660
5b0a002e
UW
156612008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15662
15663 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15664 instead of linux-ppc64-low.o.
15665 * linux-ppc64-low.c: Remove file.
15666 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15667 (linux-ppc64-low.o): Remove rule.
15668
15669 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15670 (init_registers_powerpc_64): Likewise.
15671 (ppc_regmap): Conditionally define depending on __powerpc64__.
15672 (ppc_cannot_store_register): Do not special-case "fpscr" when
15673 compiled on __powerpc64__.
15674 (ppc_collect_ptrace_register): New function.
15675 (ppc_supply_ptrace_register): New function.
15676 (ppc_breakpoint): Change type to "unsigned int".
15677 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15678 (the_low_target): Conditionally provide initializers for the
889bf7c5 15679 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15680 collect_ptrace_register and supply_ptrace_register members.
15681
9b4b61c8
UW
156822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15683
15684 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15685 * server.c (gdbserver_xmltarget): Define.
15686 (get_features_xml): Use it to replace "target.xml" and arch_string.
15687
15688 * configure.srv: Remove srv_xmltarget. Add XML files that were
15689 mentioned there to srv_xmlfiles instead. Remove conditional tests
15690 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15691 srv_xmlfiles and srv_regobj to include all possible choices.
15692 * configure.ac (srv_xmltarget): Remove.
15693 (srv_xmlfiles): Do not add "target.xml".
15694 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15695 checks for supplementary target information.
15696 * configure: Regenerate.
15697 * Makefile.in (XML_TARGET): Remove.
15698 (target.xml): Remove rule.
15699 (clean): Do not clean up target.xml.
15700 (.PRECIOUS): Do not mention target.xml.
15701
15702 * target.h (struct target_ops): Remove arch_string member.
15703 * linux-low.c (linux_arch_string): Remove.
15704 (linux_target_ops): Remove arch_string initializer.
15705 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15706 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15707 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15708 * spu-low.c (spu_arch_string): Remove.
15709 (spu_target_ops): Remove arch_string initializer.
15710 * win32-low.c (win32_arch_string): Remove.
15711 (win32_target_ops): Remove arch_string initializer.
15712 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15713 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15714 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15715
ee1a7ae4
UW
157162008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15717
15718 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15719 by collect_ptrace_register and supply_ptrace_register hooks.
15720 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15721 instead of checking for the_low_target.left_pad_xfer.
15722 (usr_store_inferior_registers): Use collect_ptrace_register callback
15723 instead of checking for the_low_target.left_pad_xfer.
15724
15725 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15726 (s390_supply_ptrace_register): Likewise.
15727 (s390_fill_gregset): Call s390_collect_ptrace_register.
15728 (the_low_target): Update.
15729
15730 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15731 (ppc_supply_ptrace_register): Likewise.
15732 (the_low_target): Update.
15733
15734 * linux-i386-low.c (the_low_target): Update.
15735 * linux-x86-64-low.c (the_low_target): Update.
15736
d61ddec4
UW
157372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15738
15739 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15740 reg-s390.o and reg-s390x.o.
15741
15742 * linux-low.c (new_inferior): New global variable.
15743 (linux_create_inferior, linux_attach): Set it.
15744 (linux_wait_for_process): Call the_low_target.arch_setup after the
15745 target has stopped for the first time.
15746 (initialize_low): Do not call the_low_target.arch_setup.
15747
15748 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15749 (s390_set_pc): Likewise.
15750 (s390_arch_setup): New function.
15751 (the_low_target): Use s390_arch_setup as arch_setup routine.
15752
15753 * regcache.c (realloc_register_cache): New function.
15754 (set_register_cache): Call it for each existing regcache.
15755
d05b4ac3
UW
157562008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15757
15758 * server.h (init_registers): Remove prototype.
15759
15760 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15761 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15762 instead of init_registers ().
15763 * linux-arm-low.c (init_registers_arm): Add prototype.
15764 (init_registers_arm_with_iwmmxt): Likewise.
15765 (the_low_target): Add initializer for arch_setup field.
15766 * linux-cris-low.c (init_registers_cris): Add prototype.
15767 (the_low_target): Add initializer for arch_setup field.
15768 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15769 (the_low_target): Add initializer for arch_setup field.
15770 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15771 (the_low_target): Add initializer for arch_setup field.
15772 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15773 (the_low_target): Add initializer for arch_setup field.
15774 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15775 (the_low_target): Add initializer for arch_setup field.
15776 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15777 (the_low_target): Add initializer for arch_setup field.
15778 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15779 (init_registers_mips64_linux): Likewise.
15780 (the_low_target): Add initializer for arch_setup field.
15781 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15782 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15783 (the_low_target): Add initializer for arch_setup field.
15784 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15785 (init_registers_powerpc_64): Likewise.
15786 (the_low_target): Add initializer for arch_setup field.
15787 * linux-s390-low.c (init_registers_s390): Add prototype.
15788 (init_registers_s390x): Likewise.
15789 (the_low_target): Add initializer for arch_setup field.
15790 * linux-sh-low.c (init_registers_sh): Add prototype.
15791 (the_low_target): Add initializer for arch_setup field.
15792 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15793 (the_low_target): Add initializer for arch_setup field.
15794 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15795 (the_low_target): Add initializer for arch_setup field.
15796
15797 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15798 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15799 instead of init_registers ().
15800 * win32-arm-low.c (init_registers_arm): Add prototype.
15801 (the_low_target): Add initializer for arch_setup field.
15802 * win32-i386-low.c (init_registers_i386): Add prototype.
15803 (the_low_target): Add initializer for arch_setup field.
15804
15805 * spu-low.c (init_registers_spu): Add prototype.
15806 (initialize_low): Call initialie_registers_spu () instead of
15807 initialize_registers ().
15808
fd96d250
PA
158092008-02-19 Pedro Alves <pedro@codesourcery.com>
15810
15811 * server.c (handle_v_requests): When handling the vRun and vAttach
15812 packets, if already debugging a process, don't kill it. Return an
15813 error instead.
15814
d41b6bb4
DJ
158152008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15816
15817 * server.c (handle_query): Correct length check.
15818
5ac588cf
PA
158192008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15820
15821 * win32-low.c (do_initial_child_stuff): Add process handle
15822 parameter. Set current_process_handle and current_process_id from the
15823 parameters. Clear globals.
15824 (win32_create_inferior): Don't set current_process_handle and
15825 current_process_id here. Instead pass them on the call to
15826 do_initial_child_stuff.
15827 (win32_attach): Likewise.
15828 (win32_clear_inferiors): New.
15829 (win32_kill): Don't close the current process handle or the
15830 current thread handle here. Instead call win32_clear_inferiors.
15831 (win32_detach): Don't open a new handle to the process. Call
15832 win32_clear_inferiors.
15833 (win32_join): Don't rely on current_process_handle; open a new
15834 handle using the process id.
15835 (win32_wait): Call win32_clear_inferiors when the inferior process
15836 has exited.
15837
ecd7ecbc
DJ
158382008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15839
15840 * server.c (monitor_show_help): Add "exit".
15841
1525d545
MG
158422008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15843
ecd7ecbc 15844 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15845 (clean): Add reg-xtensa.c.
15846 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15847 * configure.srv (xtensa*-*-linux*) New target.
15848 * linux-xtensa-low.c: New.
15849 * xtensa-xtregs.c: New.
1525d545 15850
59a016f0
PA
158512008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15852
15853 * hostio.c: Don't include errno.h.
15854 (errno_to_fileio_errno): Move to hostio-errno.
15855 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15856 error number outputting to the target->hostio_last_error callback.
15857 (hostio_packet_error): Use FILEIO_EINVAL directly.
15858 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15859 calls to hostio_error.
15860 * hostio-errno.c: New.
15861 * server.h (hostio_last_error_from_errno): Declare.
15862 * target.h (target_ops): Add hostio_last_error member.
15863 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15864 as hostio_last_error handler.
889bf7c5 15865 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15866 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15867 (wince_hostio_last_error): New functions.
15868 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15869 as hostio_last_error handler.
15870 (win32_target_ops) [!_WIN32_WCE]: Register
15871 hostio_last_error_from_errno as hostio_last_error handler.
15872 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15873 (hostio-errno.o): New rule.
15874 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15875 * configure.srv (srv_hostio_err_objs): New variable. Default to
15876 hostio-errno.o.
15877 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15878 * configure: Regenerate.
15879
2d717e4f
DJ
158802008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15881
15882 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15883 (linux_kill, linux_detach): Clean up the process list.
15884 * remote-utils.c (remote_open): Improve port number parsing.
15885 (putpkt_binary, input_interrupt): Only send interrupts if the target
15886 is running.
15887 * server.c (extended_protocol): Make static.
15888 (attached): Define earlier.
15889 (exit_requested, response_needed, program_argv): New variables.
15890 (target_running): New.
15891 (start_inferior): Clear attached here.
15892 (attach_inferior): Set attached here.
15893 (require_running): Define.
15894 (handle_query): Use require_running and target_running. Implement
15895 "monitor exit".
15896 (handle_v_attach, handle_v_run): New.
15897 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15898 (gdbserver_usage): Update.
15899 (main): Redo argument parsing. Handle --debug and --multi. Handle
15900 --attach along with other options or after the port. Save
15901 program_argv. Support no initial program. Resynchronize
15902 communication with GDB after an error. Handle "monitor exit".
15903 Use require_running and target_running. Always allow the extended
15904 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15905 restart in extended mode.
15906 * README: Refer to the GDB manual. Update --attach usage.
15907
7407e2de
AS
159082007-12-20 Andreas Schwab <schwab@suse.de>
15909
15910 * linux-low.c (STACK_SIZE): Define.
15911 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15912 (linux_test_for_tracefork): Likewise.
15913
b65d95c5
DJ
159142007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15915
15916 * linux-low.c (linux_wait_for_event): Update messages. Do not
15917 reinsert auto-delete breakpoints.
15918 * mem-break.c (struct breakpoint): Change return type of handler to
15919 int.
15920 (set_breakpoint_at): Update handler type.
15921 (reinsert_breakpoint_handler): Return 1 instead of calling
15922 delete_breakpoint.
15923 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15924 setting a new one.
15925 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15926 * mem-break.h (set_breakpoint_at): Update handler type.
15927 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15928 * win32-low.c (auto_delete_breakpoint): New.
15929 (get_child_debug_event): Use it.
15930
4e799345
DJ
159312007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15932
15933 * configure.ac: Check for pread and pwrite.
15934 * hostio.c (handle_pread): Fall back to lseek and read.
15935 (handle_pwrite): Fall back to lseek and write.
15936 * config.in, configure: Regenerated.
15937
27524b67
DJ
159382007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15939
15940 * server.c (myresume): Add own_buf argument.
15941 (main): Update calls.
15942
a20d5e98
DJ
159432007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15944
15945 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15946 * remote-utils.c (remote_open): Do not call disable_async_io.
15947 (block_async_io): Delete.
15948 (unblock_async_io): Make static.
15949 (initialize_async_io): New.
15950 * server.c (handle_v_cont): Handle async I/O here.
15951 (myresume): Likewise. Move other common resume tasks here...
15952 (main): ... from here. Call initialize_async_io. Disable async
15953 I/O before the main loop.
15954 * server.h (initialize_async_io): Declare.
15955 (block_async_io, unblock_async_io): Delete prototypes.
15956 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15957
b79d787e
DJ
159582007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15959
15960 * remote-utils.c (readchar): Allow binary data in received messages.
15961
d97903b2
PA
159622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15963
15964 * win32-low.c (attaching): New global.
15965 (win32_create_inferior): Clear the `attaching' global.
15966 (win32_attach): Set the `attaching' global.
15967 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15968 attaching. Only set a breakpoint at the entry point if not
15969 attaching.
15970
311de423
PA
159712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15972
15973 * server.c (main): Don't report dll events on the initial
15974 connection on attaches.
15975
6c2d16d2
PA
159762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15977
15978 * server.c (main): Relax numerical bases supported for the pid of
15979 the --attach command line argument.
15980
5ca906e6
PA
159812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15982
15983 * win32-low.c (win32_attach): Call OpenProcess before
15984 DebugActiveProcess, not after. Add last error output to error
15985 call.
15986
9c6c8194
PA
159872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15988
15989 * win32-low.c (win32_get_thread_context)
15990 (win32_set_thread_context): New functions.
15991 (thread_rec): Use win32_get_thread_context.
15992 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15993 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15994 field.
15995
4d5d1aaa
PA
159962007-12-03 Leo Zayas
15997 Pedro Alves <pedro_alves@portugalmail.pt>
15998
15999 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16000 global variables.
16001 (child_add_thread): Minor cleanup.
16002 (child_continue): Resume artificially suspended threads before
16003 calling ContinueDebugEvent.
16004 (suspend_one_thread): New.
16005 (fake_breakpoint_event): New.
16006 (get_child_debug_event): Change return type to int. Check here if
16007 gdb sent an interrupt request. If a soft interrupt was requested,
16008 fake a breakpoint event. Return 0 if there is no event to handle,
16009 and 1 otherwise.
16010 (win32_wait): Don't check here if gdb sent an interrupt request.
16011 Ensure there is a valid event to handle.
16012 (win32_request_interrupt): Add soft interruption method as last
16013 resort.
16014
c436e841
PA
160152007-12-03 Leo Zayas
16016 Pedro Alves <pedro_alves@portugalmail.pt>
16017
16018 * win32-low.h (win32_thread_info): Add descriptions to the
16019 structure members. Replace `suspend_count' counter by a
16020 `suspended' flag.
16021 * win32-low.c (thread_rec): Update condition of when to get the
16022 context from the inferior. Rely on ContextFlags being set if it
16023 has already been retrieved. Only suspend the inferior thread if
16024 we haven't already. Warn if that fails.
16025 (continue_one_thread): s/suspend_count/suspended/. Only call
16026 ResumeThread once. Warn if that fails.
16027
e7b5fa67
PA
160282007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16029
16030 * win32-low.c (win32_wait): Don't read from the inferior when it
16031 has already exited.
16032
a385171d
PA
160332007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16034
16035 * Makefile.in (win32_low_h): New variable.
16036 (win32-low.o): Add dependency on $(win32_low_h).
16037 (win32-arm-low.o, win32-i386-low.o): New rules.
16038
f80c84b3
DJ
160392007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16040
16041 * hostio.c: Correct copyright year.
16042
a6b151f1
DJ
160432007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16044
16045 * Makefile.in (OBS): Add hostio.o.
16046 (hostio.o): New rule.
16047 * server.h (handle_vFile): Declare.
16048 * hostio.c: New file.
16049 * server.c (handle_v_requests): Take packet_len and new_packet_len
16050 for binary packets. Call handle_vFile.
16051 (main): Update call to handle_v_requests.
16052
f9387fc3
DJ
160532007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16054
16055 * linux-low.c: Include <sched.h>.
16056
51c2684e
DJ
160572007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16058
16059 * linux-low.c (linux_tracefork_grandchild): New.
16060 (linux_tracefork_child): Use clone.
16061 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16062
75f83163
JB
160632007-10-31 Joel Brobecker <brobecker@adacore.com>
16064
16065 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16066
da5898ce
DJ
160672007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16068
16069 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16070
24a09b5f
DJ
160712007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16072
16073 * inferiors.c (change_inferior_id): Delete.
16074 (add_pid_to_list, pull_pid_from_list): New.
16075 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16076 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16077 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16078 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16079 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16080 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16081 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16082 (using_threads): Always set to 1.
16083 (handle_extended_wait): New.
16084 (add_process): Do not set TID.
16085 (linux_create_inferior): Set must_set_ptrace_flags.
16086 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16087 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16088 (linux_thread_alive): Rename TID argument to LWPID.
16089 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16090 (linux_wait_for_event): Do not use TID or check using_threads. Update
16091 call to dead_thread_notify. Call handle_extended_wait.
16092 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16093 (send_sigstop): Delete sigstop_sent.
16094 (wait_for_sigstop): Avoid TID.
16095 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16096 (linux_test_for_tracefork): New.
16097 (linux_lookup_signals): Use thread_db_active and
16098 linux_supports_tracefork_flag.
16099 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16100 * linux-low.h (get_process_thread): Avoid TID.
16101 (struct process_ifo): Move thread_known and tid to the end. Remove
16102 sigstop_sent.
16103 (linux_attach_lwp, thread_db_init): Update prototypes.
16104 * server.h (change_inferior_id): Delete prototype.
16105 (add_pid_to_list, pull_pid_from_list): New prototypes.
16106 * thread-db.c (thread_db_use_events): New.
16107 (find_first_thread): Rename to...
16108 (find_one_thread): ...this. Update callers and messages. Do not
16109 call fatal. Check thread_db_use_events. Do not call
16110 change_inferior_id or new_thread_notify.
16111 (maybe_attach_thread): Update. Do not call new_thread_notify.
16112 (thread_db_init): Set thread_db_use_events. Check use_events.
16113 * utils.c (fatal, warning): Correct message prefix.
16114
30ed0a8f
DJ
161152007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16116
16117 * Makefile.in (clean): Remove new files.
16118 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16119 (powerpc-64.o, powerpc-64.c): New rules.
16120 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16121 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16122 with SPE.
16123 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16124 SPE targets.
16125 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16126 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16127 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16128 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16129 (target_regsets): Add AltiVec and SPE register sets.
16130 * configure.ac: Check for AltiVec and SPE.
16131 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16132 (ppc_fill_vrregset, ppc_store_vrregset): New.
16133 (target_regsets): Add AltiVec register set.
16134 * configure: Regenerated.
16135
fd462a61
DJ
161362007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16137
16138 * linux-low.c (O_LARGEFILE): Define.
16139 (linux_read_memory): Use /proc/PID/mem.
16140 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16141 * configure, config.in: Regenerated.
16142
69f223ed
DJ
161432007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16144
16145 * linux-low.c (linux_wait_for_event): Do not pass signals while
16146 single-stepping.
16147
aec18585
PA
161482007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16149
16150 * win32-low.c (create_process): New.
16151 (win32_create_inferior): Use create_process instead of
16152 CreateProcess. If create_process failed retry appending an ".exe"
16153 suffix. Store the GetLastError result immediatelly after
16154 create_process calls and use it on the call to error.
16155
34d86ddd
PA
161562007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16157
16158 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16159
5a0e3bd0
JB
161602007-08-23 Joel Brobecker <brobecker@adacore.com>
16161
16162 * configure.ac: Switch license to GPLv3.
16163
f88c79e6
MS
161642007-08-01 Michael Snyder <msnyder@access-company.com>
16165
16166 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16167
6b3d9b83
PA
161682007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16169
16170 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16171 typedef.
16172 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16173 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16174 CloseToolhelp32Snapshot.
16175 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16176 CloseToolhelp32Snapshot.
16177
c588c53c
MS
161782007-07-27 Michael Snyder <michael.snyder@access-company.com>
16179
16180 * server.c (main): Check for inferior exit before main loop.
16181
aa0403d9
PA
161822007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16183
16184 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16185 instead of on tmp_desc.
16186
255e7678
DJ
161872007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16188 Daniel Jacobowitz <dan@codesourcery.com>
16189
16190 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16191 (add_thread): Minor cleanups.
16192 (clear_inferiors): Move lower in the file. Clear the DLL
16193 list.
16194 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16195 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16196 (xml_escape_text): New.
16197 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16198 for qSupported.
16199 (handle_v_cont): Report errors.
16200 (gdbserver_version): Update.
16201 (main): Correct size of own_buf. Do not report initial DLL events.
16202 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16203 (unloaded_dll, xml_escape_text): New.
16204 * win32-low.c (enum target_waitkind): Update comments.
16205 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16206 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16207 (win32_EnumProcessModules, win32_GetModuleInformation)
16208 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16209 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16210 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16211 (win32_Module32First, win32_Module32Next, load_toolhelp)
16212 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16213 (get_child_debug_event): Handle DLL events.
16214 (win32_wait): Likewise.
16215
0d37add9
DJ
162162007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16217
16218 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16219 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16220
45e2715e
PA
162212007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16222
16223 * win32-low.c (handle_output_debug_string): Ignore event if not
16224 waiting.
16225
c5674cf1
PA
162262007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16227
16228 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16229
2bbe3cc1
DJ
162302007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16231
16232 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16233
ae13219e
DJ
162342007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16235
16236 * inferiors.c (change_inferior_id): Add comment.
16237 * linux-low.c (check_removed_breakpoint): Add an early
16238 prototype. Improve debug output.
16239 (linux_attach): Doc update.
16240 (linux_detach_one_process, linux_detach): Clean up before releasing
16241 each process.
16242 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16243 * linux-low.h (struct process_info): Doc improvement.
16244 * mem-break.c (delete_all_breakpoints): New.
16245 * mem-break.h (delete_all_breakpoints): New prototype.
16246 * thread-db.c (find_first_thread): New.
16247 (thread_db_create_event): Call it instead of
16248 thread_db_find_new_threads. Clean up unused variables.
16249 (maybe_attach_thread): Remove first thread handling.
16250 (thread_db_find_new_threads): Use find_first_thread.
16251 (thread_db_get_tls_address): Likewise.
16252
4105de34
DJ
162532007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16254
16255 * thread-db.c (thread_db_find_new_threads): Add prototype.
16256 (thread_db_create_event): Check for the main thread before adding
16257 a new thread.
16258 (maybe_attach_thread): Only enable event reporting if TID == 0.
16259 (thread_db_get_tls_address): Check for new threads.
16260
2b876972
DJ
162612007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16262
16263 * linux-low.c (linux_create_inferior): Try execv before execvp.
16264 * spu-low.c (spu_create_inferior): Likewise.
16265
7a245884
DJ
162662007-06-13 Mike Frysinger <vapier@gentoo.org>
16267
16268 * linux-low.c (linux_create_inferior): Change execv to execvp.
16269 * spu-low.c (spu_create_inferior): Likewies.
16270
117ce543
DJ
162712007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16272
16273 * Makefile.in (clean): Clean new files instead of deleted ones.
16274 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16275 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16276 rules.
16277 * configure.srv: Specify XML files and new regformats for MIPS and
16278 MIPS64 GNU/Linux.
16279 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16280 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16281 an entry for the restart register.
16282 (mips_cannot_fetch_register, mips_cannot_store_register)
16283 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16284 register names to match the XML descriptions.
16285 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16286 restart register instead of $0.
16287
0e7f50da
UW
162882007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16289 Markus Deuling <deuling@de.ibm.com>
16290
16291 * remote-utils.c (decode_xfer_write): New function.
16292 * server.h (decode_xfer_write): Add prototype.
16293 * server.c (handle_query): Add PACKET_LEN argument. Support
16294 qXfer:spu:read and qXfer:spu:write packets.
16295 (main): Pass packet_len to handle_query.
16296 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16297 * target.h (target_ops): Add qxfer_spu.
16298
374c1d38
UW
162992007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16300
16301 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16302 accessing non-seekable spufs files.
16303
bb63802a
UW
163042007-05-16 Markus Deuling <deuling@de.ibm.com>
16305
889bf7c5 16306 * server.c (handle_query): Add reply for qC packet.
bb63802a 16307
7390519e
PA
163082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16309 Leo Zayas <lerele@champenstudios@com>
16310
16311 * server.h (check_remote_input_interrupt_request): New function.
16312 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16313 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16314 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16315 (check_remote_input_interrupt_request): New function.
16316 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16317 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16318 winapi_GenerateConsoleCtrlEvent): New typedefs.
16319 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16320 to 250 ms.
16321 (win32_wait): Check for remote interrupt request
16322 with check_remote_input_interrupt_request.
16323 (win32_request_interrupt): New function.
16324 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16325
34b34921
PA
163262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16327
16328 * win32-low.c (debug_registers_changed,
16329 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16330 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16331 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16332 (thread_rec): Get context using the low target.
16333 (child_add_thread): Call thread_added on the low target,
16334 which does the same thing.
16335 (regptr): Delete.
16336 (do_initial_child_stuff): Remove debug registers references.
16337 Set context using the low target. Resume threads after
16338 setting the contexts.
16339 (child_continue): Remove dead variable. Remove debug
16340 registers references.
16341 (child_fetch_inferior_registers): Go through the low target.
16342 (do_child_store_inferior_registers): Remove.
16343 (child_store_inferior_registers): Go through the low target.
16344 (win32_resume): Remove debug registers references.
16345 Set context using the low target.
16346 (handle_exception): Change return type to void. Don't record
16347 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16348 first chance exception.
889bf7c5 16349 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16350 goto loop. Always return after waiting for debug event.
16351 (win32_wait): Convert to switch statement. Handle spurious
16352 events.
16353
16354 * win32-i386-low.c (debug_registers_changed,
16355 debug_registers_used): New.
16356 (initial_stuff): Rename to ...
16357 (i386_initial_stuff): ... this. Clear debug registers
16358 state variables.
16359 (store_debug_registers): Delete.
16360 (i386_get_thread_context): New.
16361 (load_debug_registers): Delete.
16362 (i386_set_thread_context): New.
16363 (i386_thread_added): New.
16364 (single_step): Rename to ...
16365 (i386_single_step): ... this.
16366 (do_fetch_inferior_registers): Rename to ...
16367 (i386_fetch_inferior_register): ... this.
16368 (i386_store_inferior_register): New.
16369 (the_low_target): Adapt to new interface.
16370
16371 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16372 (arm_get_thread_context): New.
16373 (arm_set_thread_context): New.
16374 (regptr): New.
16375 (do_fetch_inferior_registers): Rename to ...
16376 (arm_fetch_inferior_register): ... this.
16377 (arm_store_inferior_register): New.
16378 (arm_wince_breakpoint): Reimplement as unsigned long.
16379 (arm_wince_breakpoint_len): Define.
16380 (the_low_target): Adapt to new interface.
16381
16382 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16383 load_debug_registers. Add get_thread_context, set_thread_context,
16384 thread_added and store_inferior_register. Rename
16385 fetch_inferior_registers to fetch_inferior_register.
16386 (regptr): Remove declaration.
16387
dd6953e1
PA
163882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16389
16390 * linux-low.c (linux_detach): Change return type to int. Return 0.
16391 * spu-low.c (spu_detach): Likewise.
16392
444d6139
PA
163932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16394
16395 * target.h (target_ops): Change return type of detach to int.
16396 Add join.
16397 (join_inferior): New.
16398 * server.c (main): Don't skip detach support on mingw32.
16399 If the inferior doesn't support detaching return error.
16400 Call join_inferior instead of using waitpid.
16401 * linux-low.c (linux_join): New.
16402 (linux_target_op): Add linux_join.
16403 * spu-low.c (spu_join): New.
16404 (spu_target_ops): Add spu_join.
16405 * win32-low.c (win32_detach): Adapt to new interface.
16406 Reopen current_process_handle before detaching. Issue a child
16407 resume before detaching.
16408 (win32_join): New.
16409 (win32_target_op): Add win32_join.
16410
1d5315fe
PA
164112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16412
16413 * win32-low.c (win32-attach): Fix return value.
16414 * target.h (target_ops): Describe ATTACH return values.
16415
bf914831
PA
164162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16417
16418 * win32-low.c (GETPROCADDRESS): Define.
16419 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16420 (winapi_DebugSetProcessKillOnExit): Likewise.
16421 (win32_create_inferior): Force usage of ansi CreateProcessA.
16422 (win32_attach): Use GETPROCADDRESS.
16423 (win32_detach): Likewise.
16424
f72f3e60
PA
164252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16426
16427 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16428
ed50f18f
PA
164292007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16430
16431 * win32-low.c: Commit leftover changes from 2007-03-29.
16432
0c2ead7e
DJ
164332007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16434
16435 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16436 fields short instead of int. Add explicit padding.
16437 (i387_cache_to_fsave): Remove unnecessary casts.
16438 (i387_fsave_to_cache): Doc fix.
16439 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16440
73725ff3
DJ
164412007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16442
16443 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16444 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16445
d99f33d8
PA
164462007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16447
16448 * configure.srv (arm*-*-mingw32ce*): Move near the other
16449 arm targets.
16450
68070c10
PA
164512007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16452
2482afc6 16453 * configure.ac: Add errno checking.
68070c10
PA
16454 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16455 sys/file.h and malloc.h.
16456 (AC_CHECK_DECLS): Add perror.
16457 (srv_mingwce): Handle.
2482afc6 16458 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16459 win32-i386-low.o to srv_tgtobj.
16460 (i[34567]86-*-mingw*): Likewise.
16461 (arm*-*-mingw32ce*): Add case.
16462 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16463 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16464 [__MINGW32CE__] (strerror): New function.
16465 [__MINGW32CE__] (errno): Define to GetLastError.
16466 [__MINGW32CE__] (COUNTOF): New macro.
16467 (remote_open): Remove extra close call.
16468 * mem-break.c (delete_breakpoint_at): New function.
16469 * mem-break.h (delete_breakpoint_at): Declare.
16470 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16471 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16472 [USE_WIN32API] (read, write): Add char* casts.
16473 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16474 * server.h: Include wincecompat.h on Windows CE.
16475 [HAVE_ERRNO_H]: Check.
16476 (perror): Declare if not declared.
16477 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16478 (perror_with_name): Remove errno declaration.
16479 * wincecompat.h: New.
16480 * wincecompat.c: New.
16481 * win32-low.h: New.
16482 * win32-arm-low.c: New.
16483 * win32-i386-low.c: New.
16484 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16485 (OUTMSG2): Make it safe.
16486 (_T): New macro.
16487 (COUNTOF): New macro.
16488 (NUM_REGS): Get it from the low target.
16489 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16490 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16491 (thread_rec): Let low target handle debug registers.
16492 (child_add_thread): Likewise.
16493 (child_init_thread_list): Likewise.
16494 (continue_one_thread): Likewise.
16495 (regptr): New.
16496 (do_child_fetch_inferior_registers): Move to ...
16497 * win32-i386-low.c: ... here, and rename to ...
16498 (do_fetch_inferior_registers): ... this.
889bf7c5 16499 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16500 Go through the low target.
16501 (do_child_store_inferior_registers): Use regptr.
16502 (strwinerror): New function.
16503 (win32_create_inferior): Handle Windows CE.
16504 Use strwinerror instead of strerror on Windows error
16505 codes. Add program to the error output.
16506 Don't close the main thread handle on Windows CE.
16507 (win32_attach): Use coredll.dll on Windows CE.
16508 (win32_kill): Close current process and current
16509 thread handles.
16510 (win32_detach): Use coredll.dll on Windows CE.
16511 (win32_resume): Let low target handle debug registers, and
16512 step request.
16513 (handle_exception): Add/Remove initial breakpoint. Avoid
16514 non-existant WSTOPSIG on Windows CE.
16515 (win32_read_inferior_memory): Cast to remove warning.
16516 (win32_arch_string): Go through the low target.
16517 (initialize_low): Call set_breakpoint_data with the low
16518 target's breakpoint.
16519 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16520 FOP_REGNUM, mappings): Move to ...
16521 * win32-i386-low.c: ... here.
16522 * win32-low.c (win32_thread_info): Move to ...
16523 * win32-low.h: ... here.
16524 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16525 win32-arm-low.c and wincecompat.c.
16526 (all:): Add $EXEEXT.
16527 (install-only:): Likewise.
16528 (gdbserver:): Likewise.
16529 (gdbreplay:): Likewise.
16530 * config.in: Regenerate.
16531 * configure: Regenerate.
16532
41093d81
PA
165332007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16534
16535 * win32-low.c: Rename typedef thread_info to
16536 win32_thread_info throughout.
16537
544afa54
PA
165382007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16539
16540 * win32-i386-low.c: Rename to ...
16541 * win32-low.c: ... this.
16542 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16543 * Makefile.in: Likewise.
16544
bce7165d
PA
165452007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16546
16547 * remote-utils.c (monitor_output): Constify msg parameter.
16548 * server.h (monitor_output): Likewise.
16549 * win32-i386-low.c (handle_output_debug_string): New.
16550 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16551 handle_output_debug_string.
16552 (get_child_debug_event): Likewise.
16553
506c7aa0
DJ
165542007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16555
16556 * server.c (main): Correct strtoul check.
16557
42c81e2a
DJ
165582007-03-27 Jon Ringle <jon@ringle.org>
16559
16560 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16561
9453113a
DJ
165622007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16563
16564 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16565
64a69107
DJ
165662007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16567
16568 * terminal.h: Check HAVE_SGTTY_H.
16569
165702007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16571
16572 * remote-utils.c (remote_open): Print out the assigned port number.
16573
c74d0ad8
DJ
165742007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16575
16576 * remote-utils.c (monitor_output): New function.
16577 * server.c (debug_threads): Define here.
16578 (monitor_show_help): New function.
16579 (handle_query): Handle qRcmd.
16580 (main): Do not handle 'd' packet.
16581 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16582 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16583 of debug_threads.
16584
de7c3b4a
PA
165852007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16586
16587 * Makefile.in (EXEEXT): New.
16588 (clean): Use $(EXEEXT).
16589
ef57601b
PA
165902007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16591
16592 * target.h (target_ops): Rename send_signal to request_interrupt,
16593 and remove enum target_signal parameter.
16594 * linux-low.c (linux_request_interrupt): Rename from
16595 linux_send_signal, and always send SIGINT.
16596 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16597 and always send SIGINT.
16598 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16599 of send_signal.
16600 (input_interrupt): Likewise.
16601
820f2bda
PA
166022007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16603
16604 * server.c (get_features_xml): Check if target implemented
16605 arch_string.
16606 * win32-i386-low.c (win32_arch_string): New.
16607 (win32_target_ops): Add win32_arch_string as arch_string member.
16608
ab39bf24
UW
166092007-02-22 Markus Deuling <deuling@de.ibm.com>
16610
16611 * spu-low.c (spu_arch_string): New.
16612 (spu_target_ops): Add spu_arch_string.
16613
61ff6e04
DJ
166142007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16615
16616 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16617 * configure.ac: Do not check for terminal.h.
16618 * configure, config.in: Regenerated.
16619
fb1e4ffc
DJ
166202007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16621
16622 * Makefile.in (OBS): Add $(XML_BUILTIN).
16623 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16624 (clean): Update.
16625 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16626 (arm-with-iwmmxt.c): New.
16627 * config.in, configure: Regenerate.
16628 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16629 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16630 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16631 (arm*-*-linux*): Add iWMMXt and regset support.
16632 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16633 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16634 (arm_store_wmmxregset, target_regsets): New.
16635 * server.c (get_features_xml): Take annex argument. Check builtin
16636 XML documents.
16637 (handle_query): Handle multiple annexes.
16638
0f48aa01
DJ
166392007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16640
16641 * remote-utils.c [USE_WIN32API] (read, write): Define.
16642 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16643 write.
16644
23181151
DJ
166452007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16646
16647 * linux-i386-low.c (the_low_target): Set arch_string.
16648 * linux-x86-64-low.c (the_low_target): Likewise.
16649 * linux-low.c (linux_arch_string): New.
16650 (linux_target_ops): Add it.
16651 * linux-low.h (struct linux_target_ops): Add arch_string.
16652 * server.c (write_qxfer_response): Use const void * for DATA.
16653 (get_features_xml): New.
16654 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16655 * target.h (struct target_ops): Add arch_string method.
16656
9d606399
DJ
166572007-01-03 Denis Pilat <denis.pilat@st.com>
16658 Daniel Jacobowitz <dan@codesourcery.com>
16659
16660 * linux-low.c (linux_kill): Handle being called with no threads.
16661 * win32-i386-low.c (win32_kill): Likewise.
16662 (get_child_debug_event): Clear current_process_handle.
16663
166642006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16665 Daniel Jacobowitz <dan@codesourcery.com>
16666
16667 * remote-utils.c (remote_open): Check the type of specified
16668 serial port devices before opening them.
16669 * server.c (main): Kill the inferior if an error occurs during
16670 the first remote_open.
16671
a5e13d24
DJ
166722006-12-05 Markus Deuling <deuling@de.ibm.com>
16673
16674 * README: Update supported targets.
16675
186947f7
DJ
166762006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16677
16678 * Makefile.in (clean): Remove reg-mips64.c.
16679 (reg-mips64.c, reg-mips64.o): New rules.
16680 * configure.srv: Handle mips64. Include regset support for mips.
16681 * linux-mips-low.c (union mips_register): New.
16682 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16683 (mips_breakpoint, mips_breakpoint_at): Use int.
16684 (mips_collect_register, mips_supply_register)
16685 (mips_collect_register_32bit, mips_supply_register_32bit)
16686 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16687 (mips_store_fpregset, target_regsets): New.
16688 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16689
a13e2c95
UW
166902006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16691
16692 * configure.srv: Add target "spu*-*-*".
16693 * Makefile.in (clean): Remove reg-spu.c.
16694 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16695 * spu-low.c: New file.
16696
cb7283db
DJ
166972006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16698
16699 * configure.ac: Correct td_thr_tls_get_addr test.
16700 * configure: Regenerated.
16701
89be2091
DJ
167022006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16703
16704 * linux-low.c (linux_wait_for_event): Reformat. Use the
16705 pass_signals array.
16706 * remote-utils.c (decode_address_to_semicolon): New.
16707 * server.c (pass_signals, handle_general_set): New.
16708 (handle_query): Mention QPassSignals for qSupported.
16709 (main): Call handle_general_set.
16710 * server.h (pass_signals, decode_address_to_semicolon): New.
16711
000ef4f0
DJ
167122006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16713
16714 * server.c (handle_query): Correct error handling for read_auxv.
16715
b7149293
UW
167162005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16717
16718 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16719 and srv_linux_thread_db to yes.
16720 * linux-s390-low.c (s390_fill_gregset): New function.
16721 (target_regsets): Define data structure.
16722
dae5f5cf
DJ
167232006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16724
16725 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16726 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16727 * config.in, configure: Regenerated.
16728 * inferiors.c (gdb_id_to_thread): New function.
16729 (gdb_id_to_thread_id): Use it.
16730 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16731 * linux-low.h (struct process_info): Add th member.
16732 (thread_db_get_tls_address): New prototype.
16733 * remote-utils.c (decode_address): Make non-static.
16734 * server.c (handle_query): Handle qGetTLSAddr.
16735 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16736 * target.h (struct target_ops): Add get_tls_address.
16737 * thread-db.c (maybe_attach_thread): Save the thread handle.
16738 (thread_db_get_tls_address): New.
16739
32ca6d61
DJ
167402006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16741
16742 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16743 (linux_resume_one_process): Take a siginfo_t *. Update all
16744 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16745 (struct pending_signals): Add a siginfo_t.
16746 (linux_wait_for_process): Always set last_status.
16747 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16748 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16749 * linux-low.h (struct process_info): Add last_status.
16750
5ffff7c1
DJ
167512006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16752
16753 * remote-utils.c (try_rle): New function.
16754 (putpkt_binary): Use it.
16755
8695c747
DJ
167562006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16757
16758 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16759 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16760 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16761 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16762 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16763 point registers.
16764
290fadea
RS
167652006-08-08 Richard Sandiford <richard@codesourcery.com>
16766
16767 * server.c (terminal_fd): New variable.
16768 (old_foreground_pgrp): Likewise.
16769 (restore_old_foreground_pgrp): New function.
16770 (start_inferior): Record the terminal file descriptor in terminal_fd
16771 and its original foreground group in old_foreground_pgrp. Register
16772 restore_old_foreground_pgrp with atexit().
16773
9f2e1e63
DJ
167742006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16775
16776 * server.c (handle_query): Correct qPart to qXfer.
16777
b80864fb
DJ
167782006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16779
16780 * configure.ac: Check for more headers which are missing on
16781 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16782 * configure.srv: Add Cygwin and mingw32.
16783 * remote-utils.c: Don't include headers unconditionally which
16784 are missing on mingw32. Include <winsock.h> for mingw32.
16785 (remote_open): Adjust for mingw32 support. Flush
16786 standard error after writing to it.
16787 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16788 (unblock_async_io, enable_async_io, disable_async_io)
16789 (readchar, getpkt): Update for Winsock support.
16790 (prepare_resume_reply): Expect a protocol signal number.
16791 * server.c: Disable <sys/wait.h> on mingw32.
16792 (start_inferior): Adjust for mingw32 support. Flush
16793 standard error after writing to it.
16794 (attach_inferior): Likewise. Use protocol signal
16795 numbers.
16796 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16797 and names.
16798 * win32-i386-low.c: New file.
16799 * Makefile.in (XM_CLIBS): Set.
16800 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16801 (win32-i386-low.o): New dependency rule.
16802 * linux-low.c (linux_wait): Use target signal numbers.
16803 * target.h (struct target_ops): Doc fix.
16804 * server.h (target_signal_to_name): New prototype.
16805 * gdbreplay.c: Don't include headers unconditionally which
16806 are missing on mingw32. Include <winsock.h> for mingw32.
16807 (remote_close, remote_open): Adjust for Winsock support.
16808 * configure, config.in: Regenerated.
16809
0876f84a
DJ
168102006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16811
16812 * server.c (decode_xfer_read, write_qxfer_response): New.
16813 (handle_query): Take a packet length argument. Handle
16814 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16815 the qSupported response.
16816 (main): Update call to handle_query.
16817
01f9e8fa
DJ
168182006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16819
16820 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16821 (putpkt_binary): Renamed from putpkt and adjusted for binary
16822 data.
16823 (putpkt): New wrapper for putpkt_binary.
16824 (readchar): Don't mask off the high bit.
16825 (decode_X_packet): New function.
16826 * server.c (main): Call putpkt_binary if a handler sets the packet
16827 length. Save the length of the incoming packet. Handle 'X'.
16828 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16829
be2a5f71
DJ
168302006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16831
16832 * server.c (handle_query): Handle qSupported.
16833
ea025f5f
DJ
168342006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16835
16836 * remote-utils.c (all_symbols_looked_up): New variable.
16837 (look_up_one_symbol): Check it.
16838 * server.h (look_up_one_symbol): New declaration.
16839 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16840
9308fc88
DJ
168412006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16842
16843 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16844 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16845 (PTRACE_GET_THREAD_AREA): Define.
16846 (ps_get_thread_area): New function.
16847
52fb6437
NS
168482006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16849
16850 * configure.srv (m68k*-*-uclinux*): New target.
16851 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16852 (linux_resume_one_process): Remove extraneous cast.
16853 (linux_read_offsets): New.
16854 (linux_target_op): Add linux_read_offsets on mmuless systems.
16855 * server.c (handle_query): Add qOffsets logic.
16856 * target.h (struct target_ops): Add read_offsets.
16857
21b0f40c
DJ
168582006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16859
16860 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16861 (PTRACE_GET_THREAD_AREA): Define.
16862 (ps_get_thread_area): New function.
16863 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16864 (linux-x86-64-low.o): Update.
16865
0050a760
DJ
168662006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16867
16868 * configure.ac: Remove checks for prfpregset_t.
16869 * gdb_proc_service.h: New file.
16870 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16871 new "gdb_proc_service.h".
16872 * proc-service.c: Likewise.
16873 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16874 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16875 * Makefile.in (gdb_proc_service_h): Updated.
16876 * configure, config.in: Regenerated.
16877
b92a518e
DJ
168782006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16879
16880 * remote-utils.c (prepare_resume_reply): Move declaration
16881 of gdb_id_from_wait to the top of the block.
16882
545587ee
DJ
168832006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16884
16885 * linux-low.c (regsets_store_inferior_registers): Read the regset
16886 from the target before filling it.
16887
9db87ebd
DJ
168882006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16889
16890 * server.c (attach_inferior): Return SIGTRAP for a successful
16891 attach.
16892
dd24457d
DJ
168932006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16894
16895 * Makefile.in (OBS): Add version.o.
16896 (STAGESTUFF): Delete.
16897 (version.o): Add dependencies.
16898 (version.c): Replace rule.
16899 (clean): Remove version.c.
16900 * server.c (gdbserver_version): New.
16901 (gdbserver_usage): Use printf.
16902 (main): Handle --version and --help.
16903 * server.h (version, host_name): Add declarations.
16904
6f0f660e
EZ
169052005-12-23 Eli Zaretskii <eliz@gnu.org>
16906
889bf7c5
PA
16907 * linux-arm-low.c:
16908 * linux-arm-low.c:
16909 * inferiors.c:
16910 * i387-fp.h:
16911 * i387-fp.c:
16912 * gdbreplay.c:
16913 * regcache.c:
16914 * proc-service.c:
16915 * mem-break.h:
16916 * mem-break.c:
16917 * linux-x86-64-low.c:
16918 * linux-sh-low.c:
16919 * linux-s390-low.c:
16920 * linux-ppc64-low.c:
16921 * linux-ppc-low.c:
16922 * linux-mips-low.c:
16923 * linux-m68k-low.c:
16924 * linux-m32r-low.c:
16925 * linux-low.h:
16926 * linux-low.c:
16927 * linux-ia64-low.c:
16928 * linux-i386-low.c:
16929 * linux-crisv32-low.c:
16930 * thread-db.c:
16931 * terminal.h:
16932 * target.h:
16933 * target.c:
16934 * server.h:
16935 * server.c:
16936 * remote-utils.c:
16937 * regcache.h:
16938 * utils.c:
16939 * Makefile.in:
16940 * configure.ac:
6f0f660e
EZ
16941 * gdbserver.1: Add (C) after Copyright. Update the FSF
16942 address.
16943
9d1fb177
DJ
169442005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16945
16946 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16947 (arm_breakpoint_at): Recognize both breakpoints.
16948 (the_low_target): Use the correct breakpoint instruction.
16949
011a70c2
DJ
169502005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16951
16952 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16953 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16954 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16955 (the_low_target): Update.
16956
7fb85e41
AS
169572005-10-25 Andreas Schwab <schwab@suse.de>
16958
16959 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16960
16961 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16962 (ia64_num_regs): Reduce to 462.
16963
3db0444b
DJ
169642005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16965
16966 * acinclude.m4: Correct quoting.
16967 * aclocal.m4: Regenerated.
16968
16969 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16970 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16971 (thread_db_init): Call thread_db_err_str.
16972 * configure.ac: Check for TD_VERSION.
16973 * config.in, configure: Regenerated.
16974
bee0189a
DJ
169752005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16976
16977 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16978
e9d25b98
DJ
169792005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16980
16981 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16982 is not available. Define HAVE_PTRACE_GETREGS if it is.
16983 * config.in, configure: Regenerated.
16984 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16985 * linux-i386-low.c, linux-m68k-low.c: Update to use
16986 HAVE_PTRACE_GETREGS.
16987 * linux-low.c (regsets_fetch_inferior_registers)
16988 (regsets_store_inferior_registers): Only return 0 if we processed
16989 GENERAL_REGS.
16990 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16991 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16992
a06660f7
DJ
169932005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16994
16995 * inferiors.c (struct thread_info): Add gdb_id.
16996 (add_thread): Add gdb_id argument.
16997 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16998 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16999 calls to add_thread.
17000 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17001 * server.c (handle_query): Use thread_to_gdb_id.
17002 (handle_v_cont, main): Use gdb_id_to_thread_id.
17003 * server.h (add_thread): Update prototype.
17004 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17005 prototypes.
17006
5a1f5858
DJ
170072005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17008
17009 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17010 left-padded registers.
17011 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17012 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17013
e122f1f5
SE
170142005-07-01 Steve Ellcey <sje@cup.hp.com>
17015
17016 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17017 * configure: Regenerate.
17018 * config.in: Regenerate.
17019 * server.h (NEED_DECLARATION_STRERROR):
17020 Replace with !HAVE_DECL_STRERROR.
17021
d592fa2f
DJ
170222005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17023
17024 * linux-low.c (linux_wait, linux_send_signal): Don't test
17025 an unsigned long variable for > 0 if it could be MAX_ULONG.
17026 * server.c (myresume): Likewise.
17027 * target.c (set_desired_inferior): Likewise.
17028
ccbd4912
MK
170292005-06-13 Mark Kettenis <kettenis@gnu.org>
17030
17031 * configure.ac: Simplify and improve check for socklen_t.
17032 * configure, config.in: Regenerate.
17033
f450004a
DJ
170342005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17035
17036 * acconfig.h: Remove.
17037 * configure.ac: Add a test for socklen_t. Use three-argument
17038 AC_DEFINE throughout.
17039 * config.in: Regenerated using autoheader 2.59.
17040 * configure: Regenerated.
17041
17042 * gdbreplay.c (socklen_t): Provide a default.
17043 (remote_open): Use socklen_t.
17044 * remote-utils.c (socklen_t): Provide a default.
17045 (remote_open): Use socklen_t.
17046 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17047 unsigned char.
17048
17049 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17050 char for buffers.
17051 * linux-low.c (linux_read_memory, linux_write_memory)
17052 (linux_read_auxv): Likewise.
17053 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17054 (check_mem_write): Likewise.
17055 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17056 Likewise.
17057 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17058 (registers_from_string, register_data): Likewise.
17059 * server.c (handle_query, main): Likewise.
17060 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17061 (decode_M_packet): Likewise.
17062 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17063 * target.h (struct target_ops): Update read_memory, write_memory,
17064 and read_auxv.
17065 (read_inferior_memory, write_inferior_memory): Update.
17066 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17067 to unsigned char *.
17068 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17069 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17070 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17071 linux-s390-low.c, linux-sh-low.c: Update for changes in
17072 read_inferior_memory and the_low_target->breakpoint.
17073
eee84df1
DJ
170742005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17075
17076 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17077 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17078 * configure.srv: Add powerpc64-*-linux*.
17079 * linux-ppc64-low.c: New file.
17080
45b134e5
OF
170812005-05-23 Orjan Friberg <orjanf@axis.com>
17082
17083 * linux-cris-low.c: New file with support for CRIS.
17084 * linux-crisv32-low.c: Ditto for CRISv32.
17085 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17086 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17087 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17088 reg-crisv32.o, and reg-crisv32.c to make rules.
17089 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17090 recognized targets.
17091
48d93c75
UW
170922005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17093
17094 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17095 of sizeof (PTRACE_XFER_TYPE).
17096 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17097
e013ee27
OF
170982005-05-12 Orjan Friberg <orjanf@axis.com>
17099
889bf7c5 17100 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17101 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17102 pointers for hardware watchpoint support.
17103 * linux-low.h (struct linux_target_ops): Ditto.
17104 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17105 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17106 to linux_target_ops.
17107 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17108 reply packet.
17109 * server.c (main): Recognize 'Z' and 'z' packets.
17110
b0ded00b
UW
171112005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17112
17113 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17114 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17115 (the_low_target): Add new members.
17116
8643e2ad
DJ
171172005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17118
17119 * proc-service.c (ps_lgetregs): Search all_processes instead of
17120 all_threads.
17121
fc620387
DJ
171222005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17123
17124 * server.c (start_inferior): Change return type to int.
17125 (attach_inferior): Change sigptr to int *.
17126 (handle_v_cont, handle_v_requests): Change signal to int *.
17127 (main): Change signal to int.
17128
171292005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17130
17131 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17132 * configure.srv: Add m32r*-*-linux*.
17133 * linux-m32r-low.c: New file.
17134
e0e76420
DJ
171352005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17136
17137 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17138
a1928bad
DJ
171392005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17140
17141 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17142 Take unsigned long arguments for PIDs.
17143 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17144 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17145 (wait_for_sigstop, linux_resume_one_process)
17146 (regsets_fetch_inferior_registers, linux_send_signal)
17147 (linux_read_auxv): Likewise. Update the types of variables holding
17148 PIDs. Update format string specifiers.
17149 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17150 * remote-utils.c (prepare_resume_reply): Likewise.
17151 * server.c (cont_thread, general_thread, step_thread)
17152 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17153 unsigned long.
17154 (handle_query): Update format specifiers.
17155 (handle_v_cont, main): Use strtoul for thread IDs.
17156 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17157 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17158 (general_thread, step_thread, thread_from_wait)
17159 (old_thread_from_wait): Update.
17160 * target.h (struct thread_resume): Use unsigned long for THREAD.
17161 (struct target_ops): Use unsigned long for arguments to attach and
17162 thread_alive.
17163
dcdb98d2
DJ
171642005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17165
17166 * acinclude.m4: Include bfd/bfd.m4 directly.
17167 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17168 <agriffis@toolchain.org>.
17169 * aclocal.m4, configure: Regenerated.
17170
bec39cab
AC
171712005-01-07 Andrew Cagney <cagney@gnu.org>
17172
17173 * configure.ac: Rename configure.in, require autoconf 2.59.
17174 * configure: Re-generate.
17175
434c4c77
DJ
171762004-12-08 Daniel Jacobowitz <dan@debian.org>
17177
17178 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17179 LIBS when finished.
17180 * aclocal.m4: Regenerated.
17181 * configure: Regenerated.
17182
db1d3e1b
AS
171832004-11-21 Andreas Schwab <schwab@suse.de>
17184
17185 * linux-m68k-low.c (m68k_num_gregs): Define.
17186 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17187 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17188 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17189 (m68k_breakpoint_at): New. Add to the_low_target.
17190
17191 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17192 srv_linux_thread_db to yes.
17193
43360365
JB
171942004-10-20 Joel Brobecker <brobecker@gnat.com>
17195
17196 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17197 (ARCH_SET_FS): Likewise.
17198 (ARCH_GET_FS): Likewise.
17199 (ARCH_GET_GS): Likewise.
17200
fd500816
DJ
172012004-10-16 Daniel Jacobowitz <dan@debian.org>
17202
17203 * linux-i386-low.c (ps_get_thread_area): New.
17204 * linux-x86-64-low.c (ps_get_thread_area): New.
17205 * linux-low.c: Include <sys/syscall.h>.
17206 (linux_kill_one_process): Don't kill the first thread here.
17207 (linux_kill): Kill the first thread here.
17208 (kill_lwp): New function.
17209 (send_sigstop, linux_send_signal): Use it.
17210 * proc-service.c: Clean up #ifdefs.
17211 (fpregset_info): Delete.
17212 (ps_lgetregs): Update and enable implementation.
17213 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17214 implementations.
17215 * remote-utils.c (struct sym_cache, symbol_cache): New.
17216 (input_interrupt): Print a clearer message.
17217 (async_io_enabled): New variable.
17218 (enable_async_io, disable_async_io): Use it. Update comments.
17219 (look_up_one_symbol): Use the symbol cache.
17220 * thread-db.c (thread_db_look_up_symbols): New function.
17221 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17222
f6de3c42
DJ
172232004-10-16 Daniel Jacobowitz <dan@debian.org>
17224
17225 * configure.in: Test for -rdynamic.
17226 * configure: Regenerated.
17227 * Makefile (INTERNAL_LDFLAGS): New.
17228 (gdbserver, gdbreplay): Use it.
17229
2c0fc042
AC
172302004-09-02 Andrew Cagney <cagney@gnu.org>
17231
17232 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17233
075b3282
DJ
172342004-03-23 Daniel Jacobowitz <drow@mvista.com>
17235
17236 * linux-low.c (linux_wait): Clear all_processes list also.
17237
fa6a77dc
DJ
172382004-03-12 Daniel Jacobowitz <drow@mvista.com>
17239
17240 * linux-low.c: Include <errno.h>. Remove extern declaration of
17241 errno.
17242
6d782a97
DJ
172432004-03-12 Daniel Jacobowitz <drow@mvista.com>
17244
17245 * gdbreplay.c, server.h, utils.c: Update copyright years.
17246
3a7fb99b
DJ
172472004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17248
17249 * server.c (main): Print child status or termination signal from
17250 variable 'signal', not 'sig'.
17251
c3e735a6
DJ
172522004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17253
17254 * linux-low.c (linux_read_memory): Change return type to
17255 int. Check for and return error from ptrace().
17256 * target.c (read_inferior_memory): Change return type to int. Pass
17257 back return status from the_target->read_memory().
17258 * target.h (struct target_ops): Adapt *read_memory() prototype.
17259 Update comment.
17260 (read_inferior_memory): Adapt prototype.
17261 * server.c (main): Return an error packet if
17262 read_inferior_memory() returns an error.
17263
a59d1c82
DJ
172642004-03-04 Daniel Jacobowitz <drow@mvista.com>
17265
17266 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17267 Unify with other clean targets.
17268
dc3f8883
DJ
172692004-02-29 Daniel Jacobowitz <drow@mvista.com>
17270
17271 * server.c (handle_v_cont): Call set_desired_inferior.
17272
89a208da
DJ
172732004-02-29 Daniel Jacobowitz <drow@mvista.com>
17274
17275 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17276
62ea82f5
DJ
172772004-02-29 Daniel Jacobowitz <drow@mvista.com>
17278
17279 * linux-low.c (linux_wait): Unblock async I/O.
17280 (linux_resume): Block and enable async I/O.
17281 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17282 * server.h (block_async_io, unblock_async_io): Add prototypes.
17283
6910d122
DJ
172842004-02-29 Daniel Jacobowitz <drow@mvista.com>
17285
17286 * remote-utils.c (remote_open): Print a status notice after
17287 opening a TCP port.
17288 * server.c (attach_inferior): Print a status notice after
17289 attaching.
17290
172912004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17292
17293 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17294
c89dc5d4
DJ
172952004-02-26 Daniel Jacobowitz <drow@mvista.com>
17296
17297 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17298 error packet.
17299 * server.c, target.h: Update copyright years.
17300
4b8dad4a
RM
173012004-02-25 Roland McGrath <roland@redhat.com>
17302
17303 * target.h (struct target_ops): New member `read_auxv'.
17304 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17305 * linux-low.c (linux_read_auxv): New function.
17306 (linux_target_ops): Initialize `read_auxv' member to that.
17307
d7446758
JB
173082004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17309
17310 Committed by Jim Blandy <jimb@redhat.com>.
17311
17312 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17313 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17314 instead of GPR_SIZE to distiguish s390 and s390x targets.
17315
5544ad89
DJ
173162004-01-31 Daniel Jacobowitz <drow@mvista.com>
17317
17318 * linux-low.c: Update copyright year.
17319 (check_removed_breakpoint): Clear pending_is_breakpoint.
17320 (linux_set_resume_request, linux_queue_one_thread)
17321 (resume_status_pending_p): New functions.
17322 (linux_continue_one_thread): Use process->resume.
17323 (linux_resume): Only resume threads if there are no pending events.
17324 * linux-low.h (struct process_info): Add resume request
17325 pointer.
17326
2a68b70e
DJ
173272004-01-30 Daniel Jacobowitz <drow@mvista.com>
17328
17329 * regcache.c (new_register_cache): Clear the allocated register
17330 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17331
64386c31
DJ
173322003-10-13 Daniel Jacobowitz <drow@mvista.com>
17333
17334 * linux-low.c (linux_resume): Take a struct thread_resume *
17335 argument.
17336 (linux_wait): Update call.
17337 (resume_ptr): New static variable.
17338 (linux_continue_one_thread): Renamed from
17339 linux_continue_one_process. Use resume_ptr.
17340 (linux_resume): Use linux_continue_one_thread.
17341 * server.c (handle_v_cont, handle_v_requests): New functions.
17342 (myresume): New function.
17343 (main): Handle 'v' case.
17344 * target.h (struct thread_resume): New type.
17345 (struct target_ops): Change argument of "resume" to struct
17346 thread_resume *.
17347 (myresume): Delete macro.
17348
c938e9b0
L
173492003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17350
17351 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17352 (uninstall): Support DESTDIR.
17353
7f313d07
BC
17354Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17355
17356 * configure.srv: Add xscale*linux copy of arm*linux entry.
17357
3b2fc2ea
DJ
173582003-07-24 Daniel Jacobowitz <drow@mvista.com>
17359
17360 * linux-arm-low.c (arm_reinsert_addr): New function.
17361 (the_low_target): Add arm_reinsert_addr.
17362
1c0a559e
MK
173632003-07-08 Mark Kettenis <kettenis@gnu.org>
17364
17365 * mem-break.c: Remove whitespace at end of file.
17366
43d5792c
DJ
173672003-06-28 Daniel Jacobowitz <drow@mvista.com>
17368
17369 * configure.in: Check whether we need to prototype strerror.
17370 * server.h: Optionally prototype strerror.
17371 * gdbreplay.c (perror_with_name): Use strerror.
17372 * linux-low.c (linux_attach_lwp): Use strerror.
17373 * utils.c (perror_with_name): Use strerror.
17374 * config.in, configure: Regenerated.
17375
c8a86edf
DJ
173762003-06-28 Daniel Jacobowitz <drow@mvista.com>
17377
17378 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17379 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17380
73d37363
DJ
173812003-06-20 Daniel Jacobowitz <drow@mvista.com>
17382
17383 * Makefile.in (SFILES): Update.
17384 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17385 low-sun3.c: Remove files.
17386
6ad8ae5c
DJ
173872003-06-17 Daniel Jacobowitz <drow@mvista.com>
17388
17389 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17390 (linux_detach_one_process, linux_detach): New functions.
17391 (linux_target_ops): Add linux_detach.
17392 * server.c (main): Handle 'D' packet.
17393 * target.h (struct target_ops): Add "detach" member.
17394 (detach_inferior): Define.
17395
1581182a
MK
173962003-06-13 Mark Kettenis <kettenis@gnu.org>
17397
17398 From Kelley Cook <kelleycook@wideopenwest.com>:
17399 * configure.srv: Accept i[34567]86 variants.
17400
e5379b03
DJ
174012003-06-05 Daniel Jacobowitz <drow@mvista.com>
17402
17403 * linux-low.c (linux_wait_for_event): Correct comment typos.
17404 (linux_resume_one_process): Call check_removed_breakpoint.
17405 (linux_send_signal): New function.
17406 (linux_target_ops): Add linux_send_signal.
17407 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17408 of kill.
17409 * target.h (struct target_ops): Add send_signal.
17410
2ff29de4
JB
174112003-05-29 Jim Blandy <jimb@redhat.com>
17412
17413 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17414 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17415 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17416 away part of the register's value.
17417
254787d4
DJ
174182003-03-26 Daniel Jacobowitz <drow@mvista.com>
17419
17420 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17421 (linux_wait_for_event, linux_init_signals): Likewise.
17422
94e10508
DJ
174232003-03-17 Daniel Jacobowitz <drow@mvista.com>
17424
17425 * configure.in: Check for stdlib.h.
17426 * configure: Regenerated.
17427 * config.in: Regenerated.
17428
4c0711e0
DJ
174292003-01-04 Andreas Schwab <schwab@suse.de>
17430
17431 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17432
ef66e766
AC
174332003-01-02 Andrew Cagney <ac131313@redhat.com>
17434
17435 * Makefile.in: Remove obsolete code.
17436
a1358604
DJ
174372002-11-20 Daniel Jacobowitz <drow@mvista.com>
17438
17439 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17440 defined(PT_FPR0_HI).
17441
23ce3b1c
DJ
174422002-11-17 Stuart Hughes <seh@zee2.com>
17443
17444 * linux-arm-low.c (arm_num_regs): Increase.
17445 (arm_regmap): Include status register.
17446
174472002-11-17 Daniel Jacobowitz <drow@mvista.com>
17448
17449 * linux-low.c (register_addr): Remove incorrect -1 check.
17450
a9fa9f7d
DJ
174512002-08-29 Daniel Jacobowitz <drow@mvista.com>
17452
17453 * linux-low.c (linux_create_inferior): Call setpgid. Return
17454 the new PID.
17455 (unstopped_p, linux_signal_pid): Remove.
17456 (linux_target_ops): Remove linux_signal_pid.
17457 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17458 global instead of target method.
17459 * target.h (struct target_ops): Remove signal_pid. Update comment
17460 for create_inferior.
17461 * server.c (signal_pid): New variable.
17462 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17463 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17464 (attach_inferior): Set signal_pid.
17465
17574093
DJ
174662002-08-23 Daniel Jacobowitz <drow@mvista.com>
17467
17468 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17469
174702002-08-20 Jim Blandy <jimb@redhat.com>
17471
17472 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17473 default for this.
17474
174752002-08-01 Andrew Cagney <cagney@redhat.com>
17476
17477 * Makefile.in: Make chill references obsolete.
17478
174792002-07-24 Kevin Buettner <kevinb@redhat.com>
17480
17481 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17482 * configure: Regenerate.
17483 * config.in: Regenerate.
17484
174852002-07-09 David O'Brien <obrien@FreeBSD.org>
17486
17487 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17488 (perror_with_name, remote_close, remote_open, expect, play): Static.
17489
174902002-07-04 Michal Ludvig <mludvig@suse.cz>
17491
4b8dad4a 17492 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17493 byte offsets instead of an array of indexes.
17494 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17495
174962002-06-13 Daniel Jacobowitz <drow@mvista.com>
17497
17498 * regcache.c: Add comment.
17499
175002002-06-11 Daniel Jacobowitz <drow@mvista.com>
17501
17502 * thread-db.c: New file.
17503 * proc-service.c: New file.
17504 * acinclude.m4: New file.
17505 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17506 proc-service.o, and thread-db.o.
17507 (linux-low.o): Add USE_THREAD_DB.
17508 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17509 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17510 * aclocal.m4: Regenerated.
17511 * config.in: Regenerated.
17512 * configure: Regenerated.
17513 * configure.in: Check for proc_service.h, sys/procfs.h,
17514 thread_db.h, and linux/elf.h headrs.
17515 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17516 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17517 Check for -lthread_db and thread support.
17518 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17519 PowerPC, and SuperH.
17520 * i387-fp.c: Constify arguments.
17521 * i387-fp.h: Likewise.
17522 * inferiors.c: (struct thread_info): Renamed from
17523 `struct inferior_info'. Remove PID member. Use generic inferior
17524 list header. All uses updated.
17525 (inferiors, signal_pid): Removed.
17526 (all_threads): New variable.
17527 (get_thread): Define.
17528 (add_inferior_to_list): New function.
17529 (for_each_inferior): New function.
17530 (change_inferior_id): New function.
17531 (add_inferior): Removed.
17532 (remove_inferior): New function.
17533 (add_thread): New function.
17534 (free_one_thread): New function.
17535 (remove_thread): New function.
17536 (clear_inferiors): Use for_each_inferior and free_one_thread.
17537 (find_inferior): New function.
17538 (find_inferior_id): New function.
17539 (inferior_target_data): Update argument type.
17540 (set_inferior_target_data): Likewise.
17541 (inferior_regcache_data): Likewise.
17542 (set_inferior_regcache_data): Likewise.
17543 * linux-low.c (linux_bp_reinsert): Remove.
17544 (all_processes, stopping_threads, using_thrads)
17545 (struct pending_signals, debug_threads, pid_of): New.
17546 (inferior_pid): Replace with macro.
17547 (struct inferior_linux_data): Remove.
17548 (get_stop_pc, add_process): New functions.
17549 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17550 Use add_process and add_thread.
17551 (linux_attach_lwp): New function, based on old linux_attach. Use
17552 add_process and add_thread. Set stop_expected for new threads.
17553 (linux_attach): New function.
17554 (linux_kill_one_process): New function.
17555 (linux_kill): Kill all LWPs.
17556 (linux_thread_alive): Use find_inferior_id.
17557 (check_removed_breakpoints, status_pending_p): New functions.
17558 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17559 Update. Use WNOHANG. Wait for cloned processes also. Update process
17560 struct for the found process.
17561 (linux_wait_for_event): New function.
17562 (linux_wait): Use it. Support LWPs.
17563 (send_sigstop, wait_for_sigstop, stop_all_processes)
17564 (linux_resume_one_process, linux_continue_one_process): New functions.
17565 (linux_resume): Support LWPs.
17566 (REGISTER_RAW_SIZE): Remove.
17567 (fetch_register): Use register_size instead. Call supply_register.
17568 (usr_store_inferior_registers): Likewise. Call collect_register.
17569 Fix recursive case.
17570 (regsets_fetch_inferior_registers): Improve error message.
17571 (regsets_store_inferior_registers): Add debugging.
17572 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17573 (unstopped_p, linux_signal_pid): New functions.
17574 (linux_target_ops): Add linux_signal_pid.
17575 (linux_init_signals): New function.
17576 (initialize_low): Call it. Initialize using_threads.
17577 * regcache.c (inferior_regcache_data): Add valid
17578 flag.
17579 (get_regcache): Fetch registers lazily. Add fetch argument
17580 and update all callers.
17581 (regcache_invalidate_one, regcache_invalidate): New
17582 functions.
17583 (new_register_cache): Renamed from create_register_cache.
17584 Return the new regcache.
17585 (free_register_cache): Change argument to a void *.
17586 (registers_to_string, registers_from_string): Call get_regcache
17587 with fetch flag set.
17588 (register_data): Make static. Pass fetch flag to get_regcache.
17589 (supply_register): Call get_regcache with fetch flag clear.
17590 (collect_register): Call get_regcache with fetch flag set.
17591 (collect_register_as_string): New function.
17592 * regcache.h: Update.
17593 * remote-utils.c (putpkt): Flush after debug output and use
17594 stderr.
17595 Handle input interrupts while waiting for an ACK.
17596 (input_interrupt): Use signal_pid method.
17597 (getpkt): Flush after debug output and use stderr.
17598 (outreg): Use collect_register_as_string.
17599 (new_thread_notify, dead_thread_notify): New functions.
17600 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17601 and general_thread.
17602 (look_up_one_symbol): Flush after debug output.
17603 * server.c (step_thread, server_waiting): New variables.
17604 (start_inferior): Don't use signal_pid. Update call to mywait.
17605 (attach_inferior): Update call to mywait.
17606 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17607 (main): Don't fetch/store registers explicitly. Use
17608 set_desired_inferior. Support proposed ``Hs'' packet. Update
17609 calls to mywait.
17610 * server.h: Update.
17611 (struct inferior_list, struct_inferior_list_entry): New.
17612 * target.c (set_desired_inferior): New.
17613 (write_inferior_memory): Constify.
17614 (mywait): New function.
17615 * target.h: Update.
17616 (struct target_ops): New signal_pid method.
17617 (mywait): Removed macro, added prototype.
17618
17619 * linux-low.h (regset_func): Removed.
17620 (regset_fill_func, regset_store_func): New.
17621 (enum regset_type): New.
17622 (struct regset_info): Add type field. Use new operation types.
17623 (struct linux_target_ops): stop_pc renamed to get_pc.
17624 Add decr_pc_after_break and breakpoint_at.
17625 (get_process, get_thread_proess, get_process_thread)
17626 (strut process_info, all_processes, linux_attach_lwp)
17627 (thread_db_init): New.
17628
17629 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17630 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17631 (the_low_target): Add new members.
17632 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17633 (i386_store_fpxregset): Constify.
17634 (target_regsets): Add new kind identifier.
17635 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17636 (i386_set_pc): Add debugging.
17637 (i386_breakpoint_at): New function.
17638 (the_low_target): Add new members.
17639 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17640 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17641 (mips_breakpoint_at): New.
17642 (the_low_target): Add new members.
17643 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17644 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17645 (the_low_target): Add new members.
17646 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17647 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17648 (the_low_target): Add new members.
17649 * linux-x86-64-low.c (target_regsets): Add new kind
17650 identifier.
17651
176522002-05-15 Daniel Jacobowitz <drow@mvista.com>
17653
17654 From Martin Pool <mbp@samba.org>:
17655 * server.c (gdbserver_usage): New function.
17656 (main): Call it.
17657
176582002-05-14 Daniel Jacobowitz <drow@mvista.com>
17659
17660 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17661 stop_at -> stop_pc.
17662
176632002-05-04 Andrew Cagney <ac131313@redhat.com>
17664
17665 * Makefile.in: Remove obsolete code.
17666
176672002-04-24 Michal Ludvig <mludvig@suse.cz>
17668
17669 * linux-low.c (regsets_fetch_inferior_registers),
17670 (regsets_store_inferior_registers): Removed cast to int from
17671 ptrace() calls.
17672 * regcache.h: Added declaration of struct inferior_info.
17673
176742002-04-20 Daniel Jacobowitz <drow@mvista.com>
17675
17676 * inferiors.c (struct inferior_info): Add regcache_data.
17677 (add_inferior): Call create_register_cache.
17678 (clear_inferiors): Call free_register_cache.
17679 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17680 * regcache.c (struct inferior_regcache_data): New.
17681 (registers): Remove.
17682 (get_regcache): New function.
17683 (create_register_cache, free_register_cache): New functions.
17684 (set_register_cache): Don't initialize the register cache here.
17685 (registers_to_string, registers_from_string, register_data): Call
17686 get_regcache.
17687 * regcache.h: Add prototypes.
17688 * server.h: Likewise.
17689
176902002-04-20 Daniel Jacobowitz <drow@mvista.com>
17691
17692 * mem-break.c: New file.
17693 * mem-break.h: New file.
17694 * Makefile.in: Add mem-break.o rule; update server.h
17695 dependencies.
17696 * inferiors.c (struct inferior_info): Add target_data
17697 member.
17698 (clear_inferiors): Free target_data member if set.
17699 (inferior_target_data, set_inferior_target_data): New functions.
17700 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17701 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17702 * linux-low.c (linux_bp_reinsert): New variable.
17703 (struct inferior_linux_data): New.
17704 (linux_create_inferior): Use set_inferior_target_data.
17705 (linux_attach): Likewise. Call add_inferior.
17706 (linux_wait_for_one_inferior): New function.
17707 (linux_wait): Call it.
17708 (linux_write_memory): Add const.
17709 (initialize_low): Call set_breakpoint_data.
17710 * linux-low.h (struct linux_target_ops): Add breakpoint
17711 handling members.
17712 * server.c (attach_inferior): Remove extra add_inferior
17713 call.
17714 * server.h: Include mem-break.h. Update inferior.c
17715 prototypes.
17716 * target.c (read_inferior_memory)
17717 (write_inferior_memory): New functions.
17718 * target.h (read_inferior_memory)
17719 (write_inferior_memory): Change macros to prototypes.
17720 (struct target_ops): Update comments. Add const to write_memory
17721 definition.
17722
177232002-04-11 Daniel Jacobowitz <drow@mvista.com>
17724
17725 * linux-low.c (usr_store_inferior_registers): Support
17726 registers which are allowed to fail to store.
17727 * linux-low.h (linux_target_ops): Likewise.
17728 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17729 (ppc_cannot_store_register): FPSCR may not be storable.
17730
177312002-04-09 Daniel Jacobowitz <drow@mvista.com>
17732
17733 * server.h: Include <string.h> if HAVE_STRING_H.
17734 * ChangeLog: Correct paths in last ChangeLog entry.
17735
177362002-04-09 Daniel Jacobowitz <drow@mvista.com>
17737
17738 * linux-low.h: Remove obsolete prototypes.
17739 (struct linux_target_ops): New.
17740 (extern the_low_target): New.
17741 * linux-low.c (num_regs, regmap): Remove declarations.
17742 (register_addr): Use the_low_target explicitly.
17743 (fetch_register): Likewise.
17744 (usr_fetch_inferior_registers): Likewise.
17745 (usr_store_inferior_registers): Likewise.
17746 * linux-arm-low.c (num_regs): Remove.
17747 (arm_num_regs): Define.
17748 (arm_regmap): Renamed from regmap, made static.
17749 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17750 made static.
17751 (arm_cannot_store_register): Renamed from cannot_store_register,
17752 made static.
17753 (the_low_target): New.
17754 * linux-i386-low.c (num_regs): Remove.
17755 (i386_num_regs): Define.
17756 (i386_regmap): Renamed from regmap, made static.
17757 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17758 made static.
17759 (i386_cannot_store_register): Renamed from cannot_store_register,
17760 made static.
17761 (the_low_target): New.
17762 * linux-ia64-low.c (num_regs): Remove.
17763 (ia64_num_regs): Define.
17764 (ia64_regmap): Renamed from regmap, made static.
17765 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17766 made static.
17767 (ia64_cannot_store_register): Renamed from cannot_store_register,
17768 made static.
17769 (the_low_target): New.
17770 * linux-m68k-low.c (num_regs): Remove.
17771 (m68k_num_regs): Define.
17772 (m68k_regmap): Renamed from regmap, made static.
17773 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17774 made static.
17775 (m68k_cannot_store_register): Renamed from cannot_store_register,
17776 made static.
17777 (the_low_target): New.
17778 * linux-mips-low.c (num_regs): Remove.
17779 (mips_num_regs): Define.
17780 (mips_regmap): Renamed from regmap, made static.
17781 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17782 made static.
17783 (mips_cannot_store_register): Renamed from cannot_store_register,
17784 made static.
17785 (the_low_target): New.
17786 * linux-ppc-low.c (num_regs): Remove.
17787 (ppc_num_regs): Define.
17788 (ppc_regmap): Renamed from regmap, made static.
17789 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17790 made static.
17791 (ppc_cannot_store_register): Renamed from cannot_store_register,
17792 made static.
17793 (the_low_target): New.
17794 * linux-s390-low.c (num_regs): Remove.
17795 (s390_num_regs): Define.
17796 (s390_regmap): Renamed from regmap, made static.
17797 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17798 made static.
17799 (s390_cannot_store_register): Renamed from cannot_store_register,
17800 made static.
17801 (the_low_target): New.
17802 * linux-sh-low.c (num_regs): Remove.
17803 (sh_num_regs): Define.
17804 (sh_regmap): Renamed from regmap, made static.
17805 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17806 made static.
17807 (sh_cannot_store_register): Renamed from cannot_store_register,
17808 made static.
17809 (the_low_target): New.
17810 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17811 (the_low_target): New.
17812
178132002-04-09 Daniel Jacobowitz <drow@mvista.com>
17814
17815 * Makefile.in: Add stamp-h target.
17816 * configure.in: Create stamp-h.
17817 * configure: Regenerated.
17818
178192002-04-09 Daniel Jacobowitz <drow@mvista.com>
17820
17821 * inferiors.c: New file.
17822 * target.c: New file.
17823 * target.h: New file.
17824 * Makefile.in: Add target.o and inferiors.o. Update
17825 dependencies.
17826 * linux-low.c (inferior_pid): New static variable,
17827 moved from server.c.
17828 (linux_create_inferior): Renamed from create_inferior.
17829 Call add_inferior. Return 0 on success instead of a PID.
17830 (linux_attach): Renamed from myattach.
17831 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17832 (linux_thread_alive): Renamed from mythread_alive.
17833 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17834 child dies.
17835 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17836 (regsets_store_inferior_registers): Correct error message.
17837 Add missing ``return 0''.
17838 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17839 (linux_store_registers): Renamed from store_inferior_registers.
17840 (linux_read_memory): Renamed from read_inferior_memory.
17841 (linux_write_memory): Renamed from write_inferior_memory.
17842 (linux_target_ops): New structure.
17843 (initialize_low): Call set_target_ops ().
17844 * remote-utils.c (unhexify): New function.
17845 (hexify): New function.
17846 (input_interrupt): Send signals to ``signal_pid''.
17847 * server.c (inferior_pid): Remove.
17848 (start_inferior): Update create_inferior call.
17849 (attach_inferior): Call add_inferior.
17850 (handle_query): New function.
17851 (main): Call handle_query for `q' packets.
17852 * server.h: Include "target.h". Remove obsolete prototypes.
17853 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17854
178552002-04-09 Daniel Jacobowitz <drow@mvista.com>
17856
17857 * Makefile.in: Add WARN_CFLAGS. Update configury
17858 dependencies.
17859 * configure.in: Check for <string.h>
17860 * configure: Regenerate.
17861 * config.in: Regenerate.
17862 * gdbreplay.c: Include needed system headers.
17863 (remote_open): Remove strchr prototype.
17864 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17865 * regcache.c (supply_register): Change buf argument to const void *.
17866 (supply_register_by_name): Likewise.
17867 (collect_register): Change buf argument to void *.
17868 (collect_register_by_name): Likewise.
17869 * regcache.h: Add missing prototypes.
17870 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17871 * server.c (handle_query): New function.
17872 (attached): New static variable, moved out of main.
17873 (main): Quiet longjmp clobber warnings.
17874 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17875 * utils.c (error): Remove NORETURN.
17876 (fatal): Likewise.