gdbserver: make aarch64_write_goto_address static
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
bb1183e2
SM
12020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4
f5df0b5f
SM
52020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
6
7 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
8 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
9
5b6d1e4f
PA
102020-01-10 Pedro Alves <palves@redhat.com>
11
12 * fork-child.c (post_fork_inferior): Pass target down to
13 startup_inferior.
14 * inferiors.c (switch_to_thread): Add process_stratum_target
15 parameter.
16 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
17 * nto-low.c (nto_target_ops): Now a process_stratum_target.
18 * linux-low.c (linux_target_ops): Now a process_stratum_target.
19 * remote-utils.c (prepare_resume_reply): Pass the target to
20 switch_to_thread.
21 * target.c (the_target): Now a process_stratum_target.
22 (done_accessing_memory): Pass the target to switch_to_thread.
23 (set_target_ops): Ajust to use process_stratum_target.
24 * target.h (struct target_ops): Rename to ...
25 (struct process_stratum_target): ... this.
26 (the_target, set_target_ops): Adjust.
27 (prepare_to_access_memory): Adjust comment.
28 * win32-low.c (child_xfer_memory): Adjust to use
29 process_stratum_target.
30 (win32_target_ops): Now a process_stratum_target.
31
559e7e50
EZ
322020-01-06 Eli Zaretskii <eliz@gnu.org>
33 Pedro Alves <palves@redhat.com>
34
35 * win32-low.c (get_child_debug_event): Extract the fatal exception
36 from the exit status and convert to the equivalent Posix signal
37 number.
38 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
39 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
40
48189bec
HD
412020-01-01 Hannes Domani <ssbssa@yahoo.de>
42
43 * Makefile.in: Use INSTALL_PROGRAM_ENV.
44
5dd8bf88
JB
452020-01-01 Joel Brobecker <brobecker@adacore.com>
46
47 * server.c (gdbserver_version): Change copyright year to 2020.
48 * gdbreplay.c (gdbreplay_version): Likewise.
49
0ad6b8ee
CB
502019-12-19 Christian Biesinger <cbiesinger@google.com>
51
52 * configure: Regenerate.
53 * configure.ac: Quote variable arguments of test.
54
1ee7b812
BE
552019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
56
57 * Makefile.in: Fix build with GNU Make 3.81
58
d9fa87f4
TT
592019-12-16 Tom Tromey <tromey@adacore.com>
60
61 * server.c (get_exec_file): Constify result.
62
ab7d13f0
CB
632019-12-10 Christian Biesinger <cbiesinger@google.com>
64
65 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
66 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
67 * config.in: Regenerate.
68 * configure: Regenerate.
69 * configure.ac: Don't check for strerror.
70 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
71 Call safe_strerror instead of strerror.
72 * server.h (strerror): Remove this now-unnecessary declaration.
73 * tracepoint.c (init_named_socket): Call safe_strerror instead of
74 strerror.
75 (gdb_agent_helper_thread): Likewise.
76 * utils.c (perror_with_name): Likewise.
77
4da8c3a8
TT
782019-11-26 Tom Tromey <tom@tromey.com>
79
80 * configure, config.in: Rebuild.
81
21987b9c
TT
822019-11-26 Tom Tromey <tom@tromey.com>
83
84 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
85 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
86 gdb_sigmask.
87 * configure, config.in: Rebuild.
88
5e030278
TT
892019-11-26 Tom Tromey <tom@tromey.com>
90
91 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
92 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
93 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
94 * acinclude.m4: Include ax_pthread.m4.
95 * config.in, configure: Rebuild.
96
6d91ce9a
CB
972019-11-26 Christian Biesinger <cbiesinger@google.com>
98
99 * debug.c (debug_set_output): Call safe_strerror instead of
100 strerror.
101 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
102 (linux_kill_one_lwp): Likewise.
103 (linux_detach_one_lwp): Likewise.
104 (linux_wait_for_event_filtered): Likewise.
105 (store_register): Likewise.
106 * lynx-low.c (lynx_attach): Likewise.
107 * mem-break.c (insert_memory_breakpoint): Likewise.
108 (remove_memory_breakpoint): Likewise.
109 (delete_fast_tracepoint_jump): Likewise.
110 (set_fast_tracepoint_jump): Likewise.
111 (uninsert_fast_tracepoint_jumps_at): Likewise.
112 (reinsert_fast_tracepoint_jumps_at): Likewise.
113 * nto-low.c (nto_xfer_memory): Likewise.
114 (nto_resume): Likewise.
115
6cdd651f
LM
1162019-11-20 Luis Machado <luis.machado@linaro.org>
117
118 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
119 instead of register count.
120 * tdesc.c (tdesc_contains_feature): New function.
121 * tdesc.h (tdesc_contains_feature): New prototype.
122
cd850b40
CB
1232019-11-15 Christian Biesinger <cbiesinger@google.com>
124
125 * Makefile.in: Add safe-strerror.c.
126 * configure: Regenerate.
127 * configure.ac: Don't source common.host.
128
5abebf3c
CB
1292019-11-15 Christian Biesinger <cbiesinger@google.com>
130
131 * config.in: Regenerate.
132 * configure: Regenerate.
133
e06f3d6e
AB
1342019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
135
136 * ax.c (ax_printf): Handle size_t_arg.
137
ca3a04f6
CB
1382019-11-06 Christian Biesinger <cbiesinger@google.com>
139
140 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
141 * mi/mi-main.c (output_cores): Likewise.
142 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
143 (linux_xfer_osdata_modules): Likewise.
144 * remote.c (register_remote_support_xml): Likewise.
145 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
146 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
147
e48f6033
CB
1482019-11-01 Christian Biesinger <cbiesinger@google.com>
149
150 * configure: Regenerate.
151 * configure.ac: Remove check for strerror_r.
152
e7e97a2e
CB
1532019-10-31 Christian Biesinger <cbiesinger@google.com>
154
155 * config.in: Regenerate.
156 * configure: Regenerate.
157 * configure.ac: Also check for strerror_r.
158
75cafaa6
CB
1592019-10-31 Christian Biesinger <cbiesinger@google.com>
160
161 * ax.h (debug_agent): Remove duplicate declaration.
162
30baf67b
TV
1632019-10-26 Tom de Vries <tdevries@suse.de>
164
165 * linux-aarch64-low.c: Fix typos in comments.
166 * linux-arm-low.c: Same.
167 * linux-low.c: Same.
168 * linux-ppc-low.c: Same.
169 * proc-service.c: Same.
170 * regcache.h: Same.
171 * server.c: Same.
172 * tracepoint.c: Same.
173 * win32-low.c: Same.
174
52c64cf7
TT
1752019-10-25 Tom Tromey <tromey@adacore.com>
176
177 * utils.c (xstrdup): Remove.
178
c12d372d
TT
1792019-10-23 Tom Tromey <tom@tromey.com>
180
181 * configure, config.in: Rebuild.
182
4d0b984b
TT
1832019-10-23 Tom Tromey <tom@tromey.com>
184
185 * configure: Rebuild.
186 * acinclude.m4: Use m4_include, not sinclude.
187
c5adaa19
TT
1882019-10-17 Tom Tromey <tromey@adacore.com>
189
190 * configure: Rebuild.
191 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
192 in AC_CONFIG_FILES invocation.
193 * Makefile.in (stamp-h, Makefile): Use new-style config.status
194 invocation.
195
fec4e896
CB
1962019-10-16 Christian Biesinger <cbiesinger@google.com>
197
198 * server.c: Include xml-builtin.h.
199 (get_xml_features): Don't declare xml_builtins here.
200
00975ff6
AB
2012019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
202
203 * Makefile.in: Remove references to vec-ipa.o.
204
0dc32745
AB
2052019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
206
207 * Makefile.in: Remove references to vec.c.
208
3e6ec53a
CB
2092019-10-02 Christian Biesinger <cbiesinger@google.com>
210
211 * server.c (server_waiting): Change to bool.
212 (extended_protocol): Likewise.
213 (response_needed): Likewise.
214 (exit_requested): Likewise.
215 (run_once): Likewise.
216 (report_no_resumed): Likewise.
217 (non_stop): Likewise.
218 (disable_packet_vCont): Likewise.
219 (disable_packet_Tthread): Likewise.
220 (disable_packet_qC): Likewise.
221 (disable_packet_qfThreadInfo): Likewise.
222 (handle_general_set): Update.
223 (handle_detach): Update.
224 (handle_monitor_command): Update.
225 (handle_query): Update.
226 (captured_main): Update.
227 (process_serial_event): Update.
228 * server.h (server_waiting): Change to bool.
229 (disable_packet_vCont): Likewise.
230 (disable_packet_Tthread): Likewise.
231 (disable_packet_qC): Likewise.
232 (disable_packet_qfThreadInfo): Likewise.
233 (run_once): Likewise.
234 (non_stop): Likewise.
235 * target.c (target_stop_and_wait): Update.
236
80fd2826
TT
2372019-10-02 Tom Tromey <tromey@adacore.com>
238
239 * Makefile.in (SFILES): Add common-inferior.c.
240 (OBS): Add common-inferior.o.
241 * server.c (startup_with_shell): Don't define.
242
46f29a9a
AB
2432019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
244
245 * linux-low.c (linux_low_read_btrace): Update for change to
246 std::vector.
247
f9d949fb
CB
2482019-09-20 Christian Biesinger <cbiesinger@google.com>
249
250 * debug.c (debug_threads): Remove comment in favor of the header.
251 * debug.h (using_threads): Add declaration.
252 (debug_threads): Add comment.
253 * linux-aarch64-low.c: Include debug.h and remove declaration of
254 debug_threads.
255 * nto-low.c: Likewise.
256 * remote-utils.c: Likewise.
257 * thread-db.c: Likewise.
258
abf516c6
UW
2592019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
260
261 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
262 and powerpc-cell64l-ipa.o.
263 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
264 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
265 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
266 (spu*-*-*): Remove.
267
268 * spu-low.c: Remove file.
269
270 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
271 (parse_spufs_run): Remove.
272 (ppc_get_pc): Remove Cell/B.E. support.
273 (ppc_set_pc): Likewise.
274 (ppc_breakpoint_at): Likewise.
275 (ppc_arch_setup): Likewise.
276 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
277 tdesc_powerpc_cell32l.
278 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
279 or init_registers_powerpc_cell32l.
280 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
281 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
282 or init_registers_powerpc_cell32l.
283 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
284 (init_registers_powerpc_cell32l): Remove prototype.
285 (init_registers_powerpc_cell64l): Likewise.
286
287 * target.h (struct target_ops): Remove qxfer_spu member.
288 * server.c (handle_qxfer_spu): Remove.
289 (qxfer_packets): Remove entry for "spu".
290 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
291 * linux-low.c (SPUFS_MAGIC): Remove.
292 (spu_enumerate_spu_ids): Remove.
293 (linux_qxfer_spu): Remove.
294 (linux_target_ops): Remove qxfer_spu member.
295 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
296 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
297 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
298
2d41fa11
SDJ
2992019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
300
301 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
302 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
303 * config.in: Regenerate.
304 * configure: Regenerate.
305
d59b55f0
TT
3062019-08-15 Tom Tromey <tromey@adacore.com>
307
308 * target.c (target_write_memory): Use gdb::byte_vector.
309
4196ab2a
TT
3102019-08-15 Tom Tromey <tromey@adacore.com>
311
312 * tracepoint.c (write_inferior_data_pointer)
313 (write_inferior_integer, write_inferior_int8)
314 (write_inferior_uinteger, m_tracepoint_action_download)
315 (r_tracepoint_action_download, x_tracepoint_action_download)
316 (l_tracepoint_action_download, clear_inferior_trace_buffer)
317 (download_agent_expr, download_tracepoint_1)
318 (download_trace_state_variables, upload_fast_traceframes): Update.
319 * server.c (gdb_write_memory): Update.
320 * remote-utils.c (relocate_instruction): Update.
321 * proc-service.c (ps_pdwrite): Update.
322 * mem-break.c (remove_memory_breakpoint)
323 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
324 (uninsert_fast_tracepoint_jumps_at)
325 (reinsert_fast_tracepoint_jumps_at): Update.
326 * linux-x86-low.c (append_insns)
327 (i386_install_fast_tracepoint_jump_pad)
328 (amd64_write_goto_address, i386_write_goto_address): Update.
329 * linux-s390-low.c (append_insns, s390_write_goto_address):
330 Update.
331 * linux-ppc-low.c (ppc_relocate_instruction)
332 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
333 (ppc_write_goto_address): Update.
334 * linux-aarch64-low.c (append_insns): Update.
335 * target.h (struct target_ops): Update.
336 (write_inferior_memory): Don't declare.
337 * target.c (target_write_memory): Rename from
338 write_inferior_memory. Remove old target_write_memory.
339
c6778d00
TT
3402019-08-15 Tom Tromey <tromey@adacore.com>
341
342 * target.c (write_inferior_memory): Use std::vector.
343
404f2902
FCE
3442019-08-06 Frank Ch. Eigler <fche@redhat.com>
345
346 PR build/24886
347 * configure.ac: Drop enable-libmcheck support.
348 * configure, config.in: Rebuild.
349 * acinclude.m4: Don't include it.
350
4c5aa8e0
AH
3512019-07-19 Alan Hayward <alan.hayward@arm.com>
352
353 * configure.srv: Remove Arm xml files.
354
7cc17433
AH
3552019-07-19 Alan Hayward <alan.hayward@arm.com>
356
357 * configure.srv: Add new files. Remove xml generated files.
358 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
359 registers.
360 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
361 * linux-aarch32-tdesc.c: New file.
362 * linux-aarch32-tdesc.h: New file.
363 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
364 * linux-arm-low.c (init_registers_arm, tdesc_arm)
365 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
366 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
367 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
368 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
369 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
370 (arm_read_description): Call arm_linux_read_description.
371 (initialize_low_arch): Don't init registers.
372 * linux-arm-tdesc.c: New file.
373 * linux-arm-tdesc.h: New file.
374
166a82be
AH
3752019-07-10 Alan Hayward <alan.hayward@arm.com>
376
377 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
378 Move counter inside for.
379 (arm_read_description): Check ptrace earlier.
380 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
381
268a13a5
TT
3822019-07-09 Tom Tromey <tom@tromey.com>
383
384 * configure: Rebuild.
385 * configure.ac: Change common to gdbsupport.
386 * acinclude.m4: Change common to gdbsupport.
387 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
388 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
389 common to gdbsupport.
390 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
391 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
392 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
393 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
394 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
395 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
396 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
397 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
398 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
399 common to gdbsupport.
400
350fab54
AH
4012019-07-04 Alan Hayward <alan.hayward@arm.com>
402
403 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
404 defines.
405 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
406
2b40fda7
AH
4072019-07-04 Alan Hayward <alan.hayward@arm.com>
408
409 * configure.srv: Remove legacy xml.
410 * linux-aarch64-low.c (initialize_low_arch): Remove
411 initialize_low_tdesc call.
412 * linux-aarch64-tdesc-selftest.c: Remove file.
413 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
414 * linux-x86-low.c (initialize_low_arch): Remove
415 initialize_low_tdesc call.
416 * linux-x86-tdesc-selftest.c: Remove file.
417 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
418
7d10623d
TV
4192019-06-20 Tom de Vries <tdevries@suse.de>
420
421 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
422 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
423
8d6a48df
TV
4242019-06-19 Tom de Vries <tdevries@suse.de>
425
426 * debug.h (debug_write): Change return type to ssize_t.
427 * debug.c (debug_write): Same.
428
73cc7272
TT
4292019-06-14 Tom Tromey <tom@tromey.com>
430
431 * configure.ac: Use new path to gnulib.
432 * configure: Rebuild.
433 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
434 to gnulib.
435
08f10e02
TT
4362019-06-11 Tom Tromey <tom@tromey.com>
437
438 * Makefile.in (SFILES): Add alloc.c.
439 (OBS): Add alloc.o.
440 (IPA_OBJS): Add alloc-ipa.o.
441 (alloc-ipa.o): New target.
442 (%.o: ../%.c): New pattern rule.
443
422186a9
TT
4442019-06-10 Tom Tromey <tromey@adacore.com>
445
446 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
447 end warning with a newline.
448 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
449 newline.
450 * thread-db.c (attach_thread): Don't end warning with a newline.
451 (thread_db_notice_clone): Likewise.
452 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
453 newline.
454 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
455 end warning with a newline.
456
b02f78f9
PA
4572019-06-04 Pedro Alves <palves@redhat.com>
458
459 * server.c (captured_main): Use make_unique_xstrdup.
460
88ed7edb
TT
4612019-06-02 Tom Tromey <tom@tromey.com>
462
463 * gdbreplay.c (fromhex): Remove.
464 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
465
33a6bc35
TT
4662019-05-29 Tom Tromey <tromey@adacore.com>
467
468 * configure: Rebuild.
469
e90a813d
KB
4702019-05-06 Kevin Buettner <kevinb@redhat.com>
471
472 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
473 sign extension code on 32-bit builds.
474
353ea2d1
EZ
4752019-05-03 Eli Zaretskii <eliz@gnu.org>
476
477 * remote-utils.c:
478 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
479
b494cdff
TT
4802019-04-19 Tom Tromey <tom@tromey.com>
481
482 * server.c (struct vstop_notif): Derive from notif_event.
483 <base>: Remove.
484 (queue_stop_reply): Update.
485 (remove_all_on_match_ptid): Change type. Rewrite.
486 (discard_queued_stop_replies): Rewrite.
487 (in_queued_stop_replies_ptid): Change type.
488 (in_queued_stop_replies): Rewrite.
489 (notif_stop): Update.
490 (queue_stop_reply_callback): Update.
491 (captured_main): Don't call initialize_notif.
492 (push_stop_notification): Update.
493 * notif.c (notif_write_event, handle_notif_ack)
494 (notif_event_enque, notif_push): Update.
495 (notif_event_xfree, initialize_notif): Remove.
496 * notif.h (struct notif_event): Include <list>, not
497 "common/queue.h".
498 (struct notif_server) <queue>: Now a std::list.
499 (notif_event_p): Remove typedef.
500 (initialize_notif): Don't declare.
501 (struct notif_event): Add virtual destructor.
502
a7e559cc
AH
5032019-04-17 Alan Hayward <alan.hayward@arm.com>
504
505 * ax.c (ax_vdebug): Call debug_printf.
506 * debug.c (debug_write): New function.
507 * debug.h (debug_write): New declaration.
508 * linux-low.c (sigchld_handler): Call debug_write.
509
aeb2e706
AH
5102019-04-17 Alan Hayward <alan.hayward@arm.com>
511
512 * debug.c (debug_set_output): New function.
513 (debug_vprintf): Send output to debug_file.
514 (debug_flush): Likewise.
515 * debug.h (debug_set_output): New declaration.
516 * server.c (handle_monitor_command): Add debug-file option.
517 (captured_main): Likewise.
518
c1bc0935
AH
5192019-04-17 Alan Hayward <alan.hayward@arm.com>
520
521 * debug.c (remote_debug): Add definition.
522 * debug.h (remote_debug): Add declaration.
523 * hostio.c (remote_debug): Remove declaration.
524 * remote-utils.c (struct ui_file): Likewise.
525 (remote_debug): Likewise.
526 * remote-utils.h (remote_debug): Likewise,
527 * server.c (remote_debug): Remove definition.
528
3f52fdbc
KB
5292019-04-10 Kevin Buettner <kevinb@redhat.com>
530
531 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
532 when using a 64-bit gdbserver.
533
b0319eaa
TT
5342019-04-09 Tom Tromey <tromey@adacore.com>
535
536 * linux-low.c (select_event_lwp): Use find_thread_in_random.
537
eedc3f4f
TT
5382019-04-08 Tom Tromey <tom@tromey.com>
539
540 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
541 throw.
542 (linux_resume_one_lwp): Likewise.
543
230d2906
TT
5442019-04-08 Tom Tromey <tom@tromey.com>
545
546 * gdbreplay.c: Update.
547 * linux-low.c: Update.
548 * server.c: Update.
549
a70b8144
TT
5502019-04-08 Tom Tromey <tom@tromey.com>
551
552 * server.c: Use C++ exception handling.
553 * linux-low.c: Use C++ exception handling.
554 * gdbreplay.c: Use C++ exception handling.
555
3d6e9d23
TT
5562019-04-08 Tom Tromey <tom@tromey.com>
557
558 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
559 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
560 (captured_main, main): Update.
561 * gdbreplay.c (main): Update.
562
0570503d
PFC
5632019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
564
565 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
566 value in argument pointer, return 1 if the entry is found and 0
567 otherwise. Move comment.
568 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
569 * linux-low.h (linux_get_auxv): Declare.
570 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
571
227a9e65
TT
5722019-04-05 Tom Tromey <tromey@adacore.com>
573
574 * server.c (gdbserver_usage): Use upper-case for metasyntactic
575 variables.
576
69f4c9cc
AH
5772019-03-28 Alan Hayward <alan.hayward@arm.com>
578
579 * linux-low.c (AT_HWCAP2): Add define if not already included.
580
974c89e0
AH
5812019-03-26 Alan Hayward <alan.hayward@arm.com>
582
583 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
584 (aarch64_arch_setup): Call linux_get_hwcap.
585 * linux-arm-low.c (arm_get_hwcap): Remove function.
586 (arm_read_description): Call linux_get_hwcap.
587 * linux-low.c (linux_get_auxv): New function.
588 (linux_get_hwcap): Likewise.
589 (linux_get_hwcap2): Likewise.
590 * linux-low.h (linux_get_hwcap): New declaration.
591 (linux_get_hwcap2): Likewise.
592 * linux-ppc-low.c (ppc_get_auxv): Remove function.
593 (ppc_arch_setup): Call linux_get_hwcap.
594 * linux-s390-low.c (s390_get_hwcap): Remove function.
595 (s390_arch_setup): Call linux_get_hwcap.
596
1ef53e6b
AH
5972019-03-22 Alan Hayward <alan.hayward@arm.com>
598 Jiong Wang <jiong.wang@arm.com>
599
600 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
601 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
602 to fail.
603 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
604
ee4fbcfa
AH
6052019-03-22 Alan Hayward <alan.hayward@arm.com>
606 Jiong Wang <jiong.wang@arm.com>
607
608 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
609 (aarch64_get_hwcap): New function.
610 (aarch64_arch_setup): Read APIA hwcap.
611
6dc0ebde
AH
6122019-03-22 Alan Hayward <alan.hayward@arm.com>
613 Jiong Wang <jiong.wang@arm.com>
614
615 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
616 (initialize_low_tracepoint): Likewise.
617 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
618 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
619 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
620 (aarch64_linux_read_description): Likewise.
621 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
622
1163a4b7
JB
6232019-03-12 John Baldwin <jhb@FreeBSD.org>
624
625 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
626 i386_create_target_description for 'segments' parameter.
627 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
628 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
629 * win32-i386-low.c (i386_arch_setup): Likewise.
630
d3a70e03
TT
6312019-03-12 Tom Tromey <tromey@adacore.com>
632
633 * linux-low.c (iterate_over_lwps): Update.
634
37991b4f
TT
6352019-03-06 Tom Tromey <tom@tromey.com>
636
637 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
638 (captured_main): Use SCOPE_EXIT.
639
45950eb6
SDJ
6402019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
641
642 * configure.srv: Use '$enable_unittest' instead of '$development'
643 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
644 case.
645
43ac54fc
TT
6462019-02-27 Tom Tromey <tromey@adacore.com>
647
648 * gdbreplay.c (logchar): Handle \r\n.
649
df0da8a2
AH
6502019-02-07 Alan Hayward <alan.hayward@arm.com>
651
652 * linux-low.c (linux_attach): Add process before lwp.
653 * server.c (attach_inferior): Check if already attached.
654
1a5c2598
TT
6552019-02-07 Tom Tromey <tom@tromey.com>
656
657 * x86-tdesc.h: Rename include guard.
658 * x86-low.h: Add include guard.
659 * wincecompat.h: Rename include guard.
660 * win32-low.h: Add include guard.
661 * utils.h: Rename include guard.
662 * tracepoint.h: Rename include guard.
663 * tdesc.h: Rename include guard.
664 * target.h: Rename include guard.
665 * server.h: Rename include guard.
666 * remote-utils.h: Rename include guard.
667 * regcache.h: Rename include guard.
668 * nto-low.h: Rename include guard.
669 * notif.h: Add include guard.
670 * mem-break.h: Rename include guard.
671 * lynx-low.h: Add include guard.
672 * linux-x86-tdesc.h: Add include guard.
673 * linux-s390-tdesc.h: Add include guard.
674 * linux-ppc-tdesc-init.h: Add include guard.
675 * linux-low.h: Add include guard.
676 * linux-aarch64-tdesc.h: Add include guard.
677 * linux-aarch32-low.h: Add include guard.
678 * inferiors.h: Rename include guard.
679 * i387-fp.h: Rename include guard.
680 * hostio.h: Rename include guard.
681 * gdbthread.h: Rename include guard.
682 * gdb_proc_service.h: Rename include guard.
683 * event-loop.h: Rename include guard.
684 * dll.h: Rename include guard.
685 * debug.h: Rename include guard.
686 * ax.h: Rename include guard.
687
956cc47c
SN
6882018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
689
690 PR gdb/23985
691 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
692 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
693
a0707f3c
TT
6942019-01-25 Tom Tromey <tom@tromey.com>
695
696 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
697
0747795c
TT
6982019-01-25 Tom Tromey <tom@tromey.com>
699
700 * win32-low.c: Fix common/ includes.
701 * win32-i386-low.c: Fix common/ includes.
702 * tracepoint.c: Fix common/ includes.
703 * thread-db.c: Fix common/ includes.
704 * target.h: Fix common/ includes.
705 * symbol.c: Fix common/ includes.
706 * spu-low.c: Fix common/ includes.
707 * server.h: Fix common/ includes.
708 * server.c: Fix common/ includes.
709 * remote-utils.c: Fix common/ includes.
710 * regcache.h: Fix common/ includes.
711 * regcache.c: Fix common/ includes.
712 * nto-x86-low.c: Fix common/ includes.
713 * notif.h: Fix common/ includes.
714 * mem-break.h: Fix common/ includes.
715 * lynx-low.c: Fix common/ includes.
716 * lynx-i386-low.c: Fix common/ includes.
717 * linux-x86-tdesc-selftest.c: Fix common/ includes.
718 * linux-x86-low.c: Fix common/ includes.
719 * linux-low.c: Fix common/ includes.
720 * inferiors.h: Fix common/ includes.
721 * i387-fp.c: Fix common/ includes.
722 * hostio.c: Fix common/ includes.
723 * hostio-errno.c: Fix common/ includes.
724 * gdbthread.h: Fix common/ includes.
725 * gdbreplay.c: Fix common/ includes.
726 * fork-child.c: Fix common/ includes.
727 * event-loop.c: Fix common/ includes.
728 * ax.c:
729 (enum gdb_agent_op): Fix common/ includes.
730
be6d4f74
TT
7312019-01-21 Tom Tromey <tom@tromey.com>
732
733 * tracepoint.c: Fix includes.
734 * remote-utils.c: Fix includes.
735 * linux-x86-low.c: Fix includes.
736
66d91b39
JB
7372019-01-01 Joel Brobecker <brobecker@adacore.com>
738
739 * gdbreplay.c (gdbreplay_version): Update copyright year in
740 version message.
741 * server.c (gdbserver_version): Likewise.
742
754e3168
AH
7432018-12-05 Alan Hayward <alan.hayward@arm.com>
744
745 * linux-low.c (add_lwp): Switch ordering.
746
d105de22
TT
7472018-11-29 Tom Tromey <tom@tromey.com>
748
749 * win32-low.c (win32_join): Take pid, not process.
750 * target.h (struct target_ops) <join>: Change argument type.
751 (join_inferior): Change argument name.
752 * spu-low.c (spu_join): Take pid, not process.
753 * server.c (handle_detach): Preserve pid before destroying
754 process.
755 * lynx-low.c (lynx_join): Take pid, not process.
756 * linux-low.c (linux_join): Take pid, not process.
757
50138245
AH
7582018-11-23 Alan Hayward <alan.hayward@arm.com>
759
760 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
761 (aarch64_cannot_fetch_register): Likewise.
762 (struct linux_target_ops): Update references.
763
64f57f3d
PFC
7642018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
765
766 * linux-ppc-low.c: Include nat/linux-ptrace.h.
767
8d619c01
EBM
7682018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
769
770 * configure.srv (ipa_ppc_linux_regobj): Add
771 powerpc-isa207-htm-vsx32l-ipa.o and
772 powerpc-isa207-htm-vsx64l-ipa.o.
773 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
774 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
775 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
776 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
777 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
778 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
779 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
780 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
781 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
782 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
783 (init_registers_powerpc_isa207_htm_vsx32l)
784 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
785 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
786 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
787 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
788 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
789 (ppc_store_tm_ctarregset): New functions.
790 (ppc_regsets): Add entries for HTM regsets.
791 (ppc_arch_setup): Set htm in features struct when needed. Set
792 sizes for the HTM regsets.
793 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
794 (initialize_low_arch): Call
795 init_registers_powerpc_isa207_htm_vsx32l and
796 init_registers_powerpc_isa207_htm_vsx64l.
797 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
798 PPC_TDESC_ISA207_HTM_VSX.
799 (initialize_low_tracepoint): Call
800 init_registers_powerpc_isa207_htm_vsx32l and
801 init_registers_powerpc_isa207_htm_vsx64l.
802
232bfb86
EBM
8032018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
804
805 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
806 rs6000/power-linux-pmu.xml to srv_xmlfiles.
807 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
808 (ppc_store_pmuregset): New functions.
809 (ppc_regsets): Add entries for ebb and pmu regsets.
810 (ppc_arch_setup): Set isa207 in features struct if the ebb and
811 pmu regsets are available. Set sizes for these regsets.
812
f2cf6173
EBM
8132018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
814
815 * configure.srv (ipa_ppc_linux_regobj): Add
816 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
817 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
818 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
819 rs6000/powerpc-isa207-vsx32l.xml, and
820 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
821 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
822 <PPC_TDESC_ISA207_VSX>: New enum value.
823 (init_registers_powerpc_isa207_vsx32l): Declare.
824 (init_registers_powerpc_isa207_vsx64l): Declare.
825 * linux-ppc-low.c (ppc_fill_tarregset): New function.
826 (ppc_store_tarregset): New function.
827 (ppc_regsets): Add entry for the TAR regset.
828 (ppc_arch_setup): Set isa207 in features struct when needed. Set
829 size for the TAR regsets.
830 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
831 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
832 and init_registers_powerpc_isa207_vsx64l.
833 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
834 (initialize_low_tracepoint): Call
835 init_registers_powerpc_isa207_vsx32l and
836 init_registers_powerpc_isa207_vsx64l.
837
7ca18ed6
EBM
8382018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
839 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
840
841 * configure.srv (ipa_ppc_linux_regobj): Add
842 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
843 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
844 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
845 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
846 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
847 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
848 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
849 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
850 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
851 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
852 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
853 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
854 (ppc_hwcap): Add comment.
855 (ppc_hwcap2): New global.
856 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
857 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
858 (ppc_regsets): Add entries for the DSCR and PPR regsets.
859 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
860 when needed. Set sizes for the the DSCR and PPR regsets.
861 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
862 (initialize_low_arch): Call
863 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
864 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
865 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
866 PPC_TDESC_ISA205_PPR_DSCR_VSX.
867 (initialize_low_tracepoint): Call
868 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
869 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
870
5c849b22
PFC
8712018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
872
873 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
874
8ecfd7bd
SDJ
8752018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
876 Simon Marchi <simark@simark.ca>
877
878 * acinclude.m4: Include "../selftest.m4".
879 * configure: Regenerate.
880 * configure.ac: Use "GDB_AC_SELFTEST".
881 * configure.srv: Use "$enable_unittests" instead of
882 "$development" when checking whether unit tests have been
883 enabled.
884 * server.c (captured_main): Update message informing that
885 selftests have been disabled.
886
96643e35
TT
8872018-10-04 Tom Tromey <tom@tromey.com>
888
889 * configure: Rebuild.
890
da4ae14a
TT
8912018-10-04 Tom Tromey <tom@tromey.com>
892
893 * server.c (handle_status): Rename inner "thread".
894 (process_serial_event): Declare "res" in 'm' case.
895 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
896 (iterate_over_lwps): Rename inner "thread".
897 (linux_qxfer_libraries_svr4): Rename inner "len".
898 * gdbthread.h (find_thread_in_random): Rename inner "thread".
899
7c619dbd
GB
9002018-10-01 Gary Benson <gbenson@redhat.com>
901
902 * gdb_proc_service.h: Moved common code to
903 common/gdb_proc_service.h.
904
3795e814
GB
9052018-10-01 Gary Benson <gbenson@redhat.com>
906
907 * gdb_proc_service.h: Synchronize comments and whitespace with
908 GDB's version of this file.
909
49b036f1
TT
9102018-09-25 Tom Tromey <tom@tromey.com>
911
912 * configure: Rebuild.
913 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
914
8ff03f0b
SM
9152018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
916
917 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
918 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
919 ($(IPA_LIB)): Sort IPA_OBJS.
920
a1cd91dc
SM
9212018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
922
923 * Makefile.in: Remove references to $(ADD_DEPS).
924
752312ba
TT
9252018-09-16 Tom Tromey <tom@tromey.com>
926
927 * remote-utils.c (remote_open): Use GNU style for metasyntactic
928 variables.
929 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
930 variables.
931
f1628857
TT
9322018-09-05 Tom Tromey <tom@tromey.com>
933
934 * configure: Rebuild.
935
ad202fcc
SM
9362018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
937
938 PR build/23399
939 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
940
d3d8724a
TT
9412018-08-27 Tom Tromey <tom@tromey.com>
942
943 PR build/23087:
944 * configure: Rebuild.
945
b4f183d2
TT
9462018-08-27 Tom Tromey <tom@tromey.com>
947
948 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
949 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
950 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
951 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
952 (s390x_emit_stack_adjust): Add casts to unsigned char.
953
4e2aa472
SM
9542018-08-22 Simon Marchi <simon.marchi@ericsson.com>
955
956 PR gdb/23374
957 PR gdb/23375
958 * server.h (struct client_state) <disable_randomization>:
959 Initialize to 1.
960
cf4088a9
SM
9612018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
962
963 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
964 variable.
965 (mips_supply_ptrace_register): Likewise.
966
a0de763e
TT
9672018-07-22 Tom Tromey <tom@tromey.com>
968
969 * configure: Rebuild.
970
b0a7723d
TT
9712018-07-22 Tom Tromey <tom@tromey.com>
972
973 * win32-low.c (win32_create_inferior): Remove unused variables.
974 * gdbreplay.c (remote_open): Remove unused variable.
975 * remote-utils.c (remote_prepare): Remove unused variable.
976 * x86-tdesc.h (X86_TDESC_H): Define.
977 (amd64_expedite_regs): Define conditionally.
978 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
979 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
980 * remote-utils.c (readchar): Remove unused variable.
981
a780ef4f
PA
9822018-07-13 Pedro Alves <palves@redhat.com>
983
984 * linux-low.c (linux_kill): Change parameter to process_info
985 pointer instead of pid. Adjust.
986 * lynx-low.c (lynx_kill): Likewise.
987 * nto-low.c (nto_kill): Likewise.
988 * spu-low.c (spu_kill): Likewise.
989 * win32-low.c (win32_kill): Likewise.
990 * server.c (handle_v_kill, kill_inferior_callback)
991 (detach_or_kill_for_exit): Adjust.
992 * target.c (kill_inferior): Change parameter to process_info
993 pointer instead of pid. Adjust.
994 * target.h (struct target_ops) <kill>: Change parameter to
995 process_info pointer instead of pid. Adjust all implementations
996 and callers.
997 (kill_inferior): Likewise.
998
ef2ddb33
PA
9992018-07-13 Pedro Alves <palves@redhat.com>
1000
1001 * linux-low.c (linux_detach, linux_join): Change parameter to
1002 process_info pointer instead of pid. Adjust.
1003 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1004 * nto-low.c (nto_detach): Likewise.
1005 * spu-low.c (spu_detach, spu_join): Likewise.
1006 * win32-low.c (win32_detach, win32_join): Likewise.
1007 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1008 * target.h (struct target_ops) <detach, join>: Change parameter to
1009 process_info pointer instead of pid. Adjust all implementations
1010 and callers.
1011 (detach_inferior, join_inferior): Rename 'pid' parameter to
1012 'proc'.
1013
c7ab0aef
SDJ
10142018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1015 Jan Kratochvil <jan.kratochvil@redhat.com>
1016 Paul Fertser <fercerpav@gmail.com>
1017 Tsutomu Seki <sekiriki@gmail.com>
1018
1019 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1020 (OBS): Add 'common/netstuff.o'.
1021 (GDBREPLAY_OBS): Likewise.
1022 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1023 (remote_open): Implement support for IPv6
1024 connections.
1025 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1026 and 'wspiapi.h'.
1027 (handle_accept_event): Accept connections from IPv6 sources.
1028 (remote_prepare): Handle IPv6-style hostnames; implement
1029 support for IPv6 connections.
1030 (remote_open): Implement support for printing connections from
1031 IPv6 sources.
1032
31445d10
PA
10332018-07-11 Pedro Alves <palves@redhat.com>
1034
1035 PR gdb/23377
1036 * mem-break.c (any_persistent_commands): Add process_info
1037 parameter and use it instead of relying on the current process.
1038 Change return type to bool.
1039 * mem-break.h (any_persistent_commands): Add process_info
1040 parameter and change return type to bool.
1041 * server.c (handle_detach): Remove require_running_or_return call.
1042 Look up the process_info for the process we're about to detach.
1043 If not found, return back error to GDB. Adjust
1044 any_persistent_commands call to pass down a process pointer.
1045
cb197132
PA
10462018-07-11 Pedro Alves <palves@redhat.com>
1047
1048 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1049 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1050 instead of collect_register_by_name.
1051 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1052 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1053
1b919490
VB
10542018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1055 Pedro Alves <palves@redhat.com>
1056
1057 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1058
d7e15655
TT
10592018-07-03 Tom Tromey <tom@tromey.com>
1060
1061 * linux-low.c: Update.
1062 * lynx-low.c: Update.
1063 * mem-break.c: Update.
1064 * nto-low.c: Update.
1065 * remote-utils.c: Update.
1066 * server.c: Update.
1067 * spu-low.c: Update.
1068 * target.c: Update.
1069 * win32-low.c: Update.
1070
26a57c92
TT
10712018-07-03 Tom Tromey <tom@tromey.com>
1072
1073 * server.c: Update.
1074
0e998d96
TT
10752018-07-03 Tom Tromey <tom@tromey.com>
1076
1077 * linux-low.c: Update.
1078
cc6bcb54
TT
10792018-07-03 Tom Tromey <tom@tromey.com>
1080
1081 * target.c: Update.
1082
e38504b3
TT
10832018-07-03 Tom Tromey <tom@tromey.com>
1084
1085 * linux-low.c: Update.
1086 * linux-mips-low.c: Update.
1087 * lynx-low.c: Update.
1088 * nto-low.c: Update.
1089 * remote-utils.c: Update.
1090 * server.c: Update.
1091 * spu-low.c: Update.
1092 * target.c: Update.
1093 * thread-db.c: Update.
1094
e99b03dc
TT
10952018-07-03 Tom Tromey <tom@tromey.com>
1096
1097 * linux-low.c: Update.
1098 * linux-mips-low.c: Update.
1099 * lynx-low.c: Update.
1100 * mem-break.c: Update.
1101 * nto-low.c: Update.
1102 * remote-utils.c: Update.
1103 * server.c: Update.
1104 * spu-low.c: Update.
1105 * target.c: Update.
1106 * tracepoint.c: Update.
1107
f2907e49
TT
11082018-07-03 Tom Tromey <tom@tromey.com>
1109
1110 * linux-low.c: Update.
1111 * linux-ppc-low.c: Update.
1112 * linux-x86-low.c: Update.
1113 * proc-service.c: Update.
1114 * server.c: Update.
1115 * spu-low.c: Update.
1116 * thread-db.c: Update.
1117 * win32-low.c: Update.
1118
fd79271b
TT
11192018-07-03 Tom Tromey <tom@tromey.com>
1120
1121 * linux-low.c: Update.
1122 * lynx-low.c: Update.
1123 * nto-low.c: Update.
1124 * remote-utils.c: Update.
1125 * spu-low.c: Update.
1126 * thread-db.c: Update.
1127 * win32-low.c: Update.
1128
c0867626
SDJ
11292018-06-29 Joel Brobecker <brobecker@adacore.com>
1130
1131 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1132 parameter in call to 'amd64_create_target_description'.
1133
2512d7ef
JK
11342018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1135
1136 * x86-tdesc.h: Remove executable permission flag.
1137
d0ac1c44
SM
11382018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1139
1140 * configure.ac: Remove AC_PREREQ, add missing quoting.
1141 * configure: Re-generate.
1142 * config.in: Re-generate.
1143 * aclocal.m4: Re-generate.
1144
c4eb05ff
SM
11452018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1146
1147 * tracepoint.h (current_traceframe): Remove declaration.
1148
02895270
AH
11492018-06-18 Alan Hayward <alan.hayward@arm.com>
1150
1151 * linux-aarch64-low.c (is_sve_tdesc): New function.
1152 (aarch64_sve_regs_copy_to_regcache): Likewise.
1153 (aarch64_sve_regs_copy_from_regcache): Likewise.
1154 (aarch64_regs_info): Add SVE checks.
1155 (initialize_low_arch): Initialize SVE.
1156
e9902bfc
AH
11572018-06-18 Alan Hayward <alan.hayward@arm.com>
1158
1159 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1160
fefa175e
AH
11612018-06-11 Alan Hayward <alan.hayward@arm.com>
1162
1163 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1164 (initialize_low_tracepoint): Likewise
1165 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1166 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1167 param.
1168 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1169 checks.
1170 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1171
b91ad3ff
AH
11722018-06-11 Alan Hayward <alan.hayward@arm.com>
1173
1174 * server.h (PBUFSIZ): Increase size
1175
f868386e
AH
11762018-06-11 Alan Hayward <alan.hayward@arm.com>
1177
1178 * regcache.c (regcache::raw_compare): New function.
1179 * regcache.h (regcache::raw_compare): New declaration.
1180
9c861883
AH
11812018-06-11 Alan Hayward <alan.hayward@arm.com>
1182
1183 * regcache.c (new_register_cache): Use new.
1184 (free_register_cache): Use delete.
1185 (register_data): Use const.
1186 (supply_register): Move body inside regcache.
1187 (regcache::raw_supply): New override function.
1188 (collect_register): Move body inside regcache.
1189 (regcache::raw_collect): New override function.
1190 (regcache::get_register_status): New override function.
1191 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1192
40591844
TT
11932018-06-09 Tom Tromey <tom@tromey.com>
1194
1195 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1196 declare queue.
1197 (event_queue): Use std::queue.
1198 (gdb_event_xfree): Remove.
1199 (initialize_event_loop, process_event, wait_for_event): Update.
1200
6341380d
SC
12012018-06-08 Stan Cox <scox@redhat.com>
1202
1203 * win32-low.c (win32_create_inferior): last_ptid and last_status
1204 moved to client_state.
1205
03349c93
PA
12062018-06-08 Pedro Alves <palves@redhat.com>
1207
1208 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1209 common/common-exceptions.o, common/common-utils.o,
1210 common/errors.o, common/print-utils.o and utils.o.
1211 * gdbreplay.c: Include "common-defs.h" instead of the two
1212 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1213 string.h or alloca.h.
1214 (perror_with_name): Delete.
1215 (remote_open): Use xstrdup instead of strdup.
1216 (main): Rename to ...
1217 (captured_main): ... this.
1218 (main): New.
1219
8dcc53b3
TT
12202018-06-08 Tom Tromey <tom@tromey.com>
1221
1222 * linux-low.c (linux_low_read_btrace): Update.
1223
c12a5089
SC
12242018-06-04 Stan Cox <scox@redhat.com>
1225
1226 * server.h (struct client_state): New.
1227 * server.c (cont_thread, general_thread, multi_process)
1228 (report_fork_events, report_vfork_events, report_exec_events)
1229 (report_thread_events, swbreak_feature, hwbreak_feature)
1230 (vCont_supported, disable_randomization, pass_signals)
1231 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1232 Moved to client_state.
1233 * remote-utils.c (remote_debug, noack_mode)
1234 (transport_is_reliable): Moved to client_state.
1235 * tracepoint.c (current_traceframe): Moved to client_state.
1236
1237 Update all callers.
1238 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1239 linux-low.c, remote-utils.h, target.c: Use client_state.
1240
122394f1
AH
12412018-05-31 Alan Hayward <alan.hayward@arm.com>
1242
1243 * configure.srv: Add new c/h file.
1244
95228a0d
AH
12452018-05-31 Alan Hayward <alan.hayward@arm.com>
1246
1247 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1248 null VQ.
1249
d8dab6c3
MR
12502018-05-25 Maciej W. Rozycki <macro@mips.com>
1251
1252 * gdb.arch/mips-fpregset-core.exp: New test.
1253 * gdb.arch/mips-fpregset-core.c: New test source.
1254
81e25b7c
EK
12552018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1256
1257 PR server/23198
1258 * hostio.c (require_int): Do not report overflow for integers
1259 between 0xfffffff and 0x7fffffff.
1260
7e947ad3
MR
12612018-05-22 Maciej W. Rozycki <macro@mips.com>
1262
1263 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1264 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1265 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1266 functions.
1267 (the_low_target): Wire them.
1268
1d75a658
PFC
12692018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1270
1271 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1272 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1273 mode. Call collect_register_by_name with vscr using
1274 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1275 (ppc_store_vrregset): Add and set vscr_offset variable as in
1276 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1277 vscr_offset.
1278
d078308a
PFC
12792018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1280
1281 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1282 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1283 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1284
7273b5fc
PFC
12852018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1286
1287 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1288 (ppc_store_vsxregset): Likewise.
1289 (ppc_fill_vrregset): Likewise.
1290 (ppc_store_vrregset): Likewise.
1291 (ppc_fill_evrregset): Likewise.
1292 (ppc_store_evrregset): Likewise.
1293 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1294 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1295 needed.
1296
2e077f5e
PFC
12972018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1298
1299 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1300 wordsize of the inferior. Call ppc_linux_target_wordsize.
1301
bd64614e
PFC
13022018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1303
1304 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1305 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1306 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1307 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1308 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1309 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1310 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1311 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1312 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1313 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1314 (tdesc_powerpc_e500l): Remove.
1315 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1316 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1317 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1318 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1319 linux-ppc-tdesc.h.
1320 (ppc_arch_setup): Remove target description matching code. Fill a
1321 ppc_linux_features struct and call ppc_linux_match_description
1322 with it.
1323
75d74cca
MR
13242018-05-22 Maciej W. Rozycki <macro@mips.com>
1325
1326 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1327 width of the requested register exceeds the width of the
1328 `ptrace' data type.
1329 (mips_cannot_store_register): Likewise.
1330
e4439e43
MR
13312018-05-21 Maciej W. Rozycki <macro@mips.com>
1332
1333 * linux-mips-low.c (mips_fetch_register): New function. Update
1334 preceding comment.
1335 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1336 (the_low_target): Wire `mips_fetch_register'.
1337
55271bf9
JB
13382018-05-10 Joel Brobecker <brobecker@adacore.com>
1339
1340 * lynx-i386-low.c (LYNXOS_178): New macro.
1341 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1342 the layout on LynxOS-178.
1343 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1344 handle floating point registers that are not supported by
1345 LynxOS-178.
1346
1a34f210
TT
13472018-05-10 Tom Tromey <tom@tromey.com>
1348
1349 * configure: Rebuild.
1350
190852c8
JB
13512018-05-10 Joel Brobecker <brobecker@adacore.com>
1352
1353 PR server/23158:
1354 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1355 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1356 Use it to set the expedite_regs field in the given tdesc.
1357 * x86-tdesc.h: New file.
1358 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1359 Adjust following the addition of the new expedite_regs parameter
1360 to init_target_desc.
1361 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1362 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1363 (i386_linux_read_description, amd64_linux_read_description):
1364 Adjust following the addition of the new expedite_regs parameter
1365 to init_target_desc.
1366 * lynx-i386-low.c: #include "x86-tdesc.h".
1367 (lynx_i386_arch_setup): Adjust following the addition of the new
1368 expedite_regs parameter to init_target_desc.
1369 * nto-x86-low.c: #include "x86-tdesc.h".
1370 (nto_x86_arch_setup): Adjust following the addition of the new
1371 expedite_regs parameter to init_target_desc.
1372 * win32-i386-low.c: #include "x86-tdesc.h".
1373 (i386_arch_setup): Adjust following the addition of the new
1374 expedite_regs parameter to init_target_desc.
1375
7dbac825
JB
13762018-05-10 Joel Brobecker <brobecker@adacore.com>
1377
1378 PR server/23158:
1379 * win32-low.c (win32_create_inferior): Add call to my_wait
1380 setting last_status global.
1381
906994d9
JB
13822018-05-10 Joel Brobecker <brobecker@adacore.com>
1383
1384 PR server/23158:
1385 * win32-low.c (create_process): Only call gdb_tilde_expand if
1386 inferior_cwd is not NULL.
1387
8ee22052
AB
13882018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1389
1390 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1391 registers to the cache if their values have changed.
1392 (i387_xsave_to_cache): Provide default values for x87 control
1393 registers when these features are available, but disabled.
1394 * regcache.c (supply_register_by_name_zeroed): New function.
1395 * regcache.h (supply_register_by_name_zeroed): Declare new
1396 function.
1397
aff689d3
TT
13982018-05-07 Tom Tromey <tom@tromey.com>
1399
1400 * configure: Rebuild.
1401
85e26832
TT
14022018-05-04 Tom Tromey <tom@tromey.com>
1403
1404 * configure: Rebuild.
1405
a3b60e45
JK
14062018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1407 Pedro Alves <palves@redhat.com>
1408
1409 * linux-aarch64-low.c (aarch64_stopped_data_address):
1410 Likewise.
1411
632e107b
TT
14122018-04-27 Tom Tromey <tom@tromey.com>
1413
1414 * configure: Rebuild.
1415
458412c3
TT
14162018-04-23 Tom Tromey <tom@tromey.com>
1417
1418 * configure: Rebuild.
1419
f31c089e
SM
14202018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1421
1422 * Makefile.in (depcomp): Add "..".
1423 (all_deps_files): New and use it.
1424
b319b098
AH
14252018-04-18 Alan Hayward <alan.hayward@arm.com>
1426
1427 * configure.srv (aarch64*-*-linux*): Don't include xml.
1428 (i[34567]86-*-cygwin*): Likewise.
1429 (i[34567]86-*-linux*): Likewise.
1430 (i[34567]86-*-lynxos*): Likewise.
1431 (i[34567]86-*-mingw32ce*): Likewise.
1432 (i[34567]86-*-mingw*): Likewise.
1433 (i[34567]86-*-nto*): Likewise.
1434 (tic6x-*-uclinux): Likewise.
1435 (x86_64-*-linux*): Likewise.
1436 (x86_64-*-mingw*): Likewise.
1437 (x86_64-*-cygwin*): Likewise.
1438
3b74854b
AH
14392018-04-18 Alan Hayward <alan.hayward@arm.com>
1440
1441 * tdesc.c: Remove xml parameter.
1442
e98577a9
AH
14432018-04-18 Alan Hayward <alan.hayward@arm.com>
1444
1445 * server.c (get_features_xml): Remove cast.
1446 * tdesc.c (void target_desc::accept): Fill in function.
1447 (tdesc_get_features_xml): Remove old xml creation.
1448 (print_xml_feature::visit_pre): Add xml vistor.
1449 * tdesc.h (struct target_desc): Make xmltarget mutable.
1450 (tdesc_get_features_xml): Remove declaration.
1451
d278f585
AH
14522018-04-18 Alan Hayward <alan.hayward@arm.com>
1453
1454 * tdesc.c (tdesc_architecture_name): Add new function.
1455 (tdesc_osabi_name): Likewise.
1456 (tdesc_get_features_xml): Use new functions.
1457
eee8a18d
AH
14582018-04-18 Alan Hayward <alan.hayward@arm.com>
1459
1460 * tdesc.c (tdesc_create_flags): Remove.
1461 (tdesc_add_flag): Likewise.
1462 (tdesc_named_type): Likewise.
1463 (tdesc_create_union): Likewise.
1464 (tdesc_create_struct): Likewise.
1465 (tdesc_create_vector): Likewise.
1466 (tdesc_add_bitfield): Likewise.
1467 (tdesc_add_field): Likewise.
1468 (tdesc_set_struct_size): Likewise.
1469
82ec9bc7
AH
14702018-04-18 Alan Hayward <alan.hayward@arm.com>
1471
1472 * tdesc.c (~target_desc): Remove implictly deleted items.
1473 (init_target_desc): Iterate all features.
1474 (tdesc_get_features_xml): Use vector.
1475 (tdesc_create_feature): Create feature.
1476 * tdesc.h (tdesc_feature) Remove
1477 (target_desc): Add features.
1478
ea3e7d71
AH
14792018-04-18 Alan Hayward <alan.hayward@arm.com>
1480
1481 * Makefile.in: Add common/tdesc.c
1482 * tdesc.c (init_target_desc): init all reg_defs from register
1483 vector.
1484 (tdesc_create_reg): Create tdesc_reg.
1485 * tdesc.h (tdesc_feature): Add register vector.
1486
17d08cd4
SM
14872018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1488
1489 * tdesc.h (struct target_desc) <features>: Change type to
1490 std::vector<std::string>.
1491 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1492 changes.
1493 (tdesc_get_features_xml): Likewise.
1494 (tdesc_create_feature): Likewise.
1495
5cd3e386
AH
14962018-03-26 Alan Hayward <alan.hayward@arm.com>
1497
1498 * regcache.c (find_register_by_number): Return a ref.
1499 (find_regno): Use references.
1500 (register_size): Likewise.
1501 (register_data): Likewise.
1502 * tdesc.c (target_desc::~target_desc): Remove free calls.
1503 (target_desc::operator==): Use std::vector compare.
1504 (init_target_desc): Use reference.
1505 (tdesc_create_reg): Use reg constructors.
1506 * tdesc.h (struct target_desc): Replace pointer with object.
1507
dff7492c
AH
15082018-03-23 Alan Hayward <alan.hayward@arm.com>
1509
1510 * regcache.c (find_register_by_number): Make static.
1511 (find_regno): Use find_register_by_number
1512 * regcache.h (struct reg): Remove declaration.
1513
d80e5242
AH
15142018-03-23 Alan Hayward <alan.hayward@arm.com>
1515
1516 * tdesc.c (target_desc::~target_desc): Move to here.
1517 (target_desc::operator==): Likewise.
1518 * tdesc.h (target_desc::~target_desc): Move from here.
1519 (target_desc::operator==): Likewise.
1520
f69c5afb
AA
15212018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1522
1523 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1524
ce29f843
AA
15252018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1526
1527 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1528 S390_TDESC_GS.
1529 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1530 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1531 and init_registers_s390_gs_linux64.
1532
c49bd90b
AA
15332018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1534
1535 * linux-s390-low.c (s390_fill_gs): Remove function.
1536 (s390_fill_gsbc): Remove function.
1537 (s390_regsets): Set fill functions for the guarded storage regsets
1538 to NULL.
1539
7edb9bd3
AA
15402018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1541
1542 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1543 the word size. Add comment.
1544 (s390_get_wordsize): New function.
1545 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1546 pswm with it. Instead, use s390_get_wordsize to determine the
1547 word size first and derive the correct tdesc from that directly.
1548
39be3c7e
SM
15492018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1550
1551 * Makefile.in: Include silent-rules.mk.
1552 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1553 (COMPILE): Add ECHO_CXX.
1554 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1555 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1556 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1557 (version-generated.c): Add ECHO_GEN.
1558 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1559 (IPAGENT_COMPILE): Add ECHO_CXX.
1560 (%-generated.c): Add ECHO_REGDAT.
1561
3ae9ce5d
TT
15622018-03-14 Tom Tromey <tom@tromey.com>
1563
1564 PR cli/14977:
1565 * ax.c (ax_printf): Special case for NULL.
1566
e6a58aa8
SM
15672018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1568
1569 * linux-low.c (linux_qxfer_libraries_svr4): Use
1570 xml_escape_text_append.
1571
f6e8a41e
SM
15722018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1573
1574 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1575
b9671caf
SM
15762018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1577
1578 * server.c (handle_general_set): Remove unnecessary xstrdup.
1579
e80aaf61
SM
15802018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1581
1582 * server.c (parse_debug_format_options): Adjust to
1583 delim_string_to_char_ptr_vec changes.
1584 * thread-db.c (thread_db_load_search): Adjust to
1585 dirnames_to_char_ptr_vec changes.
1586
b1223e78
MM
15872018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1588
1589 * target.h (target_enable_btrace, target_disable_btrace)
1590 (target_read_btrace, target_read_btrace_conf): Turn macro into
1591 inline function. Throw error if target method is not defined.
1592 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1593 check for btrace target method. Be prepared to handle exceptions
1594 from btrace target methods.
1595
81561546
SDJ
15962018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1597
1598 * server.c (captured_main): Change order of error message printed
1599 when the current working directory cannot be found.
1600
25e3c82c
SDJ
16012018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1602
1603 * server.c: Include "filenames.h" and "pathstuff.h".
1604 (program_name): Delete variable.
1605 (program_path): New anonymous class.
1606 (get_exec_wrapper): Use "program_path" instead of
1607 "program_name".
1608 (handle_v_run): Likewise.
1609 (captured_main): Likewise.
1610 (process_serial_event): Likewise.
1611
b4987c95
SDJ
16122018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1613
1614 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1615 (OBJS): Add "pathstuff.o".
1616 * server.c (current_directory): New global variable.
1617 (captured_main): Initialize "current_directory".
1618
f46cd62a
AH
16192018-02-26 Alan Hayward <alan.hayward@arm.com>
1620
1621 * tdesc.c: Use common/tdesc.h.
1622 * tdesc.h: Likewise.
1623
a543c5ca
AH
16242018-02-20 Alan Hayward <alan.hayward@arm.com>
1625 Simon Marchi <simon.marchi@ericsson.com>
1626
1627 * Makefile.in: Switch order of make rules.
1628
b5884fa7
AH
16292018-02-19 Alan Hayward <alan.hayward@arm.com>
1630
1631 * Makefile.in: Add common directory in build.
1632 * configure.ac: Add common reference.
1633 * configure: Regenerate.
1634
de6242d3
MM
16352018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1636
1637 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1638 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1639 * spu-low.c (spu_target_ops): Likewise.
1640 * win32-low.c (win32_target_ops): Likewise.
1641 * server.c (supported_btrace_packets): Report packets unconditionally.
1642 * target.h (target_ops) <supports_btrace>: Remove.
1643 (target_supports_btrace): Remove.
1644
9ee23a85
MM
16452018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1646
1647 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1648 (handle_btrace_disable): Change return type to void. Use exceptions
1649 to report errors.
1650 (handle_btrace_general_set): Catch exception and copy message to
1651 return message.
1652
8ce47547
TT
16532018-02-08 Tom Tromey <tom@tromey.com>
1654
1655 * linux-low.c (install_software_single_step_breakpoints): Use
1656 make_scoped_restore.
1657 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1658 (do_restore_current_thread_cleanup): Remove.
1659 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1660 declare.
1661
45dd3607
TT
16622018-02-08 Tom Tromey <tom@tromey.com>
1663
1664 * mem-break.c (set_raw_breakpoint_at): Use
1665 gdb::unique_xmalloc_ptr.
1666
e671cd59
PA
16672018-01-30 Pedro Alves <palves@redhat.com>
1668
1669 PR gdb/13211
1670 * target.c (target_terminal::terminal_state): Rename to ...
1671 (target_terminal::m_terminal_state): ... this.
1672
a0aad537
JC
16732018-01-19 James Clarke <jrtc27@jrtc27.com>
1674
1675 * linux-low.c (handle_extended_wait): Surround call to
1676 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1677
4d9b86e1
SM
16782018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1679
1680 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1681 linux_ptrace_attach_fail_reason_string now returning an
1682 std::string.
1683 (linux_attach): Likewise.
1684 * thread-db.c (attach_thread): Likewise.
1685
f517c180
EA
16862018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1687
1688 PR gdb/21559
1689 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1690 checking for fs_base/gs_base fields in struct user_regs_struct.
1691 * configure: Regenerate.
1692
9a70f35c
YQ
16932018-01-16 Yao Qi <yao.qi@linaro.org>
1694
1695 PR gdb/18749
1696 * linux-low.c (fetch_register): Call supply_register instead of
1697 error.
1698
605fd3c6
YQ
16992018-01-08 Yao Qi <yao.qi@linaro.org>
1700 Simon Marchi <simon.marchi@ericsson.com>
1701
1702 * Makefile.in (OBS): Remove selftest.o.
1703 * configure.ac: Set srv_selftest_objs if $development is true.
1704 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1705 * configure: Re-generated.
1706 * server.c (captured_main): Wrap variable selftest_filter with
1707 GDB_SELF_TEST.
1708
2cc05030
SM
17092018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1710
1711 * server.c (parse_debug_format_options): Return std::string.
1712 (handle_monitor_command, captured_main): Adjust.
1713
e379cee6
PA
17142018-01-05 Pedro Alves <palves@redhat.com>
1715
1716 PR gdb/18653
1717 * server.c (captured_main): Pass quiet=false to
1718 save_original_signals_state.
1719
82e1e79a
JB
17202018-01-01 Joel Brobecker <brobecker@adacore.com>
1721
1722 * gdbreplay.c (gdbreplay_version): Update copyright year in
1723 version message.
1724 * server.c (gdbserver_version): Likewise.
1725
8e481c3b
TT
17262017-12-08 Tom Tromey <tom@tromey.com>
1727
1728 * ax.c (ax_printf): Update.
1729
a8806230
YQ
17302017-12-07 Yao Qi <yao.qi@linaro.org>
1731
1732 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1733 aarch64_linux_read_description.
1734 * linux-amd64-ipa.c (idx2mask): New array.
1735 (get_ipa_tdesc): Move idx2mask out.
1736 (initialize_low_tracepoint): Initialize target descriptions.
1737 * linux-i386-ipa.c (idx2mask): New array.
1738 (get_ipa_tdesc): Move idx2mask out.
1739 (initialize_low_tracepoint): Initialize target descriptions.
1740
d4a0e8b5
SM
17412017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1742
1743 * tdesc.c (struct tdesc_type): Change return type.
1744 (tdesc_add_flag): Change parameter type.
1745 (tdesc_add_bitfield): Likewise.
1746 (tdesc_add_field): Likewise.
1747 (tdesc_set_struct_size): Likewise.
1748
798a7429
SM
17492017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1750
1751 * regcache.c (registers_to_string): Remove unused variable.
1752
c0e15c9b
SM
17532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1754
1755 * inferiors.c (for_each_inferior_with_data): Remove.
1756 * inferiors.h (for_each_inferior_with_data): Remove.
1757 * server.c (handle_qxfer_threads_worker): Change parameter type.
1758 (handle_qxfer_threads_proper): Use for_each_thread.
1759
f0045347
SM
17602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1761
1762 * inferiors.c (for_each_inferior): Remove.
1763 (clear_inferiors): Use for_each_thread.
1764 * inferiors.h (for_each_inferior): Remove.
1765 * linux-low.c (linux_wait_for_event_filtered): Use
1766 for_each_thread.
1767 (linux_stabilize_threads): Likewise.
1768 * regcache.c (regcache_release): Likewise.
1769 * server.c (gdb_wants_all_threads_stopped): Likewise.
1770 (clear_pending_status_callback): Remove.
1771 (handle_status): Use for_each_thread.
1772 (captured_main): Likewise.
1773 * win32-low.c (child_init_thread_list): Likewise.
1774 (win32_clear_inferiors): Likewise.
1775 (fake_breakpoint_event): Likewise.
1776
9521758b
SM
17772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1778
1779 * inferiors.h (find_inferior): Remove.
1780 * inferiors.c (find_inferior): Remove.
1781
8f86d7aa
SM
17822017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1783
1784 * linux-low.c (resume_status_pending_p): Update comment.
1785 (need_step_over_p): Update comment.
1786
e2b44075
SM
17872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1788
1789 * linux-low.c (proceed_one_lwp): Return void, change parameter
1790 type.
1791 (unsuspend_and_proceed_one_lwp): Likewise.
1792 (proceed_all_lwps): Use for_each_thread.
1793 (unstop_all_lwps): Likewise.
1794
c80825ff
SM
17952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1796
1797 * linux-low.c (linux_resume_one_thread): Return void, take
1798 parameter directly.
1799 (linux_resume): Use for_each_thread.
1800
df3e4dbe
SM
18012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1802
1803 * linux-low.c (send_sigstop_callback): Return void, change
1804 parameter type. Rename to...
1805 (send_sigstop): ... this.
1806 (suspend_and_send_sigstop_callback): Return void, change parameter
1807 type. Rename to...
1808 (suspend_and_send_sigstop): ... this.
1809 (stop_all_lwps): Use for_each_thread.
1810
5a6b0a41
SM
18112017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1812
1813 * linux-low.c (lwp_running): Return bool, remove unused
1814 argument.
1815 (linux_stabilize_threads): Use find_thread.
1816
39a64da5
SM
18172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1818
1819 * linux-low.c (select_singlestep_lwp_callback): Remove.
1820 (count_events_callback): Remove.
1821 (select_event_lwp_callback): Remove.
1822 (select_event_lwp): Use find_thread/for_each_thread.
1823
a1385b7b
SM
18242017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1825
1826 * linux-low.c (not_stopped_callback): Return bool, take filter
1827 argument directly.
1828 (linux_wait_for_event_filtered): Use find_thread.
1829 (linux_wait_1): Likewise.
1830
454296a2
SM
18312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1832
1833 * linux-low.c (same_lwp): Remove.
1834 (find_lwp_pid): Use find_thread.
1835
6b2a85da
SM
18362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1837
1838 * linux-low.c (delete_lwp_callback): Remove.
1839 (linux_mourn): Use for_each_thread.
1840
798a38e8
SM
18412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1842
1843 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1844 args parameter, don't check for pid.
1845 (linux_detach): Use for_each_thread.
1846
e4eb0dec
SM
18472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1848
1849 * linux-low.c (struct counter): Remove.
1850 (second_thread_of_pid_p): Remove.
1851 (last_thread_of_process_p): Use find_thread.
1852
83e1b6c1
SM
18532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1854
1855 * inferiors.c (find_inferior_in_random): Remove.
1856 * inferiors.h (find_inferior_in_random): Remove.
1857 * linux-low.c (status_pending_p_callback): Return bool, accept
1858 parameter ptid directly.
1859 (linux_wait_for_event_filtered): Use find_thread_in_random.
1860 (linux_wait_1): Likewise.
1861
8dc7b443
SM
18622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1863
1864 * inferiors.c (find_inferior_id): Remove.
1865 (find_thread_ptid): Move implemention from find_inferior_id to
1866 here.
1867 * inferiors.h (find_inferior_id): Remove.
1868 * server.c (handle_status): Use find_thread_ptid.
1869 (process_serial_event): Likewise.
1870 * thread-db.c (find_one_thread): Likewise.
1871 (thread_db_thread_handle): Likewise.
1872 * win32-low.c (thread_rec): Likewise.
1873 (child_delete_thread): Likewise.
1874 (win32_thread_alive): Likewise.
1875 (get_child_debug_event): Likewise.
1876
da25033c
SM
18772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1878
1879 * linux-mips-low.c (update_watch_registers_callback): Return
1880 void, remove pid_p parameter, don't check for pid.
1881 (mips_insert_point, mips_remove_point): Use for_each_thread.
1882
c91bb56b
SM
18832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1884
1885 * lynx.low (lynx_delete_thread_callback): Remove.
1886 (lynx_mourn): Use for_each_thread.
1887
634a3254
SM
18882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1889
1890 * regcache.c (regcache_invalidate_one): Remove.
1891 (regcache_invalidate_pid): use for_each_thread.
1892
41272101
TT
18932017-11-26 Tom Tromey <tom@tromey.com>
1894
1895 * linux-low.c (linux_create_inferior): Update.
1896
f5291a6f
UW
18972017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1898
1899 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1900
6654d750
AH
19012017-11-24 Alan Hayward <alan.hayward@arm.com>
1902
1903 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1904 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1905 * linux-aarch64-tdesc-selftest.c: New file.
1906 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1907
19082017-11-24 Alan Hayward <alan.hayward@arm.com>
1909
1910 * configure.srv: Add new file.
1911 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1912 * linux-aarch64-tdesc-selftest.c: New file.
1913 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1914
49bdb7ee
AH
19152017-11-24 Alan Hayward <alan.hayward@arm.com>
1916
1917 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1918 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1919 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1920
d6d7ce56
AH
19212017-11-24 Alan Hayward <alan.hayward@arm.com>
1922
1923 * configure.srv: Add new files.
1924 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1925 aarch64_linux_read_description.
1926 * linux-aarch64-low.c (aarch64_linux_read_description):
1927 Merge with aarch64_arch_setup.
1928 (aarch64_arch_setup): Call aarch64_linux_read_description.
1929 * linux-aarch64-tdesc.c: New file.
1930 * linux-aarch64-tdesc.h: New file.
1931
506fe5f4
YQ
19322017-11-24 Yao Qi <yao.qi@linaro.org>
1933
1934 * configure.srv: Set $srv_regobj for tic6x-linux.
1935 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1936 (tic6x_read_description): Move some code to tic6x_arch_setup.
1937 (tic6x_tdesc_test): New function.
1938 (initialize_low_arch): Call selftests::register_test.
1939
29f9a567
YQ
19402017-11-22 Yao Qi <yao.qi@linaro.org>
1941
1942 * remote-utils.c (prepare_resume_reply): Use memcpy.
1943
578290ec
SM
19442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1945
1946 * linux-low.c (kill_one_lwp_callback): Return void, take
1947 argument directly, don't filter on pid.
1948 (linux_kill): Use for_each_thread.
1949
eca55aec
SM
19502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1951
1952 * linux-low.c (need_step_over_p): Return bool, remove dummy
1953 argument.
1954 (linux_resume, proceed_all_lwps): Use find_thread.
1955
25c28b4d
SM
19562017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1957
1958 * linux-low.c (resume_status_pending_p): Return bool, remove
1959 flag_p argument.
1960 (linux_resume): Use find_thread.
1961
5fdda392
SM
19622017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1963
1964 * linux-low.c (struct thread_resume_array): Remove.
1965 (linux_set_resume_request): Return void, take arguments
1966 directly.
1967 (linux_resume): Use for_each_thread.
1968
fcb056a5
SM
19692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1970
1971 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1972 return bool, remove data argument.
1973 (linux_stabilize_threads): Use find_thread.
1974
139720c5
SM
19752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1976
1977 * linux-low.c (unsuspend_one_lwp): Remove.
1978 (unsuspend_all_lwps): Use for_each_thread, inline code from
1979 unsuspend_one_lwp.
1980
6d1e5673
SM
19812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1982
1983 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1984 * linux-low.c (struct iterate_over_lwps_args): Remove.
1985 (iterate_over_lwps_filter): Remove.
1986 (iterate_over_lwps): Use find_thread.
1987
bbf550d5
SM
19882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1989
1990 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1991 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1992 code from reset_lwp_ptrace_options_callback.
1993
00192f77
SM
19942017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1995
1996 * linux-arm-low.c (struct update_registers_data): Remove.
1997 (update_registers_callback): Return void, take arguments
1998 directly, don't check thread's pid.
1999 (arm_insert_point, arm_remove_point): Use for_each_thread.
2000
2bee2b6c
SM
20012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2002
2003 * win32-low.c (continue_one_thread): Return void, take argument
2004 directly.
2005 (child_continue): Use for_each_thread.
2006
0b360f19
SM
20072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2008
2009 * win32-i386-low.c (update_debug_registers_callback): Rename
2010 to ...
2011 (update_debug_registers): ... this, return void, remove pid_p arg.
2012 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2013
f27866ba
SM
20142017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2015
2016 * inferiors.h (struct process_info): Add constructor, initialize
2017 fields..
2018 <syscalls_to_catch>: Change type to std::vector<int>.
2019 * inferiors.c (add_process): Allocate process_info with new.
2020 (remove_process): Free process_info with delete.
2021 * linux-low.c (handle_extended_wait): Adjust.
2022 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2023 * server.c (handle_general_set): Adjust.
2024
e849ea89
PA
20252017-11-16 Pedro Alves <palves@redhat.com>
2026
2027 * remote-utils.c (remote_close): Block SIGIO signals instead of
2028 uninstalling the SIGIO handler.
2029
1d0aa65c
AH
20302017-11-16 Alan Hayward <alan.hayward@arm.com>
2031
2032 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2033
3491a34c
YQ
20342017-11-16 Yao Qi <yao.qi@linaro.org>
2035
2036 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2037 (tic6x_store_gregset): Likewise.
2038 (tic6x_usrregs_info): Move it up.
2039
a602f924
AH
20402017-11-15 Alan Hayward <alan.hayward@arm.com>
2041
2042 * Makefile.in: Update arch rules.
2043 * configure.srv: Explicitly mark arch/ files.
2044
5616b6c3
AS
20452017-11-13 Andreas Schwab <schwab@suse.de>
2046
2047 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2048 function.
2049 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2050
d1928160
PA
20512017-11-06 Pedro Alves <palves@redhat.com>
2052
2053 * config.in, configure: Regenerate.
2054
bac608e7
SM
20552017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2056
2057 * target.c (struct thread_search): Remove.
2058 (thread_search_callback): Remove.
2059 (prepare_to_access_memory): Use for_each_thread instead of
2060 find_inferior. Inline code from thread_search_callback.
2061
eaddb425
SM
20622017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2063
2064 * server.c (struct visit_actioned_threads_data): Remove.
2065 (visit_actioned_threads): Change prototype to take arguments
2066 directly.
2067 (resume): Use find_thread instead of find_inferior.
2068
99078d34
SM
20692017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2070
2071 * server.c (queue_stop_reply_callback): Change prototype, return
2072 void.
2073 (find_status_pending_thread_callback): Remove.
2074 (handle_status): Replace find_inferior with find_thread and
2075 for_each_thread.
2076
cc628f3d
AH
20772017-10-25 Alan Hayward <alan.hayward@arm.com>
2078
2079 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2080 with REGNO.
2081 (aarch64_store_gregset): Likewise.
2082 (aarch64_fill_fpregset): Likewise.
2083 (aarch64_store_fpregset): Likewise.
2084
4d3bb80e
SM
20852017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2086
2087 * gdbthread.h (find_thread, for_each_thread): New functions.
2088 * inferiors.c (thread_of_pid): Remove.
2089 (find_any_thread_of_pid): Use find_thread.
2090 * linux-low.c (num_lwps): Use for_each_thread.
2091
7a7cdfa0
YQ
20922017-10-17 Yao Qi <yao.qi@linaro.org>
2093
2094 * Makefile.in: Remove one rule.
2095 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2096
e675d170
YQ
20972017-10-17 Yao Qi <yao.qi@linaro.org>
2098
2099 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2100 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2101
7eb4e0f9
YQ
21022017-10-17 Yao Qi <yao.qi@linaro.org>
2103
2104 * configure.srv: Rename arm.o with arch/arm.o.
2105
60d6cfc9
YQ
21062017-10-17 Yao Qi <yao.qi@linaro.org>
2107
2108 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2109 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2110 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2111 (arch-i386.o, arch-amd64.o): Remove rules.
2112 (arch/%.o): New rule.
2113 Update POSTCOMPILE and COMPILE.pre.
2114 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2115 * configure: Re-generated.
2116 * configure.srv: Replace arch-i386.o with arch/i386.o.
2117 Replace arch-amd64.o with arch/amd64.o.
2118
5bfda255
YQ
21192017-10-16 Yao Qi <yao.qi@linaro.org>
2120
2121 * configure: Regenerated.
2122
9c80ecd6
SM
21232017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2124
2125 * inferiors.h: (struct inferior_list): Remove.
2126 (struct inferior_list_entry); Remove.
2127 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2128 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2129 get_first_inferior): Remove.
2130 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2131 find_inferior_id, find_inferior_in_random): Change signature.
2132 * inferiors.c (all_threads): Change type to
2133 std::list<thread_info *>.
2134 (get_thread): Remove macro.
2135 (find_inferior, find_inferior_id): Change signature, implement
2136 using find_thread.
2137 (find_inferior_in_random): Change signature, implement using
2138 find_thread_in_random.
2139 (for_each_inferior, for_each_inferior_with_data): Change
2140 signature, implement using for_each_thread.
2141 (add_inferior_to_list, remove_inferior): Remove.
2142 (add_thread, get_first_thread, thread_of_pid,
2143 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2144 (get_first_inferior, one_inferior_p, clear_inferior_list):
2145 Remove.
2146 (clear_inferiors, get_thread_process): Update.
2147 * gdbthread.h: Include <list>.
2148 (struct thread_info) <entry>: Remove field.
2149 <id>: New field.
2150 (all_threads): Change type to std::list<thread_info *>.
2151 (get_first_inferior): Add doc.
2152 (find_thread, for_each_thread, find_thread_in_random): New
2153 functions.
2154 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2155 * linux-arm-low.c (update_registers_callback): Update.
2156 * linux-low.c (second_thread_of_pid_p): Update.
2157 (kill_one_lwp_callback, linux_detach_lwp_callback,
2158 delete_lwp_callback, status_pending_p_callback, same_lwp,
2159 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2160 iterate_over_lwps, not_stopped_callback,
2161 resume_stopped_resumed_lwps, count_events_callback,
2162 select_singlestep_lwp_callback, select_event_lwp_callback,
2163 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2164 suspend_and_send_sigstop_callback, wait_for_sigstop,
2165 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2166 lwp_running, linux_set_resume_request, resume_status_pending_p,
2167 need_step_over_p, start_step_over, linux_resume_one_thread,
2168 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2169 reset_lwp_ptrace_options_callback): Update.
2170 * linux-mips-low.c (update_watch_registers_callback): Update.
2171 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2172 Update.
2173 (free_register_cache_thread_one): Remove.
2174 (regcache_release): Update.
2175 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2176 handle_qxfer_threads_worker): Update.
2177 (handle_query): Update, use list iterator.
2178 (visit_actioned_threads, handle_pending_status,
2179 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2180 clear_pending_status_callback, set_pending_status_callback,
2181 find_status_pending_thread_callback, handle_status,
2182 process_serial_event): Update.
2183 * target.c (thread_search_callback): Update.
2184 * thread-db.c (thread_db_get_tls_address): Update.
2185 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2186 Update.
2187 * win32-i386-low.c (update_debug_registers_callback): Update.
2188 * win32-low.c (delete_thread_info, child_delete_thread,
2189 continue_one_thread, suspend_one_thread,
2190 get_child_debug_event): Adjust.
2191
9179355e
SM
21922017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2193
2194 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2195 * inferiors.h: Include <list>.
2196 (struct process_info) <entry>: Remove field.
2197 <pid>: New field.
2198 (pid_of): Change macro to function.
2199 (ptid_of, lwpid_of): Remove macro.
2200 (all_processes): Change type to std::list<process_info *>.
2201 (ALL_PROCESSES): Remove macro.
2202 (for_each_process, find_process): New function.
2203 * inferiors.c (all_processes): Change type to
2204 std::list<process_info *>.
2205 (find_thread_process): Adjust.
2206 (add_process): Likewise.
2207 (remove_process): Likewise.
2208 (find_process_pid): Likewise.
2209 (get_first_process): Likewise.
2210 (started_inferior_callback): Remove.
2211 (have_started_inferiors_p): Adjust.
2212 (attached_inferior_callback): Remove.
2213 (have_attached_inferiors_p): Adjust.
2214 * linux-low.c (check_zombie_leaders): Likewise.
2215 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2216 (x86_linux_update_xmltarget): Adjust.
2217 * server.c (handle_query): Likewise.
2218 (gdb_reattached_process): Remove.
2219 (handle_status): Adjust.
2220 (kill_inferior_callback): Likewise.
2221 (detach_or_kill_inferior): Remove.
2222 (print_started_pid): Likewise.
2223 (print_attached_pid): Likewise.
2224 (detach_or_kill_for_exit): Update.
2225 (process_serial_event): Likewise.
2226 * linux-arm-low.c (arm_new_fork): Likewise.
2227
c9cb8905
SM
22282017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2229
2230 * dll.h: Include <list>.
2231 (struct dll_info): Add constructor.
2232 <entry>: Remove field.
2233 (all_dlls): Change type to std::list<dll_info>.
2234 * dll.c: Include <algorithm>.
2235 (get_dll): Remove macro.
2236 (all_dlls): Change type to std::list<dll_info *>.
2237 (free_one_dll): Remove.
2238 (match_dll): Likewise.
2239 (loaded_dll): Adjust.
2240 (unloaded_dll): Adjust to all_dlls type change, use
2241 std::find_if. Inline code from match_dll.
2242 (clear_dlls): Adjust to all_dlls type change.
2243 * server.c (emit_dll_description): Remove.
2244 (handle_qxfer_libraries): Adjust to all_dlls type change,
2245 integrate emit_dll_description's functionality.
2246
04ec7890
SM
22472017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2248
2249 * linux-low.h (struct linux_target_ops) <delete_process>: New
2250 field.
2251 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2252 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2253 (struct linux_target_ops): Add delete_process callback.
2254 * linux-arm-low.c (arm_delete_process): New.
2255 (struct linux_target_ops): Add delete_process callback.
2256 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2257 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2258 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2259 * linux-mips-low.c (mips_linux_delete_process): New.
2260 (struct linux_target_ops): Add delete_process callback.
2261 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2262 * linux-s390-low.c (struct linux_target_ops): Likewise.
2263 * linux-sh-low.c (struct linux_target_ops): Likewise.
2264 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2265 * linux-tile-low.c (struct linux_target_ops): Likewise.
2266 * linux-x86-low.c (x86_linux_delete_process): New.
2267 (struct linux_target_ops): Add delete_process callback.
2268 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2269
466eecee
SM
22702017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2271
2272 * linux-aarch64-low.c (the_low_target): Add thread delete
2273 callback.
2274 * linux-arm-low.c (arm_delete_thread): New function.
2275 (the_low_target): Add thread delete callback.
2276 * linux-bfin-low.c (the_low_target): Likewise.
2277 * linux-crisv32-low.c (the_low_target): Likewise.
2278 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2279 set.
2280 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2281 field.
2282 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2283 * linux-mips-low.c (mips_linux_delete_thread): New function.
2284 (the_low_target): Add thread delete callback.
2285 * linux-ppc-low.c (the_low_target): Likewise.
2286 * linux-s390-low.c (the_low_target): Likewise.
2287 * linux-sh-low.c (the_low_target): Likewise.
2288 * linux-tic6x-low.c (the_low_target): Likewise.
2289 * linux-tile-low.c (the_low_target): Likewise.
2290 * linux-x86-low.c (the_low_target): Likewise.
2291 * linux-xtensa-low.c (the_low_target): Likewise.
2292
b79f7801
YZ
22932017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2294
2295 * win32-low.c: Include "common-inferior.h".
2296
bc3b087d
SDJ
22972017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2298
2299 * inferiors.c (set_inferior_cwd): New function.
2300 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2301 (handle_query): Inform that QSetWorkingDir is supported.
2302 * win32-low.c (create_process): Pass the inferior's cwd to
2303 CreateProcess.
2304
d092c5a2
SDJ
23052017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2306
2307 * inferiors.c (current_inferior_cwd): New global variable.
2308 (get_inferior_cwd): New function.
2309 * inferiors.h (struct process_info) <cwd>: New field.
2310
7da0a886
SDJ
23112017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2312
2313 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2314 (OBS): Add gdb_tilde_expand.o.
2315
289a6840
SM
23162017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2317
2318 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2319 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2320
256642e8
PA
23212017-09-29 Pedro Alves <palves@redhat.com>
2322
2323 * ax.c (gdb_parse_agent_expr): Constify.
2324 * ax.h (gdb_parse_agent_expr): Constify.
2325 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2326 Constify.
2327 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2328 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2329 * remote-utils.h (read_ptid): Constify.
2330 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2331 (process_point_options, process_serial_event): Constify.
2332 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2333 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2334 (cmd_qtbuffer): Constify.
2335
5b9ca4d4
PA
23362017-09-29 Pedro Alves <palves@redhat.com>
2337
2338 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2339 fails.
2340
94c207e0
PA
23412017-09-29 Pedro Alves <palves@redhat.com>
2342
2343 * linux-low.c (handle_extended_wait): Pass parent thread instead
2344 of process to thread_db_notice_clone.
2345 * linux-low.h (thread_db_notice_clone): Replace parent process
2346 parameter with parent thread parameter.
2347 * thread-db.c (find_one_thread): Add comment.
2348 (thread_db_notice_clone): Replace parent process parameter with
2349 parent thread parameter. Temporarily switch to the parent thread.
2350
75352e28
SDJ
23512017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2352
2353 * gdbthread.h: Include "common-gdbthread.h".
2354 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2355 "if" when validating the ptid.
2356 * remote-utils.c: Include "gdbthread.h".
2357 (prepare_resume_reply): Use "switch_to_thread".
2358 * target.c (done_accessing_memory): Likewise.
2359
ad339634
AA
23602017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2361
2362 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2363 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2364 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2365 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2366 s390x-gs-linux64-ipa.o to ipa_obj.
2367 * linux-s390-low.c (HWCAP_S390_GS): New define.
2368 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2369 New functions.
2370 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2371 (s390_arch_setup): Check for guarded-storage support and choose
2372 appropriate tdesc.
2373 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2374 init_registers_s390x_gs_linux64.
2375 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2376 enum value.
2377 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2378 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2379
cc4d742f
SM
23802017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2381
2382 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2383
f6327dcb
KB
23842017-09-21 Kevin Buettner <kevinb@redhat.com>
2385
2386 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2387 (thread_db_thread_handle): Declare.
2388 * linux-low.c (linux_target_ops): Initialize thread_handle.
2389 * server.c (handle_qxfer_threads_worker): Add support for
2390 "handle" attribute.
2391 * target.h (struct target_ops): Add new function pointer,
2392 thread_handle.
2393 (target_thread_handle): Define.
2394 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2395 field in lwp.
2396 (thread_db_thread_handle): New function.
2397
86299109
KB
23982017-09-21 Kevin Buettner <kevinb@redhat.com>
2399
2400 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2401 * linux-low.h (thread_db_notice_clone): Declare.
2402 * thread-db.c (thread_db_notice_clone): New function.
2403
f557a88a
PA
24042017-09-21 Pedro Alves <palves@redhat.com>
2405
2406 * server.c (gdb_read_memory, handle_status, process_serial_event)
2407 (handle_serial_event, handle_target_event): Adjust to
2408 set_desired_thread prototype change.
2409 * target.c (set_desired_thread): Remove 'use_general' parameter
2410 and adjust.
2411 * target.h (set_desired_thread): Remove 'use_general' parameter.
2412
223ffa71
TT
24132017-09-20 Tom Tromey <tom@tromey.com>
2414
2415 * target.c (target_terminal::terminal_state): Define.
2416 (target_terminal::init): Rename from target_terminal_init.
2417 (target_terminal::inferior): Rename from
2418 target_terminal_inferior.
2419 (target_terminal::ours): Rename from target_terminal_ours.
2420 (target_terminal::ours_for_output, target_terminal::info): New.
2421
04fd3ba9
SM
24222017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2423
2424 * server.c (accumulate_file_name_length): Remove.
2425 (emit_dll_description): Adjust to std::string change.
2426 (handle_qxfer_libraries): Use std::string to hold document.
2427
5e187554
SM
24282017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2429
2430 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2431 return type of xml_escape_text.
2432 * server.c (emit_dll_description): Likewise.
2433
1526853e
SM
24342017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2435
2436 * server.c (captured_main): Accept argument for --selftest.
2437 Update run_tests call.
2438 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2439 when registering selftests.
2440
c4dfafab
SDJ
24412017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2442
2443 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2444 instead of "VEC" for "target_desc.reg_defs".
2445 (regcache_cpy): Likewise.
2446 (registers_to_string): Likewise.
2447 (registers_from_string): Likewise.
2448 (find_regno): Likewise.
2449 (supply_regblock): Likewise.
2450 (regcache_raw_read_unsigned): Likewise.
2451 * tdesc.c (init_target_desc): Likewise.
2452 (tdesc_create_reg): Likewise.
2453 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2454 (struct target_desc) <reg_defs>: Convert to "std::vector".
2455 (target_desc): Do not initialize "reg_defs".
2456 (~target_desc): Update code to use "std::vector" instead of "VEC"
2457 for "target_desc.reg_defs".
2458 (operator==): Likewise.
2459
124aceb4
SM
24602017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2461
2462 * inferiors.h (thread_to_gdb_id): Remove.
2463 * inferiors.c (thread_to_gdb_id): Remove.
2464 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2465 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2466 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2467 Likewise.
2468 * nto-low.c (nto_fetch_registers, nto_store_registers,
2469 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2470
96cde54f
SM
24712017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2472
2473 * inferiors.h (gdb_id_to_thread_id): Remove.
2474 * inferiors.c (gdb_id_to_thread_id): Remove.
2475 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2476 removal. Move pid declaration closer to where it's used.
2477
e8ca139e
SM
24782017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2479
2480 * server.c (handle_detach): New function.
2481 (process_serial_event): Move code out, call handle_detach.
2482
f8a4e119
SM
24832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2484
2485 * server.c (require_running): Rename to ...
2486 (require_running_or_return): ... this ...
2487 (require_running_or_break): ... and this.
2488 (handle_query, process_serial_event): Adjust.
2489
0eb0a407
SM
24902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2491
2492 * linux-low.c (linux_set_resume_request): Remove unused
2493 variables.
2494
785922a5
SM
24952017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2496
2497 * server.c (first_thread_of): Remove.
2498 (process_serial_event): Replace usage of first_thread_of with
2499 find_any_thread_of_pid.
2500 * tracepoint.c (same_process_p): Remove.
2501 (gdb_agent_about_to_close): Replace usage of same_process_p with
2502 find_any_thread_of_pid.
2503 * linux-x86-low.c (same_process_callback): Remove.
2504 (x86_arch_setup_process_callback): Replace usage of
2505 same_process_callback with find_any_thread_of_pid.
2506 * thread-db.c (any_thread_of): Remove.
2507 (switch_to_process): Replace usage of any_thread_of with
2508 find_any_thread_of_pid.
2509 * inferiors.c (thread_pid_matches_callback): Remove.
2510 (find_thread_process): Adjust to use find_any_thread_of_pid.
2511
a059f00c
SDJ
25122017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2513
2514 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2515 with "!VEC_empty".
a059f00c 2516
cc397f3a
SDJ
25172017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2518
2519 * linux-low.c (handle_extended_wait): Use
2520 "allocate_target_description" instead of "XNEW".
2521 * linux-x86-low.c (initialize_low_arch): Likewise.
2522
22916b07
YQ
25232017-09-05 Yao Qi <yao.qi@linaro.org>
2524
2525 * configure.srv (srv_i386_regobj): Remove.
2526 (srv_amd64_regobj): Remove.
2527 (srv_regobj): Set it to "" for x86 non-linux targets.
2528 * linux-x86-tdesc.c (i386_linux_read_description):
2529 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2530 (init_registers_i386): Remove the declaration.
2531 (tdesc_i386): Remove the declaration.
2532 (lynx_i386_arch_setup): Call i386_create_target_description.
2533 * nto-x86-low.c: Likewise.
2534 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2535 [!__x86_64__]: include arch/i386.h.
2536 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2537
38602d55
YQ
25382017-09-05 Yao Qi <yao.qi@linaro.org>
2539
2540 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2541 i386/amd64-XXX-linux from it.
2542
44b886ff
YQ
25432017-09-05 Yao Qi <yao.qi@linaro.org>
2544
2545 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2546 false.
2547 (ipa_amd64_linux_regobj): Remove.
2548 (ipa_x32_linux_regobj): Remove.
2549
b4570e4b
YQ
25502017-09-05 Yao Qi <yao.qi@linaro.org>
2551
2552 * Makefile.in (arch-amd64.o): New rule.
2553 * configure.srv: Append arch-amd64.o.
2554 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2555 (get_ipa_tdesc): Call amd64_linux_read_description.
2556 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2557 and init_registers_amd64_XXX.
2558 * linux-x86-low.c (x86_linux_read_description): Call
2559 amd64_linux_read_description.
2560 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2561 (initialize_low_arch): Don't call init_registers_x32_XXX and
2562 init_registers_amd64_XXX.
2563 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2564 and tdesc_amd64_XXX.
2565 [__x86_64__] (amd64_tdesc_test): New function.
2566 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2567 and init_registers_amd64_XXX.
2568 * linux-x86-tdesc.c: Include arch/amd64.h.
2569 (xcr0_to_tdesc_idx): New function.
2570 (i386_linux_read_description): New function.
2571 (amd64_get_ipa_tdesc_idx): New function.
2572 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2573 (amd64_get_ipa_tdesc): Declare.
2574
d1f28ea2
YQ
25752017-09-05 Yao Qi <yao.qi@linaro.org>
2576
2577 * configure.srv (srv_i386_linux_xmlfiles): Remove
2578 i386/i386-XXX-linux.xml from it.
2579
25a93583
YQ
25802017-09-05 Yao Qi <yao.qi@linaro.org>
2581
2582 * configure.srv: Set srv_i386_linux_regobj empty if $development
2583 is false.
2584 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2585 initialize_low_tdesc.
2586 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2587 with #if initialize_low_tdesc.
2588 * linux-x86-tdesc-selftest.c: New file.
2589 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2590
5f035c07
YQ
25912017-09-05 Yao Qi <yao.qi@linaro.org>
2592
2593 * Makefile.in (arch-i386.o): New rule.
2594 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2595 (x86_64-*-linux*): Likewise.
2596 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2597 include arch/i386.h.
2598 (i386_linux_read_description): Remove code and call
2599 i386_create_target_description.
2600 * tdesc.c (allocate_target_description): New function.
2601 * tdesc.h (set_tdesc_architecture): Remove declaration.
2602 (set_tdesc_osabi): Likewise.
2603
0abe8a89
YQ
26042017-09-05 Yao Qi <yao.qi@linaro.org>
2605
2606 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2607 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2608 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2609 .xmltarget.
2610 * server.c (get_features_xml): Call tdesc_get_features_xml.
2611 * tdesc.c (set_tdesc_architecture): New function.
2612 (set_tdesc_osabi): New function.
2613 (tdesc_get_features_xml): New function.
2614 (tdesc_create_feature): Add an argument.
2615 * tdesc.h (struct target_desc) <features>: New field.
2616 <arch, osabi>: New field.
2617 (~target_desc): xfree features, arch, and osabi.
2618 (target_desc::oerator==): Don't compare .xmltarget.
2619 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2620 (set_tdesc_osabi): Likewise.
2621 (tdesc_get_features_xml): Likewise.
2622
0a188386
YQ
26232017-09-05 Yao Qi <yao.qi@linaro.org>
2624
2625 * linux-x86-tdesc.c: Include selftest.h.
2626 (i386_tdesc_test): New function.
2627 (initialize_low_tdesc): Call selftests::register_test.
2628 * tdesc.h: Include regdef.h.
2629 (target_desc): Override operator == and !=.
2630
f49ff000
YQ
26312017-09-05 Yao Qi <yao.qi@linaro.org>
2632
2633 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2634 (ipa_obj): Likewise.
2635 * linux-i386-ipa.c: Include common/x86-xstate.h
2636 (get_ipa_tdesc): Call i386_linux_read_description.
2637 (initialize_low_tracepoint): Don't call init_registers_XXX
2638 functions, call initialize_low_tdesc instead.
2639 * linux-x86-low.c (x86_linux_read_description): Call
2640 i386_linux_read_description.
2641 (initialize_low_arch): Don't call init_registers_i386_XXX
2642 functions, call initialize_low_tdesc.
2643 * linux-x86-tdesc.c: New file.
2644 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2645 (i386_get_ipa_tdesc_idx): Declare.
2646 (i386_get_ipa_tdesc): Declare.
2647 (initialize_low_tdesc): Declare.
2648
2b68ef2f
YQ
26492017-09-05 Yao Qi <yao.qi@linaro.org>
2650
2651 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2652 instead of 0.
2653
f7000548
YQ
26542017-09-05 Yao Qi <yao.qi@linaro.org>
2655
2656 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2657 * regcache.c (get_thread_regcache): Use VEC_length.
2658 (init_register_cache): Likewise.
2659 (regcache_cpy): Likewise.
2660 (registers_to_string): Iterate reg_defs via VEC_iterate.
2661 (find_regno): Likewise.
2662 (find_register_by_number): Use VEC_index.
2663 (register_size): Call find_register_by_number.
2664 (register_data): Call find_register_by_number.
2665 (supply_regblock): Use VEC_length.
2666 (regcache_raw_read_unsigned): Likewise.
2667 * tdesc.c (init_target_desc): Iterate reg_defs via
2668 VEC_iterate.
2669 (default_description): Update initializer.
2670 (copy_target_description): Don't update field num_registers.
2671 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2672 <num_registers>: Remove.
2673
50a421ac
SM
26742017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2675
2676 * Makefile.in (.SECONDARY): Define target.
2677
23fdd69e
SM
26782017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2679
2680 * linux-low.c (linux_wait_1): Adjust.
2681 * server.c (queue_stop_reply_callback): Adjust.
2682
0a2dde4a
SDJ
26832017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2684
2685 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2686 QEnvironmentUnset and QEnvironmentReset packets.
2687 (handle_query): Inform remote that QEnvironmentHexEncoded,
2688 QEnvironmentUnset and QEnvironmentReset are supported.
2689
6afd337d
SM
26902017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2691
2692 * inferiors.h (inferior_target_data): Rename to ...
2693 (thread_target_data): ... this.
2694 (inferior_regcache_data): Rename to ...
2695 (thread_regcache_data): ... this.
2696 (set_inferior_regcache_data): Rename to ...
2697 (set_thread_regcache_data): ... this.
2698 * inferiors.c (inferior_target_data): Rename to ...
2699 (thread_target_data): ... this.
2700 (inferior_regcache_data): Rename to ...
2701 (thread_regcache_data): ... this.
2702 (set_inferior_regcache_data): Rename to ...
2703 (set_thread_regcache_data): ... this.
2704 (free_one_thread): Update.
2705 * linux-low.h (get_thread_lwp): Update.
2706 * regcache.c (get_thread_regcache): Update.
2707 (regcache_invalidate_thread): Update.
2708 (free_register_cache_thread): Update.
2709 * win32-i386-low.c (update_debug_registers_callback): Update.
2710 (win32_get_current_dr): Update.
2711 * win32-low.c (thread_rec): Update.
2712 (delete_thread_info): Update.
2713 (continue_one_thread): Update.
2714 (suspend_one_thread): Update.
2715
a160cc46
SM
27162017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2717
2718 * inferiors.c (set_inferior_target_data): Remove.
2719 * inferiors.h (set_inferior_target_data): Remove.
2720
6d580b63
YQ
27212017-08-18 Yao Qi <yao.qi@linaro.org>
2722
2723 * Makefile.in (OBS): Add selftest.o.
2724 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2725 * configure, config.in: Re-generated.
2726 * server.c: Include common/sefltest.h.
2727 (captured_main): Handle option --selftest.
2728
f5a29eb0
YQ
27292017-08-09 Yao Qi <yao.qi@linaro.org>
2730
2731 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2732 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2733 i386-avx-mpx.o and i386-mmx.o.
2734 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2735 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2736 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2737 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2738 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2739 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2740 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2741 i386/amd64-avx-mpx.xml.
2742
57757c2f
YQ
27432017-08-09 Yao Qi <yao.qi@linaro.org>
2744
2745 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2746 and x32-avx-avx512.o.
2747 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2748 i386/x32-avx-avx512.xml.
2749
229d26fc
SM
27502017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2751
2752 * tracepoint.h (enum class fast_tpoint_collect_result): New
2753 enumeration.
2754 (fast_tracepoint_collecting): Change return type to
2755 fast_tpoint_collect_result.
2756 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2757 * linux-low.h: Include tracepoint.h.
2758 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2759 fast_tpoint_collect_result.
2760 * linux-low.c (handle_tracepoints): Adjust.
2761 (linux_fast_tracepoint_collecting): Change return type to
2762 fast_tpoint_collect_result.
2763 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2764 linux_wait_1, stuck_in_jump_pad_callback,
2765 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2766 proceed_one_lwp): Adjust to type change.
2767
2e1e43e1
YQ
27682017-07-10 Yao Qi <yao.qi@linaro.org>
2769
2770 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2771
adc764e7
YQ
27722017-06-29 Yao Qi <yao.qi@linaro.org>
2773
2774 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2775 Remove.
2776 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2777
a206891a
SM
27782017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2779
2780 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2781
9a6c7d9c
SDJ
27822017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2783
2784 * linux-low.c (linux_create_inferior): Adjust code to access the
2785 environment information via 'gdb_environ' class.
2786 * lynx-low.c (lynx_create_inferior): Likewise.
2787 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2788 (get_environ): Return a pointer to 'our_environ'.
2789 (captured_main): Initialize 'our_environ'.
2790 * server.h (get_environ): Adjust prototype.
2791 * spu-low.c (spu_create_inferior): Adjust code to access the
2792 environment information via 'gdb_environ' class.
2793
ae3e2ccf
SM
27942017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2795
2796 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2797 usage of "register" keyword.
2798
3e019bdc
SM
27992017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2800
2801 * configure: Re-generate.
2802
8465943a
SM
28032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2804
2805 * configure: Re-generate.
2806
cf0dd6f0
SM
28072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2808
2809 * Makefile.in (COMPILE.pre): Add "-x c++".
2810
9845682b
SDJ
28112017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2812
2813 * fork-child.c: Conditionally include <signal.h>.
2814
aefd8b33
SDJ
28152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2816
2817 * server.c (handle_general_set): Handle new packet
2818 "QStartupWithShell".
2819 (handle_query): Add "QStartupWithShell" to the list of supported
2820 packets.
2821 (gdbserver_usage): Add help text explaining the
2822 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2823 options.
2824 (captured_main): Recognize and act upon the presence of the new
2825 CLI options.
2826
2090129c
SDJ
28272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2828 Pedro Alves <palves@redhat.com>
2829
2830 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2831 * configure: Regenerate.
2832 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2833 "fork-inferior.o".
2834 (i[34567]86-*-lynxos*): Likewise.
2835 (spu*-*-*): Likewise.
2836 * fork-child.c: New file.
2837 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2838 and "environ.h".
2839 (linux_ptrace_fun): New function.
2840 (linux_create_inferior): Adjust function prototype to reflect
2841 change on "target.h". Adjust function code to use
2842 "fork_inferior".
2843 (linux_request_interrupt): Delete "signal_pid".
2844 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2845 (lynx_ptrace_fun): New function.
2846 (lynx_create_inferior): Adjust function prototype to reflect
2847 change on "target.h". Adjust function code to use
2848 "fork_inferior".
2849 * nto-low.c (nto_create_inferior): Adjust function prototype and
2850 code to reflect change on "target.h". Update comments.
2851 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2852 "common-terminal.h" and "environ.h".
2853 (terminal_fd): Moved to fork-child.c.
2854 (old_foreground_pgrp): Likewise.
2855 (restore_old_foreground_pgrp): Likewise.
2856 (last_status): Make it global.
2857 (last_ptid): Likewise.
2858 (our_environ): New variable.
2859 (startup_with_shell): Likewise.
2860 (program_name): Likewise.
2861 (program_argv): Rename to...
2862 (program_args): ...this.
2863 (wrapper_argv): New variable.
2864 (start_inferior): Delete function.
2865 (get_exec_wrapper): New function.
2866 (get_exec_file): Likewise.
2867 (get_environ): Likewise.
2868 (prefork_hook): Likewise.
2869 (post_fork_inferior): Likewise.
2870 (postfork_hook): Likewise.
2871 (postfork_child_hook): Likewise.
2872 (handle_v_run): Update code to deal with arguments coming from the
2873 remote host. Update calls from "start_inferior" to
2874 "create_inferior".
2875 (captured_main): Likewise. Initialize environment variable. Call
2876 "have_job_control".
2877 * server.h (post_fork_inferior): New prototype.
2878 (get_environ): Likewise.
2879 (last_status): Declare.
2880 (last_ptid): Likewise.
2881 (signal_pid): Likewise.
2882 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2883 (spu_ptrace_fun): New function.
2884 (spu_create_inferior): Adjust function prototype to reflect change
2885 on "target.h". Adjust function code to use "fork_inferior".
2886 * target.c (target_terminal_init): New function.
2887 (target_terminal_inferior): Likewise.
2888 (target_terminal_ours): Likewise.
2889 * target.h: Include <vector>.
2890 (struct target_ops) <create_inferior>: Update prototype.
2891 (create_inferior): Update macro.
2892 * utils.c (gdb_flush_out_err): New function.
2893 * win32-low.c (win32_create_inferior): Adjust function prototype
2894 and code to reflect change on "target.h".
2895
043a4934
SDJ
28962017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2897
2898 * inferiors.c (switch_to_thread): New function.
2899
15652511
SDJ
29002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2901
2902 * Makefile.in (SFILE): Add "common/job-control.c".
2903 (OBS): Add "job-control.o".
2904
21ea5acd
SDJ
29052017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2906
2907 * Makefile: Remove "@host_makefile_frag@".
2908
e13cb306
PA
29092017-05-05 Pedro Alves <palves@redhat.com>
2910
2911 * configure: Regenerate.
2912
c94fee56
SDJ
29132017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2914
2915 * configure: Regenerate.
2916
a0ff9e1a
SM
29172017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2918
2919 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2920 software_single_step change of return type to
2921 std::vector<CORE_ADDR>.
2922 * linux-low.c (install_software_single_step_breakpoints):
2923 Likewise.
2924 * linux-low.h (install_software_single_step_breakpoints):
2925 Likewise.
2926
be628ab8
SDJ
29272017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2928
2929 * remote-utils.c: Include "gdb_termios.h" instead of
2930 "terminal.h".
2931 * terminal.h: Delete file.
2932
7c5ded6a
SDJ
29332017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2934
2935 * server.c: Include <vector>.
2936 <program_argv, wrapper_argv>: Convert to std::vector.
2937 (start_inferior): Rewrite function to use C++.
2938 (handle_v_run): Likewise. Update code that calculates the argv
2939 based on the vRun packet; use C++.
2940 (captured_main): Likewise.
2941
436252de
SM
29422017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2943
2944 * server.c (handle_v_cont): Initialize thread_resume::thread
2945 with null_ptid.
2946
9bf2a700
PA
29472017-04-05 Pedro Alves <palves@redhat.com>
2948
2949 * configure: Regenerate.
2950
a121b7c1
PA
29512017-04-05 Pedro Alves <palves@redhat.com>
2952
2953 * gdbreplay.c (sync_error): Constify.
2954 * linux-x86-low.c (push_opcode): Constify.
2955
21c8a587
PA
29562017-04-05 Pedro Alves <palves@redhat.com>
2957
2958 * win32-low.c (get_child_debug_event)
2959 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2960 Report TARGET_WAITKIND_SPURIOUS instead.
2961
fb32b4f7
PA
29622017-04-05 Pedro Alves <palves@redhat.com>
2963
e79be6e5
SM
2964 * remote-utils.c (remote_prepare, remote_open): Constify.
2965 * remote-utils.h (remote_prepare, remote_open): Constify.
2966 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2967
65dd1e59
SM
29682017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2969
2970 * Makefile.in (clean): Clear .deps.
2971
8fa5b777
SM
29722017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2973
2974 * .gitignore: Remove generated files, replace with wildcard.
2975 * (clean): Replace removal of generated files with wildcard.
2976 (version.c): Replace with...
2977 (version-generated.c): ...this.
2978 (xml-builtin.c): Replace with...
2979 (xml-builtin-generated.c): ...this.
2980 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2981 (%.c: *regformats*): Replace with...
2982 (%-generated.c: *regformats*): ...this.
2983
a12e714b
MF
29842017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2985
2986 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2987 (xtensa_fill_gregset): Call collect_register_by_name for
2988 threadptr register.
2989 (xtensa_store_gregset): Call supply_register_by_name for
2990 threadptr register.
2991
1a09b50a
MF
29922017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2993
2994 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2995 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2996 (xtensa_store_gregset): Call supply_register for all registers in
2997 a0_regnum..a0_regnum + C0_NREGS range.
2998
1a01e7c6
SM
29992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3000
3001 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3002 (ax-ipa.o: ax.c): Remove.
3003 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3004 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3005 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3006 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3007 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3008
36bc18a8
SM
30092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3010
3011 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3012 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3013 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3014 (errors-ipa.o: ../common/errors.c): Remove.
3015 (format-ipa.o: ../common/format.c): Remove.
3016 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3017
a8ebe3d5
SM
30182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3019
3020 * Makefile.in (%-ipa.o: %.c): New rule.
3021 (tracepoint-ipa.o: tracepoint.c): Remove.
3022 (utils-ipa.o: utils.c): Remove.
3023 (remote-utils-ipa.o: remote-utils.c): Remove.
3024 (regcache-ipa.o: regcache.c): Remove.
3025 (i386-linux-ipa.o: i386-linux.c): Remove.
3026 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3027 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3028 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3029 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3030 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3031 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3032 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3033 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3034 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3035 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3036 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3037 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3038 (aarch64-ipa.o: aarch64.c): Remove.
3039 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3040 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3041 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3042 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3043 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3044 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3045 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3046 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3047 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3048 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3049 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3050 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3051 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3052 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3053 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3054 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3055 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3056 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3057 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3058 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3059 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3060 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3061 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3062 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3063 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3064 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3065 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3066 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3067 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3068 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3069 (tdesc-ipa.o: tdesc.c): Remove.
3070 (x32-linux-ipa.o: x32-linux.c): Remove.
3071 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3072 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3073
50cfacb7
SM
30742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3075
3076 * Makefile.in (%.o: ../arch/%.c): New rule.
3077 (arm.o: ../arch/arm.c): Remove.
3078 (arm-linux.o: ../arch/arm-linux.c): Remove.
3079 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3080 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3081
c5a22423
SM
30822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3083
3084 * Makefile.in (%.o: ../nat/%.c): New rule.
3085 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3086 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3087 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3088 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3089 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3090 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3091 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3092 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3093 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3094 (linux-personality.o: ../nat/linux-personality.c): Remove.
3095 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3096 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3097 (x86-linux.o: ../nat/x86-linux.c): Remove.
3098 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3099 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3100
6bda016b
SM
31012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3102
3103 * Makefile.in (%.o: ../common/%.c): New rule.
3104 (signals.o: ../common/signals.c): Remove.
3105 (print-utils.o: ../common/print-utils.c): Remove.
3106 (rsp-low.o: ../common/rsp-low.c): Remove.
3107 (common-utils.o: ../common/common-utils.c): Remove.
3108 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3109 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3110 (vec.o: ../common/vec.c): Remove.
3111 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3112 (xml-utils.o: ../common/xml-utils.c): Remove.
3113 (ptid.o: ../common/ptid.c): Remove.
3114 (buffer.o: ../common/buffer.c): Remove.
3115 (format.o: ../common/format.c): Remove.
3116 (filestuff.o: ../common/filestuff.c): Remove.
3117 (agent.o: ../common/agent.c): Remove.
3118 (errors.o: ../common/errors.c): Remove.
3119 (environ.o: ../common/environ.c): Remove.
3120 (common-debug.o: ../common/common-debug.c): Remove.
3121 (cleanups.o: ../common/cleanups.c): Remove.
3122 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3123 (fileio.o: ../common/fileio.c): Remove.
3124 (common-regcache.o: ../common/common-regcache.c): Remove.
3125 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3126 (new-op.o: ../common/new-op.c): Remove.
3127 (btrace-common.o: ../common/btrace-common.c): Remove.
3128
21122961
SM
31292017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3130
3131 * Makefile.in (%.o: ../target/%.c): New rule.
3132 (waitstatus.o: ../target/waitstatus.c): Remove.
3133
c362e621
SM
31342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3135
3136 * Makefile.in
3137 (%.c: ../regformats/%.dat,
3138 (%.c: ../regformats/arm/%.dat,
3139 (%.c: ../regformats/i386/%.dat,
3140 (%.c: ../regformats/rs6000/%.dat): New rules.
3141 (aarch64.c): Remove.
3142 (reg-arm.c): Remove.
3143 (arm-with-iwmmxt.c): Remove.
3144 (arm-with-vfpv2.c): Remove.
3145 (arm-with-vfpv3.c): Remove.
3146 (arm-with-neon.c): Remove.
3147 (reg-bfin.c): Remove.
3148 (reg-cris.c): Remove.
3149 (reg-crisv32.c): Remove.
3150 (i386.c): Remove.
3151 (i386-linux.c): Remove.
3152 (i386-avx.c): Remove.
3153 (i386-avx-linux.c): Remove.
3154 (i386-avx-avx512.c): Remove.
3155 (i386-avx-avx512-linux.c): Remove.
3156 (i386-mpx.c): Remove.
3157 (i386-mpx-linux.c): Remove.
3158 (i386-avx-mpx-avx512-pku.c): Remove.
3159 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3160 (i386-avx-mpx.c): Remove.
3161 (i386-avx-mpx-linux.c): Remove.
3162 (i386-mmx.c): Remove.
3163 (i386-mmx-linux.c): Remove.
3164 (reg-ia64.c): Remove.
3165 (reg-m32r.c): Remove.
3166 (reg-m68k.c): Remove.
3167 (reg-cf.c): Remove.
3168 (mips-linux.c): Remove.
3169 (mips-dsp-linux.c): Remove.
3170 (mips64-linux.c): Remove.
3171 (mips64-dsp-linux.c): Remove.
3172 (nios2-linux.c): Remove.
3173 (powerpc-32.c): Remove.
3174 (powerpc-32l.c): Remove.
3175 (powerpc-altivec32l.c): Remove.
3176 (powerpc-cell32l.c): Remove.
3177 (powerpc-vsx32l.c): Remove.
3178 (powerpc-isa205-32l.c): Remove.
3179 (powerpc-isa205-altivec32l.c): Remove.
3180 (powerpc-isa205-vsx32l.c): Remove.
3181 (powerpc-e500l.c): Remove.
3182 (powerpc-64l.c): Remove.
3183 (powerpc-altivec64l.c): Remove.
3184 (powerpc-cell64l.c): Remove.
3185 (powerpc-vsx64l.c): Remove.
3186 (powerpc-isa205-64l.c): Remove.
3187 (powerpc-isa205-altivec64l.c): Remove.
3188 (powerpc-isa205-vsx64l.c): Remove.
3189 (s390-linux32.c): Remove.
3190 (s390-linux32v1.c): Remove.
3191 (s390-linux32v2.c): Remove.
3192 (s390-linux64.c): Remove.
3193 (s390-linux64v1.c): Remove.
3194 (s390-linux64v2.c): Remove.
3195 (s390-te-linux64.c): Remove.
3196 (s390-vx-linux64.c): Remove.
3197 (s390-tevx-linux64.c): Remove.
3198 (s390x-linux64.c): Remove.
3199 (s390x-linux64v1.c): Remove.
3200 (s390x-linux64v2.c): Remove.
3201 (s390x-te-linux64.c): Remove.
3202 (s390x-vx-linux64.c): Remove.
3203 (s390x-tevx-linux64.c): Remove.
3204 (tic6x-c64xp-linux.c): Remove.
3205 (tic6x-c64x-linux.c): Remove.
3206 (tic6x-c62x-linux.c): Remove.
3207 (reg-sh.c): Remove.
3208 (reg-sparc64.c): Remove.
3209 (reg-spu.c): Remove.
3210 (amd64.c): Remove.
3211 (amd64-linux.c): Remove.
3212 (amd64-avx.c): Remove.
3213 (amd64-avx-linux.c): Remove.
3214 (amd64-avx-avx512.c): Remove.
3215 (amd64-avx-avx512-linux.c): Remove.
3216 (amd64-mpx.c): Remove.
3217 (amd64-mpx-linux.c): Remove.
3218 (amd64-avx-mpx-avx512-pku.c): Remove.
3219 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3220 (amd64-avx-mpx.c): Remove.
3221 (amd64-avx-mpx-linux.c): Remove.
3222 (x32.c): Remove.
3223 (x32-linux.c): Remove.
3224 (x32-avx.c): Remove.
3225 (x32-avx-linux.c): Remove.
3226 (x32-avx-avx512.c): Remove.
3227 (x32-avx-avx512-linux.c): Remove.
3228 (reg-xtensa.c): Remove.
3229 (reg-tilegx.c): Remove.
3230 (reg-tilegx32.c): Remove.
3231
1672e0d9
SDJ
32322017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3233
3234 * Makefile.in (SFILES): Add "common/environ.c".
3235 (OBJS): Add "common/environ.h".
3236
239b6d10
WT
32372017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3238
3239 * configure.ac: Check if the fs_base and gs_base members of
3240 `struct user_regs_struct' exist.
3241 * config.in: Regenerated.
3242 * configure: Likewise.
3243
694b382c
AT
32442017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3245
3246 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3247 target_read_memory.
3248 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3249 (get_next_pcs_syscall_next_pc): Likewise.
3250
7dc53023
LM
32512016-12-23 Luis Machado <lgustavo@codesourcery.com>
3252
3253 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3254 * nto-x86-low.c: Likewise.
3255
ad02e4fe
SM
32562016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3257
3258 * Makefile.in: Include disable-implicit-rules.mk.
3259
dcb07cfa
PA
32602016-11-23 Pedro Alves <palves@redhat.com>
3261
3262 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3263 (debug_vprintf): Use std::chrono::steady_clock instead of
3264 gettimeofday. Use '.' instead of ':'.
3265 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3266 (get_timestamp): Use std::chrono::steady_clock instead of
3267 gettimeofday.
3268
8629c02c
SM
32692016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3270
3271 * Makefile.in: Fix whitespace formatting.
3272
b593ecca
SM
32732016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3274
3275 * Makefile.in (SFILES, OBS): Flatten list and order
3276 alphabetically.
3277
9986ba08
PA
32782016-11-23 Pedro Alves <palves@redhat.com>
3279
3280 * event-loop.c (handle_file_event): Use warning.
3281 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3282 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3283 Use warning.
3284
4eefa7bc
PA
32852016-11-23 Pedro Alves <palves@redhat.com>
3286
3287 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3288 output.
3289 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3290 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3291 debug_printf and debug_flush for debug output.
3292 * server.c (handle_general_set): Likewise.
3293 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3294 output.
3295
5443506e
SM
32962016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3297
3298 * Makefile.in (.c.o): Replace rule with ...
3299 (%.o: %.c): ... this one.
3300
3b165252
SM
33012016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3302
3303 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3304 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3305 make.
3306 * configure.ac: Remove checks for the make program.
3307 * configure: Re-generate.
3308
0bcda685
PA
33092016-10-28 Pedro Alves <palves@redhat.com>
3310
3311 * Makefile.in (CXX_DIALECT): Get from configure.
3312 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3313 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3314 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3315 * config.in: Regenerate.
3316 * configure: Regenerate.
3317
c3805894
YQ
33182016-10-27 Yao Qi <yao.qi@linaro.org>
3319
3320 * linux-low.c (linux_supports_range_stepping): Return true if
3321 can_software_single_step return true.
3322
89342618
YQ
33232016-10-27 Yao Qi <yao.qi@linaro.org>
3324
3325 * inferiors.c (find_inferior_in_random): New function.
3326 * inferiors.h (find_inferior_in_random): Declare.
3327 * linux-low.c (linux_wait_for_event_filtered): Call
3328 find_inferior_in_random instead of find_inferior.
3329
e3652c84
YQ
33302016-10-27 Yao Qi <yao.qi@linaro.org>
3331
3332 * linux-low.c (linux_wait_1): If single-step breakpoints are
3333 inserted, remove them.
3334
5a04c4cf
PA
33352016-10-26 Pedro Alves <palves@redhat.com>
3336
3337 * linux-low.c (handle_extended_wait): Link parent/child fork
3338 threads.
3339 (linux_wait_1): Unlink them.
3340 (linux_set_resume_request): Ignore resume requests for
3341 already-resumed and unhandled fork child threads.
3342 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3343 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3344 New functions.
3345 (handle_v_requests) <vCont>: Don't call require_running.
3346 * server.h (in_queued_stop_replies): New declaration.
3347
cb93dc7f
YQ
33482016-10-24 Yao Qi <yao.qi@linaro.org>
3349
3350 PR server/20733
3351 * linux-aarch64-low.c (append_insns): Cast the return value to
3352 'uint32_t *'.
3353
a1078bea
YQ
33542016-10-10 Yao Qi <yao.qi@linaro.org>
3355
3356 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3357
1fb77080
SDJ
33582016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3359
3360 * target.c (target_supports_multi_process): New function, moved
3361 from...
3362 * target.h (target_supports_multi_process): ... here. Remove
3363 macro.
3364
39b5a3b9
TT
33652016-10-05 Tom Tromey <tom@tromey.com>
3366
3367 PR remote/20655:
3368 * tracepoint.c (handle_tracepoint_bkpts): Check
3369 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3370
c1d0b70a
YQ
33712016-10-05 Yao Qi <yao.qi@linaro.org>
3372
3373 * configure.srv: Update the path of arm-*.xml files.
3374
0a69eedb
YQ
33752016-10-05 Terry Guo <terry.guo@arm.com>
3376 Yao Qi <yao.qi@linaro.org>
3377
3378 * Makefile.in: Adjust the path of rules.
3379 * configure.srv: Update the path of xml files.
3380 * regformats/arm-with-iwmmxt.dat: Regenerated.
3381 * regformats/arm-with-neon.dat: Likewise.
3382 * regformats/arm-with-vfpv2.dat: Likewise.
3383 * regformats/arm-with-vfpv3.dat Likewise.
3384
17e16485
YQ
33852016-09-30 Yao Qi <yao.qi@linaro.org>
3386
3387 PR gdbserver/20627
3388 * target.c (target_stop_and_wait): Don't call
3389 target_continue_no_signal, use resume_stop instead.
3390
edeeb602
YQ
33912016-09-26 Yao Qi <yao.qi@linaro.org>
3392
3393 * linux-low.c (linux_wait_1): Call debug_exit.
3394
503b1c39
PA
33952016-09-23 Pedro Alves <palves@redhat.com>
3396
3397 * Makefile.in (SFILES): Add common/new-op.c.
3398 (OBS): Add common/new-op.o.
3399 (new-op.o): New rule.
3400
74172ecf
SM
34012016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3402
3403 * .gitinore: Ignore more files.
3404
fc6cda2e
YQ
34052016-09-21 Yao Qi <yao.qi@linaro.org>
3406
3407 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3408 23.
3409
bc1e6c81
SDJ
34102016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3411
3412 * server.c (start_inferior): Call target_mourn_inferior instead of
3413 mourn_inferior; pass ptid_t argument to it.
3414 (resume): Likewise.
3415 (handle_target_event): Likewise.
3416 * target.c (target_mourn_inferior): New function.
3417 * target.h (mourn_inferior): Delete macro.
3418
0e00e962
AA
34192016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3420
3421 * linux-low.c (lwp_is_stepping): New function.
3422
1d8cb77d
CL
34232016-09-06 Carl Love <cel@us.ibm.com>
3424
3425 * server.c (start_inferior): Fixed comment, requested comment change
3426 didn't get updated correctly. Removed reference to ptrace () call as
3427 it is only true on Linux systems.
3428
7313bced
CL
34292016-09-06 Carl Love <cel@us.ibm.com>
3430
3431 * server.c (start_inferior): Do not call
3432 function target_post_create_inferior () if the
3433 inferior process has already exited.
3434
cf6de44d
PA
34352016-09-05 Pedro Alves <palves@redhat.com>
3436
3437 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3438 (COMPILE.pre, CC_LD): Use CXX directly.
3439 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3440 * acinclude.m4: Don't include build-with-cxx.m4.
3441 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3442 * configure: Regenerate.
3443
c1da6748
AT
34442016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3445
3446 PR gdb/19495
3447 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3448 call writing data to own_buf.
3449
f2b9e3df
SDJ
34502016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3451
3452 * target.c (mywait): Call target_wait instead of
3453 the_target->wait.
3454 (target_wait): New function.
3455
049a8570
SDJ
34562016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3457
3458 * server.c (start_inferior): New variable 'ptid'. Replace calls
3459 to the_target->resume by target_continue{,_no_signal}, depending
3460 on the case.
3461 * target.c (target_stop_and_wait): Call target_continue_no_signal
3462 instead of the_target->resume.
3463 (target_continue): New function.
3464
3aa5cfa0
AT
34652016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3466
3467 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3468
754653a7
AZ
34692016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3470
3471 PR server/20491
3472 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3473 ps_prochandle.
3474 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3475 * linux-arm-low.c (ps_get_thread_area): Likewise.
3476 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3477 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3478 * linux-mips-low.c (ps_get_thread_area): Likewise.
3479 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3480 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3481 * linux-x86-low.c (ps_get_thread_area): Likewise.
3482 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3483
ed036b40
PA
34842016-08-19 Pedro Alves <palves@redhat.com>
3485
3486 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3487
c8ef42ee
PA
34882016-08-19 Pedro Alves <palves@redhat.com>
3489
3490 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3491 comment. Use memcpy instead of casting through unsigned long.
3492
9c235a72
PA
34932016-08-19 Pedro Alves <palves@redhat.com>
3494
3495 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3496 allocating around 0x80000000.
3497
201506da
PA
34982016-08-19 Pedro Alves <palves@redhat.com>
3499
3500 PR gdb/20415
3501 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3502 (x32-avx512-linux-ipa.o): New rules.
3503 * configure.ac (x86_64-*-linux*): New x32 check.
3504 * configure.srv (ipa_x32_linux_regobj): New.
3505 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3506 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3507 descriptions.
3508 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3509 descriptions.
3510 * configure: Regenerate.
3511
f348d89a
PA
35122016-08-09 Pedro Alves <palves@redhat.com>
3513
3514 PR gdb/18653
3515 * Makefile.in (OBS): Add signals-state-save-restore.o.
3516 (signals-state-save-restore.o): New rule.
3517 * config.in: Regenerate.
3518 * configure: Regenerate.
3519 * linux-low.c: Include "signals-state-save-restore.h".
3520 (linux_create_inferior): Call
3521 restore_original_signals_state.
3522 * server.c: Include "dispositions-save-restore.h".
3523 (captured_main): Call save_original_signals_state.
3524
1baf5149
PA
35252016-08-05 Pedro Alves <palves@redhat.com>
3526
3527 * configure: Regenerate.
3528
fcd4a73d
YQ
35292016-08-04 Yao Qi <yao.qi@linaro.org>
3530
3531 * linux-low.c (regsets_fetch_inferior_registers): Check
3532 errno is ESRCH or not.
3533
979659d0
YQ
35342016-08-02 Yao Qi <yao.qi@linaro.org>
3535
3536 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3537 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3538 (thread_db_load_search): Update.
3539 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3540 td_ta_set_event and td_ta_event_getmsg.
3541
6598661d
PA
35422016-07-26 Pedro Alves <palves@redhat.com>
3543
3544 PR server/20414
3545 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3546 of unsigned long for 64-bit registers and use uint32_t instead of
3547 unsigned int for 32-bit registers.
3548
9cf12d57
PA
35492016-07-26 Pedro Alves <palves@redhat.com>
3550
3551 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3552 to 'ptrace'.
3553
305450ed
TT
35542016-07-21 Tom Tromey <tom@tromey.com>
3555
3556 * configure: Rebuild.
3557
2583da7c
YQ
35582016-07-21 Yao Qi <yao.qi@linaro.org>
3559
3560 * mem-break.c (find_gdb_breakpoint): Cast bp to
3561 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3562
21536b36
YQ
35632016-07-21 Yao Qi <yao.qi@linaro.org>
3564
3565 * server.c (handle_v_requests): Support s and S actions
3566 if target_supports_software_single_step return true.
3567
8901d193
YQ
35682016-07-21 Yao Qi <yao.qi@linaro.org>
3569
3570 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3571 is resume_step, call maybe_hw_step.
3572 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3573 and unstop them.
3574 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3575 breakpoints or not.
3576 (proceed_one_lwp): If resume request is resume_step, install
3577 reinsert breakpoints and call maybe_hw_step.
3578
0e9a339e
YQ
35792016-07-21 Yao Qi <yao.qi@linaro.org>
3580
3581 * linux-low.c (proceed_one_lwp): Declare.
3582 (linux_resume_one_thread): Remove local variable 'step'.
3583 Lift code enqueue signal. Call proceed_one_lwp instead of
3584 linux_resume_one_lwp.
3585
4281b351
YQ
35862016-07-21 Yao Qi <yao.qi@linaro.org>
3587
3588 * linux-low.c (linux_resume_one_thread): Call
3589 enqueue_pending_signal.
3590
984a2c04
YQ
35912016-07-21 Yao Qi <yao.qi@linaro.org>
3592
3593 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3594 * inferiors.c (do_restore_current_thread_cleanup): New function.
3595 (make_cleanup_restore_current_thread): Likewise.
3596 * linux-low.c (install_software_single_step_breakpoints): Call
3597 make_cleanup_restore_current_thread. Switch current_thread to
3598 thread.
3599
bec903c9
YQ
36002016-07-21 Yao Qi <yao.qi@linaro.org>
3601
3602 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3603 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3604 (clone_one_breakpoint): Likewise.
3605 (delete_reinsert_breakpoints): Change parameter to thread.
3606 Callers updated.
3607 (has_reinsert_breakpoints): Likewise.
3608 (uninsert_reinsert_breakpoints): Likewise.
3609 (reinsert_reinsert_breakpoints): Likewise.
3610 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3611 (delete_reinsert_breakpoints): Likewise.
3612 (reinsert_reinsert_breakpoints): Likewise.
3613 (uninsert_reinsert_breakpoints): Likewise.
3614 (has_reinsert_breakpoints): Likewise.
3615
63c40ec7
YQ
36162016-07-21 Yao Qi <yao.qi@linaro.org>
3617
3618 * inferiors.c (get_thread_process): Make parameter const.
3619 * inferiors.h (get_thread_process): Update declaration.
3620 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3621 Add new parameters child_thread and parent_thread. Callers
3622 updated.
3623 * mem-break.h (clone_all_breakpoints): Update declaration.
3624
9aa76cd0
YQ
36252016-07-21 Yao Qi <yao.qi@linaro.org>
3626
3627 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3628 <command_list, handler>: Remove.
3629 (struct gdb_breakpoint): New.
3630 (struct other_breakpoint): New.
3631 (struct reinsert_breakpoint): New.
3632 (is_gdb_breakpoint): New function.
3633 (any_persistent_commands): Update command_list if
3634 is_gdb_breakpoint returns true.
3635 (set_breakpoint): Create breakpoints according to their types.
3636 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3637 (set_gdb_breakpoint_1): Likewise.
3638 (set_gdb_breakpoint): Likewise.
3639 (clear_breakpoint_conditions): Change parameter type to
3640 'struct gdb_breakpoint *'.
3641 (clear_breakpoint_commands): Likewise.
3642 (clear_breakpoint_conditions_and_commands): Likewise.
3643 (add_condition_to_breakpoint): Likewise.
3644 (add_breakpoint_condition): Likewise.
3645 (add_commands_to_breakpoint): Likewise.
3646 (check_breakpoints): Check other_breakpoint.
3647 (clone_one_breakpoint): Clone breakpopint according to its type.
3648 * mem-break.h (struct gdb_breakpoint): Declare.
3649 (set_gdb_breakpoint): Update declaration.
3650 (clear_breakpoint_conditions_and_commands): Likewise.
3651 (add_breakpoint_condition): Likewise.
3652 (add_breakpoint_commands): Likewise.
3653 * server.c (process_point_options): Change parameter type to
3654 'struct gdb_breakpoint *'.
3655
811f8301
YQ
36562016-07-21 Yao Qi <yao.qi@linaro.org>
3657
3658 * mem-break.c (set_breakpoint_at): Rename it to ...
3659 (set_breakpoint_type_at): ... it.
3660 (set_breakpoint_at): Call set_breakpoint_type_at.
3661 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3662 * mem-break.h (set_breakpoint_at): Update comments.
3663
b1c51e36
CLT
36642016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3665
3666 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3667 to buf parameter.
3668 (nios2_store_gregset): Likewise.
3669
ced2dffb
PA
36702016-07-01 Pedro Alves <palves@redhat.com>
3671 Antoine Tremblay <antoine.tremblay@ericsson.com>
3672
3673 * linux-low.c: Change interface to take the target lwp_info
3674 pointer directly and return void. Handle detaching from a zombie
3675 thread.
3676 (linux_detach_lwp_callback): New function.
3677 (linux_detach): Detach from the leader thread after detaching from
3678 the clone threads.
3679
2ac09a5b
YQ
36802016-06-28 Yao Qi <yao.qi@linaro.org>
3681
3682 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3683 for variable new_offset.
3684 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3685 (aarch64_ftrace_insn_reloc_cb): Likewise.
3686 (aarch64_ftrace_insn_reloc_tb): Likewise.
3687 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3688 PRIx64 instead of PRIx32.
3689
79e7fd4f
YQ
36902016-06-28 Yao Qi <yao.qi@linaro.org>
3691
3692 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3693 (the_low_target): Install arm_get_syscall_trapinfo.
3694
061fc021
YQ
36952016-06-28 Yao Qi <yao.qi@linaro.org>
3696
3697 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3698 function.
3699 (the_low_target): Install aarch64_get_syscall_trapinfo.
3700
4cc32bec
YQ
37012016-06-28 Yao Qi <yao.qi@linaro.org>
3702
3703 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3704 Callers updated.
3705 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3706 Remove parameter sysno.
3707 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3708 sysret.
3709
782c1122
AA
37102016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3711
3712 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3713 (s390_emit_ne_goto): Likewise.
3714 (s390_emit_lt_goto): Likewise.
3715 (s390_emit_le_goto): Likewise.
3716 (s390_emit_gt_goto): Likewise.
3717 (s390_emit_ge_goto): Likewise.
3718 (s390x_emit_eq_goto): Likewise.
3719 (s390x_emit_ne_goto): Likewise.
3720 (s390x_emit_lt_goto): Likewise.
3721 (s390x_emit_le_goto): Likewise.
3722 (s390x_emit_gt_goto): Likewise.
3723 (s390x_emit_ge_goto): Likewise.
3724 (s390_emit_ops_impl): Mark variable static.
3725 (s390x_emit_ops): Likewise.
3726
2e7b624b
YQ
37272016-06-17 Yao Qi <yao.qi@linaro.org>
3728
3729 * linux-low.c (handle_extended_wait): Call
3730 uninsert_reinsert_breakpoints for the parent process. Remove
3731 reinsert breakpoints from the child process. Reinsert them to
3732 the parent process when vfork is done.
3733 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3734 (reinsert_reinsert_breakpoints): New function.
3735 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3736 (reinsert_reinsert_breakpoints): Declare.
3737
8a81c5d7
YQ
37382016-06-17 Yao Qi <yao.qi@linaro.org>
3739
3740 * linux-low.c (handle_extended_wait): If the parent is doing
3741 step-over, remove the reinsert breakpoints from the forked child.
3742
f50bf8e5
YQ
37432016-06-17 Yao Qi <yao.qi@linaro.org>
3744
3745 * linux-low.c (unsuspend_all_lwps): Declare.
3746 (linux_low_filter_event): If thread exited, call finish_step_over.
3747 If step-over is finished, unsuspend other threads.
3748
8376a3cb
YQ
37492016-06-17 Yao Qi <yao.qi@linaro.org>
3750
3751 * linux-low.c (linux_resume_one_lwp_throw): Assert
3752 has_reinsert_breakpoints returns false.
3753 * mem-break.c (delete_disabled_breakpoints): Assert
3754 bp type isn't reinsert_breakpoint.
3755
f79b145d
YQ
37562016-06-17 Yao Qi <yao.qi@linaro.org>
3757
3758 * linux-low.c (maybe_hw_step): New function.
3759 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3760 (finish_step_over): Switch current_thread to lwp temporarily,
3761 and assert has_reinsert_breakpoints returns true.
3762 (proceed_one_lwp): Call maybe_hw_step.
3763 * mem-break.c (has_reinsert_breakpoints): New function.
3764 * mem-break.h (has_reinsert_breakpoints): Declare.
3765
0ae534d2
JT
37662016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3767
3768 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3769
fcdad592
YQ
37702016-05-17 Yao Qi <yao.qi@linaro.org>
3771
3772 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3773 instead of find_inferior.
3774
9e784964
YQ
37752016-05-05 Yao Qi <yao.qi@linaro.org>
3776
3777 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3778 Initialize res to zero.
3779
cf2ebb6e
YQ
37802016-05-05 Yao Qi <yao.qi@linaro.org>
3781
3782 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3783 to uint32_t.
3784
c1aebf87
UW
37852016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3786
3787 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3788 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3789 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3790
35fd2deb 37912016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3792 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3793
3794 * tracepoint.c (write_inferior_int8): New function.
3795 (cmd_qtenable_disable): Write enable flag using
3796 write_inferior_int8.
3797
484b3c32
YQ
37982016-04-25 Yao Qi <yao.qi@linaro.org>
3799
3800 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3801 (need_step_over_p): Return zero if the LWP has pending signals
3802 can be delivered on software single step target.
3803
85ba7d86
YQ
38042016-04-25 Yao Qi <yao.qi@linaro.org>
3805
3806 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3807 return instead of error.
3808
3539aa13
YQ
38092016-04-22 Yao Qi <yao.qi@linaro.org>
3810
3811 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3812 to 23.
3813
5b061e98
YQ
38142016-04-22 Yao Qi <yao.qi@linaro.org>
3815
3816 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3817 signal when stepping over breakpoint with software single
3818 step.
3819
3451269c
PA
38202016-04-21 Pedro Alves <palves@redhat.com>
3821
3822 * linux-s390-low.c (s390_collect_ptrace_register)
3823 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3824 add casts.
3825 (s390_check_regset): Use void * instead of gdb_byte *.
3826
a2358508
PA
38272016-04-20 Pedro Alves <palves@redhat.com>
3828
3829 * configure: Renegerate.
3830
6885166d
YQ
38312016-04-20 Yao Qi <yao.qi@linaro.org>
3832
3833 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3834 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3835 number 16.
3836 (arm_store_gregset): Likewise.
3837
2b863f51
WT
38382016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3839
3840 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3841 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3842 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3843 (amd64-avx-mpx-linux.c): New rules.
3844 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3845 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3846 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3847 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3848 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3849 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3850 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3851 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3852 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3853 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3854 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3855 * linux-x86-low.c (x86_linux_read_description): Add case for
3856 X86_XSTATE_AVX_MPX_MASK.
3857 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3858 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3859 init_registers_i386_avx_mpx_linux.
3860 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3861 (initialize_low_tracepoint): Call
3862 init_registers_i386_avx_mpx_linux.
3863 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3864 (initialize_low_tracepoint): Call
3865 init_registers_amd64_avx_mpx_linux.
3866 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3867 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3868 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3869 declarations.
3870
9b30624b
PA
38712016-04-18 Pedro Alves <palves@redhat.com>
3872
3873 * configure: Regenerate.
3874
45e3745e
AT
38752016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3876
3877 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3878 (aarch64_emit_sub): Likewise.
3879
2afc13ff
PA
38802016-04-12 Pedro Alves <palves@redhat.com>
3881
3882 * utils.c (prepare_to_throw_exception): Delete.
3883
6e774b13
SM
38842016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3885
3886 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3887
4dca19f8
MK
38882016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3889
3890 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3891
d0a9981f
MK
38922016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3893
3894 * linux-aarch64-ipa.c: Add <elf.h> include.
3895 * linux-ppc-ipa.c: Add <elf.h> include.
3896 * linux-s390-ipa.c: Add <elf.h> include.
3897
252db07e
MK
38982016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3899
3900 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3901 (get_raw_reg_ptr): Likewise.
3902 (get_trace_state_variable_value_ptr): Likewise.
3903 (set_trace_state_variable_value_ptr): Likewise.
3904 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3905 char *.
3906
14e2b6d9
MK
39072016-03-31 Wei-cheng Wang <cole945@gmail.com>
3908 Marcin Kościelnicki <koriakin@0x04.net>
3909
3910 PR/17221
3911 * linux-ppc-low.c (emit_insns): New function.
3912 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3913 (ppc_emit_prologue): New function.
3914 (ppc_emit_epilogue): New function.
3915 (ppc_emit_add): New function.
3916 (ppc_emit_sub): New function.
3917 (ppc_emit_mul): New function.
3918 (ppc_emit_lsh): New function.
3919 (ppc_emit_rsh_signed): New function.
3920 (ppc_emit_rsh_unsigned): New function.
3921 (ppc_emit_ext): New function.
3922 (ppc_emit_zero_ext): New function.
3923 (ppc_emit_log_not): New function.
3924 (ppc_emit_bit_and): New function.
3925 (ppc_emit_bit_or): New function.
3926 (ppc_emit_bit_xor): New function.
3927 (ppc_emit_bit_not): New function.
3928 (ppc_emit_equal): New function.
3929 (ppc_emit_less_signed): New function.
3930 (ppc_emit_less_unsigned): New function.
3931 (ppc_emit_ref): New function.
3932 (ppc_emit_const): New function.
3933 (ppc_emit_reg): New function.
3934 (ppc_emit_pop): New function.
3935 (ppc_emit_stack_flush): New function.
3936 (ppc_emit_swap): New function.
3937 (ppc_emit_stack_adjust): New function.
3938 (ppc_emit_call): New function.
3939 (ppc_emit_int_call_1): New function.
3940 (ppc_emit_void_call_2): New function.
3941 (ppc_emit_if_goto): New function.
3942 (ppc_emit_goto): New function.
3943 (ppc_emit_eq_goto): New function.
3944 (ppc_emit_ne_goto): New function.
3945 (ppc_emit_lt_goto): New function.
3946 (ppc_emit_le_goto): New function.
3947 (ppc_emit_gt_goto): New function.
3948 (ppc_emit_ge_goto): New function.
3949 (ppc_write_goto_address): New function.
3950 (ppc_emit_ops_impl): New static variable.
3951 (ppc64v1_emit_prologue): New function.
3952 (ppc64v2_emit_prologue): New function.
3953 (ppc64_emit_epilogue): New function.
3954 (ppc64_emit_add): New function.
3955 (ppc64_emit_sub): New function.
3956 (ppc64_emit_mul): New function.
3957 (ppc64_emit_lsh): New function.
3958 (ppc64_emit_rsh_signed): New function.
3959 (ppc64_emit_rsh_unsigned): New function.
3960 (ppc64_emit_ext): New function.
3961 (ppc64_emit_zero_ext): New function.
3962 (ppc64_emit_log_not): New function.
3963 (ppc64_emit_bit_and): New function.
3964 (ppc64_emit_bit_or): New function.
3965 (ppc64_emit_bit_xor): New function.
3966 (ppc64_emit_bit_not): New function.
3967 (ppc64_emit_equal): New function.
3968 (ppc64_emit_less_signed): New function.
3969 (ppc64_emit_less_unsigned): New function.
3970 (ppc64_emit_ref): New function.
3971 (ppc64_emit_const): New function.
3972 (ppc64v1_emit_reg): New function.
3973 (ppc64v2_emit_reg): New function.
3974 (ppc64_emit_pop): New function.
3975 (ppc64_emit_stack_flush): New function.
3976 (ppc64_emit_swap): New function.
3977 (ppc64v1_emit_call): New function.
3978 (ppc64v2_emit_call): New function.
3979 (ppc64v1_emit_int_call_1): New function.
3980 (ppc64v2_emit_int_call_1): New function.
3981 (ppc64v1_emit_void_call_2): New function.
3982 (ppc64v2_emit_void_call_2): New function.
3983 (ppc64_emit_if_goto): New function.
3984 (ppc64_emit_eq_goto): New function.
3985 (ppc64_emit_ne_goto): New function.
3986 (ppc64_emit_lt_goto): New function.
3987 (ppc64_emit_le_goto): New function.
3988 (ppc64_emit_gt_goto): New function.
3989 (ppc64_emit_ge_goto): New function.
3990 (ppc64v1_emit_ops_impl): New static variable.
3991 (ppc64v2_emit_ops_impl): New static variable.
3992 (ppc_emit_ops): New function.
3993 (linux_low_target): Wire in ppc_emit_ops.
3994
a2174ba4
MK
39952016-03-31 Wei-cheng Wang <cole945@gmail.com>
3996 Marcin Kościelnicki <koriakin@0x04.net>
3997
3998 PR/17221
3999 * Makefile.in: Add powerpc-*-ipa.o
4000 * configure.srv: Add ipa_obj for powerpc*-linux.
4001 * linux-ppc-ipa.c: New file.
4002 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4003 includes.
4004 (PPC_FIELD): New macro.
4005 (PPC_SEXT): New macro.
4006 (PPC_OP6): New macro.
4007 (PPC_BO): New macro.
4008 (PPC_LI): New macro.
4009 (PPC_BD): New macro.
4010 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4011 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4012 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4013 (ppc_get_thread_area): New function.
4014 (is_elfv2_inferior): New function.
4015 (gen_ds_form): New function.
4016 (GEN_STD): New macro.
4017 (GEN_STDU): New macro.
4018 (GEN_LD): New macro.
4019 (GEN_LDU): New macro.
4020 (gen_d_form): New function.
4021 (GEN_ADDI): New macro.
4022 (GEN_ADDIS): New macro.
4023 (GEN_LI): New macro.
4024 (GEN_LIS): New macro.
4025 (GEN_ORI): New macro.
4026 (GEN_ORIS): New macro.
4027 (GEN_LWZ): New macro.
4028 (GEN_STW): New macro.
4029 (GEN_STWU): New macro.
4030 (gen_xfx_form): New function.
4031 (GEN_MFSPR): New macro.
4032 (GEN_MTSPR): New macro.
4033 (GEN_MFCR): New macro.
4034 (GEN_MTCR): New macro.
4035 (GEN_SYNC): New macro.
4036 (GEN_LWSYNC): New macro.
4037 (gen_x_form): New function.
4038 (GEN_OR): New macro.
4039 (GEN_MR): New macro.
4040 (GEN_LWARX): New macro.
4041 (GEN_STWCX): New macro.
4042 (GEN_CMPW): New macro.
4043 (gen_md_form): New function.
4044 (GEN_RLDICL): New macro.
4045 (GEN_RLDICR): New macro.
4046 (gen_i_form): New function.
4047 (GEN_B): New macro.
4048 (GEN_BL): New macro.
4049 (gen_b_form): New function.
4050 (GEN_BNE): New macro.
4051 (GEN_LOAD): New macro.
4052 (GEN_STORE): New macro.
4053 (gen_limm): New function.
4054 (gen_atomic_xchg): New function.
4055 (gen_call): New function.
4056 (ppc_relocate_instruction): New function.
4057 (ppc_install_fast_tracepoint_jump_pad): New function.
4058 (ppc_get_min_fast_tracepoint_insn_len): New function.
4059 (ppc_get_ipa_tdesc_idx): New function.
4060 (the_low_target): Wire in the new functions.
4061 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4062 tdescs.
4063 * linux-ppc-tdesc.h: New file.
4064
a13c4696
MK
40652016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4066
4067 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4068 (alloc_jump_pad_buffer): New function.
4069 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4070 (alloc_jump_pad_buffer): New function.
4071 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4072 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4073 (alloc_jump_pad_buffer): New function.
4074 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4075 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4076 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4077 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4078
1cda1512
MK
40792016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4080
4081 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4082 * linux-amd64-ipa.c: Likewise.
4083 * linux-i386-ipa.c: Likewise.
4084 * linux-s390-ipa.c: Likewise.
4085 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4086 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4087 set_trace_state_variable_value_ptr.
4088 (struct ipa_sym_addresses): Likewise.
4089 (symbol_list): Likewise.
4090 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4091 accessing gdb_collect directly.
4092 (gdb_collect_ptr_type): New typedef.
4093 (get_raw_reg_ptr_type): New typedef.
4094 (get_trace_state_variable_value_ptr_type): New typedef.
4095 (set_trace_state_variable_value_ptr_type): New typedef.
4096 (gdb_collect_ptr): New global.
4097 (get_raw_reg_ptr): New global.
4098 (get_trace_state_variable_value_ptr): New global.
4099 (set_trace_state_variable_value_ptr): New global.
4100 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4101 accessing get_raw_reg directly.
4102 (get_get_tsv_func_addr): Likewise for
4103 get_trace_state_variable_value_ptr.
4104 (get_set_tsv_func_addr): Likewise for
4105 set_trace_state_variable_value_ptr.
4106 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4107
72fb5488
SM
41082016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4109
4110 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4111
28170b88
MK
41122016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4113
4114 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4115 packets.
4116 (relocate_instruction): Remove own_buf.
4117 * server.c (own_buf): Make global.
4118 (handle_v_requests): Make global.
4119 * server.h (own_buf): New declaration.
4120 (handle_v_requests): New prototype.
4121
f39e8743
MK
41222016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4123
4124 PR 18377
4125 * linux-s390-low.c (add_insns): New function.
4126 (s390_emit_prologue): New function.
4127 (s390_emit_epilogue): New function.
4128 (s390_emit_add): New function.
4129 (s390_emit_sub): New function.
4130 (s390_emit_mul): New function.
4131 (s390_emit_lsh): New function.
4132 (s390_emit_rsh_signed): New function.
4133 (s390_emit_rsh_unsigned): New function.
4134 (s390_emit_ext): New function.
4135 (s390_emit_log_not): New function.
4136 (s390_emit_bit_and): New function.
4137 (s390_emit_bit_or): New function.
4138 (s390_emit_bit_xor): New function.
4139 (s390_emit_bit_not): New function.
4140 (s390_emit_equal): New function.
4141 (s390_emit_less_signed): New function.
4142 (s390_emit_less_unsigned): New function.
4143 (s390_emit_ref): New function.
4144 (s390_emit_if_goto): New function.
4145 (s390_emit_goto): New function.
4146 (s390_write_goto_address): New function.
4147 (s390_emit_litpool): New function.
4148 (s390_emit_const): New function.
4149 (s390_emit_call): New function.
4150 (s390_emit_reg): New function.
4151 (s390_emit_pop): New function.
4152 (s390_emit_stack_flush): New function.
4153 (s390_emit_zero_ext): New function.
4154 (s390_emit_swap): New function.
4155 (s390_emit_stack_adjust): New function.
4156 (s390_emit_set_r2): New function.
4157 (s390_emit_int_call_1): New function.
4158 (s390_emit_void_call_2): New function.
4159 (s390_emit_eq_goto): New function.
4160 (s390_emit_ne_goto): New function.
4161 (s390_emit_lt_goto): New function.
4162 (s390_emit_le_goto): New function.
4163 (s390_emit_gt_goto): New function.
4164 (s390_emit_ge_goto): New function.
4165 (s390x_emit_prologue): New function.
4166 (s390x_emit_epilogue): New function.
4167 (s390x_emit_add): New function.
4168 (s390x_emit_sub): New function.
4169 (s390x_emit_mul): New function.
4170 (s390x_emit_lsh): New function.
4171 (s390x_emit_rsh_signed): New function.
4172 (s390x_emit_rsh_unsigned): New function.
4173 (s390x_emit_ext): New function.
4174 (s390x_emit_log_not): New function.
4175 (s390x_emit_bit_and): New function.
4176 (s390x_emit_bit_or): New function.
4177 (s390x_emit_bit_xor): New function.
4178 (s390x_emit_bit_not): New function.
4179 (s390x_emit_equal): New function.
4180 (s390x_emit_less_signed): New function.
4181 (s390x_emit_less_unsigned): New function.
4182 (s390x_emit_ref): New function.
4183 (s390x_emit_if_goto): New function.
4184 (s390x_emit_const): New function.
4185 (s390x_emit_call): New function.
4186 (s390x_emit_reg): New function.
4187 (s390x_emit_pop): New function.
4188 (s390x_emit_stack_flush): New function.
4189 (s390x_emit_zero_ext): New function.
4190 (s390x_emit_swap): New function.
4191 (s390x_emit_stack_adjust): New function.
4192 (s390x_emit_int_call_1): New function.
4193 (s390x_emit_void_call_2): New function.
4194 (s390x_emit_eq_goto): New function.
4195 (s390x_emit_ne_goto): New function.
4196 (s390x_emit_lt_goto): New function.
4197 (s390x_emit_le_goto): New function.
4198 (s390x_emit_gt_goto): New function.
4199 (s390x_emit_ge_goto): New function.
4200 (s390_emit_ops): New function.
4201 (struct linux_target_ops): Fill in emit_ops hook.
4202
abd9baf9
MK
42032016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4204
4205 PR 18377
4206 * Makefile.in: Add s390 IPA files.
4207 * configure.srv: Build IPA for s390.
4208 * linux-s390-ipa.c: New file.
4209 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4210 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4211 (tdesc_s390_linux32): Likewise.
4212 (init_registers_s390_linux32v1): Likewise.
4213 (tdesc_s390_linux32v1): Likewise.
4214 (init_registers_s390_linux32v2): Likewise.
4215 (tdesc_s390_linux32v2): Likewise.
4216 (init_registers_s390_linux64): Likewise.
4217 (tdesc_s390_linux64): Likewise.
4218 (init_registers_s390_linux64v1): Likewise.
4219 (tdesc_s390_linux64v1): Likewise.
4220 (init_registers_s390_linux64v2): Likewise.
4221 (tdesc_s390_linux64v2): Likewise.
4222 (init_registers_s390_te_linux64): Likewise.
4223 (tdesc_s390_te_linux64): Likewise.
4224 (init_registers_s390_vx_linux64): Likewise.
4225 (tdesc_s390_vx_linux64): Likewise.
4226 (init_registers_s390_tevx_linux64): Likewise.
4227 (tdesc_s390_tevx_linux64): Likewise.
4228 (init_registers_s390x_linux64): Likewise.
4229 (tdesc_s390x_linux64): Likewise.
4230 (init_registers_s390x_linux64v1): Likewise.
4231 (tdesc_s390x_linux64v1): Likewise.
4232 (init_registers_s390x_linux64v2): Likewise.
4233 (tdesc_s390x_linux64v2): Likewise.
4234 (init_registers_s390x_te_linux64): Likewise.
4235 (tdesc_s390x_te_linux64): Likewise.
4236 (init_registers_s390x_vx_linux64): Likewise.
4237 (tdesc_s390x_vx_linux64): Likewise.
4238 (init_registers_s390x_tevx_linux64): Likewise.
4239 (tdesc_s390x_tevx_linux64): Likewise.
4240 (have_hwcap_s390_vx): New static variable.
4241 (s390_arch_setup): Fill have_hwcap_s390_vx.
4242 (s390_get_thread_area): New function.
4243 (s390_ft_entry_gpr_esa): New const.
4244 (s390_ft_entry_gpr_zarch): New const.
4245 (s390_ft_entry_misc): New const.
4246 (s390_ft_entry_fr): New const.
4247 (s390_ft_entry_vr): New const.
4248 (s390_ft_main_31): New const.
4249 (s390_ft_main_64): New const.
4250 (s390_ft_exit_fr): New const.
4251 (s390_ft_exit_vr): New const.
4252 (s390_ft_exit_misc): New const.
4253 (s390_ft_exit_gpr_esa): New const.
4254 (s390_ft_exit_gpr_zarch): New const.
4255 (append_insns): New function.
4256 (s390_relocate_instruction): New function.
4257 (s390_install_fast_tracepoint_jump_pad): New function.
4258 (s390_get_min_fast_tracepoint_insn_len): New function.
4259 (s390_get_ipa_tdesc_idx): New function.
4260 (struct linux_target_ops): Wire in the above functions.
4261 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4262 * linux-s390-tdesc.h: New file.
4263
a4105d04
MK
42642016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4265
4266 * linux-s390-low.c (s390_supports_tracepoints): New function.
4267 (struct linux_target_ops): Fill supports_tracepoints hook.
4268
35ac8b3e
YQ
42692016-03-18 Yao Qi <yao.qi@linaro.org>
4270
4271 * linux-low.c (lwp_signal_can_be_delivered): New function.
4272 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4273
94610ec4
YQ
42742016-03-18 Yao Qi <yao.qi@linaro.org>
4275
4276 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4277 0 if signal is enqueued. Remove 'signal' from one debugging
4278 message. Move one debugging message to some lines below.
4279 Remove code setting 'signal' to 0.
4280
80aea927
YQ
42812016-03-18 Yao Qi <yao.qi@linaro.org>
4282
4283 * linux-low.c (linux_low_filter_event): Remove redundant
4284 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4285
b04fd3be
MK
42862016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4287
4288 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4289 (struct linux_target_ops): Wire in the above.
4290
c40c8d4b
YQ
42912016-03-03 Yao Qi <yao.qi@linaro.org>
4292
4293 * linux-low.c: Update comments to start_step_over.
4294
0f8288ae
YQ
42952016-03-03 Yao Qi <yao.qi@linaro.org>
4296
4297 PR server/19736
4298 * linux-low.c (handle_extended_wait): Set child suspended
4299 if event_lwp->bp_reinsert isn't zero.
4300
fdbd04a8
YQ
43012016-03-02 Yao Qi <yao.qi@linaro.org>
4302
4303 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4304 enqueue_pending_signal.
4305
6896a8fa
MK
43062016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4307
4308 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4309 is actually loaded.
4310
ab503087
MK
43112016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4312
4313 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4314 (s390_regmap_3264) [!__s390x__]: New global.
4315 (s390_collect_ptrace_register): Skip map entries containing -1.
4316 (s390_supply_ptrace_register): Ditto.
4317 (s390_fill_gprs_high): New function.
4318 (s390_store_gprs_high): New function.
4319 (s390_regsets): Add NT_S390_HIGH_GPRS.
4320 (s390_get_hwcap): Enable on 31-bit.
4321 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4322 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4323 Detect NT_S390_HIGH_GPRS.
4324 (s390_usrregs_info_3264): Enable on 31-bit.
4325 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4326 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4327
ae91f625
MK
43282016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4329
4330 PR gdb/13808
4331 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4332 * configure.srv: Ditto.
4333 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4334 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4335 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4336 (init_registers_amd64_linux): Remove prototype.
4337 (tdesc_amd64_linux): Remove declaration.
4338 (get_ipa_tdesc): New function.
4339 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4340 initialize remaining tdescs.
4341 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4342 (init_registers_i386_linux): Remove prototype.
4343 (tdesc_i386_linux): Remove declaration.
4344 (get_ipa_tdesc): New function.
4345 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4346 initialize remaining tdescs.
4347 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4348 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4349 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4350 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4351 (x86_get_ipa_tdesc_idx): New function.
4352 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4353 * linux-x86-tdesc.h: New file.
4354 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4355 (target_get_ipa_tdesc_idx): New macro.
4356 * tracepoint.c (ipa_tdesc_idx): New macro.
4357 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4358 (symbol_list): Add ipa_tdesc_idx.
4359 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4360 (ipa_tdesc): Remove.
4361 (ipa_tdesc_idx): New variable.
4362 (get_context_regcache): Use get_ipa_tdesc.
4363 (gdb_collect): Ditto.
4364 (gdb_probe): Ditto.
4365 * tracepoint.h (get_ipa_tdesc): New prototype.
4366 (ipa_tdesc): Remove.
4367
e7ad2f14
PA
43682016-02-24 Pedro Alves <palves@redhat.com>
4369
4370 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4371 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4372 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4373 Factor out common code between the USE_SIGTRAP_SIGINFO and
4374 !USE_SIGTRAP_SIGINFO blocks.
4375 (linux_low_filter_event): Call save_stop_reason instead of
4376 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4377 Update comments.
4378 (linux_wait_1): Update comments.
4379
657f9cde
WW
43802016-02-24 Wei-cheng Wang <cole945@gmail.com>
4381
4382 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4383 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4384 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4385 ppc_insert_point, ppc_remove_point.
4386
b00b61e1
MK
43872016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4388
4389 * linux-s390-low.c (s390_supports_z_point_type): New function.
4390 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4391
553cb527
YQ
43922016-02-16 Yao Qi <yao.qi@linaro.org>
4393
4394 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4395 PC. Get pc from regcache_read_pc.
4396
a5652c21
YQ
43972016-02-12 Yao Qi <yao.qi@linaro.org>
4398
4399 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4400 or linux_get_pc_32bit.
4401 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4402
ed443b61
YQ
44032016-02-12 Yao Qi <yao.qi@linaro.org>
4404
4405 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4406 arm_linux_get_next_pcs_fixup.
4407
020ecd38
MK
44082016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4409
4410 * tracepoint.c (x_tracepoint_action_download): Change
4411 write_inferior_data_ptr to write_inferior_data_pointer.
4412 (cmd_qtstart): Likewise.
4413 (write_inferior_data_ptr): Remove.
4414 (download_agent_expr): Change write_inferior_data_ptr to
4415 write_inferior_data_pointer.
4416 (download_tracepoint_1): Likewise.
4417 (download_tracepoint): Likewise.
4418 (download_trace_state_variables): Likewise.
4419
7cae9051
WW
44202016-02-11 Wei-cheng Wang <cole945@gmail.com>
4421 Marcin Kościelnicki <koriakin@0x04.net>
4422
4423 * tracepoint.c (struct tracepoint_action_ops): Remove.
4424 (struct tracepoint_action): Remove ops.
4425 (m_tracepoint_action_download, r_tracepoint_action_download)
4426 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4427 size and offset accordingly.
4428 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4429 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4430 (tracepoint_action_send, tracepoint_action_download): New functions.
4431 Helpers for trace action handlers.
4432 (add_tracepoint_action): Remove setup actions ops.
4433 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4434
9f6a71b4
YQ
44352016-02-10 Yao Qi <yao.qi@linaro.org>
4436
4437 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4438
1e94266c
SM
44392016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4440
4441 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4442 to AC_OUTPUT.
4443 * configure: Regenerate.
4444
8adce034
SM
44452016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4446
4447 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4448 void * to gdb_byte *.
4449 * linux-low.c (siginfo_fixup): Likewise.
4450 (linux_xfer_siginfo): Likewise.
4451 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4452 Likewise.
4453 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4454
93813b37
WT
44552016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4456
4457 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4458 to srv_tgtobj.
4459 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4460 to srv_tgtobj.
4461 * linux-x86-low.c [__x86_64__]: Include
4462 "nat/amd64-linux-siginfo.h".
4463 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4464 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4465 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4466 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4467 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4468 (cpt_si_fd, si_timerid, si_overrun): Move from
4469 nat/amd64-linux-siginfo.c.
4470 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4471
8424cc97
SM
44722016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4473
4474 * server.c (skip_to_semicolon): Remove.
4475 (process_point_options): Use strchrnul instead of
4476 skip_to_semicolon.
4477
4d18591b
YQ
44782016-01-26 Yao Qi <yao.qi@linaro.org>
4479
4480 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4481 * linux-low.c (install_software_single_step_breakpoints): Don't
4482 call regcache_read_pc.
4483 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4484 argument pc.
4485
d8020970
YQ
44862016-01-26 Yao Qi <yao.qi@linaro.org>
4487
4488 * linux-low.c (install_software_single_step_breakpoints): Call
4489 regcache_read_pc instead of get_pc.
4490
8b207339
YQ
44912016-01-26 Yao Qi <yao.qi@linaro.org>
4492
4493 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4494 (unblock_async_io): Rename to ...
4495 (block_unblock_async_io): ... it. New function.
4496 (enable_async_io): Don't install SIGIO handler. Unblock it
4497 instead.
4498 (disable_async_io): Don't ignore SIGIO. Block it instead.
4499 (initialize_async_io): Install SIGIO handler. Don't call
4500 unblock_async_io.
4501
18879fef
YQ
45022016-01-26 Yao Qi <yao.qi@linaro.org>
4503
4504 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4505 first character is '\003', call *the_target->request_interrupt.
4506
a0f8e08a
YQ
45072016-01-25 Yao Qi <yao.qi@linaro.org>
4508
4509 * remote-utils.c (new_thread_notify): Remove.
4510 (dead_thread_notify): Likewise.
4511 * remote-utils.h (new_thread_notify): Remove declaration.
4512 (dead_thread_notify): Likewise.
4513
cc5fd9ab
MK
45142016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4515
4516 * gdb.trace/pending.exp: Fix expected message on continue.
4517
99e8eb11
MK
45182016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4519
4520 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4521 it works properly on big-endian machines where sizeof (CORE_ADDR)
4522 != sizeof (void *).
4523
a994041d
PA
45242016-01-21 Pedro Alves <palves@redhat.com>
4525
4526 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4527 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4528 * configure: Regenerate.
4529
f7a6a40d
YQ
45302016-01-21 Yao Qi <yao.qi@linaro.org>
4531
4532 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4533 is_thumb and set it according to CPSR saved on the stack.
4534 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4535 arm_sigreturn_next_pc.
4536
6f69e520
YQ
45372016-01-18 Yao Qi <yao.qi@linaro.org>
4538
4539 * linux-low.c (linux_set_pc_64bit): New function.
4540 (linux_get_pc_64bit): New function.
4541 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4542 Declare.
4543 * linux-sparc-low.c (debug_threads): Remove declaration.
4544 (sparc_get_pc): Remove.
4545 (the_low_target): Use linux_get_pc_64bit instead of
4546 sparc_get_pc.
4547 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4548 (the_low_target): Use linux_get_pc_64bit and
4549 linux_set_pc_64bit.
4550
276d4552
YQ
45512016-01-18 Yao Qi <yao.qi@linaro.org>
4552
4553 * linux-arm-low.c (debug_threads): Remove declaration.
4554 (arm_get_pc, arm_set_pc): Remove.
4555 (the_low_target): Use linux_get_pc_32bit and
4556 linux_set_pc_32bit.
4557 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4558 (the_low_target): Use linux_get_pc_32bit and
4559 linux_set_pc_32bit.
4560 * linux-cris-low.c (debug_threads): Remove declaration.
4561 (cris_get_pc, cris_set_pc,): Remove.
4562 (the_low_target): Use linux_get_pc_32bit and
4563 linux_set_pc_32bit.
4564 * linux-crisv32-low.c (debug_threads): Remove declaration.
4565 (cris_get_pc, cris_set_pc): Remove.
4566 (the_low_target): Use linux_get_pc_32bit and
4567 linux_set_pc_32bit.
4568 * linux-low.c: Include inttypes.h.
4569 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4570 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4571 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4572 (the_low_target): Use linux_get_pc_32bit and
4573 linux_set_pc_32bit.
4574 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4575 (the_low_target): Use linux_get_pc_32bit and
4576 linux_set_pc_32bit.
4577 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4578 (the_low_target): Use linux_get_pc_32bit and
4579 linux_set_pc_32bit.
4580 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4581 (the_low_target): Use linux_get_pc_32bit and
4582 linux_set_pc_32bit.
4583 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4584 (the_low_target): Use linux_get_pc_32bit and
4585 linux_set_pc_32bit.
4586
eb0edac8
GB
45872016-01-18 Gary Benson <gbenson@redhat.com>
4588
4589 * configure.ac (AC_FUNC_FORK): New check.
4590 * config.in: Regenerate.
4591 * configure: Likewise.
4592
1b451dda
YQ
45932016-01-14 Yao Qi <yao.qi@linaro.org>
4594
4595 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4596 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4597 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4598 arm_get_next_pcs_ctor.
4599
82075af2
JS
46002016-01-12 Josh Stone <jistone@redhat.com>
4601 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4602
4603 * inferiors.h: Include "gdb_vecs.h".
4604 (struct process_info): Add syscalls_to_catch.
4605 * inferiors.c (remove_process): Free syscalls_to_catch.
4606 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4607 syscall_return stops.
4608 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4609 * server.c (handle_general_set): Handle QCatchSyscalls.
4610 (handle_query): Report support for QCatchSyscalls.
4611 * target.h (struct target_ops): Add supports_catch_syscall.
4612 (target_supports_catch_syscall): New macro.
4613 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4614 (struct lwp_info): Add syscall_state.
4615 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4616 Maintain syscall_state and syscalls_to_catch across exec.
4617 (get_syscall_trapinfo): New function, proxy to the_low_target.
4618 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4619 (linux_low_filter_event): Toggle syscall_state entry/return for
4620 syscall traps, and set it ignored for all others.
4621 (gdb_catching_syscalls_p): New function.
4622 (gdb_catch_this_syscall_p): New function.
4623 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4624 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4625 (linux_supports_catch_syscall): New function.
4626 (linux_target_ops): Install it.
4627 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4628 (the_low_target): Install it.
4629
8f13a3ce
MF
46302016-01-12 Mike Frysinger <vapier@gentoo.org>
4631
4632 * acinclude.m4: Include new ../warning.m4 file.
4633 * configure: Regenerated.
4634 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4635
5b3da067
MF
46362016-01-12 Mike Frysinger <vapier@gentoo.org>
4637
4638 * ax.c (is_goto_target): Mark static.
4639 * linux-low.c (register_addr): Likewise.
4640 (linux_fetch_registers, linux_store_registers): Likewise.
4641 * mem-break.c (any_persistent_commands): Fix old prototype.
4642 (add_commands_to_breakpoint): Mark static.
4643 * regcache.c (find_register_by_name): Delete unused func.
4644 * remote-utils.c (hex_or_minus_one): Mark static.
4645 * server.c (monitor_show_help): Mark static.
4646 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4647 handle_v_requests): Likewise.
4648
bc504a31
PA
46492016-01-12 Pedro Alves <palves@redhat.com>
4650
4651 Remove use of the registered trademark symbol throughout.
4652
5a0dd67a
YQ
46532016-01-08 Yao Qi <yao.qi@linaro.org>
4654
4655 * remote-utils.c (getpkt): If c is '\003', call target hook
4656 request_interrupt.
4657
b2ca446f
YQ
46582016-01-06 Yao Qi <yao.qi@linaro.org>
4659
4660 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4661 linux-aarch32-low.c.
4662 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4663 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4664 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4665 (thumb2_breakpoint): Declare.
4666 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4667 linux-aarch32-low.h.
4668 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4669 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4670 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4671
edd88788
JB
46722016-01-01 Joel Brobecker <brobecker@adacore.com>
4673
4674 * gdbreplay.c (gdbreplay_version): Change copyright year in
4675 version message.
4676 * server.c (gdbserver_version): Likewise.
4677
65da7f14
PP
46782015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4679
4680 * server.c (crc32_table): Delete.
4681 (crc32): Use libiberty's xcrc32 function.
4682
4abd5ed2
JB
46832015-12-22 Joel Brobecker <brobecker@adacore.com>
4684
4685 * lynx-low.c (lynx_delete_thread_callback): New function.
4686 (lynx_mourn): Properly delete our process and all of its
4687 threads. Remove call to clear_inferiors.
4688
0e50fe5c
JB
46892015-12-22 Joel Brobecker <brobecker@adacore.com>
4690
4691 * target.c (thread_search_callback): Add check that
4692 the thread_stopped target callback is not NULL before
4693 calling it.
4694
35adc03f
YQ
46952015-12-21 Yao Qi <yao.qi@linaro.org>
4696
4697 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4698 arm breakpoint.
4699
bd2b2909
AT
47002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4701
4702 * server.c (handle_query): Call target_supports_software_single_step.
4703
7fe5e27e
AT
47042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4705
4706 * linux-low.c (single_step): New function.
4707 (linux_resume_one_lwp_throw): Call single_step.
4708 (start_step_over): Likewise.
4709
d9311bfa
AT
47102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4711
4712 * Makefile.in (SFILES): Append arch/arm-linux.c,
4713 arch/arm-get-next-pcs.c.
4714 (arm-linux.o): New rule.
4715 (arm-get-next-pcs.o): New rule.
4716 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4717 arm-linux.o.
4718 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4719 to linux-aarch32-low.c.
4720 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4721 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4722 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4723 (thumb2_breakpoint_len): Likewise.
4724 (arm_is_thumb_mode): Make non-static.
4725 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4726 from linux-aarch32-low.c.
4727 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4728 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4729 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4730 (thumb2_breakpoint_len): Likewise.
4731 (arm_is_thumb_mode): New declaration.
4732 * linux-arm-low.c: Include arch/arm-linux.h
4733 aarch/arm-get-next-pcs.h, sys/syscall.h.
4734 (get_next_pcs_ops): New struct.
4735 (get_next_pcs_addr_bits_remove): New function.
4736 (get_next_pcs_is_thumb): New function.
4737 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4738 (arm_sigreturn_next_pc): Likewise.
4739 (get_next_pcs_syscall_next_pc): Likewise.
4740 (arm_gdbserver_get_next_pcs): Likewise.
4741 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4742 Initialize.
4743 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4744 * server.h: Include gdb_vecs.h.
4745
68ce2059
AT
47462015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4747
4748 * Makefile.in (SFILES): Append common/common-regcache.c.
4749 (OBS): Append common-regcache.o.
4750 (common-regcache.o): New rule.
4751 * regcache.c (init_register_cache): Initialize cache to
4752 REG_UNAVAILABLE.
4753 (regcache_raw_read_unsigned): New function.
4754 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4755 register_status enum.
4756
fa5308bd
AT
47572015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4758
4759 * linux-aarch64-low.c (the_low_targets): Rename
4760 breakpoint_reinsert_addr to get_next_pcs.
4761 * linux-arm-low.c (the_low_targets): Likewise.
4762 * linux-bfin-low.c (the_low_targets): Likewise.
4763 * linux-cris-low.c (the_low_targets): Likewise.
4764 * linux-crisv32-low.c (the_low_targets): Likewise.
4765 * linux-low.c (can_software_single_step): Likewise.
4766 (install_software_single_step_breakpoints): New function.
4767 (start_step_over): Use install_software_single_step_breakpoints.
4768 * linux-low.h: New CORE_ADDR vector.
4769 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4770 get_next_pcs.
4771 * linux-mips-low.c (the_low_targets): Likewise.
4772 * linux-nios2-low.c (the_low_targets): Likewise.
4773 * linux-sparc-low.c (the_low_targets): Likewise.
4774
4a6ed09b
PA
47752015-12-17 Pedro Alves <palves@redhat.com>
4776
4777 * linux-low.c (linux_kill_one_lwp): Remove references to
4778 LinuxThreads.
4779 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4780 to 'kill'.
4781 (linux_init_signals): Delete.
4782 (initialize_low): Adjust.
4783 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4784
7544db95
PA
47852015-12-16 Pedro Alves <palves@redhat.com>
4786
4787 * configure.ac (compiler warning flags): When testing a
4788 -Wno-foo option, check whether -Wfoo works instead.
4789 * configure: Regenerate.
4790
8020350c
DB
47912015-12-11 Don Breazeal <donb@codesourcery.com>
4792
4793 * server.c (process_serial_event): Don't exit from gdbserver
4794 in remote mode if there are still active inferiors.
4795
db91f502
YQ
47962015-12-11 Yao Qi <yao.qi@linaro.org>
4797
4798 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4799 arm_breakpoint_at if the process is 32-bit.
4800
b37a6290
YQ
48012015-12-11 Yao Qi <yao.qi@linaro.org>
4802
4803 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4804 arm breakpoint.
4805
17b1509a
YQ
48062015-12-07 Yao Qi <yao.qi@linaro.org>
4807
4808 * configure.srv: Append arm.o to srv_tgtobj for
4809 aarch64*-*-linux* target.
4810 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4811 from linux-arm-low.c.
4812 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4813 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4814 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4815 (thumb2_breakpoint_len): Likewise.
4816 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4817 (arm_breakpoint_kinds): Likewise.
4818 (arm_breakpoint_kind_from_pc): Likewise.
4819 (arm_sw_breakpoint_from_kind): Likewise.
4820 (arm_breakpoint_kind_from_current_state): Likewise.
4821 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4822 (arm_sw_breakpoint_from_kind): Declare.
4823 (arm_breakpoint_kind_from_current_state): Declare.
4824 (arm_breakpoint_at): Declare.
4825 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4826 arm_sw_breakpoint_from_kind if process is 32-bit.
4827 (aarch64_breakpoint_kind_from_pc): New function.
4828 (aarch64_breakpoint_kind_from_current_state): New function.
4829 (the_low_target): Initialize fields breakpoint_kind_from_pc
4830 and breakpoint_kind_from_current_state.
4831 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4832 linux-aarch32-low.c.
4833 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4834 (arm_breakpoint, arm_breakpoint_len): Likewise.
4835 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4836 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4837 (arm_is_thumb_mode): Likewise.
4838 (arm_breakpoint_at): Likewise.
4839 (arm_breakpoint_kind_from_pc): Likewise.
4840 (arm_sw_breakpoint_from_kind): Likewise.
4841 (arm_breakpoint_kind_from_current_state): Likewise.
4842
4843 Revert:
4844 2015-08-04 Yao Qi <yao.qi@linaro.org>
4845
4846 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4847 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4848 * server.c (extended_protocol): Remove "static".
4849 * server.h (extended_protocol): Declare it.
4850
ece66d65
JS
48512015-12-04 Josh Stone <jistone@redhat.com>
4852
4853 * target.h (struct target_ops) <arch_setup>: Rename to ...
4854 (struct target_ops) <post_create_inferior>: ... this.
4855 (target_arch_setup): Rename to ...
4856 (target_post_create_inferior): ... this, calling post_create_inferior.
4857 * server.c (start_inferior): Update target_arch_setup calls to
4858 target_post_create_inferior.
4859 * linux-low.c (linux_low_ptrace_options): Forward declare.
4860 (linux_arch_setup): Update its comment for general use.
4861 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4862 (struct linux_target_ops): Use linux_post_create_inferior.
4863 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4864 to post_create_inferior.
4865 * nto-low.c (struct nto_target_ops): Likewise.
4866 * spu-low.c (struct spu_target_ops): Likewise.
4867 * win32-low.c (struct win32_target_ops): Likewise.
4868
e58c48b4
AT
48692015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4870
4871 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4872
fbec8956
AT
48732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4874
4875 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4876 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4877 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4878 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4879 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4880 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4881 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4882 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4883 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4884 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4885 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4886 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4887
9b4c5f87
AT
48882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4889
4890 * linux-low.c (linux_look_up_symbols): Don't call
4891 linux_supports_traceclone.
4892 * linux-low.h (thread_db_init): Remove use_events argument.
4893 * thread-db.c (thread_db_use_event): Remove global variable.
4894 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4895 (struct thread_db) <td_create_bp>: Remove field.
4896 (thread_db_create_event): Remove function.
4897 (thread_db_enable_reporting): Likewise.
4898 (find_one_thread): Don't check for thread_db_use_events.
4899 (attach_thread): Likewise.
4900 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4901 (try_thread_db_load_1): Don't check for thread_db_use_events.
4902 (thread_db_init): Remove use_events argument and thread events
4903 handling.
4904 (remove_thread_event_breakpoints): Remove function.
4905 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4906
7d00775e
AT
49072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4908
4909 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4910 New function.
4911 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4912 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4913 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4914 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4915 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4916 Initialize.
4917 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4918 New function.
4919 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4920 * linux-low.c (can_hardware_single_step): Use
4921 supports_hardware_single_step.
4922 (can_software_single_step): New function.
4923 (start_step_over): Call can_software_single_step.
4924 (linux_supports_hardware_single_step): New function.
4925 (struct target_ops) <supports_software_single_step>: Initialize.
4926 * linux-low.h (struct linux_target_ops)
4927 <supports_hardware_single_step>: Initialize.
4928 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4929 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4930 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4931 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4932 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4933 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4934 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4935 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4936 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4937 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4938 Initialize.
4939 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4940 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4941 Initialize.
4942 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4943 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4944 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4945 New function.
4946 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4947 * target.h (struct target_ops): <supports_software_single_step>:
4948 New field.
4949 (target_supports_software_single_step): New macro.
4950
2d97cd35
AT
49512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4952
4953 * linux-low.c (linux_wait_1): Fix pc advance condition.
4954 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4955 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4956
769ef81f
AT
49572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4958
4959 * linux-arm-low.c (arm_is_thumb_mode): New function.
4960 (arm_breakpoint_at): Use arm_is_thumb_mode.
4961 (arm_breakpoint_kind_from_current_state): New function.
4962 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4963 Initialize.
4964 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4965 (linux_breakpoint_kind_from_current_state): New function.
4966 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4967 * linux-low.h (struct linux_target_ops)
4968 <breakpoint_kind_from_current_state>: New field.
4969 * target.h (struct target_ops): Likewise.
4970 (target_breakpoint_kind_from_current_state): New macro.
4971
1bebeeca
PA
49722015-11-30 Pedro Alves <palves@redhat.com>
4973
4974 * linux-low.c (linux_resume): Wake up the event loop before
4975 returning.
4976
a67a9fae
PA
49772015-11-30 Pedro Alves <palves@redhat.com>
4978
4979 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4980 check.
4981 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4982 to -1.
4983 * target.c (struct thread_search): New structure.
4984 (thread_search_callback): New function.
4985 (prev_general_thread): New global.
4986 (prepare_to_access_memory, done_accessing_memory): New functions.
4987 * target.h (prepare_to_access_memory, done_accessing_memory):
4988 Replace macros with function declarations.
4989
f2faf941
PA
49902015-11-30 Pedro Alves <palves@redhat.com>
4991
4992 PR 14618
4993 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4994 report TARGET_WAITKIND_NO_RESUMED.
4995 * remote-utils.c (prepare_resume_reply): Handle
4996 TARGET_WAITKIND_NO_RESUMED.
4997 * server.c (report_no_resumed): New global.
4998 (handle_query) <qSupported>: Handle "no-resumed+". Report
4999 "no-resumed+" support.
5000 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5001 return error if the client doesn't support no-resumed events.
5002 (push_stop_notification): New function.
5003 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5004 events if the client supports them.
5005
a681f9c9
PA
50062015-11-30 Pedro Alves <palves@redhat.com>
5007
5008 * linux-low.c (thread_still_has_status_pending_p): Don't check
5009 vCont;t here.
5010 (lwp_resumed): New function.
5011 (status_pending_p_callback): Return early if the LWP is not
5012 supposed to be resumed.
5013
65706a29
PA
50142015-11-30 Pedro Alves <palves@redhat.com>
5015
5016 * linux-low.c (handle_extended_wait): Assert that the LWP's
5017 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5018 thread create events, leave the new child's status pending.
5019 (linux_low_filter_event): If GDB wants to hear about thread exit
5020 events, leave the LWP marked dead and don't delete it.
5021 (linux_wait_for_event_filtered): Don't check for thread exit.
5022 (filter_exit_event): New function.
5023 (linux_wait_1): Use it, when returning an exit event.
5024 (linux_resume_one_lwp_throw): Assert that the LWP's
5025 waitstatus is TARGET_WAITKIND_IGNORE.
5026 * remote-utils.c (prepare_resume_reply): Handle
5027 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5028 * server.c (report_thread_events): New global.
5029 (handle_general_set): Handle QThreadEvents.
5030 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5031 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5032 TARGET_WAITKIND_THREAD_EXITED.
5033 * server.h (report_thread_events): Declare.
5034
56cf4bed
PA
50352015-11-30 Pedro Alves <palves@redhat.com>
5036
5037 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5038 the thread's last_resume_kind was resume_stop.
5039
500c1d85
PA
50402015-11-30 Pedro Alves <palves@redhat.com>
5041
5042 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5043 before returning.
5044
de979965
PA
50452015-11-30 Pedro Alves <palves@redhat.com>
5046
5047 * server.c (handle_v_requests): Handle vCtrlC.
5048
34c65914
PA
50492015-11-30 Pedro Alves <palves@redhat.com>
5050
5051 * gdbthread.h (find_any_thread_of_pid): Declare.
5052 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5053 functions.
5054 * server.c (handle_query): If current_thread is NULL, look for
5055 another thread of the selected process.
5056
79efa585 50572015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5058 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5059
5060 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5061 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5062 name in reply.
5063 * target.h (struct target_ops) <thread_name>: New field.
5064 (target_thread_name): New macro.
5065
80d82c19
JB
50662015-11-23 Joel Brobecker <brobecker@adacore.com>
5067
5068 * regcache.h (regcache_invalidate_pid): Add declaration.
5069 * regcache.c (regcache_invalidate_pid): New function, extracted
5070 from regcache_invalidate.
5071 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5072 Add trivial documentation comment.
5073 * lynx-low.c: Use regcache_invalidate_pid instead of
5074 regcache_invalidate.
5075
64da5dd5
JB
50762015-11-23 Joel Brobecker <brobecker@adacore.com>
5077
5078 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5079 and Elf64_auxv_t if the target is Android.
5080
37ce4055
DE
50812015-11-22 Doug Evans <xdje42@gmail.com>
5082
5083 * target.h: #include <sys/types.h>.
5084
06e03fff
PA
50852015-11-19 Pedro Alves <palves@redhat.com>
5086
5087 * linux-low.c (linux_process_qsupported): Change prototype.
5088 Adjust.
5089 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5090 Change prototype.
5091 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5092 and adjust to loop over all features.
5093 * server.c (handle_query) <qSupported>: Adjust to call
5094 target_process_qsupported once, passing it a vector of unprocessed
5095 features.
5096 * target.h (struct target_ops) <process_qsupported>: Change
5097 prototype.
5098 (target_process_qsupported): Adjust.
5099
9a084706
PA
51002015-11-19 Pedro Alves <palves@redhat.com>
5101
5102 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5103 mode.
5104 * configure: Regenerate.
5105
dad44a1f
PA
51062015-11-19 Pedro Alves <palves@redhat.com>
5107
5108 * configure: Regenerate.
5109
231c0592
YQ
51102015-11-19 Yao Qi <yao.qi@linaro.org>
5111
5112 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5113 type to uint32_t.
5114
6c1c9a8b
YQ
51152015-11-19 Yao Qi <yao.qi@linaro.org>
5116
5117 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5118 (struct aarch64_operand): Move enum out.
5119
9caa3311
YQ
51202015-11-19 Yao Qi <yao.qi@linaro.org>
5121
5122 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5123 struct user_fpsimd_state *.
5124 (aarch64_store_fpregset): Likewise.
5125
6a69a054
YQ
51262015-11-19 Yao Qi <yao.qi@linaro.org>
5127
5128 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5129 struct user_pt_regs *.
5130 (aarch64_store_gregset): Likewise.
5131
1798301e
PA
51322015-11-18 Pedro Alves <palves@redhat.com>
5133
5134 * Makefile.in (all_object_files): Add $IPA_OBJS.
5135
ce7715e2
PA
51362015-11-17 Pedro Alves <palves@redhat.com>
5137
5138 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5139 GDB_SIGNAL_0 and gdb_signal_to_string.
5140
c0879059
PA
51412015-11-17 Pedro Alves <palves@redhat.com>
5142
5143 * win32-low.c (handle_output_debug_string): Remove parameter.
5144 (win32_kill): Remove our_status local and adjust call to
5145 handle_output_debug_string.
5146 (get_child_debug_event): Adjust call to
5147 handle_output_debug_string.
5148
1996e237
SM
51492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5150
5151 * linux-mips-low.c (mips_fill_gregset): Add cast.
5152 (mips_store_gregset): Likewise.
5153 (mips_fill_fpregset): Likewise.
5154 (mips_store_fpregset): Likewise.
5155
cbec665b
SM
51562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5157
5158 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5159 priv.
5160
eb3e3c67
SM
51612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5162
5163 * linux-mips-low.c (mips_linux_new_thread): Change type of
5164 watch_type to enum target_hw_bp_type.
5165
171de4b8
SM
51662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5167
5168 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5169 Change return type to arm_hwbp_type.
5170
04248ead
SM
51712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5172
5173 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5174 (arm_store_gregset): Likewise.
5175 * linux-arm-low.c (arm_get_hwcap): Likewise.
5176 (arm_read_description): Likewise.
5177
04b3479c
SM
51782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5179
5180 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5181
2bc84e8a
SM
51822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5183
5184 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5185 (ppc_fill_vsxregset): Likewise.
5186 (ppc_store_vsxregset): Likewise.
5187 (ppc_fill_vrregset): Likewise.
5188 (ppc_store_vrregset): Likewise.
5189 (ppc_fill_evrregset): Likewise.
5190 (ppc_store_evrregset): Likewise.
5191
e6c5bb05
SM
51922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5193
5194 * linux-ppc-low.c (ppc_usrregs_info): Remove
5195 forward-declaration.
5196 (ppc_arch_setup): Move lower in file.
5197
7ea45d72
SM
51982015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5199
5200 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5201 (ps_pdwrite): Likewise.
5202
69291610
HW
52032015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5204
5205 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5206 to after assert checks.
5207
b42945fd
SM
52082015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5209
5210 * proc-service.c (ps_pdread): Add/adjust casts.
5211 (ps_pdwrite): Add/adjust casts.
5212
d6f85c84
SM
52132015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5214
5215 * server.c (handle_search_memory_1): Cast return value of
5216 memmem.
5217
f98cd059
SM
52182015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5219
5220 * server.c (write_qxfer_response): Change type of data to
5221 gdb_byte *.
5222
d2412fa5
PA
52232015-10-29 Pedro Alves <palves@redhat.com>
5224
5225 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5226
c17414a2
PA
52272015-10-29 Pedro Alves <palves@redhat.com>
5228
5229 * tracepoint.c (clear_installed_tracepoints): Add casts.
5230
e053fbc4
PA
52312015-10-29 Pedro Alves <palves@redhat.com>
5232
5233 * server.c (handle_v_cont, process_serial_event): Add enum
5234 gdb_signal casts to signal parsing code.
5235
add67df8
PA
52362015-10-29 Pedro Alves <palves@redhat.com>
5237
5238 * linux-low.h (NULL_REGSET): Define.
5239 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5240 * linux-arm-low.c (arm_regsets): Likewise.
5241 * linux-crisv32-low.c (cris_regsets): Likewise.
5242 * linux-m68k-low.c (m68k_regsets): Likewise.
5243 * linux-mips-low.c (mips_regsets): Likewise.
5244 * linux-nios2-low.c (nios2_regsets): Likewise.
5245 * linux-ppc-low.c (ppc_regsets): Likewise.
5246 * linux-s390-low.c (s390_regsets): Likewise.
5247 * linux-sh-low.c (sh_regsets): Likewise.
5248 * linux-sparc-low.c (sparc_regsets): Likewise.
5249 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5250 * linux-tile-low.c (tile_regsets): Likewise.
5251 * linux-x86-low.c (x86_regsets): Likewise.
5252 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5253
50bc912a
PA
52542015-10-29 Pedro Alves <palves@redhat.com>
5255
5256 * linux-low.h (NULL_REGSET): Define.
5257 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5258 * linux-arm-low.c (arm_regsets): Likewise.
5259 * linux-crisv32-low.c (cris_regsets): Likewise.
5260 * linux-m68k-low.c (m68k_regsets): Likewise.
5261 * linux-mips-low.c (mips_regsets): Likewise.
5262 * linux-nios2-low.c (nios2_regsets): Likewise.
5263 * linux-ppc-low.c (ppc_regsets): Likewise.
5264 * linux-s390-low.c (s390_regsets): Likewise.
5265 * linux-sh-low.c (sh_regsets): Likewise.
5266 * linux-sparc-low.c (sparc_regsets): Likewise.
5267 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5268 * linux-tile-low.c (tile_regsets): Likewise.
5269 * linux-x86-low.c (x86_regsets): Likewise.
5270 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5271
682b2546
DE
52722015-10-26 Doug Evans <dje@google.com>
5273
5274 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5275
963843d4
DE
52762015-10-26 Doug Evans <dje@google.com>
5277
5278 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5279
d41401ac
DE
52802015-10-26 Doug Evans <dje@google.com>
5281
5282 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5283 for debug_printf.
5284 (attach_thread, find_new_threads_callback): Ditto.
5285
3db28855
AT
52862015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5287
5288 * mem-break.h (set_breakpoint_data): Remove.
5289
fb78e89c
AT
52902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5291
5292 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5293 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5294 (initialize_low): Remove set_breakpoint_data call.
5295 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5296 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5297 (initialize_low): Remove set_breakpoint_data call.
5298 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5299 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5300 (initialize_low): Remove set_breakpoint_data call.
5301
2e6ee069
AT
53022015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5303
5304 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5305 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5306 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5307 * target.h (target_breakpoint_kind_from_pc): New macro.
5308
1652a986
AT
53092015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5310
5311 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5312 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5313 the default breakpoint kind.
5314
abeead09
AT
53152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5316
5317 * linux-arm-low.c (arm_supports_z_point_type): Add software
5318 breakpoint support.
5319
b0b4b501
AT
53202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5321
5322 * linux-arm-low.c: Refactor breakpoint definitions.
5323 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5324 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5325
8689682c
AT
53262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5327
5328 * Makefile.in: Add arm.c/o.
5329 * configure.srv: Likewise.
5330 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5331 (arm_breakpoint_kind_from_pc): New function.
5332 (arm_sw_breakpoint_from_kind): Return proper kind.
5333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5334
27165294
AT
53352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5336
5337 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5338 removal.
5339 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5340 (struct raw_breakpoint) <size>: Remove.
5341 (struct raw_breakpoint) <kind>: Add.
5342 (bp_size): New function.
5343 (bp_opcode): Likewise.
5344 (find_raw_breakpoint_at): Adjust for kind.
5345 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5346 (remove_memory_breakpoint): Adjust for kind call bp_size.
5347 (set_raw_breakpoint_at): Adjust for kind.
5348 (set_breakpoint): Likewise.
5349 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5350 (delete_raw_breakpoint): Adjust for kind.
5351 (delete_breakpoint): Likewise.
5352 (find_gdb_breakpoint): Likewise.
5353 (set_gdb_breakpoint_1): Likewise.
5354 (set_gdb_breakpoint): Likewise.
5355 (delete_gdb_breakpoint_1): Likewise.
5356 (delete_gdb_breakpoint): Likewise.
5357 (uninsert_raw_breakpoint): Likewise.
5358 (reinsert_raw_breakpoint): Likewise.
5359 (set_breakpoint_data): Remove.
5360 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5361 (check_mem_read): Adjust for kind call bp_size.
5362 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5363 (clone_one_breakpoint): Adjust for kind.
5364 * mem-break.h (set_gdb_breakpoint): Likewise.
5365 (delete_gdb_breakpoint): Likewise.
5366 * server.c (process_serial_event): Likewise.
5367
dd373349
AT
53682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5369
5370 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5371 (struct linux_target_ops) <breakpoint>: Remove.
5372 (struct linux_target_ops) <breakpoint_len>: Remove.
5373 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5374 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5375 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5376 (arm_sw_breakpoint_from_kind): New function.
5377 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5378 (struct linux_target_ops) <breakpoint>: Remove.
5379 (struct linux_target_ops) <breakpoint_len>: Remove.
5380 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5381 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5382 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5383 (struct linux_target_ops) <breakpoint>: Remove.
5384 (struct linux_target_ops) <breakpoint_len>: Remove.
5385 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5386 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5387 * linux-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5393 and sw_breakpoint_from_kind to increment the pc.
5394 (linux_breakpoint_kind_from_pc): New function.
5395 (linux_sw_breakpoint_from_kind): New function.
5396 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5397 (initialize_low): Call breakpoint_kind_from_pc and
5398 sw_breakpoint_from_kind to replace breakpoint_data/len.
5399 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5400 New field.
5401 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5402 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5403 (struct linux_target_ops) <breakpoint>: Remove.
5404 (struct linux_target_ops) <breakpoint_len>: Remove.
5405 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5406 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5407 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5408 (struct linux_target_ops) <breakpoint>: Remove.
5409 (struct linux_target_ops) <breakpoint_len>: Remove.
5410 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5411 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5412 * linux-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5448 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5449 (struct linux_target_ops) <breakpoint>: Remove.
5450 (struct linux_target_ops) <breakpoint_len>: Remove.
5451 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5452 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5453 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5454 (struct linux_target_ops) <breakpoint>: Remove.
5455 (struct linux_target_ops) <breakpoint_len>: Remove.
5456 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5457 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5458
4cd98a19
AT
54592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5460
5461 * linux-cris-low.c (cris_get_pc): Remove void arg.
5462
774ee6d2
AR
54632015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5464
5465 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5466 variable name.
5467
833dcd29
AR
54682015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5469
5470 * inferiors.c (thread_pid_matches_callback): New function.
5471 (find_thread_process): New function.
5472 (remove_thread): Reset current_thread.
5473 (remove_process): Assert threads have been removed first.
5474
8d689ee5
YQ
54752015-10-15 Yao Qi <yao.qi@linaro.org>
5476
5477 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5478 if it is 3.
5479 (aarch64_remove_point): Likewise.
5480 * regcache.c (regcache_register_size): New function.
5481
1c2e1515
YQ
54822015-10-12 Yao Qi <yao.qi@linaro.org>
5483
5484 * linux-aarch64-low.c: Update all callers as emit_load_store
5485 is renamed to aarch64_emit_load_store.
5486
e1c587c3
YQ
54872015-10-12 Yao Qi <yao.qi@linaro.org>
5488
5489 * linux-aarch64-low.c: Update all callers of function renaming
5490 from emit_insn to aarch64_emit_insn.
5491
b6542f81
YQ
54922015-10-12 Yao Qi <yao.qi@linaro.org>
5493
5494 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5495 arch/aarch64-insn.h.
5496 (struct aarch64_memory_operand): Likewise.
5497 (ENCODE): Likewise.
5498 (emit_insn): Move to arch/aarch64-insn.c.
5499 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5500 (emit_load_store): Move to arch/aarch64-insn.c.
5501 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5502 (can_encode_int32): Remove.
5503
246994ce
YQ
55042015-10-12 Yao Qi <yao.qi@linaro.org>
5505
5506 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5507 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5508 (aarch64_relocate_instruction): Likewise.
5509 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5510 (struct aarch64_insn_visitor): Likewise.
5511
0badd99f
YQ
55122015-10-12 Yao Qi <yao.qi@linaro.org>
5513
5514 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5515 (struct aarch64_insn_visitor): New.
5516 (struct aarch64_insn_relocation_data): New.
5517 (aarch64_ftrace_insn_reloc_b): New function.
5518 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5519 (aarch64_ftrace_insn_reloc_cb): Likewise.
5520 (aarch64_ftrace_insn_reloc_tb): Likewise.
5521 (aarch64_ftrace_insn_reloc_adr): Likewise.
5522 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5523 (aarch64_ftrace_insn_reloc_others): Likewise.
5524 (visitor): New.
5525 (aarch64_relocate_instruction): Use visitor.
5526
dfaffe9d
YQ
55272015-10-12 Yao Qi <yao.qi@linaro.org>
5528
5529 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5530 int. Add argument buf.
5531 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5532 aarch64_relocate_instruction.
5533
70b439f0
YQ
55342015-10-12 Yao Qi <yao.qi@linaro.org>
5535
5536 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5537 argument insn. Remove local variable insn. Don't call
5538 target_read_uint32.
5539 (aarch64_install_fast_tracepoint_jump_pad): Call
5540 target_read_uint32.
5541
7781c06f
YQ
55422015-09-30 Yao Qi <yao.qi@linaro.org>
5543
5544 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5545 (emit_load_store_pair): Likewise.
5546
9a3c8263
SM
55472015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5548
5549 * dll.c (match_dll): Add cast(s).
5550 (unloaded_dll): Likewise.
5551 * linux-low.c (second_thread_of_pid_p): Likewise.
5552 (delete_lwp_callback): Likewise.
5553 (count_events_callback): Likewise.
5554 (select_event_lwp_callback): Likewise.
5555 (linux_set_resume_request): Likewise.
5556 * server.c (accumulate_file_name_length): Likewise.
5557 (emit_dll_description): Likewise.
5558 (handle_qxfer_threads_worker): Likewise.
5559 (visit_actioned_threads): Likewise.
5560 * thread-db.c (any_thread_of): Likewise.
5561 * tracepoint.c (same_process_p): Likewise.
5562 (match_blocktype): Likewise.
5563 (build_traceframe_info_xml): Likewise.
5564
224c3ddb
SM
55652015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5566
5567 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5568 assignment.
5569 (gdb_unparse_agent_expr): Likewise.
5570 * hostio.c (require_data): Likewise.
5571 (handle_pread): Likewise.
5572 * linux-low.c (disable_regset): Likewise.
5573 (fetch_register): Likewise.
5574 (store_register): Likewise.
5575 (get_dynamic): Likewise.
5576 (linux_qxfer_libraries_svr4): Likewise.
5577 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5578 (set_fast_tracepoint_jump): Likewise.
5579 (uninsert_fast_tracepoint_jumps_at): Likewise.
5580 (reinsert_fast_tracepoint_jumps_at): Likewise.
5581 (validate_inserted_breakpoint): Likewise.
5582 (clone_agent_expr): Likewise.
5583 * regcache.c (init_register_cache): Likewise.
5584 * remote-utils.c (putpkt_binary_1): Likewise.
5585 (decode_M_packet): Likewise.
5586 (decode_X_packet): Likewise.
5587 (look_up_one_symbol): Likewise.
5588 (relocate_instruction): Likewise.
5589 (monitor_output): Likewise.
5590 * server.c (handle_search_memory): Likewise.
5591 (handle_qxfer_exec_file): Likewise.
5592 (handle_qxfer_libraries): Likewise.
5593 (handle_qxfer): Likewise.
5594 (handle_query): Likewise.
5595 (handle_v_cont): Likewise.
5596 (handle_v_run): Likewise.
5597 (captured_main): Likewise.
5598 * target.c (write_inferior_memory): Likewise.
5599 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5600 * tracepoint.c (init_trace_buffer): Likewise.
5601 (add_tracepoint_action): Likewise.
5602 (add_traceframe): Likewise.
5603 (add_traceframe_block): Likewise.
5604 (cmd_qtdpsrc): Likewise.
5605 (cmd_qtdv): Likewise.
5606 (cmd_qtstatus): Likewise.
5607 (response_source): Likewise.
5608 (response_tsv): Likewise.
5609 (cmd_qtnotes): Likewise.
5610 (gdb_collect): Likewise.
5611 (initialize_tracepoint): Likewise.
5612
afbe19f8
PL
56132015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5614
5615 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5616 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5617 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5618 <NOP>: New.
5619 (enum aarch64_condition_codes): New enum.
5620 (w0): New static global.
5621 (fp): Likewise.
5622 (lr): Likewise.
5623 (struct aarch64_memory_operand) <type>: New
5624 MEMORY_OPERAND_POSTINDEX type.
5625 (postindex_memory_operand): New helper function.
5626 (emit_ret): New function.
5627 (emit_load_store_pair): New function, factored out of emit_stp
5628 with support for MEMORY_OPERAND_POSTINDEX.
5629 (emit_stp): Rewrite using emit_load_store_pair.
5630 (emit_ldp): New function.
5631 (emit_load_store): Likewise.
5632 (emit_ldr): Mention post-index instruction in comment.
5633 (emit_ldrh): New function.
5634 (emit_ldrb): New function.
5635 (emit_ldrsw): Mention post-index instruction in comment.
5636 (emit_str): Likewise.
5637 (emit_subs): New function.
5638 (emit_cmp): Likewise.
5639 (emit_and): Likewise.
5640 (emit_orr): Likewise.
5641 (emit_orn): Likewise.
5642 (emit_eor): Likewise.
5643 (emit_mvn): Likewise.
5644 (emit_lslv): Likewise.
5645 (emit_lsrv): Likewise.
5646 (emit_asrv): Likewise.
5647 (emit_mul): Likewise.
5648 (emit_sbfm): Likewise.
5649 (emit_sbfx): Likewise.
5650 (emit_ubfm): Likewise.
5651 (emit_ubfx): Likewise.
5652 (emit_csinc): Likewise.
5653 (emit_cset): Likewise.
5654 (emit_nop): Likewise.
5655 (emit_ops_insns): New helper function.
5656 (emit_pop): Likewise.
5657 (emit_push): Likewise.
5658 (aarch64_emit_prologue): New function.
5659 (aarch64_emit_epilogue): Likewise.
5660 (aarch64_emit_add): Likewise.
5661 (aarch64_emit_sub): Likewise.
5662 (aarch64_emit_mul): Likewise.
5663 (aarch64_emit_lsh): Likewise.
5664 (aarch64_emit_rsh_signed): Likewise.
5665 (aarch64_emit_rsh_unsigned): Likewise.
5666 (aarch64_emit_ext): Likewise.
5667 (aarch64_emit_log_not): Likewise.
5668 (aarch64_emit_bit_and): Likewise.
5669 (aarch64_emit_bit_or): Likewise.
5670 (aarch64_emit_bit_xor): Likewise.
5671 (aarch64_emit_bit_not): Likewise.
5672 (aarch64_emit_equal): Likewise.
5673 (aarch64_emit_less_signed): Likewise.
5674 (aarch64_emit_less_unsigned): Likewise.
5675 (aarch64_emit_ref): Likewise.
5676 (aarch64_emit_if_goto): Likewise.
5677 (aarch64_emit_goto): Likewise.
5678 (aarch64_write_goto_address): Likewise.
5679 (aarch64_emit_const): Likewise.
5680 (aarch64_emit_call): Likewise.
5681 (aarch64_emit_reg): Likewise.
5682 (aarch64_emit_pop): Likewise.
5683 (aarch64_emit_stack_flush): Likewise.
5684 (aarch64_emit_zero_ext): Likewise.
5685 (aarch64_emit_swap): Likewise.
5686 (aarch64_emit_stack_adjust): Likewise.
5687 (aarch64_emit_int_call_1): Likewise.
5688 (aarch64_emit_void_call_2): Likewise.
5689 (aarch64_emit_eq_goto): Likewise.
5690 (aarch64_emit_ne_goto): Likewise.
5691 (aarch64_emit_lt_goto): Likewise.
5692 (aarch64_emit_le_goto): Likewise.
5693 (aarch64_emit_gt_goto): Likewise.
5694 (aarch64_emit_ge_got): Likewise.
5695 (aarch64_emit_ops_impl): New static global variable.
5696 (aarch64_emit_ops): New target function, return
5697 &aarch64_emit_ops_impl.
5698 (struct linux_target_ops): Install it.
5699
bb903df0
PL
57002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5701
5702 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5703 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5704 aarch64-ipa.o.
5705 * linux-aarch64-ipa.c: New file.
5706 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5707 and endian.h.
5708 (aarch64_get_thread_area): New target method.
5709 (extract_signed_bitfield): New helper function.
5710 (aarch64_decode_ldr_literal): New function.
5711 (enum aarch64_opcodes): New enum.
5712 (struct aarch64_register): New struct.
5713 (struct aarch64_operand): New struct.
5714 (x0): New static global.
5715 (x1): Likewise.
5716 (x2): Likewise.
5717 (x3): Likewise.
5718 (x4): Likewise.
5719 (w2): Likewise.
5720 (ip0): Likewise.
5721 (sp): Likewise.
5722 (xzr): Likewise.
5723 (aarch64_register): New helper function.
5724 (register_operand): Likewise.
5725 (immediate_operand): Likewise.
5726 (struct aarch64_memory_operand): New struct.
5727 (offset_memory_operand): New helper function.
5728 (preindex_memory_operand): Likewise.
5729 (enum aarch64_system_control_registers): New enum.
5730 (ENCODE): New macro.
5731 (emit_insn): New helper function.
5732 (emit_b): New function.
5733 (emit_bcond): Likewise.
5734 (emit_cb): Likewise.
5735 (emit_tb): Likewise.
5736 (emit_blr): Likewise.
5737 (emit_stp): Likewise.
5738 (emit_ldp_q_offset): Likewise.
5739 (emit_stp_q_offset): Likewise.
5740 (emit_load_store): Likewise.
5741 (emit_ldr): Likewise.
5742 (emit_ldrsw): Likewise.
5743 (emit_str): Likewise.
5744 (emit_ldaxr): Likewise.
5745 (emit_stxr): Likewise.
5746 (emit_stlr): Likewise.
5747 (emit_data_processing_reg): Likewise.
5748 (emit_data_processing): Likewise.
5749 (emit_add): Likewise.
5750 (emit_sub): Likewise.
5751 (emit_mov): Likewise.
5752 (emit_movk): Likewise.
5753 (emit_mov_addr): Likewise.
5754 (emit_mrs): Likewise.
5755 (emit_msr): Likewise.
5756 (emit_sevl): Likewise.
5757 (emit_wfe): Likewise.
5758 (append_insns): Likewise.
5759 (can_encode_int32_in): New helper function.
5760 (aarch64_relocate_instruction): New function.
5761 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5762 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5763 (struct linux_target_ops): Install aarch64_get_thread_area,
5764 aarch64_install_fast_tracepoint_jump_pad and
5765 aarch64_get_min_fast_tracepoint_insn_len.
5766
787749ea
PL
57672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5768
5769 * Makefile.in (aarch64-insn.o): New rule.
5770 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5771
9812b2e6
YQ
57722015-09-21 Yao Qi <yao.qi@linaro.org>
5773
5774 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5775
18fe412b
YQ
57762015-09-21 Yao Qi <yao.qi@linaro.org>
5777
5778 * tracepoint.c (max_jump_pad_size): Remove.
5779
a0cc84cd
YQ
57802015-09-18 Yao Qi <yao.qi@linaro.org>
5781
5782 * linux-aarch64-low.c: Don't include sys/uio.h.
5783 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5784
d78908cf
WW
57852015-09-16 Wei-cheng Wang <cole945@gmail.com>
5786
5787 * tracepoint.c (eval_result_type): Change prototype.
5788 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5789
d57e0d50
PA
57902015-09-15 Pedro Alves <palves@redhat.com>
5791
5792 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5793 Check whether to report exec events instead of checking whether
5794 multiprocess is enabled.
5795
5a676acc
PA
57962015-09-15 Pedro Alves <palves@redhat.com>
5797
5798 PR remote/18965
5799 * remote-utils.c (prepare_resume_reply): Merge
5800 TARGET_WAITKIND_VFORK_DONE switch case with the
5801 TARGET_WAITKIND_FORKED case.
5802
7c5d0fad
YQ
58032015-09-15 Yao Qi <yao.qi@linaro.org>
5804
5805 * server.c (handle_query): Check string comparison using
5806 "else if" instead of "if".
5807
750ce8d1
YQ
58082015-09-15 Yao Qi <yao.qi@linaro.org>
5809
5810 * server.c (vCont_supported): New global variable.
5811 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5812 matches. Append ";vContSupported+" to own_buf.
5813 (handle_v_requests): Append ";s;S" to own_buf if target supports
5814 hardware single step or vCont_supported is false.
5815 (capture_main): Set vCont_supported to zero.
5816
70b90b91
YQ
58172015-09-15 Yao Qi <yao.qi@linaro.org>
5818
5819 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5820 it to ...
5821 (linux_supports_hardware_single_step): ... New function.
5822 (linux_target_ops): Update.
5823 * lynx-low.c (lynx_target_ops): Set field
5824 supports_hardware_single_step to target_can_do_hardware_single_step.
5825 * nto-low.c (nto_target_ops): Likewise.
5826 * spu-low.c (spu_target_ops): Likewise.
5827 * win32-low.c (win32_target_ops): Likewise.
5828 * target.c (target_can_do_hardware_single_step): New function.
5829 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5830 Remove. <supports_hardware_single_step>: New field.
5831 (target_supports_conditional_breakpoints): Remove.
5832 (target_supports_hardware_single_step): New macro.
5833 (target_can_do_hardware_single_step): Declare.
5834 * server.c (handle_query): Use target_supports_hardware_single_step
5835 instead of target_supports_conditional_breakpoints.
5836
ade90bde
YQ
58372015-09-15 Yao Qi <yao.qi@linaro.org>
5838
5839 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5840 function.
5841 (struct linux_target_ops the_low_target): Install
5842 aarch64_linux_siginfo_fixup.
5843
94585166
DB
58442015-09-11 Don Breazeal <donb@codesourcery.com>
5845 Luis Machado <lgustavo@codesourcery.com>
5846
5847 * linux-low.c (linux_mourn): Static declaration.
5848 (linux_arch_setup): Move in front of
5849 handle_extended_wait.
5850 (linux_arch_setup_thread): New function.
5851 (handle_extended_wait): Handle exec events. Call
5852 linux_arch_setup_thread. Make event_lwp argument a
5853 pointer-to-a-pointer.
5854 (check_zombie_leaders): Do not check stopped threads.
5855 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5856 (linux_low_filter_event): Add lwp and thread for exec'ing
5857 non-leader thread if leader thread has been deleted.
5858 Refactor code into linux_arch_setup_thread and call it.
5859 Pass child lwp pointer by reference to handle_extended_wait.
5860 (linux_wait_for_event_filtered): Update comment.
5861 (linux_wait_1): Prevent clobbering exec event status.
5862 (linux_supports_exec_events): New function.
5863 (linux_target_ops) <supports_exec_events>: Initialize new member.
5864 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5865 new member.
5866 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5867 * server.c (report_exec_events): New global variable.
5868 (handle_query): Handle qSupported query for exec-events feature.
5869 (captured_main): Initialize report_exec_events.
5870 * server.h (report_exec_events): Declare new global variable.
5871 * target.h (struct target_ops) <supports_exec_events>: New
5872 member.
5873 (target_supports_exec_events): New macro.
5874 * win32-low.c (win32_target_ops) <supports_exec_events>:
5875 Initialize new member.
5876
0568462b
MM
58772015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5878
5879 * linux-low.c (linux_low_enable_btrace): Remove.
5880 (linux_target_ops): Replace linux_low_enable_btrace with
5881 linux_enable_btrace.
5882
39edd165
YQ
58832015-09-03 Yao Qi <yao.qi@linaro.org>
5884
5885 * linux-aarch64-low.c (aarch64_insert_point): Call
5886 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5887 returns true.
5888
1db33b5a
UW
58892015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5890
5891 * linux-low.c (check_stopped_by_breakpoint): Use
5892 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5893
ab290430
PA
58942015-08-27 Pedro Alves <palves@redhat.com>
5895
5896 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5897
8d749320
SM
58982015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5899
6711b7f8
SM
5900 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5901 the XNEW-family equivalent.
8d749320
SM
5902 (compile_bytecodes): Likewise.
5903 * dll.c (loaded_dll): Likewise.
5904 * event-loop.c (append_callback_event): Likewise.
5905 (create_file_handler): Likewise.
5906 (create_file_event): Likewise.
5907 * hostio.c (handle_open): Likewise.
5908 * inferiors.c (add_thread): Likewise.
5909 (add_process): Likewise.
5910 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5911 * linux-arm-low.c (arm_new_process): Likewise.
5912 (arm_new_thread): Likewise.
5913 * linux-low.c (add_to_pid_list): Likewise.
5914 (linux_add_process): Likewise.
5915 (handle_extended_wait): Likewise.
5916 (add_lwp): Likewise.
5917 (enqueue_one_deferred_signal): Likewise.
5918 (enqueue_pending_signal): Likewise.
5919 (linux_resume_one_lwp_throw): Likewise.
5920 (linux_resume_one_thread): Likewise.
5921 (linux_read_memory): Likewise.
5922 (linux_write_memory): Likewise.
5923 * linux-mips-low.c (mips_linux_new_process): Likewise.
5924 (mips_linux_new_thread): Likewise.
5925 (mips_add_watchpoint): Likewise.
5926 * linux-x86-low.c (initialize_low_arch): Likewise.
5927 * lynx-low.c (lynx_add_process): Likewise.
5928 * mem-break.c (set_raw_breakpoint_at): Likewise.
5929 (set_breakpoint): Likewise.
5930 (add_condition_to_breakpoint): Likewise.
5931 (add_commands_to_breakpoint): Likewise.
5932 (clone_agent_expr): Likewise.
5933 (clone_one_breakpoint): Likewise.
5934 * regcache.c (new_register_cache): Likewise.
5935 * remote-utils.c (look_up_one_symbol): Likewise.
5936 * server.c (queue_stop_reply): Likewise.
5937 (start_inferior): Likewise.
5938 (queue_stop_reply_callback): Likewise.
5939 (handle_target_event): Likewise.
5940 * spu-low.c (fetch_ppc_memory): Likewise.
5941 (store_ppc_memory): Likewise.
5942 * target.c (set_target_ops): Likewise.
5943 * thread-db.c (thread_db_load_search): Likewise.
5944 (try_thread_db_load_1): Likewise.
5945 * tracepoint.c (add_tracepoint): Likewise.
5946 (add_tracepoint_action): Likewise.
5947 (create_trace_state_variable): Likewise.
5948 (cmd_qtdpsrc): Likewise.
5949 (cmd_qtro): Likewise.
5950 (add_while_stepping_state): Likewise.
5951 * win32-low.c (child_add_thread): Likewise.
5952 (get_image_name): Likewise.
5953
ed8b7b42
YQ
59542015-08-25 Yao Qi <yao.qi@linaro.org>
5955
5956 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5957
db3cb7cb
YQ
59582015-08-25 Yao Qi <yao.qi@linaro.org>
5959
5960 * Makefile.in (aarch64-linux.o): New rule.
5961 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5962 srv_tgtobj.
5963 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5964 (aarch64_init_debug_reg_state): Make it extern.
5965 (aarch64_linux_prepare_to_resume): Remove.
5966
f6011a1c
YQ
59672015-08-25 Yao Qi <yao.qi@linaro.org>
5968
5969 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5970 lwp_arch_private_info and ptid_of_lwp.
5971
88e2cf7e
YQ
59722015-08-25 Yao Qi <yao.qi@linaro.org>
5973
5974 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5975 Find proc_info by find_process_pid. All callers updated.
5976
5e35436e
YQ
59772015-08-25 Yao Qi <yao.qi@linaro.org>
5978
5979 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5980 Remove.
5981 (debug_reg_change_callback): Remove.
5982 (aarch64_notify_debug_reg_change): Remove.
5983
4a8a7965
YQ
59842015-08-25 Yao Qi <yao.qi@linaro.org>
5985
5986 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5987 Call current_lwp_ptid.
5988
32a271ee
YQ
59892015-08-25 Yao Qi <yao.qi@linaro.org>
5990
5991 * linux-aarch64-low.c (debug_reg_change_callback): Use
5992 debug_printf.
5993
0d51c8d7
YQ
59942015-08-25 Yao Qi <yao.qi@linaro.org>
5995
5996 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5997
31a43dd5
YQ
59982015-08-25 Yao Qi <yao.qi@linaro.org>
5999
6000 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6001
8ee52567
YQ
60022015-08-25 Yao Qi <yao.qi@linaro.org>
6003
6004 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6005 the code.
6006
ff3f0f45
YQ
60072015-08-25 Yao Qi <yao.qi@linaro.org>
6008
6009 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6010 Remove.
6011 (debug_reg_change_callback): Remove argument entry and add argument
6012 lwp. Remove local variable thread. Don't print thread id in the
6013 debugging output. Don't check whether pid of thread equals to pid.
6014 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6015 iterate_over_lwps instead find_inferior.
6016
3d40fbb5
PA
60172015-08-24 Pedro Alves <palves@redhat.com>
6018
6019 * inferiors.c (get_first_process): New function.
6020 * inferiors.h (get_first_process): New declaration.
6021 * remote-utils.c (read_ptid): Default to the first process in the
6022 list, instead of to the current thread's process.
6023
438e1e42
PA
60242015-08-24 Pedro Alves <palves@redhat.com>
6025
6026 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6027 * event-loop.c: Likewise.
6028 * remote-utils.c: Likewise.
6029 * tracepoint.c: Likewise.
6030
a8c6d4fc
PA
60312015-08-24 Pedro Alves <palves@redhat.com>
6032
6033 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6034 ptid_get_lwp.
6035
99b0bb12
PA
60362015-08-21 Pedro Alves <palves@redhat.com>
6037
6038 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6039 instead of literal 1.
6040
f8904751
PA
60412015-08-21 Pedro Alves <palves@redhat.com>
6042
6043 * tdesc.c (default_description): Explicitly zero-initialize.
6044
465a859e
PA
60452015-08-21 Pedro Alves <palves@redhat.com>
6046
6047 PR gdb/18749
6048 * inferiors.c (remove_thread): Discard any pending stop reply for
6049 this thread.
6050 * server.c (remove_all_on_match_pid): Rename to ...
6051 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6052 instead of a pid.
6053 (discard_queued_stop_replies): Change parameter to a ptid. Now
6054 extern.
6055 (handle_v_kill, kill_inferior_callback, captured_main)
6056 (process_serial_event): Adjust.
6057 * server.h (discard_queued_stop_replies): Declare.
6058
f0db101d
PA
60592015-08-21 Pedro Alves <palves@redhat.com>
6060
6061 * linux-low.c (wait_for_sigstop): Always switch to no thread
6062 selected if the previously current thread dies.
6063 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6064 process instead of the current thread's.
6065 * remote-utils.c (input_interrupt): Don't check if there's no
6066 current thread.
6067 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6068 current thread to the general thread fails, error out.
6069 (handle_qxfer_auxv, handle_qxfer_libraries)
6070 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6071 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6072 (handle_query): Check if there's a thread selected instead of
6073 checking whether there's any thread in the thread list.
6074 (handle_qxfer_threads, handle_qxfer_btrace)
6075 (handle_qxfer_btrace_conf): Don't error out early if there's no
6076 thread in the thread list.
6077 (handle_v_cont, myresume): Don't set the current thread to the
6078 continue thread.
6079 (process_serial_event) <Hg handling>: Also set thread_id if the
6080 previous general thread is still alive.
6081 (process_serial_event) <g/G handling>: If setting the current
6082 thread to the general thread fails, error out.
6083 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6084 thread's lwp instead of the current thread's.
6085 * target.c (set_desired_thread): If the desired thread was not
6086 found, leave the current thread pointing to NULL. Return an int
6087 (boolean) indicating success.
6088 * target.h (set_desired_thread): Change return type to int.
6089
40045d91
MF
60902015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6091
6092 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6093 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6094 #includes.
6095 (ps_get_thread_area): New function.
6096
45face3b
GB
60972015-08-19 Gary Benson <gbenson@redhat.com>
6098
6099 * hostio.c (handle_pread): Do not attempt to read more data
6100 than hostio_reply_with_data can fit in a packet.
6101
16d5f642
JB
61022015-08-18 Joel Brobecker <brobecker@adacore.com>
6103
6104 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6105
a738da3a
MF
61062015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6107
6108 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6109
33ebda9d
PA
61102015-08-06 Pedro Alves <palves@redhat.com>
6111
6112 * tracepoint.c (expr_eval_result): Now an int.
6113
a44892be
PA
61142015-08-06 Pedro Alves <palves@redhat.com>
6115
6116 * gdbthread.h (struct regcache): Forward declare.
6117 (struct thread_info) <regcache_data>: Now a struct regcache
6118 pointer.
6119 * inferiors.c (inferior_regcache_data)
6120 (set_inferior_regcache_data): Now work with struct regcache
6121 pointers.
6122 * inferiors.h (struct regcache): Forward declare.
6123 (inferior_regcache_data, set_inferior_regcache_data): Now work
6124 with struct regcache pointers.
6125 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6126 (free_register_cache_thread): Remove struct regcache pointer
6127 casts.
6128
608a1e46
PA
61292015-08-06 Pedro Alves <palves@redhat.com>
6130
6131 * server.c (captured_main): On error, print the exception message
6132 to stderr, and if run_once is set, throw a quit.
6133
f0ce0d3a
PA
61342015-08-06 Pedro Alves <palves@redhat.com>
6135
6136 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6137 the current thread.
6138
bf47e248
PA
61392015-08-06 Pedro Alves <palves@redhat.com>
6140
6141 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6142 reading beyond the passed in buffer length.
6143
b6b9ffcc
PL
61442015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6145
6146 * tracepoint.c (symbol_list) <required>: Remove.
6147
863d01bd
PA
61482015-08-06 Pedro Alves <palves@redhat.com>
6149
6150 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6151 count if stopping and suspending threads.
6152 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6153 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6154 (linux_detach): Complete an ongoing step-over.
6155 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6156 throughout.
6157 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6158 (linux_wait_1): If passing a signal to the inferior after
6159 finishing a step-over, unsuspend and re-resume all lwps. If we
6160 see a single-step event but the thread should be continuing, don't
6161 pass the trap to gdb.
6162 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6163 internal_error instead of gdb_assert.
6164 (enqueue_pending_signal): New function.
6165 (check_ptrace_stopped_lwp_gone): Add debug output.
6166 (start_step_over): Use internal_error instead of gdb_assert.
6167 (complete_ongoing_step_over): New function.
6168 (linux_resume_one_thread): Don't resume a suspended thread.
6169 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6170 it stepping.
6171
00db26fa
PA
61722015-08-06 Pedro Alves <palves@redhat.com>
6173
6174 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6175 (linux_thread_alive): Use lwp_is_marked_dead.
6176 (extended_event_reported): Delete.
6177 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6178 instead of extended_event_reported.
6179 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6180 as well.
6181 (lwp_is_marked_dead): New function.
6182 (lwp_running): Use lwp_is_marked_dead.
6183 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6184 comment.
6185
ad071a30
PA
61862015-08-06 Pedro Alves <palves@redhat.com>
6187
6188 * linux-low.c (linux_wait_1): Move fork event output out of the
6189 !report_to_gdb check. Pass event_child->waitstatus to
6190 target_waitstatus_to_string instead of ourstatus.
6191
524b57e6
YQ
61922015-08-04 Yao Qi <yao.qi@linaro.org>
6193
6194 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6195 if current_thread is 32 bit.
6196
6085d6f6
YQ
61972015-08-04 Yao Qi <yao.qi@linaro.org>
6198
6199 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6200 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6201 * server.c (extended_protocol): Remove "static".
6202 * server.h (extended_protocol): Declare it.
6203
8a7e4587
YQ
62042015-08-04 Yao Qi <yao.qi@linaro.org>
6205
6206 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6207 both aarch64 and aarch32.
6208 (aarch64_set_pc): Likewise.
6209
3b53ae99
YQ
62102015-08-04 Yao Qi <yao.qi@linaro.org>
6211
6212 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6213 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6214 arm-with-neon.xml to srv_xmlfiles.
6215 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6216 (is_64bit_tdesc): New function.
6217 (aarch64_linux_read_description): New function.
6218 (aarch64_arch_setup): Call aarch64_linux_read_description.
6219 (regs_info): Rename to regs_info_aarch64.
6220 (aarch64_regs_info): Return right regs_info.
6221 (initialize_low_arch): Call initialize_low_arch_aarch32.
6222
bd9e6534
YQ
62232015-08-04 Yao Qi <yao.qi@linaro.org>
6224
6225 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6226 * linux-aarch32-low.c: New file.
6227 * linux-aarch32-low.h: New file.
6228 * linux-arm-low.c (arm_fill_gregset): Move it to
6229 linux-aarch32-low.c.
6230 (arm_store_gregset): Likewise.
6231 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6232 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6233 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6234 (regs_info): Rename to regs_info_arm.
6235 (arm_regs_info): Return regs_info_aarch32 if
6236 have_ptrace_getregset is 1 and target description is
6237 arm_with_neon or arm_with_vfpv3.
6238 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6239 Call initialize_low_arch_aarch32 instead.
6240
ded48a5e
YQ
62412015-08-04 Yao Qi <yao.qi@linaro.org>
6242
6243 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6244 * linux-low.c: ... here.
6245 * linux-low.h (have_ptrace_getregset): Declare it.
6246
96e9210f
PA
62472015-08-04 Pedro Alves <palves@redhat.com>
6248
6249 * thread-db.c (struct thread_db): Use new typedefs.
6250 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6251 CHK calls.
6252 (disable_thread_event_reporting): Cast result of dlsym to
6253 destination function pointer type.
6254 (thread_db_mourn): Use td_ta_delete_ftype.
6255
af60a1ef
SL
62562015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6257
6258 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6259 arch variant.
6260 (CDX_BREAKPOINT): Define for R2.
6261 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6262 (the_low_target): Add comments.
6263
e8b41681
YQ
62642015-07-30 Yao Qi <yao.qi@linaro.org>
6265
6266 * linux-arm-low.c (arm_hwcap): Remove it.
6267 (arm_read_description): New local variable arm_hwcap. Don't
6268 set arm_hwcap to zero.
6269
89abb039
YQ
62702015-07-30 Yao Qi <yao.qi@linaro.org>
6271
6272 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6273 Use regcache->tdesc instead.
6274 (arm_store_wmmxregset): Likewise.
6275 (arm_fill_vfpregset): Likewise.
6276 (arm_store_vfpregset): Likewise.
6277
deca266c
YQ
62782015-07-30 Yao Qi <yao.qi@linaro.org>
6279
6280 * linux-arm-low.c: Include arch/arm.h.
6281 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6282 (arm_store_gregset): Likewise.
6283
aa58a496
SM
62842015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6285
6286 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6287 ptrace's 4th parameter.
6288
50904b25
YQ
62892015-07-27 Yao Qi <yao.qi@linaro.org>
6290
6291 * configure.srv (case aarch64*-*-linux*): Don't set
6292 srv_linux_usrregs.
6293
5826e159
PA
62942015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6295
6296 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6297 sys/ptrace.h.
6298 * linux-arm-low.c: Likewise.
6299 * linux-cris-low.c: Likewise.
6300 * linux-crisv32-low.c: Likewise.
6301 * linux-low.c: Likewise.
6302 * linux-m68k-low.c: Likewise.
6303 * linux-mips-low.c: Likewise.
6304 * linux-nios2-low.c: Likewise.
6305 * linux-s390-low.c: Likewise.
6306 * linux-sparc-low.c: Likewise.
6307 * linux-tic6x-low.c: Likewise.
6308 * linux-tile-low.c: Likewise.
6309 * linux-x86-low.c: Likewise.
6310
54019719
PA
63112015-07-24 Pedro Alves <palves@redhat.com>
6312
6313 * config.in: Regenerate.
6314 * configure: Regenerate.
6315
eb7aa561
PA
63162015-07-24 Pedro Alves <palves@redhat.com>
6317
6318 * acinclude.m4: Include ../ptrace.m4.
6319 * configure.ac: Call GDB_AC_PTRACE.
6320 * config.in, configure: Regenerate.
6321
55d7b841
YQ
63222015-07-24 Yao Qi <yao.qi@linaro.org>
6323
6324 * linux-low.c (linux_create_inferior): Remove setting to
6325 proc->priv->new_inferior.
6326 (linux_attach): Likewise.
6327 (linux_low_filter_event): Likewise.
6328 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6329
c06cbd92
YQ
63302015-07-24 Yao Qi <yao.qi@linaro.org>
6331
6332 * linux-low.c (linux_arch_setup): New function.
6333 (linux_low_filter_event): If proc->tdesc is NULL and
6334 proc->attached is true, call the_low_target.arch_setup.
6335 Otherwise, keep status pending, and return.
6336 (linux_resume_one_lwp_throw): Don't call get_pc if
6337 thread->while_stepping isn't NULL. Don't call
6338 get_thread_regcache if proc->tdesc is NULL.
6339 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6340 (linux_target_ops): Install arch_setup.
6341 * server.c (start_inferior): Call the_target->arch_setup.
6342 * target.h (struct target_ops) <arch_setup>: New field.
6343 (target_arch_setup): New marco.
6344 * lynx-low.c (lynx_target_ops): Update.
6345 * nto-low.c (nto_target_ops): Update.
6346 * spu-low.c (spu_target_ops): Update.
6347 * win32-low.c (win32_target_ops): Update.
6348
5ae3ebba
YQ
63492015-07-24 Yao Qi <yao.qi@linaro.org>
6350
6351 * linux-low.c (linux_add_process): Don't set
6352 proc->priv->new_inferior.
6353 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6354 (linux_attach): Likewise.
6355
eb97750b
YQ
63562015-07-24 Yao Qi <yao.qi@linaro.org>
6357
6358 * server.c (start_inferior): Code refactor.
6359
51aee833
YQ
63602015-07-24 Yao Qi <yao.qi@linaro.org>
6361
6362 * server.c (process_serial_event): Set general_thread.
6363
af1b22f3
YQ
63642015-07-21 Yao Qi <yao.qi@linaro.org>
6365
6366 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6367 aarch64_linux_get_debug_reg_capacity.
6368
554717a3
YQ
63692015-07-17 Yao Qi <yao.qi@linaro.org>
6370
6371 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6372 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6373 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6374 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6375 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6376 (AARCH64_HWP_ALIGNMENT): Likewise.
6377 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6378 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6379 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6380 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6381 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6382 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6383 (struct aarch64_debug_reg_state): Likewise.
6384 (struct arch_lwp_info): Likewise.
6385 (aarch64_align_watchpoint): Likewise.
6386 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6387 (aarch64_watchpoint_length): Likewise.
6388 (aarch64_point_encode_ctrl_reg): Likewise
6389 (aarch64_point_is_aligned): Likewise.
6390 (aarch64_align_watchpoint): Likewise.
6391 (aarch64_linux_set_debug_regs):
6392 (aarch64_dr_state_insert_one_point): Likewise.
6393 (aarch64_dr_state_remove_one_point): Likewise.
6394 (aarch64_handle_breakpoint): Likewise.
6395 (aarch64_handle_aligned_watchpoint): Likewise.
6396 (aarch64_handle_unaligned_watchpoint): Likewise.
6397 (aarch64_handle_watchpoint): Likewise.
6398
c67ca4de
YQ
63992015-07-17 Yao Qi <yao.qi@linaro.org>
6400
6401 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6402 and don't aarch64_get_debug_reg_state. All callers update.
6403 (aarch64_handle_aligned_watchpoint): Likewise.
6404 (aarch64_handle_unaligned_watchpoint): Likewise.
6405 (aarch64_handle_watchpoint): Likewise.
6406 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6407 (aarch64_remove_point): Likewise.
6408
25abf979
YQ
64092015-07-17 Yao Qi <yao.qi@linaro.org>
6410
6411 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6412 debug_printf.
6413 (aarch64_handle_unaligned_watchpoint): Likewise.
6414
db1ff28b
JK
64152015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6416
6417 Revert the previous 3 commits:
6418 Move gdb_regex* to common/
6419 Move linux_find_memory_regions_full & co.
6420 gdbserver build-id attribute generator
6421
700ca40f
JK
64222015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6423 Jan Kratochvil <jan.kratochvil@redhat.com>
6424
6425 gdbserver build-id attribute generator.
6426 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6427 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6428 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6429 (find_phdr): New.
6430 (get_dynamic): Use find_pdhr to traverse program headers.
6431 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6432 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6433 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6434 (get_hex_build_id): New.
6435 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6436 to reply XML document.
6437
9904185c
JK
64382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6439 Jan Kratochvil <jan.kratochvil@redhat.com>
6440
6441 * target.c: Include target/target-utils.h and fcntl.h.
6442 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6443 (target_fileio_read_stralloc): New functions.
6444
6e5b4429
JK
64452015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6446
6447 * Makefile.in (OBS): Add gdb_regex.o.
6448 (gdb_regex.o): New.
6449 * config.in: Rebuilt.
6450 * configure: Rebuilt.
6451
ddc98fbf
JK
64522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6453 Jan Kratochvil <jan.kratochvil@redhat.com>
6454
6455 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6456 * Makefile.in (OBS): Add target-utils.o.
6457 (linux-maps.o, target-utils.o): New.
6458 * configure.srv (srv_linux_obj): Add linux-maps.o.
6459
e57bb7a0
PL
64602015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6461
6462 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6463 function, return 1.
6464 (the_low_target): Install it.
6465
586b02a9
PA
64662015-07-14 Pedro Alves <palves@redhat.com>
6467
6468 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6469 Instead, ignore ECHILD, and throw an error for other errnos.
6470
58c1b36c
PA
64712015-07-10 Pedro Alves <palves@redhat.com>
6472
6473 * event-loop.c (struct callback_event) <data>: Change type to
6474 gdb_client_data instance instead of gdb_client_data pointer.
6475 (append_callback_event): Adjust.
6476
421530db
PL
64772015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6478
6479 * linux-aarch64-low.c: Add comments for each linux_target_ops
6480 method. Remove comments already covered in target_ops and
6481 linux_target_ops definitions.
6482 (the_low_target): Add comments for each unimplemented method.
6483
c2d65f38
YQ
64842015-07-09 Yao Qi <yao.qi@linaro.org>
6485
6486 * linux-aarch64-low.c (aarch64_regmap): Remove.
6487 (aarch64_usrregs_info): Remove.
6488 (regs_info): Set field usrregs to NULL.
6489
b20a6524
MM
64902015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6491
6492 * linux-low.c: Include "rsp-low.h"
6493 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6494 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6495 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6496 (handle_btrace_enable_pt): New.
6497 (handle_btrace_general_set): Support "pt".
6498 (handle_btrace_conf_general_set): Support "pt:size".
6499
96c97461
PL
65002015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6501
6502 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6503 Z_PACKET_SW_BP.
6504
37d66942
PL
65052015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6506
6507 * linux-aarch64-low.c: Remove comment about endianness.
6508 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6509 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6510 memcmp.
6511
dc06243f
GB
65122015-06-24 Gary Benson <gbenson@redhat.com>
6513
6514 * linux-i386-ipa.c (stdint.h): Do not include.
6515 * lynx-i386-low.c (stdint.h): Likewise.
6516 * lynx-ppc-low.c (stdint.h): Likewise.
6517 * mem-break.c (stdint.h): Likewise.
6518 * thread-db.c (stdint.h): Likewise.
6519 * tracepoint.c (stdint.h): Likewise.
6520 * win32-low.c (stdint.h): Likewise.
6521
124e13d9
SM
65222015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6523
6524 * server.c (write_qxfer_response): Update call to
6525 remote_escape_output.
6526
909c2cda
JK
65272015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6528 Jan Kratochvil <jan.kratochvil@redhat.com>
6529
6530 Merge multiple hex conversions.
6531 * gdbreplay.c (tohex): Rename to 'fromhex'.
6532 (logchar): Use fromhex.
6533
24c05f46
JK
65342015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6535
6536 * server.c (handle_qxfer_libraries): Set `version' attribute for
6537 <library-list>.
6538
14d2069a
GB
65392015-06-10 Gary Benson <gbenson@redhat.com>
6540
6541 * target.h (struct target_ops) <multifs_open>: New field.
6542 <multifs_unlink>: Likewise.
6543 <multifs_readlink>: Likewise.
6544 * linux-low.c (nat/linux-namespaces.h): New include.
6545 (linux_target_ops): Initialize the_target->multifs_open,
6546 the_target->multifs_unlink and the_target->multifs_readlink.
6547 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6548 * hostio.c (hostio_fs_pid): New static variable.
6549 (hostio_handle_new_gdb_connection): New function.
6550 (handle_setfs): Likewise.
6551 (handle_open): Use the_target->multifs_open as appropriate.
6552 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6553 (handle_readlink): Use the_target->multifs_readlink as
6554 appropriate.
6555 (handle_vFile): Handle vFile:setfs packets.
6556 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6557 after target_handle_new_gdb_connection.
6558
4b8b5e72
GB
65592015-06-10 Gary Benson <gbenson@redhat.com>
6560
6561 * configure.ac (AC_CHECK_FUNCS): Add setns.
6562 * config.in: Regenerate.
6563 * configure: Likewise.
6564 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6565 (linux-namespaces.o): New rule.
6566 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6567
3ac2e371
GB
65682015-06-09 Gary Benson <gbenson@redhat.com>
6569
6570 * hostio.c (handle_open): Process mode argument with
6571 fileio_to_host_mode.
6572
ca9b78ce
YQ
65732015-06-01 Yao Qi <yao.qi@linaro.org>
6574
6575 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6576 * linux-x86-low.c: Likewise.
6577
bfacd19d
DB
65782015-05-28 Don Breazeal <donb@codesourcery.com>
6579
6580 * linux-low.c (handle_extended_wait): Initialize
6581 thread_info.last_resume_kind for new fork children.
6582
452003ef
PA
65832015-05-15 Pedro Alves <palves@redhat.com>
6584
6585 * target.h (target_handle_new_gdb_connection): Rewrite using if
6586 wrapped in do/while.
6587
1041a03c
JB
65882015-05-14 Joel Brobecker <brobecker@adacore.com>
6589
6590 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6591 * configure, config.in: Regenerate.
6592 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6593 Declare typedef.
6594
c269dbdb
DB
65952015-05-12 Don Breazeal <donb@codesourcery.com>
6596
6597 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6598 PTRACE_EVENT_VFORK_DONE.
6599 (linux_low_ptrace_options, extended_event_reported): Add vfork
6600 events.
6601 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6602 and "vforkdone" for RSP 'T' Stop Reply Packet.
6603 * server.h (report_vfork_events): Declare
6604 global variable.
6605
3a8a0396
DB
66062015-05-12 Don Breazeal <donb@codesourcery.com>
6607
6608 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6609 (the_low_target) <new_fork>: Initialize new member.
6610 * linux-arm-low.c (arm_new_fork): New function.
6611 (the_low_target) <new_fork>: Initialize new member.
6612 * linux-low.c (handle_extended_wait): Call new target function
6613 new_fork.
6614 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6615 * linux-mips-low.c (mips_add_watchpoint): New function
6616 extracted from mips_insert_point.
6617 (the_low_target) <new_fork>: Initialize new member.
6618 (mips_linux_new_fork): New function.
6619 (mips_insert_point): Call mips_add_watchpoint.
6620 * linux-x86-low.c (x86_linux_new_fork): New function.
6621 (the_low_target) <new_fork>: Initialize new member.
6622
de0d863e
DB
66232015-05-12 Don Breazeal <donb@codesourcery.com>
6624
6625 * linux-low.c (handle_extended_wait): Implement return value,
6626 rename argument 'event_child' to 'event_lwp', handle
6627 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6628 (linux_low_ptrace_options): New function.
6629 (linux_low_filter_event): Call linux_low_ptrace_options,
6630 use different argument fo linux_enable_event_reporting,
6631 use return value from handle_extended_wait.
6632 (extended_event_reported): New function.
6633 (linux_wait_1): Call extended_event_reported and set
6634 status to report fork events.
6635 (linux_write_memory): Add pid to debug message.
6636 (reset_lwp_ptrace_options_callback): New function.
6637 (linux_handle_new_gdb_connection): New function.
6638 (linux_target_ops): Initialize new structure member.
6639 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6640 * lynx-low.c: Initialize new structure member.
6641 * remote-utils.c (prepare_resume_reply): Implement stop reason
6642 "fork" for "T" stop message.
6643 * server.c (handle_query): Call handle_new_gdb_connection.
6644 * server.h (report_fork_events): Declare global flag.
6645 * target.h (struct target_ops) <handle_new_gdb_connection>:
6646 New member.
6647 (target_handle_new_gdb_connection): New macro.
6648 * win32-low.c: Initialize new structure member.
6649
ddcbc397
DB
66502015-05-12 Don Breazeal <donb@codesourcery.com>
6651
6652 * mem-break.c (APPEND_TO_LIST): Define macro.
6653 (clone_agent_expr): New function.
6654 (clone_one_breakpoint): New function.
6655 (clone_all_breakpoints): New function.
6656 * mem-break.h: Declare new functions.
6657
89245bc0
DB
66582015-05-12 Don Breazeal <donb@codesourcery.com>
6659
6660 * linux-low.c (linux_supports_fork_events): New function.
6661 (linux_supports_vfork_events): New function.
6662 (linux_target_ops): Initialize new structure members.
6663 (initialize_low): Call linux_check_ptrace_features.
6664 * lynx-low.c (lynx_target_ops): Initialize new structure
6665 members.
6666 * server.c (report_fork_events, report_vfork_events):
6667 New global flags.
6668 (handle_query): Add new features to qSupported packet and
6669 response.
6670 (captured_main): Initialize new global variables.
6671 * target.h (struct target_ops) <supports_fork_events>:
6672 New member.
6673 <supports_vfork_events>: New member.
6674 (target_supports_fork_events): New macro.
6675 (target_supports_vfork_events): New macro.
6676 * win32-low.c (win32_target_ops): Initialize new structure
6677 members.
6678
835205d0
GB
66792015-05-12 Gary Benson <gbenson@redhat.com>
6680
6681 * server.c (handle_qxfer_exec_file): Use current process
6682 if annex is empty.
6683
21e94bd9
SL
66842015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6685
6686 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6687 Remove HAVE_PTRACE_GETREGS conditionals.
6688 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6689 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6690
45614f15
YQ
66912015-05-08 Yao Qi <yao.qi@linaro.org>
6692
6693 * linux-low.c (linux_supports_conditional_breakpoints): New
6694 function.
6695 (linux_target_ops): Install new target method.
6696 * lynx-low.c (lynx_target_ops): Install NULL hook for
6697 supports_conditional_breakpoints.
6698 * nto-low.c (nto_target_ops): Likewise.
6699 * spu-low.c (spu_target_ops): Likewise.
6700 * win32-low.c (win32_target_ops): Likewise.
6701 * server.c (handle_query): Check
6702 target_supports_conditional_breakpoints.
6703 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6704 New field.
6705 (target_supports_conditional_breakpoints): New macro.
6706
80ad801e
PA
67072015-05-06 Pedro Alves <palves@redhat.com>
6708
6709 PR server/18081
6710 * server.c (start_inferior): If the process exits, mourn it.
6711
819843c7
GB
67122015-04-21 Gary Benson <gbenson@redhat.com>
6713
6714 * hostio.c (fileio_open_flags_to_host): Factored out to
6715 fileio_to_host_openflags in common/fileio.c. Single use
6716 updated.
6717
a2d5a9d7
MF
67182015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6719
6720 * linux-xtensa-low.c (xtensa_fill_gregset)
6721 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6722 XCHAL_HAVE_LOOP.
6723
deb44829
MF
67242015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6725
6726 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6727 (regs_info): Replace usrregs pointer with NULL.
6728
e57f1de3
GB
67292015-04-17 Gary Benson <gbenson@redhat.com>
6730
6731 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6732 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6733 * server.c (handle_qxfer_exec_file): New function.
6734 (qxfer_packets): Add exec-file entry.
6735 (handle_query): Report qXfer:exec-file:read as supported packet.
6736
62828379
RN
67372015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6738
6739 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6740
b88bb450
GB
67412015-04-09 Gary Benson <gbenson@redhat.com>
6742
6743 * hostio-errno.c (errno_to_fileio_error): Remove function.
6744 Update caller to use remote_fileio_to_fio_error.
6745
c8f4bfdd
YQ
67462015-04-09 Yao Qi <yao.qi@linaro.org>
6747
6748 * linux-low.c (linux_insert_point): Call
6749 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6750 (linux_remove_point): Call remove_memory_breakpoint if type is
6751 raw_bkpt_type_sw.
6752 * linux-x86-low.c (x86_insert_point): Don't call
6753 insert_memory_breakpoint.
6754 (x86_remove_point): Don't call remove_memory_breakpoint.
6755
41f98f02
PA
67562015-04-01 Pedro Alves <palves@redhat.com>
6757 Cleber Rosa <crosa@redhat.com>
6758
6759 * server.c (gdbserver_usage): Reorganize and extend the usage
6760 message.
6761
2bf6fb9d
PA
67622015-03-24 Pedro Alves <palves@redhat.com>
6763
6764 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6765 output. Also dump TRAP_TRACE.
6766 (linux_low_filter_event): In debug output, distinguish a
6767 resume_stop SIGSTOP from a delayed SIGSTOP.
6768
369f6daa
GB
67692015-03-24 Gary Benson <gbenson@redhat.com>
6770
6771 * linux-x86-low.c (x86_linux_new_thread): Moved to
6772 nat/x86-linux.c.
6773 (x86_linux_prepare_to_resume): Likewise.
6774
8e5d4070
GB
67752015-03-24 Gary Benson <gbenson@redhat.com>
6776
6777 * Makefile.in (x86-linux-dregs.o): New rule.
6778 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6779 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6780 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6781 (x86_linux_dr_get): Likewise.
6782 (x86_linux_dr_set): Likewise.
6783 (update_debug_registers_callback): Likewise.
6784 (x86_linux_dr_set_addr): Likewise.
6785 (x86_linux_dr_get_addr): Likewise.
6786 (x86_linux_dr_set_control): Likewise.
6787 (x86_linux_dr_get_control): Likewise.
6788 (x86_linux_dr_get_status): Likewise.
6789 (x86_linux_update_debug_registers): Likewise.
6790
2b95d440
GB
67912015-03-24 Gary Benson <gbenson@redhat.com>
6792
6793 * linux-x86-low.c (x86_linux_update_debug_registers):
6794 New function, factored out from...
6795 (x86_linux_prepare_to_resume): ...this.
6796
14b0bc68
GB
67972015-03-24 Gary Benson <gbenson@redhat.com>
6798
6799 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6800 (x86_linux_dr_set): Likewise.
6801 (update_debug_registers_callback): Likewise.
6802 (x86_linux_dr_set_addr): Likewise.
6803 (x86_linux_dr_get_addr): Likewise.
6804 (x86_linux_dr_set_control): Likewise.
6805 (x86_linux_dr_get_control): Likewise.
6806 (x86_linux_dr_get_status): Likewise.
6807 (x86_linux_prepare_to_resume): Likewise.
6808
5dfe6ca8
GB
68092015-03-24 Gary Benson <gbenson@redhat.com>
6810
6811 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6812 Use perror_with_name. Pass string through gettext.
6813 (x86_linux_dr_set): Likewise.
6814
d33472ad
GB
68152015-03-24 Gary Benson <gbenson@redhat.com>
6816
6817 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6818 (x86_linux_dr_set_addr): ...this.
6819 (x86_dr_low_get_addr): Rename to...
6820 (x86_linux_dr_get_addr): ...this.
6821 (x86_dr_low_set_control): Rename to...
6822 (x86_linux_dr_set_control): ...this.
6823 (x86_dr_low_get_control): Rename to...
6824 (x86_linux_dr_get_control): ...this.
6825 (x86_dr_low_get_status): Rename to...
6826 (x86_linux_dr_get_status): ...this.
6827 (x86_dr_low): Update with new function names.
6828
4b134ca1
GB
68292015-03-24 Gary Benson <gbenson@redhat.com>
6830
6831 * Makefile.in (x86-linux.o): New rule.
6832 * configure.srv: Add x86-linux.o to relevant targets.
6833 * linux-low.c (lwp_set_arch_private_info): New function.
6834 (lwp_arch_private_info): Likewise.
6835 * linux-x86-low.c: Include nat/x86-linux.h.
6836 (arch_lwp_info): Removed structure.
6837 (update_debug_registers_callback):
6838 Use lwp_set_debug_registers_changed.
6839 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6840 and lwp_set_debug_registers_changed.
6841 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6842
34c703da
GB
68432015-03-24 Gary Benson <gbenson@redhat.com>
6844
6845 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6846 * linux-arm-low.c (arm_new_thread): Likewise.
6847 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6848 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6849 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6850 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6851
cff068da
GB
68522015-03-24 Gary Benson <gbenson@redhat.com>
6853
6854 * linux-low.c (ptid_of_lwp): New function.
6855 (lwp_is_stopped): Likewise.
6856 (lwp_stop_reason): Likewise.
6857 * linux-x86-low.c (update_debug_registers_callback):
6858 Use lwp_is_stopped.
6859 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6860 lwp_stop_reason.
6861
b2f7c7e8
GB
68622015-03-24 Gary Benson <gbenson@redhat.com>
6863
6864 * linux-low.h (linux_stop_lwp): Remove declaration.
6865
6d4ee8c6
GB
68662015-03-24 Gary Benson <gbenson@redhat.com>
6867
6868 * linux-low.h: Include nat/linux-nat.h.
6869 * linux-low.c (iterate_over_lwps_args): New structure.
6870 (iterate_over_lwps_filter): New function.
6871 (iterate_over_lwps): Likewise.
6872 * linux-x86-low.c (update_debug_registers_callback):
6873 Update signature to what iterate_over_lwps expects.
6874 Remove PID check that iterate_over_lwps now performs.
6875 (x86_dr_low_set_addr): Use iterate_over_lwps.
6876 (x86_dr_low_set_control): Likewise.
6877
70a0bb6b
GB
68782015-03-24 Gary Benson <gbenson@redhat.com>
6879
6880 * linux-x86-low.c (x86_debug_reg_state): New function.
6881 (x86_linux_prepare_to_resume): Use the above.
6882
7b669087
GB
68832015-03-24 Gary Benson <gbenson@redhat.com>
6884
6885 * linux-low.c (current_lwp_ptid): New function.
6886 * linux-x86-low.c: Include nat/linux-nat.h.
6887 (x86_dr_low_get_addr): Use current_lwp_ptid.
6888 (x86_dr_low_get_control): Likewise.
6889 (x86_dr_low_get_status): Likewise.
6890
eef49a3d
PA
68912015-03-20 Pedro Alves <palves@redhat.com>
6892
6893 * tracepoint.c (cmd_qtstatus): Make "str" const.
6894
b2333d22
PA
68952015-03-20 Pedro Alves <palves@redhat.com>
6896
6897 * server.c (handle_general_set): Make "req_str" const.
6898
23f238d3
PA
68992015-03-19 Pedro Alves <palves@redhat.com>
6900
6901 * linux-low.c (linux_resume_one_lwp): Rename to ...
6902 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6903 instead call perror_with_name.
6904 (check_ptrace_stopped_lwp_gone): New function.
6905 (linux_resume_one_lwp): Reimplement as wrapper around
6906 linux_resume_one_lwp_throw that swallows errors if the LWP is
6907 gone.
6908
91baf43f
PA
69092015-03-19 Pedro Alves <palves@redhat.com>
6910
6911 * linux-low.c (count_events_callback, select_event_lwp_callback):
6912 No longer check whether the thread has resume_stop as last resume
6913 kind.
6914
8bf3b159
PA
69152015-03-19 Pedro Alves <palves@redhat.com>
6916
6917 * linux-low.c (count_events_callback, select_event_lwp_callback):
6918 Use the lwp's status_pending_p field, not the thread's.
6919
b90fc188
PA
69202015-03-19 Pedro Alves <palves@redhat.com>
6921
6922 * linux-low.c (select_event_lwp_callback): Update comments to
6923 no longer mention SIGTRAP.
6924
464b0089
GB
69252015-03-18 Gary Benson <gbenson@redhat.com>
6926
6927 * server.c (handle_query): Do not report vFile:fstat as supported.
6928
aa9e327f
GB
69292015-03-11 Gary Benson <gbenson@redhat.com>
6930
6931 * hostio.c (sys/types.h): New include.
6932 (sys/stat.h): Likewise.
6933 (common-remote-fileio.h): Likewise.
6934 (handle_fstat): New function.
6935 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6936
791c0056
GB
69372015-03-11 Gary Benson <gbenson@redhat.com>
6938
6939 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6940 struct stat.st_blocks and struct stat.st_blksize.
6941 * configure: Regenerate.
6942 * config.in: Likewise.
6943 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6944 (OBS): Add common-remote-fileio.o.
6945 (common-remote-fileio.o): New rule.
6946
9a9df970
PA
69472015-03-09 Pedro Alves <palves@redhat.com>
6948
6949 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6950 'struct sockaddr' pointer in 'accept' call.
6951
9eb1356e
PA
69522015-03-09 Pedro Alves <palves@redhat.com>
6953
6954 Revert:
6955 2015-03-07 Pedro Alves <palves@redhat.com>
6956 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6957 or <winsock2.h> here. Instead include "gdb_socket.h".
6958 (remote_open): Use union gdb_sockaddr_u.
6959 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6960 or <winsock2.h> here. Instead include "gdb_socket.h".
6961 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6962 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6963 or <sys/un.h>.
6964 (init_named_socket, gdb_agent_helper_thread): Use union
6965 gdb_sockaddr_u.
6966
aac331e4
PA
69672015-03-07 Pedro Alves <palves@redhat.com>
6968
6969 * configure.ac (build_warnings): Move
6970 -Wdeclaration-after-statement to the C-specific set.
6971 * configure: Regenerate.
6972
366c75fc
PA
69732015-03-07 Pedro Alves <palves@redhat.com>
6974
6975 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6976 or <winsock2.h> here. Instead include "gdb_socket.h".
6977 (remote_open): Use union gdb_sockaddr_u.
6978 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6979 or <winsock2.h> here. Instead include "gdb_socket.h".
6980 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6981 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6982 or <sys/un.h>.
6983 (init_named_socket, gdb_agent_helper_thread): Use union
6984 gdb_sockaddr_u.
6985
492d29ea
PA
69862015-03-07 Pedro Alves <palves@redhat.com>
6987
6988 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6989 instead.
6990
60a191ed
YQ
69912015-03-06 Yao Qi <yao.qi@linaro.org>
6992
6993 * linux-aarch64-low.c (aarch64_insert_point): Use
6994 show_debug_regs as a boolean.
6995 (aarch64_remove_point): Likewise.
6996
f5771b1d
PA
69972015-03-05 Pedro Alves <palves@redhat.com>
6998
6999 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7000 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7001 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7002 * nto-low.c (nto_target_ops): Likewise.
7003 * spu-low.c (spu_target_ops): Likewise.
7004 * win32-low.c (win32_target_ops): Likewise.
7005
3e572f71
PA
70062015-03-04 Pedro Alves <palves@redhat.com>
7007
72f4393d 7008 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7009 Decide whether a breakpoint triggered based on the SIGTRAP's
7010 siginfo.si_code.
72f4393d
L
7011 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7012 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7013 (linux_low_filter_event): Check for breakpoints before checking
7014 watchpoints.
7015 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7016 siginfo.si_code.
72f4393d
L
7017 (linux_stopped_by_sw_breakpoint)
7018 (linux_supports_stopped_by_sw_breakpoint)
7019 (linux_stopped_by_hw_breakpoint)
7020 (linux_supports_stopped_by_hw_breakpoint): New functions.
7021 (linux_target_ops): Install new target methods.
3e572f71 7022
1ec68e26
PA
70232015-03-04 Pedro Alves <palves@redhat.com>
7024
7025 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7026 * server.c (swbreak_feature, hwbreak_feature): New globals.
7027 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7028 (captured_main): Clear swbreak_feature and hwbreak_feature.
7029 * server.h (swbreak_feature, hwbreak_feature): Declare.
7030 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7031 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7032 supports_stopped_by_hw_breakpoint>: New fields.
7033 (target_supports_stopped_by_sw_breakpoint)
7034 (target_stopped_by_sw_breakpoint)
7035 (target_supports_stopped_by_hw_breakpoint)
7036 (target_stopped_by_hw_breakpoint): Declare.
7037
15c66dd6
PA
70382015-03-04 Pedro Alves <palves@redhat.com>
7039
7040 enum lwp_stop_reason -> enum target_stop_reason
7041 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7042 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7043 (linux_wait_1, stuck_in_jump_pad_callback)
7044 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7045 (linux_stopped_by_watchpoint):
7046 * linux-low.h (enum lwp_stop_reason): Delete.
7047 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7048 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7049
98fc70d6
YQ
70502015-03-04 Yao Qi <yao.qi@linaro.org>
7051
7052 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7053
dd2ac174
GB
70542015-03-03 Gary Benson <gbenson@redhat.com>
7055
7056 * hostio.c (handle_vFile): Fix prefix lengths.
7057
d68e53f4
MM
70582015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7059
7060 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7061 ptr_bits.
7062
bf2d68ab
AA
70632015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7064
7065 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7066 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7067 (clean): Add "rm -f" for above C files.
7068 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7069 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7070 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7071 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7072 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7073 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7074 (init_registers_s390x_vx_linux64)
7075 (init_registers_s390x_tevx_linux64)
7076 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7077 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7078 declarations.
7079 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7080 (s390_store_vxrs_high): New functions.
7081 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7082 NT_S390_VXRS_HIGH.
7083 (s390_arch_setup): Add logic for selecting one of the new target
7084 descriptions. Activate the new vector regsets if applicable.
7085 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7086 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7087 and init_registers_s390x_tevx_linux64.
7088
c966a859
PA
70892015-03-01 Pedro Alves <palves@redhat.com>
7090
7091 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7092 parameter.
7093
4180215b
PA
70942015-02-27 Pedro Alves <palves@redhat.com>
7095
7096 * linux-x86-low.c (u_debugreg_offset): New function.
7097 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7098
749bab01
PA
70992015-02-27 Pedro Alves <palves@redhat.com>
7100
7101 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7102 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7103 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7104 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7105 (ps_lsetfpregs, ps_getpid)
7106 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7107 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7108 (ps_lsetxregs, ps_plog): Declare.
7109
3c14e5a3
PA
71102015-02-27 Pedro Alves <palves@redhat.com>
7111
7112 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7113 IP_AGENT_EXPORT_FUNC.
7114 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7115 IP_AGENT_EXPORT_FUNC.
7116 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7117 (IP_AGENT_EXPORT): Delete.
7118 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7119 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7120 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7121 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7122 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7123 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7124 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7125 (traceframe_read_count, traceframe_write_count)
7126 (traceframes_created, trace_state_variables, get_raw_reg)
7127 (get_trace_state_variable_value, set_trace_state_variable_value)
7128 (ust_loaded, helper_thread_id, cmd_buf): Use
7129 IPA_SYM_EXPORTED_NAME.
7130 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7131 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7132 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7133 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7134 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7135 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7136 EXTERN_C_PUSH/EXTERN_C_POP.
7137 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7138 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7139 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7140 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7141 (traceframe_write_count, traceframe_read_count)
7142 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7143 (about_to_request_buffer_space, get_trace_state_variable_value)
7144 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7145 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7146 EXTERN_C_PUSH/EXTERN_C_POP.
7147 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7148 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7149 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7150 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7151 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7152 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7153 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7154 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7155 Define.
7156 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7157 (IP_AGENT_EXPORT_VAR_DECL): Define.
7158 (tracing): Declare.
7159 (gdb_agent_get_raw_reg): Declare.
7160
fe978cb0
PA
71612015-02-27 Tom Tromey <tromey@redhat.com>
7162 Pedro Alves <palves@redhat.com>
7163
7164 Rename symbols whose names are reserved C++ keywords throughout.
7165
3bc3d82a
PA
71662015-02-27 Pedro Alves <palves@redhat.com>
7167
7168 * Makefile.in (COMPILER): New, get it from autoconf.
7169 (CXX): Get from autoconf instead.
7170 (COMPILE.pre): Use COMPILER.
7171 (CC-LD): Rename to ...
7172 (CC_LD): ... this. Use COMPILER.
7173 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7174 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7175 * acinclude.m4: Include build-with-cxx.m4.
7176 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7177 Disable -Werror by default if building in C++ mode.
7178 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7179 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7180 the C++ compiler. Save/restore CXXFLAGS too.
7181 * configure: Regenerate.
7182
07697489
PA
71832015-02-27 Pedro Alves <palves@redhat.com>
7184
7185 * acinclude.m4: Include libiberty.m4.
7186 * configure.ac: Call libiberty_INIT.
7187 * config.in, configure: Regenerate.
7188
9beb7c4e
PA
71892015-02-26 Pedro Alves <palves@redhat.com>
7190
7191 * linux-low.c (linux_wait_1): When incrementing the PC past a
7192 program breakpoint always use the_low_target.breakpoint_len as
7193 increment, rather than the maximum between that and
7194 the_low_target.decr_pc_after_break.
7195
8090aef2
PA
71962015-02-23 Pedro Alves <palves@redhat.com>
7197
7198 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7199 thread was doing a step-over; always adjust the PC if
7200 we stepped over a permanent breakpoint.
7201 (linux_wait_1): If we stepped over breakpoint that was on top of a
7202 permanent breakpoint, manually advance the PC past it.
7203
bc9540e8
PA
72042015-02-23 Pedro Alves <palves@redhat.com>
7205
7206 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7207 modes.
7208 (x86_fill_gregset, x86_store_gregset): Use it when handling
7209 $orig_eax.
7210
2db9a427
PA
72112015-02-20 Pedro Alves <palves@redhat.com>
7212
7213 * thread-db.c: Include "nat/linux-procfs.h".
7214 (thread_db_init): Skip listing new threads if the kernel supports
7215 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7216
afa8d396
PA
72172015-02-20 Pedro Alves <palves@redhat.com>
7218
7219 * linux-low.c (status_pending_p_callback): Use ptid_match.
7220
c9587f88
AT
72212015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7222
7223 PR breakpoints/16812
7224 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7225 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7226 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7227
b05ec7a5
AT
72282015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7229
7230 PR breakpoints/15956
7231 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7232
d33501a5
MM
72332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7234
7235 * linux-low.c (linux_low_btrace_conf): Print size.
7236 * server.c (handle_btrace_conf_general_set): New.
7237 (hanle_general_set): Call handle_btrace_conf_general_set.
7238 (handle_query): Report Qbtrace-conf:bts:size as supported.
7239
f4abbc16
MM
72402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7241
7242 * linux-low.c (linux_low_enable_btrace): Update parameters.
7243 (linux_low_btrace_conf): New.
7244 (linux_target_ops)<to_btrace_conf>: Initialize.
7245 * server.c (current_btrace_conf): New.
7246 (handle_btrace_enable): Rename to ...
7247 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7248 to target_enable_btrace. Update comment. Update users.
7249 (handle_qxfer_btrace_conf): New.
7250 (qxfer_packets): Add btrace-conf entry.
7251 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7252 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7253 (target_ops)<read_btrace_conf>: New.
7254 (target_enable_btrace): Update parameters.
7255 (target_read_btrace_conf): New.
7256
043c3577
MM
72572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7258
7259 * server.c (handle_btrace_general_set): Remove call to
7260 target_supports_btrace.
7261 (supported_btrace_packets): New.
7262 (handle_query): Call supported_btrace_packets.
7263 * target.h: include btrace-common.h.
7264 (btrace_target_info): Removed.
7265 (supports_btrace, target_supports_btrace): Update parameters.
7266
734b0e4b
MM
72672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7268
7269 * Makefile.in (SFILES): Add common/btrace-common.c.
7270 (OBS): Add common/btrace-common.o.
7271 (btrace-common.o): Add build rules.
7272 * linux-low: Include btrace-common.h.
7273 (linux_low_read_btrace): Use struct btrace_data. Call
7274 btrace_data_init and btrace_data_fini.
7275
d6c146e9
PA
72762015-02-06 Pedro Alves <palves@redhat.com>
7277
7278 * thread-db.c (find_new_threads_callback): Add debug output.
7279
20ba1ce6
PA
72802015-02-04 Pedro Alves <palves@redhat.com>
7281
7282 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7283 (resume_stopped_resumed_lwps): New function.
7284 (linux_wait_for_event_filtered): Use it.
7285
8cc73a39
SDJ
72862015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7287
7288 * Makefile.in (SFILES): Add linux-personality.c.
7289 (linux-personality.o): New rule.
7290 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7291 list of objects to be built.
7292 * linux-low.c: Include nat/linux-personality.h.
7293 (linux_create_inferior): Remove code to disable address space
7294 randomization (moved to ../nat/linux-personality.c). Create
7295 cleanup to disable address space randomization.
7296
fb23d554
SDJ
72972015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7298
7299 * Makefile.in (posix-strerror.o): New rule.
7300 (mingw-strerror.o): Likewise.
7301 * configure: Regenerated.
7302 * configure.ac: Source file ../common/common.host. Initialize new
7303 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7304
cdf43629
YQ
73052015-01-14 Yao Qi <yao@codesourcery.com>
7306
7307 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7308 (ppc-linux.o): New rule.
7309 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7310 * configure.ac: AC_CHECK_FUNCS(getauxval).
7311 * config.in: Re-generated.
7312 * configure: Re-generated.
7313 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7314 ppc64_64bit_inferior_p
7315
514c5338
YQ
73162015-01-14 Yao Qi <yao@codesourcery.com>
7317
7318 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7319 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7320 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7321 (PT_ORIG_R3, PT_TRAP): Likewise.
7322 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7323 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7324 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7325
3368c1e5
JB
73262015-01-10 Joel Brobecker <brobecker@adacore.com>
7327
7328 * i387-fp.c (i387_cache_to_xsave): In look over
7329 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7330 zmmh_low_space field by use of zmmh_high_space.
7331
582511be
PA
73322015-01-09 Pedro Alves <palves@redhat.com>
7333
7334 * linux-low.c (step_over_bkpt): Move higher up in the file.
7335 (handle_extended_wait): Don't store the stop_pc here.
7336 (get_stop_pc): Adjust comments and rename to ...
7337 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7338 stopped for a software breakpoint or hardware breakpoint.
7339 (thread_still_has_status_pending_p): New function.
7340 (status_pending_p_callback): Use
7341 thread_still_has_status_pending_p. If the event is no longer
7342 interesting, resume the LWP.
7343 (handle_tracepoints): Add assert.
7344 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7345 (wstatus_maybe_breakpoint): New function.
7346 (cancel_breakpoint): Delete function.
7347 (check_stopped_by_watchpoint): New function, factored out from
7348 linux_low_filter_event.
7349 (lp_status_maybe_breakpoint): Delete function.
7350 (linux_low_filter_event): Remove filter_ptid argument.
7351 Leave thread group exits pending here. Store the LWP's stop PC.
7352 Always leave events pending.
7353 (linux_wait_for_event_filtered): Pull all events out of the
7354 kernel, and leave them all pending.
7355 (count_events_callback, select_event_lwp_callback): Consider all
7356 events.
7357 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7358 (select_event_lwp): Only give preference to the stepping LWP in
7359 all-stop mode. Adjust comments.
7360 (ignore_event): New function.
7361 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7362 references to cancel_breakpoints. Adjust to renames. Also give
7363 equal priority to all LWPs that have had events in non-stop mode.
7364 If reporting a software breakpoint event, unadjust the LWP's PC.
7365 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7366 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7367 Adjust.
7368 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7369 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7370 (linux_stopped_by_watchpoint): Adjust.
7371 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7372 * linux-low.h (enum lwp_stop_reason): New.
7373 (struct lwp_info) <stop_pc>: Adjust comment.
7374 <stopped_by_watchpoint>: Delete field.
7375 <stop_reason>: New field.
7376 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7377 * mem-break.c (software_breakpoint_inserted_here)
7378 (hardware_breakpoint_inserted_here): New function.
7379 * mem-break.h (software_breakpoint_inserted_here)
7380 (hardware_breakpoint_inserted_here): Declare.
7381 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7382 (cancel_breakpoints): Delete.
7383 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7384 (upload_fast_traceframes): Remove references to
7385 cancel_breakpoints.
7386
a33e3959
PA
73872015-01-09 Pedro Alves <palves@redhat.com>
7388
7389 * thread-db.c (find_new_threads_callback): Ignore thread if the
7390 kernel thread ID is -1.
7391
8784d563
PA
73922015-01-09 Pedro Alves <palves@redhat.com>
7393
7394 * linux-low.c (linux_attach_fail_reason_string): Move to
7395 nat/linux-ptrace.c, and rename.
7396 (linux_attach_lwp): Update comment.
7397 (attach_proc_task_lwp_callback): New function.
7398 (linux_attach): Adjust to rename and use
7399 linux_proc_attach_tgid_threads.
7400 (linux_attach_fail_reason_string): Delete declaration.
7401
76f2b779
JB
74022015-01-01 Joel Brobecker <brobecker@adacore.com>
7403
7404 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7405 * server.c (gdbserver_version): Likewise.
7406
fafcc06a
SDJ
74072014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7408
7409 * remote-utils.c: Include ctype.h.
7410 (input_interrupt): Explicitly handle the case when the char
7411 received is the NUL byte. Improve the printing of non-ASCII
7412 characters.
7413
beed38b8
JB
74142014-12-16 Joel Brobecker <brobecker@adacore.com>
7415
7416 * linux-low.c (linux_low_filter_event): Update call to
7417 linux_enable_event_reporting following the addition of
7418 a new parameter to that function.
7419
bf330350
CU
74202014-12-16 Catalin Udma <catalin.udma@freescale.com>
7421
7422 PR server/17457
7423 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7424 (AARCH64_FPCR_REGNO): Likewise.
7425 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7426 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7427 (aarch64_store_fpregset): Likewise.
7428
5227d625
JB
74292014-12-15 Joel Brobecker <brobecker@adacore.com>
7430
7431 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7432 Remove FIXME comment about assumption about N.
7433
f93b65a0
JB
74342014-12-13 Joel Brobecker <brobecker@adacore.com>
7435
7436 * configure.ac: If large-file support is disabled in GDBserver,
7437 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7438 * configure: Regenerate.
7439
e5a9158d
AA
74402014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7441
7442 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7443 warning upon ENODATA from ptrace.
7444 * linux-s390-low.c (s390_store_tdb): New.
7445 (s390_regsets): Add regset for NT_S390_TDB.
7446
feea5f36
AA
74472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7448
7449 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7450 without a fill_function.
7451 * linux-s390-low.c (s390_fill_last_break): Remove.
7452 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7453 (s390_arch_setup): Use regset's size instead of fill_function for
7454 loop end condition.
7455
098dbe61
AA
74562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7457
7458 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7459 the regset's store function when ptrace returned an error.
7460 * regcache.c (get_thread_regcache): Invalidate register cache
7461 before fetching inferior's registers.
7462
28eef672
AA
74632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7464
7465 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7466 while-loop as for-loop.
7467 (regsets_store_inferior_registers): Likewise.
7468
bdca27a2
YQ
74692014-11-28 Yao Qi <yao@codesourcery.com>
7470
7471 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7472 * config.in, configure: Re-generate.
7473 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7474 is defined.
7475
9c232dda
YQ
74762014-11-21 Yao Qi <yao@codesourcery.com>
7477
7478 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7479 (AC_CHECK_HEADERS): Remove malloc.h.
7480 * configure: Re-generated.
7481 * config.in: Re-generated.
7482 * server.h: Don't include alloca.h and malloc.h.
7483 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7484 Don't include malloc.h.
7485
43968415
JB
74862014-11-17 Joel Brobecker <brobecker@adacore.com>
7487
7488 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7489 corresponding ERRNO check in same block.
7490
40e91bc7
PA
74912014-11-12 Pedro Alves <palves@redhat.com>
7492
7493 * server.c (cont_thread): Update comment.
7494 (start_inferior, attach_inferior): No longer clear cont_thread.
7495 (handle_v_cont): No longer set cont_thread.
7496 (captured_main): Clear cont_thread each time a GDB connects.
7497
c2c118cf
PA
74982014-11-12 Pedro Alves <palves@redhat.com>
7499
7500 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7501 thread, and don't resume all threads if the Hc thread has exited.
7502
78708b7c
PA
75032014-11-12 Pedro Alves <palves@redhat.com>
7504
7505 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7506 the process group instead of to a specific LWP.
7507
a2abc7de
PA
75082014-10-15 Pedro Alves <palves@redhat.com>
7509
7510 PR server/17487
7511 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7512 parameter.
7513 (arm_set_thread_context): Delete.
7514 (the_low_target): Adjust.
7515 * win32-i386-low.c (debug_registers_changed)
7516 (debug_registers_used): Delete.
7517 (update_debug_registers_callback): New function.
7518 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7519 needing to update their debug registers.
7520 (win32_get_current_dr): New function.
7521 (x86_dr_low_get_addr, x86_dr_low_get_control)
7522 (x86_dr_low_get_status): Fetch the debug register from the thread
7523 record's context.
7524 (i386_initial_stuff): Adjust.
7525 (i386_get_thread_context): Remove current_event parameter. Don't
7526 clear debug_registers_changed nor copy DR values to
7527 debug_reg_state.
7528 (i386_set_thread_context): Delete.
7529 (i386_prepare_to_resume): New function.
7530 (i386_thread_added): Mark the thread as needing to update irs
7531 debug registers.
7532 (the_low_target): Remove i386_set_thread_context and install
7533 i386_prepare_to_resume.
7534 * win32-low.c (win32_get_thread_context): Adjust.
7535 (win32_set_thread_context): Use SetThreadContext
7536 directly.
7537 (win32_prepare_to_resume): New function.
7538 (win32_require_context): New function, factored out from ...
7539 (thread_rec): ... this.
7540 (continue_one_thread): Call win32_prepare_to_resume on each thread
7541 we're about to continue.
7542 (win32_resume): Call win32_prepare_to_resume on the event thread.
7543 * win32-low.h (struct win32_thread_info)
7544 <debug_registers_changed>: New field.
7545 (struct win32_target_ops): Change prototype of set_thread_context,
7546 delete set_thread_context and add prepare_to_resume.
7547 (win32_require_context): New declaration.
7548
a442d071
GB
75492014-10-08 Gary Benson <gbenson@redhat.com>
7550
7551 * server.h: Do not include common-exceptions.h.
7552
6f1947e8
GB
75532014-10-08 Gary Benson <gbenson@redhat.com>
7554
7555 * server.h: Do not include cleanups.h.
7556
63b434a4
JH
75572014-09-30 James Hogan <james.hogan@imgtec.com>
7558
7559 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7560 mips64-dsp-linux.c.
7561
c4d9ceb6
YQ
75622014-09-23 Yao Qi <yao@codesourcery.com>
7563
7564 * linux-low.c (lp_status_maybe_breakpoint): New function.
7565 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7566 (count_events_callback): Likewise.
7567 (select_event_lwp_callback): Likewise.
7568 (cancel_breakpoints_callback): Likewise.
7569
89a5711c
DB
75702014-09-19 Don Breazeal <donb@codesourcery.com>
7571
7572 * linux-low.c (handle_extended_wait): Call
7573 linux_ptrace_get_extended_event.
7574 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7575 linux_is_extended_waitstatus.
7576
bffc0964
JB
75772014-09-16 Joel Brobecker <brobecker@adacore.com>
7578
7579 * Makefile.in (CPPFLAGS): Define.
7580 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7581 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7582
0bfdf32f
GB
75832014-09-16 Gary Benson <gbenson@redhat.com>
7584
7585 * inferiors.h (current_inferior): Renamed as...
7586 (current_thread): New variable. All uses updated.
7587 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7588 (maybe_move_out_of_jump_pad): Likewise.
7589 (cancel_breakpoint): Likewise.
7590 (linux_low_filter_event): Likewise.
7591 (wait_for_sigstop): Likewise.
7592 (linux_resume_one_lwp): Likewise.
7593 (need_step_over_p): Likewise.
7594 (start_step_over): Likewise.
7595 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7596 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7597 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7598 and save_inferior as saved_thread.
7599 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7600 saved_thread.
7601 (regcache_invalidate_thread): Likewise.
7602 * remote-utils.c (prepare_resume_reply): Likewise.
7603 * thread-db.c (thread_db_get_tls_address): Likewise.
7604 (disable_thread_event_reporting): Likewise.
7605 (remove_thread_event_breakpoints): Likewise.
7606 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7607 as saved_thread.
7608 * target.h (set_desired_inferior): Renamed as...
7609 (set_desired_thread): New declaration. All uses updated.
7610 * server.c (myresume): Updated comment to reference thread instead
7611 of inferior.
7612 (handle_serial_event): Likewise.
7613 (handle_target_event): Likewise.
7614
361c8ade
GB
76152014-09-12 Tom Tromey <tromey@redhat.com>
7616 Gary Benson <gbenson@redhat.com>
7617
7618 * regcache.h: Include common-regcache.h.
7619 (regcache_read_pc): Don't declare.
7620 * regcache.c (get_thread_regcache_for_ptid): New function.
7621
bd9269f7
GB
76222014-09-11 Tom Tromey <tromey@redhat.com>
7623 Gary Benson <gbenson@redhat.com>
7624
7625 * symbol.c: New file.
7626 * Makefile.in (SFILES): Add symbol.c.
7627 (OBS): Add symbol.o.
7628
f8c1d06b
GB
76292014-09-11 Gary Benson <gbenson@redhat.com>
7630
7631 * target.c (target_stop_ptid, target_continue_ptid): New
7632 functions.
7633
721ec300
GB
76342014-09-11 Tom Tromey <tromey@redhat.com>
7635 Gary Benson <gbenson@redhat.com>
7636
7637 * target.h: Include target/target.h.
7638 * target.c (target_read_memory, target_read_uint32)
7639 (target_write_memory): New functions.
7640
c5e92cca
GB
76412014-09-11 Gary Benson <gbenson@redhat.com>
7642
7643 * server.h (debug_hw_points): Don't declare.
7644 * server.c (debug_hw_points): Don't define. Replace all uses
7645 with show_debug_regs.
7646 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7647 all uses with show_debug_regs.
7648
2e4bb98a
EBM
76492014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7650
7651 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7652 endianness into account.
7653 (ppc_supply_ptrace_register): Likewise.
7654
ac740bc7
JH
76552014-09-03 James Hogan <james.hogan@imgtec.com>
7656
7657 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7658 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7659
97ea6506
GB
76602014-09-03 Gary Benson <gbenson@redhat.com>
7661
7662 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7663 ALL_DEBUG_ADDRESS_REGISTERS.
7664
df7e5265
GB
76652014-09-02 Gary Benson <gbenson@redhat.com>
7666
7667 * i386-low.h: Renamed as...
7668 * x86-low.h: New file. All type, function and variable name
7669 prefixes changed from "i386_" to "x86_". All references updated.
7670 * i386-low.c: Renamed as...
7671 * x86-low.c: New file. All type, function and variable name
7672 prefixes changed from "i386_" to "x86_". All references updated.
7673
ed859da7
GB
76742014-09-02 Gary Benson <gbenson@redhat.com>
7675
7676 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7677 (x86_linux_new_thread): Likewise.
7678
860789c7
GB
76792014-08-29 Gary Benson <gbenson@redhat.com>
7680
7681 * server.h (setjmp.h): Do not include.
7682 (toplevel): Do not declare.
7683 (common-exceptions.h): Include.
7684 (cleanups.h): Likewise.
7685 * server.c (toplevel): Do not define.
7686 (exit_code): New static global.
7687 (detach_or_kill_for_exit_cleanup): New function.
7688 (main): New function. Original main renamed to...
7689 (captured_main): New function.
7690 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7691
ff55e1b5
GB
76922014-08-29 Gary Benson <gbenson@redhat.com>
7693
7694 * Makefile.in (SFILES): Add common/common-exceptions.c.
7695 (OBS): Add common-exceptions.o.
7696 (common-exceptions.o): New rule.
7697 * utils.c (prepare_to_throw_exception): New function.
7698
e9bcb658
GB
76992014-08-29 Gary Benson <gbenson@redhat.com>
7700
7701 * config.in: Regenerate.
7702 * configure: Likewise.
7703
e3180625
GB
77042014-08-29 Gary Benson <gbenson@redhat.com>
7705
7706 * Makefile.in (SFILES): Add common/cleanups.c.
7707 (OBS): cleanups.o.
7708 (cleanups.o): New rule.
7709
e3d6ba5d
GB
77102014-08-29 Gary Benson <gbenson@redhat.com>
7711
7712 * utils.c (internal_vwarning): New function.
7713
7096e886
GB
77142014-08-28 Gary Benson <gbenson@redhat.com>
7715
7716 * utils.h (fatal): Remove declaration.
7717 * utils.c (fatal): Remove function.
7718
14ce3192
GB
77192014-08-28 Gary Benson <gbenson@redhat.com>
7720
7721 * tracepoint.c (gdb_agent_init): Replace fatal with
7722 perror_with_name.
7723 (initialize_tracepoint): Likewise.
7724
50278d59
GB
77252014-08-28 Gary Benson <gbenson@redhat.com>
7726
7727 * remote-utils.c (remote_prepare): Replace fatal with error.
7728
aa96c426
GB
77292014-08-28 Gary Benson <gbenson@redhat.com>
7730
7731 * linux-low.c (linux_async): Replace fatal with warning.
7732 Tidy up and return.
7733 (linux_start_non_stop): Return -1 if linux_async failed.
7734
f7160e97
GB
77352014-08-28 Gary Benson <gbenson@redhat.com>
7736
7737 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7738 gdb_assert.
7739 (i386_dr_low_get_addr): Remove vague comment.
7740 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7741 gdb_assert.
7742
38e08fca
GB
77432014-08-28 Gary Benson <gbenson@redhat.com>
7744
7745 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7746 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7747 internal_error.
7748 (linux_resume_one_lwp): Likewise.
7749 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7750 gdb_assert.
7751 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7752 with internal_error.
7753 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7754 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7755 (find_register_by_name): Replace fatal with internal_error.
7756 (find_regno): Likewise.
7757 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7758 * thread-db.c (thread_db_create_event): Likewise.
7759 (thread_db_load_search): Likewise.
7760 (try_thread_db_load_1): Likewise.
7761 * tracepoint.c (get_jump_space_head): Replace fatal with
7762 internal_error.
7763 (claim_trampoline_space): Likewise.
7764 (have_fast_tracepoint_trampoline_buffer): Likewise.
7765 (cmd_qtstart): Likewise.
7766 (stop_tracing): Likewise.
7767 (fast_tracepoint_collecting): Likewise.
7768 (target_malloc): Likewise.
7769 (download_tracepoint): Likewise.
7770 (download_trace_state_variables): Replace check with gdb_assert.
7771 (upload_fast_traceframes): Replace fatal with internal_error.
7772
34abf635
GB
77732014-08-19 Tom Tromey <tromey@redhat.com>
7774 Gary Benson <gbenson@redhat.com>
7775
7776 * Makefile.in (SFILES): Add common/common-debug.c.
7777 (OBS): Add common-debug.o.
7778 (common-debug.o): New rule.
7779 * debug.h (debug_printf): Don't declare.
7780 * debug.c (debug_printf): Renamed and rewritten as...
7781 (debug_vprintf): New function.
7782
f6e94d78
GB
77832014-08-19 Gary Benson <gbenson@redhat.com>
7784
7785 * utils.h: Do not include print-utils.h.
7786
9239eeab
GB
77872014-08-19 Tom Tromey <tromey@redhat.com>
7788 Gary Benson <gbenson@redhat.com>
7789
7790 * server.h: Add static assertion.
7791 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7792
ef87c8bb
GB
77932014-08-19 Tom Tromey <tromey@redhat.com>
7794 Gary Benson <gbenson@redhat.com>
7795
7796 * Makefile.in (SFILES): Add common/errors.c.
7797 (OBS): Add errors.o.
7798 (IPA_OBS): Add errors-ipa.o.
7799 (errors.o): New rule.
7800 (errors-ipa.o): Likewise.
7801 * utils.h (perror_with_name, error, warning): Don't declare.
7802 * utils.c (warning): Renamed and rewritten as...
7803 (vwarning): New function.
7804 (error): Renamed and rewritten as...
7805 (verror): New function.
7806 (internal_error): Renamed and rewritten as...
7807 (internal_verror): New function.
7808
bb974a24
GB
78092014-08-07 Gary Benson <gbenson@redhat.com>
7810
7811 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7812 * configure: Regenerate.
7813 * config.in: Likewise.
7814 * server.h: Do not include errno.h.
7815 * event-loop.c: Likewise.
7816 * hostio-errno.c: Likewise.
7817 * linux-low.c: Likewise.
7818 * remote-utils.c: Likewise.
7819 * spu-low.c: Likewise.
7820 * utils.c: Likewise.
7821 * gdbreplay.c: Unconditionally include errno.h.
7822
6d3d12eb
GB
78232014-08-07 Gary Benson <gbenson@redhat.com>
7824
7825 * server.h: Do not include string.h.
7826 * event-loop.c: Likewise.
7827 * linux-low.c: Likewise.
7828 * regcache.c: Likewise.
7829 * remote-utils.c: Likewise.
7830 * spu-low.c: Likewise.
7831 * utils.c: Likewise.
7832
dccbb609
GB
78332014-08-07 Gary Benson <gbenson@redhat.com>
7834
7835 * server.h: Do not include gdb_assert.h.
7836
e76df0d0
GB
78372014-08-07 Gary Benson <gbenson@redhat.com>
7838
7839 * server.h: Do not include common-utils.h.
7840
4cb9c816
GB
78412014-08-07 Gary Benson <gbenson@redhat.com>
7842
7843 * server.h: Do not include ptid.h.
7844 * notif.h: Likewise.
7845
3995eeee
GB
78462014-08-07 Gary Benson <gbenson@redhat.com>
7847
7848 * server.h: Do not include gdb_locale.h.
7849
cb9f1a9b
GB
78502014-08-07 Gary Benson <gbenson@redhat.com>
7851
7852 * server.h: Do not include gdb/signals.h.
7853 * win32-low.c: Likewise.
7854
a5fceff8
GB
78552014-08-07 Gary Benson <gbenson@redhat.com>
7856
7857 * server.h: Do not include pathmax.h.
7858
b9391142
GB
78592014-08-07 Gary Benson <gbenson@redhat.com>
7860
7861 * server.h: Do not include libiberty.h.
7862 * linux-bfin-low.c: Likewise.
7863
0e443c87
GB
78642014-08-07 Gary Benson <gbenson@redhat.com>
7865
7866 * server.h: Do not include ansidecl.h.
7867
8ebb3f56
GB
78682014-08-07 Gary Benson <gbenson@redhat.com>
7869
7870 * linux-x86-low.c: Do not include stddef.h.
7871 * lynx-ppc-low.c: Likewise.
7872 * tracepoint.c: Likewise.
7873
8980bdf6
GB
78742014-08-07 Gary Benson <gbenson@redhat.com>
7875
7876 * server.h: Do not include stdarg.h.
7877 * nto-low.c: Likewise.
7878
d7096f71
GB
78792014-08-07 Gary Benson <gbenson@redhat.com>
7880
7881 * server.h: Do not include stdlib.h.
7882 * inferiors.c: Likewise.
7883 * linux-low.c: Likewise.
7884 * regcache.c: Likewise.
7885 * spu-low.c: Likewise.
7886 * tracepoint.c: Likewise.
7887 * utils.c: Likewise.
7888
d02f550d
GB
78892014-08-07 Gary Benson <gbenson@redhat.com>
7890
7891 * server.h: Do not include stdio.h.
7892 * linux-low.c: Likewise.
7893 * remote-utils.c: Likewise.
7894 * spu-low.c: Likewise.
7895 * utils.c: Likewise.
7896 * wincecompat.c: Likewise.
7897
87f6c4e3
GB
78982014-08-06 Gary Benson <gbenson@redhat.com>
7899
7900 * regcache.c (init_register_cache): Move conditionals inside if.
7901
7089dca4
GB
79022014-08-06 Gary Benson <gbenson@redhat.com>
7903
7904 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7905
462f517e
GB
79062014-07-31 Gary Benson <gbenson@redhat.com>
7907
7908 * ax.h: Do not include server.h.
7909 * gdbthread.h: Likewise.
7910 * lynx-low.h: Likewise.
7911 * notif.h: Likewise.
7912
976411d6
GB
79132014-07-30 Gary Benson <gbenson@redhat.com>
7914
7915 * server.h: Include common-defs.h.
7916 Do not include config.h or build-gnulib-gdbserver/config.h.
7917
d41f6d8e
GB
79182014-07-30 Gary Benson <gbenson@redhat.com>
7919
7920 * hostio-errno.c: Move server.h to top of includes list.
7921 * inferiors.c: Likewise.
7922 * linux-x86-low.c: Likewise.
7923 * notif.c: Include server.h.
7924
314c6a35
TT
79252014-07-24 Tom Tromey <tromey@redhat.com>
7926 Gary Benson <gbenson@redhat.com>
7927
7928 * server.h (CORE_ADDR): Now unsigned.
7929
69ff6be5
PA
79302014-07-16 Pedro Alves <palves@redhat.com>
7931
7932 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7933
ce9e3fe7
PA
79342014-07-15 Pedro Alves <palves@redhat.com>
7935
7936 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7937 copy.
7938
e76126e8
PA
79392014-07-11 Pedro Alves <palves@redhat.com>
7940
7941 * linux-low.c (kill_wait_lwp): New function, based on
7942 kill_one_lwp_callback, but use my_waitpid directly.
7943 (kill_one_lwp_callback, linux_kill): Use it.
7944
8e9db26e
PA
79452014-06-23 Pedro Alves <palves@redhat.com>
7946
7947 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7948 before setting DR0..DR3.
7949
698b3e08
GB
79502014-06-20 Gary Benson <gbenson@redhat.com>
7951
7952 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7953 * configure: Regenerated.
7954 * config.in: Likewise.
7955
125f8a3d
GB
79562014-06-20 Gary Benson <gbenson@redhat.com>
7957
7958 * Makefile.in (SFILES): Update locations for files moved
7959 from common to nat.
7960 (object file files): Reordered.
7961
42995dbd
GB
79622014-06-20 Gary Benson <gbenson@redhat.com>
7963
7964 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7965 (i386_dr_low_set_addr): Likewise.
7966 (i386_dr_low_get_addr): Likewise.
7967 (i386_dr_low_can_set_control): Likewise.
7968 (i386_dr_low_set_control): Likewise.
7969 (i386_dr_low_get_control): Likewise.
7970 (i386_dr_low_get_status): Likewise.
7971 (i386_get_debug_register_length): Likewise.
7972 * linux-x86-low.c (i386_dr_low_set_addr):
7973 Changed signature. Made static.
7974 (i386_dr_low_get_addr): Likewise.
7975 (i386_dr_low_set_control): Likewise.
7976 (i386_dr_low_get_control): Likewise.
7977 (i386_dr_low_get_status): Likewise.
7978 (i386_dr_low): New global variable.
7979 * win32-i386-low.c (i386_dr_low_set_addr):
7980 Changed signature. Made static.
7981 (i386_dr_low_get_addr): Likewise.
7982 (i386_dr_low_set_control): Likewise.
7983 (i386_dr_low_get_control): Likewise.
7984 (i386_dr_low_get_status): Likewise.
7985 (i386_dr_low): New global variable.
7986
e1d2394b
MS
79872014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7988
7989 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7990 * Makefile.in (AR, AR_FLAGS): Define.
7991 * configure: Regenerate.
7992
3a8ee006
GB
79932014-06-19 Gary Benson <gbenson@redhat.com>
7994
7995 * Makefile.in (i386-dregs.o): New rule.
7996 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7997 * i386-low.c (target.h): Remove include.
7998 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7999 (DR_CONTROL_SHIFT): Likewise.
8000 (DR_CONTROL_SIZE): Likewise.
8001 (DR_RW_EXECUTE): Likewise.
8002 (DR_RW_WRITE): Likewise.
8003 (DR_RW_READ): Likewise.
8004 (DR_RW_IORW): Likewise.
8005 (DR_LEN_1): Likewise.
8006 (DR_LEN_2): Likewise.
8007 (DR_LEN_4): Likewise.
8008 (DR_LEN_8): Likewise.
8009 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8010 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8011 (DR_ENABLE_SIZE): Likewise.
8012 (DR_LOCAL_SLOWDOWN): Likewise.
8013 (DR_GLOBAL_SLOWDOWN): Likewise.
8014 (DR_CONTROL_RESERVED): Likewise.
8015 (I386_DR_CONTROL_MASK): Likewise.
8016 (I386_DR_VACANT): Likewise.
8017 (I386_DR_LOCAL_ENABLE): Likewise.
8018 (I386_DR_GLOBAL_ENABLE): Likewise.
8019 (I386_DR_DISABLE): Likewise.
8020 (I386_DR_SET_RW_LEN): Likewise.
8021 (I386_DR_GET_RW_LEN): Likewise.
8022 (I386_DR_WATCH_HIT): Likewise.
8023 (i386_wp_op_t): Likewise.
8024 (i386_show_dr): Likewise.
8025 (i386_length_and_rw_bits): Likewise.
8026 (i386_insert_aligned_watchpoint): Likewise.
8027 (i386_remove_aligned_watchpoint): Likewise.
8028 (i386_handle_nonaligned_watchpoint): Likewise.
8029 i386_update_inferior_debug_regs(): Likewise.
8030 (i386_dr_insert_watchpoint): Likewise.
8031 (i386_dr_remove_watchpoint): Likewise.
8032 (i386_dr_region_ok_for_watchpoint): Likewise.
8033 (i386_dr_stopped_data_address): Likewise.
8034 (i386_dr_stopped_by_watchpoint): Likewise.
8035
8f26655c
GB
80362014-06-19 Gary Benson <gbenson@redhat.com>
8037
8038 * i386-low.c (i386_dr_show): Renamed to
8039 i386_show_dr and made static. All uses updated.
8040 (i386_dr_length_and_rw_bits): Renamed to
8041 i386_length_and_rw_bits and made static.
8042 All uses updated.
8043 (i386_dr_insert_aligned_watchpoint): Renamed to
8044 i386_insert_aligned_watchpoint and made static.
8045 All uses updated.
8046 (i386_dr_remove_aligned_watchpoint): Renamed to
8047 i386_remove_aligned_watchpoint and made static.
8048 All uses updated.
8049 (i386_dr_update_inferior_debug_regs): Renamed to
8050 i386_update_inferior_debug_regs and made static.
8051 All uses updated.
8052
b9228891
GB
80532014-06-18 Gary Benson <gbenson@redhat.com>
8054
5171def3
GB
8055 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8056 (i386_dr_low_can_set_control): Likewise.
8057 (i386_get_debug_register_length): Likewise.
8058 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8059 (i386_dr_low_can_set_control): Likewise.
8060 (i386_get_debug_register_length): Likewise.
8061
80622014-06-17 Gary Benson <gbenson@redhat.com>
8063
b9228891
GB
8064 * i386-low.h (i386-dregs.h): New include.
8065 (DR_FIRSTADDR): Now in i386-dregs.h.
8066 (DR_LASTADDR): Likewise.
8067 (DR_NADDR): Likewise.
8068 (DR_STATUS): Likewise.
8069 (DR_CONTROL): Likewise.
8070 (i386_debug_reg_state): Likewise.
8071 (i386_dr_insert_watchpoint): Likewise.
8072 (i386_dr_remove_watchpoint): Likewise.
8073 (i386_dr_region_ok_for_watchpoint): Likewise.
8074 (i386_dr_stopped_data_address): Likewise.
8075 (i386_dr_stopped_by_watchpoint): Likewise.
8076 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8077
4be83cc2
GB
80782014-06-18 Gary Benson <gbenson@redhat.com>
8079
8080 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8081 i386_dr_insert_watchpoint.
8082 (i386_low_remove_watchpoint): Renamed to
8083 i386_dr_remove_watchpoint.
8084 (i386_low_region_ok_for_watchpoint): Renamed to
8085 i386_dr_region_ok_for_watchpoint.
8086 (i386_low_stopped_data_address): Renamed to
8087 i386_dr_stopped_data_address.
8088 (i386_low_stopped_by_watchpoint): Renamed to
8089 i386_dr_stopped_by_watchpoint.
8090 * i386-low.c (i386_show_dr): Renamed to
8091 i386_dr_show and made nonstatic. All uses updated.
8092 (i386_length_and_rw_bits): Renamed to
8093 i386_dr_length_and_rw_bits and made nonstatic.
8094 All uses updated.
8095 (i386_insert_aligned_watchpoint): Renamed to
8096 i386_dr_insert_aligned_watchpoint and made nonstatic.
8097 All uses updated.
8098 (i386_remove_aligned_watchpoint): Renamed to
8099 i386_dr_remove_aligned_watchpoint and made nonstatic.
8100 All uses updated.
8101 (i386_update_inferior_debug_regs): Renamed to
8102 i386_dr_update_inferior_debug_regs and made nonstatic.
8103 All uses updated.
8104 (i386_low_insert_watchpoint): Renamed to
8105 i386_dr_insert_watchpoint. All uses updated.
8106 (i386_low_remove_watchpoint): Renamed to
8107 i386_dr_remove_watchpoint. All uses updated.
8108 (i386_low_region_ok_for_watchpoint): Renamed to
8109 i386_dr_region_ok_for_watchpoint. All uses updated.
8110 (i386_low_stopped_data_address): Renamed to
8111 i386_dr_stopped_data_address. All uses updated.
8112 (i386_low_stopped_by_watchpoint): Renamed to
8113 i386_dr_stopped_by_watchpoint. All uses updated.
8114
131aa0d4
GB
81152014-06-18 Gary Benson <gbenson@redhat.com>
8116
8117 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8118 (i386_dr_low_can_set_control): Likewise.
8119 (i386_insert_aligned_watchpoint): New check.
8120
d9305f7f
GB
81212014-06-18 Gary Benson <gbenson@redhat.com>
8122
8123 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8124 Renamed to state.
8125
e927c9fc
GB
81262014-06-18 Gary Benson <gbenson@redhat.com>
8127
8128 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8129 instead of fatal and error.
8130 (i386_handle_nonaligned_watchpoint): Likewise.
8131
1b6d4134
GB
81322014-06-18 Gary Benson <gbenson@redhat.com>
8133
8134 * i386-low.c (i386_get_debug_register_length): New macro.
8135 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8136 (i386_show_dr): Use debug_printf instead of fprintf. Use
8137 phex to format values.
8138
6e62758f
GB
81392014-06-18 Gary Benson <gbenson@redhat.com>
8140
8141 * i386-low.h: Comment changes.
8142 * i386-low.c: Likewise.
8143
fc6e2f03
GB
81442014-06-18 Gary Benson <gbenson@redhat.com>
8145
8146 * i386-low.c: Whitespace changes.
8147
f9d1eeed
TT
81482014-06-12 Tom Tromey <tromey@redhat.com>
8149
8150 * utils.c (freeargv): Remove.
8151
0b04e523
TT
81522014-06-12 Tom Tromey <tromey@redhat.com>
8153
8154 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8155 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8156 (parse_debug_format_options): Likewise.
8157 (gdbserver_usage): Likewise.
8158 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8159 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8160 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8161 against libiberty.
8162 ($(LIBGNU)): Depend on libiberty.
8163 (all-lib): Recurse into all subdirs.
8164 (install-only): Invoke "install" target in subdirs.
8165 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8166 targets.
8167 * configure: Rebuild.
8168 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8169 for vasprintf, vsnprintf, or gettimeofday.
8170 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8171 srv_tgtobj.
8172
270c9937
JB
81732014-06-05 Joel Brobecker <brobecker@adacore.com>
8174
8175 * development.sh: Delete.
8176 * Makefile.in (config.status): Adjust dependency on development.sh.
8177 * configure.ac: Adjust development.sh source call.
8178 * configure: Regenerate.
8179
0a261ed8
PA
81802014-06-02 Pedro Alves <palves@redhat.com>
8181
8182 * ax.c (gdb_free_agent_expr): New function.
8183 * ax.h (gdb_free_agent_expr): New declaration.
8184 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8185 list.
8186 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8187 static.
8188 (clear_breakpoint_conditions_and_commands): New function.
8189 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8190 (clear_breakpoint_conditions_and_commands): New declaration.
8191
e9dae05e
RR
81922014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8193
8194 * linux-aarch64-low.c (asm/ptrace.h): Include.
8195
5876f503
JK
81962014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8197
8198 Fix TLS access for -static -pthread.
8199 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8200 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8201 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8202
802e8e6d
PA
82032014-05-20 Pedro Alves <palves@redhat.com>
8204
8205 * linux-aarch64-low.c (aarch64_insert_point)
8206 (aarch64_remove_point): No longer check whether the type is
8207 supported here. Adjust to new interface.
8208 (the_low_target): Install aarch64_supports_z_point_type as
8209 supports_z_point_type method.
8210 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8211 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8212 instead of a Z packet char. Adjust.
8213 (arm_supports_z_point_type): New function.
8214 (arm_insert_point, arm_remove_point): Adjust to new interface.
8215 (the_low_target): Install arm_supports_z_point_type.
8216 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8217 (cris_insert_point, cris_remove_point): Adjust to new interface.
8218 Don't check whether the type is supported here.
8219 (the_low_target): Install cris_supports_z_point_type.
8220 * linux-low.c (linux_supports_z_point_type): New function.
8221 (linux_insert_point, linux_remove_point): Adjust to new interface.
8222 * linux-low.h (struct linux_target_ops) <insert_point,
8223 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8224 raw_breakpoint pointer parameter.
8225 <supports_z_point_type>: New method.
8226 * linux-mips-low.c (mips_supports_z_point_type): New function.
8227 (mips_insert_point, mips_remove_point): Adjust to new interface.
8228 Use mips_supports_z_point_type.
8229 (the_low_target): Install mips_supports_z_point_type.
8230 * linux-ppc-low.c (the_low_target): Install NULL as
8231 supports_z_point_type method.
8232 * linux-s390-low.c (the_low_target): Install NULL as
8233 supports_z_point_type method.
8234 * linux-sparc-low.c (the_low_target): Install NULL as
8235 supports_z_point_type method.
8236 * linux-x86-low.c (x86_supports_z_point_type): New function.
8237 (x86_insert_point): Adjust to new insert_point interface. Use
8238 insert_memory_breakpoint. Adjust to new
8239 i386_low_insert_watchpoint interface.
8240 (x86_remove_point): Adjust to remove_point interface. Use
8241 remove_memory_breakpoint. Adjust to new
8242 i386_low_remove_watchpoint interface.
8243 (the_low_target): Install x86_supports_z_point_type.
8244 * lynx-low.c (lynx_target_ops): Install NULL as
8245 supports_z_point_type callback.
8246 * nto-low.c (nto_supports_z_point_type): New.
8247 (nto_insert_point, nto_remove_point): Adjust to new interface.
8248 (nto_target_ops): Install nto_supports_z_point_type.
8249 * mem-break.c: Adjust intro comment.
8250 (struct raw_breakpoint) <raw_type, size>: New fields.
8251 <inserted>: Update comment.
8252 <shlib_disabled>: Delete field.
8253 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8254 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8255 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8256 (raw_bkpt_type_to_target_hw_bp_type): New function.
8257 (find_enabled_raw_code_breakpoint_at): New function.
8258 (find_raw_breakpoint_at): New type and size parameters. Use them.
8259 (insert_memory_breakpoint): New function, based off
8260 set_raw_breakpoint_at.
8261 (remove_memory_breakpoint): New function.
8262 (set_raw_breakpoint_at): Reimplement.
8263 (set_breakpoint): New, based on set_breakpoint_at.
8264 (set_breakpoint_at): Reimplement.
8265 (delete_raw_breakpoint): Go through the_target->remove_point
8266 instead of assuming memory breakpoints.
8267 (find_gdb_breakpoint_at): Delete.
8268 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8269 (find_gdb_breakpoint): New function.
8270 (set_gdb_breakpoint_at): Delete.
8271 (z_type_supported): New function.
8272 (set_gdb_breakpoint_1): New function, loosely based off
8273 set_gdb_breakpoint_at.
8274 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8275 (delete_gdb_breakpoint_at): Delete.
8276 (delete_gdb_breakpoint_1): New function, loosely based off
8277 delete_gdb_breakpoint_at.
8278 (delete_gdb_breakpoint): New function.
8279 (clear_gdb_breakpoint_conditions): Rename to ...
8280 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8281 breakpoint.
8282 (add_condition_to_breakpoint): Make static.
8283 (add_breakpoint_condition): Take a struct breakpoint pointer
8284 instead of an address. Adjust.
8285 (gdb_condition_true_at_breakpoint): Rename to ...
8286 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8287 z_type parameter.
8288 (gdb_condition_true_at_breakpoint): Reimplement.
8289 (add_breakpoint_commands): Take a struct breakpoint pointer
8290 instead of an address. Adjust.
8291 (gdb_no_commands_at_breakpoint): Rename to ...
8292 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8293 parameter. Return true if no breakpoint was found. Change debug
8294 output.
8295 (gdb_no_commands_at_breakpoint): Reimplement.
8296 (run_breakpoint_commands): Rename to ...
8297 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8298 and change return type to boolean.
8299 (run_breakpoint_commands): New function.
8300 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8301 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8302 breakpoint. Go through the_target->remove_point instead of
8303 assuming memory breakpoint.
8304 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8305 software and hardware breakpoints.
8306 (reinsert_raw_breakpoint): Go through the_target->insert_point
8307 instead of assuming memory breakpoint.
8308 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8309 software and hardware breakpoints.
8310 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8311 Check both software and hardware breakpoints.
8312 (validate_inserted_breakpoint): Assert the breakpoint is a
8313 software breakpoint. Set the inserted flag to -1 instead of
8314 setting shlib_disabled.
8315 (delete_disabled_breakpoints): Adjust.
8316 (validate_breakpoints): Only validate software breakpoints.
8317 Adjust to inserted flag change.
8318 (check_mem_read, check_mem_write): Skip breakpoint types other
8319 than software breakpoints. Adjust to inserted flag change.
8320 * mem-break.h (enum raw_bkpt_type): New enum.
8321 (raw_breakpoint, struct process_info): Forward declare.
8322 (Z_packet_to_target_hw_bp_type): Delete declaration.
8323 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8324 (set_gdb_breakpoint, delete_gdb_breakpoint)
8325 (clear_breakpoint_conditions): New declarations.
8326 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8327 (breakpoint_inserted_here): Update comment.
8328 (add_breakpoint_condition, add_breakpoint_commands): Replace
8329 address parameter with a breakpoint pointer parameter.
8330 (gdb_breakpoint_here): Update comment.
8331 (delete_gdb_breakpoint_at): Delete.
8332 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8333 * server.c (process_point_options): Take a struct breakpoint
8334 pointer instead of an address. Adjust.
8335 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8336 delete_gdb_breakpoint.
8337 * spu-low.c (spu_target_ops): Install NULL as
8338 supports_z_point_type method.
8339 * target.h: Include mem-break.h.
8340 (struct target_ops) <prepare_to_access_memory>: Update comment.
8341 <supports_z_point_type>: New field.
8342 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8343 instead of a char. Also take a raw breakpoint pointer.
8344 * win32-arm-low.c (the_low_target): Install NULL as
8345 supports_z_point_type.
8346 * win32-i386-low.c (i386_supports_z_point_type): New function.
8347 (i386_insert_point, i386_remove_point): Adjust to new interface.
8348 (the_low_target): Install i386_supports_z_point_type.
8349 * win32-low.c (win32_supports_z_point_type): New function.
8350 (win32_insert_point, win32_remove_point): Adjust to new interface.
8351 (win32_target_ops): Install win32_supports_z_point_type.
8352 * win32-low.h (struct win32_target_ops):
8353 <supports_z_point_type>: New method.
8354 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8355 instead of a char. Also take a raw breakpoint pointer.
8356
932539e3
PA
83572014-05-20 Pedro Alves <palves@redhat.com>
8358
8359 * mem-break.h: Include break-common.h.
8360 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8361 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8362 (Z_packet_to_target_hw_bp_type): New declaration.
8363 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8364 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8365 (Z_PACKET_ACCESS_WP): Delete macros.
8366 (Z_packet_to_hw_type): Delete function.
8367 * i386-low.h: Don't include break-common.h here.
8368 (Z_packet_to_hw_type): Delete declaration.
8369 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8370 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8371 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8372 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8373 * linux-aarch64-low.c: Don't include break-common.h here.
8374 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8375 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8376 (Z_packet_to_target_hw_bp_type): Delete function.
8377 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8378 function.
8379 (mips_insert_point, mips_remove_point): Use
8380 Z_packet_to_target_hw_bp_type.
8381
4ff0d3d8
PA
83822014-05-20 Pedro Alves <palves@redhat.com>
8383
8384 * linux-aarch64-low.c: Include break-common.h.
8385 (enum target_point_type): Delete.
8386 (Z_packet_to_point_type): Rename to ...
8387 (Z_packet_to_target_hw_bp_type): ... this, and return a
8388 target_hw_bp_type instead.
8389 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8390 instead of an enum target_point_type.
8391 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8392 breakpoint type.
8393 (aarch64_dr_state_insert_one_point)
8394 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8395 (aarch64_handle_aligned_watchpoint)
8396 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8397 Take an enum target_hw_bp_type instead of an enum
8398 target_point_type.
8399 (aarch64_supports_z_point_type): New function.
8400 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8401 use Z_packet_to_target_hw_bp_type.
8402
786dc519
JB
84032014-05-20 Joel Brobecker <brobecker@adacore.com>
8404
8405 * configure.ac: Only use -Werror by default when DEVELOPMENT
8406 is true.
8407 * configure: Regenerate.
8408
9e0aa64f
JK
84092014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8410
8411 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8412 * linux-x86-low.c (X86_64_USER_REGS): New.
8413 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8414
2b577b92
YQ
84152014-04-28 Yao Qi <yao@codesourcery.com>
8416
8417 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8418 name.
8419
94611da2
PA
84202014-04-25 Pedro Alves <palves@redhat.com>
8421
8422 PR server/16255
8423 * linux-low.c (linux_attach_fail_reason_string): New function.
8424 (linux_attach_lwp): Delete.
8425 (linux_attach_lwp_1): Rename to ...
8426 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8427 argument. Remove "initial" parameter. Return int instead of
8428 void. Don't error or warn here.
8429 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8430 failure to attach to the tgid. Call warning when failing to
8431 attach to an lwp.
8432 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8433 argument. Remove "initial" parameter. Return int instead of
8434 void. Don't error or warn here.
8435 (linux_attach_fail_reason_string): New declaration.
8436 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8437 interface change. Use linux_attach_fail_reason_string.
8438
01f9f808
MS
84392014-04-24 Michael Sturm <michael.sturm@mintel.com>
8440 Walfred Tedeschi <walfred.tedeschi@intel.com>
8441
8442 * Makefile.in: Added rules to handle new files
8443 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8444 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8445 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8446 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8447 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8448 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8449 x32-avx512-linux.o.
8450 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8451 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8452 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8453 i386/x32-avx512.xml.
8454 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8455 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8456 i386/x32-avx512-linux.xml.
8457 * i387-fp.c (num_avx512_k_registers): New constant for number
8458 of K registers.
8459 (num_avx512_zmmh_low_registers): New constant for number of
8460 lower ZMM registers (0-15).
8461 (num_avx512_zmmh_high_registers): New constant for number of
8462 higher ZMM registers (16-31).
8463 (num_avx512_ymmh_registers): New contant for number of higher
8464 YMM registers (ymm16-31 added by avx521 on x86_64).
8465 (num_avx512_xmm_registers): New constant for number of higher
8466 XMM registers (xmm16-31 added by AVX512 on x86_64).
8467 (struct i387_xsave): Add space for AVX512 registers.
8468 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8469 Add code to handle AVX512 registers.
8470 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8471 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8472 prototypei from generated file.
8473 (tdesc_amd64_avx512_linux): Likewise.
8474 (init_registers_x32_avx512_linux): Likewise.
8475 (tdesc_x32_avx512_linux): Likewise.
8476 (init_registers_i386_avx512_linux): Likewise.
8477 (tdesc_i386_avx512_linux): Likewise.
8478 (x86_64_regmap): Add AVX512 registers.
8479 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8480 mask.
8481 (initialize_low_arch): Add code to initialize AVX512 registers.
8482
51aa91f9
PA
84832014-04-23 Pedro Alves <palves@redhat.com>
8484
8485 * mem-break.c (find_gdb_breakpoint_at): Make static.
8486 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8487
a4165e94
PA
84882014-04-23 Pedro Alves <palves@redhat.com>
8489
8490 * i386-low.c: Don't include break-common.h here.
8491 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8492 prototype to take target_hw_bp_type as argument instead of a Z
8493 packet char.
8494 * i386-low.h: Include break-common.h here.
8495 (Z_packet_to_hw_type): Declare.
8496 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8497 prototypes.
8498 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8499 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8500 (x86_remove_point): Convert the packet number to a
8501 target_hw_bp_type before calling i386_low_remove_watchpoint.
8502 * win32-i386-low.c (i386_insert_point): Convert the packet number
8503 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8504 (i386_remove_point): Convert the packet number to a
8505 target_hw_bp_type before calling i386_low_remove_watchpoint.
8506
b8acf843
PA
85072014-04-23 Pedro Alves <palves@redhat.com>
8508
8509 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8510
d708bcd1
PA
85112014-04-10 Pedro Alves <palves@redhat.com>
8512
8513 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8514 Check if the condition or command is NULL before checking if the
8515 breakpoint is known. On success, return true.
8516 * mem-break.h (add_breakpoint_condition): Document return.
8517 (add_breakpoint_commands): Add describing comment.
8518 * server.c (skip_to_semicolon): New function.
8519 (process_point_options): Use it.
8520
2eec7d5b
PA
85212014-04-09 Pedro Alves <palves@redhat.com>
8522
8523 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8524 to lwpid_of.
8525
fa96cb38
PA
85262014-02-27 Pedro Alves <palves@redhat.com>
8527
8528 PR 12702
8529 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8530 macros.
8531 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8532 output.
8533 (last_thread_of_process_p): Take a PID argument instead of a
8534 thread pointer.
8535 (linux_wait_for_lwp): Delete.
8536 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8537 functions.
8538 (linux_low_filter_event): New function, party factored out from
8539 linux_wait_for_event.
8540 (linux_wait_for_event): Rename to ...
8541 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8542 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8543 sigsuspend. Check for zombie leaders.
8544 (linux_wait_for_event): Reimplement as wrapper around
8545 linux_wait_for_event_filtered.
8546 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8547 a normal or signal exit is seen, it's the whole process exiting.
8548 (wait_for_sigstop): No longer a for_each_inferior callback.
8549 Rewrite on top of linux_wait_for_event_filtered.
8550 (stop_all_lwps): Call wait_for_sigstop directly.
8551 * server.c (resume, handle_target_event): Handle
8552 TARGET_WAITKIND_NO_RESUMED.
8553
d763de10
JB
85542014-02-26 Joel Brobecker <brobecker@adacore.com>
8555
8556 * win32-low.c (psapi_get_dll_name,
8557 * win32_CreateToolhelp32Snapshot): Delete.
8558 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8559 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8560 Delete.
8561 (handle_load_dll): Add function description.
8562 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8563
850a0f76
JB
85642014-02-26 Joel Brobecker <brobecker@adacore.com>
8565
8566 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8567 Add comment.
8568 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8569 base address when calling win32_add_one_solib.
8570 (handle_load_dll): Delete local variable load_addr.
8571 Remove 0x1000 offset applied to DLL base address when calling
8572 win32_add_one_solib.
8573 (handle_unload_dll): Add comment.
8574
f25b3fc3
JB
85752014-02-26 Joel Brobecker <brobecker@adacore.com>
8576
8577 * win32-low.c (win32_add_all_dlls): Renames
8578 win32_ensure_ntdll_loaded. Rewrite function documentation.
8579 Adjust implementation to always load all DLLs.
8580 Add 0x1000 offset to DLL base address when calling
8581 win32_add_one_solib.
8582 (child_initialization_done): New static global.
8583 (do_initial_child_stuff): Set child_initialization_done to
8584 zero during child initialization, and 1 after. Replace call
8585 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8586 Add comment.
8587 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8588 (handle_unload_dll): Add function documentation.
8589 (get_child_debug_event): Ignore load and unload DLL events
8590 during child initialization.
8591
d86d4aaf
DE
85922014-02-20 Doug Evans <dje@google.com>
8593
3bc32da3 8594 Remove global all_lwps.
d86d4aaf
DE
8595 * inferiors.h (ptid_of): Move here from linux-low.h.
8596 (pid_of, lwpid_of): Ditto.
8597 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8598 parameter is a struct thread_info * now.
8599 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8600 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8601 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8602 directly.
8603 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8604 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8605 * linux-arm-low.c (update_registers_callback): Update, "entry"
8606 parameter is a struct thread_info * now.
8607 Fetch lwpid from current_inferior directly.
8608 (arm_insert_point): Pass &all_threads to find_inferior instead of
8609 &all_lwps.
8610 (arm_remove_point): Ditto.
8611 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8612 (arm_prepare_to_resume): Fetch pid from thread.
8613 (arm_read_description): Fetch lwpid from current_inferior directly.
8614 * linux-low.c (all_lwps): Delete.
8615 (delete_lwp): Delete call to remove_inferior.
8616 (handle_extended_wait): Fetch lwpid from thread.
8617 (add_lwp): Don't set lwp->entry.id. Remove call to
8618 add_inferior_to_list.
8619 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8620 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8621 (kill_one_lwp_callback): Ditto.
8622 (linux_kill): Don't dereference NULL pointer.
8623 Fetch ptid,lwpid from thread.
8624 (get_detach_signal): Fetch ptid from thread.
8625 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8626 Simplify call to regcache_invalidate_thread.
8627 (delete_lwp_callback): Update, "entry" parameter is a
8628 struct thread_info * now. Fetch pid from thread.
8629 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8630 (status_pending_p_callback): Update, "entry" parameter is a
8631 struct thread_info * now. Fetch ptid from thread.
8632 (find_lwp_pid): Update, "entry" parameter is a
8633 struct thread_info * now.
8634 (linux_wait_for_lwp): Fetch pid from thread.
8635 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8636 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8637 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8638 (dequeue_one_deferred_signal): Ditto.
8639 (cancel_breakpoint): Fetch ptid from current_inferior.
8640 (linux_wait_for_event): Pass &all_threads to find_inferior,
8641 not &all_lwps. Fetch ptid, lwpid from thread.
8642 (count_events_callback): Update, "entry" parameter is a
8643 struct thread_info * now.
8644 (select_singlestep_lwp_callback): Ditto.
8645 (select_event_lwp_callback): Ditto.
8646 (cancel_breakpoints_callback): Ditto.
8647 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8648 not &all_lwps.
8649 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8650 (unsuspend_one_lwp): Update, "entry" parameter is a
8651 struct thread_info * now.
8652 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8653 not &all_lwps.
8654 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8655 Fetch lwpid from thread, not lwp.
8656 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8657 Pass &all_threads to find_inferior, not &all_lwps.
8658 (send_sigstop): Fetch lwpid from thread, not lwp.
8659 (send_sigstop_callback): Update, "entry" parameter is a
8660 struct thread_info * now.
8661 (suspend_and_send_sigstop_callback): Ditto.
8662 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8663 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8664 struct thread_info * now.
8665 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8666 from thread, lwp.
8667 (lwp_running): Update, "entry" parameter is a
8668 struct thread_info * now.
8669 (stop_all_lwps): Fetch ptid from thread.
8670 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8671 (linux_resume_one_lwp): Fetch lwpid from thread.
8672 (linux_set_resume_request): Update, "entry" parameter is a
8673 struct thread_info * now. Fetch pid, lwpid from thread.
8674 (resume_status_pending_p): Update, "entry" parameter is a
8675 struct thread_info * now.
8676 (need_step_over_p): Ditto. Fetch lwpid from thread.
8677 (start_step_over): Fetch lwpid from thread.
8678 (linux_resume_one_thread): Update, "entry" parameter is a
8679 struct thread_info * now. Fetch lwpid from thread.
8680 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8681 (proceed_one_lwp): Update, "entry" parameter is a
8682 struct thread_info * now. Fetch lwpid from thread.
8683 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8684 struct thread_info * now.
8685 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8686 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8687 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8688 directly.
8689 (regsets_store_inferior_registers): Ditto.
8690 (fetch_register, store_register): Ditto.
8691 (linux_read_memory, linux_write_memory): Ditto.
8692 (linux_request_interrupt): Ditto.
8693 (linux_read_auxv): Ditto.
8694 (linux_xfer_siginfo): Ditto.
8695 (linux_qxfer_spu): Ditto.
8696 (linux_qxfer_libraries_svr4): Ditto.
8697 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8698 moved to inferiors.h.
8699 (get_lwp): Delete.
8700 (get_thread_lwp): Update.
8701 (struct lwp_info): Delete member "entry". Simplify comment for
8702 member "thread".
8703 (all_lwps): Delete.
8704 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8705 current_inferior directly.
8706 (update_watch_registers_callback): Update, "entry" parameter is a
8707 struct thread_info * now. Fetch pid from thread.
8708 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8709 (mips_insert_point): Fetch lwpid from current_inferior.
8710 Pass &all_threads to find_inferior, not &all_lwps.
8711 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8712 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8713 directly.
8714 (mips_stopped_data_address): Ditto.
8715 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8716 directly.
8717 * linux-tile-low.c (tile_arch_setup): Ditto.
8718 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8719 (update_debug_registers_callback): Update, "entry" parameter is a
8720 struct thread_info * now. Fetch pid from thread.
8721 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8722 Pass &all_threads to find_inferior, not &all_lwps.
8723 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8724 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8725 Pass &all_threads to find_inferior, not &all_lwps.
8726 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8727 (i386_dr_low_get_status): Ditto.
8728 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8729 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8730 (x86_linux_read_description): Ditto.
8731 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8732
3b8361aa
DE
87332014-02-20 Doug Evans <dje@google.com>
8734
8735 * inferiors.c (get_first_inferior): Fix buglet.
8736
f7667f0d
DE
87372014-02-19 Doug Evans <dje@google.com>
8738
8739 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8740 * inferiors.c (add_thread): Change result type to struct thread_info *.
8741 All callers updated.
8742 (add_lwp): Call add_thread here instead of in callers.
8743 All callers updated.
8744 * linux-low.h (get_lwp_thread): Rewrite.
8745 (struct lwp_info): New member "thread".
8746
b3312d80
DE
87472014-02-19 Doug Evans <dje@google.com>
8748
8749 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8750 All callers updated.
8751
ecc6f45c
DE
87522014-02-19 Doug Evans <dje@google.com>
8753
8754 * inferiors.c (add_thread): Fix whitespace.
8755
649ebbca
DE
87562014-02-19 Doug Evans <dje@google.com>
8757
8758 * dll.c (clear_dlls): Replace accessing list implemention details
8759 with API function.
8760 * gdbthread.h (get_first_thread): Declare.
8761 * inferiors.c (for_each_inferior_with_data): New function.
8762 (get_first_thread): New function.
8763 (find_thread_ptid): Simplify.
8764 (get_first_inferior): New function.
8765 (clear_list): Delete.
8766 (one_inferior_p): New function.
8767 (clear_inferior_list): New function.
8768 (clear_inferiors): Update.
8769 * inferiors.h (for_each_inferior_with_data): Declare.
8770 (clear_inferior_list): Declare.
8771 (one_inferior_p): Declare.
8772 (get_first_inferior): Declare.
8773 * linux-low.c (linux_wait_for_event): Replace accessing list
8774 implemention details with API function.
8775 * server.c (target_running): Ditto.
8776 (accumulate_file_name_length): New function.
8777 (emit_dll_description): New function.
8778 (handle_qxfer_libraries): Replace accessing list implemention
8779 details with API function.
8780 (handle_qxfer_threads_worker): New function.
8781 (handle_qxfer_threads_proper): Replace accessing list implemention
8782 details with API function.
8783 (handle_query): Ditto.
8784 (visit_actioned_threads_callback_ftype): New typedef.
8785 (visit_actioned_threads_data): New struct.
8786 (visit_actioned_threads): Rewrite to be find_inferior callback.
8787 (resume): Call find_inferior.
8788 (handle_status): Replace accessing list implemention
8789 details with API function.
8790 (process_serial_event): Replace accessing list implemention details
8791 with API function.
8792 * target.c (set_desired_inferior): Replace accessing list implemention
8793 details with API function.
8794 * tracepoint.c (same_process_p): New function.
8795 (gdb_agent_about_to_close): Replace accessing list implemention
8796 details with API function.
8797 * win32-low.c (child_delete_thread): Replace accessing list
8798 implemention details with API function.
8799 (match_dll_by_basename): New function.
8800 (dll_is_loaded_by_basename): New function.
8801 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8802 details call to dll_is_loaded_by_basename.
8803
80894984
DE
88042014-02-19 Doug Evans <dje@google.com>
8805
8806 * dll.h (struct dll_info): Add comment.
8807 * gdbthread.h (struct thread_info): Add comment.
8808 (current_ptid): Simplify.
8809 * inferiors.c (add_process): Update.
8810 (remove_process): Update.
8811 * inferiors.h (struct process_info): Rename member "head" to "entry".
8812 * linux-low.c (delete_lwp): Update.
8813 (add_lwp): Update.
8814 (last_thread_of_process_p): Update.
8815 (kill_one_lwp_callback, linux_kill): Update.
8816 (status_pending_p_callback): Update.
8817 (wait_for_sigstop): Update. Simplify read of ptid.
8818 (start_step_over): Update.
8819 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8820 (get_lwp_thread): Update.
8821 (struct lwp_info): Rename member "head" to "entry".
8822 * regcache.h (inferior_list_entry): Delete.
8823 * server.c (kill_inferior_callback): Update.
8824 (detach_or_kill_inferior_callback): Update.
8825 (print_started_pid): Update.
8826 (print_attached_pid): Update.
8827 (process_serial_event): Simplify read of ptid.
8828 * thread-db.c (thread_db_create_event): Update.
8829 (thread_db_get_tls_address): Update.
8830 * win32-low.c (current_inferior_ptid): Simplify.
8831
46917d26
TT
88322014-02-19 Tom Tromey <tromey@redhat.com>
8833
8834 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8835 argument.
8836 (target_supports_btrace): Update.
8837
0759a81e
YQ
88382014-02-14 Yao Qi <yao@codesourcery.com>
8839
8840 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8841 (rsp-low-ipa.o): New target.
8842
a7191e8b
TT
88432014-02-12 Tom Tromey <tromey@redhat.com>
8844
8845 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8846 convert_ascii_to_int.
8847 * regcache.c (registers_to_string): Likewise.
8848 * remote-utils.c (decode_M_packet): Likewise.
8849 * server.c (process_serial_event): Likewise.
8850
ff0e980e
TT
88512014-02-12 Tom Tromey <tromey@redhat.com>
8852
8853 * server.c (handle_query, handle_v_run): Use hex2bin, not
8854 unhexify.
8855 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8856
e9371aff
TT
88572014-02-12 Tom Tromey <tromey@redhat.com>
8858
8859 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8860 convert_int_to_ascii.
8861 * regcache.c (registers_to_string, collect_register_as_string):
8862 Likewise.
8863 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8864 Likewise.
8865 * server.c (process_serial_event): Likewise.
8866 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8867 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8868
971dc0b8
TT
88692014-02-12 Tom Tromey <tromey@redhat.com>
8870
8871 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8872 bin2hex, not hexify.
8873 * tracepoint.c (cmd_qtstatus): Likewise.
8874
0a822afb
TT
88752014-02-12 Tom Tromey <tromey@redhat.com>
8876
8877 * remote-utils.c (monitor_output): Pass explicit length to
8878 hexify.
8879
9c3d6531
TT
88802014-02-12 Tom Tromey <tromey@redhat.com>
8881
8882 * tracepoint.c: Include rsp-low.h.
8883 * server.c: Include rsp-low.h.
8884 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8885 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8886 declare.
8887 * remote-utils.c: Include rsp-low.h.
8888 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8889 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8890 (convert_int_to_ascii, convert_ascii_to_int): Move to
8891 common/rsp-low.c.
8892 * regcache.c: Include rsp-low.h.
8893 * ax.c: Include rsp-low.h.
8894 * Makefile.in (SFILES): Add common/rsp-low.c.
8895 (OBS): Add rsp-low.o.
8896 (rsp-low.o): New target.
8897
01fd3ea5
TT
88982014-02-12 Tom Tromey <tromey@redhat.com>
8899
8900 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8901 Include print-utils.h.
8902 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8903 (plongest, thirty_two, phex_nz): Remove.
8904 * Makefile.in (SFILES): Add common/print-utils.c.
8905 (OBS): Add print-utils.o.
8906 (print-utils-ipa.o): New target.
8907 (print-utils.o): New target.
8908 (IPA_OBJS): Add print-utils-ipa.o.
8909
e99dc820
TT
89102014-02-06 Tom Tromey <tromey@redhat.com>
8911
8912 * Makefile.in (SFILES): Fix indentation.
8913
ee1e2d4f
DE
89142014-02-05 Doug Evans <dje@google.com>
8915
8916 * linux-low.c (linux_wait_for_event): Improve comment.
8917 (linux_wait_1): Keep current_inferior in sync with event_child.
8918
f5a02773
DE
89192014-01-22 Doug Evans <dje@google.com>
8920
8921 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8922
87ce2a04
DE
89232014-01-22 Doug Evans <dje@google.com>
8924
8925 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8926 * configure: Regenerate.
8927 * config.in: Regenerate.
8928 * Makefile.in (SFILES): Add debug.c.
8929 (OBS): Add debug.o.
8930 * debug.c: New file.
8931 * debug.h: New file.
8932 * linux-aarch64-low.c (*): Update all debugging printfs to use
8933 debug_printf instead of fprintf.
8934 * linux-arm-low.c (*): Ditto.
8935 * linux-cris-low.c (*): Ditto.
8936 * linux-crisv32-low.c (*): Ditto.
8937 * linux-m32r-low.c (*): Ditto.
8938 * linux-sparc-low.c (*): Ditto.
8939 * linux-x86.c (*): Ditto.
8940 * linux-low.c (*): Ditto.
8941 (linux_wait_1): Add calls to debug_enter, debug_exit.
8942 (linux_wait): Remove redundant debugging printf.
8943 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8944 (linux_resume, unstop_all_lwps): Ditto.
8945 * mem-break.c (*): Update all debugging printfs to use
8946 debug_printf instead of fprintf.
8947 * remote-utils.c (*): Ditto.
8948 * thread-db.c (*): Ditto.
8949 * server.c #include <ctype.h>, "gdb_vecs.h".
8950 (debug_threads): Moved to debug.c.
8951 (*): Update all debugging printfs to use debug_printf instead of
8952 fprintf.
8953 (start_inferior): Replace call to fflush with call to debug_flush.
8954 (monitor_show_help): Mention set debug-format.
8955 (parse_debug_format_options): New function.
8956 (handle_monitor_command): Handle "monitor set debug-format".
8957 (gdbserver_usage): Mention --debug-format.
8958 (main): Parse --debug-format.
8959 * server.h (debug_threads): Declaration moved to debug.h.
8960 #include "debug.h".
8961 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8962 trace_debug_1 that uses debug_printf.
8963 (tracepoint_look_up_symbols): Update all debugging printfs to use
8964 debug_printf instead of fprintf.
8965
e671835b
BS
89662014-01-20 Baruch Siach <baruch@tkos.co.il>
8967
8968 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8969 sys/ptrace.h.
8970
b5737fa9
PA
89712014-01-17 Pedro Alves <palves@redhat.com>
8972
ea38d2a9 8973 PR build/16445
c7faa97a
PA
8974 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8975 defined after including gdb_proc_service.h.
b5737fa9 8976
40ed484e
DE
89772014-01-16 Doug Evans <dje@google.com>
8978
8979 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8980 (match_dll): Use it.
8981
969c39fb
MM
89822014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8983
8984 * target.h (target_ops) <read_btrace>: Change parameters and
8985 return type to allow error reporting.
8986 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8987 trace reading errors on.
8988 * linux-low.c (linux_low_read_btrace): Pass trace reading
8989 errors on.
8990 (linux_low_disable_btrace): New.
8991
ab7f45ba
DE
89922014-01-15 Doug Evans <dje@google.com>
8993
8994 * inferiors.c (thread_id_to_gdb_id): Delete.
8995 * inferiors.h (thread_id_to_gdb_id): Delete.
8996
66af0f44
EZ
89972014-01-13 Eli Zaretskii <eliz@gnu.org>
8998
8999 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9000 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9001 versions.
9002
9939e131
PA
90032014-01-08 Pedro Alves <palves@redhat.com>
9004
9005 * server.c (handle_status): Don't discard previous queued stop
9006 replies or thread's pending status here.
9007 (main) <disconnection>: Do it here instead.
9008
b7ea362b
PA
90092014-01-08 Pedro Alves <palves@redhat.com>
9010
9011 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9012 * server.c (visit_actioned_threads, handle_pending_status): New
9013 function.
9014 (handle_v_cont): Factor out parts to ...
9015 (resume): ... this new function. If in all-stop, and a thread
9016 being resumed has a pending status, report it without actually
9017 resuming.
9018 (myresume): Adjust to use the new 'resume' function.
9019 (clear_pending_status_callback, set_pending_status_callback)
9020 (find_status_pending_thread_callback): New functions.
9021 (handle_status): Handle the case of multiple threads having
9022 interesting statuses to report. Report threads' real last signal
9023 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9024 with an interesting thread to report the status for, instead of
9025 always reporting the status of the first thread.
9026
28498c42
JB
90272014-01-01 Joel Brobecker <brobecker@adacore.com>
9028
9029 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9030 * gdbreplay.c (gdbreplay_version): Likewise.
9031
f45c82da
YZ
90322013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9033
9034 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9035 iov.iov_len with the real length in use.
9036
379a5e2d
JB
90372013-12-13 Joel Brobecker <brobecker@adacore.com>
9038
9039 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9040 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9041 for all targets that use win32-low.c.
9042 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9043 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9044
4210d83e
PA
90452013-12-13 Pedro Alves <palves@redhat.com>
9046
9047 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9048 if equal to TARGET_WAITKIND_LOADED.
9049 * win32-low.c (cached_status): New static global.
9050 (win32_wait): Add declaration.
9051 (do_initial_child_stuff): Flush all initial pending debug events
9052 up to the initial breakpoint.
9053 (win32_wait): If CACHED_STATUS was set, return that instead
9054 of doing a real wait. Remove the code resuming the execution
9055 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9056 during the initial phase. Also remove the code changing
9057 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9058 TARGET_WAITKIND_STOPPED.
9059
e7f0d979
YQ
90602013-12-11 Yao Qi <yao@codesourcery.com>
9061
9062 * notif.c (handle_notif_ack): Return 0 if no notification
9063 matches.
9064
ebcf782c
DE
90652013-11-20 Doug Evans <dje@google.com>
9066
9067 * linux-low.c (linux_set_resume_request): Fix comment.
9068
20ad9378
DE
90692013-11-20 Doug Evans <dje@google.com>
9070
9071 * linux-low.c (resume_status_pending_p): Tweak comment.
9072
a196ebeb
WT
90732013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9074
9075 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9076 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9077 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9078 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9079 (srv_amd64_regobj): Add amd64-mpx.o.
9080 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9081 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9082 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9083 * i387-fp.c (num_pl_bnd_register) Added constant.
9084 (num_pl_bnd_cfg_registers) Added constant.
9085 (struct i387_xsave) Added reserved area and MPX fields.
9086 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9087 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9088 function.
9089 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9090 (init_registers_amd64_mpx_linux): Declare new function.
9091 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9092 (x86_64_regmap): Add MPX registers.
9093 (x86_linux_read_description): Add MPX case.
9094 (initialize_low_arch): Initialize MPX targets.
9095
0080a2f6
TT
90962013-11-18 Tom Tromey <tromey@redhat.com>
9097
9098 * configure: Rebuild.
9099 * configure.ac: Don't check for stdlib.h.
9100 * gdbreplay.c: Unconditionally include stdlib.h.
9101
2978b111
TT
91022013-11-18 Tom Tromey <tromey@redhat.com>
9103
9104 * config.in: Rebuild.
9105 * configure: Rebuild.
9106 * configure.ac: Don't use AC_HEADER_DIRENT.
9107
a3d08894
TT
91082013-11-18 Tom Tromey <tromey@redhat.com>
9109
9110 * server.h: Don't check HAVE_STRING_H.
9111 * gdbreplay.c: Don't check HAVE_STRING_H.
9112 * configure: Rebuild.
9113
0a5dd17d
TT
91142013-11-18 Tom Tromey <tromey@redhat.com>
9115
9116 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9117 LIBGNU.
9118
1bd2f0ba
TT
91192013-11-08 Tom Tromey <tromey@redhat.com>
9120
9121 * configure, config.in: Rebuild.
9122 * configure.ac: Remove unused configury.
9123
3266f10b
TT
91242013-11-08 Tom Tromey <tromey@redhat.com>
9125
9126 * acinclude.m4: Include common.m4, codeset.m4.
9127 * configure, config.in: Rebuild.
9128 * configure.ac: Use GDB_AC_COMMON.
9129
6682d959
AA
91302013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9131
9132 * linux-s390-low.c (HWCAP_S390_TE): New define.
9133 (s390_arch_setup): Consider the TE field in the HWCAP for
9134 determining 'have_regset_tdb'.
9135
fd0a4d76
SDJ
91362013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9137
9138 PR gdb/16014
9139 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9140 call to sizeof.
9141
1a3d890b
PA
91422013-10-02 Pedro Alves <palves@redhat.com>
9143
9144 * server.c (process_serial_event): Don't output "GDBserver
9145 exiting" if GDB is connected through stdio.
9146 * target.c (mywait): Likewise, be silent if GDB is connected
9147 through stdio.
9148
97ad4581
JB
91492013-10-01 Joel Brobecker <brobecker@adacore.com>
9150
9151 * lynx-low.c (lynx_add_threads_after_attach): New function.
9152 (lynx_attach): Remove call to add_thread. Add call to
9153 lynx_add_threads_after_attach instead.
9154
5b4e221c
MF
91552013-09-28 Mike Frysinger <vapier@gentoo.org>
9156
9157 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9158 * config.in, configure: Regenerated.
9159
ee47b2f8
YQ
91602013-09-18 Yao Qi <yao@codesourcery.com>
9161
9162 PR server/15959
9163 * server.c (start_inferior): Clear 'resume_info'.
9164
d6707650 91652013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9166
d6707650
JW
9167 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9168 for each register.
9169
9243dd0e 91702013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9171
9243dd0e
JW
9172 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9173 linux-tile-low.o to srv_tgtobj.
9174
c623a6ef
WN
91752013-09-16 Will Newton <will.newton@linaro.org>
9176
9177 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9178 out regs.
9179
fb71d39e
PA
91802013-09-06 Pedro Alves <palves@redhat.com>
9181
9182 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9183 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9184 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9185 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9186 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9187 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9188
8e7e9910
PA
91892013-09-06 Pedro Alves <palves@redhat.com>
9190
9191 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9192 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9193
7c3a12ca
PA
91942013-09-06 Pedro Alves <palves@redhat.com>
9195
9196 * linux-amd64-ipa.c: Include tracepoint.h.
9197 * linux-i386-ipa.c: Include tracepoint.h.
9198
8eb3d7b6
RW
91992013-09-06 Ricard Wanderlof <ricardw@axis.com>
9200
9201 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9202 (ps_get_thread_area): New function.
9203
eddddb9d
RW
92042013-09-06 Ricard Wanderlof <ricardw@axis.com>
9205
9206 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9207 (initialize_low_arch): Call init_registers_crisv32 rather than
9208 init_register_crisv32.
9209
533b0600
PA
92102013-09-05 Pedro Alves <palves@redhat.com>
9211
9212 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9213 to ...
9214 * hostio.h: ... this new file.
9215 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9216 win32-low.c: Include hostio.h.
9217
0ce3d3b5
PA
92182013-09-05 Pedro Alves <palves@redhat.com>
9219
9220 * server.h (gdb_client_data, handler_func, callback_handler_func)
9221 (delete_file_handler, add_file_handler, append_callback_event)
9222 (delete_callback_event, start_event_loop, initialize_event_loop):
9223 Move to event-loop.h and include it.
9224 * event-loop.h: New file.
9225
799cdc37
PA
92262013-09-05 Pedro Alves <palves@redhat.com>
9227
9228 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9229 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9230 (loaded_dll, unloaded_dll): Move to ...
9231 * dll.h: ... this new file.
9232 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9233
6a6bbd9d
PA
92342013-09-05 Pedro Alves <palves@redhat.com>
9235
9236 * server.h (current_process, get_thread_process, all_processes)
9237 (add_inferior_to_list, for_each_inferior, current_inferior)
9238 (remove_inferior, add_process, remove_process, find_process_pid)
9239 (have_started_inferiors_p, have_attached_inferiors_p)
9240 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9241 (clear_inferiors, find_inferior, find_inferior_id)
9242 (inferior_target_data, set_inferior_target_data)
9243 (inferior_regcache_data, set_inferior_regcache_data): Move to
9244 inferiors.h, and include it.
9245 * inferiors.h: New file.
9246
f699aaba
PA
92472013-09-05 Pedro Alves <palves@redhat.com>
9248
9249 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9250 Move ...
72f4393d 9251 * ax.h: ... here.
f699aaba 9252
c144c7a0
PA
92532013-09-05 Pedro Alves <palves@redhat.com>
9254
9255 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9256 tracepoint.h.
9257 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9258 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9259 (handle_tracepoint_general_set, handle_tracepoint_query)
9260 (tracepoint_finished_step, tracepoint_was_hit)
9261 (release_while_stepping_state_list, current_traceframe)
9262 (in_readonly_region, traceframe_read_mem)
9263 (fetch_traceframe_registers, traceframe_read_sdata)
9264 (traceframe_read_info, struct fast_tpoint_collect_status)
9265 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9266 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9267 (supply_fast_tracepoint_registers)
9268 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9269 (ipa_tdesc, claim_trampoline_space)
9270 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9271 (agent_mem_read, agent_get_trace_state_variable_value)
9272 (agent_set_trace_state_variable_value, agent_tsv_read)
9273 (agent_mem_read_string, get_raw_reg_func_addr)
9274 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9275 * tracepoint.h: ... this new file.
9276
ff42e6ab
PA
92772013-09-05 Pedro Alves <palves@redhat.com>
9278
9279 * server.h (perror_with_name, error, fatal, warning, paddress)
9280 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9281 include it.
9282 * utils.h: New file.
9283
541af0f4
PA
92842013-09-05 Pedro Alves <palves@redhat.com>
9285
9286 * server.h (remote_debug, noack_mode, transport_is_reliable)
9287 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9288 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9289 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9290 (write_enn, initialize_async_io, enable_async_io)
9291 (disable_async_io, check_remote_input_interrupt_request)
9292 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9293 (dead_thread_notify, prepare_resume_reply)
9294 (decode_address_to_semicolon, decode_address, decode_m_packet)
9295 (decode_M_packet, decode_X_packet, decode_xfer_write)
9296 (decode_search_memory_packet, unhexify, hexify)
9297 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9298 (look_up_one_symbol, relocate_instruction)
9299 (monitor_output): Move to remote-utils.h, and include it.
9300 * remote-utils.h: New file.
9301
eebdf26b
PA
93022013-09-05 Pedro Alves <palves@redhat.com>
9303
9304 * server.h (_): Delete.
9305
3aafd2ff
PA
93062013-09-02 Pedro Alves <palves@redhat.com>
9307
9308 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9309 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9310 allocated.
9311 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9312
cee83bcb
PM
93132013-09-02 Pierre Muller <muller@sourceware.org>
9314
9315 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9316 or WriteProcessMemory complete successfully and handle
9317 ERROR_PARTIAL_COPY error.
9318
9a13b2fa
PA
93192013-09-02 Pedro Alves <palves@redhat.com>
9320
9321 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9322 error instead of EIO.
9323
602e3198
JK
93242013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9325
9326 PR server/15604
9327 * linux-low.c: Include filestuff.h.
9328 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9329 * lynx-low.c: Include filestuff.h.
9330 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9331 * server.c: Include filestuff.h.
9332 (main): Call notice_open_fds.
9333 * spu-low.c: Include filestuff.h.
9334 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9335
96d7229d
LM
93362013-08-22 Luis Machado <lgustavo@codesourcery.com>
9337
9338 * Makefile.in: Explain why ../target and ../nat are not
9339 listed as include file search paths.
9340 (linux-waitpid.o): New object file rule.
9341 * configure.srv (srv_native_linux_obj): New variable.
9342 Replace all occurrences of linux native object files with
9343 $srv_native_linux_obj.
9344 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9345 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9346 (linux_enable_event_reporting): Remove declaration.
9347 (my_waitpid): Moved to common/linux-waitpid.c.
9348 (linux_wait_for_event): Pass ptid when calling
9349 linux_enable_event_reporting.
9350 (linux_supports_tracefork_flag): Remove.
9351 (linux_enable_event_reporting): Likewise.
9352 (linux_tracefork_grandchild): Remove.
9353 (STACK_SIZE): Moved to common/linux-ptrace.c.
9354 (linux_tracefork_child): Remove.
9355 (linux_test_for_tracefork): Remove.
9356 (linux_look_up_symbols): Call linux_supports_traceclone.
9357 (initialize_low): Remove call to linux_test_for_tracefork.
9358 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9359 common/linux-ptrace.h.
9360 (PTRACE_TYPE_ARG4): Likewise.
9361 Include linux-ptrace.h.
9362
32940073
PA
93632013-08-21 Pedro Alves <palves@redhat.com>
9364
9365 * config.in: Renegerate.
9366
33b60d58 93672013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9368
33b60d58
LM
9369 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9370 (SFILES): Remove $(srcdir)/common/target-common.c and
9371 add $(srcdir)/target/waitstatus.c.
9372 (OBS): Remove target-common.o and add waitstatus.o.
9373 (server_h): Remove $(srcdir)/../common/target-common.h and
9374 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9375 and $(srcdir)/../target/waitstatus.h.
9376 (target-common.o): Remove.
9377 (waitstatus.o): New target object file.
9378 * target.h: Do not include target-common.h and
9379 include target/resume.h, target/wait.h and
9380 target/waitstatus.h.
9381
b8e1b30e
LM
93822013-08-13 Luis Machado <lgustavo@codesourcery.com>
9383
9384 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9385 to PTRACE_TYPE_ARG3.
9386 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9387 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9388 PTRACE_TYPE_ARG4.
9389 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9390 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9391
7a60ad40
YQ
93922013-07-27 Jie Zhang <jie@codesourcery.com>
9393 Daniel Jacobowitz <dan@codesourcery.com>
9394 Yao Qi <yao@codesourcery.com>
9395
9396 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9397 (mips-linux-watch.o): New rule.
9398 (mips_linux_watch_h): New variable.
9399 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9400 srv_tgtobj.
9401 * linux-mips-low.c: Include mips-linux-watch.h.
9402 (struct arch_process_info, struct arch_lwp_info): New.
9403 (update_watch_registers_callback): New function.
9404 (mips_linux_new_process, mips_linux_new_thread) New functions.
9405 (mips_linux_prepare_to_resume, mips_insert_point): New
9406 functions.
9407 (mips_remove_point, mips_stopped_by_watchpoint): New
9408 functions.
9409 (rsp_bp_type_to_target_hw_bp_type): New function.
9410 (mips_stopped_data_address): New function.
9411 (the_low_target): Add watchpoint support functions.
9412
de6f69ad
YQ
94132013-07-27 Yao Qi <yao@codesourcery.com>
9414
9415 * i386-low.c: Include break-common.h.
9416 (enum target_hw_bp_type): Remove.
9417
3360c0bf
LM
94182013-07-24 Luis Machado <lgustavo@codesourcery.com>
9419
9420 * Makefile.in (SFILES): /common/target-common.c.
9421 (OBS): Add target-common.o.
9422 (server_h): Add $(srcdir)/../common/target-common.h.
9423 (target-common.o): New target.
9424 * server.c (queue_stop_reply_callback): Free
9425 status string after use.
9426 * target.c (target_waitstatus_to_string): Remove.
9427 * target.h: Include target-common.h.
9428 (resume_kind): Likewise.
9429 (target_waitkind): Likewise.
9430 (target_waitstatus): Likewise.
9431 (TARGET_WNOHANG): Likewise.
9432
bd885420
YQ
94332013-07-04 Yao Qi <yao@codesourcery.com>
9434
9435 * Makefile.in (host_alias): Use @host_noncanonical@.
9436 (target_alias): Use @target_noncanonical@.
9437 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9438 ACX_NONCANONICAL_HOST.
9439 * configure: Regenerated.
9440
9441 Revert:
9442 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9443
9444 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9445 * configure: Rebuild.
9446 * Makefile.in (version_host, version_target): Get from configure.
9447 (version.c): Use $(version_host) and $(version_target).
9448
17ef446e
PA
94492013-07-03 Pedro Alves <palves@redhat.com>
9450
9451 * Makefile.in (config.status): Depend on development.sh.
9452 * acinclude.m4: Include libmcheck.m4.
9453 * configure: Regenerate.
9454
7a9a7487
MG
94552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9456
9457 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9458 attribute inside the parentheses.
9459 (winapi_DebugSetProcessKillOnExit): Ditto.
9460 (winapi_DebugBreakProcess): Ditto.
9461 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9462
49b64de6
MG
94632013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9464
9465 * notif.h (notif_event): Add a dummy member to avoid compiler
9466 errors.
9467
d5749ee7
PA
94682013-07-01 Pedro Alves <palves@redhat.com>
9469
9470 * hostio.c (HOSTIO_PATH_MAX): Define.
9471 (require_filename, handle_open, handle_unlink, handle_readlink):
9472 Use it.
9473
d8d2a3ee
PA
94742013-07-01 Pedro Alves <palves@redhat.com>
9475
9476 * server.h: Include "pathmax.h".
9477 * linux-low.c: Don't include sys/param.h.
9478 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9479 MAXPATHLEN.
9480 * win32-low.c: Don't include sys/param.h.
9481 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9482
bc7dea8d
PA
94832013-07-01 Pedro Alves <palves@redhat.com>
9484
9485 * event-loop.c: Don't check HAVE_UNISTD_H before including
9486 <unistd.h>.
9487 * gdbreplay.c: Likewise.
9488 * remote-utils.c: Likewise.
9489 * server.c: Likewise.
9490 * configure.ac: Don't check for unistd.h.
9491 * configure: Regenerate.
9492
d6c2da54
TT
94932013-06-28 Tom Tromey <tromey@redhat.com>
9494
9495 * Makefile.in (version.c): Use version.in, not
9496 common/version.in.
9497
257b6bec
MG
94982013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9499
9500 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9501 * configure: Rebuild.
9502 * Makefile.in (version_host, version_target): Get from configure.
9503 (version.c): Use $(version_host) and $(version_target).
9504
86ebe149
DK
95052013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9506
9507 Fix trace-status to output user name without trailing colon.
9508 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9509
f30aa5af
DK
95102013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9511
9512 Fix trace-status to output proper start-time and stop-time.
9513 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9514 output start time and stop time in hex as gdb expects.
9515
28a93511
YQ
95162013-06-26 Pedro Alves <pedro@codesourcery.com>
9517
9518 * tracepoint.c (build_traceframe_info_xml): Output trace state
9519 variables present in the trace buffer.
9520
01208463
TT
95212013-06-24 Tom Tromey <tromey@redhat.com>
9522
9523 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9524 create-version.sh.
9525 (version.o): Remove.
9526 * gdbreplay.c: Include version.h.
9527 (version, host_name): Don't declare.
9528 * server.h: Include version.h.
9529 (version, host_name): Don't declare.
9530
760256f9
PA
95312013-06-12 Pedro Alves <palves@redhat.com>
9532
9533 * linux-x86-low.c (linux_is_elf64): Delete global.
9534 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9535 with local linux_pid_exe_is_elf_64_file use.
9536
030031ee
PA
95372013-06-11 Pedro Alves <palves@redhat.com>
9538
9539 * linux-low.c (regset_disabled, disable_regset): New functions.
9540 (regsets_fetch_inferior_registers)
9541 (regsets_store_inferior_registers): Use them.
9542 (initialize_regsets_info); Don't allocate the disabled_regsets
9543 array here.
9544 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9545 comment.
9546
5da6eb0a
PA
95472013-06-11 Pedro Alves <palves@redhat.com>
9548
9549 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9550 xmalloc.
9551
7e5aaa09
PA
95522013-06-11 Pedro Alves <palves@redhat.com>
9553
9554 * linux-x86-low.c (initialize_low_arch): Call
9555 init_registers_x32_avx_linux.
9556
d878444c
JK
95572013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9558
9559 Fix compatibility with Android Bionic.
9560 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9561 it is not empty.
9562
3aee8918
PA
95632013-06-07 Pedro Alves <palves@redhat.com>
9564
5f2b57b5 9565 PR server/14823
3aee8918
PA
9566 * Makefile.in (OBS): Add tdesc.o.
9567 (IPA_OBJS): Add tdesc-ipa.o.
9568 (tdesc-ipa.o): New rule.
9569 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9570 interface.
9571 * linux-low.c (new_inferior): Delete.
9572 (disabled_regsets, num_regsets): Delete.
9573 (linux_add_process): Adjust to set the new per-process
9574 new_inferior flag.
9575 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9576 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9577 was a stop. When calling arch_setup, switch the current inferior
9578 to the thread that got an event.
9579 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9580 (regsets_fetch_inferior_registers)
9581 (regsets_store_inferior_registers): New regsets_info parameter.
9582 Adjust to use it.
9583 (linux_register_in_regsets): New regs_info parameter. Adjust to
9584 use it.
9585 (register_addr, fetch_register, store_register): New usrregs_info
9586 parameter. Adjust to use it.
9587 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9588 parameter regs_info. Adjust to use it.
9589 (linux_fetch_registers): Get the current inferior's regs_info, and
9590 adjust to use it.
9591 (linux_store_registers): Ditto.
9592 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9593 (initialize_low): Don't initialize the target_regsets here. Call
9594 initialize_low_arch.
9595 * linux-low.h (target_regsets): Delete declaration.
9596 (struct regsets_info): New.
9597 (struct usrregs_info): New.
9598 (struct regs_info): New.
9599 (struct process_info_private) <new_inferior>: New field.
9600 (struct linux_target_ops): Delete the num_regs, regmap, and
9601 regset_bitmap fields. New field regs_info.
9602 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9603 * i387-fp.c (num_xmm_registers): Delete.
9604 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9605 calls to new interface.
9606 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9607 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9608 Infer the number of xmm registers from the regcache's target
9609 description.
9610 * i387-fp.h (num_xmm_registers): Delete.
9611 * inferiors.c (add_thread): Don't install the thread's regcache
9612 here.
9613 * proc-service.c (gregset_info): Fetch the current inferior's
9614 regs_info. Adjust to use it.
9615 * regcache.c: Include tdesc.h.
9616 (register_bytes, reg_defs, num_registers)
9617 (gdbserver_expedite_regs): Delete.
9618 (get_thread_regcache): If the thread doesn't have a regcache yet,
9619 create one, instead of aborting gdbserver.
9620 (regcache_invalidate_one): Rename to ...
9621 (regcache_invalidate_thread): ... this.
9622 (regcache_invalidate_one): New.
9623 (regcache_invalidate): Only invalidate registers of the current
9624 process.
9625 (init_register_cache): Add target_desc parameter, and use it.
9626 (new_register_cache): Ditto. Assert the target description has a
9627 non zero registers_size.
9628 (regcache_cpy): Add assertions. Adjust.
9629 (realloc_register_cache, set_register_cache): Delete.
9630 (registers_to_string, registers_from_string): Adjust.
9631 (find_register_by_name, find_regno, find_register_by_number)
9632 (register_cache_size): Add target_desc parameter, and use it.
9633 (free_register_cache_thread, free_register_cache_thread_one)
9634 (regcache_release, register_cache_size): New.
9635 (register_size): Add target_desc parameter, and use it.
9636 (register_data, supply_register, supply_register_zeroed)
9637 (supply_regblock, supply_register_by_name, collect_register)
9638 (collect_register_as_string, collect_register_by_name): Adjust.
9639 * regcache.h (struct target_desc): Forward declare.
9640 (struct regcache) <tdesc>: New field.
9641 (init_register_cache, new_register_cache): Add target_desc
9642 parameter.
9643 (regcache_invalidate_thread): Declare.
9644 (regcache_invalidate_one): Delete declaration.
9645 (regcache_release): Declare.
9646 (find_register_by_number, register_cache_size, register_size)
9647 (find_regno): Add target_desc parameter.
9648 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9649 declarations.
9650 * remote-utils.c: Include tdesc.h.
9651 (outreg, prepare_resume_reply): Adjust.
9652 * server.c: Include tdesc.h.
9653 (gdbserver_xmltarget): Delete declaration.
9654 (get_features_xml, process_serial_event): Adjust.
9655 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9656 declare.
9657 (struct process_info) <tdesc>: New field.
9658 (ipa_tdesc): Declare.
9659 * tdesc.c: New file.
9660 * tdesc.h: New file.
9661 * tracepoint.c: Include tdesc.h.
9662 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9663 (get_context_regcache): Adjust to pass ipa_tdesc down.
9664 (do_action_at_tracepoint): Adjust to get the register cache size
9665 from the context regcache's description.
9666 (traceframe_walk_blocks): Adjust to get the register cache size
9667 from the current trace frame's description.
9668 (traceframe_get_pc): Adjust to get current trace frame's
9669 description and pass it down.
9670 (gdb_collect): Adjust to get the register cache size from the
9671 IPA's description.
9672 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9673 (gdbserver_xmltarget): Delete.
9674 (initialize_low_tracepoint): Set the ipa's target description.
9675 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9676 (initialize_low_tracepoint): Set the ipa's target description.
9677 * linux-x86-low.c: Include tdesc.h.
9678 [__x86_64__] (is_64bit_tdesc): New.
9679 (ps_get_thread_area, x86_get_thread_area): Use it.
9680 (i386_cannot_store_register): Rename to ...
9681 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9682 (i386_cannot_fetch_register): Rename to ...
9683 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9684 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9685 to new interface.
9686 (target_regsets): Rename to ...
9687 (x86_regsets): ... this.
9688 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9689 interface.
9690 (x86_siginfo_fixup): Use is_64bit_tdesc.
9691 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9692 (tdesc_x32_avx_linux, tdesc_x32_linux)
9693 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9694 Declare.
9695 (x86_linux_update_xmltarget): Delete.
9696 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9697 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9698 (AMD64_LINUX_USER64_CS): New.
9699 (x86_linux_read_description): New, based on
9700 x86_linux_update_xmltarget.
9701 (same_process_callback): New.
9702 (x86_arch_setup_process_callback): New.
9703 (x86_linux_update_xmltarget): New.
9704 (x86_regsets_info): New.
9705 (amd64_linux_regs_info): New.
9706 (i386_linux_usrregs_info): New.
9707 (i386_linux_regs_info): New.
9708 (x86_linux_regs_info): New.
9709 (x86_arch_setup): Reimplement.
9710 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9711 (x86_emit_ops): Ditto.
9712 (the_low_target): Adjust. Install x86_linux_regs_info,
9713 x86_cannot_fetch_register, and x86_cannot_store_register.
9714 (initialize_low_arch): New.
9715 * linux-ia64-low.c (tdesc_ia64): Declare.
9716 (ia64_fetch_register): Adjust.
9717 (ia64_usrregs_info, regs_info): New globals.
9718 (ia64_regs_info): New function.
9719 (the_low_target): Adjust.
9720 (initialize_low_arch): New function.
9721 * linux-sparc-low.c (tdesc_sparc64): Declare.
9722 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9723 Adjust.
9724 (sparc_arch_setup): New function.
9725 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9726 (the_low_target): Adjust.
9727 (initialize_low_arch): New function.
9728 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9729 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9730 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9731 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9732 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9733 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9734 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9735 (tdesc_powerpc_isa205_vsx64l): Declare.
9736 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9737 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9738 (ppc_set_pc, ppc_get_hwcap): Adjust.
9739 (ppc_usrregs_info): Forward declare.
9740 (!__powerpc64__) ppc_regmap_adjusted: New global.
9741 (ppc_arch_setup): Adjust to the current process'es target
9742 description.
9743 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9744 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9745 (ppc_store_evrregset): Adjust.
9746 (target_regsets): Rename to ...
9747 (ppc_regsets): ... this, and make static.
9748 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9749 (ppc_regs_info): New function.
9750 (the_low_target): Adjust.
9751 (initialize_low_arch): New function.
9752 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9753 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9754 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9755 (tdesc_s390x_linux64v2): Declare.
9756 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9757 (s390_fill_gregset, s390_store_last_break): Adjust.
9758 (target_regsets): Rename to ...
9759 (s390_regsets): ... this, and make static.
9760 (s390_get_pc, s390_set_pc): Adjust.
9761 (s390_get_hwcap): New target_desc parameter, and use it.
9762 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9763 (s390_arch_setup): Adjust to set the current process'es target
9764 description. Don't adjust the regmap.
9765 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9766 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9767 (regs_info_3264): New globals.
9768 (s390_regs_info): New function.
9769 (the_low_target): Adjust.
9770 (initialize_low_arch): New function.
9771 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9772 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9773 [__mips64] (init_registers_mips_linux)
9774 (init_registers_mips_dsp_linux): Delete defines.
9775 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9776 (have_dsp): New global.
9777 (mips_read_description): New, based on mips_arch_setup.
9778 (mips_arch_setup): Reimplement.
9779 (get_usrregs_info): New function.
9780 (mips_cannot_fetch_register, mips_cannot_store_register)
9781 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9782 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9783 (target_regsets): Rename to ...
9784 (mips_regsets): ... this, and make static.
9785 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9786 (dsp_regs_info, regs_info): New globals.
9787 (mips_regs_info): New function.
9788 (the_low_target): Adjust.
9789 (initialize_low_arch): New function.
9790 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9791 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9792 Declare.
9793 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9794 (arm_read_description): New, with bits factored from
9795 arm_arch_setup.
9796 (arm_arch_setup): Reimplement.
9797 (target_regsets): Rename to ...
9798 (arm_regsets): ... this, and make static.
9799 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9800 (arm_regs_info): New function.
9801 (the_low_target): Adjust.
9802 (initialize_low_arch): New function.
9803 * linux-m68k-low.c (tdesc_m68k): Declare.
9804 (target_regsets): Rename to ...
9805 (m68k_regsets): ... this, and make static.
9806 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9807 (m68k_regs_info): New function.
9808 (m68k_arch_setup): New function.
9809 (the_low_target): Adjust.
9810 (initialize_low_arch): New function.
9811 * linux-sh-low.c (tdesc_sharch): Declare.
9812 (target_regsets): Rename to ...
9813 (sh_regsets): ... this, and make static.
9814 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9815 (sh_regs_info, sh_arch_setup): New functions.
9816 (the_low_target): Adjust.
9817 (initialize_low_arch): New function.
9818 * linux-bfin-low.c (tdesc_bfin): Declare.
9819 (bfin_arch_setup): New function.
9820 (bfin_usrregs_info, regs_info): New globals.
9821 (bfin_regs_info): New function.
9822 (the_low_target): Adjust.
9823 (initialize_low_arch): New function.
9824 * linux-cris-low.c (tdesc_cris): Declare.
9825 (cris_arch_setup): New function.
9826 (cris_usrregs_info, regs_info): New globals.
9827 (cris_regs_info): New function.
9828 (the_low_target): Adjust.
9829 (initialize_low_arch): New function.
9830 * linux-cris-low.c (tdesc_crisv32): Declare.
9831 (cris_arch_setup): New function.
9832 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9833 (cris_regs_info): New function.
9834 (the_low_target): Adjust.
9835 (initialize_low_arch): New function.
9836 * linux-m32r-low.c (tdesc_m32r): Declare.
9837 (m32r_arch_setup): New function.
9838 (m32r_usrregs_info, regs_info): New globals.
9839 (m32r_regs_info): Adjust.
9840 (initialize_low_arch): New function.
9841 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9842 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9843 (tic6x_usrregs_info): Forward declare.
9844 (tic6x_read_description): New function, based on ...
9845 (tic6x_arch_setup): ... this. Reimplement.
9846 (target_regsets): Rename to ...
9847 (tic6x_regsets): ... this, and make static.
9848 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9849 (tic6x_regs_info): New function.
9850 (the_low_target): Adjust.
9851 (initialize_low_arch): New function.
9852 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9853 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9854 (target_regsets): Rename to ...
9855 (xtensa_regsets): ... this, and make static.
9856 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9857 globals.
9858 (xtensa_arch_setup, xtensa_regs_info): New functions.
9859 (the_low_target): Adjust.
9860 (initialize_low_arch): New function.
9861 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9862 (nios2_arch_setup): Set the current process'es tdesc.
9863 (target_regsets): Rename to ...
9864 (nios2_regsets): ... this.
9865 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9866 (nios2_regs_info): New function.
9867 (the_low_target): Adjust.
9868 (initialize_low_arch): New function.
a261b8f5
PA
9869 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9870 (aarch64_arch_setup): Set the current process'es tdesc.
9871 (target_regsets): Rename to ...
9872 (aarch64_regsets): ... this.
9873 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9874 (aarch64_regs_info): New function.
9875 (the_low_target): Adjust.
9876 (initialize_low_arch): New function.
3aee8918
PA
9877 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9878 globals.
9879 (target_regsets): Rename to ...
9880 (tile_regsets): ... this.
9881 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9882 (tile_regs_info): New function.
9883 (tile_arch_setup): Set the current process'es tdesc.
9884 (the_low_target): Adjust.
9885 (initialize_low_arch): New function.
9886 * spu-low.c (tdesc_spu): Declare.
9887 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9888 * win32-arm-low.c (tdesc_arm): Declare.
9889 (arm_arch_setup): New function.
9890 (the_low_target): Install arm_arch_setup instead of
9891 init_registers_arm.
9892 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9893 (init_windows_x86): Rename to ...
9894 (i386_arch_setup): ... this. Set `win32_tdesc'.
9895 (the_low_target): Adjust.
9896 * win32-low.c (win32_tdesc): New global.
9897 (child_add_thread): Don't create the thread cache here.
9898 (do_initial_child_stuff): Set the new process'es tdesc.
9899 * win32-low.h (struct target_desc): Forward declare.
9900 (win32_tdesc): Declare.
9901 * lynx-i386-low.c (tdesc_i386): Declare global.
9902 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9903 * lynx-low.c (lynx_tdesc): New global.
9904 (lynx_add_process): Set the new process'es tdesc.
9905 * lynx-low.h (struct target_desc): Forward declare.
9906 (lynx_tdesc): Declare global.
9907 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9908 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9909 * nto-low.c (nto_tdesc): New global.
9910 (do_attach): Set the new process'es tdesc.
9911 * nto-low.h (struct target_desc): Forward declare.
9912 (nto_tdesc): Declare.
9913 * nto-x86-low.c (tdesc_i386): Declare.
9914 (nto_x86_arch_setup): Set `nto_tdesc'.
9915
b1fbec62
GB
99162013-06-04 Gary Benson <gbenson@redhat.com>
9917
9918 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9919 to qSupported response when appropriate.
9920 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9921 with nonzero-length annex.
9922 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9923 arguments supplied in annex.
9924
d1ec4ce7
DE
99252013-05-31 Doug Evans <dje@google.com>
9926
ac44adcb 9927 PR server/15594
d1ec4ce7
DE
9928 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9929 64 bits in 64-cross-32 environment.
9930
9b25f2d3
PA
99312013-05-28 Pedro Alves <palves@redhat.com>
9932
9933 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9934 (aarch64-without-fpu.c): Delete rule.
9935 * configure.srv (aarch64*-*-linux*): Remove references to
9936 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9937 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9938 declaration.
9939
6740dc9c
PA
99402013-05-24 Pedro Alves <palves@redhat.com>
9941
9942 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9943 instead of strchr/decode_address. Error if the range isn't split
9944 with a ','. Don't assume there's be a ':' in the action.
9945
c2d6af84
PA
99462013-05-23 Yao Qi <yao@codesourcery.com>
9947 Pedro Alves <palves@redhat.com>
9948
9949 * linux-low.c (lwp_in_step_range): New function.
9950 (linux_wait_1): If the thread was range stepping and stopped
9951 outside the stepping range, report the stop to GDB. Otherwise,
9952 continue stepping. Add range stepping debug output.
9953 (linux_set_resume_request): Copy the step range from the resume
9954 request to the lwp.
9955 (linux_supports_range_stepping): New.
9956 (linux_target_ops) <supports_range_stepping>: Set to
9957 linux_supports_range_stepping.
9958 * linux-low.h (struct linux_target_ops)
9959 <supports_range_stepping>: New field.
9960 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9961 * linux-x86-low.c (x86_supports_range_stepping): New.
9962 (the_low_target) <supports_range_stepping>: Set to
9963 x86_supports_range_stepping.
9964 * server.c (handle_v_cont): Handle 'r' action.
9965 (handle_v_requests): Append ";r" if the target supports range
9966 stepping.
9967 * target.h (struct thread_resume) <step_range_start,
9968 step_range_end>: New fields.
9969 (struct target_ops) <supports_range_stepping>:
9970 New field.
9971 (target_supports_range_stepping): New macro.
9972
58794e1a
JB
99732013-05-17 Joel Brobecker <brobecker@adacore.com>
9974
9975 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9976 confusion in comment.
9977
d631c5a7
JB
99782013-05-17 Joel Brobecker <brobecker@adacore.com>
9979
9980 * lynx-low.c (struct process_info_private): New type.
9981 (lynx_add_process): New function.
9982 (lynx_create_inferior, lynx_attach): Replace calls to
9983 add_process by calls to lynx_add_process.
9984 (lynx_resume): If PTID is null, then try using
9985 current_process()->private->last_wait_event_ptid.
9986 Add comments.
9987 (lynx_clear_inferiors): Delete. The contents of that function
9988 has been inlined in lynx_mourn;
9989 (lynx_wait_1): Save the ptid in the process's private data.
9990 (lynx_mourn): Free the process' private data. Replace call
9991 to lynx_clear_inferiors by call to clear_inferiors.
9992
96f7a20f
YQ
99932013-05-17 Yao Qi <yao@codesourcery.com>
9994
9995 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9996 the right place.
9997
db0dfaa0
LM
99982013-05-16 Luis Machado <lgustavo@codesourcery.com>
9999
10000 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10001 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10002 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10003 PT_TEXT_END_ADDR guards. Update comments.
10004 (linux_target_op) <read_offsets>: Conditionally define to
10005 linux_read_offsets if the target is UCLIBC and if it defines
10006 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10007
68f5f838
SL
100082013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10009 Andrew Jenner <andrew@codesourcery.com>
10010
10011 * Makefile.in (SFILES): Add linux-nios2-low.c.
10012 (clean): Add action to delete nios2-linux.c.
10013 (nios2-linux.c): New rule.
10014 * configure.srv: Add nios2*-*-linux*.
10015 * linux-nios2-low.c: New.
10016
1ebff1fd
HAQ
100172013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10018
10019 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10020
f6150862
HZ
100212013-04-25 Hui Zhu <hui@codesourcery.com>
10022
10023 PR gdb/15186
f6150862
HZ
10024 * ax.c (ax_printf): Add fflush.
10025
614c279d
TT
100262013-04-22 Tom Tromey <tromey@redhat.com>
10027
10028 * Makefile.in (SFILES): Add filestuff.c.
10029 (OBS): Add filestuff.o.
10030 (filestuff.o): New target.
10031 * config.in, configure: Rebuild.
10032 * configure.ac: Check for fdwalk, pipe2.
10033
7d4e5717
PA
100342013-04-17 Pedro Alves <palves@redhat.com>
10035
10036 * configure.ac (USE_THREAD_DB): Delete variable.
10037 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10038 Don't AC_SUBST USE_THREAD_DB.
10039 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10040 * config.in, configure: Regenerate.
10041
d5c93e41
PA
100422013-04-16 Pedro Alves <palves@redhat.com>
10043
10044 * linux-low.h (struct lwp_info) <thread_known>: Move under
10045 the USE_THREAD_DB #ifdef.
10046
04f5fe89
PA
100472013-04-16 Pedro Alves <palves@redhat.com>
10048
10049 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10050 (linux-low.o): Delete rule.
10051 * linux-low.h: Always include "gdb_thread_db.h" instead of
10052 conditionally including thread_db.h.
10053 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10054 HAVE_THREAD_DB_H.
10055
480b27bf
JK
100562013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10057
10058 * Makefile.in (install-only): Fix make install regression.
10059
43662968
JK
100602013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10061
10062 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10063 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10064 installation.
10065 * gdbserver.1: Remove.
10066
3e74e146
PA
100672013-03-22 Pedro Alves <palves@redhat.com>
10068
10069 * linux-low.c (handle_extended_wait): Don't call
10070 linux_enable_event_reporting.
10071
a8347a2a
TT
100722013-03-15 Tony Theodore <tonyt@logyst.com>
10073
10074 PR build/9098:
10075 * Makefile.in (SHELL): Use @SHELL@.
10076
eeb56fa7
SDJ
100772013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10078
10079 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10080 compiler warning.
10081
4fa7e2ff
JB
100822013-03-13 Joel Brobecker <brobecker@adacore.com>
10083
10084 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10085 Remove extraneous NULL element.
10086
8ddb1965
YQ
100872013-03-13 Yao Qi <yao@codesourcery.com>
10088
10089 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10090 'V' block in trace frame.
10091
9accd112
MM
100922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10093
10094 * target.h (struct target_ops): Add btrace ops.
10095 (target_supports_btrace): New macro.
10096 (target_enable_btrace): New macro.
10097 (target_disable_btrace): New macro.
10098 (target_read_btrace): New macro.
10099 * gdbthread.h (struct thread_info): Add btrace field.
10100 * server.c: Include btrace-common.h.
10101 (handle_btrace_general_set): New function.
10102 (handle_btrace_enable): New function.
10103 (handle_btrace_disable): New function.
10104 (handle_general_set): Call handle_btrace_general_set.
10105 (handle_qxfer_btrace): New function.
10106 (struct qxfer qxfer_packets[]): Add btrace entry.
10107 * inferiors.c (remove_thread): Disable btrace.
10108 * linux-low: Include linux-btrace.h.
10109 (linux_low_enable_btrace): New function.
10110 (linux_low_read_btrace): New function.
10111 (linux_target_ops): Add btrace ops.
10112 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10113 Add srv_linux_btrace=yes.
10114 (x86_64-*-linux*): Add linux-btrace.o.
10115 Add srv_linux_btrace=yes.
10116 * configure.ac: Define HAVE_LINUX_BTRACE.
10117 * config.in: Regenerated.
10118 * configure: Regenerated.
10119
5cc22e4c
MM
101202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10121
10122 * server.c (handle_qxfer): Preserve error message if -3 is
10123 returned.
10124 (qxfer): Document the -3 return value.
10125
7c97f91e
MM
101262013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10127
10128 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10129 (linux_btrace_h): New variable.
10130 (linux-btrace.o): New rule.
10131
be9a119c 101322013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10133 Hafiz Abid Qadeer <abidh@codesourcery.com>
10134
10135 * tracepoint.c (trace_buffer_size): New global.
10136 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10137 (init_trace_buffer): Change to one-argument function. Allocate
10138 trace buffer memory.
10139 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10140 handle QTBuffer:size packet.
10141 (cmd_bigqtbuffer_size): New function.
10142 (initialize_tracepoint): Call init_trace_buffer with
10143 DEFAULT_TRACE_BUFFER_SIZE.
10144 * server.c (handle_query): Add QTBuffer:size in the
10145 supported packets.
10146
e64f7499
YQ
101472013-03-07 Yao Qi <yao@codesourcery.com>
10148
10149 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10150 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10151 of -1.
10152 (cmd_qtsp): Adjust condition. Do post increment.
10153 Set cur_action and cur_step_action back to 0.
10154
f0ae6fc3
PA
101552013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10156
10157 PR server/15236
10158 * linux-low.c (linux_write_memory): Return early success if LEN is
10159 zero.
10160
b5b0b0af
CV
101612013-03-05 Corinna Vinschen <vinschen@redhat.de>
10162
334ad4a8 10163 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10164
589bc927
TT
101652013-02-28 Tom Tromey <tromey@redhat.com>
10166
10167 * configure.ac: Invoke AC_SYS_LARGEFILE.
10168 * configure, config.in: Rebuild.
10169
dfe07582
CV
101702013-02-28 Corinna Vinschen <vinschen@redhat.com>
10171
10172 * win32-low.c: Throughout, fix format strings and casts of
10173 printf-like functions to avoid type related warnings on all
10174 platforms.
10175 (get_child_debug_event): Print dwDebugEventCode as hex since
10176 that's how it's usually documented.
10177
736cd585
YQ
101782013-02-28 Yao Qi <yao@codesourcery.com>
10179
10180 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10181 pulongest.
10182
e1f58301
JW
101832013-02-27 Jiong Wang <jiwang@tilera.com>
10184
10185 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10186 (reg-tilegx32.c): New rule.
10187 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10188 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10189 different register info initializer according to elf class.
10190 (init_registers_tilgx32): New function. The tilegx32 register info
10191 initializer.
10192 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10193 (tile_store_gregset): Likewise.
10194
d171ca78
YQ
101952013-02-27 Yao Qi <yao@codesourcery.com>
10196
10197 * server.c (process_point_options): Print debug message when
10198 debug_threads is true.
10199
282bbdf3
YQ
102002013-02-26 Yao Qi <yao@codesourcery.com>
10201
10202 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10203
aca22551
PA
102042013-02-19 Pedro Alves <palves@redhat.com>
10205 Kai Tietz <ktietz@redhat.com>
10206
10207 PR gdb/15161
10208
10209 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10210 instead of strtoul to extract address from packet.
10211 (process_serial_event) <'z'>: Likewise.
10212
4f3cee1c
YQ
102132013-02-18 Yao Qi <yao@codesourcery.com>
10214
10215 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10216
8e1d55a3
PA
102172013-02-14 Pedro Alves <palves@redhat.com>
10218
10219 Plug memory leak.
10220
10221 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10222 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10223
458820da
PA
102242013-02-14 Pedro Alves <palves@redhat.com>
10225
10226 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10227
baea0dae
PA
102282013-02-14 Pedro Alves <palves@redhat.com>
10229
10230 * tracepoint.c (save_string): Delete.
10231 (add_tracepoint_action): Use savestring instead of save_string.
10232
0b1afbb3
PA
102332013-02-12 Pedro Alves <palves@redhat.com>
10234
10235 * linux-xtensa-low.c: Ditto.
10236 * xtensa-xtregs.c: Ditto.
10237
8a4ac37e
PA
102382013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10239
10240 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10241 thread_db.
10242
148de6bb
MS
102432013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10244
10245 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10246 aarch64_num_wp_regs and aarch64_num_bp_regs to
10247 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10248
55fac6e0
MS
102492013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10250
10251 * linux-aarch64-low.c (ps_get_thread_area): Replace
10252 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10253
176eb98c
MS
102542013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10255 Marcus Shawcroft <marcus.shawcroft@arm.com>
10256 Nigel Stephens <nigel.stephens@arm.com>
10257 Yufeng Zhang <yufeng.zhang@arm.com>
10258
10259 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10260 (aarch64.c, aarch64-without-fpu.c): New targets.
10261 * configure.srv (aarch64*-*-linux*): New.
10262 * linux-aarch64-low.c: New file.
10263
56f7af9c
MS
102642013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10265
43aaf8b6 10266 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10267 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10268 (dequeue_one_deferred_signal, linux_resume_one_thread)
10269 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10270 (linux_tracefork_grandchild, linux_test_for_tracefork)
10271 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10272 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10273 where the argument is 0.
10274
60f662b0
YQ
102752013-01-25 Yao Qi <yao@codesourcery.com>
10276
10277 * event-loop.c: Include "queue.h".
10278 (gdb_event_p): New typedef.
10279 (struct gdb_event) <next_event>: Remove.
10280 (event_queue): Change to QUEUE(gdb_event_p).
10281 (async_queue_event): Remove.
10282 (gdb_event_xfree): New.
10283 (initialize_event_loop): New.
10284 (process_event): Use API from QUEUE.
10285 (wait_for_event): Likewise.
10286 * server.c (main): Call initialize_event_loop.
10287 * server.h (initialize_event_loop): Declare.
10288
5ae4861a
YQ
102892013-01-18 Yao Qi <yao@codesourcery.com>
10290
10291 * ax.h (struct eval_agent_expr_context): New.
10292 (gdb_eval_agent_expr): Update declaration.
10293 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10294 TFRAME. Add new argument CTX.
10295 * server.h (struct eval_agent_expr_context): Declare.
10296 (agent_mem_read, agent_tsv_read): Update declaration.
10297 (agent_mem_read_string): Likewise.
10298 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10299 (add_traceframe_block): Add new argument TPOINT.
10300 Increase TPOINT->traceframe_usage.
10301 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10302 eval_tracepoint_agent_expr.
10303 (condition_true_at_tracepoint): Likewise.
10304 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10305 (agent_mem_read_string, agent_tsv_read): Likewise.
10306
85e00e85
YQ
103072013-01-16 Yao Qi <yao@codesourcery.com>
10308
10309 * linux-low.c (linux_resume_one_lwp): Don't check
10310 'lwp->bp_reinsert != 0'.
10311
4039cf45
JB
103122013-01-07 Joel Brobecker <brobecker@adacore.com>
10313 Pedro Alves <palves@redhat.com>
10314
10315 * lynx-low.c (ptrace_request_to_str): Define a temporary
10316 macro and use it to simplify this function's implementation.
10317
9044dee2
JB
103182013-01-07 Joel Brobecker <brobecker@adacore.com>
10319
10320 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10321 sets errno.
10322
e6352c8f
JB
103232013-01-07 Joel Brobecker <brobecker@adacore.com>
10324
10325 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10326
50681a27
JB
103272013-01-07 Joel Brobecker <brobecker@adacore.com>
10328
10329 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10330
3f6e77ef
JB
103312013-01-07 Joel Brobecker <brobecker@adacore.com>
10332
10333 * lynx-low.c (lynx_resume): Use the resume_info parameter
10334 to determine the ptid for the lynx_ptrace call, unless
10335 it is equal to minus_one_ptid, in which case we use the
10336 ptid of the current_inferior.
10337 (lynx_wait_1): After having received a thread create/exit
10338 event, resume the inferior's execution using the signaling
10339 thread's ptid, rather than the old ptid.
10340
7fda33ae
JB
103412013-01-07 Joel Brobecker <brobecker@adacore.com>
10342
10343 * lynx-low.c (lynx_resume): Delete variable ret.
10344
b9786c74
JB
103452013-01-01 Joel Brobecker <brobecker@adacore.com>
10346
10347 * gdbreplay.c (gdbreplay_version): Update copyright year.
10348 * server.c (gdbserver_version): Likewise.
10349
8b93d60f
JB
103502012-12-17 Joel Brobecker <brobecker@adacore.com>
10351
10352 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10353 new thread.
10354
037335a7
JB
103552012-12-17 Joel Brobecker <brobecker@adacore.com>
10356
10357 * lynx-low.c (ptrace_request_to_str): Add handling for
10358 PTRACE_GETTRACESIG.
10359
52d4cbd8
JB
103602012-12-17 Joel Brobecker <brobecker@adacore.com>
10361
10362 * lynx-low.c (lynx_attach): Delete variable new_process.
10363
ab8f6ca9
JB
103642012-12-17 Joel Brobecker <brobecker@adacore.com>
10365
10366 * lynx-low.c (lynx_create_inferior): Delete variable
10367 new_process.
10368
78cbc024
JB
103692012-12-17 Joel Brobecker <brobecker@adacore.com>
10370
10371 * lynx-low.c (ptrace_request_to_str): Do not handle
10372 PTRACE_GETTHREADLIST if this macro does not exist.
10373
14a00470
YQ
103742012-12-15 Yao Qi <yao@codesourcery.com>
10375
10376 * Makefile.in (OBS): Add notif.o.
10377 * notif.c, notif.h: New.
10378 * server.c: Include "notif.h".
10379 (struct vstop_notif) <next>: Remove.
10380 <base>: New field.
10381 (queue_stop_reply): Update.
10382 (push_event, send_next_stop_reply): Remove.
10383 (discard_queued_stop_replies): Update.
10384 (notif_stop): New variable.
10385 (handle_v_stopped): Remove.
10386 (handle_v_requests): Don't call handle_v_stopped. Call
10387 handle_ack_notif instead.
10388 (queue_stop_reply_callback): Call notif_event_enque instead
10389 of queue_stop_reply.
10390 (handle_status): Don't call send_next_stop_reply, call
10391 notif_write_event instead.
10392 (kill_inferior_callback): Likewise.
10393 (detach_or_kill_inferior_callback): Likewise.
10394 (main): Call initialize_notif.
10395 (process_serial_event): Call QUEUE_is_empty.
10396 (handle_target_event): Call notif_push instead of push event.
10397 * server.h (push_event): Remove declaration.
10398
61c125b9
TT
103992012-12-10 Tom Tromey <tromey@redhat.com>
10400
10401 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10402 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10403 macros.
10404 (.c.o): Rewrite.
10405 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10406 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10407 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10408 (amd64-linux-ipa.o, ax.o): Rewrite.
10409 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10410 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10411 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10412 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10413 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10414 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10415 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10416 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10417 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10418 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10419 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10420 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10421 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10422 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10423 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10424 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10425 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10426 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10427 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10428 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10429 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10430 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10431 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10432 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10433 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10434 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10435 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10436 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10437 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10438 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10439 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10440 (reg-tilegx.o): Remove.
10441 (all_object_files): New macro.
10442 Include .deps files.
10443 * aclocal.m4, configure: Rebuild.
10444 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10445 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10446 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10447
e90e9ad9
TT
104482012-12-05 Tom Tromey <tromey@redhat.com>
10449
10450 PR gdb/14917:
10451 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10452
02d403bf 104532012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10454
10455 * configure.ac: Check for linux/perf_event.h.
10456 * config.in: Regenerated.
10457 * configure: Regenerated.
10458
0270a750
PA
104592012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10460
10461 * hostio.c (handle_readlink): Decrease buffer size
10462 parameter passed to readlink by one byte.
10463
8c29b58e
YQ
104642012-11-26 Yao Qi <yao@codesourcery.com>
10465
10466 * configure.ac (build_warnings): Append '-Wempty-body'.
10467 * configure: Regenerated.
10468 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10469 body.
10470
8bdce1ff
PM
104712012-11-15 Pierre Muller <muller@sourceware.org>
10472
10473 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10474 * config.in: Regenerate.
10475 * configure: Regenerate.
10476 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10477 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10478 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10479 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10480 header.
10481 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10482 instead of <sys/wait.h> header.
10483 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10484
02d403bf 104852012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10486
10487 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10488 (various make rules): Remove -DGDBSERVER
10489
fbd5db48
YQ
104902012-11-09 Yao Qi <yao@codesourcery.com>
10491
10492 * spu-low.c (current_ptid): Move it to ..
10493 * gdbthread.h: ... here. New.
10494 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10495 * server.c (myresume, process_serial_event): Likewise.
10496 * thread-db.c (thread_db_find_new_threads): Likewise.
10497 * tracepoint.c (run_inferior_command): Likewise.
10498
b3dc46ff
AB
104992012-10-01 Andrew Burgess <aburgess@broadcom.com>
10500
10501 * server.c (handle_search_memory_1): Include access length in
10502 warning message.
10503
07c04788
HPN
105042012-09-05 Michael Brandt <michael.brandt@axis.com>
10505
10506 * linux-crisv32-low.c: Fix compile errors.
10507
918d227b
YQ
105082012-09-04 Yao Qi <yao@codesourcery.com>
10509
10510 * tracepoint.c (cmd_qtsv): Adjust debug message.
10511 Don't check CUR_TPOINT.
10512
18c1b81a
YQ
105132012-08-28 Yao Qi <yao@codesourcery.com>
10514
10515 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10516 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10517 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10518 Remove declarations of xmalloc, xreallloc, xstrdup and
10519 freeargv.
10520 * Makefile.in (libiberty_h): New.
10521 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10522 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10523
dc82f37b
YQ
105242012-08-23 Yao Qi <yao@codesourcery.com>
10525
10526 * server.h: Remove declaration of 'xsnprintf'.
10527
406b1477
KS
105282012-08-22 Keith Seitz <keiths@redhat.com>
10529
10530 * server.h: Include build-gnulib-gbserver/config.h.
10531 * gdbreplay.c: Likewise.
10532
e6712ff1
DE
105332012-08-08 Doug Evans <dje@google.com>
10534
10535 * Makefile.in (SFILES): Add gdb_vecs.c.
10536 (OBS): Add gdb_vecs.o.
10537 (gdb_vecs_h, host_defs_h): New variables.
10538 (thread-db.o): Add $(gdb_vecs_h) dependency.
10539 (gdb_vecs.o): New rule.
10540 * thread-db.c: #include "gdb_vecs.h".
10541 (thread_db_load_search): Use a vector to iterate over path elements.
10542 Handle text appearing after "$pdir".
10543
10544 * configure.ac: Add check for strstr.
10545 * config.in: Regenerate.
10546 * configure: Regenerate.
10547
7c3270ae
UW
105482012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10549
10550 * hostio.c (handle_pread): If pread fails, fall back to attempting
10551 lseek/read.
10552 (handle_pwrite): Likewise for pwrite.
10553
b62e2b27
UW
105542012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10555
10556 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10557 between unsupported TYPE and unimplementable ADDR/LEN combination.
10558 (arm_insert_point): Act on new return value.
10559
78a99e91
PA
105602012-07-31 Pedro Alves <palves@redhat.com>
10561
10562 * server.c (process_point_options): Only skip tokens if we find
10563 one that is unrecognized. Don't treat 'X' specially while
10564 skipping unrecognized tokens.
10565
fcf303ab
UW
105662012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10567
10568 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10569 to 4-byte-align HW breakpoint addresses for Thumb.
10570
7255706c
YQ
105712012-07-27 Yao Qi <yao@codesourcery.com>
10572
10573 PR remote/14161.
10574
10575 * server.h: Declare gdb_agent_about_to_close.
10576 * target.c (kill_inferior): Include "agent.h".
10577 New. Send command 'kill'.
10578 * target.h (kill_inferior): Removed macro.
10579 * tracepoint.c (gdb_agent_about_to_close): New.
10580 (gdb_agent_helper_thread): Handle command 'close'.
10581 Wait endlessly until the inferior stops.
10582 Install gdb_agent_remove_socket to atexit hook.
10583 (agent_socket_name): New static variable.
10584 (gdb_agent_socket_init): Replace local variable 'name' with
10585 'agent_socket_name'.
10586 (gdb_agent_remove_socket): New.
10587
5a3f286f
YQ
105882012-07-27 Yao Qi <yao@codesourcery.com>
10589
10590 * server.c (process_point_options): Stop at 'X' when parsing.
10591
961bd387
ME
105922012-07-19 Michael Eager <eager@eagercon.com>
10593
a261b8f5 10594 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10595 to hw_execute.
10596 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10597 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10598 hardware breakpoint.
10599
aa7c7447
JK
106002012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10601
10602 * gdbserver/linux-low.c (initialize_low): Call
10603 linux_ptrace_init_warnings.
10604
7f216e7c
DE
106052012-07-02 Doug Evans <dje@google.com>
10606
10607 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10608 pointer to int.
10609
d3ce09f5
SS
106102012-07-02 Stan Shebs <stan@codesourcery.com>
10611
10612 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10613 (ax.o): Add it to build rule.
10614 (ax-ipa.o): Ditto.
10615 (OBS): Add format.o.
10616 (IPA_OBS): Add format.o.
10617 * server.c (handle_query): Claim support for breakpoint commands.
10618 (process_point_options): Add command case.
10619 (process_serial_event): Leave running if there are printfs in
10620 effect.
10621 * mem-break.h (any_persistent_commands): Declare.
10622 (add_breakpoint_commands): Declare.
10623 (gdb_no_commands_at_breakpoint): Declare.
10624 (run_breakpoint_commands): Declare.
10625 * mem-break.c (struct point_command_list): New struct.
10626 (struct breakpoint): New field command_list.
10627 (any_persistent_commands): New function.
10628 (add_commands_to_breakpoint): New function.
10629 (add_breakpoint_commands): New function.
10630 (gdb_no_commands_at_breakpoint): New function.
10631 (run_breakpoint_commands): New function.
10632 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10633 locally.
10634 * ax.c: Include format.h.
10635 (ax_printf): New function.
10636 (gdb_eval_agent_expr): Add printf opcode.
10637
2f8f6aed
YQ
106382012-06-13 Yao Qi <yao@codesourcery.com>
10639
10640 * server.c (start_inferior): Remove duplicated writes to fields
10641 'last_resume_kind' and 'last_status' of 'current_inferior'.
10642
0c9070b3
YQ
106432012-06-12 Yao Qi <yao@codesourcery.com>
10644 Pedro Alves <palves@redhat.com>
10645
10646 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10647 comment.
10648 * server.c (handle_v_cont): Extend comment.
10649
c52daf70
YQ
106502012-06-11 Yao Qi <yao@codesourcery.com>
10651
10652 * linux-low.c (linux_attach): Add 'static'.
10653
d38bbb0a
YQ
106542012-06-06 Yao Qi <yao@codesourcery.com>
10655
10656 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10657
89dc0afd
JK
106582012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10659
10660 Fix gcc -flto compilation warning.
10661 * server.c (main): Make variable multi_mode and attach volatile.
10662
75f62ce7
TJB
106632012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10664
10665 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10666 if the platform doesn't know about it.
10667
65f479b6
PA
106682012-05-30 Jeff Kenton <jkenton@tilera.com>
10669
10670 * Makefile.in (SFILES): Add linux-tile-low.c.
10671 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10672 * configure.srv: Handle tilegx-*-linux*.
10673 * linux-tile-low.c: New file.
10674
0c5bf5a9
JK
106752012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10676
10677 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10678
a493e3e2
PA
106792012-05-24 Pedro Alves <palves@redhat.com>
10680
10681 PR gdb/7205
10682
43aaf8b6 10683 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10684
2ea28649
PA
106852012-05-24 Pedro Alves <palves@redhat.com>
10686
10687 PR gdb/7205
10688
10689 Replace target_signal with gdb_signal throughout.
10690
8d409d16
MR
106912012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10692
10693 * linux-low.c (linux_store_registers): Avoid the copying sequence
10694 when no data has been retrieved by ptrace.
10695
23512c01
MGD
106962012-05-22 Will Deacon <will.deacon@arm.com>
10697
10698 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10699 Include asm/ptrace.h.
10700 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10701 already defined.
10702
4934b29e
MR
107032012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10704
10705 * linux-low.c (linux_store_registers): Don't re-retrieve data
10706 with ptrace that has already been obtained from /proc. Always
10707 copy any data retrieved with ptrace to the buffer supplied.
10708
bde24c0a
PA
107092012-05-11 Yao Qi <yao@codesourcery.com>
10710 Pedro Alves <palves@redhat.com>
10711
10712 * linux-low.c (enum stopping_threads_kind): New.
10713 (stopping_threads): Change type to `enum stopping_threads_kind'.
10714 (handle_extended_wait): If stopping and suspending threads, leave
10715 the new_lwp suspended too.
10716 (linux_wait_for_event): Adjust.
10717 (stop_all_lwps): Set `stopping_threads' to
10718 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10719 whether we're suspending threads or just stopping them. Assert no
10720 recursion happens.
10721
623b6bdf
YQ
107222012-04-29 Yao Qi <yao@codesourcery.com>
10723
10724 * server.h: Move some code to ...
10725 * gdbthread.h: ... here. New.
10726 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10727 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10728 (nto-low.o, win32-low.o): Likewise.
10729 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10730 * regcache.c, remote-utils.c, server.c: Likewise.
10731 * target.c, tracepoint.c, win32-low.c: Likewise.
10732
f15f9948
TJB
107332012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10734
10735 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10736 (PTRACE_ARG4_TYPE): Likewise.
10737 (PTRACE_XFER_TYPE): Likewise.
10738 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10739 ptrace to PTRACE_ARG3_TYPE.
10740 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10741 (PTRACE_ARG4_TYPE): Likewise.
10742 (PTRACE_XFER_TYPE): Likewise.
10743 (linux_detach_one_lwp): Cast fourth argument of
10744 ptrace to long then PTRACE_ARG4_TYPE.
10745 (regsets_fetch_inferior_registers): Cast third argument of
10746 ptrace to long then PTRACE_ARG3_TYPE.
10747 (regsets_store_inferior_registers): Likewise.
10748
38ea300a
PA
107492012-04-20 Pedro Alves <palves@redhat.com>
10750
10751 * configure: Regenerate.
10752
c971b7fa
PA
107532012-04-19 Pedro Alves <palves@redhat.com>
10754
43aaf8b6 10755 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10756 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10757 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10758 (all, install-only, uninstall, clean-info, all-lib, clean): No
10759 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10760 (maintainer-clean realclean distclean): Use subdir_do.
10761 (subdir_do): New.
10762 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10763 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10764 * acinclude.m4: Include acx_configure_dir.m4.
10765 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10766 calls. Call AC_PROG_RANLIB. Configure gnulib using
10767 ACX_CONFIGURE_DIR.
10768 (GNULIB): New.
10769 (GNULIB_STDINT_H): Adjust.
10770 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10771 * gdbreplay.c: Include build-gnulib/config.h.
10772 * server.h: Likewise.
10773 * aclocal.m4: Regenerate.
10774 * config.in: Regenerate.
10775 * configure: Regenerate.
c971b7fa 10776
809277f8
PA
107772012-04-19 Pedro Alves <palves@redhat.com>
10778
10779 * Makefile.in (LIBGNU, INCGNU): Adjust.
10780 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10781 (all, install-only, uninstall, clean-info, all-lib, clean)
10782 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10783 * configure.ac: Adjust AC_OUTPUT output.
10784 * aclocal.m4: Regenerate.
10785 * configure: Regenerate.
10786
fd9bb8b8
PA
107872012-04-19 Pedro Alves <palves@redhat.com>
10788
10789 * Makefile.in (generated_files): New.
10790 (server_h): Remove the explicit dependency on config.h, and depend
10791 on $generated_files.
10792
1c298c66
PA
107932012-04-19 Pedro Alves <palves@redhat.com>
10794
10795 * Makefile.in (INCGNU): Add -Ignulib.
10796
57c4b50b
PA
107972012-04-19 Pedro Alves <palves@redhat.com>
10798
10799 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10800 (INCGNU): ... this, and spell out -I here.
10801 (GNULIB_LIB): Rename to ...
10802 (LIBGNU): ... this.
10803 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10804
1030e047
PA
108052012-04-19 Pedro Alves <palves@redhat.com>
10806
10807 * config.in: Regenerate.
10808
447d4319
PA
108092012-04-19 Pedro Alves <palves@redhat.com>
10810
10811 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10812 * server.h (memmem): Remove declaration.
10813 * config.in: Regenerate.
10814 * configure: Regenerate.
10815
aad9eab9
YQ
108162012-04-19 Yao Qi <yao@codesourcery.com>
10817
10818 * Makefile.in (SFILES): Add common/vec.c.
10819 (OBS): Add vec.o.
10820 (vec.o): New rule.
10821
3e10640f
YQ
108222012-04-19 Yao Qi <yao@codesourcery.com>
10823
10824 * remote-utils.c (prepare_resume_reply): Replace with macro
10825 target_core_of_thread.
10826 * server.c (handle_qxfer_threads_proper): Likewise.
10827 * target.h (traget_core_of_thread): New macro.
10828
71622373
PA
108292012-04-18 Pedro Alves <palves@redhat.com>
10830
10831 * aclocal.m4: Regenerate.
10832 * configure: Regenerate.
10833
80d26939
YQ
108342012-04-16 Yao Qi <yao@codesourcery.com>
10835
10836 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10837 duplicated on address.
10838
42476b70
YQ
108392012-04-16 Yao Qi <yao@codesourcery.com>
10840
10841 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10842 (struct tracepoint_action_ops) <send>: New field.
10843 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10844 (agent_expr_send, x_tracepoint_action_send): New.
10845 (l_tracepoint_action_send): New.
10846 (cmd_qtdp): Download and install tracepoint
10847 according to `use_agent'.
10848 (run_inferior_command): Add one more parameter `len'.
10849 Update callers.
10850 (tracepoint_send_agent): New.
10851 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10852
7bc83639
YQ
108532012-04-16 Yao Qi <yao@codesourcery.com>
10854
10855 * tracepoint.c (download_tracepoints): Moved to ...
10856 (cmd_qtstart): ... here.
10857
5f18041e
YQ
108582012-04-14 Yao Qi <yao@codesourcery.com>
10859
10860 * tracepoint.c: Include inttypes.h.
10861 (struct collect_memory_action): Use sized types.
10862 (struct tracepoint): Likewise.
10863 (cmd_qtdp, stop_tracing): Update print specifiers.
10864 (cmd_qtp, response_tracepoint): Likewise.
10865 (collect_data_at_tracepoint): Likewise.
10866 (collect_data_at_step): Likewise.
10867
55a8c076
YQ
108682012-04-14 Yao Qi <yao@codesourcery.com>
10869
10870 Import gnulib module inttypes.
10871 * aclocal.m4, config.in, configure: Regenerated.
10872
dc750257
YQ
108732012-04-14 Yao Qi <yao@codesourcery.com>
10874
10875 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10876 Makefile and config.status at last.
10877
0ab5faf9
YQ
108782012-04-13 Yao Qi <yao@codesourcery.com>
10879
10880 * tracepoint.c: Include stdint.h unconditionally.
10881
18f5fd81
TJB
108822012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10883
10884 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10885 on BFD_HAVE_SYS_PROCFS_TYPE.
10886 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10887 * configure: Regenerate.
10888 * config.in: Likewise.
10889
4d47af5c
L
108902012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10891
10892 * Makefile.in (clean): Also remove x32.c x32-linux.c
10893 x32-avx.c x32-avx-linux.c.
10894 (x32.o): New target.
10895 (x32.c): Likewise.
10896 (x32-linux.o): Likewise.
10897 (x32-linux.c): Likewise.
10898 (x32-avx.o): Likewise.
10899 (x32-avx.c): Likewise.
10900 (x32-avx-linux.o): Likewise.
10901 (x32-avx-linux.c): Likewise.
10902
10903 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10904 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10905 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10906 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10907 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10908 i386/x32-avx-linux.xml.
10909
10910 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10911 (init_registers_x32_avx_linux): Likwise.
10912 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10913 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10914
ecedbe58
PA
109152012-04-13 Pedro Alves <palves@redhat.com>
10916
10917 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10918 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10919 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10920 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10921 the sub-make.
10922
c92b5177
L
109232012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10924
10925 * linux-x86-low.c (compat_x32_clock_t): New.
10926 (compat_x32_siginfo_t): Likewise.
10927 (compat_x32_siginfo_from_siginfo): Likewise.
10928 (siginfo_from_compat_x32_siginfo): Likewise.
10929 (linux_is_elf64): Likewise.
10930 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10931 and siginfo_from_compat_x32_siginfo for x32.
10932 (x86_arch_setup): Set linux_is_elf64.
10933
214d508e
L
109342012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10935
10936 PR gdb/13969
10937 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10938 e_machine field.
10939 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10940 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10941 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10942 compatible with process.
10943
c9a1864a
YQ
109442012-04-12 Yao Qi <yao@codesourcery.com>
10945
10946 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10947 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10948 (install-only, install-info, clean): Handle sub dir gnulib.
10949 (all-lib, am--refresh): New targets.
10950 (memmem.o): Remove target.
10951 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10952 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10953 (AC_REPLACE_FUNCS): Remove memmem.
10954 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10955 (AC_OUTPUT): Generate Makefile in gnulib/.
10956 * aclocal.m4, config.in, configure: Regenerated.
10957
367ba2c2
MR
109582012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10959
10960 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10961
9d236627
PA
109622012-04-05 Pedro Alves <palves@redhat.com>
10963
10964 -Werror=strict-aliasing
10965
10966 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10967 pointer.
10968
111217b3
PA
109692012-04-04 Pedro Alves <palves@redhat.com>
10970
10971 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10972 (sparc_store_gregset_from_stack, sparc_store_gregset)
10973 (sparc_breakpoint_at): Fix formatting.
10974
8365dcf5
TJB
109752012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10976
10977 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10978 are available.
10979 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10980 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10981 * config.in: Regenerate.
10982 * configure: Likewise.
10983
689cc2ae
PA
109842012-03-29 Pedro Alves <palves@redhat.com>
10985
10986 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10987 Correct ptrace arguments.
10988
c14dfd32
PA
109892012-03-28 Pedro Alves <palves@redhat.com>
10990
10991 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10992 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10993 (IA64_FR1_REGNUM): New defines.
10994 (ia64_fetch_register): New.
10995 (the_low_target): Install it.
10996 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10997 field.
10998 * linux-low.c (linux_fetch_registers): Try the
10999 the_low_target.fetch_register hook first.
11000
11001 * linux-arm-low.c (the_low_target): Adjust.
11002 * linux-bfin-low.c (the_low_target): Adjust.
11003 * linux-cris-low.c (the_low_target): Adjust.
11004 * linux-crisv32-low.c (the_low_target): Adjust.
11005 * linux-m32r-low.c (the_low_target): Adjust.
11006 * linux-m68k-low.c (the_low_target): Adjust.
11007 * linux-mips-low.c (the_low_target): Adjust.
11008 * linux-ppc-low.c (the_low_target): Adjust.
11009 * linux-s390-low.c (the_low_target): Adjust.
11010 * linux-sh-low.c (the_low_target): Adjust.
11011 * linux-sparc-low.c (the_low_target): Adjust.
11012 * linux-tic6x-low.c (the_low_target): Adjust.
11013 * linux-x86-low.c (the_low_target): Adjust.
11014 * linux-xtensa-low.c (the_low_target): Adjust.
11015
63c88e13
PA
110162012-03-26 Pedro Alves <palves@redhat.com>
11017
11018 * server.c (handle_qxfer_libraries): Don't bail early if
11019 the_target->qxfer_libraries_svr4 is not NULL.
11020
fb723180
PA
110212012-03-26 Pedro Alves <palves@redhat.com>
11022
11023 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11024
0afae3cf
PA
110252012-03-23 Pedro Alves <palves@redhat.com>
11026
11027 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11028 "library-list-svr4" element's start tag when the the DSO list is
11029 empty.
11030
485f1ee4
PA
110312012-03-23 Pedro Alves <palves@redhat.com>
11032
11033 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11034 a variable whose type size is the same as the inferior's pointer
11035 size.
11036
a5362b9a
TS
110372012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11038
11039 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11040 struct siginfo.
11041 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11042 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11043 * linux-low.h: Include <signal.h>.
11044 (struct siginfo): Remove forward declaration.
11045 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11046 struct siginfo.
11047
d226c142
MF
110482012-03-21 Mike Frysinger <vapier@gentoo.org>
11049
11050 * .gitignore: Ignore more files.
11051
122f36ef
PA
110522012-03-19 Pedro Alves <palves@redhat.com>
11053 Jan Kratochvil <jan.kratochvil@redhat.com>
11054
11055 * server.c (cont_thread, general_thread): Add describing comments.
11056 (start_inferior): Clear `cont_thread'.
11057 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11058 of a process.
11059
fc3e5175
YQ
110602012-03-15 Yao Qi <yao@codesourcery.com>
11061
11062 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11063 handling to ...
11064 (cmd_qtdp): ... here.
11065
8d0d92cd
YQ
110662012-03-15 Yao Qi <yao@codesourcery.com>
11067
11068 * tracepoint.c (struct tracepoint_action_ops): New.
11069 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11070 (m_tracepoint_action_download): New.
11071 (r_tracepoint_action_download): New.
11072 (x_tracepoint_action_download): New.
11073 (l_tracepoint_action_download): New.
11074 (add_tracepoint_action): Install `action->ops' according type.
11075 (download_tracepoint_1): Move code `download' function pointer
11076 of various tracepoint_action_ops.
11077
87b0bb13
JK
110782012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11079
11080 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11081 linux_ptrace_attach_warnings.
11082
5f572dec
JK
110832012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11084
11085 * Makefile.in (linux-ptrace.o): New.
11086 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11087 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11088 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11089 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11090 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11091 of these targets.
11092 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11093
f4647387
YQ
110942012-03-08 Yao Qi <yao@codesourcery.com>
11095 Pedro Alves <palves@redhat.com>
11096
11097 Fix PR server/13392.
11098 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11099 offset of JMP insn.
11100 * tracepoint.c (remove_tracepoint): New.
11101 (cmd_qtdp): Call remove_tracepoint when failed to install.
11102
9b224c5e
PA
111032012-03-07 Pedro Alves <palves@redhat.com>
11104
11105 * linux-low.c (get_detach_signal): New.
11106 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11107 Pass on pending signals to PTRACE_DETACH. Check the result of the
11108 ptrace call.
11109 * server.c (program_signals, program_signals_p): New.
11110 (handle_general_set): Handle QProgramSignals.
11111 * server.h (program_signals, program_signals_p): Declare.
11112
e237a7e2
JK
111132012-03-05 Pedro Alves <palves@redhat.com>
11114 Jan Kratochvil <jan.kratochvil@redhat.com>
11115
11116 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11117 New comment why.
11118
5808517f
YQ
111192012-03-03 Yao Qi <yao@codesourcery.com>
11120
11121 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11122 agent_look_up_symbols.
11123
58b4daa5
YQ
111242012-03-03 Yao Qi <yao@codesourcery.com>
11125
11126 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11127 (linux-x86-low.o): Likewise.
11128 * server.h: Remove in_process_agent_loaded.
11129 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11130 common/agent.c.
11131 Update callers.
11132
8ffcbaaf
YQ
111332012-03-03 Yao Qi <yao@codesourcery.com>
11134
11135 * tracepoint.c (gdb_agent_capability): New global.
11136 (in_process_agent_loaded_ust): Renamed to
11137 `in_process_agent_supports_ust'.
11138 Update callers.
11139 (in_process_agent_supports_ust): Call agent_capability_check.
11140 (clear_installed_tracepoints): Assert that agent supports
11141 agent.
11142
d1feda86
YQ
111432012-03-03 Yao Qi <yao@codesourcery.com>
11144
11145 * linux-low.c (linux_supports_agent): New.
11146 (linux_target_ops): Initialize field `supports_agent' with
11147 linux_supports_agent.
11148 * target.h (struct target_ops) <supports_agent>: New.
11149 (target_supports_agent): New macro.
11150 * server.c (handle_general_set): Handle packet 'QAgent'.
11151 (handle_query): Send `QAgent+'.
11152 * Makefile.in (server.o): Depends on agent.h.
11153
2fa291ac
YQ
111542012-03-03 Yao Qi <yao@codesourcery.com>
11155
11156 * Makefile.in (OBS): Add agent.o.
11157 Add new rule for agent.o.
11158 Track dependence of tracepoint.c on agent.h.
11159 * tracepoint.c (run_inferior_command_1):
11160 (run_inferior_command): Call agent_run_command.
11161 (gdb_ust_connect_sync_socket): Deleted. Move it to
11162 common/agent.c.
11163 (resume_thread, stop_thread): Likewise.
11164 (gdb_ust_socket_init): Renamed to ...
11165 (gdb_agent_socket_init): ... New.
11166 (gdb_ust_thread): Renamed to ...
11167 (gdb_agent_helper_thread): ... New.
11168 (gdb_ust_init): Move some code to ...
11169 (gdb_agent_init): ... here. New.
11170 [HAVE_UST]: Call gdb_ust_init.
11171 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11172 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11173 * config.in, configure: Regenerated.
11174
05044653
PA
111752012-03-02 Pedro Alves <palves@redhat.com>
11176
11177 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11178 * linux-low.c (struct simple_pid_list): New.
11179 (stopped_pids): New a struct simple_pid_list pointer.
11180 (add_to_pid_list, pull_pid_from_list): New.
11181 (handle_extended_wait): Don't assume the first signal new children
11182 report is SIGSTOP. Adjust call to pull_pid_from_list.
11183 (linux_wait_for_lwp): Adjust.
11184
8d00225b
YQ
111852012-03-02 Yao Qi <yao@codesourcery.com>
11186
11187 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11188 debug log.
11189
19560ba5
YQ
111902012-03-02 Yao Qi <yao@codesourcery.com>
11191
11192 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11193 `stop_pc' and `tpoint'. Update caller.
11194
1faeff08
MR
111952012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11196
11197 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11198 * linux-low.c (use_linux_regsets): New macro.
11199 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11200 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11201 (linux_register_in_regsets): New function.
11202 (usr_fetch_inferior_registers): Skip registers covered by
11203 regsets.
11204 (usr_store_inferior_registers): Likewise.
11205 (usr_fetch_inferior_registers): New macro.
11206 (usr_store_inferior_registers): Likewise.
11207 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11208 (linux_store_registers): Likewise.
11209 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11210 prototype.
11211 (init_registers_mips64_dsp_linux): Likewise.
11212 (init_registers_mips_linux): New macro.
11213 (init_registers_mips_dsp_linux): Likewise.
11214 (mips_dsp_num_regs): Likewise.
11215 (DSP_BASE, DSP_CONTROL): New fallback macros.
11216 (mips_base_regs): New macro.
11217 (mips_regmap): Use it. Fix the size.
11218 (mips_dsp_regmap): New variable.
11219 (mips_dsp_regset_bitmap): Likewise.
11220 (mips_arch_setup): New function.
11221 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11222 than mips_regmap.
11223 (mips_cannot_store_register): Likewise.
11224 (the_low_target): Update .arch_setup, .num_regs and .regmap
11225 initializers. Add .regset_bitmap initializer.
11226 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11227 initializer.
11228 * linux-bfin-low.c (the_low_target): Likewise.
11229 * linux-cris-low.c (the_low_target): Likewise.
11230 * linux-crisv32-low.c (the_low_target): Likewise.
11231 * linux-ia64-low.c (the_low_target): Likewise.
11232 * linux-m32r-low.c (the_low_target): Likewise.
11233 * linux-m68k-low.c (the_low_target): Likewise.
11234 * linux-ppc-low.c (the_low_target): Likewise.
11235 * linux-s390-low.c (the_low_target): Likewise.
11236 * linux-sh-low.c (the_low_target): Likewise.
11237 * linux-sparc-low.c (the_low_target): Likewise.
11238 * linux-tic6x-low.c (the_low_target): Likewise.
11239 * linux-x86-low.c (the_low_target): Likewise.
11240 * linux-xtensa-low.c (the_low_target): Likewise.
11241 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11242 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11243 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11244 srv_xmlfiles.
11245 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11246 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11247
c03e6ccc
YQ
112482012-02-29 Yao Qi <yao@codesourcery.com>
11249 Pedro Alves <palves@redhat.com>
11250
11251 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11252 `step_over_finished' is true.
11253
644cebc9
PA
112542012-02-27 Pedro Alves <palves@redhat.com>
11255
11256 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11257 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11258
c14d7ab2
PA
112592012-02-27 Pedro Alves <palves@redhat.com>
11260
11261 PR server/9684
11262 * linux-low.c (pid_is_stopped): New.
11263 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11264
412c89dd
LM
112652012-02-25 Luis Machado <lgustavo@codesourcery.com>
11266
11267 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11268 of conditions.
11269
b745defe
MR
112702012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11271
11272 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11273
9f3a5c85
LM
112742012-02-24 Luis Machado <lgustavo@codesourcery>
11275
11276 * server.c (handle_query): Advertise support for target-side
11277 breakpoint condition evaluation.
11278 (process_point_options): New function.
11279 (process_serial_event): When inserting a breakpoint, check for
11280 a target-side condition that should be evaluated.
11281
11282 * mem-break.c: Include regcache.h and ax.h.
11283 (point_cond_list_t): New data structure.
11284 (breakpoint) <cond_list>: New field.
11285 (find_gdb_breakpoint_at): Make non-static.
11286 (delete_gdb_breakpoint_at): Clear any target-side
11287 conditions.
11288 (clear_gdb_breakpoint_conditions): New function.
11289 (add_condition_to_breakpoint): Likewise.
11290 (add_breakpoint_condition): Likewise.
11291 (gdb_condition_true_at_breakpoint): Likewise.
11292 (gdb_breakpoint_here): Return result directly instead
11293 of going through a local variable.
11294
11295 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11296 (clear_gdb_breakpoint_conditions): Likewise.
11297 (add_breakpoint_condition): Likewise.
11298 (gdb_condition_true_at_breakpoint): Likewise.
11299
11300 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11301 (need_step_over_p): Take target-side breakpoint condition into
11302 consideration.
11303
5e1dc496
LM
113042012-02-24 Luis Machado <lgustavo@codesourcery>
11305
11306 * server.h: Include tracepoint.h.
11307 (agent_mem_read, agent_get_trace_state_variable_value,
11308 agent_set_trace_state_variable_value,
11309 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11310 get_set_tsv_func_addr): New prototypes.
11311
11312 * ax.h: New include file.
11313 * ax.c: New source file.
11314
11315 * tracepoint.c: Include ax.h.
11316 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11317 agent_expr, eval_result_type): Move to ax.h.
11318 (parse_agent_expr): Rename to ...
11319 (gdb_parse_agent_expr): ... this, make it non-static and move
11320 to ax.h.
11321 (unparse_agent_expr) Rename to ...
11322 (gdb_unparse_agent_expr): ... this, make it non-static and move
11323 to ax.h.
11324 (eval_agent_expr): Rename to ...
11325 (eval_tracepoint_agent_expr): ... this.
11326 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11327 forward declarations.
11328 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11329 (agent_get_trace_state_variable_value): New function.
11330 (agent_set_trace_state_variable_value): New function.
11331 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11332 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11333 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11334 (condition_true_at_tracepoint): Likewise.
11335 (parse_agent_expr): Rename to ...
11336 (gdb_parse_agent_expr): ... this and move to ax.c.
11337 (unparse_agent_expr): Rename to ...
11338 (gdb_unparse_agent_expr): ... this and move to ax.c.
11339 (gdb_agent_op_name): Move to ax.c.
11340 (eval_agent_expr): Rename to ...
11341 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11342 and move to ax.c.
11343 (eval_tracepoint_agent_expr): New function.
11344 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11345 non-static.
5e1dc496
LM
11346 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11347 ax.c.
11348 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11349 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11350 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11351 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11352 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11353 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11354 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11355 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11356 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11357 (compile_bytecodes): Remove forward declaration.
11358 (is_goto_target): Move to ax.c.
11359 (compile_bytecodes): Move to ax.c and call
11360 agent_get_trace_state_variable_value (...) and
11361 agent_set_trace_state_variable_value (...).
11362
11363 * Makefile.in: Update ax.c and IPA dependencies.
11364
277e4e52
PA
113652012-02-24 Pedro Alves <palves@redhat.com>
11366
11367 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11368 (cmd_bigqtbuffer_circular): ... this. Only handle
11369 'QTBuffer:circular:'.
11370 (handle_tracepoint_general_set): Adjust.
11371
bf4c19f7
YQ
113722012-02-16 Yao Qi <yao@codesourcery.com>
11373
11374 * inferiors.c: Move code to ...
11375 * dll.c: .... here. New.
11376 * server.h: Declare clear_dlls.
11377 * Makefile.in (SFILES): Add dll.c.
11378 (OBS): Add dll.o
11379 (dll.o): New rule.
11380
d73f2619
YQ
113812012-02-11 Yao Qi <yao@codesourcery.com>
11382
11383 * server.c: (handle_monitor_command): Add a new parameter
11384 `own_buf'.
11385 (handle_query): Update caller.
11386
f8255c2a
JB
113872012-02-09 Joel Brobecker <brobecker@adacore.com>
11388
11389 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11390 * configure, config.in: Regenerate.
11391 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11392 is not defined.
11393
da84f473
PA
113942012-02-02 Pedro Alves <palves@redhat.com>
11395
11396 Try SIGKILL first, then PTRACE_KILL.
11397 * linux-low.c (linux_kill_one_lwp): New.
11398 (linux_kill_one_lwp): Rename to ...
11399 (kill_one_lwp_callback): ... this. Use the new
11400 linux_kill_one_lwp.
11401
e886a173
PA
114022012-02-02 Pedro Alves <palves@redhat.com>
11403
11404 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11405 inferior.
11406
be07f1a2
PA
114072012-01-27 Pedro Alves <palves@redhat.com>
11408
11409 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11410 (elf_64_file_p): Make static.
11411 (linux_pid_exe_is_elf_64_file): New.
11412 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11413 Delete declarations.
11414 (linux_pid_exe_is_elf_64_file): Declare.
11415 * linux-x86-low.c (x86_arch_setup): Use
11416 linux_pid_exe_is_elf_64_file.
11417
d8301ad1
JK
114182012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11419
11420 * linux-low.c (linux_wait_for_event_1): Rename to ...
11421 (linux_wait_for_event): ... here and merge it with former
11422 linux_wait_for_event - new variable wait_ptid, use it.
11423 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11424
01b17894
PA
114252012-01-23 Pedro Alves <palves@redhat.com>
11426
11427 * server.c (main): Avoid yet another case of infinite loop while
11428 detaching/killing after a longjmp.
11429
e825046f
JK
114302012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11431
11432 Code cleanup.
11433 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11434
b9e7b9c3
UW
114352012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11436
11437 * hostio.c (handle_readlink): New function.
11438 (handle_vFile): Call it to handle "vFile:readlink" packets.
11439
901f9912
UW
114402012-01-20 Pedro Alves <palves@redhat.com>
11441 Ulrich Weigand <ulrich.weigand@linaro.org>
11442
11443 * server.c (handle_v_requests): Only support vAttach and vRun to
11444 start multiple processes when in extended protocol mode.
11445
fc1ab1a0
PA
114462012-01-17 Pedro Alves <palves@redhat.com>
11447
11448 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11449 memalign plus mprotect to allocate the scratch buffer.
11450
7d5d4e98
PA
114512012-01-13 Pedro Alves <palves@redhat.com>
11452
11453 * server.c (attach_inferior): Clear `cont_thread'.
11454
f128d5e9
PA
114552012-01-13 Pedro Alves <palves@redhat.com>
11456
11457 * server.c (main): Avoid infinite loop while detaching/killing
11458 after a longjmp.
11459
06db92f0
DE
114602012-01-09 Doug Evans <dje@google.com>
11461
11462 * server.c (start_inferior): Set last_ptid in --wrapper case.
11463
32d92999
YQ
114642012-01-06 Yao Qi <yao@codesourcery.com>
11465
11466 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11467 defined.
11468 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11469
5e0a92a9
YQ
114702012-01-04 Yao Qi <yao@codesourcery.com>
11471
11472 * tracepoint.c (cmd_qtdp): Print debug message
11473 for static tracepoint.
11474
ae639e8c
YQ
114752012-01-04 Yao Qi <yao@codesourcery.com>
11476
11477 * tracepoint.c (trace_vdebug): Differentiate debug message
11478 between gdbserver and IPA.
11479
f72429c5
YQ
114802012-01-03 Yao Qi <yao@codesourcery.com>
11481
11482 * tracepoint.c (tracepoint_was_hit): Don't collect for
11483 static tracepoint.
11484
12c3e59c
JB
114852012-01-02 Joel Brobecker <brobecker@adacore.com>
11486
11487 * terminal.h: Reformat copyright header.
11488
67827812
JB
114892012-01-02 Joel Brobecker <brobecker@adacore.com>
11490
11491 * server.c (gdbserver_version): Update copyright year.
11492 * gdbreplay.c (gdbreplay_version): Likewise.
11493
3e52c33d
JK
114942011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11495
11496 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11497
11498 Revert:
11499 2011-12-18 Hui Zhu <teawater@gmail.com>
11500 * linux-low.c (linux_create_inferior): Save return value to ret.
11501
66f1260e
HZ
115022011-12-18 Hui Zhu <teawater@gmail.com>
11503
11504 * linux-low.c (linux_create_inferior): Save return value to ret.
11505
e77616d7
DE
115062011-12-16 Doug Evans <dje@google.com>
11507
e7b06c57
DE
11508 * linux-low.c (linux_create_inferior): If stdio connection,
11509 redirect stdin from /dev/null, stdout to stderr.
11510 * remote-utils.c (remote_is_stdio): New static global.
11511 (remote_connection_is_stdio): New function.
11512 (remote_prepare): Handle stdio connection.
11513 (remote_open): Ditto.
11514 (remote_close): Don't close stdin for stdio connections.
11515 (read_prim,write_prim): New functions. Replace all calls to
11516 read/write to these.
11517 * server.c (main): Watch for "-" argument. Move call to
11518 remote_prepare before start_inferior.
11519 * server.h (STDIO_CONNECTION_NAME): New macro.
11520 (remote_connection_is_stdio): Declare.
11521
e77616d7
DE
11522 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11523 in debugging output.
11524
82067193
YQ
115252011-12-15 Yao Qi <yao@codesourcery.com>
11526
11527 * tracepoint.c: Include sys/syscall.h.
11528 (gdb_ust_thread): Remove preprocessor conditional.
11529
82bfbe7e
PA
115302011-12-14 Pedro Alves <pedro@codesourcery.com>
11531
11532 * linux-low.c (linux_detach_one_lwp): Call
11533 the_low_target.prepare_to_resume before detaching.
11534
712c6575
YQ
115352011-12-14 Yao Qi <yao@codesourcery.com>
11536
11537 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11538 of write.
11539
d54d1edf
YQ
115402011-12-14 Yao Qi <yao@codesourcery.com>
11541
11542 * i386-low.c (i386_low_stopped_data_address): Initialize local
11543 variable `control'.
11544
6210a125
PA
115452011-12-13 Pedro Alves <pedro@codesourcery.com>
11546
11547 PR remote/13492
11548
11549 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11550 DR_CONTROL unless necessary. Extend comments.
11551 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11552 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11553
2ece8244
YQ
115542011-12-13 Yao Qi <yao@codesourcery.com>
11555
11556 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11557 macros.
11558 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11559
784867a5
JK
115602011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11561
11562 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11563 Print new debug message for such case.
11564
6bf36717
JK
115652011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11566
11567 Fix overlapping memcpy.
11568 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11569 the read_inferior_memory transfer.
11570 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11571 write_inferior_memory transfer.
11572 (set_fast_tracepoint_jump): New variable buf. Use it for the
11573 read_inferior_memory and write_inferior_memory transfers.
11574 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11575 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11576 Use it for the write_inferior_memory transfer.
11577 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11578 buffers.
11579
50275556
MR
115802011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11581
11582 * linux-low.c (fetch_register, store_register): Make code
11583 consistent, fix formatting.
11584
7325beb4
MR
115852011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11586
11587 * linux-low.c (usr_store_inferior_registers): Factor out code
11588 to handle individual registers into...
11589 (store_register): ... this new function.
11590
c642a434
UW
115912011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11592
11593 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11594 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11595 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11596 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11597 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11598 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11599 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11600 (srv_xmlfiles): Add new XML files.
11601
11602 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11603 and <sys/uio.h>.
11604 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11605 (init_registers_s390_linux32v1): Add prototype.
11606 (init_registers_s390_linux32v2): Likewise.
11607 (init_registers_s390_linux64v1): Likewise.
11608 (init_registers_s390_linux64v2): Likewise.
11609 (init_registers_s390x_linux64v1): Likewise.
11610 (init_registers_s390x_linux64v2): Likewise.
11611 (s390_num_regs): Increment to 52.
11612 (s390_regmap): Add orig_r2 register.
11613 (s390_num_regs_3264): Increment to 68.
11614 (s390_regmap_3264): Add orig_r2 register.
11615 (s390_collect_ptrace_register): Handle orig_r2 register.
11616 (s390_supply_ptrace_register): Likewise.
11617 (s390_fill_last_break): New function.
11618 (s390_store_last_break): Likewise.
11619 (s390_fill_system_call): New function.
11620 (s390_store_system_call): Likewise.
11621 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11622 register sets.
11623 (s390_check_regset): New function.
11624 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11625 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11626 Update target_regsets for available register sets.
11627
2268b414
JK
116282011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11629 Jan Kratochvil <jan.kratochvil@redhat.com>
11630
11631 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11632 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11633 New.
11634 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11635 * linux-low.h (struct process_info_private): New member r_debug.
11636 * server.c (handle_qxfer_libraries): Call
11637 the_target->qxfer_libraries_svr4.
11638 (handle_qxfer_libraries_svr4): New function.
11639 (qxfer_packets): New entry "libraries-svr4".
11640 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11641 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11642 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11643 PACKET_qXfer_libraries_svr4.
11644
d6db1fab
UW
116452011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11646
11647 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11648 PSW address/mask between 8-byte and 16-byte formats.
11649 (s390_supply_ptrace_register): Likewise.
11650 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11651 basic addressing mode bit.
11652
242f5f1c
SS
116532011-11-24 Stan Shebs <stan@codesourcery.com>
11654
11655 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11656
f196051f
SS
116572011-11-17 Stan Shebs <stan@codesourcery.com>
11658
11659 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11660 (tracing_start_time): New global.
11661 (tracing_stop_time): New global.
11662 (tracing_user_name): New global.
11663 (tracing_notes): New global.
11664 (tracing_stop_note): New global.
11665 (cmd_qtstart): Set traceframe_usage, start_time.
11666 (stop_tracing): Set stop_time.
11667 (cmd_qtstatus): Report additional status.
11668 (cmd_qtp): New function.
11669 (handle_tracepoint_query): Call it.
11670 (cmd_qtnotes): New function.
11671 (handle_tracepoint_general_set): Call it.
11672 (get_timestamp): Rename from tsv_get_timestamp.
11673
405f8e94
SS
116742011-11-14 Stan Shebs <stan@codesourcery.com>
11675 Kwok Cheung Yeung <kcy@codesourcery.com>
11676
11677 * linux-x86-low.c (small_jump_insn): New.
11678 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11679 trampoline and error message, build a trampoline and issue a small
11680 jump instruction to it.
11681 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11682 trampoline and error message.
11683 (x86_get_min_fast_tracepoint_insn_len): New.
11684 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11685 * linux-low.h (struct linux_target_ops): Add arguments to
11686 install_fast_tracepoint_jump_pad operation, add new operation.
11687 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11688 arguments.
11689 (linux_get_min_fast_tracepoint_insn_len): New function.
11690 (linux_target_op): Add new operation.
11691 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11692 (gdb_trampoline_buffer_end): Ditto.
11693 (gdb_trampoline_buffer_error): Ditto.
11694 (struct ipa_sym_addresses): Add fields for new IPA variables.
11695 (symbol_list): Add entries for new IPA variables.
11696 (struct tracepoint): Add fields to hold the address range of the
11697 trampoline used by the tracepoint.
11698 (trampoline_buffer_head): New static variable.
11699 (trampoline_buffer_tail): Ditto.
11700 (claim_trampoline_space): New function.
11701 (have_fast_tracepoint_trampoline_buffer): New function.
11702 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11703 structure.
11704 (install_fast_tracepoint): Ditto, also add error buffer argument.
11705 (cmd_qtminftpilen): New function.
11706 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11707 (fast_tracepoint_from_trampoline_address): New function.
11708 (fast_tracepoint_collecting): Handle trampoline as part of jump
11709 pad space.
11710 (set_trampoline_buffer_space): New function.
11711 (initialize_tracepoint): Initialize new IPA variables.
11712 * target.h (struct target_ops): Add arguments to
11713 install_fast_tracepoint_jump_pad operation, add new
11714 get_min_fast_tracepoint_insn_len operation.
11715 (target_get_min_fast_tracepoint_insn_len): New.
11716 (install_fast_tracepoint_jump_pad): Add arguments.
11717 * server.h (IPA_BUFSIZ): Define.
11718 * linux-i386-ipa.c: Include extra header files.
11719 (initialize_fast_tracepoint_trampoline_buffer): New function.
11720 (initialize_low_tracepoint): Call it.
11721 * server.h (set_trampoline_buffer_space): Declare.
11722 (claim_trampoline_space): Ditto.
11723 (have_fast_tracepoint_trampoline_buffer): Ditto.
11724
1e4d1764
YQ
117252011-11-14 Yao Qi <yao@codesourcery.com>
11726
11727 * server.c (handle_query): Handle InstallInTrace for qSupported.
11728 * tracepoint.c (add_tracepoint): Sort list.
11729 (install_tracepoint, download_tracepoint): New.
11730 (cmd_qtdp): Call them to install and download tracepoints.
11731 (sort_tracepoints): Removed.
11732 (cmd_qtstart): Update.
11733
5c73ff4e
YQ
117342011-11-14 Yao Qi <yao@codesourcery.com>
11735
11736 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11737 * mem-break.h: Declare.
11738 * tracepoint.c (cmd_qtstart): Move some code to ...
11739 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11740 New.
11741 (download_tracepoints): Move some code to ...
11742 (download_tracepoint_1): ... here. New.
11743
86a30030
YQ
117442011-11-08 Yao Qi <yao@codesourcery.com>
11745
11746 * remote-utils.c (relocate_instruction): A comment fix.
11747
8d26e50c
JB
117482011-11-07 Joel Brobecker <brobecker@adacore.com>
11749
11750 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11751 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11752 dr_status_mirror and dr_control_mirror from debug_reg_state.
11753 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11754 (i386_initial_stuff): Remove use of deleted globals.
11755 (i386_get_thread_context, i386_set_thread_context,
11756 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11757 from debug_reg_state.
11758
a59306a3
YQ
117592011-11-05 Yao Qi <yao@codesourcery.com>
11760
11761 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11762 address as TPOINT's.
11763
3065dfb6
SS
117642011-11-02 Stan Shebs <stan@codesourcery.com>
11765
11766 * tracepoint.c (agent_mem_read_string): New function.
11767 (eval_agent_expr): Call it for tracenz.
11768 * server.c (handle_query): Report support for tracenz.
11769
fd0d8c7c
YQ
117702011-11-02 Yao Qi <yao@codesourcery.com>
11771
11772 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11773
609086b1
YQ
117742011-11-02 Yao Qi <yao@codesourcery.com>
11775
11776 * target.h: Fix a typo in comment.
11777
b9fd1791
PA
117782011-10-31 Pedro Alves <pedro@codesourcery.com>
11779
11780 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11781 clobber the breakpoints' shadows with fast tracepoint jumps.
11782 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11783 * target.c (write_inferior_memory): Also pass MYADDR down to
11784 check_mem_write.
11785
03583c20
UW
117862011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11787
11788 * configure.ac: Check support for personality routine.
11789 * configure: Regenerate.
11790 * config.in: Likewise.
11791 * linux-low.c: Include <sys/personality.h>.
11792 Define ADDR_NO_RANDOMIZE if necessary.
11793 (linux_create_inferior): Disable address space randomization when
11794 forking inferior, if requested.
11795 (linux_supports_disable_randomization): New function.
11796 (linux_target_ops): Install it.
11797 * server.h (disable_randomization): Declare.
11798 * server.c (disable_randomization): New global variable.
11799 (handle_general_set): Handle QDisableRandomization.
11800 (handle_query): Likewise for qSupported.
11801 (main): Support --disable-randomization and --no-disable-randomization
11802 command line arguments.
11803 * target.h (struct target_ops): Add supports_disable_randomization.
11804 (target_supports_disable_randomization): New macro.
11805
723b724b
MF
118062011-09-29 Mike Frysinger <vapier@gentoo.org>
11807
11808 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11809 ifdef check.
11810 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11811 [!PT_GETDSBT] (target_loadmap): New definition.
11812 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11813 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11814 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11815 and PT_GETDSBT to LINUX_LOADMAP.
11816 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11817 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11818
55329a5c 118192011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11820
11821 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11822 (arm_linux_hwbp_cap): New static variable.
11823 (arm_linux_get_hwbp_cap): Replace by ...
11824 (arm_linux_init_hwbp_cap): ... this new function.
11825 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11826 (arm_linux_get_hw_watchpoint_count): Likewise.
11827 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11828 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11829 (arm_prepare_to_resume): Use perror_with_name instead of error.
11830
55329a5c 118312011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11832
11833 * linux-arm-low.c: Include <signal.h>.
11834 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11835 (struct arm_linux_hwbp_cap): New data type.
11836 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11837 (struct arm_linux_hw_breakpoint): New data type.
11838 (MAX_BPTS, MAX_WPTS): Define.
11839 (struct arch_process_info, struct arch_lwp_info): New data types.
11840 (arm_linux_get_hwbp_cap): New function.
11841 (arm_linux_get_hw_breakpoint_count): Likewise.
11842 (arm_linux_get_hw_watchpoint_count): Likewise.
11843 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11844 (arm_hwbp_control_initialize): Likewise.
11845 (arm_hwbp_control_is_enabled): Likewise.
11846 (arm_hwbp_control_is_initialized): Likewise.
11847 (arm_hwbp_control_disable): Likewise.
11848 (arm_linux_hw_breakpoint_equal): Likewise.
11849 (arm_linux_hw_point_initialize): Likewise.
11850 (struct update_registers_data): New data structure.
11851 (update_registers_callback: New function.
11852 (arm_insert_point): Likewise.
11853 (arm_remove_point): Likewise.
11854 (arm_stopped_by_watchpoint): Likewise.
11855 (arm_stopped_data_address): Likewise.
11856 (arm_new_process): Likewise.
11857 (arm_new_thread): Likewise.
11858 (arm_prepare_to_resume): Likewise.
11859 (the_low_target): Register arm_insert_point, arm_remove_point,
11860 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11861 arm_new_thread, and arm_prepare_to_resume.
11862
6b9801d4
SS
118632011-09-15 Stan Shebs <stan@codesourcery.com>
11864
11865 * server.h (struct emit_ops): Add compare-goto fields.
11866 * tracepoint.c (gdb_agent_op_sizes): New table.
11867 (emit_eq_goto): New function.
11868 (emit_ne_goto): New function.
11869 (emit_lt_goto): New function.
11870 (emit_le_goto): New function.
11871 (emit_gt_goto): New function.
11872 (emit_ge_goto): New function.
11873 (is_goto_target): New function.
11874 (compile_bytecodes): Recognize special cases of compare-goto
11875 combinations and call specialized emitters for them.
11876 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11877 (amd64_emit_ne_goto): New function.
11878 (amd64_emit_lt_goto): New function.
11879 (amd64_emit_le_goto): New function.
11880 (amd64_emit_gt_goto): New function.
11881 (amd64_emit_ge_goto): New function.
11882 (amd64_emit_ops): Add the new functions.
11883 (i386_emit_eq_goto): New function.
11884 (i386_emit_ne_goto): New function.
11885 (i386_emit_lt_goto): New function.
11886 (i386_emit_le_goto): New function.
11887 (i386_emit_gt_goto): New function.
11888 (i386_emit_ge_goto): New function.
11889 (i386_emit_ops): Add the new functions.
11890
bf15cbda
SS
118912011-09-08 Stan Shebs <stan@codesourcery.com>
11892
11893 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11894 (i386_emit_epilogue): Restore %ebx.
11895
943ca1dd
JZ
118962011-08-31 Jie Zhang <jzhang918@gmail.com>
11897
11898 * server.c (step_thread): Remove definition.
11899 (process_serial_event): Don't handle Hs.
11900 * server.h (step_thread): Remove declaration.
11901 * target.c (set_desired_inferior): Remove use of step_thread.
11902
e3deef73
LM
119032011-08-24 Luis Machado <lgustavo@codesourcery.com>
11904
11905 * linux-low.c: Include linux-procfs.h.
11906 (linux_attach_lwp_1): Update comments.
11907 (linux_attach): Scan for existing threads when attaching to a
11908 process that is the tgid.
11909 * Makefile.in: Update dependencies.
11910
13da1c97
LM
119112011-08-24 Luis Machado <lgustavo@codesourcery.com>
11912
11913 * configure.srv: Add linux-procfs.o dependencies.
11914
881127c9
YQ
119152011-08-14 Yao Qi <yao@codesourcery.com>
11916
11917 * target.h (struct target_ops): Fix indent.
11918 * win32-low.c (win32_target_ops): Fix comment.
11919
58dbd541
YQ
119202011-08-14 Andrew Jenner <andrew@codesourcery.com>
11921 Yao Qi <yao@codesourcery.com>
11922
11923 * Makefile.in (clean): Remove tic6x-*.c files.
11924 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11925 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11926 (tic6x-c64xp-linux.c): Likewise.
11927 * configure.srv: Add support for tic6x-*-uclinux.
11928 * linux-tic6x-low.c: New.
11929 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11930
78d85199
YQ
119312011-08-14 Andrew Stubbs <ams@codesourcery.com>
11932 Yao Qi <yao@codesourcery.com>
11933
11934 * target.h (struct target_ops): Add read_loadmap.
11935 * linux-low.c (struct target_loadseg): New type.
11936 (struct target_loadmap): New type.
11937 (linux_read_loadmap): New function.
11938 (linux_target_ops): Add linux_read_loadmap.
11939 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11940 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11941 to NULL.
78d85199 11942
a959a88d
EZ
119432011-08-05 Eli Zaretskii <eliz@gnu.org>
11944
11945 * win32-low.c: Include <stdint.h>.
11946
1ced966e
PA
119472011-07-22 Pedro Alves <pedro@codesourcery.com>
11948
11949 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11950 to the inferior here.
11951 (i386_remove_aligned_watchpoint): Ditto.
11952 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11953 fit part of the watchpoint in the debug registers.
11954 (i386_update_inferior_debug_regs): New.
11955 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11956 registers, and only update the inferior on success.
11957 (i386_low_remove_watchpoint): Ditto.
11958
d26e3629
KY
119592011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11960
11961 * linux-low.c (compare_ints, unique, list_threads, show_process,
11962 linux_core_of_thread): Delete.
11963 (linux_target_ops): Change linux_core_of_thread to
11964 linux_common_core_of_thread.
11965 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11966 * utils.c (malloc_failure): Change type of argument.
11967 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11968 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11969 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11970 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11971 (IPA_OBJS): Add common-utils-ipa.o.
11972 (ptid_h, linux_osdata_h): New macros.
11973 (server_h): Add common/common-utils.h, common/xml-utils.h,
11974 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11975 common/ptid.h.
11976 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11977 ptid.o, buffer.o): New rules.
11978 (linux-low.o): Add common/linux-osdata.h as a dependency.
11979 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11980 * configure.ac: Add AC_HEADER_DIRENT check.
11981 * config.in: Regenerate.
11982 * configure: Regenerate.
11983 * remote-utils.c (xml_escape_text): Delete.
11984 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11985 buffer_xml_printf): Move to common/buffer.c.
11986 * server.c (main): Remove call to initialize_inferiors.
11987 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11988 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11989 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11990 internal_error, gdb_assert, gdb_assert_fail): Delete.
11991 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11992 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11993 common/buffer.h.
11994 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11995 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11996 initialize_inferiors): Delete.
11997
2275a1a7
PA
119982011-07-20 Pedro Alves <pedro@codesourcery.com>
11999
12000 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12001 symbol error.
12002
0a5b1e09
PA
120032011-05-31 Pedro Alves <pedro@codesourcery.com>
12004
12005 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12006 assertion.
12007 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12008
6938fd34
YQ
120092011-05-26 Yao Qi <yao@codesourcery.com>
12010
12011 * Makefile.in (thread-db.o): Track dependence to
12012 common/gdb_thread_db.h.
12013 * thread-db.c: include gdb_thread_db.h from right place.
12014
b481f9e0
TT
120152011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12016
12017 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12018 __FILE__ and __LINE__ to internal_error.
12019
98a5dd13
DE
120202011-05-13 Doug Evans <dje@google.com>
12021
12022 * thread-db.c (try_thread_db_load_from_sdir): New function.
12023 (try_thread_db_load_from_dir): New function.
12024 (thread_db_load_search): Handle $sdir, ignore $pdir.
12025 Remove trying of system directories if search of
12026 libthread-db-search-path fails, that is now done via $sdir.
12027
d248b706
KY
120282011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12029
12030 * server.c (handle_query): Add EnableDisableTracepoints to the list
12031 of supported features.
43aaf8b6 12032 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12033 tracepoints.
43aaf8b6
PA
12034 (cmd_qtenable_disable): New.
12035 (cmd_qtstart): Install tracepoints even if disabled.
12036 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12037 receiving a QTEnable or QTDisable packet.
12038 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12039 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12040 tracepoints.
12041 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12042
84e578fb
DE
120432011-05-10 Doug Evans <dje@google.com>
12044
12045 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12046
71f55dd8
DE
120472011-05-04 Doug Evans <dje@google.com>
12048
12049 * linux-low.c (linux_join): Skip process lookup.
12050 * spu-low.c (spu_join): Ditto.
12051 * server.c (join_inferiors_callback): Delete.
12052 (process_serial_event): For 'D' packet (detach) call join_inferior
12053 directly.
12054
4d393d60
JM
120552011-05-04 Joseph Myers <joseph@codesourcery.com>
12056
12057 * README: Don't mention xscale*-*-linux*.
12058 * configure.srv (xscale*-*-linux*): Don't handle target.
12059
b00ad6ff
NF
120602011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12061
12062 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12063 casting pointers.
12064 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12065 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12066 (i386_emit_void_call_2): Likewise.
12067
af96c192
YQ
120682011-04-26 Yao Qi <yao@codesourcery.com>
12069
43aaf8b6
PA
12070 * linux-low.c: Move common macros to linux-ptrace.h.
12071 Include linux-ptrace.h.
af96c192
YQ
12072 * Makefile.in (linux_ptrace_h): New.
12073 (linux-low.o): Depends on linux-ptrace.h.
12074
03f2bd59
JK
120752011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12076
12077 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12078 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12079 (remote_prepare): New function with most of the TCP code from ...
12080 (remote_open): ... here. Detect PORT here unconditionally. Move also
12081 setting transport_is_reliable.
12082 * server.c (run_once): New variable.
12083 (gdbserver_usage): Document it.
12084 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12085 the first run if RUN_ONCE.
12086 * server.h (run_once, remote_prepare): New declarations.
12087
7a9dd1b2
TT
120882011-04-19 Tom Tromey <tromey@redhat.com>
12089
12090 * win32-low.c (handle_load_dll): Remove duplicate "the".
12091
81239425
PM
120922011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12093
12094 Remove support for old Cygwin 1.5 versions.
12095 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12096 function to avoid warning.
12097 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12098 warning.
12099
9e0627f1
PM
121002011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12101
12102 * gdbserver/server.h (Macro _): Define it if not available.
12103
588eebee
MS
121042011-03-14 Michael Snyder <msnyder@vmware.com>
12105
348af9f7 12106 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12107
43f70d4c
JB
121082011-03-10 Joel Brobecker <brobecker@adacore.com>
12109
12110 * Makefile.in (maintainer-clean realclean distclean): Remove
12111 "make ... subdir_do" command.
12112
348af9f7
MS
121132011-03-10 Michael Snyder <msnyder@vmware.com>
12114
12115 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12116
12117 * server.c (handle_v_run): Free alloced buffer on early return.
12118
e637a4f5
YQ
121192011-03-09 Yao Qi <yao@codesourcery.com>
12120
12121 Revert:
12122 2011-03-04 Yao Qi <yao@codesourcery.com>
12123
12124 * Makefile.in: Remove GNU make feature --directory.
12125
12126 2011-03-05 Yao Qi <yao@codesourcery.com>
12127
12128 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12129 (subdir_do): New make target. Copied from gdb/Makefile.
12130 (maintainer-clean, realclean, distclean, clean): Call corresponding
12131 make targets in common/Makefile.
12132
12133 2011-02-11 Yao Qi <yao@codesourcery.com>
12134
12135 * configure.ac: Call AC_PROG_RANLIB.
12136 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12137 * configure: Regenerate.
12138
e6edda56
JK
121392011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12140
12141 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12142
e5141119
JB
121432011-03-06 Yao Qi <yao@codesourcery.com>
12144
12145 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12146
64794aa4
JB
121472011-03-05 Yao Qi <yao@codesourcery.com>
12148
12149 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12150 (subdir_do): New make target. Copied from gdb/Makefile.
12151 (maintainer-clean, realclean, distclean, clean): Call corresponding
12152 make targets in common/Makefile.
12153
7a762829
YQ
121542011-03-04 Yao Qi <yao@codesourcery.com>
12155
12156 * Makefile.in: Remove GNU make feature --directory.
12157
348af9f7
MS
121582011-03-04 Michael Snyder <msnyder@vmware.com>
12159
12160 * server.c (queue_stop_reply): Call xmalloc not malloc.
12161
121622011-03-02 Michael Snyder <msnyder@vmware.com>
12163
12164 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12165
9f72fee2
MS
121662011-02-28 Michael Snyder <msnyder@vmware.com>
12167
588eebee
MS
12168 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12169 (cmd_qtframe): Ditto.
12170 (cmd_qtbuffer): Ditto.
12171 (cmd_bigqtbuffer): Ditto.
12172
9f72fee2
MS
12173 * utils.c (decimal2str): Initialize 'width' to nine, then
12174 don't mess with it.
12175
8040bd49
UW
121762011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12177
12178 * hostio.c (require_data): Free *data, not data.
12179
7e52cbd0
JK
121802011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12181
12182 * hostio.c (require_data): Use free, not xfree.
12183
9130f83e
MS
121842011-02-27 Michael Snyder <msnyder@vmware.com>
12185
4b812f4e
MS
12186 * server.c (handle_query): Discard unused value.
12187
9130f83e
MS
12188 * hostio.c (require_data): Free malloc memory before returning
12189 error.
12190
69d37113
MS
121912011-02-26 Michael Snyder <msnyder@vmware.com>
12192
12193 * linux-low.c (list_threads): Call closedir for dirent.
12194
35f5825a
MS
121952011-02-27 Michael Snyder <msnyder@vmware.com>
12196
2a589cef
MS
12197 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12198 a case statement falls through.
12199
0adea5f7
MS
12200 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12201
35f5825a
MS
12202 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12203 in comparison.
12204
238f1c74
MS
122052011-02-26 Michael Snyder <msnyder@vmware.com>
12206
12207 * utils.c (decimal2str): Eliminate dead code and dead param.
12208 (pulongest): Drop dead param from call to decimal2str.
12209 (plongest): Ditto.
12210
633ff500
JB
122112011-02-24 Joel Brobecker <brobecker@adacore.com>
12212
12213 Revert the following patch (not approved yet):
12214 2011-02-21 Hui Zhu <teawater@gmail.com>
12215 * tracepoint.c (tp_printf): New function.
12216 (eval_agent_expr): Handle gdb_agent_op_printf.
12217
f9c6ff72
HZ
122182011-02-21 Hui Zhu <teawater@gmail.com>
12219
12220 * tracepoint.c (tp_printf): New function.
12221 (eval_agent_expr): Handle gdb_agent_op_printf.
12222
94d5e490
TT
122232011-02-18 Tom Tromey <tromey@redhat.com>
12224
12225 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12226 (tracepoint.o): Likewise.
12227 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12228 (gdb_agent_op_names): Likewise.
12229
c7f96d2b
TT
122302011-02-18 Tom Tromey <tromey@redhat.com>
12231
12232 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12233 gdb_agent_op_rot>: New constants.
12234 (gdb_agent_op_names): Add pick and roll.
12235 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12236 cases.
12237
0feedb2c
JK
122382011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12239
12240 * aclocal.m4: Regenerated with aclocal-1.11.1.
12241
b3b9301e
PA
122422011-02-14 Pedro Alves <pedro@codesourcery.com>
12243
12244 * server.c (handle_qxfer_traceframe_info): New.
12245 (qxfer_packets): Register "traceframe-info".
12246 (handle_query): Report support for qXfer:traceframe-info:read+.
12247 * tracepoint.c (match_blocktype): New.
12248 (traceframe_find_block_type): Rename to ...
12249 (traceframe_walk_blocks): ... this. Add callback filter argument,
12250 and use it.
12251 (traceframe_find_block_type): New, reimplemented on top of
12252 traceframe_walk_blocks.
12253 (build_traceframe_info_xml): New.
12254 (traceframe_read_info): New.
12255 * server.h (traceframe_read_info): Declare.
12256
4f3e6fb7
YQ
122572011-02-11 Yao Qi <yao@codesourcery.com>
12258
12259 * configure.ac: Call AC_PROG_RANLIB.
12260 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12261 * configure: Regenerate.
12262
764880b7
PA
122632011-02-07 Pedro Alves <pedro@codesourcery.com>
12264
12265 * server.c (gdb_read_memory): Change return semantics to allow
12266 partial transfers.
12267 (handle_search_memory_1): Adjust.
12268 (process_serial_event) <'m' packet>: Handle partial transfers.
12269 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12270
1c79eb8a
PA
122712011-01-28 Pedro Alves <pedro@codesourcery.com>
12272
12273 * regcache.c (init_register_cache): Initialize
12274 regcache->register_status.
12275 (free_register_cache): Release regcache->register_status.
12276 (regcache_cpy): Copy register_status.
12277 (registers_to_string): Print 'x's for unavailable registers.
12278 (supply_register): Mark the register's status valid or
12279 unavailable, depending on whether a buffer was passed in or not.
12280 (supply_register_zeroed): New.
12281 (supply_regblock): Mark the registers' status valid or
12282 unavailable, depending on whether a buffer was passed in or not.
12283 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12284 (struct regcache): New `register_status' field.
12285 (supply_register_zeroed): Declare.
12286 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12287 supply_register_zeroed, rather than passing a NULL buffer to
12288 supply_register.
12289 * tracepoint.c (fetch_traceframe_registers): Update comment.
12290
85724a0e
PA
122912011-01-28 Pedro Alves <pedro@codesourcery.com>
12292
12293 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12294 buffer explicit.
12295
d08aafef
PA
122962011-01-25 Pedro Alves <pedro@codesourcery.com>
12297
12298 * server.h (decode_xfer_write): Change prototype.
12299 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12300 and don't extract the annex here.
12301 * server.c (decode_xfer_read): Remove `annex' parameter,
12302 and don't extract the annex here.
12303 (decode_xfer): New.
12304 (struct qxfer): New.
12305 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12306 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12307 (handle_qxfer_statictrace): New functions, abstracted out from
12308 handle_query, and made to use the struct qxfer interface.
12309 (handle_threads_qxfer_proper): Rename to ...
12310 (handle_qxfer_threads_proper): ... this.
12311 (handle_threads_qxfer): Rename to ...
12312 (handle_qxfer_threads): ... this. Adjust.
12313 (qxfer_packets): New array.
12314 (handle_qxfer): New function.
12315 (handle_query): Use handle_qxfer.
12316
493e2a69
MS
123172011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12318
12319 * gdbreplay.c: Shorten lines of >= 80 columns.
12320 * linux-low.c: Ditto.
12321 * linux-ppc-low.c: Ditto.
12322 * linux-s390-low.c: Ditto.
12323 * linux-sparc-low.c: Ditto.
12324 * linux-x86-low.c: Ditto.
12325 * linux-xtensa-low.c: Ditto.
12326 * mem-break.c: Ditto.
12327 * nto-low.c: Ditto.
12328 * regcache.h: Ditto.
12329 * remote-utils.c: Ditto.
12330 * server.c: Ditto.
12331 * server.h: Ditto.
12332 * thread-db.c: Ditto.
12333 * tracepoint.c: Ditto.
12334 * utils.c: Ditto.
12335 * win32-low.h: Ditto.
12336
44944448
JB
123372011-01-05 Joel Brobecker <brobecker@adacore.com>
12338
12339 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12340 update.
12341
71ce852c
JB
123422011-01-01 Joel Brobecker <brobecker@adacore.com>
12343
12344 * server.c (gdbserver_version): Update copyright year in version
12345 output.
12346 * gdbreplay.c (gdbreplay_version): Ditto.
12347
eb826dc6
MF
123482010-12-29 Jie Zhang <jie.zhang@analog.com>
12349
12350 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12351 * linux-bfin-low.c: New file.
12352 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12353 PT_DATA_ADDR for BFIN targets.
12354 * Makefile.in (SFILES): Add linux-bfin-low.c.
12355 (clean): Remove reg-bfin.c.
12356 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12357 * README: Mention supported Blackfin targets.
12358
39ab222a
MF
123592010-12-23 Mike Frysinger <vapier@gentoo.org>
12360
12361 * .gitignore: New file.
12362
a1f2ce7d
MF
123632010-11-16 Mike Frysinger <vapier@gentoo.org>
12364
12365 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12366
f474844c
JZ
123672010-10-22 Jie Zhang <jie@codesourcery.com>
12368
12369 * Makefile.in: Add FLAGS_TO_PASS variable.
12370 (install): Remove dependency of install-only and recursively
12371 invoke make for install-only.
12372
f1048712
DE
123732010-10-04 Doug Evans <dje@google.com>
12374
12375 * Makefile.in (uninstall): Use $(DESTDIR).
12376
b53a1623
PA
123772010-09-24 Pedro Alves <pedro@codesourcery.com>
12378
e6ee044d
PA
12379 PR gdb/11842
12380
b53a1623
PA
12381 * linux-x86-low.c (compat_siginfo_from_siginfo)
12382 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12383 si_code is < 0. Check for si_code == SI_TIMER before checking for
12384 si_code < 0.
12385
fa1bd1e4
JB
123862010-09-13 Joel Brobecker <brobecker@adacore.com>
12387
12388 * lynx-i386-low.c: New file.
12389 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12390
47fac8f8
JB
123912010-09-13 Joel Brobecker <brobecker@adacore.com>
12392
12393 * lynx-low.c (ptrace_request_to_str): Remove handling for
12394 request values that have been removed in LynxOS 5.x.
12395
1adfc54d
JB
123962010-09-13 Joel Brobecker <brobecker@adacore.com>
12397
12398 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12399 <ptrace.h>
12400
c2a66c29
NS
124012010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12402
12403 * configure.ac: Add --enable-inprocess-agent option.
12404 * configure: Rebuilt.
12405
32fcada3
YQ
124062010-09-06 Yao Qi <yao@codesourcery.com>
12407
12408 * linux-low.c (linux_kill): Remove unused variable.
12409 (linux_stabilize_threads): Likewise.
12410 * server.c (start_inferior): Likewise.
12411 (queue_stop_reply_callback): Likewise.
12412 * tracepoint.c (do_action_at_tracepoint): Likewise.
12413
0cccb683
YQ
124142010-09-06 Yao Qi <yao@codesourcery.com>
12415
12416 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12417 on return.
12418
423ec54c
JK
124192010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12420
12421 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12422
12ac6819
PA
124232010-09-06 Pedro Alves <pedro@codesourcery.com>
12424
12425 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12426 "$(IPA_DEPFILES)".
12427
8ed54b31
JB
124282010-09-01 Joel Brobecker <brobecker@adacore.com>
12429
12430 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12431 gdbserver/lynx-ppc-low.c: New files.
12432 * Makefile.in (lynx_low_h): New variable.
12433 (lynx-low.o, lynx-ppc-low.o): New rules.
12434 * configure.ac: On LynxOS, link with -lnetinet.
12435 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12436 * configure: regenerate.
12437
bb0116a4
JB
124382010-09-01 Joel Brobecker <brobecker@adacore.com>
12439
12440 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12441 * configure.ac: Add check for vasprintf and vsnprintf.
12442 * configure, config.in: Regenerate.
12443 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12444
a778ab81 124452010-09-01 Joel Brobecker <brobecker@adacore.com>
12446
12447 * gdbreplay.c: Move include of alloca.h up, next to include of
12448 malloc.h.
12449 * server.h: Add include of malloc.h.
12450 * mem-break.c: Remove include of malloc.h.
12451 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12452
8b034a19 124532010-09-01 Joel Brobecker <brobecker@adacore.com>
12454
12455 * Makefile.in (memmem.o): Build with -Wno-error.
12456
124572010-09-01 Joel Brobecker <brobecker@adacore.com>
12458
12459 * utils.c (xsnprintf): Make non-static.
12460 * server.h: Add xsnprintf declaration.
12461 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12462 replace calls to snprintf by calls to xsnprintf throughout.
12463
124642010-09-01 Joel Brobecker <brobecker@adacore.com>
12465
12466 * configure.ac: Add configure check for alloca.
12467 * configure, config.in: Regenerate.
12468 * server.h: Include alloca.h if it exists.
12469 * gdbreplay.c: Include alloca.h if it exists.
12470
1a981360
PA
124712010-08-28 Pedro Alves <pedro@codesourcery.com>
12472
12473 * linux-low.c (__SIGRTMIN): Define if not already defined.
12474 (linux_create_inferior): Check for __ANDROID__ rather than
12475 __SIGRTMIN.
12476 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12477 are already deferred.
12478 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12479 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12480 stopped and already has a pending signal to report.
12481 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12482 a pending signal to report or is moving out of a jump pad.
12483 (linux_init_signals): Check for __ANDROID__ rather than
12484 __SIGRTMIN.
12485
b4d51a55
PA
124862010-08-28 Pedro Alves <pedro@codesourcery.com>
12487
12488 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12489 debug_threads check. Avoid a linear search when not doing debug
12490 output.
12491
ec48365d
PA
124922010-08-27 Pedro Alves <pedro@codesourcery.com>
12493
12494 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12495 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12496 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12497 (process_event): Change local fd's type to gdb_fildes_t.
12498 (create_file_handler): Adjust prototype.
12499 (delete_file_handler): Adjust prototype.
12500 (handle_file_event): Adjust prototype. Use pfildes.
12501 (create_file_event): Adjsut prototype.
12502 * remote-utils.c (remote_desc, listen_desc): Change type to
12503 gdb_fildes_t.
12504 * server.h: New gdb_fildes_t typedef.
12505 [USE_WIN32API]: Include winsock2.h.
12506 (delete_file_handler, add_file_handler): Adjust prototypes.
12507 (pfildes): Declare.
12508 * utils.c (pfildes): New.
12509
854d88f0
PA
125102010-08-27 Pedro Alves <pedro@codesourcery.com>
12511
12512 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12513 * configure: Regenerate.
12514
0146f85b
PA
125152010-08-27 Pedro Alves <pedro@codesourcery.com>
12516
12517 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12518 (linux_done_accessing_memory): ... this.
12519 (linux_target_ops): Adjust.
12520 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12521 * nto-low.c (nto_target_ops): Adjust comment.
12522 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12523 * spu-low.c (spu_target_ops): Adjust comment.
12524 * target.h (target_ops): Rename unprepare_to_access_memory field
12525 to done_accessing_memory.
12526 (unprepare_to_access_memory): Rename to ...
12527 (done_accessing_memory): ... this.
12528
90d74c30
PA
125292010-08-26 Pedro Alves <pedro@codesourcery.com>
12530
12531 * linux-low.c (linux_prepare_to_access_memory): New.
12532 (linux_unprepare_to_access_memory): New.
12533 (linux_target_ops): Install them.
12534 * server.c (read_memory): Rename to ...
12535 (gdb_read_memory): ... this. Use
12536 prepare_to_access_memory/prepare_to_access_memory.
12537 (write_memory): Rename to ...
12538 (gdb_write_memory): ... this. Use
12539 prepare_to_access_memory/prepare_to_access_memory.
12540 (handle_search_memory_1): Adjust.
12541 (process_serial_event): Adjust.
12542 * target.h (struct target_ops): New fields
12543 prepare_to_access_memory and unprepare_to_access_memory.
12544 (prepare_to_access_memory, unprepare_to_access_memory): New.
12545 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12546 prepare_to_access_memory/prepare_to_access_memory.
12547 * nto-low.c (nto_target_ops): Adjust.
12548 * spu-low.c (spu_target_ops): Adjust.
12549 * win32-low.c (win32_target_ops): Adjust.
12550
fd467969
PA
125512010-08-26 Pedro Alves <pedro@codesourcery.com>
12552
12553 * Makefile.in (WARN_CFLAGS): Get it from configure.
12554 (WERROR_CFLAGS): New.
12555 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12556 * configure.ac: Introduce --enable-werror, which adds -Werror to
12557 the compiler command line. Enabled by default. Disable with
12558 --disable-werror. Add -Wdeclaration-after-statement
12559 Wpointer-arith and -Wformat-nonliteral to warning flags.
12560 * configure: Regenerate.
12561
331e2f5f
PA
125622010-08-26 Pedro Alves <pedro@codesourcery.com>
12563
12564 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12565
e581f2b4
PA
125662010-08-26 Pedro Alves <pedro@codesourcery.com>
12567
12568 * gdbreplay.c (remote_error): New.
12569 (gdbchar): New.
12570 (expect): Use gdbchar. Check for error reading from GDB.
12571 Clarify sync error output.
12572 (play): Check for errors writing to GDB.
12573 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12574 * remote-utils.c (getpkt): Check for errors writing to the remote
12575 descriptor.
12576
3c11dd79
PA
125772010-08-25 Pedro Alves <pedro@codesourcery.com>
12578
12579 * linux-low.c (linux_wait_1): Move non-debugging code out of
12580 `debug_threads' control.
12581
d20a8ad9
PA
125822010-08-25 Pedro Alves <pedro@codesourcery.com>
12583
12584 * linux-low.c (linux_wait_1): Don't set last_status here.
12585 * server.c (push_event, queue_stop_reply_callback): Assert we're
12586 not pushing a TARGET_WAITKIND_IGNORE event.
12587 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12588 (myresume, handle_target_event): Set the thread's last_resume_kind
12589 and last_status from the target returned status.
12590
964e4306
PA
125912010-08-25 Pedro Alves <pedro@codesourcery.com>
12592
12593 PR threads/10729
12594
12595 * linux-x86-low.c (update_debug_registers_callback): New.
12596 (i386_dr_low_set_addr): Use it.
12597 (i386_dr_low_get_addr): New.
12598 (i386_dr_low_set_control): Use update_debug_registers_callback.
12599 (i386_dr_low_get_control): New.
12600 (i386_dr_low_get_status): Adjust.
12601 * linux-low.c (linux_stop_lwp): New.
12602 * linux-low.h (linux_stop_lwp): Declare.
12603
12604 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12605 argument instead of a i386_debug_reg_state.
12606 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12607 a i386_debug_reg_state.
12608 (i386_insert_aligned_watchpoint): Adjust.
12609 (i386_remove_aligned_watchpoint): Adjust.
12610 (i386_low_stopped_data_address): Read the debug registers from the
12611 inferior instead of from the mirrors.
12612 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12613 (i386_dr_low_get_addr): Declare.
12614 (i386_dr_low_get_control): Declare.
12615 (i386_dr_low_get_status): Change prototype.
12616
12617 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12618 (i386_dr_low_get_addr): New.
12619 (i386_dr_low_get_control): New.
12620 (i386_dr_low_get_status): Adjust prototype. Return
12621 dr_status_mirror.
12622 (i386_initial_stuff): Clear dr_status_mirror and
12623 dr_control_mirror.
12624 (i386_get_thread_context): Adjust.
12625 (i386_set_thread_context): Adjust.
12626 (i386_thread_added): Adjust.
12627
5f21a75b
PA
126282010-08-24 Pedro Alves <pedro@codesourcery.com>
12629
12630 * linux-low.h (linux_thread_area): Delete declaration.
12631
3e4c1235
TS
126322010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12633
12634 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12635 after its termination.
12636
1971b033
PA
126372010-08-09 Pedro Alves <pedro@codesourcery.com>
12638
12639 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12640 (gdb_wants_all_stopped): Delete.
12641 (linux_wait_1): Don't call them.
12642 * server.c (handle_v_cont): Tag all threads as want-stopped.
12643 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12644 stopped as "client-wants-stopped".
12645
310444ac
PA
126462010-07-31 Pedro Alves <pedro@codesourcery.com>
12647
12648 * Makefile.in (signals_h): New.
12649 (server_h): Depend on it.
12650 (server.o): Don't depend on $(signals_def).
12651 (signals.o): Depend on $(signals_def).
12652
a19cae16
JK
126532010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12654
12655 * Makefile.in (signals_def): New.
12656 (server_h): Append include/gdb/signals.h and signals_def.
12657 (server.o): Append signals_def.
12658
30d50328
JK
126592010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12660
12661 * server.c (handle_target_event): Use target_signal_to_host for
12662 resume_info.sig initialization.
12663 * target.h (struct thread_resume) <sig>: New comment.
12664
5c3216e2
OS
126652010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12666
c6f46ca0
OS
12667 * server.c (handle_query): strcpy() the returned string from paddress()
12668 instead of sprintf().
5c3216e2
OS
12669 * utils.c (paddress): Return phex_nz().
12670
6bd31874
JB
126712010-07-07 Joel Brobecker <brobecker@adacore.com>
12672
12673 * server.c (handle_v_cont): Call mourn_inferior if process
12674 just exited.
12675 (myresume): Likewise.
12676
0fb4aa4b
PA
126772010-07-01 Pedro Alves <pedro@codesourcery.com>
12678
12679 Static tracepoints, and integration with UST.
12680
12681 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12682 * mem-break.c (uninsert_all_breakpoints)
12683 (reinsert_all_breakpoints): New.
12684 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12685 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12686 (gdb_agent_ust_loaded, helper_thread_id)
12687 (gdb_agent_helper_thread_id): New macros.
12688 (struct ipa_sym_addresses): Add addr_ust_loaded,
12689 addr_helper_thread_id, addr_cmd_buf.
12690 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12691 (in_process_agent_loaded_ust): New.
12692 (write_e_ust_not_loaded): New.
12693 (maybe_write_ipa_ust_not_loaded): New.
12694 (struct collect_static_trace_data_action): New.
12695 (enum tracepoint_type) <static_tracepoint>: New.
12696 (struct tracepoint) <handle>: Mention static tracepoints.
12697 (struct static_tracepoint_ctx): New.
12698 (CMD_BUF_SIZE): New.
12699 (add_tracepoint_action): Handle static tracepoint actions.
12700 (unprobe_marker_at): New.
12701 (clear_installed_tracepoints): Handle static tracepoints.
12702 (cmd_qtdp): Handle static tracepoints.
12703 (probe_marker_at): New.
12704 (cmd_qtstart): Handle static tracepoints.
12705 (response_tracepoint): Handle static tracepoints.
12706 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12707 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12708 (get_context_regcache): Handle static tracepoints.
12709 (do_action_at_tracepoint): Handle static tracepoint actions.
12710 (traceframe_find_block_type): Handle static trace data blocks.
12711 (traceframe_read_sdata): New.
12712 (download_tracepoints): Download static tracepoint actions.
12713 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12714 (GDB_PROBE_NAME): New.
12715 (ust_ops): New.
12716 (GET_UST_SYM): New.
12717 (USTF): New.
12718 (dlsym_ust): New.
12719 (ust_marker_to_static_tracepoint): New.
12720 (gdb_probe): New.
12721 (collect_ust_data_at_tracepoint): New.
12722 (gdb_ust_probe): New.
12723 (UNIX_PATH_MAX, SOCK_DIR): New.
12724 (gdb_ust_connect_sync_socket): New.
12725 (resume_thread, stop_thread): New.
12726 (run_inferior_command): New.
12727 (init_named_socket): New.
12728 (gdb_ust_socket_init): New.
12729 (cstr_to_hexstr): New.
12730 (next_st): New.
12731 (first_marker, next_marker): New.
12732 (response_ust_marker): New.
12733 (cmd_qtfstm, cmd_qtsstm): New.
12734 (unprobe_marker_at, probe_marker_at): New.
12735 (cmd_qtstmat, gdb_ust_thread): New.
12736 (gdb_ust_init): New.
12737 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12738 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12739 (ST_REGENTRY): New.
12740 (x86_64_st_collect_regmap): New.
12741 (X86_64_NUM_ST_COLLECT_GREGS): New.
12742 (AMD64_RIP_REGNUM): New.
12743 (supply_static_tracepoint_registers): New.
12744 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12745 (ST_REGENTRY): New.
12746 (i386_st_collect_regmap): New.
12747 (i386_NUM_ST_COLLECT_GREGS): New.
12748 (supply_static_tracepoint_registers): New.
12749 * server.c (handle_query): Handle qXfer:statictrace:read.
12750 <qSupported>: Report support for StaticTracepoints, and
12751 qXfer:statictrace:read features.
12752 * server.h (traceframe_read_sdata)
12753 (supply_static_tracepoint_registers): Declare.
12754 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12755 (unpack_varlen_hex): Include in IPA build.
12756 * Makefile.in (ustlibs, ustinc): New.
12757 (IPA_OBJS): Add remote-utils-ipa.o.
12758 ($(IPA_LIB)): Link -ldl and -lpthread.
12759 (UST_CFLAGS): New.
12760 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12761 * config.in, configure: Regenerate.
12762
9e4344e5
PA
127632010-06-20 Ian Lance Taylor <iant@google.com>
12764 Pedro Alves <pedro@codesourcery.com>
12765
12766 * linux-x86-low.c (always_true): Delete.
12767 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12768 trying to fool the compiler with always_true.
12769
c6beb2cb
PA
127702010-06-20 Pedro Alves <pedro@codesourcery.com>
12771
12772 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12773 conditions in gdbserver.
12774
d2ed6730
UW
127752010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12776
12777 * spu-low.c (spu_read_memory): Wrap around local store limit.
12778 (spu_write_memory): Likewise.
12779
4e29fb54
PA
127802010-06-15 Pedro Alves <pedro@codesourcery.com>
12781
12782 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12783 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12784 LONGEST uses.
12785 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12786 uses.
12787 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12788 uses with LONGEST uses.
12789
6a271cae
PA
127902010-06-14 Stan Shebs <stan@codesourcery.com>
12791 Pedro Alves <pedro@codesourcery.com>
12792
12793 Bytecode compiler.
12794
12795 * linux-x86-low.c: Include limits.h.
12796 (add_insns): New.
12797 (always_true): New.
12798 (EMIT_ASM): New.
12799 (EMIT_ASM32): New.
12800 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12801 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12802 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12803 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12804 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12805 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12806 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12807 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12808 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12809 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12810 (amd64_emit_void_call_2): New.
12811 (amd64_emit_ops): New.
12812 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12813 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12814 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12815 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12816 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12817 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12818 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12819 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12820 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12821 (i386_emit_stack_adjust, i386_emit_int_call_1)
12822 (i386_emit_void_call_2): New.
12823 (i386_emit_ops): New.
12824 (x86_emit_ops): New.
12825 (the_low_target): Install x86_emit_ops.
12826 * server.h (struct emit_ops): New.
12827 (get_raw_reg_func_addr): Declare.
12828 (current_insn_ptr, emit_error): Declare.
12829 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12830 (set_trace_state_variable_value): New defines.
12831 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12832 addr_get_trace_state_variable_value and
12833 addr_set_trace_state_variable_value.
12834 (symbol_list): New fields for get_raw_reg,
12835 get_trace_state_variable_value and set_trace_state_variable_value.
12836 (condfn): New typedef.
12837 (struct tracepoint): New field `compiled_cond'.
12838 (do_action_at_tracepoint): Clear compiled_cond.
12839 (get_trace_state_variable_value, set_trace_state_variable_value):
12840 Export in the IPA.
12841 (condition_true_at_tracepoint): If there's a compiled condition,
12842 run that.
12843 (current_insn_ptr, emit_error): New globals.
12844 (struct bytecode_address): New.
12845 (get_raw_reg_func_addr): New.
12846 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12847 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12848 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12849 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12850 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12851 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12852 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12853 (compile_tracepoint_condition, compile_bytecodes): New.
12854 * target.h (emit_ops): Forward declare.
12855 (struct target_ops): New field emit_ops.
12856 (target_emit_ops): New.
12857 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12858 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12859 * linux-low.c (linux_emit_ops): New.
12860 (linux_target_ops): Install it.
12861 * linux-low.h (struct linux_target_ops): New field emit_ops.
12862
92b72907
UW
128632010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12864
12865 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12866 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12867
fa593d66
PA
128682010-06-01 Pedro Alves <pedro@codesourcery.com>
12869 Stan Shebs <stan@codesourcery.com>
12870
12871 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12872 (all): Depend on $(extra_libraries).
12873 (install-only): Install the IPA.
12874 (IPA_OBJS, IPA_LIB): New.
12875 (clean): Remove the IPA lib.
12876 (IPAGENT_CFLAGS): New.
12877 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12878 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12879 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12880 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12881 * configure.ac: Check for atomic builtins support in the compiler.
12882 (IPA_DEPFILES, extra_libraries): Define.
12883 * configure.srv (ipa_obj): Add description.
12884 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12885 (i[34567]86-*-linux*): Set ipa_obj.
12886 (x86_64-*-linux*): Set ipa_obj.
12887 * linux-low.c (stabilizing_threads): New.
12888 (supports_fast_tracepoints): New.
12889 (linux_detach): Stabilize threads before detaching.
12890 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12891 the lwp is either not stabilizing, or is moving out of a jump pad.
12892 (linux_fast_tracepoint_collecting): New.
12893 (maybe_move_out_of_jump_pad): New.
12894 (enqueue_one_deferred_signal): New.
12895 (dequeue_one_deferred_signal): New.
12896 (linux_wait_for_event_1): If moving out of a jump pad, defer
12897 pending signals to later.
12898 (linux_stabilize_threads): New.
12899 (linux_wait_1): Check if threads need moving out of jump pads, and
12900 do it if so.
12901 (stuck_in_jump_pad_callback): New.
12902 (move_out_of_jump_pad_callback): New.
12903 (lwp_running): New.
12904 (linux_resume_one_lwp): Handle moving out of jump pads.
12905 (linux_set_resume_request): Dequeue deferred signals.
12906 (need_step_over_p): Also step over fast tracepoint jumps.
12907 (start_step_over): Also uninsert fast tracepoint jumps.
12908 (finish_step_over): Also reinsert fast tracepoint jumps.
12909 (linux_install_fast_tracepoint_jump): New.
12910 (linux_target_ops): Install linux_stabilize_threads and
12911 linux_install_fast_tracepoint_jump_pad.
12912 * linux-low.h (linux_target_ops) <get_thread_area,
12913 install_fast_tracepoint_jump_pad>: New fields.
12914 (struct lwp_info) <collecting_fast_tracepoint,
12915 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12916 (linux_get_thread_area): Declare.
12917 * linux-x86-low.c (jump_insn): New.
12918 (x86_get_thread_area): New.
12919 (append_insns): New.
12920 (push_opcode): New.
12921 (amd64_install_fast_tracepoint_jump_pad): New.
12922 (i386_install_fast_tracepoint_jump_pad): New.
12923 (x86_install_fast_tracepoint_jump_pad): New.
12924 (the_low_target): Install x86_get_thread_area and
12925 x86_install_fast_tracepoint_jump_pad.
12926 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12927 (struct fast_tracepoint_jump): New.
12928 (fast_tracepoint_jump_insn): New.
12929 (fast_tracepoint_jump_shadow): New.
12930 (find_fast_tracepoint_jump_at): New.
12931 (fast_tracepoint_jump_here): New.
12932 (delete_fast_tracepoint_jump): New.
12933 (set_fast_tracepoint_jump): New.
12934 (uninsert_fast_tracepoint_jumps_at): New.
12935 (reinsert_fast_tracepoint_jumps_at): New.
12936 (set_breakpoint_at): Use write_inferior_memory.
12937 (uninsert_raw_breakpoint): Use write_inferior_memory.
12938 (check_mem_read): Mask out fast tracepoint jumps.
12939 (check_mem_write): Mask out fast tracepoint jumps.
12940 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12941 (set_fast_tracepoint_jump): Declare.
12942 (delete_fast_tracepoint_jump)
12943 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12944 (reinsert_fast_tracepoint_jumps_at): Declare.
12945 * regcache.c: Don't compile many functions when building the
12946 in-process agent library.
12947 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12948 the register buffer in the heap.
12949 (free_register_cache): If the register buffer isn't owned by the
12950 regcache, don't free it.
12951 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12952 pre-existing register caches.
12953 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12954 type.
12955 (convert_ascii_to_int): : Constify `from' parameter type.
12956 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12957 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12958 the needed buffer in-place.
12959 (relocate_instruction): New.
12960 * server.c (handle_query) <qSymbols>: If the target supports
12961 tracepoints, give it a chance of looking up symbols. Report
12962 support for fast tracepoints.
12963 (handle_status): Stabilize threads.
12964 (process_serial_event): Adjust.
12965 * server.h (struct fast_tracepoint_jump): Forward declare.
12966 (struct process_info) <fast_tracepoint_jumps>: New field.
12967 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12968 (decode_X_packet, decode_M_packet): Adjust.
12969 (relocate_instruction): Declare.
12970 (in_process_agent_loaded): Declare.
12971 (tracepoint_look_up_symbols): Declare.
12972 (struct fast_tpoint_collect_status): Declare.
12973 (fast_tracepoint_collecting): Declare.
12974 (force_unlock_trace_buffer): Declare.
12975 (handle_tracepoint_bkpts): Declare.
12976 (initialize_low_tracepoint)
12977 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12978 * target.h (struct target_ops) <stabilize_threads,
12979 install_fast_tracepoint_jump_pad>: New fields.
12980 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12981 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12982 [HAVE_STDINT_H]: Include stdint.h.
12983 (trace_debug_1): Rename to ...
12984 (trace_vdebug): ... this.
12985 (trace_debug): Rename to ...
12986 (trace_debug_1): ... this. Add `level' parameter.
12987 (trace_debug): New.
12988 (ATTR_USED, ATTR_NOINLINE): New.
12989 (IP_AGENT_EXPORT): New.
12990 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12991 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12992 (about_to_request_buffer_space, trace_buffer_is_full)
12993 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12994 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12995 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12996 (traceframe_write_count, traceframes_created)
12997 (trace_state_variables)
12998 New renaming defines.
12999 (struct ipa_sym_addresses): New.
13000 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13001 (symbol_list): New.
13002 (ipa_sym_addrs): New.
13003 (all_tracepoint_symbols_looked_up): New.
13004 (in_process_agent_loaded): New.
13005 (write_e_ipa_not_loaded): New.
13006 (maybe_write_ipa_not_loaded): New.
13007 (tracepoint_look_up_symbols): New.
13008 (debug_threads) [IN_PROCESS_AGENT]: New.
13009 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13010 (UNKNOWN_SIDE_EFFECTS): New.
13011 (stop_tracing): New.
13012 (flush_trace_buffer): New.
13013 (stop_tracing_bkpt): New.
13014 (flush_trace_buffer_bkpt): New.
13015 (read_inferior_integer): New.
13016 (read_inferior_uinteger): New.
13017 (read_inferior_data_pointer): New.
13018 (write_inferior_data_pointer): New.
13019 (write_inferior_integer): New.
13020 (write_inferior_uinteger): New.
13021 (struct collect_static_trace_data_action): Delete.
13022 (enum tracepoint_type): New.
13023 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13024 <actions_str, step_actions, step_actions_str>: Only include in
13025 GDBserver.
fa593d66
PA
13026 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13027 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13028 (tracepoints): Use IP_AGENT_EXPORT.
13029 (last_tracepoint): Don't include in the IPA.
13030 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13031 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13032 (alloced_trace_state_variables): New.
13033 (trace_state_variables): Use IP_AGENT_EXPORT.
13034 (traceframe_t): Delete unused variable.
13035 (circular_trace_buffer): Don't include in the IPA.
13036 (trace_buffer_start): Delete.
13037 (struct trace_buffer_control): New.
13038 (trace_buffer_free): Delete.
13039 (struct ipa_trace_buffer_control): New.
13040 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13041 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13042 New.
13043 (trace_buffer_ctrl): New.
13044 (TRACE_BUFFER_CTRL_CURR): New.
13045 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13046 Reimplement as macros.
13047 (trace_buffer_wrap): Delete.
13048 (traceframe_write_count, traceframe_read_count)
13049 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13050 (struct tracepoint_hit_ctx) <type>: New field.
13051 (struct fast_tracepoint_ctx): New.
13052 (memory_barrier): New.
13053 (cmpxchg): New.
13054 (record_tracepoint_error): Update atomically in the IPA.
13055 (clear_inferior_trace_buffer): New.
13056 (about_to_request_buffer_space): New.
13057 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13058 updating the same buffer.
13059 (add_tracepoint): Default the tracepoint's type to trap
13060 tracepoint, and orig_size to -1.
13061 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13062 internal variables.
13063 (create_trace_state_variable): New parameter `gdb'. Handle it.
13064 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13065 (cmd_qtdp): Handle fast tracepoints.
13066 (cmd_qtdv): Adjust.
13067 (max_jump_pad_size): New.
13068 (gdb_jump_pad_head): New.
13069 (get_jump_space_head): New.
13070 (claim_jump_space): New.
13071 (sort_tracepoints): New.
13072 (MAX_JUMP_SIZE): New.
13073 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13074 IPA.
13075 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13076 support. Upload fast traceframes, and delete internal IPA
13077 breakpoints.
13078 (stop_tracing_handler): New.
13079 (flush_trace_buffer_handler): New.
13080 (cmd_qtstop): Upload fast tracepoints.
13081 (response_tracepoint): Handle fast tracepoints.
13082 (tracepoint_finished_step): Upload fast traceframes. Set the
13083 tracepoint hit context's tracepoint type.
13084 (handle_tracepoint_bkpts): New.
13085 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13086 type. Add comment about fast tracepoints.
13087 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13088 non-existing action_str field.
13089 (get_context_regcache): Handle fast tracepoints.
13090 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13091 to the regcache.
13092 (fast_tracepoint_from_jump_pad_address): New.
13093 (fast_tracepoint_from_ipa_tpoint_address): New.
13094 (collecting_t): New.
13095 (force_unlock_trace_buffer): New.
13096 (fast_tracepoint_collecting): New.
13097 (collecting): New.
13098 (gdb_collect): New.
13099 (write_inferior_data_ptr): New.
13100 (target_tp_heap): New.
13101 (target_malloc): New.
13102 (download_agent_expr): New.
13103 (UALIGN): New.
13104 (download_tracepoints): New.
13105 (download_trace_state_variables): New.
13106 (upload_fast_traceframes): New.
13107 (IPA_FIRST_TRACEFRAME): New.
13108 (IPA_NEXT_TRACEFRAME_1): New.
13109 (IPA_NEXT_TRACEFRAME): New.
13110 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13111 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13112 (gdb_jump_pad_buffer_end): New.
13113 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13114 (initialize_tracepoint): Adjust.
13115 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13116 buffer. Initialize the low module.
13117 * utils.c (PREFIX, TOOLNAME): New.
13118 (malloc_failure): Use PREFIX.
13119 (error): In the IPA, an error causes an exit.
13120 (fatal, warning): Use PREFIX.
13121 (internal_error): Use TOOLNAME.
13122 (NUMCELLS): Increase to 10.
13123 * configure, config.in: Regenerate.
13124
d149dd1d
PA
131252010-06-01 Pedro Alves <pedro@codesourcery.com>
13126
13127 * server.c (handle_query) <qSupported>: Do two passes over the
13128 qSupported string to avoid nesting strtok.
13129
f6528abd
JK
131302010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13131
13132 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13133 (CDEPS): New.
13134 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13135 -Wl,--dynamic-list.
13136 * configure: Regenerate.
13137 * proc-service.list: New.
13138
ca2a87a0
JK
131392010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13140
13141 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13142 New comment.
13143
363a6e9f
OS
131442010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13145
13146 * gdbreplay.c (remote_open): Check error return from socket() call by
13147 its equality to -1 not by it being negative.
13148 * remote-utils.c (remote_open): Likewise.
13149
d23b6cb1
PA
131502010-05-23 Pedro Alves <pedro@codesourcery.com>
13151
13152 * config.h: Regenerate.
13153
28d3cf85
MK
131542010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13155
13156 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13157 doesn't provide PTRACE_GET_THREAD_AREA.
13158
fea36a59
MK
131592010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13160
13161 * linux-m68k-low.c: Include <asm/ptrace.h>
13162 (ps_get_thread_area): Implement.
13163
24b066ba
DE
131642010-05-03 Doug Evans <dje@google.com>
13165
13166 * event-loop.c (struct callback_event): New struct.
13167 (callback_list): New global.
13168 (append_callback_event, delete_callback_event): New functions.
13169 (process_callback): New function.
13170 (start_event_loop): Call it.
13171 * remote-utils.c (NOT_SCHEDULED): Define.
13172 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13173 moved out of readchar.
13174 (readchar): Rewrite. Call reschedule before returning.
13175 (reset_readchar): New function.
13176 (remote_close): Call it.
13177 (process_remaining, reschedule): New functions.
13178 * server.h (callback_handler_func): New typedef.
13179 (append_callback_event, delete_callback_event): Declare.
13180
9836d6ea
PA
131812010-05-03 Pedro Alves <pedro@codesourcery.com>
13182
13183 * proc-service.c (ps_pglobal_lookup): Use
13184 thread_db_look_up_one_symbol.
13185 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13186 parameter. Use it instead of all_symbols_looked_up.
13187 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13188 field.
13189 (all_symbols_looked_up): Don't declare.
13190 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13191 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13192 field.
13193 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13194 Set all_symbols_looked_up here.
13195 (thread_db_look_up_one_symbol): New.
13196 (thread_db_get_tls_address): Adjust.
13197 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13198 thread_db object on the heap, and tentatively set it in the
13199 process structure.
13200 (thread_db_init): Don't set all_symbols_looked_up here.
13201 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13202
7984d532
PA
132032010-05-03 Pedro Alves <pedro@codesourcery.com>
13204
13205 * linux-low.c (linux_kill, linux_detach): Adjust.
13206 (status_pending_p_callback): Remove redundant statement. Check
13207 for !TARGET_WAITIKIND_IGNORE, instead of
13208 TARGET_WAITKIND_STOPPED.
13209 (handle_tracepoints): Make sure LWP is locked. Adjust.
13210 (linux_wait_for_event_1): Adjust.
13211 (linux_cancel_breakpoints): New.
13212 (unsuspend_one_lwp): New.
13213 (unsuspend_all_lwps): New.
13214 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13215 (send_sigstop_callback): Change return type to int, add new
13216 `except' parameter and handle it.
13217 (suspend_and_send_sigstop_callback): New.
13218 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13219 pass them down. If SUSPEND, also increment the lwp's suspend
13220 count.
13221 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13222 (need_step_over_p): Don't consider suspended LWPs.
13223 (start_step_over): Adjust.
13224 (proceed_one_lwp): Change return type to int, add new `except'
13225 parameter and handle it.
13226 (unsuspend_and_proceed_one_lwp): New.
13227 (proceed_all_lwps): Use find_inferior instead of
13228 for_each_inferior.
13229 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13230 also decrement the suspend count of LWPs. Pass `except' down,
13231 instead of hacking its suspend count.
13232 (linux_pause_all): Add `freeze' parameter. Adjust.
13233 (linux_unpause_all): New.
13234 (linux_target_ops): Install linux_unpause_all.
13235 * server.c (handle_status): Adjust.
13236 * target.h (struct target_ops): New fields `unpause_all' and
13237 `cancel_breakpoints'. Add new parameter to `pause_all'.
13238 (pause_all): Add new `freeze' parameter.
13239 (unpause_all): New.
13240 (cancel_breakpoints): New.
13241 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13242 cancel breakpoints.
13243 (cmd_qtstart): Pause threads.
13244 (stop_tracing): Pause threads, and cancel breakpoints.
13245 * win32-low.c (win32_target_ops): Adjust.
13246
e471f25b
PA
132472010-05-03 Pedro Alves <pedro@codesourcery.com>
13248
13249 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13250 the inferior right away from here...
13251 (linux_wait_1): ... to here, and adjust to check the thread's
13252 last_resume_kind instead of the lwp's step or stop_expected flags.
13253
1915ef4f
PA
132542010-05-02 Pedro Alves <pedro@codesourcery.com>
13255
13256 * README: Use consistent `GDB' and `GDBserver' spellings.
13257
f9e39928
PA
132582010-05-02 Pedro Alves <pedro@codesourcery.com>
13259
13260 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13261 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13262 (linux_detach_one_lwp): Assume the lwp is stopped.
13263 (any_thread_of): Delete.
13264 (linux_detach): Stop all lwps here. Don't blindly delete all
13265 breakpoints.
13266 (delete_lwp_callback): New.
13267 (linux_mourn): Delete all lwps of the process that is gone.
13268 (linux_wait_1): Don't delete the last lwp of the process here.
13269 * mem-break.h (mark_breakpoints_out): Declare.
13270 * mem-break.c (mark_breakpoints_out): New.
13271 (free_all_breakpoints): Use it.
13272 * server.c (handle_target_event): If the process is gone, mark
13273 breakpoints out.
13274 * thread-db.c (struct thread_db) <create_bp>: New field.
13275 (thread_db_enable_reporting): Fix prototype. Store a thread event
13276 breakpoint reference in the thread_db struct.
13277 (thread_db_load_search): Clear the thread_db object.
13278 (try_thread_db_load_1): Ditto.
13279 (switch_to_process): New.
13280 (disable_thread_event_reporting): Use it.
13281 (remove_thread_event_breakpoints): New.
13282 (thread_db_detach, thread_db_mourn): Use it.
13283
1e7fc18c
PA
132842010-05-01 Pedro Alves <pedro@codesourcery.com>
13285
13286 * linux-low.c (linux_enable_event_reporting): New.
13287 (linux_wait_for_event_1, handle_extended_wait): Use it.
13288
02fc4de7
PA
132892010-04-30 Pedro Alves <pedro@codesourcery.com>
13290
13291 * linux-low.c (linux_kill_one_lwp, linux_kill)
13292 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13293 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13294 SIGSTOP even if the LWP is stopped.
13295 (send_sigstop_callback): New.
13296 (stop_all_lwps): Use send_sigstop_callback instead.
13297 (linux_resume_one_thread): Adjust.
13298 (proceed_one_lwp): Still proceed an LWP that the client has
13299 requested to stop, if we haven't reported it as stopped yet. Make
13300 sure that LWPs the client want stopped, have a pending SIGSTOP.
13301
bc3b5632
DE
133022010-04-26 Doug Evans <dje@google.com>
13303
ae1ada35
DE
13304 * server.c (handle_general_set): Make static.
13305
bc3b5632
DE
13306 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13307 Print received char after testing for error/eof instead of before.
13308 (input_interrupt): Tweak comment.
13309
65730243
DE
133102010-04-23 Doug Evans <dje@google.com>
13311
13312 * server.c (start_inferior): Print inferior argv if --debug.
13313
a8ae7dc0
AR
133142010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13315
13316 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13317 * nto-x86-low.c: Include server.h
13318
1c07cc19
PM
133192010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13320
13321 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13322 be consistent with other sources of this directory.
13323 (init_registers_amd64): Correct name of source file of this function
13324 in the comment.
13325
e0a61e09
PM
133262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13327
13328 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13329 64-bit executables.
13330
54709339
PM
133312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13332
13333 * win32-i386-low.c: Add 64-bit support.
13334 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13335 (init_registers_amd64): Declare.
13336 (mappings): Add 64-bit version of array.
13337 (init_windows_x86): New function.
13338 (the_low_target): Change init_arch field to init_windows_x86.
13339
e8f0053d
PM
133402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13341
13342 * win32-low.c: Adapt to support also 64-bit architecture.
13343 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13344 (get_image_name): Use SIZE_T type for local variable `done'.
13345 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13346 (toolhelp_get_dll_name): Idem.
13347 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13348 Use uintptr_t typecast to avoid warning.
13349 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13350 (handle_exception): Use phex_nz to avoid warning.
13351 (win32_wait): Remove unused local variable `process'.
13352
c481e77e
PM
133532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13354
13355 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13356 `amd64-avx.o'.
13357
12ea4b69
PM
133582010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13359
13360 * configure.ac: Use `ws2_32' library for srv_mingw.
13361 * configure: Regenerate.
13362 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13363 * remote-utils.c: Likewise.
13364
f6d1620c
L
133652010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13366
13367 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13368 if __x86_64__ is defined.
13369
8e642873
PM
133702010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13371
13372 * configure: Regenerate.
13373
711e434b
PM
133742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13375
13376 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13377 * target.h (target_ops): New get_tib_address field.
13378 * win32-low.h (win32_thread_info): Add thread_local_base field.
13379 * win32-low.c (child_add_thread): Add tlb argument.
13380 Set thread_local_base field to TLB.
13381 (get_child_debug_event): Adapt to child_add_thread change.
13382 (win32_get_tib_address): New function.
13383 (win32_target_ops): Set get_tib_address field to
13384 win32_get_tib_address.
13385 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13386
505106cd
PA
133872010-04-12 Pedro Alves <pedro@codesourcery.com>
13388
505106cd
PA
13389 * linux-low.c (linux_mourn): Also remove the process.
13390 * server.c (handle_target_event): Don't remove the process here.
13391 * nto-low.c (nto_mourn): New.
13392 (nto_target_ops): Install it.
13393 * spu-low.c (spu_mourn): New.
13394 (spu_target_ops): Install it.
13395 * win32-low.c (win32_mourn): New.
13396 (win32_target_ops): Install it.
13397
e8470a06
PA
133982010-04-12 Pedro Alves <pedro@codesourcery.com>
13399
13400 * server.h (buffer_xml_printf): Remove redundant `;'.
13401
45ba0d02
PA
134022010-04-12 Pedro Alves <pedro@codesourcery.com>
13403
13404 * regcache.c (set_register_cache): Invalidate regcaches before
13405 changing the register cache layout.
13406 (regcache_invalidate_one): Allow a NULL regcache.
13407 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13408 regcaches before changing the register cache layout or the target
13409 regsets.
13410
59e04013
L
134112010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13412
13413 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13414 variable warning on Linux/x86-64.
13415
8336d594
PA
134162010-04-11 Pedro Alves <pedro@codesourcery.com>
13417
13418 GDBserver disconnected tracing support.
13419
13420 * linux-low.c (linux_remove_process): Delete.
13421 (add_lwp): Don't set last_resume_kind here.
13422 (linux_kill): Use `mourn'.
13423 (linux_detach): Use `thread_db_detach', and `mourn'.
13424 (linux_mourn): New.
13425 (linux_attach_lwp_1): Adjust comment.
13426 (linux_attach): last_resume_kind moved the thread_info; adjust.
13427 (status_pending_p_callback): Adjust.
13428 (linux_wait_for_event_1): Adjust.
13429 (count_events_callback, select_singlestep_lwp_callback)
13430 (select_event_lwp_callback, cancel_breakpoints_callback)
13431 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13432 (proceed_one_lwp): Adjust.
13433 (linux_async): Add debug output.
13434 (linux_thread_stopped): New.
13435 (linux_pause_all): New.
13436 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13437 linux_pause_all.
13438 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13439 (thread_db_free): Delete declaration.
13440 (thread_db_detach, thread_db_mourn): Declare.
13441 * thread-db.c (thread_db_init): Use thread_db_mourn.
13442 (thread_db_free): Delete, split in two.
13443 (disable_thread_event_reporting): New.
13444 (thread_db_detach): New.
13445 (thread_db_mourn): New.
13446
13447 * server.h (struct thread_info) <last_resume_kind>: New field.
13448 <attached>: Add comment.
13449 <gdb_detached>: New field.
13450 (handler_func): Change return type to int.
13451 (handle_serial_event, handle_target_event): Ditto.
13452 (gdb_connected): Declare.
13453 (tracing): Delete.
13454 (disconnected_tracing): Declare.
13455 (stop_tracing): Declare.
13456
13457 * server.c (handle_query) <qSupported>: Report support for
13458 disconnected tracing.
13459 (queue_stop_reply_callback): Account for running threads.
13460 (gdb_wants_thread_stopped): New.
13461 (gdb_wants_all_threads_stopped): New.
13462 (gdb_reattached_process): New.
13463 (handle_status): Clear the `gdb_detached' flag of all processes.
13464 In all-stop, stop all threads.
13465 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13466 (process_serial_event): If the remote connection breaks, or if an
13467 exit was forced with "monitor exit", force an event loop exit.
13468 Handle disconnected tracing on detach.
13469 (handle_serial_event): Adjust.
13470 (handle_target_event): If GDB isn't connected, forward events back
13471 to the inferior, unless the last process exited, in which case,
13472 exit gdbserver. Adjust interface.
13473
13474 * remote-utils.c (remote_open): Don't block in accept. Instead
13475 register an event loop source on the listen socket file
13476 descriptor. Refactor bits into ...
13477 (listen_desc): ... this new global.
13478 (gdb_connected): ... this new function.
13479 (enable_async_notification): ... this new function.
13480 (handle_accept_event): ... this new function.
13481 (remote_close): Clear remote_desc.
13482
13483 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13484
13485 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13486 New fields.
13487 (mourn_inferior): Define.
13488 (target_process_qsupported): Avoid the dangling else problem.
13489 (thread_stopped): Define.
13490 (pause_all): Define.
13491 (target_waitstatus_to_string): Declare.
13492 * target.c (target_waitstatus_to_string): New.
13493
13494 * tracepoint.c (tracing): Make extern.
13495 (disconnected_tracing): New.
13496 (stop_tracing): Make extern. Handle tracing stops due to GDB
13497 disconnecting.
13498 (cmd_qtdisconnected): New.
13499 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13500 (handle_tracepoint_general_set): Handle QTDisconnected.
13501
13502 * event-loop.c (event_handler_func): Change return type to int.
13503 (process_event): Bail out if the event handler wants the event
13504 loop to stop.
13505 (handle_file_event): Ditto.
13506 (start_event_loop): Bail out if the event handler wants the event
13507 loop to stop.
13508
13509 * nto-low.c (nto_target_ops): Adjust.
13510 * spu-low.c (spu_wait): Don't remove the process here.
13511 (spu_target_ops): Adjust.
13512 * win32-low.c (win32_wait): Don't remove the process here.
13513 (win32_target_ops): Adjust.
13514
5d267c4c
PA
135152010-04-11 Pedro Alves <pedro@codesourcery.com>
13516
13517 * regcache.c (realloc_register_cache): Invalidate inferior's
13518 regcache before recreating it.
13519
623ccd72
PA
135202010-04-09 Pedro Alves <pedro@codesourcery.com>
13521
13522 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13523
219f2f23
PA
135242010-04-09 Stan Shebs <stan@codesourcery.com>
13525 Pedro Alves <pedro@codesourcery.com>
13526
13527 * server.h (LONGEST): New.
13528 (struct thread_info) <while_stepping>: New field.
13529 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13530 Declare.
13531 (initialize_tracepoint, handle_tracepoint_general_set)
13532 (handle_tracepoint_query, tracepoint_finished_step)
13533 (tracepoint_was_hit, release_while_stepping_state_list):
13534 (current_traceframe): Declare.
13535 * server.c (handle_general_set): Handle tracepoint packets.
13536 (read_memory): New.
13537 (write_memory): New.
13538 (handle_search_memory_1): Use read_memory.
13539 (handle_query): Report support for conditional tracepoints, trace
13540 state variables, and tracepoint sources. Handle tracepoint
13541 queries.
13542 (main): Initialize the tracepoints module.
13543 (process_serial_event): Handle traceframe reads/writes.
13544
13545 * linux-low.c (handle_tracepoints): New.
13546 (linux_wait_1): Call it.
13547 (linux_resume_one_lwp): Handle while-stepping.
13548 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13549 (linux_target_ops): Install them.
13550 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13551 New field.
13552 * linux-x86-low.c (x86_supports_tracepoints): New.
13553 (the_low_target). Install it.
13554
13555 * mem-break.h (delete_breakpoint): Declare.
13556 * mem-break.c (delete_breakpoint): Make external.
13557
13558 * target.h (struct target_ops): Add `supports_tracepoints',
13559 `read_pc', and `write_pc' fields.
13560 (target_supports_tracepoints): Define.
13561 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13562 (phex_nz): New.
13563
13564 * regcache.h (struct regcache) <registers_owned>: New field.
13565 (init_register_cache, regcache_cpy): Declare.
13566 (regcache_read_pc, regcache_write_pc): Declare.
13567 (register_cache_size): Declare.
13568 (supply_regblock): Declare.
13569 * regcache.c (init_register_cache): New.
13570 (new_register_cache): Use it.
13571 (regcache_cpy): New.
13572 (register_cache_size): New.
13573 (supply_regblock): New.
13574 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13575
219f2f23
PA
13576 * tracepoint.c: New.
13577
13578 * Makefile.in (OBS): Add tracepoint.o.
13579 (tracepoint.o): New rule.
13580
3a13a53b
L
135812010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13582
13583 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13584 (i386-mmx.o): New.
13585 (i386-mmx.c): Likewise.
13586 (i386-mmx-linux.o): Likewise.
13587 (i386-mmx-linux.c): Likewise.
13588
13589 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13590 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13591 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13592 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13593
13594 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13595 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13596 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13597
1570b33e
L
135982010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13599
13600 * Makefile.in (clean): Updated.
13601 (i386-avx.o): New.
13602 (i386-avx.c): Likewise.
13603 (i386-avx-linux.o): Likewise.
13604 (i386-avx-linux.c): Likewise.
13605 (amd64-avx.o): Likewise.
13606 (amd64-avx.c): Likewise.
13607 (amd64-avx-linux.o): Likewise.
13608 (amd64-avx-linux.c): Likewise.
13609
13610 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13611 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13612 (srv_amd64_regobj): Add amd64-avx.o.
13613 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13614 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13615 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13616 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13617 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13618 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13619 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13620
13621 * i387-fp.c: Include "i386-xstate.h".
13622 (i387_xsave): New.
13623 (i387_cache_to_xsave): Likewise.
13624 (i387_xsave_to_cache): Likewise.
13625 (x86_xcr0): Likewise.
13626
13627 * i387-fp.h (i387_cache_to_xsave): Likewise.
13628 (i387_xsave_to_cache): Likewise.
13629 (x86_xcr0): Likewise.
13630
13631 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13632 * linux-crisv32-low.c (target_regsets): Likewise.
13633 * linux-m68k-low.c (target_regsets): Likewise.
13634 * linux-mips-low.c (target_regsets): Likewise.
13635 * linux-ppc-low.c (target_regsets): Likewise.
13636 * linux-s390-low.c (target_regsets): Likewise.
13637 * linux-sh-low.c (target_regsets): Likewise.
13638 * linux-sparc-low.c (target_regsets): Likewise.
13639 * linux-xtensa-low.c (target_regsets): Likewise.
13640
13641 * linux-low.c: Include <sys/uio.h>.
13642 (regsets_fetch_inferior_registers): Support nt_type.
13643 (regsets_store_inferior_registers): Likewise.
13644 (linux_process_qsupported): New.
13645 (linux_target_ops): Add linux_process_qsupported.
13646
13647 * linux-low.h (regset_info): Add nt_type.
13648 (linux_target_ops): Add process_qsupported.
13649
13650 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13651 and <sys/uio.h>.
13652 (init_registers_i386_avx_linux): New.
13653 (init_registers_amd64_avx_linux): Likewise.
13654 (xmltarget_i386_linux_no_xml): Likewise.
13655 (xmltarget_amd64_linux_no_xml): Likewise.
13656 (PTRACE_GETREGSET): Likewise.
13657 (PTRACE_SETREGSET): Likewise.
13658 (x86_fill_xstateregset): Likewise.
13659 (x86_store_xstateregset): Likewise.
13660 (use_xml): Likewise.
13661 (x86_linux_update_xmltarget): Likewise.
13662 (x86_linux_process_qsupported): Likewise.
13663 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13664 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13665 init_registers_i386_linux here. Call
13666 x86_linux_update_xmltarget.
13667 (the_low_target): Add x86_linux_process_qsupported.
13668
13669 * server.c (handle_query): Call target_process_qsupported.
13670
13671 * target.h (target_ops): Add process_qsupported.
13672 (target_process_qsupported): New.
13673
fc7238bb
PA
136742010-04-03 Pedro Alves <pedro@codesourcery.com>
13675
13676 * inferiors.c (add_thread): Set last_status kind to
13677 TARGET_WAITKIND_IGNORE.
13678 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13679 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13680 (linux_wait_1): Move `thread' local definition to block that uses
13681 it. Don't NULL initialize `event_child'.
13682 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13683 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13684 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13685
bdabb078
PA
136862010-04-01 Pedro Alves <pedro@codesourcery.com>
13687
13688 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13689 an extended waitstatus, or by a watchpoint.
13690 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13691 thread was stepping or has been stopped by a watchpoint.
13692
d3bbe7a0
PA
136932010-04-01 Pedro Alves <pedro@codesourcery.com>
13694
13695 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13696 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13697 of another, then delete the previous, and validate all
13698 breakpoints.
13699 (validate_inserted_breakpoint): New.
13700 (delete_disabled_breakpoints): New.
13701 (validate_breakpoints): New.
13702 (check_mem_read): Validate breakpoints before trusting their
13703 shadow. Delete disabled breakpoints.
13704 (check_mem_write): Validate breakpoints before trusting they
13705 should be inserted. Delete disabled breakpoints.
13706 * mem-break.h (validate_breakpoints):
13707 * server.c (handle_query): Validate breakpoints when we see a
13708 qSymbol query.
13709
8b07ae33
PA
137102010-04-01 Pedro Alves <pedro@codesourcery.com>
13711
13712 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13713 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13714 if we could tell there's a GDB breakpoint at stop_pc.
13715 (need_step_over_p): Don't do a step over if we find a GDB
13716 breakpoint at the resume PC.
13717
13718 * mem-break.c (struct raw_breakpoint): New.
13719 (enum bkpt_type): New type `gdb_breakpoint'.
13720 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13721 fields. New field `raw'.
13722 (find_raw_breakpoint_at): New.
13723 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13724 breakpoint instead.
13725 (set_breakpoint_at): Adjust.
13726 (delete_raw_breakpoint): New.
13727 (release_breakpoint): New.
13728 (delete_breakpoint): Rename to...
13729 (delete_breakpoint_1): ... this. Add proc parameter. Use
13730 release_breakpoint. Return ENOENT.
13731 (delete_breakpoint): Reimplement.
13732 (find_breakpoint_at): Delete.
13733 (find_gdb_breakpoint_at): New.
13734 (delete_breakpoint_at): Delete.
13735 (set_gdb_breakpoint_at): New.
13736 (delete_gdb_breakpoint_at): New.
13737 (gdb_breakpoint_here): New.
13738 (set_reinsert_breakpoint): Use release_breakpoint.
13739 (uninsert_breakpoint): Rename to ...
13740 (uninsert_raw_breakpoint): ... this.
13741 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13742 (reinsert_raw_breakpoint): Change parameter type to
13743 raw_breakpoint.
13744 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13745 instead.
13746 (check_breakpoints): Adjust. Use release_breakpoint.
13747 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13748 (breakpoint_inserted_here): Ditto.
13749 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13750 Don't trust the breakpoint's shadow if it is not inserted.
13751 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13752 (delete_all_breakpoints): Adjust.
13753 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13754 use delete_breakpoint_1.
13755
13756 * mem-break.h (breakpoints_supported): Delete declaration.
13757 (set_gdb_breakpoint_at): Declare.
13758 (gdb_breakpoint_here): Declare.
13759 (delete_breakpoint_at): Delete.
13760 (delete_gdb_breakpoint_at): Declare.
13761
13762 * server.h (struct raw_breakpoint): Forward declare.
13763 (struct process_info): New field `raw_breakpoints'.
13764
13765 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13766 breakpoints.
13767
6bf5e0ba
PA
137682010-03-24 Pedro Alves <pedro@codesourcery.com>
13769
13770 * linux-low.c (status_pending_p_callback): Fix comment.
13771 (linux_wait_for_event_1): Move most of the internal breakpoint
13772 handling from here...
13773 (linux_wait_1): ... to here.
13774 (count_events_callback): New.
13775 (select_singlestep_lwp_callback): New.
13776 (select_event_lwp_callback): New.
13777 (cancel_breakpoints_callback): New.
13778 (select_event_lwp): New.
13779 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13780 priority to all LWPs that have had events that should be reported
13781 to the client. Cancel breakpoints when about to reporting the
13782 event to the client, not while stopping lwps. No longer cancel
13783 finished single-steps here.
13784 (cancel_finished_single_step): Delete.
13785 (cancel_finished_single_steps): Delete.
13786
414a389f
PA
137872010-03-24 Pedro Alves <pedro@codesourcery.com>
13788
13789 * mem-break.c (enum bkpt_type): New.
13790 (struct breakpoint): New field `type'.
13791 (set_breakpoint_at): Change return type to struct breakpoint
13792 pointer. Set type to `other_breakpoint' by default.
13793 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13794 in the breakpoint list.
13795 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13796 (reinsert_breakpoint): Rename to ...
13797 (reinsert_raw_breakpoint): ... this.
13798 (reinsert_breakpoints_at): Adjust.
13799 * mem-break.h (struct breakpoint): Declare.
13800 (set_breakpoint_at): Change return type to struct breakpoint
13801 pointer.
13802
2280c721
PA
138032010-03-24 Pedro Alves <pedro@codesourcery.com>
13804
13805 * server.c (handle_query): Assign, not compare.
13806
d50171e4
PA
138072010-03-24 Pedro Alves <pedro@codesourcery.com>
13808
13809 Teach linux gdbserver to step-over-breakpoints.
13810
13811 * linux-low.c (can_hardware_single_step): New.
13812 (supports_breakpoints): New.
13813 (handle_extended_wait): If stopping threads, read the stop pc of
13814 the new cloned LWP.
13815 (get_pc): New.
13816 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13817 low target doesn't support retrieving the PC.
13818 (add_lwp): Set last_resume_kind to resume_continue.
13819 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13820 (linux_attach): Don't clear stop_expected. Set the lwp's
13821 last_resume_kind to resume_stop.
13822 (linux_detach_one_lwp): Don't check for removed breakpoints.
13823 (check_removed_breakpoint): Delete.
13824 (status_pending_p): Rename to ...
13825 (status_pending_p_callback): ... this. Don't check for removed
13826 breakpoints. Don't consider threads that are stopped from GDB's
13827 perspective.
13828 (linux_wait_for_lwp): Always read the stop_pc here.
13829 (cancel_breakpoint): New.
13830 (step_over_bkpt): New global.
13831 (linux_wait_for_event_1): Implement stepping over breakpoints.
13832 (gdb_wants_lwp_stopped): New.
13833 (gdb_wants_all_stopped): New.
13834 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13835 single-step traps here. Store the thread's last reported target
13836 wait status.
13837 (send_sigstop): Don't clear stop_expected. Always set it,
13838 instead.
13839 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13840 (cancel_finished_single_step): New.
13841 (cancel_finished_single_steps): New.
13842 (wait_for_sigstop): Don't cancel finished single-step traps here.
13843 (linux_resume_one_lwp): Don't check for removed breakpoints.
13844 Don't set `step' on non-hardware step archs.
13845 (linux_set_resume_request): Ignore resume_stop requests if already
13846 stopping or stopped. Set the lwp's last_resume_kind.
13847 (resume_status_pending_p): Don't check for removed breakpoints.
13848 (need_step_over_p): New.
13849 (start_step_over): New.
13850 (finish_step_over): New.
13851 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13852 requests. Clear the thread's last reported target waitstatus.
13853 Don't use the `suspended' flag. Don't consider pending breakpoints.
13854 (linux_resume): Start a step-over if necessary.
13855 (proceed_one_lwp): New.
13856 (proceed_all_lwps): New.
13857 (unstop_all_lwps): New.
13858 * linux-low.h (struct lwp_info): Rewrite comment for the
13859 `suspended' flag. Add the `stop_pc' field. Delete the
13860 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13861 Add `'last_resume_kind' and `need_step_over' fields.
13862 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13863 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13864 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13865 (set_raw_breakpoint_at): New.
13866 (set_breakpoint_at): Rewrite to use it.
13867 (reinsert_breakpoint_handler): Delete.
13868 (set_reinsert_breakpoint): New.
13869 (reinsert_breakpoint_by_bp): Delete.
13870 (delete_reinsert_breakpoints): New.
13871 (uninsert_breakpoint): Rewrite.
13872 (uninsert_breakpoints_at): New.
13873 (reinsert_breakpoint): Rewrite.
13874 (reinsert_breakpoints_at): New.
13875 (check_breakpoints): Rewrite.
13876 (breakpoint_here): New.
13877 (breakpoint_inserted_here): New.
13878 (check_mem_read): Adjust.
13879 * mem-break.h (breakpoints_supported, breakpoint_here)
13880 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13881 (reinsert_breakpoint_by_bp): Delete declaration.
13882 (delete_reinsert_breakpoints): Declare.
13883 (reinsert_breakpoint): Delete declaration.
13884 (reinsert_breakpoints_at): Declare.
13885 (uninsert_breakpoint): Delete declaration.
13886 (uninsert_breakpoints_at): Declare.
13887 (check_breakpoints): Adjust prototype.
13888 * server.h: Adjust include order.
13889 (struct thread_info): Declare here. Add a `last_status' field.
13890
30ba68cb
MS
138912010-03-23 Michael Snyder <msnyder@vmware.com>
13892
13893 * server.c (crc32): New function.
13894 (handle_query): Add handling for 'qCRC:' request.
13895
b9a881c2
PA
138962010-03-23 Pedro Alves <pedro@codesourcery.com>
13897
13898 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13899 lwp had been stopped by a watchpoint.
13900
e92d13d5
PA
139012010-03-16 Pedro Alves <pedro@codesourcery.com>
13902
13903 * server.h (internal_error): Declare.
13904 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13905 * utils.c (internal_error): New function.
13906
64daa791
AS
139072010-03-15 Andreas Schwab <schwab@redhat.com>
13908
13909 * configure.srv: Fix typo setting srv_regobj.
13910
f52cd8cd
PA
139112010-03-15 Pedro Alves <pedro@codesourcery.com>
13912
13913 * linux-low.c (fetch_register): Avoid passing a non string literal
13914 format to `error'.
13915 (usr_store_inferior_registers): Ditto.
13916
93ae6fdc
PA
139172010-03-14 Pedro Alves <pedro@codesourcery.com>
13918
13919 * linux-low.c (linux_write_memory): Bail out early if peeking
13920 memory failed.
13921
c3adc08c
PA
139222010-03-14 Pedro Alves <pedro@codesourcery.com>
13923
13924 * linux-low.h (struct lwp_info): New fields
13925 `stopped_by_watchpoint' and `stopped_data_address'.
13926 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13927 here, and cache them in the lwp object.
13928 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13929 directly.
13930 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13931 field.
13932 (linux_stopped_by_watchpoint): Rewrite.
13933 (linux_stopped_data_address): Rewrite.
13934
bce522a2
PA
139352010-03-06 Simo Melenius <simo.melenius@iki.fi>
13936
13937 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13938 switching the current inferior, not before.
13939
90884b2b
L
139402010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13941
13942 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13943 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13944 i386-linux.c and amd64-linux.c.
13945 (reg-i386.o): Removed.
13946 (reg-i386.c): Likewise.
13947 (reg-i386-linux.o): Likewise.
13948 (reg-i386-linux.c): Likewise.
13949 (reg-x86-64.o): Likewise.
13950 (reg-x86-64.c): Likewise.
13951 (reg-x86-64-linux.o): Likewise.
13952 (reg-x86-64-linux.c): Likewise.
13953 (i386.o): New.
13954 (i386.c): Likewise.
13955 (i386-linux.o): Likewise.
13956 (i386-linux.c): Likewise.
13957 (amd64.o): Likewise.
13958 (amd64.c): Likewise.
13959 (amd64-linux.o): Likewise.
13960 (amd64-linux.c): Likewise.
13961
13962 * configure.srv (srv_i386_regobj): New.
13963 (srv_i386_linux_regobj): Likewise.
13964 (srv_amd64_regobj): Likewise.
13965 (srv_amd64_linux_regobj): Likewise.
13966 (srv_i386_32bit_xmlfiles): Likewise.
13967 (srv_i386_64bit_xmlfiles): Likewise.
13968 (srv_i386_xmlfiles): Likewise.
13969 (srv_amd64_xmlfiles): Likewise.
13970 (srv_i386_linux_xmlfiles): Likewise.
13971 (srv_amd64_linux_xmlfiles): Likewise.
13972 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13973 srv_xmlfiles to $srv_i386_xmlfiles.
13974 (i[34567]86-*-mingw32ce*): Likewise.
13975 (i[34567]86-*-mingw*): Likewise.
13976 (i[34567]86-*-nto*): Likewise.
13977 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13978 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13979 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13980 (x86_64-*-linux*): Likewise.
13981
13982 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13983 (init_registers_amd64_linux): New.
13984 (x86_arch_setup): Replace init_registers_x86_64_linux with
13985 init_registers_amd64_linux.
13986
193f13e6
MK
139872010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13988
13989 * configure.ac: Check for libdl. If it is not available link against
13990 static libthread_db.
13991 * configure: Regenerate.
13992
85d721b8
PA
139932010-02-22 Pedro Alves <pedro@codesourcery.com>
13994
13995 PR9605
13996
13997 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13998 handing a read watchpoint.
13999 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14000
6076632b
DE
140012010-02-12 Doug Evans <dje@google.com>
14002
14003 * linux-low.c (linux_supports_tracefork_flag): Document.
14004 (linux_look_up_symbols): Add comment.
14005
3327ccf7
L
140062010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14007
14008 * regcache.c (supply_register): Clear regcache if buf is NULL.
14009
0718675c 140102010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14011 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14012
14013 * inferiors.c (find_inferior): Add function documentation.
14014 (unloaded_dll): Handle the case where the unloaded dll has not
14015 been previously registered in the dll list.
14016
177321bd
DJ
140172010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14018
14019 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14020 (thumb2_breakpoint): New.
14021 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14022
2b009048
DJ
140232010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14024
14025 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14026 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14027 breakpoints.
14028
3be029c7
PA
140292010-01-21 Pedro Alves <pedro@codesourcery.com>
14030
14031 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14032
18f5de3b
JK
140332010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14034
14035 * linux-s390-low.c (s390_collect_ptrace_register)
14036 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14037
3743bb4f
DE
140382010-01-21 Doug Evans <dje@google.com>
14039
14ce3065
DE
14040 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14041 (PTRACE_ARG4_TYPE): New macro.
14042 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14043 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14044 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14045 (usr_store_inferior_registers): Ditto.
14046 (linux_read_memory, linux_write_memory): Ditto.
14047 (linux_test_for_tracefork): Ditto.
14048
3743bb4f
DE
14049 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14050 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14051
8b315be5
PA
140522010-01-21 Pedro Alves <pedro@codesourcery.com>
14053
14054 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14055 target.
14056
85492558
PA
140572010-01-21 Pedro Alves <pedro@codesourcery.com>
14058
14059 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14060 prototype to take a regcache. Adjust.
14061
442ea881
PA
140622010-01-20 Pedro Alves <pedro@codesourcery.com>
14063
14064 * regcache.h (struct thread_info): Forward declare.
14065 (struct regcache): New.
14066 (new_register_cache): Adjust prototype.
14067 (get_thread_regcache): Declare.
14068 (free_register_cache): Adjust prototype.
14069 (registers_to_string, registers_from_string): Ditto.
14070 (supply_register, supply_register_by_name, collect_register)
14071 (collect_register_as_string, collect_register_by_name): Ditto.
14072 * regcache.c (struct inferior_regcache_data): Delete.
14073 (get_regcache): Rename to ...
14074 (get_thread_regcache): ... this. Adjust. Switch inferior before
14075 fetching registers.
14076 (regcache_invalidate_one): Adjust.
14077 (regcache_invalidate): Fix prototype.
14078 (new_register_cache): Return the new register cache.
14079 (free_register_cache): Change prototype.
14080 (realloc_register_cache): Adjust.
14081 (registers_to_string): Change prototype to take a regcache. Adjust.
14082 (registers_from_string): Ditto.
14083 (register_data): Ditto.
14084 (supply_register): Ditto.
14085 (supply_register_by_name): Ditto.
14086 (collect_register): Ditto.
14087 (collect_register_as_string): Ditto.
14088 (collect_register_by_name): Ditto.
14089 * server.c (process_serial_event): Adjust.
14090 * linux-low.h (regset_fill_func, regset_store_func): Change
14091 prototype.
14092 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14093 Change prototype.
14094 * linux-low.c (get_stop_pc): Adjust.
14095 (check_removed_breakpoint): Adjust.
14096 (linux_wait_for_event): Adjust.
14097 (linux_resume_one_lwp): Adjust.
14098 (fetch_register): Add regcache parameter. Adjust.
14099 (usr_store_inferior_registers): Ditto.
14100 (regsets_fetch_inferior_registers): Ditto.
14101 (regsets_store_inferior_registers): Ditto.
14102 (linux_fetch_registers, linux_store_registers): Ditto.
14103 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14104 regcache. Adjust.
43aaf8b6
PA
14105 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14106 Ditto.
442ea881
PA
14107 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14108 prototype to take a regcache.
14109 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14110 * remote-utils.c (convert_ascii_to_int, outreg)
14111 (prepare_resume_reply): Change prototype to take a regcache.
14112 Adjust.
14113 * target.h (struct target_ops) <fetch_registers, store_registers>:
14114 Change prototype to take a regcache.
14115 (fetch_inferior_registers, store_inferior_registers): Change
14116 prototype to take a regcache. Adjust.
14117 * proc-service.c (ps_lgetregs): Adjust.
14118 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14119 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14120 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14121 take a regcache. Adjust.
14122 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14123 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14124 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14125 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14126 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14127 (cris_cannot_fetch_register):
14128 (cris_breakpoint_at): Change prototype to take a regcache.
14129 Adjust.
14130 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14131 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14132 to take a regcache. Adjust.
14133 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14134 Adjust.
14135 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14136 take a regcache. Adjust.
14137 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14138 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14139 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14140 * linux-mips-low.c (mips_get_pc):
14141 (mips_set_pc): Change prototype to take a regcache. Adjust.
14142 (mips_reinsert_addr): Adjust.
14143 (mips_collect_register): Change prototype to take a regcache.
14144 Adjust.
14145 (mips_supply_register):
14146 (mips_collect_register_32bit, mips_supply_register_32bit)
14147 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14148 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14149 * linux-ppc-low.c (ppc_supply_ptrace_register)
14150 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14151 (parse_spufs_run): Adjust.
14152 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14153 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14154 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14155 take a regcache. Adjust.
14156 * linux-s390-low.c (s390_collect_ptrace_register)
14157 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14158 (s390_set_pc): Change prototype to take a regcache. Adjust.
14159 (s390_arch_setup): Adjust.
14160 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14161 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14162 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14163 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14164 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14165 regcache. Adjust.
14166 (sparc_breakpoint_at): Adjust.
14167 * linux-xtensa-low.c (xtensa_fill_gregset):
14168 (xtensa_store_gregset):
14169 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14170 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14171 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14172 prototype to take a regcache. Adjust.
14173 * win32-arm-low.c (arm_fetch_inferior_register)
14174 (arm_store_inferior_register): Change prototype to take a
14175 regcache. Adjust.
14176 * win32-i386-low.c (i386_fetch_inferior_register)
14177 (i386_store_inferior_register): Change prototype to take a
14178 regcache. Adjust.
14179 * win32-low.c (child_fetch_inferior_registers)
14180 (child_store_inferior_registers): Change prototype to take a
14181 regcache. Adjust.
14182 (win32_wait): Adjust.
14183 (win32_fetch_inferior_registers): Change prototype to take a
14184 regcache. Adjust.
14185 (win32_store_inferior_registers): Adjust.
14186 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14187 store_inferior_register>: Change prototype to take a regcache.
14188
60c3d7b0
DE
141892010-01-20 Doug Evans <dje@google.com>
14190
14191 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14192 #ifdef.
14193 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14194 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14195
dc146f7c
VP
141962010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14197
14198 * linux-low.c (linux_core_of_thread): New.
14199 (compare_ints, show_process, list_threads): New.
14200 (linux_qxfer_osdata): Report threads and cores.
14201 (linux_target_op): Register linux_core_of_thread.
14202 * remote-utils.c (prepare_resume_reply): Report the core.
14203 (buffer_xml_printf): Support %d specifier.
14204 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14205 New.
14206 (handle_query): Handle qXfer:threads. Announce availability
14207 thereof.
14208 * target.h (struct target_ops): New field core_of_thread.
14209
7803799a
UW
142102010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14211
14212 * Makefile.in (clean): Remove new generated files.
14213 (reg-s390.o, reg-s390.c): Remove rules.
14214 (reg-s390x.o, reg-s390x.c): Likewise.
14215 (s390-linux32.o, s390-linux32.c): Add rules.
14216 (s390-linux64.o, s390-linux64.c): Likewise.
14217 (s390x-linux64.o, s390x-linux64.c): Likewise.
14218 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14219 * linux-s390-low.c: Include <elf.h>.
14220 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14221 (init_registers_s390): Remove prototype.
14222 (init_registers_s390x): Likewise.
14223 (init_registers_s390_linux32): Add prototype.
14224 (init_registers_s390_linux64): Likewise.
14225 (init_registers_s390x_linux64): Likewise.
14226 (s390_num_regs_3264): New define.
14227 (s390_regmap_3264): New global variable.
14228 (s390_cannot_fetch_register): Remove obsolete check.
14229 (s390_cannot_store_register): Likewise.
14230 (s390_collect_ptrace_register): Handle upper/lower register halves.
14231 (s390_supply_ptrace_register): Likewise.
14232 (s390_fill_gregset): Update to register number changes.
14233 (s390_get_hwcap): New routine.
14234 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14235 Install appropriate regmap and register set.
14236
6e7ffa39
JB
142372010-01-01 Joel Brobecker <brobecker@adacore.com>
14238
14239 * server.c (gdbserver_version): Update copyright year to 2010.
14240 * gdbreplay.c (gdbreplay_version): Likewise.
14241
957f3f49
DE
142422009-12-28 Doug Evans <dje@google.com>
14243
14244 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14245 elf/external.h. Include <elf.h> instead but only if necessary.
14246
ca5c370d
PA
142472009-12-28 Pedro Alves <pedro@codesourcery.com>
14248
14249 * linux-low.c (linux_remove_process): Remove `detaching'
14250 parameter. Don't release/detach from thread_db here.
14251 (linux_kill): Release/detach from thread_db here, ...
14252 (linux_detach): ... and here, before actually detaching.
14253 (linux_wait_1): ... and here, when a process exits.
14254 * thread-db.c (any_thread_of): New.
14255 (thread_db_free): Switch the current inferior to a thread of the
14256 passed in process.
14257
4ee62156
DE
142582009-12-21 Doug Evans <dje@google.com>
14259
d90e6a88
DE
14260 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14261
c5f62d5f
DE
14262 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14263 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14264 warning ifndef __NR_tkill. Move setting of errno there too.
14265 Delete unnecessary resetting of errno after syscall.
14266 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14267
10e86dd7
DE
14268 * configure.ac: Check for dladdr.
14269 * config.in: Regenerate.
14270 * configure: Regenerate.
14271 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14272 (try_thread_db_load): Update.
14273
4ee62156
DE
14274 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14275
00f515da
DE
142762009-12-18 Doug Evans <dje@google.com>
14277
e9464885
DE
14278 * event-loop.c: Include unistd.h if it exists.
14279
07d4f67e
DE
14280 * linux-low.c (my_waitpid): Move definition away from being in
14281 between linux_tracefork_child/linux_test_for_tracefork.
14282
00f515da
DE
14283 * gdb_proc_service.h (psaddr_t): Fix type.
14284 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14285 signature to match glibc.
14286
1de1badb
DE
142872009-12-16 Doug Evans <dje@google.com>
14288
14289 * linux-low.c (linux_read_memory): Fix argument to read.
14290
aeeb81d1
PA
142912009-11-26 Pedro Alves <pedro@codesourcery.com>
14292
14293 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14294 events, don't leave current_inferior pointing at null.
14295
10357975
PA
142962009-11-26 Pedro Alves <pedro@codesourcery.com>
14297
14298 * win32-low.c (LOG): Delete.
14299 (OUTMSG): Output to stderr.
14300 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14301 on compile time LOG macro.
14302 (win32_wait): Fix debug output.
14303
cf6e3471
PA
143042009-11-26 Pedro Alves <pedro@codesourcery.com>
14305
14306 * win32-low.c (win32_add_one_solib): If the dll name is
14307 "ntdll.dll", prepend the system directory to the dll path.
14308
0c85e18e
MK
143092009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14310
14311 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14312
9ac544ce 143132009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14314 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14315
14316 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14317 * configure.ac: Check for __mcoldfire__ and set
14318 gdb_cv_m68k_is_coldfire.
14319 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14320 reg-cf.o and reg-m68k.o.
14321 * configure: Regenerated.
14322
fd7dd3e6
PA
143232009-11-16 Pedro Alves <pedro@codesourcery.com>
14324
14325 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14326 Pass it to thread_db_free.
14327 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14328 proper `detaching' argument to linux_remove_process.
14329 * linux-low.h (thread_db_free): Add `detaching' parameter.
14330 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14331 to thread_db_free.
14332 (thread_db_free): Add `detaching' parameter. Only
14333 call td_ta_clear_event if detaching from process.
14334
75aa492e
MK
143352009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14336
14337 * thread-db.c (thread_db_free): Fix typo.
14338
21e1bee4
PP
143392009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14340
14341 PR gdb/10838
14342 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14343
8838b45e
NS
143442009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14345
14346 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14347 with an i686 compiler.
14348 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14349 needed.
14350 * configure: Rebuilt.
14351
8a35fb51
SL
143522009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14353
14354 PR gdb/10783
14355
14356 * server.c (handle_search_memory_1): Correct read_addr initialization
14357 in loop for searching subsequent chunks.
14358
96f15937
PP
143592009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14360
14361 * configure.ac: New --with-libthread-db option.
14362 * thread-db.c: Allow direct dependence on libthread_db.
14363 (thread_db_free): Adjust.
14364 * config.in: Regenerate.
14365 * configure: Likewise.
889bf7c5 14366
5f7d1694
PP
143672009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14368
14369 PR gdb/10757
14370 * thread-db.c (attach_thread): New function.
14371 (maybe_attach_thread): Return success/failure.
14372 (find_new_threads_callback): Adjust.
889bf7c5
PA
14373 (thread_db_find_new_threads): Loop until no new threads.
14374
88e3b899
PA
143752009-10-13 Pedro Alves <pedro@codesourcery.com>
14376
14377 * proc-service.c (ps_lgetregs): Formatting.
14378
cdbfd419
PP
143792009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14380
14381 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14382 * configure.ac: Adjust.
14383 * linux-low.h (struct process_info_private): Move members to struct
14384 thread_db.
14385 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14386 * linux-low.c (linux_remove_process): Adjust.
14387 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14388 * server.c (handle_query): Move code ...
14389 (handle_monitor_command): ... here. New function.
14390 * target.h (struct target_ops): New member.
14391 * thread-db.c (struct thread_db): New.
14392 (libthread_db_search_path): New variable.
14393 (thread_db_create_event, thread_db_enable_reporting)
14394 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14395 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14396 (try_thread_db_load_1, dladdr_to_soname): New functions.
14397 (try_thread_db_load, thread_db_load_search): New functions.
14398 (thread_db_init): Search for libthread_db.
14399 (thread_db_free): New function.
14400 (thread_db_handle_monitor_command): Likewise.
14401 * config.in: Regenerate.
14402 * configure: Regenerate.
889bf7c5 14403
4168d2d6
UW
144042009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14405
14406 * spu-low.c (spu_kill): Wait for inferior to terminate.
14407 Call clear_inferiors.
14408 (spu_detach): Call clear_inferiors.
14409
81ecdfbb
RW
144102009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14411
14412 * aclocal.m4: Regenerate.
14413 * config.in: Likewise.
14414 * configure: Likewise.
14415
0b9ff2c0
UW
144162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14417
14418 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14419 (parse_spufs_run): New function.
14420 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14421 (ppc_breakpoint_at): Handle SPU breakpoints.
14422
efcbbd14
UW
144232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14424
14425 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14426 (SPUFS_MAGIC): Define.
14427 (spu_enumerate_spu_ids): New function.
14428 (linux_qxfer_spu): New function.
14429 (linux_target_ops): Install linux_qxfer_spu.
14430
f4d9bade
UW
144312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14432
14433 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14434 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14435 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14436 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14437 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14438 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14439 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14440 (init_registers_powerpc_cell32l): Add prototype.
14441 (init_registers_powerpc_cell64l): Likewise.
14442 (ppc_arch_setup): Detect Cell/B.E. architecture.
14443
96e946ca
RW
144442009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14445
14446 * Makefile.in (datarootdir): New variable.
14447
58d6951d
DJ
144482009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14449
14450 * linux-low.c (linux_write_memory): Update debugging output.
14451 * Makefile.in (clean): Add new descriptions.
14452 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14453 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14454 * configure.srv: Add new files for arm*-*-linux*.
14455 * linux-arm-low.c: Add new declarations.
14456 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14457 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14458 (HWCAP_VFPv3D16): New.
14459 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14460 instead of __IWMMXT__.
14461 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14462 (arm_arch_setup): New.
14463 (target_regsets): Remove #ifdef. Add VFP regset.
14464 (the_low_target): Use arm_arch_setup.
14465
12b42a12
DJ
144662009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14467
14468 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14469 the main thread again.
14470
ac8c974e
AR
144712009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14472
14473 Adding Neutrino gdbserver.
14474 * configure: Regenerated.
14475 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14476 * configure.srv (i[34567]86-*-nto*): New target.
14477 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14478 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14479 (nto_comctrl) [__QNX__]: New function.
14480 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14481
4424e0c3 144822009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14483
14484 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14485 srv_tgtobj.
14486
912cf4ba
PA
144872009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14488 Pedro Alves <pedro@codesourcery.com>
14489
14490 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14491 don't support CONTEXT_EXTENDED_REGISTERS.
14492 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14493 (the_low_target): Install them.
14494 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14495 failing with ERROR_PIPE_NOT_CONNECTED.
14496
aa5ca48f
DE
144972009-06-30 Doug Evans <dje@google.com>
14498 Pierre Muller <muller@ics.u-strasbg.fr>
14499
14500 Add h/w watchpoint support to x86-linux, win32-i386.
14501 * Makefile.in (SFILES): Add i386-low.c
14502 (i386_low_h): Define.
14503 (i386-low.o): Add dependencies.
14504 (linux-x86-low.o): Add i386-low.h dependency.
14505 (win32-i386-low.o): Ditto.
14506 * i386-low.c: New file.
14507 * i386-low.h: New file.
14508 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14509 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14510 * linux-low.c (linux_add_process): Initialize arch_private.
14511 (linux_remove_process): Free arch_private.
14512 (add_lwp): Initialize arch_private.
14513 (delete_lwp): Free arch_private.
14514 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14515 provided.
14516 * linux-low.h (process_info_private): New member arch_private.
14517 (lwp_info): New member arch_private.
14518 (linux_target_ops): New members new_process, new_thread,
14519 prepare_to_resume.
14520 (ptid_of): New macro.
14521 * linux-x86-low.c: Include stddef.h, i386-low.h.
14522 (arch_process_info): New struct.
14523 (arch_lwp_info): New struct.
14524 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14525 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14526 (i386_dr_low_get_status): New function.
14527 (x86_insert_point, x86_remove_point): New functions.
14528 (x86_stopped_by_watchpoint): New function.
14529 (x86_stopped_data_address): New function.
14530 (x86_linux_new_process, x86_linux_new_thread): New functions.
14531 (x86_linux_prepare_to_resume): New function.
14532 (the_low_target): Add entries for insert_point, remove_point,
14533 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14534 prepare_to_resume.
14535 * server.c (debug_hw_points): New global.
14536 (monitor_show_help): Document set debug-hw-points.
14537 (handle_query): Process "set debug-hw-points".
14538 * server.h (debug_hw_points): Declare.
14539 (paddress): Declare.
14540 * utils.c (NUMCELLS, CELLSIZE): New macros.
14541 (get_sell, xsnprintf, paddress): New functions.
14542 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14543 remove_point, stopped_by_watchpoint, stopped_data_address.
14544 * win32-i386-low.c: Include i386-low.h.
14545 (debug_reg_state): Replaces dr.
14546 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14547 (i386_dr_low_get_status): New function.
14548 (i386_insert_point, i386_remove_point): New functions.
14549 (i386_stopped_by_watchpoint): New function.
14550 (i386_stopped_data_address): New function.
14551 (i386_initial_stuff): Update.
14552 (get_thread_context,set_thread_context,i386_thread_added): Update.
14553 (the_low_target): Add entries for insert_point,
14554 remove_point, stopped_by_watchpoint, stopped_data_address.
14555 * win32-low.c (win32_insert_watchpoint): New function.
14556 (win32_remove_watchpoint): New function.
14557 (win32_stopped_by_watchpoint): New function.
14558 (win32_stopped_data_address): New function.
14559 (win32_target_ops): Add entries for insert_watchpoint,
14560 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14561 * win32-low.h (win32_target_ops): New members insert_point,
14562 remove_point, stopped_by_watchpoint, stopped_data_address.
14563
d993e290
PA
145642009-06-25 Pedro Alves <pedro@codesourcery.com>
14565
14566 * server.c (process_serial_event): Re-return unsupported, not
14567 error, if the type isn't recognized. Re-allow supporting only
14568 insert or remove packets. Also call require_running for
14569 breakpoints. Add missing break statement to default case. Tidy.
14570 * target.h (struct target_ops): Rename insert_watchpoint to
14571 insert_point, and remove_watchpoint to remove_point.
14572
14573 * linux-low.h (struct linux_target_ops): Likewise.
14574 * linux-low.c (linux_insert_watchpoint): Rename to ...
14575 (linux_insert_point): ... this. Adjust.
14576 (linux_remove_watchpoint): Rename to ...
14577 (linux_remove_point): ... this. Adjust.
14578 (linux_target_ops): Adjust.
14579 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14580 (cris_insert_point): ... this.
14581 (cris_remove_watchpoint): Rename to ...
14582 (cris_remove_point): ... this.
14583 (the_low_target): Adjust.
14584
0f54c268
PM
145852009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14586
14587 * server.c (handle_v_kill): Pass signal_pid to
14588 kill_inferior if multi_process is zero.
14589
c6314022
AR
145902009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14591
14592 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14593 * target.h (target_ops): Comment for *_watchpoint to make it clear
14594 the functions can get types '0' and '1'.
14595
4463ce24
AR
145962009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14597
14598 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14599 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14600 * regcache.c (get_regcache): Likewise.
14601 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14602 * win32-low.c (child_fetch_inferior_registers): Remove check for
14603 regno 0.
14604
cf8fd78b
PA
146052009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14606 Pedro Alves <pedro@codesourcery.com>
14607
14608 * target.h (struct target_ops) <supports_multi_process>: New
14609 callback.
14610 (target_supports_multi_process): New.
14611 * server.c (handle_query): Even if GDB reports support, only
14612 enable multi-process if the target also supports it. Report
14613 multi-process support only if the target backend supports it.
14614 * linux-low.c (linux_supports_multi_process): New function.
14615 (linux_target_ops): Install it as target_supports_multi_process
14616 callback.
14617
47c0c975
DE
146182009-05-24 Doug Evans <dje@google.com>
14619
e09875d4
DE
14620 Global renaming of find_thread_pid to find_thread_ptid.
14621 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14622 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14623 All callers updated.
14624
e27d73f6
DE
14625 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14626 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14627 directly.
14628
47c0c975
DE
14629 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14630 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14631 (linux_resume_one_lwp): Ditto.
14632
2acc282a
DE
146332009-05-23 Doug Evans <dje@google.com>
14634
14635 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14636 from struct inferior_list_entry * to struct lwp_info *.
14637 All callers updated.
14638
9f1036c1
DE
146392009-05-13 Doug Evans <dje@google.com>
14640
14641 * linux-x86-low.c: Don't include assert.h.
14642 (x86_siginfo_fixup): Use fatal, not assert.
14643 (x86_arch_setup): Fix comment.
14644
d0722149
DE
146452009-05-12 Doug Evans <dje@google.com>
14646
14647 Biarch support for i386/amd64 gdbserver.
14648 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14649 Add linux-x86-low.c.
14650 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14651 (linux-x86-low.o): Add.
14652 * linux-x86-64-low.c: Delete.
14653 * linux-i386-low.c: Delete.
14654 * linux-x86-low.c: New file.
14655 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14656 linux-x86-low.o.
14657 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14658 linux-x86-low.o.
14659 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14660 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14661 (linux_child_pid_to_exec_file): New function.
14662 (elf_64_header_p, elf_64_file_p): New functions.
14663 (siginfo_fixup): New function.
14664 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14665 give target a chance to convert layout.
14666 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14667 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14668
fdeb2a12
DE
146692009-05-07 Doug Evans <dje@google.com>
14670
14671 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14672 (regsets_store_inferior_registers): Ditto.
14673
a6dbe5df
PA
146742009-05-06 Pedro Alves <pedro@codesourcery.com>
14675
14676 PR server/10048
14677
14678 * linux-low.c (must_set_ptrace_flags): Delete.
14679 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14680 of the global.
14681 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14682 `lwp->must_set_ptrace_flags' instead.
ba42693b 14683 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14684 (linux_wait_1): ... not here.
14685
5091eb23
DE
146862009-04-30 Doug Evans <dje@google.com>
14687
9f767825
DE
14688 * inferiors.c (started_inferior_callback): New function.
14689 (attached_inferior_callback): New function.
14690 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14691 * server.c (print_started_pid, print_attached_pid): New functions.
14692 (detach_or_kill_for_exit): New function.
14693 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14694 * server.h (have_started_inferiors_p): Declare.
14695 (have_attached_inferiors_p): Declare.
14696
5091eb23
DE
14697 * inferiors.c (remove_process): Fix memory leak, free process.
14698 * linux-low.c (linux_remove_process): New function.
14699 (linux_kill): Call it instead of remove_process.
14700 (linux_detach, linux_wait_1): Ditto.
14701
155c8968
PA
147022009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14703
14704 * configure.srv: Add x86 Windows CE target.
14705
7fe519cb
UW
147062009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14707
14708 * inferiors.c (get_thread_process): Make global.
14709 * server.h (get_thread_process): Add prototype.
14710 * thread-db.c (find_one_thread): Use get_thread_process
14711 instead of current_process.
14712 (thread_db_get_tls_address): Do not crash if called when
14713 thread layer is not yet initialized.
14714
5472f405
UW
147152009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14716
14717 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14718 * spu-low.c (current_tid): Rename to ...
14719 (current_ptid): ... this.
14720 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14721 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14722 ptid_get_lwp (current_ptid) instead of current_tid.
14723 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14724 instead of current_tid. Use find_process_pid to verify pid
14725 argument is valid. Pass proper argument to remove_process.
14726 (spu_thread_alive): Compare current_ptid instead of current_tid.
14727 (spu_resume): Likewise.
14728
55ac2b99
PA
147292009-04-02 Pedro Alves <pedro@codesourcery.com>
14730
14731 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14732 variable.
14733
95954743
PA
147342009-04-01 Pedro Alves <pedro@codesourcery.com>
14735
14736 Implement the multiprocess extensions, and add linux multiprocess
14737 support.
14738
14739 * server.h (ULONGEST): Declare.
14740 (struct ptid, ptid_t): New.
14741 (minus_one_ptid, null_ptid): Declare.
14742 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14743 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14744 (struct inferior_list_entry): Change `id' type from unsigned from
14745 to ptid_t.
14746 (struct sym_cache, struct breakpoint, struct
14747 process_info_private): Forward declare.
14748 (struct process_info): Declare.
14749 (current_process): Declare.
14750 (all_processes): Declare.
14751 (initialize_inferiors): Declare.
14752 (add_thread): Adjust to use ptid_t.
14753 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14754 (add_process, remove_process, find_thread_pid): Declare.
14755 (find_inferior_id): Adjust to use ptid_t.
14756 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14757 (multi_process): Declare.
14758 (push_event): Adjust to use ptid_t.
14759 (read_ptid, write_ptid): Declare.
14760 (prepare_resume_reply): Adjust to use ptid_t.
14761 (clear_symbol_cache): Declare.
14762 * inferiors.c (all_processes): New.
14763 (null_ptid, minus_one_ptid): New.
14764 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14765 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14766 (add_thread): Change unsigned long to ptid. Remove gdb_id
14767 parameter. Adjust.
14768 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14769 (gdb_id_to_thread): Rename to ...
14770 (find_thread_pid): ... this. Change unsigned long to ptid.
14771 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14772 (loaded_dll, pull_pid_from_list): Adjust.
14773 (add_process, remove_process, find_process_pid)
14774 (get_thread_process, current_process, initialize_inferiors): New.
14775 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14776 (struct target_waitstatus) <related_pid>: Ditto.
14777 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14778 return type to int.
14779 (struct target_ops) <join>: Add `pid' argument.
14780 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14781 (struct target_ops) <wait>: Add `ptid' field. Change return type
14782 to ptid.
14783 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14784 (mywait): Add `ptid' argument. Change return type to ptid_t.
14785 (target_pid_to_str): Declare.
14786 * target.c (set_desired_inferior): Adjust to use ptids.
14787 (mywait): Add new `ptid' argument. Adjust.
14788 (target_pid_to_str): New.
14789 * mem-break.h (free_all_breakpoints): Declare.
14790 * mem-break.c (breakpoints): Delelete.
14791 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14792 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14793 to use per-process breakpoint list.
14794 (free_all_breakpoints): New.
14795 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14796 (symbol_cache, all_symbols_looked_up): Delete.
14797 (hexchars): New.
14798 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14799 read_ptid): New.
14800 (prepare_resume_reply): Change ptid argument's type from unsigned
14801 long to ptid_t. Adjust. Implement W;process and X;process.
14802 (free_sym_cache, clear_symbol_cache): New.
14803 (look_up_one_symbol): Adjust to per-process symbol cache. *
14804 * server.c (cont_thread, general_thread, step_thread): Change type
14805 to ptid_t.
14806 (attached): Delete.
14807 (multi_process): New.
14808 (last_ptid): Change type to ptid_t.
14809 (struct vstop_notif) <ptid>: Change type to ptid_t.
14810 (queue_stop_reply, push_event): Change `ptid' argument's type to
14811 ptid_t.
14812 (discard_queued_stop_replies): Add `pid' argument.
14813 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14814 changes. Don't reference the `attached' global.
14815 (attach_inferior): Adjust to mywait interface changes.
14816 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14817 features. Handle and report "multiprocess+". Handle
14818 "qAttached:PID".
14819 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14820 changes.
14821 (handle_v_kill): New.
14822 (handle_v_stopped): Adjust to use target_pid_to_str.
14823 (handle_v_requests): Allow multiple attaches and runs when
14824 multiprocess extensions are in effect. Handle "vKill".
14825 (myresume): Adjust to use ptids.
14826 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14827 (handle_status): Adjust to discard_queued_stop_replies interface
14828 change.
14829 (first_thread_of, kill_inferior_callback)
14830 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14831 (main): Call initialize_inferiors. Adjust to use ptids, killing
14832 and detaching from all inferiors. Handle multiprocess packet
14833 variants.
14834 * linux-low.h: Include gdb_proc_service.h.
14835 (struct process_info_private): New.
14836 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14837 <lwpid_of>: Use ptid_get_lwp.
14838 (get_lwp_thread): Adjust.
14839 (struct lwp_info): Add `dead' member.
14840 (find_lwp_pid): Declare.
14841 * linux-low.c (thread_db_active): Delete.
14842 (new_inferior): Adjust comment.
14843 (inferior_pid): Delete.
14844 (linux_add_process): New.
14845 (handle_extended_wait): Adjust.
14846 (add_lwp): Change unsigned long to ptid.
14847 (linux_create_inferior): Add process to processes table. Adjust
14848 to use ptids. Don't set new_inferior here.
14849 (linux_attach_lwp): Rename to ...
14850 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14851 it. Adjust to use ptids.
14852 (linux_attach_lwp): New.
14853 (linux_attach): Add process to processes table. Don't set
14854 new_inferior here.
14855 (struct counter): New.
14856 (second_thread_of_pid_p, last_thread_of_process_p): New.
14857 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14858 multiple processes.
14859 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14860 processes. Remove process from process table.
14861 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14862 to multiple processes.
14863 (any_thread_of): New.
14864 (linux_detach): Add `pid' argument, and handle it. Remove process
14865 from processes table.
14866 (linux_join): Add `pid' argument. Handle it.
14867 (linux_thread_alive): Change unsighed long argument to ptid_t.
14868 Consider dead lwps as not being alive.
14869 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14870 threads we're not interested in.
14871 (same_lwp, find_lwp_pid): New.
14872 (linux_wait_for_lwp): Change `pid' argument's type from int to
14873 ptid_t. Adjust.
14874 (linux_wait_for_event): Rename to ...
14875 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14876 from int to ptid_t. Adjust.
14877 (linux_wait_for_event): New.
14878 (linux_wait_1): Add `ptid' argument. Change return type to
14879 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14880 that exit from the process table.
14881 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14882 Adjust.
14883 (mark_lwp_dead): New.
14884 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14885 stopping all threads, mark its main lwp as dead.
14886 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14887 ptids.
14888 (fetch_register, usr_store_inferior_registers)
14889 (regsets_fetch_inferior_registers)
14890 (regsets_store_inferior_registers, linux_read_memory)
14891 (linux_write_memory): Inline `inferior_pid'.
14892 (linux_look_up_symbols): Adjust to use per-process
14893 `thread_db_active'.
14894 (linux_request_interrupt): Adjust to use ptids.
14895 (linux_read_auxv): Inline `inferior_pid'.
14896 (initialize_low): Don't reference thread_db_active.
14897 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14898 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14899 (ps_getpid): Return the pid of the current inferior.
14900 * thread-db.c (proc_handle, thread_agent): Delete.
14901 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14902 per-process data.
14903 (find_one_thread): Change argument type to ptid_t. Adjust to
14904 per-process data.
14905 (maybe_attach_thread): Adjust to per-process data and ptids.
14906 (thread_db_find_new_threads): Ditto.
14907 (thread_db_init): Ditto.
14908 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14909 processes table. Adjust to use ptids.
14910 (spu_kill, spu_detach): Adjust interface. Remove process from
14911 processes table.
14912 (spu_join, spu_thread_alive): Adjust interface.
14913 (spu_wait): Adjust interface. Remove process from processes
14914 table. Adjust to use ptids.
14915 * win32-low.c (current_inferior_tid): Delete.
14916 (current_inferior_ptid): New.
14917 (debug_event_ptid): New.
14918 (thread_rec): Take a ptid. Adjust.
14919 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14920 (child_delete_thread): Ditto.
14921 (do_initial_child_stuff): Add `attached' argument. Add process to
14922 processes table.
14923 (child_fetch_inferior_registers, child_store_inferior_registers):
14924 Adjust.
14925 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14926 (win32_attach): Pass 1 to do_initial_child_stuff.
14927 (win32_kill): Adjust interface. Remove process from processes
14928 table.
14929 (win32_detach): Ditto.
14930 (win32_join): Adjust interface.
14931 (win32_thread_alive): Take a ptid.
14932 (win32_resume): Adjust to use ptids.
14933 (get_child_debug_event): Ditto.
14934 (win32_wait): Adjust interface. Remove exiting process from
14935 processes table.
14936
bd99dc85
PA
149372009-04-01 Pedro Alves <pedro@codesourcery.com>
14938
14939 Non-stop mode support.
14940
14941 * server.h (non_stop): Declare.
14942 (gdb_client_data, handler_func): Declare.
14943 (delete_file_handler, add_file_handler, start_event_loop):
14944 Declare.
14945 (handle_serial_event, handle_target_event, push_event)
14946 (putpkt_notif): Declare.
14947 * target.h (enum resume_kind): New.
14948 (struct thread_resume): Replace `step' field by `kind' field.
14949 (TARGET_WNOHANG): Define.
14950 (struct target_ops) <wait>: Add `options' argument.
14951 <supports_non_stop, async, start_non_stop>: New fields.
14952 (target_supports_non_stop, target_async): New.
14953 (start_non_stop): Declare.
14954 (mywait): Add `options' argument.
14955 * target.c (mywait): Add `options' argument. Print child exit
14956 notifications here.
14957 (start_non_stop): New.
14958 * server.c (non_stop, own_buf, mem_buf): New globals.
14959 (struct vstop_notif): New.
14960 (notif_queue): New global.
14961 (queue_stop_reply, push_event, discard_queued_stop_replies)
14962 (send_next_stop_reply): New.
14963 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14964 interface changes.
14965 (attach_inferior): In non-stop mode, don't wait for the target
14966 here.
14967 (handle_general_set): Handle QNonStop.
14968 (handle_query): When handling qC, return the current general
14969 thread, instead of the first thread of the list.
14970 (handle_query): If the backend supports non-stop mode, include
14971 QNonStop+ in the qSupported query response.
14972 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14973 and non-stop mode.
14974 (handle_v_attach, handle_v_run): Handle non-stop mode.
14975 (handle_v_stopped): New.
14976 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14977 (myresume): Adjust to use resume_kind. Handle non-stop.
14978 (queue_stop_reply_callback): New.
14979 (handle_status): Handle non-stop mode.
14980 (main): Clear non_stop flag on reconnection. Use the event-loop.
14981 Refactor serial protocol handling from here ...
14982 (process_serial_event): ... to this new function. When GDB
14983 selects any thread, select one here. In non-stop mode, wait until
14984 GDB acks all pending events before exiting.
14985 (handle_serial_event, handle_target_event): New.
14986 * remote-utils.c (remote_open): Install remote_desc in the event
14987 loop.
14988 (remote_close): Remove remote_desc from the event loop.
14989 (putpkt_binary): Rename to...
14990 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14991 (putpkt_binary): New as wrapper around putpkt_binary_1.
14992 (putpkt_notif): New.
14993 (prepare_resume_reply): In non-stop mode, don't change the
14994 general_thread.
14995 * event-loop.c: New.
14996 * Makefile.in (OBJ): Add event-loop.o.
14997 (event-loop.o): New rule.
14998
14999 * linux-low.h (pid_of): Moved here.
15000 (lwpid_of): New.
15001 (get_lwp_thread): Use lwpid_of.
15002 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15003 * linux-low.c (pid_of): Delete.
15004 (inferior_pid): Use lwpid_of.
15005 (linux_event_pipe): New.
15006 (target_is_async_p): New.
15007 (delete_lwp): New.
15008 (handle_extended_wait): Use lwpid_of.
15009 (add_lwp): Don't set lwpid field.
15010 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15011 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15012 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15013 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15014 first. Adjust to linux_wait_for_event interface changes. Use
15015 lwpid_of.
15016 (linux_detach): Don't delete the main lwp here.
15017 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15018 (status_pending_p): Don't consider explicitly suspended lwps.
15019 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15020 pointer. Add OPTIONS argument. Change return type to int. Use
15021 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15022 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15023 pointer. Add status pointer argument. Return a pid instead of a
15024 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15025 changes. In non-stop mode, don't switch to a random thread.
15026 (linux_wait): Rename to...
15027 (linux_wait_1): ... this. Add target_options argument, and handle
15028 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15029 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15030 clean exit and signal exit code. Don't stop all threads in
15031 non-stop mode. In all-stop mode, only stop all threads when
15032 reporting a stop to GDB. Handle explicit thread stop requests.
15033 (async_file_flush, async_file_mark): New.
15034 (linux_wait): New.
15035 (send_sigstop): Use lwpid_of.
15036 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15037 interface changes. In non-stop mode, don't switch to a random
15038 thread.
15039 (linux_resume_one_lwp): Use lwpid_of.
15040 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15041 (linux_resume_one_thread): ... this. Handle resume_stop. In
15042 non-stop mode, don't look for pending flag in all threads.
15043 (resume_status_pending_p): Don't consider explicitly suspended
15044 threads.
15045 (my_waitpid): Reimplement. Emulate __WALL.
15046 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15047 Use lwpid_of.
15048 (sigchld_handler, linux_supports_non_stop, linux_async)
15049 (linux_start_non_stop): New.
15050 (linux_target_ops): Register linux_supports_non_stop, linux_async
15051 and linux_start_non_stop.
15052 (initialize_low): Install SIGCHLD handler.
15053 * thread-db.c (thread_db_create_event, find_one_thread)
15054 (thread_db_get_tls_address): Use lwpid_of.
15055 * win32-low.c (win32_detach): Adjust to use resume_kind.
15056 (win32_wait): Add `options' argument.
15057 * spu-low.c (spu_resume): Adjust to use resume_kind.
15058 (spu_wait): Add `options' argument.
15059
5b1c542e
PA
150602009-04-01 Pedro Alves <pedro@codesourcery.com>
15061
15062 Decouple target code from remote protocol.
15063
15064 * target.h (enum target_waitkind): New.
15065 (struct target_waitstatus): New.
15066 (struct target_ops) <wait>: Return an unsigned long. Take a
15067 target_waitstatus pointer instead of a char pointer.
15068 (mywait): Likewise.
15069 * target.c (mywait): Change prototype to return an unsigned long.
15070 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15071 * server.h (thread_from_wait, old_thread_from_wait): Delete
15072 declarations.
15073 (prepare_resume_reply): Change prototype to take a
15074 target_waitstatus.
15075 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15076 (last_status, last_ptid): New.
15077 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15078 pid instead of a signal.
15079 (attach_inferior): Remove "status" and "signal" parameters.
15080 Adjust.
15081 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15082 not as an address.
15083 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15084 (handle_v_requests, myresume): Remove "status" and "signal"
15085 parameters. Adjust.
15086 (handle_status): New.
15087 (main): Delete local `status'. Adjust.
15088 * remote-utils.c: Include target.h.
15089 (prepare_resume_reply): Change prototype to take a
15090 target_waitstatus. Adjust.
15091
15092 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15093 interface.
15094 * spu-low.c (spu_wait): Adjust.
15095 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15096 Delete.
15097 (win32_wait): Adjust.
15098
2bd7c093
PA
150992009-04-01 Pedro Alves <pedro@codesourcery.com>
15100
15101 * target.h (struct thread_resume): Delete leave_stopped member.
15102 (struct target_ops): Add a `n' argument to the `resume' callback.
15103 * server.c (start_inferior): Adjust.
15104 (handle_v_cont, myresume): Adjust.
15105 * linux-low.c (check_removed_breakpoint): Adjust to resume
15106 interface change, and to removed leave_stopped field.
15107 (resume_ptr): Delete.
15108 (struct thread_resume_array): New.
15109 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15110 resume interface change.
15111 (linux_continue_one_thread, linux_queue_one_thread)
15112 (resume_status_pending_p): Check if the resume field is NULL
15113 instead of checking the leave_stopped member.
15114 (linux_resume): Adjust to the target resume interface change.
15115 * spu-low.c (spu_resume): Adjust to the target resume interface
15116 change.
15117 * win32-low.c (win32_detach, win32_resume): Ditto.
15118
c35fafde
PA
151192009-04-01 Pedro Alves <pedro@codesourcery.com>
15120
15121 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15122 flag.
15123 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15124 pending.
15125 (linux_continue_one_thread): Only preserve the stepping flag if
15126 there's a pending breakpoint.
15127
0a59d50b
PA
151282009-03-31 Pedro Alves <pedro@codesourcery.com>
15129
15130 * server.c (main): After the inferior having exited, call
15131 remote_close before exiting gdbserver.
15132
f04c6d38
TJB
151332009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15134
15135 Fix size of FPSCR in Power 7 processors.
15136 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15137 (PPC_FEATURE_HAS_DFP): New #define.
15138 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15139 size of the FPSCR.
15140
78e5cee6
PA
151412009-03-23 Pedro Alves <pedro@codesourcery.com>
15142
15143 * server.c (handle_query) Whitespace and formatting.
15144
1b3f6016
PA
151452009-03-22 Pedro Alves <pedro@codesourcery.com>
15146
15147 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15148 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15149 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15150 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15151 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15152 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15153 Makefile.in, configure.ac: Fix whitespace throughout.
15154 * configure: Regenerate.
15155
a07b2135
PA
151562009-03-22 Pedro Alves <pedro@codesourcery.com>
15157
15158 * inferiors.c (find_inferior): Make it safe for the callback
15159 function to delete the currently iterated inferior.
15160
67cc2626
PA
151612009-03-22 Pedro Alves <pedro@codesourcery.com>
15162
15163 * Makefile.in (linuw_low_h): Move higher.
15164 (thread-db.o): Depend on $(linux_low_h).
15165
54a0b537
PA
151662009-03-17 Pedro Alves <pedro@codesourcery.com>
15167
15168 Rename "process" to "lwp" throughout.
15169
15170 * linux-low.c (all_processes): Rename to...
15171 (all_lwps): ... this.
15172 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15173 (add_process): Rename to ...
15174 (add_lwp): ... this. Adjust.
15175 (linux_create_inferior): Adjust.
15176 (linux_attach_lwp): Adjust.
15177 (linux_attach): Adjust.
15178 (linux_kill_one_process): Rename to ...
15179 (linux_kill_one_lwp): ... this. Adjust.
15180 (linux_kill): Adjust.
15181 (linux_detach_one_process): Rename to ...
15182 (linux_detach_one_lwp): ... this. Adjust.
15183 (linux_detach): Adjust.
15184 (check_removed_breakpoint): Adjust.
15185 (status_pending_p): Adjust.
15186 (linux_wait_for_process): Rename to ...
15187 (linux_wait_for_lwp): ... this. Adjust.
15188 (linux_wait_for_event): Adjust.
15189 (send_sigstop): Adjust.
15190 (wait_for_sigstop): Adjust.
15191 (stop_all_processes): Rename to ...
15192 (stop_all_lwps): ... this.
15193 (linux_resume_one_process): Rename to ...
15194 (linux_resume_one_lwp): ... this. Adjust.
15195 (linux_set_resume_request, linux_continue_one_thread)
15196 (linux_queue_one_thread, resume_status_pending_p)
15197 (usr_store_inferior_registers, regsets_store_inferior_registers)
15198 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15199 Adjust.
15200 * linux-low.h (get_process): Rename to ...
15201 (get_lwp): ... this. Adjust.
15202 (get_thread_process): Rename to ...
15203 (get_thread_lwp): ... this. Adjust.
15204 (get_process_thread): Rename to ...
15205 (get_lwp_thread): ... this. Adjust.
15206 (struct process_info): Rename to ...
15207 (struct lwp_info): ... this.
15208 (all_processes): Rename to ...
15209 (all_lwps): ... this.
15210 * proc-service.c (ps_lgetregs): Adjust.
15211 * thread-db.c (thread_db_create_event, find_one_thread)
15212 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15213
0b16c5cf
PA
152142009-03-14 Pedro Alves <pedro@codesourcery.com>
15215
15216 * server.c (handle_query): Handle "qAttached".
15217
32de4b9d
NS
152182009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15219
15220 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15221 GPLv3, update license URL.
15222
2aecd87f
DE
152232009-03-01 Doug Evans <dje@google.com>
15224
93efd302 15225 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15226 (server_h): Add gdb_signals.h.
15227 (signals.o): Update.
15228 * server.h (target_signal_from_host,target_signal_to_host_p)
15229 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15230
86b1f9c5
PM
152312009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15232
15233 * remote-utils.c (getpkt): Also generate remote-debug
15234 information if noack_mode is set.
15235
4aa995e1
PA
152362009-02-06 Pedro Alves <pedro@codesourcery.com>
15237
15238 * server.c (handle_query): Report qXfer:siginfo:read and
15239 qXfer:siginfo:write as supported and handle them.
15240 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15241 * linux-low.c (linux_xfer_siginfo): New.
15242 (linux_target_ops): Set it.
15243
62709adf
PA
152442009-01-26 Pedro Alves <pedro@codesourcery.com>
15245
15246 * server.c (gdbserver_usage): Mention --remote-debug.
15247 (main): Accept '--remote-debug' switch.
15248
aef93bd7
DE
152492009-01-18 Doug Evans <dje@google.com>
15250
15251 * regcache.c (new_register_cache): No need to check result of xcalloc.
15252 * server.c (handle_search_memory): Back out calls to xmalloc,
15253 result is checked and error is returned to user upon failure.
15254 (handle_query): Ditto. Add more checks for result of malloc.
15255 (handle_v_cont): Check result of malloc, report error back to
15256 user upon failure.
15257 (handle_v_run): Ditto. Call freeargv.
15258 * server.h (freeargv): Declare.
15259 * utils.c (freeargv): New fn.
15260
54363045
DE
152612009-01-15 Doug Evans <dje@google.com>
15262
f626972c
DE
15263 * gdbreplay.c (perror_with_name): Make arg const char *.
15264 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15265 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15266 * utils.c (perror_with_name): Make arg const char *.
54363045 15267
18aae699
PA
152682009-01-14 Pedro Alves <pedro@codesourcery.com>
15269
15270 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15271 when handling a EXIT_PROCESS_DEBUG_EVENT.
15272
ff703abe
JB
152732009-01-06 Joel Brobecker <brobecker@adacore.com>
15274
15275 * gdbreplay.c (gdbreplay_version): Update copyright year.
15276 * server.c (gdbserver_version): Likewise.
15277
f21cc1a2 152782009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15279
15280 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15281 (handle_extended_wait): Improve comment.
0e21c1ec 15282
bca929d3
DE
152832008-12-13 Doug Evans <dje@google.com>
15284
15285 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15286 * server.h (ATTR_MALLOC): New macro.
15287 (xmalloc,xcalloc,xstrdup): Declare.
15288 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15289 * inferiors.c: Ditto.
15290 * linux-low.c: Ditto.
15291 * mem-break.c: Ditto.
15292 * regcache.c: Ditto.
15293 * remote-utils.c: Ditto.
15294 * server.c: Ditto.
15295 * target.c: Ditto.
15296 * win32-low.c: Ditto.
15297
97438e3f
DE
152982008-12-12 Doug Evans <dje@google.com>
15299
896c7fbb
DE
15300 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15301 in debugging printf.
15302
97438e3f
DE
15303 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15304
e3b886f8
DE
153052008-12-09 Doug Evans <dje@google.com>
15306
15307 * linux-low.h (struct process_info): Delete member tid, unused.
15308 * thread-db.c (find_one_thread): Update.
15309 (maybe_attach_thread): Update.
15310
07e059b5
VP
153112008-12-02 Pedro Alves <pedro@codesourcery.com>
15312
889bf7c5
PA
15313 * target.h (struct target_ops): Add qxfer_osdata member.
15314 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15315 and dirent.h.
15316 (linux_qxfer_osdata): New functions.
15317 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15318 callback.
15319 * server.c (handle_query): Handle "qXfer:osdata:read:".
15320 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15321 (buffer_xml_printf): New functions.
15322 * server.h (struct buffer): New.
15323 (buffer_grow_str, buffer_grow_str0): New macros.
15324 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15325 (buffer_xml_printf): Declare.
07e059b5 15326
4cab47ab
DE
153272008-11-24 Doug Evans <dje@google.com>
15328
15329 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15330
f142445f
DJ
153312008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15332
15333 * server.c (handle_v_run): Always use the supplied argument list.
15334
d0107bb6 153352008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15336
d0107bb6
BW
15337 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15338 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15339
2c4ad781
TJB
153402008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15341
15342 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15343 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15344 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15345 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15346 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15347 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15348 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15349 XML target descriptions.
15350 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15351 when inferior is running on an ISA 2.05 or later processor. Add
15352 special case to return offset for full 64-bit slot of FPSCR when
15353 in 32-bits.
15354
dfb64f85
DJ
153552008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15356
15357 * Makefile.in (SFILES, clean): Added sparc64 files.
15358 (reg-sparc64.o, reg-sparc64.c): New.
15359 * configure.srv (sparc*-*-linux*): New configuration.
15360 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15361 syscall arguments for SPARC.
15362 (regsets_store_inferior_registers): Likewise.
15363 * linux-sparc-low.c: New file.
15364
66b6e1dd
DE
153652008-10-21 Doug Evans <dje@google.com>
15366
15367 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15368 (READLINE_DIR,READLINE_DEP): Delete.
15369 (INTERNAL_CFLAGS): Update.
15370 (LINTFLAGS): Update.
15371
9b710a42
PA
153722008-10-10 Pedro Alves <pedro@codesourcery.com>
15373
15374 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15375 whole argv from the last run, not just argv[0].
15376
5822d809
PA
153772008-09-08 Pedro Alves <pedro@codesourcery.com>
15378
15379 * regcache.c (new_register_cache): Return NULL if the register
15380 cache size isn't known yet.
15381 (free_register_cache): Avoid dereferencing a NULL regcache.
15382
74aac56f
DJ
153832008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15384
15385 * configure.srv: Merge MIPS and MIPS64.
15386
400b20f5
MR
153872008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15388
15389 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15390
677c5bb1
LM
153912008-08-18 Luis Machado <luisgpm@br.ibm.com>
15392
15393 * Makefile.in: Add required vsx dependencies.
15394
15395 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15396 Declare init_registers_powerpc_vsx32l.
15397 Declare init_registers_powerpc_vsx64l.
15398 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15399 (ppc_arch_setup): Check for VSX in hwcap.
15400 (ppc_fill_vsxregset): New function.
15401 (ppc_store_vsxregset): New function.
15402 Add new VSX entry in regset_info target_regsets.
15403
15404 * configure.srv: Add new VSX dependencies.
15405
a6f3e723
SL
154062008-08-12 Pedro Alves <pedro@codesourcery.com>
15407
15408 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15409 (remote_open): Set or clear transport_is_reliable.
15410 (putpkt_binary): Don't expect acks in noack mode.
15411 (getpkt): Don't send ack/nac in noack mode.
15412 * server.c (handle_general_set): Handle QStartNoAckMode.
15413 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15414 qSupported.
15415 (main): Reset noack_mode on every connection.
15416 * server.h (noack_mode): Declare.
15417
a417dc56
RW
154182008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15419
15420 * Makefile.in (GDBREPLAY_OBS): New variable.
15421 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15422
3221518c
UW
154232008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15424 Daniel Jacobowitz <dan@codesourcery.com>
15425
15426 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15427 (usr_store_inferior_registers): Likewise.
15428 (regsets_store_inferior_registers): Likewise.
15429
ec56be1b
PA
154302008-07-31 Rolf Jansen <rj@surtec.com>
15431 Pedro Alves <pedro@codesourcery.com>
15432
15433 * configure.ac: Check for memmem declaration.
15434 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15435 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15436 (disable_packet_qfThreadInfo): Unconditionally compile.
15437 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15438 * configure, config.in: Regenerate.
15439
2fe5e3ff
DE
154402008-07-28 Doug Kwan <dougkwan@google.com>
15441
15442 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15443 (linux_write_memory): Remove declaration of errno.
15444
836acd6d
UW
154452008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15446
15447 * linux-low.c (handle_extended_wait): Do not use "status"
15448 variable uninitialized.
15449
aeba519e
PA
154502008-07-07 Pedro Alves <pedro@codesourcery.com>
15451
15452 * server.c (handle_v_attach): Inhibit reporting dll changes.
15453
db42f210
PA
154542008-06-27 Pedro Alves <pedro@codesourcery.com>
15455
15456 * remote-utils.c (prepare_resume_reply): If requested, don't
15457 output "thread:TID" in the T stop reply.
15458
15459 * server.c (disable_packet_vCont, disable_packet_Tthread)
15460 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15461 (handle_query): If requested, disable support for qC, qfThreadInfo
15462 and qsThreadInfo.
15463 (handle_v_requests): If requested, disable support for vCont.
15464 (gdbserver_show_disableable): New.
15465 (main): Handle --disable-packet and --disable-packet=LIST.
15466
15467 * server.h (disable_packet_vCont, disable_packet_Tthread)
15468 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15469
8e4c5421
CD
154702008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15471
15472 * server.c (gdbserver_usage): Mention --version.
15473
6e23a804
DJ
154742008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15475
15476 * Makefile.in (gdbreplay.o): New rule.
15477
90aa6a40
JM
154782008-06-06 Joseph Myers <joseph@codesourcery.com>
15479
15480 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15481 message, not gdbserver.
15482
c16158bc 154832008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15484 Nathan Sidwell <nathan@codesourcery.com>
15485 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15486
15487 * acinclude.m4: Include ../../config/acx.m4.
15488 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15489 * configure, config.in: Regenerate.
15490 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15491 * server.c (gdbserver_version): Print PKGVERSION.
15492 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15493 (main): Adjust gdbserver_usage calls.
15494 * gdbreplay.c (version, host_name): Add declarations.
15495 (gdbreplay_version, gdbreplay_usage): New.
15496 (main): Accept --version and --help options.
15497
aeb75bf5
DJ
154982008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15499
15500 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15501 (arm_breakpoint_at): Handle Thumb.
15502 (the_low_target): Add comment.
15503
76b233dd
UW
155042008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15505
15506 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15507
08388c79
DE
155082008-05-09 Doug Evans <dje@google.com>
15509
a3c83fae
DE
15510 * server.h (decode_search_memory_packet): Declare.
15511 * remote-utils.c (decode_search_memory_packet): New fn.
15512 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15513 (handle_search_memory): New fn.
15514 (handle_query): Process qSearch:memory packets.
15515
bb9c3d36
UW
155162008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15517
15518 * regcache.c (registers_length): Remove.
15519 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15520 full register packet.
15521 * regcache.h (registers_length): Remove prototype.
15522 * server.h (PBUFSIZ): Define to 16384.
15523
7284e1be
UW
155242008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15525
15526 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15527 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15528 powerpc-64l.o, and powerpc-altivec64l.o.
15529 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15530 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15531 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15532 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15533 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15534 to srv_xmlfiles.
15535
15536 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15537 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15538 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15539 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15540 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15541 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15542 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15543 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15544 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15545 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15546 (clean): Update.
15547
15548 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15549 (init_registers_powerpc_32l): ... this new prototype.
15550 (init_registers_powerpc_32): Remove, replace by ...
15551 (init_registers_powerpc_altivec32l): ... this new prototype.
15552 (init_registers_powerpc_e500): Remove, replace by ...
15553 (init_registers_powerpc_e500l): ... this new prototype.
15554 (init_registers_ppc64): Remove, replace by ...
15555 (init_registers_powerpc_64l): ... this new prototype.
15556 (init_registers_powerpc_64): Remove, replace by ...
15557 (init_registers_powerpc_altivec64l): ... this new prototype.
15558 (ppc_num_regs): Set to 73.
15559 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15560 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15561 (ppc_cannot_store_register): Handle orig_r3 and trap.
15562 (ppc_arch_setup): Update init_registers_... calls.
15563 (ppc_fill_gregset): Handle orig_r3 and trap.
15564
15565 * inferiors.c (clear_inferiors): Reset current_inferior.
15566
fdc59709
PB
155672008-04-23 Paolo Bonzini <bonzini@gnu.org>
15568
889bf7c5
PA
15569 * acinclude.m4: Add override.m4.
15570 * configure: Regenerate.
fdc59709 15571
c9b2f845
UW
155722008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15573
15574 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15575 initial call to init_register_ppc64.
15576
550512b8
UW
155772008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15578
43aaf8b6
PA
15579 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15580 single powerpc*-*-linux* case.
550512b8
UW
15581 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15582
b6430ec3
UW
155832008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15584
15585 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15586 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15587 from reg_xmlfiles.
15588 * linux-ppc-low.c: Include <elf.h>.
15589 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15590 (ppc_hwcap): New global variable.
15591 (ppc_regmap): Remove __SPE__ #ifdef sections.
15592 (ppc_regmap_e500): New global variable.
15593 (ppc_cannot_store_register): Update __SPE__ special case.
15594 (ppc_get_hwcap): New function.
15595 (ppc_arch_setup): Use it to determine whether inferior supports
15596 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15597 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15598 Do not access registers if target does not support AltiVec.
15599 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15600 Do not access registers if target does not support SPE.
15601 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15602
52fa2412
UW
156032008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15604
15605 * linux-low.c (disabled_regsets, num_regsets): New.
15606 (use_regsets_p): Delete.
15607 (linux_wait_for_process): Clear disabled_regsets.
15608 (regsets_fetch_inferior_registers): Check and set it.
15609 (regsets_store_inferior_registers): Likewise.
15610 (linux_fetch_registers, linux_store_registers): Do not use
15611 use_regsets_p.
15612 (initialize_low): Allocate disabled_regsets.
15613
e28b3332
DJ
156142008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15615
15616 * Makefile.in (LIBOBJS): New.
15617 (OBS): Use LIBOBJS.
15618 (memmem.o): New rule.
15619 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15620 * configure: Regenerated.
15621
4536995d
UW
156222008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15623
15624 * server.c (handle_query): Never return "unsupported" for
15625 qXfer:features:read queries.
15626
221c031f
UW
156272008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15628
15629 * server.c (get_features_xml): Fix inverted condition.
15630 (handle_query): Always support qXfer:feature:read.
15631
ccd213ac
DJ
156322008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15633
15634 * server.c (wrapper_argv): New.
15635 (start_inferior): Handle wrapper_argv. If set, expect an extra
15636 trap.
15637 (gdbserver_usage): Document --wrapper.
15638 (main): Parse --wrapper.
15639
6fe305f7
UW
156402008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15641
15642 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15643 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15644 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15645 (ppc_set_pc): Likewise.
15646 (ppc_arch_setup): New function.
15647 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15648 of collect_register.
889bf7c5 15649 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15650
5b0a002e
UW
156512008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15652
15653 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15654 instead of linux-ppc64-low.o.
15655 * linux-ppc64-low.c: Remove file.
15656 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15657 (linux-ppc64-low.o): Remove rule.
15658
15659 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15660 (init_registers_powerpc_64): Likewise.
15661 (ppc_regmap): Conditionally define depending on __powerpc64__.
15662 (ppc_cannot_store_register): Do not special-case "fpscr" when
15663 compiled on __powerpc64__.
15664 (ppc_collect_ptrace_register): New function.
15665 (ppc_supply_ptrace_register): New function.
15666 (ppc_breakpoint): Change type to "unsigned int".
15667 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15668 (the_low_target): Conditionally provide initializers for the
889bf7c5 15669 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15670 collect_ptrace_register and supply_ptrace_register members.
15671
9b4b61c8
UW
156722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15673
15674 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15675 * server.c (gdbserver_xmltarget): Define.
15676 (get_features_xml): Use it to replace "target.xml" and arch_string.
15677
15678 * configure.srv: Remove srv_xmltarget. Add XML files that were
15679 mentioned there to srv_xmlfiles instead. Remove conditional tests
15680 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15681 srv_xmlfiles and srv_regobj to include all possible choices.
15682 * configure.ac (srv_xmltarget): Remove.
15683 (srv_xmlfiles): Do not add "target.xml".
15684 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15685 checks for supplementary target information.
15686 * configure: Regenerate.
15687 * Makefile.in (XML_TARGET): Remove.
15688 (target.xml): Remove rule.
15689 (clean): Do not clean up target.xml.
15690 (.PRECIOUS): Do not mention target.xml.
15691
15692 * target.h (struct target_ops): Remove arch_string member.
15693 * linux-low.c (linux_arch_string): Remove.
15694 (linux_target_ops): Remove arch_string initializer.
15695 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15696 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15697 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15698 * spu-low.c (spu_arch_string): Remove.
15699 (spu_target_ops): Remove arch_string initializer.
15700 * win32-low.c (win32_arch_string): Remove.
15701 (win32_target_ops): Remove arch_string initializer.
15702 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15703 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15704 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15705
ee1a7ae4
UW
157062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15707
15708 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15709 by collect_ptrace_register and supply_ptrace_register hooks.
15710 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15711 instead of checking for the_low_target.left_pad_xfer.
15712 (usr_store_inferior_registers): Use collect_ptrace_register callback
15713 instead of checking for the_low_target.left_pad_xfer.
15714
15715 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15716 (s390_supply_ptrace_register): Likewise.
15717 (s390_fill_gregset): Call s390_collect_ptrace_register.
15718 (the_low_target): Update.
15719
15720 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15721 (ppc_supply_ptrace_register): Likewise.
15722 (the_low_target): Update.
15723
15724 * linux-i386-low.c (the_low_target): Update.
15725 * linux-x86-64-low.c (the_low_target): Update.
15726
d61ddec4
UW
157272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15728
15729 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15730 reg-s390.o and reg-s390x.o.
15731
15732 * linux-low.c (new_inferior): New global variable.
15733 (linux_create_inferior, linux_attach): Set it.
15734 (linux_wait_for_process): Call the_low_target.arch_setup after the
15735 target has stopped for the first time.
15736 (initialize_low): Do not call the_low_target.arch_setup.
15737
15738 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15739 (s390_set_pc): Likewise.
15740 (s390_arch_setup): New function.
15741 (the_low_target): Use s390_arch_setup as arch_setup routine.
15742
15743 * regcache.c (realloc_register_cache): New function.
15744 (set_register_cache): Call it for each existing regcache.
15745
d05b4ac3
UW
157462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15747
15748 * server.h (init_registers): Remove prototype.
15749
15750 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15751 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15752 instead of init_registers ().
15753 * linux-arm-low.c (init_registers_arm): Add prototype.
15754 (init_registers_arm_with_iwmmxt): Likewise.
15755 (the_low_target): Add initializer for arch_setup field.
15756 * linux-cris-low.c (init_registers_cris): Add prototype.
15757 (the_low_target): Add initializer for arch_setup field.
15758 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15759 (the_low_target): Add initializer for arch_setup field.
15760 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15761 (the_low_target): Add initializer for arch_setup field.
15762 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15763 (the_low_target): Add initializer for arch_setup field.
15764 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15765 (the_low_target): Add initializer for arch_setup field.
15766 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15767 (the_low_target): Add initializer for arch_setup field.
15768 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15769 (init_registers_mips64_linux): Likewise.
15770 (the_low_target): Add initializer for arch_setup field.
15771 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15772 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15773 (the_low_target): Add initializer for arch_setup field.
15774 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15775 (init_registers_powerpc_64): Likewise.
15776 (the_low_target): Add initializer for arch_setup field.
15777 * linux-s390-low.c (init_registers_s390): Add prototype.
15778 (init_registers_s390x): Likewise.
15779 (the_low_target): Add initializer for arch_setup field.
15780 * linux-sh-low.c (init_registers_sh): Add prototype.
15781 (the_low_target): Add initializer for arch_setup field.
15782 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15783 (the_low_target): Add initializer for arch_setup field.
15784 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15785 (the_low_target): Add initializer for arch_setup field.
15786
15787 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15788 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15789 instead of init_registers ().
15790 * win32-arm-low.c (init_registers_arm): Add prototype.
15791 (the_low_target): Add initializer for arch_setup field.
15792 * win32-i386-low.c (init_registers_i386): Add prototype.
15793 (the_low_target): Add initializer for arch_setup field.
15794
15795 * spu-low.c (init_registers_spu): Add prototype.
15796 (initialize_low): Call initialie_registers_spu () instead of
15797 initialize_registers ().
15798
fd96d250
PA
157992008-02-19 Pedro Alves <pedro@codesourcery.com>
15800
15801 * server.c (handle_v_requests): When handling the vRun and vAttach
15802 packets, if already debugging a process, don't kill it. Return an
15803 error instead.
15804
d41b6bb4
DJ
158052008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15806
15807 * server.c (handle_query): Correct length check.
15808
5ac588cf
PA
158092008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15810
15811 * win32-low.c (do_initial_child_stuff): Add process handle
15812 parameter. Set current_process_handle and current_process_id from the
15813 parameters. Clear globals.
15814 (win32_create_inferior): Don't set current_process_handle and
15815 current_process_id here. Instead pass them on the call to
15816 do_initial_child_stuff.
15817 (win32_attach): Likewise.
15818 (win32_clear_inferiors): New.
15819 (win32_kill): Don't close the current process handle or the
15820 current thread handle here. Instead call win32_clear_inferiors.
15821 (win32_detach): Don't open a new handle to the process. Call
15822 win32_clear_inferiors.
15823 (win32_join): Don't rely on current_process_handle; open a new
15824 handle using the process id.
15825 (win32_wait): Call win32_clear_inferiors when the inferior process
15826 has exited.
15827
ecd7ecbc
DJ
158282008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15829
15830 * server.c (monitor_show_help): Add "exit".
15831
1525d545
MG
158322008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15833
ecd7ecbc 15834 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15835 (clean): Add reg-xtensa.c.
15836 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15837 * configure.srv (xtensa*-*-linux*) New target.
15838 * linux-xtensa-low.c: New.
15839 * xtensa-xtregs.c: New.
1525d545 15840
59a016f0
PA
158412008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15842
15843 * hostio.c: Don't include errno.h.
15844 (errno_to_fileio_errno): Move to hostio-errno.
15845 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15846 error number outputting to the target->hostio_last_error callback.
15847 (hostio_packet_error): Use FILEIO_EINVAL directly.
15848 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15849 calls to hostio_error.
15850 * hostio-errno.c: New.
15851 * server.h (hostio_last_error_from_errno): Declare.
15852 * target.h (target_ops): Add hostio_last_error member.
15853 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15854 as hostio_last_error handler.
889bf7c5 15855 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15856 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15857 (wince_hostio_last_error): New functions.
15858 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15859 as hostio_last_error handler.
15860 (win32_target_ops) [!_WIN32_WCE]: Register
15861 hostio_last_error_from_errno as hostio_last_error handler.
15862 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15863 (hostio-errno.o): New rule.
15864 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15865 * configure.srv (srv_hostio_err_objs): New variable. Default to
15866 hostio-errno.o.
15867 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15868 * configure: Regenerate.
15869
2d717e4f
DJ
158702008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15871
15872 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15873 (linux_kill, linux_detach): Clean up the process list.
15874 * remote-utils.c (remote_open): Improve port number parsing.
15875 (putpkt_binary, input_interrupt): Only send interrupts if the target
15876 is running.
15877 * server.c (extended_protocol): Make static.
15878 (attached): Define earlier.
15879 (exit_requested, response_needed, program_argv): New variables.
15880 (target_running): New.
15881 (start_inferior): Clear attached here.
15882 (attach_inferior): Set attached here.
15883 (require_running): Define.
15884 (handle_query): Use require_running and target_running. Implement
15885 "monitor exit".
15886 (handle_v_attach, handle_v_run): New.
15887 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15888 (gdbserver_usage): Update.
15889 (main): Redo argument parsing. Handle --debug and --multi. Handle
15890 --attach along with other options or after the port. Save
15891 program_argv. Support no initial program. Resynchronize
15892 communication with GDB after an error. Handle "monitor exit".
15893 Use require_running and target_running. Always allow the extended
15894 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15895 restart in extended mode.
15896 * README: Refer to the GDB manual. Update --attach usage.
15897
7407e2de
AS
158982007-12-20 Andreas Schwab <schwab@suse.de>
15899
15900 * linux-low.c (STACK_SIZE): Define.
15901 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15902 (linux_test_for_tracefork): Likewise.
15903
b65d95c5
DJ
159042007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15905
15906 * linux-low.c (linux_wait_for_event): Update messages. Do not
15907 reinsert auto-delete breakpoints.
15908 * mem-break.c (struct breakpoint): Change return type of handler to
15909 int.
15910 (set_breakpoint_at): Update handler type.
15911 (reinsert_breakpoint_handler): Return 1 instead of calling
15912 delete_breakpoint.
15913 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15914 setting a new one.
15915 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15916 * mem-break.h (set_breakpoint_at): Update handler type.
15917 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15918 * win32-low.c (auto_delete_breakpoint): New.
15919 (get_child_debug_event): Use it.
15920
4e799345
DJ
159212007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15922
15923 * configure.ac: Check for pread and pwrite.
15924 * hostio.c (handle_pread): Fall back to lseek and read.
15925 (handle_pwrite): Fall back to lseek and write.
15926 * config.in, configure: Regenerated.
15927
27524b67
DJ
159282007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15929
15930 * server.c (myresume): Add own_buf argument.
15931 (main): Update calls.
15932
a20d5e98
DJ
159332007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15934
15935 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15936 * remote-utils.c (remote_open): Do not call disable_async_io.
15937 (block_async_io): Delete.
15938 (unblock_async_io): Make static.
15939 (initialize_async_io): New.
15940 * server.c (handle_v_cont): Handle async I/O here.
15941 (myresume): Likewise. Move other common resume tasks here...
15942 (main): ... from here. Call initialize_async_io. Disable async
15943 I/O before the main loop.
15944 * server.h (initialize_async_io): Declare.
15945 (block_async_io, unblock_async_io): Delete prototypes.
15946 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15947
b79d787e
DJ
159482007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15949
15950 * remote-utils.c (readchar): Allow binary data in received messages.
15951
d97903b2
PA
159522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15953
15954 * win32-low.c (attaching): New global.
15955 (win32_create_inferior): Clear the `attaching' global.
15956 (win32_attach): Set the `attaching' global.
15957 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15958 attaching. Only set a breakpoint at the entry point if not
15959 attaching.
15960
311de423
PA
159612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15962
15963 * server.c (main): Don't report dll events on the initial
15964 connection on attaches.
15965
6c2d16d2
PA
159662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15967
15968 * server.c (main): Relax numerical bases supported for the pid of
15969 the --attach command line argument.
15970
5ca906e6
PA
159712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15972
15973 * win32-low.c (win32_attach): Call OpenProcess before
15974 DebugActiveProcess, not after. Add last error output to error
15975 call.
15976
9c6c8194
PA
159772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15978
15979 * win32-low.c (win32_get_thread_context)
15980 (win32_set_thread_context): New functions.
15981 (thread_rec): Use win32_get_thread_context.
15982 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15983 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15984 field.
15985
4d5d1aaa
PA
159862007-12-03 Leo Zayas
15987 Pedro Alves <pedro_alves@portugalmail.pt>
15988
15989 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15990 global variables.
15991 (child_add_thread): Minor cleanup.
15992 (child_continue): Resume artificially suspended threads before
15993 calling ContinueDebugEvent.
15994 (suspend_one_thread): New.
15995 (fake_breakpoint_event): New.
15996 (get_child_debug_event): Change return type to int. Check here if
15997 gdb sent an interrupt request. If a soft interrupt was requested,
15998 fake a breakpoint event. Return 0 if there is no event to handle,
15999 and 1 otherwise.
16000 (win32_wait): Don't check here if gdb sent an interrupt request.
16001 Ensure there is a valid event to handle.
16002 (win32_request_interrupt): Add soft interruption method as last
16003 resort.
16004
c436e841
PA
160052007-12-03 Leo Zayas
16006 Pedro Alves <pedro_alves@portugalmail.pt>
16007
16008 * win32-low.h (win32_thread_info): Add descriptions to the
16009 structure members. Replace `suspend_count' counter by a
16010 `suspended' flag.
16011 * win32-low.c (thread_rec): Update condition of when to get the
16012 context from the inferior. Rely on ContextFlags being set if it
16013 has already been retrieved. Only suspend the inferior thread if
16014 we haven't already. Warn if that fails.
16015 (continue_one_thread): s/suspend_count/suspended/. Only call
16016 ResumeThread once. Warn if that fails.
16017
e7b5fa67
PA
160182007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16019
16020 * win32-low.c (win32_wait): Don't read from the inferior when it
16021 has already exited.
16022
a385171d
PA
160232007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16024
16025 * Makefile.in (win32_low_h): New variable.
16026 (win32-low.o): Add dependency on $(win32_low_h).
16027 (win32-arm-low.o, win32-i386-low.o): New rules.
16028
f80c84b3
DJ
160292007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16030
16031 * hostio.c: Correct copyright year.
16032
a6b151f1
DJ
160332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16034
16035 * Makefile.in (OBS): Add hostio.o.
16036 (hostio.o): New rule.
16037 * server.h (handle_vFile): Declare.
16038 * hostio.c: New file.
16039 * server.c (handle_v_requests): Take packet_len and new_packet_len
16040 for binary packets. Call handle_vFile.
16041 (main): Update call to handle_v_requests.
16042
f9387fc3
DJ
160432007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16044
16045 * linux-low.c: Include <sched.h>.
16046
51c2684e
DJ
160472007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16048
16049 * linux-low.c (linux_tracefork_grandchild): New.
16050 (linux_tracefork_child): Use clone.
16051 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16052
75f83163
JB
160532007-10-31 Joel Brobecker <brobecker@adacore.com>
16054
16055 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16056
da5898ce
DJ
160572007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16058
16059 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16060
24a09b5f
DJ
160612007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16062
16063 * inferiors.c (change_inferior_id): Delete.
16064 (add_pid_to_list, pull_pid_from_list): New.
16065 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16066 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16067 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16068 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16069 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16070 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16071 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16072 (using_threads): Always set to 1.
16073 (handle_extended_wait): New.
16074 (add_process): Do not set TID.
16075 (linux_create_inferior): Set must_set_ptrace_flags.
16076 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16077 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16078 (linux_thread_alive): Rename TID argument to LWPID.
16079 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16080 (linux_wait_for_event): Do not use TID or check using_threads. Update
16081 call to dead_thread_notify. Call handle_extended_wait.
16082 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16083 (send_sigstop): Delete sigstop_sent.
16084 (wait_for_sigstop): Avoid TID.
16085 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16086 (linux_test_for_tracefork): New.
16087 (linux_lookup_signals): Use thread_db_active and
16088 linux_supports_tracefork_flag.
16089 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16090 * linux-low.h (get_process_thread): Avoid TID.
16091 (struct process_ifo): Move thread_known and tid to the end. Remove
16092 sigstop_sent.
16093 (linux_attach_lwp, thread_db_init): Update prototypes.
16094 * server.h (change_inferior_id): Delete prototype.
16095 (add_pid_to_list, pull_pid_from_list): New prototypes.
16096 * thread-db.c (thread_db_use_events): New.
16097 (find_first_thread): Rename to...
16098 (find_one_thread): ...this. Update callers and messages. Do not
16099 call fatal. Check thread_db_use_events. Do not call
16100 change_inferior_id or new_thread_notify.
16101 (maybe_attach_thread): Update. Do not call new_thread_notify.
16102 (thread_db_init): Set thread_db_use_events. Check use_events.
16103 * utils.c (fatal, warning): Correct message prefix.
16104
30ed0a8f
DJ
161052007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16106
16107 * Makefile.in (clean): Remove new files.
16108 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16109 (powerpc-64.o, powerpc-64.c): New rules.
16110 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16111 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16112 with SPE.
16113 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16114 SPE targets.
16115 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16116 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16117 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16118 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16119 (target_regsets): Add AltiVec and SPE register sets.
16120 * configure.ac: Check for AltiVec and SPE.
16121 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16122 (ppc_fill_vrregset, ppc_store_vrregset): New.
16123 (target_regsets): Add AltiVec register set.
16124 * configure: Regenerated.
16125
fd462a61
DJ
161262007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16127
16128 * linux-low.c (O_LARGEFILE): Define.
16129 (linux_read_memory): Use /proc/PID/mem.
16130 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16131 * configure, config.in: Regenerated.
16132
69f223ed
DJ
161332007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16134
16135 * linux-low.c (linux_wait_for_event): Do not pass signals while
16136 single-stepping.
16137
aec18585
PA
161382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16139
16140 * win32-low.c (create_process): New.
16141 (win32_create_inferior): Use create_process instead of
16142 CreateProcess. If create_process failed retry appending an ".exe"
16143 suffix. Store the GetLastError result immediatelly after
16144 create_process calls and use it on the call to error.
16145
34d86ddd
PA
161462007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16147
16148 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16149
5a0e3bd0
JB
161502007-08-23 Joel Brobecker <brobecker@adacore.com>
16151
16152 * configure.ac: Switch license to GPLv3.
16153
f88c79e6
MS
161542007-08-01 Michael Snyder <msnyder@access-company.com>
16155
16156 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16157
6b3d9b83
PA
161582007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16159
16160 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16161 typedef.
16162 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16163 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16164 CloseToolhelp32Snapshot.
16165 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16166 CloseToolhelp32Snapshot.
16167
c588c53c
MS
161682007-07-27 Michael Snyder <michael.snyder@access-company.com>
16169
16170 * server.c (main): Check for inferior exit before main loop.
16171
aa0403d9
PA
161722007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16173
16174 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16175 instead of on tmp_desc.
16176
255e7678
DJ
161772007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16178 Daniel Jacobowitz <dan@codesourcery.com>
16179
16180 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16181 (add_thread): Minor cleanups.
16182 (clear_inferiors): Move lower in the file. Clear the DLL
16183 list.
16184 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16185 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16186 (xml_escape_text): New.
16187 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16188 for qSupported.
16189 (handle_v_cont): Report errors.
16190 (gdbserver_version): Update.
16191 (main): Correct size of own_buf. Do not report initial DLL events.
16192 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16193 (unloaded_dll, xml_escape_text): New.
16194 * win32-low.c (enum target_waitkind): Update comments.
16195 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16196 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16197 (win32_EnumProcessModules, win32_GetModuleInformation)
16198 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16199 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16200 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16201 (win32_Module32First, win32_Module32Next, load_toolhelp)
16202 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16203 (get_child_debug_event): Handle DLL events.
16204 (win32_wait): Likewise.
16205
0d37add9
DJ
162062007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16207
16208 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16209 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16210
45e2715e
PA
162112007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16212
16213 * win32-low.c (handle_output_debug_string): Ignore event if not
16214 waiting.
16215
c5674cf1
PA
162162007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16217
16218 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16219
2bbe3cc1
DJ
162202007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16221
16222 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16223
ae13219e
DJ
162242007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16225
16226 * inferiors.c (change_inferior_id): Add comment.
16227 * linux-low.c (check_removed_breakpoint): Add an early
16228 prototype. Improve debug output.
16229 (linux_attach): Doc update.
16230 (linux_detach_one_process, linux_detach): Clean up before releasing
16231 each process.
16232 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16233 * linux-low.h (struct process_info): Doc improvement.
16234 * mem-break.c (delete_all_breakpoints): New.
16235 * mem-break.h (delete_all_breakpoints): New prototype.
16236 * thread-db.c (find_first_thread): New.
16237 (thread_db_create_event): Call it instead of
16238 thread_db_find_new_threads. Clean up unused variables.
16239 (maybe_attach_thread): Remove first thread handling.
16240 (thread_db_find_new_threads): Use find_first_thread.
16241 (thread_db_get_tls_address): Likewise.
16242
4105de34
DJ
162432007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16244
16245 * thread-db.c (thread_db_find_new_threads): Add prototype.
16246 (thread_db_create_event): Check for the main thread before adding
16247 a new thread.
16248 (maybe_attach_thread): Only enable event reporting if TID == 0.
16249 (thread_db_get_tls_address): Check for new threads.
16250
2b876972
DJ
162512007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16252
16253 * linux-low.c (linux_create_inferior): Try execv before execvp.
16254 * spu-low.c (spu_create_inferior): Likewise.
16255
7a245884
DJ
162562007-06-13 Mike Frysinger <vapier@gentoo.org>
16257
16258 * linux-low.c (linux_create_inferior): Change execv to execvp.
16259 * spu-low.c (spu_create_inferior): Likewies.
16260
117ce543
DJ
162612007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16262
16263 * Makefile.in (clean): Clean new files instead of deleted ones.
16264 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16265 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16266 rules.
16267 * configure.srv: Specify XML files and new regformats for MIPS and
16268 MIPS64 GNU/Linux.
16269 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16270 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16271 an entry for the restart register.
16272 (mips_cannot_fetch_register, mips_cannot_store_register)
16273 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16274 register names to match the XML descriptions.
16275 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16276 restart register instead of $0.
16277
0e7f50da
UW
162782007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16279 Markus Deuling <deuling@de.ibm.com>
16280
16281 * remote-utils.c (decode_xfer_write): New function.
16282 * server.h (decode_xfer_write): Add prototype.
16283 * server.c (handle_query): Add PACKET_LEN argument. Support
16284 qXfer:spu:read and qXfer:spu:write packets.
16285 (main): Pass packet_len to handle_query.
16286 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16287 * target.h (target_ops): Add qxfer_spu.
16288
374c1d38
UW
162892007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16290
16291 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16292 accessing non-seekable spufs files.
16293
bb63802a
UW
162942007-05-16 Markus Deuling <deuling@de.ibm.com>
16295
889bf7c5 16296 * server.c (handle_query): Add reply for qC packet.
bb63802a 16297
7390519e
PA
162982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16299 Leo Zayas <lerele@champenstudios@com>
16300
16301 * server.h (check_remote_input_interrupt_request): New function.
16302 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16303 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16304 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16305 (check_remote_input_interrupt_request): New function.
16306 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16307 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16308 winapi_GenerateConsoleCtrlEvent): New typedefs.
16309 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16310 to 250 ms.
16311 (win32_wait): Check for remote interrupt request
16312 with check_remote_input_interrupt_request.
16313 (win32_request_interrupt): New function.
16314 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16315
34b34921
PA
163162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16317
16318 * win32-low.c (debug_registers_changed,
16319 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16320 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16321 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16322 (thread_rec): Get context using the low target.
16323 (child_add_thread): Call thread_added on the low target,
16324 which does the same thing.
16325 (regptr): Delete.
16326 (do_initial_child_stuff): Remove debug registers references.
16327 Set context using the low target. Resume threads after
16328 setting the contexts.
16329 (child_continue): Remove dead variable. Remove debug
16330 registers references.
16331 (child_fetch_inferior_registers): Go through the low target.
16332 (do_child_store_inferior_registers): Remove.
16333 (child_store_inferior_registers): Go through the low target.
16334 (win32_resume): Remove debug registers references.
16335 Set context using the low target.
16336 (handle_exception): Change return type to void. Don't record
16337 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16338 first chance exception.
889bf7c5 16339 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16340 goto loop. Always return after waiting for debug event.
16341 (win32_wait): Convert to switch statement. Handle spurious
16342 events.
16343
16344 * win32-i386-low.c (debug_registers_changed,
16345 debug_registers_used): New.
16346 (initial_stuff): Rename to ...
16347 (i386_initial_stuff): ... this. Clear debug registers
16348 state variables.
16349 (store_debug_registers): Delete.
16350 (i386_get_thread_context): New.
16351 (load_debug_registers): Delete.
16352 (i386_set_thread_context): New.
16353 (i386_thread_added): New.
16354 (single_step): Rename to ...
16355 (i386_single_step): ... this.
16356 (do_fetch_inferior_registers): Rename to ...
16357 (i386_fetch_inferior_register): ... this.
16358 (i386_store_inferior_register): New.
16359 (the_low_target): Adapt to new interface.
16360
16361 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16362 (arm_get_thread_context): New.
16363 (arm_set_thread_context): New.
16364 (regptr): New.
16365 (do_fetch_inferior_registers): Rename to ...
16366 (arm_fetch_inferior_register): ... this.
16367 (arm_store_inferior_register): New.
16368 (arm_wince_breakpoint): Reimplement as unsigned long.
16369 (arm_wince_breakpoint_len): Define.
16370 (the_low_target): Adapt to new interface.
16371
16372 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16373 load_debug_registers. Add get_thread_context, set_thread_context,
16374 thread_added and store_inferior_register. Rename
16375 fetch_inferior_registers to fetch_inferior_register.
16376 (regptr): Remove declaration.
16377
dd6953e1
PA
163782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16379
16380 * linux-low.c (linux_detach): Change return type to int. Return 0.
16381 * spu-low.c (spu_detach): Likewise.
16382
444d6139
PA
163832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16384
16385 * target.h (target_ops): Change return type of detach to int.
16386 Add join.
16387 (join_inferior): New.
16388 * server.c (main): Don't skip detach support on mingw32.
16389 If the inferior doesn't support detaching return error.
16390 Call join_inferior instead of using waitpid.
16391 * linux-low.c (linux_join): New.
16392 (linux_target_op): Add linux_join.
16393 * spu-low.c (spu_join): New.
16394 (spu_target_ops): Add spu_join.
16395 * win32-low.c (win32_detach): Adapt to new interface.
16396 Reopen current_process_handle before detaching. Issue a child
16397 resume before detaching.
16398 (win32_join): New.
16399 (win32_target_op): Add win32_join.
16400
1d5315fe
PA
164012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16402
16403 * win32-low.c (win32-attach): Fix return value.
16404 * target.h (target_ops): Describe ATTACH return values.
16405
bf914831
PA
164062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16407
16408 * win32-low.c (GETPROCADDRESS): Define.
16409 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16410 (winapi_DebugSetProcessKillOnExit): Likewise.
16411 (win32_create_inferior): Force usage of ansi CreateProcessA.
16412 (win32_attach): Use GETPROCADDRESS.
16413 (win32_detach): Likewise.
16414
f72f3e60
PA
164152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16416
16417 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16418
ed50f18f
PA
164192007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16420
16421 * win32-low.c: Commit leftover changes from 2007-03-29.
16422
0c2ead7e
DJ
164232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16424
16425 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16426 fields short instead of int. Add explicit padding.
16427 (i387_cache_to_fsave): Remove unnecessary casts.
16428 (i387_fsave_to_cache): Doc fix.
16429 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16430
73725ff3
DJ
164312007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16432
16433 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16434 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16435
d99f33d8
PA
164362007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16437
16438 * configure.srv (arm*-*-mingw32ce*): Move near the other
16439 arm targets.
16440
68070c10
PA
164412007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16442
2482afc6 16443 * configure.ac: Add errno checking.
68070c10
PA
16444 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16445 sys/file.h and malloc.h.
16446 (AC_CHECK_DECLS): Add perror.
16447 (srv_mingwce): Handle.
2482afc6 16448 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16449 win32-i386-low.o to srv_tgtobj.
16450 (i[34567]86-*-mingw*): Likewise.
16451 (arm*-*-mingw32ce*): Add case.
16452 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16453 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16454 [__MINGW32CE__] (strerror): New function.
16455 [__MINGW32CE__] (errno): Define to GetLastError.
16456 [__MINGW32CE__] (COUNTOF): New macro.
16457 (remote_open): Remove extra close call.
16458 * mem-break.c (delete_breakpoint_at): New function.
16459 * mem-break.h (delete_breakpoint_at): Declare.
16460 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16461 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16462 [USE_WIN32API] (read, write): Add char* casts.
16463 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16464 * server.h: Include wincecompat.h on Windows CE.
16465 [HAVE_ERRNO_H]: Check.
16466 (perror): Declare if not declared.
16467 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16468 (perror_with_name): Remove errno declaration.
16469 * wincecompat.h: New.
16470 * wincecompat.c: New.
16471 * win32-low.h: New.
16472 * win32-arm-low.c: New.
16473 * win32-i386-low.c: New.
16474 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16475 (OUTMSG2): Make it safe.
16476 (_T): New macro.
16477 (COUNTOF): New macro.
16478 (NUM_REGS): Get it from the low target.
16479 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16480 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16481 (thread_rec): Let low target handle debug registers.
16482 (child_add_thread): Likewise.
16483 (child_init_thread_list): Likewise.
16484 (continue_one_thread): Likewise.
16485 (regptr): New.
16486 (do_child_fetch_inferior_registers): Move to ...
16487 * win32-i386-low.c: ... here, and rename to ...
16488 (do_fetch_inferior_registers): ... this.
889bf7c5 16489 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16490 Go through the low target.
16491 (do_child_store_inferior_registers): Use regptr.
16492 (strwinerror): New function.
16493 (win32_create_inferior): Handle Windows CE.
16494 Use strwinerror instead of strerror on Windows error
16495 codes. Add program to the error output.
16496 Don't close the main thread handle on Windows CE.
16497 (win32_attach): Use coredll.dll on Windows CE.
16498 (win32_kill): Close current process and current
16499 thread handles.
16500 (win32_detach): Use coredll.dll on Windows CE.
16501 (win32_resume): Let low target handle debug registers, and
16502 step request.
16503 (handle_exception): Add/Remove initial breakpoint. Avoid
16504 non-existant WSTOPSIG on Windows CE.
16505 (win32_read_inferior_memory): Cast to remove warning.
16506 (win32_arch_string): Go through the low target.
16507 (initialize_low): Call set_breakpoint_data with the low
16508 target's breakpoint.
16509 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16510 FOP_REGNUM, mappings): Move to ...
16511 * win32-i386-low.c: ... here.
16512 * win32-low.c (win32_thread_info): Move to ...
16513 * win32-low.h: ... here.
16514 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16515 win32-arm-low.c and wincecompat.c.
16516 (all:): Add $EXEEXT.
16517 (install-only:): Likewise.
16518 (gdbserver:): Likewise.
16519 (gdbreplay:): Likewise.
16520 * config.in: Regenerate.
16521 * configure: Regenerate.
16522
41093d81
PA
165232007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16524
16525 * win32-low.c: Rename typedef thread_info to
16526 win32_thread_info throughout.
16527
544afa54
PA
165282007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16529
16530 * win32-i386-low.c: Rename to ...
16531 * win32-low.c: ... this.
16532 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16533 * Makefile.in: Likewise.
16534
bce7165d
PA
165352007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16536
16537 * remote-utils.c (monitor_output): Constify msg parameter.
16538 * server.h (monitor_output): Likewise.
16539 * win32-i386-low.c (handle_output_debug_string): New.
16540 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16541 handle_output_debug_string.
16542 (get_child_debug_event): Likewise.
16543
506c7aa0
DJ
165442007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16545
16546 * server.c (main): Correct strtoul check.
16547
42c81e2a
DJ
165482007-03-27 Jon Ringle <jon@ringle.org>
16549
16550 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16551
9453113a
DJ
165522007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16553
16554 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16555
64a69107
DJ
165562007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16557
16558 * terminal.h: Check HAVE_SGTTY_H.
16559
165602007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16561
16562 * remote-utils.c (remote_open): Print out the assigned port number.
16563
c74d0ad8
DJ
165642007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16565
16566 * remote-utils.c (monitor_output): New function.
16567 * server.c (debug_threads): Define here.
16568 (monitor_show_help): New function.
16569 (handle_query): Handle qRcmd.
16570 (main): Do not handle 'd' packet.
16571 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16572 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16573 of debug_threads.
16574
de7c3b4a
PA
165752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16576
16577 * Makefile.in (EXEEXT): New.
16578 (clean): Use $(EXEEXT).
16579
ef57601b
PA
165802007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16581
16582 * target.h (target_ops): Rename send_signal to request_interrupt,
16583 and remove enum target_signal parameter.
16584 * linux-low.c (linux_request_interrupt): Rename from
16585 linux_send_signal, and always send SIGINT.
16586 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16587 and always send SIGINT.
16588 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16589 of send_signal.
16590 (input_interrupt): Likewise.
16591
820f2bda
PA
165922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16593
16594 * server.c (get_features_xml): Check if target implemented
16595 arch_string.
16596 * win32-i386-low.c (win32_arch_string): New.
16597 (win32_target_ops): Add win32_arch_string as arch_string member.
16598
ab39bf24
UW
165992007-02-22 Markus Deuling <deuling@de.ibm.com>
16600
16601 * spu-low.c (spu_arch_string): New.
16602 (spu_target_ops): Add spu_arch_string.
16603
61ff6e04
DJ
166042007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16605
16606 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16607 * configure.ac: Do not check for terminal.h.
16608 * configure, config.in: Regenerated.
16609
fb1e4ffc
DJ
166102007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16611
16612 * Makefile.in (OBS): Add $(XML_BUILTIN).
16613 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16614 (clean): Update.
16615 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16616 (arm-with-iwmmxt.c): New.
16617 * config.in, configure: Regenerate.
16618 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16619 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16620 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16621 (arm*-*-linux*): Add iWMMXt and regset support.
16622 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16623 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16624 (arm_store_wmmxregset, target_regsets): New.
16625 * server.c (get_features_xml): Take annex argument. Check builtin
16626 XML documents.
16627 (handle_query): Handle multiple annexes.
16628
0f48aa01
DJ
166292007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16630
16631 * remote-utils.c [USE_WIN32API] (read, write): Define.
16632 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16633 write.
16634
23181151
DJ
166352007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16636
16637 * linux-i386-low.c (the_low_target): Set arch_string.
16638 * linux-x86-64-low.c (the_low_target): Likewise.
16639 * linux-low.c (linux_arch_string): New.
16640 (linux_target_ops): Add it.
16641 * linux-low.h (struct linux_target_ops): Add arch_string.
16642 * server.c (write_qxfer_response): Use const void * for DATA.
16643 (get_features_xml): New.
16644 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16645 * target.h (struct target_ops): Add arch_string method.
16646
9d606399
DJ
166472007-01-03 Denis Pilat <denis.pilat@st.com>
16648 Daniel Jacobowitz <dan@codesourcery.com>
16649
16650 * linux-low.c (linux_kill): Handle being called with no threads.
16651 * win32-i386-low.c (win32_kill): Likewise.
16652 (get_child_debug_event): Clear current_process_handle.
16653
166542006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16655 Daniel Jacobowitz <dan@codesourcery.com>
16656
16657 * remote-utils.c (remote_open): Check the type of specified
16658 serial port devices before opening them.
16659 * server.c (main): Kill the inferior if an error occurs during
16660 the first remote_open.
16661
a5e13d24
DJ
166622006-12-05 Markus Deuling <deuling@de.ibm.com>
16663
16664 * README: Update supported targets.
16665
186947f7
DJ
166662006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16667
16668 * Makefile.in (clean): Remove reg-mips64.c.
16669 (reg-mips64.c, reg-mips64.o): New rules.
16670 * configure.srv: Handle mips64. Include regset support for mips.
16671 * linux-mips-low.c (union mips_register): New.
16672 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16673 (mips_breakpoint, mips_breakpoint_at): Use int.
16674 (mips_collect_register, mips_supply_register)
16675 (mips_collect_register_32bit, mips_supply_register_32bit)
16676 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16677 (mips_store_fpregset, target_regsets): New.
16678 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16679
a13e2c95
UW
166802006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16681
16682 * configure.srv: Add target "spu*-*-*".
16683 * Makefile.in (clean): Remove reg-spu.c.
16684 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16685 * spu-low.c: New file.
16686
cb7283db
DJ
166872006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16688
16689 * configure.ac: Correct td_thr_tls_get_addr test.
16690 * configure: Regenerated.
16691
89be2091
DJ
166922006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16693
16694 * linux-low.c (linux_wait_for_event): Reformat. Use the
16695 pass_signals array.
16696 * remote-utils.c (decode_address_to_semicolon): New.
16697 * server.c (pass_signals, handle_general_set): New.
16698 (handle_query): Mention QPassSignals for qSupported.
16699 (main): Call handle_general_set.
16700 * server.h (pass_signals, decode_address_to_semicolon): New.
16701
000ef4f0
DJ
167022006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16703
16704 * server.c (handle_query): Correct error handling for read_auxv.
16705
b7149293
UW
167062005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16707
16708 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16709 and srv_linux_thread_db to yes.
16710 * linux-s390-low.c (s390_fill_gregset): New function.
16711 (target_regsets): Define data structure.
16712
dae5f5cf
DJ
167132006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16714
16715 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16716 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16717 * config.in, configure: Regenerated.
16718 * inferiors.c (gdb_id_to_thread): New function.
16719 (gdb_id_to_thread_id): Use it.
16720 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16721 * linux-low.h (struct process_info): Add th member.
16722 (thread_db_get_tls_address): New prototype.
16723 * remote-utils.c (decode_address): Make non-static.
16724 * server.c (handle_query): Handle qGetTLSAddr.
16725 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16726 * target.h (struct target_ops): Add get_tls_address.
16727 * thread-db.c (maybe_attach_thread): Save the thread handle.
16728 (thread_db_get_tls_address): New.
16729
32ca6d61
DJ
167302006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16731
16732 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16733 (linux_resume_one_process): Take a siginfo_t *. Update all
16734 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16735 (struct pending_signals): Add a siginfo_t.
16736 (linux_wait_for_process): Always set last_status.
16737 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16738 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16739 * linux-low.h (struct process_info): Add last_status.
16740
5ffff7c1
DJ
167412006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16742
16743 * remote-utils.c (try_rle): New function.
16744 (putpkt_binary): Use it.
16745
8695c747
DJ
167462006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16747
16748 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16749 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16750 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16751 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16752 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16753 point registers.
16754
290fadea
RS
167552006-08-08 Richard Sandiford <richard@codesourcery.com>
16756
16757 * server.c (terminal_fd): New variable.
16758 (old_foreground_pgrp): Likewise.
16759 (restore_old_foreground_pgrp): New function.
16760 (start_inferior): Record the terminal file descriptor in terminal_fd
16761 and its original foreground group in old_foreground_pgrp. Register
16762 restore_old_foreground_pgrp with atexit().
16763
9f2e1e63
DJ
167642006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16765
16766 * server.c (handle_query): Correct qPart to qXfer.
16767
b80864fb
DJ
167682006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16769
16770 * configure.ac: Check for more headers which are missing on
16771 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16772 * configure.srv: Add Cygwin and mingw32.
16773 * remote-utils.c: Don't include headers unconditionally which
16774 are missing on mingw32. Include <winsock.h> for mingw32.
16775 (remote_open): Adjust for mingw32 support. Flush
16776 standard error after writing to it.
16777 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16778 (unblock_async_io, enable_async_io, disable_async_io)
16779 (readchar, getpkt): Update for Winsock support.
16780 (prepare_resume_reply): Expect a protocol signal number.
16781 * server.c: Disable <sys/wait.h> on mingw32.
16782 (start_inferior): Adjust for mingw32 support. Flush
16783 standard error after writing to it.
16784 (attach_inferior): Likewise. Use protocol signal
16785 numbers.
16786 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16787 and names.
16788 * win32-i386-low.c: New file.
16789 * Makefile.in (XM_CLIBS): Set.
16790 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16791 (win32-i386-low.o): New dependency rule.
16792 * linux-low.c (linux_wait): Use target signal numbers.
16793 * target.h (struct target_ops): Doc fix.
16794 * server.h (target_signal_to_name): New prototype.
16795 * gdbreplay.c: Don't include headers unconditionally which
16796 are missing on mingw32. Include <winsock.h> for mingw32.
16797 (remote_close, remote_open): Adjust for Winsock support.
16798 * configure, config.in: Regenerated.
16799
0876f84a
DJ
168002006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16801
16802 * server.c (decode_xfer_read, write_qxfer_response): New.
16803 (handle_query): Take a packet length argument. Handle
16804 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16805 the qSupported response.
16806 (main): Update call to handle_query.
16807
01f9e8fa
DJ
168082006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16809
16810 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16811 (putpkt_binary): Renamed from putpkt and adjusted for binary
16812 data.
16813 (putpkt): New wrapper for putpkt_binary.
16814 (readchar): Don't mask off the high bit.
16815 (decode_X_packet): New function.
16816 * server.c (main): Call putpkt_binary if a handler sets the packet
16817 length. Save the length of the incoming packet. Handle 'X'.
16818 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16819
be2a5f71
DJ
168202006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16821
16822 * server.c (handle_query): Handle qSupported.
16823
ea025f5f
DJ
168242006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16825
16826 * remote-utils.c (all_symbols_looked_up): New variable.
16827 (look_up_one_symbol): Check it.
16828 * server.h (look_up_one_symbol): New declaration.
16829 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16830
9308fc88
DJ
168312006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16832
16833 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16834 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16835 (PTRACE_GET_THREAD_AREA): Define.
16836 (ps_get_thread_area): New function.
16837
52fb6437
NS
168382006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16839
16840 * configure.srv (m68k*-*-uclinux*): New target.
16841 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16842 (linux_resume_one_process): Remove extraneous cast.
16843 (linux_read_offsets): New.
16844 (linux_target_op): Add linux_read_offsets on mmuless systems.
16845 * server.c (handle_query): Add qOffsets logic.
16846 * target.h (struct target_ops): Add read_offsets.
16847
21b0f40c
DJ
168482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16849
16850 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16851 (PTRACE_GET_THREAD_AREA): Define.
16852 (ps_get_thread_area): New function.
16853 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16854 (linux-x86-64-low.o): Update.
16855
0050a760
DJ
168562006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16857
16858 * configure.ac: Remove checks for prfpregset_t.
16859 * gdb_proc_service.h: New file.
16860 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16861 new "gdb_proc_service.h".
16862 * proc-service.c: Likewise.
16863 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16864 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16865 * Makefile.in (gdb_proc_service_h): Updated.
16866 * configure, config.in: Regenerated.
16867
b92a518e
DJ
168682006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16869
16870 * remote-utils.c (prepare_resume_reply): Move declaration
16871 of gdb_id_from_wait to the top of the block.
16872
545587ee
DJ
168732006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16874
16875 * linux-low.c (regsets_store_inferior_registers): Read the regset
16876 from the target before filling it.
16877
9db87ebd
DJ
168782006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16879
16880 * server.c (attach_inferior): Return SIGTRAP for a successful
16881 attach.
16882
dd24457d
DJ
168832006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16884
16885 * Makefile.in (OBS): Add version.o.
16886 (STAGESTUFF): Delete.
16887 (version.o): Add dependencies.
16888 (version.c): Replace rule.
16889 (clean): Remove version.c.
16890 * server.c (gdbserver_version): New.
16891 (gdbserver_usage): Use printf.
16892 (main): Handle --version and --help.
16893 * server.h (version, host_name): Add declarations.
16894
6f0f660e
EZ
168952005-12-23 Eli Zaretskii <eliz@gnu.org>
16896
889bf7c5
PA
16897 * linux-arm-low.c:
16898 * linux-arm-low.c:
16899 * inferiors.c:
16900 * i387-fp.h:
16901 * i387-fp.c:
16902 * gdbreplay.c:
16903 * regcache.c:
16904 * proc-service.c:
16905 * mem-break.h:
16906 * mem-break.c:
16907 * linux-x86-64-low.c:
16908 * linux-sh-low.c:
16909 * linux-s390-low.c:
16910 * linux-ppc64-low.c:
16911 * linux-ppc-low.c:
16912 * linux-mips-low.c:
16913 * linux-m68k-low.c:
16914 * linux-m32r-low.c:
16915 * linux-low.h:
16916 * linux-low.c:
16917 * linux-ia64-low.c:
16918 * linux-i386-low.c:
16919 * linux-crisv32-low.c:
16920 * thread-db.c:
16921 * terminal.h:
16922 * target.h:
16923 * target.c:
16924 * server.h:
16925 * server.c:
16926 * remote-utils.c:
16927 * regcache.h:
16928 * utils.c:
16929 * Makefile.in:
16930 * configure.ac:
6f0f660e
EZ
16931 * gdbserver.1: Add (C) after Copyright. Update the FSF
16932 address.
16933
9d1fb177
DJ
169342005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16935
16936 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16937 (arm_breakpoint_at): Recognize both breakpoints.
16938 (the_low_target): Use the correct breakpoint instruction.
16939
011a70c2
DJ
169402005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16941
16942 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16943 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16944 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16945 (the_low_target): Update.
16946
7fb85e41
AS
169472005-10-25 Andreas Schwab <schwab@suse.de>
16948
16949 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16950
16951 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16952 (ia64_num_regs): Reduce to 462.
16953
3db0444b
DJ
169542005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16955
16956 * acinclude.m4: Correct quoting.
16957 * aclocal.m4: Regenerated.
16958
16959 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16960 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16961 (thread_db_init): Call thread_db_err_str.
16962 * configure.ac: Check for TD_VERSION.
16963 * config.in, configure: Regenerated.
16964
bee0189a
DJ
169652005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16966
16967 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16968
e9d25b98
DJ
169692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16970
16971 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16972 is not available. Define HAVE_PTRACE_GETREGS if it is.
16973 * config.in, configure: Regenerated.
16974 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16975 * linux-i386-low.c, linux-m68k-low.c: Update to use
16976 HAVE_PTRACE_GETREGS.
16977 * linux-low.c (regsets_fetch_inferior_registers)
16978 (regsets_store_inferior_registers): Only return 0 if we processed
16979 GENERAL_REGS.
16980 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16981 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16982
a06660f7
DJ
169832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16984
16985 * inferiors.c (struct thread_info): Add gdb_id.
16986 (add_thread): Add gdb_id argument.
16987 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16988 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16989 calls to add_thread.
16990 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16991 * server.c (handle_query): Use thread_to_gdb_id.
16992 (handle_v_cont, main): Use gdb_id_to_thread_id.
16993 * server.h (add_thread): Update prototype.
16994 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16995 prototypes.
16996
5a1f5858
DJ
169972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16998
16999 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17000 left-padded registers.
17001 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17002 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17003
e122f1f5
SE
170042005-07-01 Steve Ellcey <sje@cup.hp.com>
17005
17006 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17007 * configure: Regenerate.
17008 * config.in: Regenerate.
17009 * server.h (NEED_DECLARATION_STRERROR):
17010 Replace with !HAVE_DECL_STRERROR.
17011
d592fa2f
DJ
170122005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17013
17014 * linux-low.c (linux_wait, linux_send_signal): Don't test
17015 an unsigned long variable for > 0 if it could be MAX_ULONG.
17016 * server.c (myresume): Likewise.
17017 * target.c (set_desired_inferior): Likewise.
17018
ccbd4912
MK
170192005-06-13 Mark Kettenis <kettenis@gnu.org>
17020
17021 * configure.ac: Simplify and improve check for socklen_t.
17022 * configure, config.in: Regenerate.
17023
f450004a
DJ
170242005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17025
17026 * acconfig.h: Remove.
17027 * configure.ac: Add a test for socklen_t. Use three-argument
17028 AC_DEFINE throughout.
17029 * config.in: Regenerated using autoheader 2.59.
17030 * configure: Regenerated.
17031
17032 * gdbreplay.c (socklen_t): Provide a default.
17033 (remote_open): Use socklen_t.
17034 * remote-utils.c (socklen_t): Provide a default.
17035 (remote_open): Use socklen_t.
17036 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17037 unsigned char.
17038
17039 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17040 char for buffers.
17041 * linux-low.c (linux_read_memory, linux_write_memory)
17042 (linux_read_auxv): Likewise.
17043 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17044 (check_mem_write): Likewise.
17045 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17046 Likewise.
17047 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17048 (registers_from_string, register_data): Likewise.
17049 * server.c (handle_query, main): Likewise.
17050 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17051 (decode_M_packet): Likewise.
17052 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17053 * target.h (struct target_ops): Update read_memory, write_memory,
17054 and read_auxv.
17055 (read_inferior_memory, write_inferior_memory): Update.
17056 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17057 to unsigned char *.
17058 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17059 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17060 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17061 linux-s390-low.c, linux-sh-low.c: Update for changes in
17062 read_inferior_memory and the_low_target->breakpoint.
17063
eee84df1
DJ
170642005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17065
17066 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17067 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17068 * configure.srv: Add powerpc64-*-linux*.
17069 * linux-ppc64-low.c: New file.
17070
45b134e5
OF
170712005-05-23 Orjan Friberg <orjanf@axis.com>
17072
17073 * linux-cris-low.c: New file with support for CRIS.
17074 * linux-crisv32-low.c: Ditto for CRISv32.
17075 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17076 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17077 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17078 reg-crisv32.o, and reg-crisv32.c to make rules.
17079 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17080 recognized targets.
17081
48d93c75
UW
170822005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17083
17084 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17085 of sizeof (PTRACE_XFER_TYPE).
17086 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17087
e013ee27
OF
170882005-05-12 Orjan Friberg <orjanf@axis.com>
17089
889bf7c5 17090 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17091 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17092 pointers for hardware watchpoint support.
17093 * linux-low.h (struct linux_target_ops): Ditto.
17094 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17095 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17096 to linux_target_ops.
17097 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17098 reply packet.
17099 * server.c (main): Recognize 'Z' and 'z' packets.
17100
b0ded00b
UW
171012005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17102
17103 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17104 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17105 (the_low_target): Add new members.
17106
8643e2ad
DJ
171072005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17108
17109 * proc-service.c (ps_lgetregs): Search all_processes instead of
17110 all_threads.
17111
fc620387
DJ
171122005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17113
17114 * server.c (start_inferior): Change return type to int.
17115 (attach_inferior): Change sigptr to int *.
17116 (handle_v_cont, handle_v_requests): Change signal to int *.
17117 (main): Change signal to int.
17118
171192005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17120
17121 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17122 * configure.srv: Add m32r*-*-linux*.
17123 * linux-m32r-low.c: New file.
17124
e0e76420
DJ
171252005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17126
17127 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17128
a1928bad
DJ
171292005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17130
17131 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17132 Take unsigned long arguments for PIDs.
17133 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17134 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17135 (wait_for_sigstop, linux_resume_one_process)
17136 (regsets_fetch_inferior_registers, linux_send_signal)
17137 (linux_read_auxv): Likewise. Update the types of variables holding
17138 PIDs. Update format string specifiers.
17139 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17140 * remote-utils.c (prepare_resume_reply): Likewise.
17141 * server.c (cont_thread, general_thread, step_thread)
17142 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17143 unsigned long.
17144 (handle_query): Update format specifiers.
17145 (handle_v_cont, main): Use strtoul for thread IDs.
17146 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17147 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17148 (general_thread, step_thread, thread_from_wait)
17149 (old_thread_from_wait): Update.
17150 * target.h (struct thread_resume): Use unsigned long for THREAD.
17151 (struct target_ops): Use unsigned long for arguments to attach and
17152 thread_alive.
17153
dcdb98d2
DJ
171542005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17155
17156 * acinclude.m4: Include bfd/bfd.m4 directly.
17157 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17158 <agriffis@toolchain.org>.
17159 * aclocal.m4, configure: Regenerated.
17160
bec39cab
AC
171612005-01-07 Andrew Cagney <cagney@gnu.org>
17162
17163 * configure.ac: Rename configure.in, require autoconf 2.59.
17164 * configure: Re-generate.
17165
434c4c77
DJ
171662004-12-08 Daniel Jacobowitz <dan@debian.org>
17167
17168 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17169 LIBS when finished.
17170 * aclocal.m4: Regenerated.
17171 * configure: Regenerated.
17172
db1d3e1b
AS
171732004-11-21 Andreas Schwab <schwab@suse.de>
17174
17175 * linux-m68k-low.c (m68k_num_gregs): Define.
17176 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17177 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17178 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17179 (m68k_breakpoint_at): New. Add to the_low_target.
17180
17181 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17182 srv_linux_thread_db to yes.
17183
43360365
JB
171842004-10-20 Joel Brobecker <brobecker@gnat.com>
17185
17186 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17187 (ARCH_SET_FS): Likewise.
17188 (ARCH_GET_FS): Likewise.
17189 (ARCH_GET_GS): Likewise.
17190
fd500816
DJ
171912004-10-16 Daniel Jacobowitz <dan@debian.org>
17192
17193 * linux-i386-low.c (ps_get_thread_area): New.
17194 * linux-x86-64-low.c (ps_get_thread_area): New.
17195 * linux-low.c: Include <sys/syscall.h>.
17196 (linux_kill_one_process): Don't kill the first thread here.
17197 (linux_kill): Kill the first thread here.
17198 (kill_lwp): New function.
17199 (send_sigstop, linux_send_signal): Use it.
17200 * proc-service.c: Clean up #ifdefs.
17201 (fpregset_info): Delete.
17202 (ps_lgetregs): Update and enable implementation.
17203 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17204 implementations.
17205 * remote-utils.c (struct sym_cache, symbol_cache): New.
17206 (input_interrupt): Print a clearer message.
17207 (async_io_enabled): New variable.
17208 (enable_async_io, disable_async_io): Use it. Update comments.
17209 (look_up_one_symbol): Use the symbol cache.
17210 * thread-db.c (thread_db_look_up_symbols): New function.
17211 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17212
f6de3c42
DJ
172132004-10-16 Daniel Jacobowitz <dan@debian.org>
17214
17215 * configure.in: Test for -rdynamic.
17216 * configure: Regenerated.
17217 * Makefile (INTERNAL_LDFLAGS): New.
17218 (gdbserver, gdbreplay): Use it.
17219
2c0fc042
AC
172202004-09-02 Andrew Cagney <cagney@gnu.org>
17221
17222 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17223
075b3282
DJ
172242004-03-23 Daniel Jacobowitz <drow@mvista.com>
17225
17226 * linux-low.c (linux_wait): Clear all_processes list also.
17227
fa6a77dc
DJ
172282004-03-12 Daniel Jacobowitz <drow@mvista.com>
17229
17230 * linux-low.c: Include <errno.h>. Remove extern declaration of
17231 errno.
17232
6d782a97
DJ
172332004-03-12 Daniel Jacobowitz <drow@mvista.com>
17234
17235 * gdbreplay.c, server.h, utils.c: Update copyright years.
17236
3a7fb99b
DJ
172372004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17238
17239 * server.c (main): Print child status or termination signal from
17240 variable 'signal', not 'sig'.
17241
c3e735a6
DJ
172422004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17243
17244 * linux-low.c (linux_read_memory): Change return type to
17245 int. Check for and return error from ptrace().
17246 * target.c (read_inferior_memory): Change return type to int. Pass
17247 back return status from the_target->read_memory().
17248 * target.h (struct target_ops): Adapt *read_memory() prototype.
17249 Update comment.
17250 (read_inferior_memory): Adapt prototype.
17251 * server.c (main): Return an error packet if
17252 read_inferior_memory() returns an error.
17253
a59d1c82
DJ
172542004-03-04 Daniel Jacobowitz <drow@mvista.com>
17255
17256 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17257 Unify with other clean targets.
17258
dc3f8883
DJ
172592004-02-29 Daniel Jacobowitz <drow@mvista.com>
17260
17261 * server.c (handle_v_cont): Call set_desired_inferior.
17262
89a208da
DJ
172632004-02-29 Daniel Jacobowitz <drow@mvista.com>
17264
17265 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17266
62ea82f5
DJ
172672004-02-29 Daniel Jacobowitz <drow@mvista.com>
17268
17269 * linux-low.c (linux_wait): Unblock async I/O.
17270 (linux_resume): Block and enable async I/O.
17271 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17272 * server.h (block_async_io, unblock_async_io): Add prototypes.
17273
6910d122
DJ
172742004-02-29 Daniel Jacobowitz <drow@mvista.com>
17275
17276 * remote-utils.c (remote_open): Print a status notice after
17277 opening a TCP port.
17278 * server.c (attach_inferior): Print a status notice after
17279 attaching.
17280
172812004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17282
17283 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17284
c89dc5d4
DJ
172852004-02-26 Daniel Jacobowitz <drow@mvista.com>
17286
17287 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17288 error packet.
17289 * server.c, target.h: Update copyright years.
17290
4b8dad4a
RM
172912004-02-25 Roland McGrath <roland@redhat.com>
17292
17293 * target.h (struct target_ops): New member `read_auxv'.
17294 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17295 * linux-low.c (linux_read_auxv): New function.
17296 (linux_target_ops): Initialize `read_auxv' member to that.
17297
d7446758
JB
172982004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17299
17300 Committed by Jim Blandy <jimb@redhat.com>.
17301
17302 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17303 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17304 instead of GPR_SIZE to distiguish s390 and s390x targets.
17305
5544ad89
DJ
173062004-01-31 Daniel Jacobowitz <drow@mvista.com>
17307
17308 * linux-low.c: Update copyright year.
17309 (check_removed_breakpoint): Clear pending_is_breakpoint.
17310 (linux_set_resume_request, linux_queue_one_thread)
17311 (resume_status_pending_p): New functions.
17312 (linux_continue_one_thread): Use process->resume.
17313 (linux_resume): Only resume threads if there are no pending events.
17314 * linux-low.h (struct process_info): Add resume request
17315 pointer.
17316
2a68b70e
DJ
173172004-01-30 Daniel Jacobowitz <drow@mvista.com>
17318
17319 * regcache.c (new_register_cache): Clear the allocated register
17320 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17321
64386c31
DJ
173222003-10-13 Daniel Jacobowitz <drow@mvista.com>
17323
17324 * linux-low.c (linux_resume): Take a struct thread_resume *
17325 argument.
17326 (linux_wait): Update call.
17327 (resume_ptr): New static variable.
17328 (linux_continue_one_thread): Renamed from
17329 linux_continue_one_process. Use resume_ptr.
17330 (linux_resume): Use linux_continue_one_thread.
17331 * server.c (handle_v_cont, handle_v_requests): New functions.
17332 (myresume): New function.
17333 (main): Handle 'v' case.
17334 * target.h (struct thread_resume): New type.
17335 (struct target_ops): Change argument of "resume" to struct
17336 thread_resume *.
17337 (myresume): Delete macro.
17338
c938e9b0
L
173392003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17340
17341 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17342 (uninstall): Support DESTDIR.
17343
7f313d07
BC
17344Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17345
17346 * configure.srv: Add xscale*linux copy of arm*linux entry.
17347
3b2fc2ea
DJ
173482003-07-24 Daniel Jacobowitz <drow@mvista.com>
17349
17350 * linux-arm-low.c (arm_reinsert_addr): New function.
17351 (the_low_target): Add arm_reinsert_addr.
17352
1c0a559e
MK
173532003-07-08 Mark Kettenis <kettenis@gnu.org>
17354
17355 * mem-break.c: Remove whitespace at end of file.
17356
43d5792c
DJ
173572003-06-28 Daniel Jacobowitz <drow@mvista.com>
17358
17359 * configure.in: Check whether we need to prototype strerror.
17360 * server.h: Optionally prototype strerror.
17361 * gdbreplay.c (perror_with_name): Use strerror.
17362 * linux-low.c (linux_attach_lwp): Use strerror.
17363 * utils.c (perror_with_name): Use strerror.
17364 * config.in, configure: Regenerated.
17365
c8a86edf
DJ
173662003-06-28 Daniel Jacobowitz <drow@mvista.com>
17367
17368 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17369 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17370
73d37363
DJ
173712003-06-20 Daniel Jacobowitz <drow@mvista.com>
17372
17373 * Makefile.in (SFILES): Update.
17374 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17375 low-sun3.c: Remove files.
17376
6ad8ae5c
DJ
173772003-06-17 Daniel Jacobowitz <drow@mvista.com>
17378
17379 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17380 (linux_detach_one_process, linux_detach): New functions.
17381 (linux_target_ops): Add linux_detach.
17382 * server.c (main): Handle 'D' packet.
17383 * target.h (struct target_ops): Add "detach" member.
17384 (detach_inferior): Define.
17385
1581182a
MK
173862003-06-13 Mark Kettenis <kettenis@gnu.org>
17387
17388 From Kelley Cook <kelleycook@wideopenwest.com>:
17389 * configure.srv: Accept i[34567]86 variants.
17390
e5379b03
DJ
173912003-06-05 Daniel Jacobowitz <drow@mvista.com>
17392
17393 * linux-low.c (linux_wait_for_event): Correct comment typos.
17394 (linux_resume_one_process): Call check_removed_breakpoint.
17395 (linux_send_signal): New function.
17396 (linux_target_ops): Add linux_send_signal.
17397 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17398 of kill.
17399 * target.h (struct target_ops): Add send_signal.
17400
2ff29de4
JB
174012003-05-29 Jim Blandy <jimb@redhat.com>
17402
17403 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17404 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17405 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17406 away part of the register's value.
17407
254787d4
DJ
174082003-03-26 Daniel Jacobowitz <drow@mvista.com>
17409
17410 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17411 (linux_wait_for_event, linux_init_signals): Likewise.
17412
94e10508
DJ
174132003-03-17 Daniel Jacobowitz <drow@mvista.com>
17414
17415 * configure.in: Check for stdlib.h.
17416 * configure: Regenerated.
17417 * config.in: Regenerated.
17418
4c0711e0
DJ
174192003-01-04 Andreas Schwab <schwab@suse.de>
17420
17421 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17422
ef66e766
AC
174232003-01-02 Andrew Cagney <ac131313@redhat.com>
17424
17425 * Makefile.in: Remove obsolete code.
17426
a1358604
DJ
174272002-11-20 Daniel Jacobowitz <drow@mvista.com>
17428
17429 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17430 defined(PT_FPR0_HI).
17431
23ce3b1c
DJ
174322002-11-17 Stuart Hughes <seh@zee2.com>
17433
17434 * linux-arm-low.c (arm_num_regs): Increase.
17435 (arm_regmap): Include status register.
17436
174372002-11-17 Daniel Jacobowitz <drow@mvista.com>
17438
17439 * linux-low.c (register_addr): Remove incorrect -1 check.
17440
a9fa9f7d
DJ
174412002-08-29 Daniel Jacobowitz <drow@mvista.com>
17442
17443 * linux-low.c (linux_create_inferior): Call setpgid. Return
17444 the new PID.
17445 (unstopped_p, linux_signal_pid): Remove.
17446 (linux_target_ops): Remove linux_signal_pid.
17447 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17448 global instead of target method.
17449 * target.h (struct target_ops): Remove signal_pid. Update comment
17450 for create_inferior.
17451 * server.c (signal_pid): New variable.
17452 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17453 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17454 (attach_inferior): Set signal_pid.
17455
17574093
DJ
174562002-08-23 Daniel Jacobowitz <drow@mvista.com>
17457
17458 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17459
174602002-08-20 Jim Blandy <jimb@redhat.com>
17461
17462 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17463 default for this.
17464
174652002-08-01 Andrew Cagney <cagney@redhat.com>
17466
17467 * Makefile.in: Make chill references obsolete.
17468
174692002-07-24 Kevin Buettner <kevinb@redhat.com>
17470
17471 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17472 * configure: Regenerate.
17473 * config.in: Regenerate.
17474
174752002-07-09 David O'Brien <obrien@FreeBSD.org>
17476
17477 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17478 (perror_with_name, remote_close, remote_open, expect, play): Static.
17479
174802002-07-04 Michal Ludvig <mludvig@suse.cz>
17481
4b8dad4a 17482 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17483 byte offsets instead of an array of indexes.
17484 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17485
174862002-06-13 Daniel Jacobowitz <drow@mvista.com>
17487
17488 * regcache.c: Add comment.
17489
174902002-06-11 Daniel Jacobowitz <drow@mvista.com>
17491
17492 * thread-db.c: New file.
17493 * proc-service.c: New file.
17494 * acinclude.m4: New file.
17495 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17496 proc-service.o, and thread-db.o.
17497 (linux-low.o): Add USE_THREAD_DB.
17498 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17499 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17500 * aclocal.m4: Regenerated.
17501 * config.in: Regenerated.
17502 * configure: Regenerated.
17503 * configure.in: Check for proc_service.h, sys/procfs.h,
17504 thread_db.h, and linux/elf.h headrs.
17505 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17506 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17507 Check for -lthread_db and thread support.
17508 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17509 PowerPC, and SuperH.
17510 * i387-fp.c: Constify arguments.
17511 * i387-fp.h: Likewise.
17512 * inferiors.c: (struct thread_info): Renamed from
17513 `struct inferior_info'. Remove PID member. Use generic inferior
17514 list header. All uses updated.
17515 (inferiors, signal_pid): Removed.
17516 (all_threads): New variable.
17517 (get_thread): Define.
17518 (add_inferior_to_list): New function.
17519 (for_each_inferior): New function.
17520 (change_inferior_id): New function.
17521 (add_inferior): Removed.
17522 (remove_inferior): New function.
17523 (add_thread): New function.
17524 (free_one_thread): New function.
17525 (remove_thread): New function.
17526 (clear_inferiors): Use for_each_inferior and free_one_thread.
17527 (find_inferior): New function.
17528 (find_inferior_id): New function.
17529 (inferior_target_data): Update argument type.
17530 (set_inferior_target_data): Likewise.
17531 (inferior_regcache_data): Likewise.
17532 (set_inferior_regcache_data): Likewise.
17533 * linux-low.c (linux_bp_reinsert): Remove.
17534 (all_processes, stopping_threads, using_thrads)
17535 (struct pending_signals, debug_threads, pid_of): New.
17536 (inferior_pid): Replace with macro.
17537 (struct inferior_linux_data): Remove.
17538 (get_stop_pc, add_process): New functions.
17539 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17540 Use add_process and add_thread.
17541 (linux_attach_lwp): New function, based on old linux_attach. Use
17542 add_process and add_thread. Set stop_expected for new threads.
17543 (linux_attach): New function.
17544 (linux_kill_one_process): New function.
17545 (linux_kill): Kill all LWPs.
17546 (linux_thread_alive): Use find_inferior_id.
17547 (check_removed_breakpoints, status_pending_p): New functions.
17548 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17549 Update. Use WNOHANG. Wait for cloned processes also. Update process
17550 struct for the found process.
17551 (linux_wait_for_event): New function.
17552 (linux_wait): Use it. Support LWPs.
17553 (send_sigstop, wait_for_sigstop, stop_all_processes)
17554 (linux_resume_one_process, linux_continue_one_process): New functions.
17555 (linux_resume): Support LWPs.
17556 (REGISTER_RAW_SIZE): Remove.
17557 (fetch_register): Use register_size instead. Call supply_register.
17558 (usr_store_inferior_registers): Likewise. Call collect_register.
17559 Fix recursive case.
17560 (regsets_fetch_inferior_registers): Improve error message.
17561 (regsets_store_inferior_registers): Add debugging.
17562 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17563 (unstopped_p, linux_signal_pid): New functions.
17564 (linux_target_ops): Add linux_signal_pid.
17565 (linux_init_signals): New function.
17566 (initialize_low): Call it. Initialize using_threads.
17567 * regcache.c (inferior_regcache_data): Add valid
17568 flag.
17569 (get_regcache): Fetch registers lazily. Add fetch argument
17570 and update all callers.
17571 (regcache_invalidate_one, regcache_invalidate): New
17572 functions.
17573 (new_register_cache): Renamed from create_register_cache.
17574 Return the new regcache.
17575 (free_register_cache): Change argument to a void *.
17576 (registers_to_string, registers_from_string): Call get_regcache
17577 with fetch flag set.
17578 (register_data): Make static. Pass fetch flag to get_regcache.
17579 (supply_register): Call get_regcache with fetch flag clear.
17580 (collect_register): Call get_regcache with fetch flag set.
17581 (collect_register_as_string): New function.
17582 * regcache.h: Update.
17583 * remote-utils.c (putpkt): Flush after debug output and use
17584 stderr.
17585 Handle input interrupts while waiting for an ACK.
17586 (input_interrupt): Use signal_pid method.
17587 (getpkt): Flush after debug output and use stderr.
17588 (outreg): Use collect_register_as_string.
17589 (new_thread_notify, dead_thread_notify): New functions.
17590 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17591 and general_thread.
17592 (look_up_one_symbol): Flush after debug output.
17593 * server.c (step_thread, server_waiting): New variables.
17594 (start_inferior): Don't use signal_pid. Update call to mywait.
17595 (attach_inferior): Update call to mywait.
17596 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17597 (main): Don't fetch/store registers explicitly. Use
17598 set_desired_inferior. Support proposed ``Hs'' packet. Update
17599 calls to mywait.
17600 * server.h: Update.
17601 (struct inferior_list, struct_inferior_list_entry): New.
17602 * target.c (set_desired_inferior): New.
17603 (write_inferior_memory): Constify.
17604 (mywait): New function.
17605 * target.h: Update.
17606 (struct target_ops): New signal_pid method.
17607 (mywait): Removed macro, added prototype.
17608
17609 * linux-low.h (regset_func): Removed.
17610 (regset_fill_func, regset_store_func): New.
17611 (enum regset_type): New.
17612 (struct regset_info): Add type field. Use new operation types.
17613 (struct linux_target_ops): stop_pc renamed to get_pc.
17614 Add decr_pc_after_break and breakpoint_at.
17615 (get_process, get_thread_proess, get_process_thread)
17616 (strut process_info, all_processes, linux_attach_lwp)
17617 (thread_db_init): New.
17618
17619 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17620 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17621 (the_low_target): Add new members.
17622 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17623 (i386_store_fpxregset): Constify.
17624 (target_regsets): Add new kind identifier.
17625 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17626 (i386_set_pc): Add debugging.
17627 (i386_breakpoint_at): New function.
17628 (the_low_target): Add new members.
17629 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17630 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17631 (mips_breakpoint_at): New.
17632 (the_low_target): Add new members.
17633 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17634 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17635 (the_low_target): Add new members.
17636 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17637 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17638 (the_low_target): Add new members.
17639 * linux-x86-64-low.c (target_regsets): Add new kind
17640 identifier.
17641
176422002-05-15 Daniel Jacobowitz <drow@mvista.com>
17643
17644 From Martin Pool <mbp@samba.org>:
17645 * server.c (gdbserver_usage): New function.
17646 (main): Call it.
17647
176482002-05-14 Daniel Jacobowitz <drow@mvista.com>
17649
17650 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17651 stop_at -> stop_pc.
17652
176532002-05-04 Andrew Cagney <ac131313@redhat.com>
17654
17655 * Makefile.in: Remove obsolete code.
17656
176572002-04-24 Michal Ludvig <mludvig@suse.cz>
17658
17659 * linux-low.c (regsets_fetch_inferior_registers),
17660 (regsets_store_inferior_registers): Removed cast to int from
17661 ptrace() calls.
17662 * regcache.h: Added declaration of struct inferior_info.
17663
176642002-04-20 Daniel Jacobowitz <drow@mvista.com>
17665
17666 * inferiors.c (struct inferior_info): Add regcache_data.
17667 (add_inferior): Call create_register_cache.
17668 (clear_inferiors): Call free_register_cache.
17669 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17670 * regcache.c (struct inferior_regcache_data): New.
17671 (registers): Remove.
17672 (get_regcache): New function.
17673 (create_register_cache, free_register_cache): New functions.
17674 (set_register_cache): Don't initialize the register cache here.
17675 (registers_to_string, registers_from_string, register_data): Call
17676 get_regcache.
17677 * regcache.h: Add prototypes.
17678 * server.h: Likewise.
17679
176802002-04-20 Daniel Jacobowitz <drow@mvista.com>
17681
17682 * mem-break.c: New file.
17683 * mem-break.h: New file.
17684 * Makefile.in: Add mem-break.o rule; update server.h
17685 dependencies.
17686 * inferiors.c (struct inferior_info): Add target_data
17687 member.
17688 (clear_inferiors): Free target_data member if set.
17689 (inferior_target_data, set_inferior_target_data): New functions.
17690 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17691 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17692 * linux-low.c (linux_bp_reinsert): New variable.
17693 (struct inferior_linux_data): New.
17694 (linux_create_inferior): Use set_inferior_target_data.
17695 (linux_attach): Likewise. Call add_inferior.
17696 (linux_wait_for_one_inferior): New function.
17697 (linux_wait): Call it.
17698 (linux_write_memory): Add const.
17699 (initialize_low): Call set_breakpoint_data.
17700 * linux-low.h (struct linux_target_ops): Add breakpoint
17701 handling members.
17702 * server.c (attach_inferior): Remove extra add_inferior
17703 call.
17704 * server.h: Include mem-break.h. Update inferior.c
17705 prototypes.
17706 * target.c (read_inferior_memory)
17707 (write_inferior_memory): New functions.
17708 * target.h (read_inferior_memory)
17709 (write_inferior_memory): Change macros to prototypes.
17710 (struct target_ops): Update comments. Add const to write_memory
17711 definition.
17712
177132002-04-11 Daniel Jacobowitz <drow@mvista.com>
17714
17715 * linux-low.c (usr_store_inferior_registers): Support
17716 registers which are allowed to fail to store.
17717 * linux-low.h (linux_target_ops): Likewise.
17718 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17719 (ppc_cannot_store_register): FPSCR may not be storable.
17720
177212002-04-09 Daniel Jacobowitz <drow@mvista.com>
17722
17723 * server.h: Include <string.h> if HAVE_STRING_H.
17724 * ChangeLog: Correct paths in last ChangeLog entry.
17725
177262002-04-09 Daniel Jacobowitz <drow@mvista.com>
17727
17728 * linux-low.h: Remove obsolete prototypes.
17729 (struct linux_target_ops): New.
17730 (extern the_low_target): New.
17731 * linux-low.c (num_regs, regmap): Remove declarations.
17732 (register_addr): Use the_low_target explicitly.
17733 (fetch_register): Likewise.
17734 (usr_fetch_inferior_registers): Likewise.
17735 (usr_store_inferior_registers): Likewise.
17736 * linux-arm-low.c (num_regs): Remove.
17737 (arm_num_regs): Define.
17738 (arm_regmap): Renamed from regmap, made static.
17739 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17740 made static.
17741 (arm_cannot_store_register): Renamed from cannot_store_register,
17742 made static.
17743 (the_low_target): New.
17744 * linux-i386-low.c (num_regs): Remove.
17745 (i386_num_regs): Define.
17746 (i386_regmap): Renamed from regmap, made static.
17747 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17748 made static.
17749 (i386_cannot_store_register): Renamed from cannot_store_register,
17750 made static.
17751 (the_low_target): New.
17752 * linux-ia64-low.c (num_regs): Remove.
17753 (ia64_num_regs): Define.
17754 (ia64_regmap): Renamed from regmap, made static.
17755 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17756 made static.
17757 (ia64_cannot_store_register): Renamed from cannot_store_register,
17758 made static.
17759 (the_low_target): New.
17760 * linux-m68k-low.c (num_regs): Remove.
17761 (m68k_num_regs): Define.
17762 (m68k_regmap): Renamed from regmap, made static.
17763 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17764 made static.
17765 (m68k_cannot_store_register): Renamed from cannot_store_register,
17766 made static.
17767 (the_low_target): New.
17768 * linux-mips-low.c (num_regs): Remove.
17769 (mips_num_regs): Define.
17770 (mips_regmap): Renamed from regmap, made static.
17771 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17772 made static.
17773 (mips_cannot_store_register): Renamed from cannot_store_register,
17774 made static.
17775 (the_low_target): New.
17776 * linux-ppc-low.c (num_regs): Remove.
17777 (ppc_num_regs): Define.
17778 (ppc_regmap): Renamed from regmap, made static.
17779 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17780 made static.
17781 (ppc_cannot_store_register): Renamed from cannot_store_register,
17782 made static.
17783 (the_low_target): New.
17784 * linux-s390-low.c (num_regs): Remove.
17785 (s390_num_regs): Define.
17786 (s390_regmap): Renamed from regmap, made static.
17787 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17788 made static.
17789 (s390_cannot_store_register): Renamed from cannot_store_register,
17790 made static.
17791 (the_low_target): New.
17792 * linux-sh-low.c (num_regs): Remove.
17793 (sh_num_regs): Define.
17794 (sh_regmap): Renamed from regmap, made static.
17795 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17796 made static.
17797 (sh_cannot_store_register): Renamed from cannot_store_register,
17798 made static.
17799 (the_low_target): New.
17800 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17801 (the_low_target): New.
17802
178032002-04-09 Daniel Jacobowitz <drow@mvista.com>
17804
17805 * Makefile.in: Add stamp-h target.
17806 * configure.in: Create stamp-h.
17807 * configure: Regenerated.
17808
178092002-04-09 Daniel Jacobowitz <drow@mvista.com>
17810
17811 * inferiors.c: New file.
17812 * target.c: New file.
17813 * target.h: New file.
17814 * Makefile.in: Add target.o and inferiors.o. Update
17815 dependencies.
17816 * linux-low.c (inferior_pid): New static variable,
17817 moved from server.c.
17818 (linux_create_inferior): Renamed from create_inferior.
17819 Call add_inferior. Return 0 on success instead of a PID.
17820 (linux_attach): Renamed from myattach.
17821 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17822 (linux_thread_alive): Renamed from mythread_alive.
17823 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17824 child dies.
17825 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17826 (regsets_store_inferior_registers): Correct error message.
17827 Add missing ``return 0''.
17828 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17829 (linux_store_registers): Renamed from store_inferior_registers.
17830 (linux_read_memory): Renamed from read_inferior_memory.
17831 (linux_write_memory): Renamed from write_inferior_memory.
17832 (linux_target_ops): New structure.
17833 (initialize_low): Call set_target_ops ().
17834 * remote-utils.c (unhexify): New function.
17835 (hexify): New function.
17836 (input_interrupt): Send signals to ``signal_pid''.
17837 * server.c (inferior_pid): Remove.
17838 (start_inferior): Update create_inferior call.
17839 (attach_inferior): Call add_inferior.
17840 (handle_query): New function.
17841 (main): Call handle_query for `q' packets.
17842 * server.h: Include "target.h". Remove obsolete prototypes.
17843 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17844
178452002-04-09 Daniel Jacobowitz <drow@mvista.com>
17846
17847 * Makefile.in: Add WARN_CFLAGS. Update configury
17848 dependencies.
17849 * configure.in: Check for <string.h>
17850 * configure: Regenerate.
17851 * config.in: Regenerate.
17852 * gdbreplay.c: Include needed system headers.
17853 (remote_open): Remove strchr prototype.
17854 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17855 * regcache.c (supply_register): Change buf argument to const void *.
17856 (supply_register_by_name): Likewise.
17857 (collect_register): Change buf argument to void *.
17858 (collect_register_by_name): Likewise.
17859 * regcache.h: Add missing prototypes.
17860 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17861 * server.c (handle_query): New function.
17862 (attached): New static variable, moved out of main.
17863 (main): Quiet longjmp clobber warnings.
17864 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17865 * utils.c (error): Remove NORETURN.
17866 (fatal): Likewise.
This page took 2.285007 seconds and 4 git commands to generate.