]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdbserver: include gdbsupport/common-inferior.h in inferiors.c
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
89e94ec9
SM
12020-01-13 Simon Marchi <simon.marchi@efficios.com>
2
3 * inferiors.c: Include gdbsupport/common-inferior.h.
4
2552728a
SM
52020-01-13 Simon Marchi <simon.marchi@efficios.com>
6
7 * hostio-errno.c: Include hostio.h.
8
4025fa09
SM
92020-01-13 Simon Marchi <simon.marchi@efficios.com>
10
11 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
12 prerequisite.
13
c0b0a142
SM
142020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
15
16 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
17 * linux-arm-tdesc.h: Include arch/arm.h.
18
bb1183e2
SM
192020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
20
21 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
22
f5df0b5f
SM
232020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
24
25 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
26 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
27
5b6d1e4f
PA
282020-01-10 Pedro Alves <palves@redhat.com>
29
30 * fork-child.c (post_fork_inferior): Pass target down to
31 startup_inferior.
32 * inferiors.c (switch_to_thread): Add process_stratum_target
33 parameter.
34 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
35 * nto-low.c (nto_target_ops): Now a process_stratum_target.
36 * linux-low.c (linux_target_ops): Now a process_stratum_target.
37 * remote-utils.c (prepare_resume_reply): Pass the target to
38 switch_to_thread.
39 * target.c (the_target): Now a process_stratum_target.
40 (done_accessing_memory): Pass the target to switch_to_thread.
41 (set_target_ops): Ajust to use process_stratum_target.
42 * target.h (struct target_ops): Rename to ...
43 (struct process_stratum_target): ... this.
44 (the_target, set_target_ops): Adjust.
45 (prepare_to_access_memory): Adjust comment.
46 * win32-low.c (child_xfer_memory): Adjust to use
47 process_stratum_target.
48 (win32_target_ops): Now a process_stratum_target.
49
559e7e50
EZ
502020-01-06 Eli Zaretskii <eliz@gnu.org>
51 Pedro Alves <palves@redhat.com>
52
53 * win32-low.c (get_child_debug_event): Extract the fatal exception
54 from the exit status and convert to the equivalent Posix signal
55 number.
56 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
57 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
58
48189bec
HD
592020-01-01 Hannes Domani <ssbssa@yahoo.de>
60
61 * Makefile.in: Use INSTALL_PROGRAM_ENV.
62
5dd8bf88
JB
632020-01-01 Joel Brobecker <brobecker@adacore.com>
64
65 * server.c (gdbserver_version): Change copyright year to 2020.
66 * gdbreplay.c (gdbreplay_version): Likewise.
67
0ad6b8ee
CB
682019-12-19 Christian Biesinger <cbiesinger@google.com>
69
70 * configure: Regenerate.
71 * configure.ac: Quote variable arguments of test.
72
1ee7b812
BE
732019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
74
75 * Makefile.in: Fix build with GNU Make 3.81
76
d9fa87f4
TT
772019-12-16 Tom Tromey <tromey@adacore.com>
78
79 * server.c (get_exec_file): Constify result.
80
ab7d13f0
CB
812019-12-10 Christian Biesinger <cbiesinger@google.com>
82
83 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
84 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
85 * config.in: Regenerate.
86 * configure: Regenerate.
87 * configure.ac: Don't check for strerror.
88 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
89 Call safe_strerror instead of strerror.
90 * server.h (strerror): Remove this now-unnecessary declaration.
91 * tracepoint.c (init_named_socket): Call safe_strerror instead of
92 strerror.
93 (gdb_agent_helper_thread): Likewise.
94 * utils.c (perror_with_name): Likewise.
95
4da8c3a8
TT
962019-11-26 Tom Tromey <tom@tromey.com>
97
98 * configure, config.in: Rebuild.
99
21987b9c
TT
1002019-11-26 Tom Tromey <tom@tromey.com>
101
102 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
103 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
104 gdb_sigmask.
105 * configure, config.in: Rebuild.
106
5e030278
TT
1072019-11-26 Tom Tromey <tom@tromey.com>
108
109 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
110 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
111 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
112 * acinclude.m4: Include ax_pthread.m4.
113 * config.in, configure: Rebuild.
114
6d91ce9a
CB
1152019-11-26 Christian Biesinger <cbiesinger@google.com>
116
117 * debug.c (debug_set_output): Call safe_strerror instead of
118 strerror.
119 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
120 (linux_kill_one_lwp): Likewise.
121 (linux_detach_one_lwp): Likewise.
122 (linux_wait_for_event_filtered): Likewise.
123 (store_register): Likewise.
124 * lynx-low.c (lynx_attach): Likewise.
125 * mem-break.c (insert_memory_breakpoint): Likewise.
126 (remove_memory_breakpoint): Likewise.
127 (delete_fast_tracepoint_jump): Likewise.
128 (set_fast_tracepoint_jump): Likewise.
129 (uninsert_fast_tracepoint_jumps_at): Likewise.
130 (reinsert_fast_tracepoint_jumps_at): Likewise.
131 * nto-low.c (nto_xfer_memory): Likewise.
132 (nto_resume): Likewise.
133
6cdd651f
LM
1342019-11-20 Luis Machado <luis.machado@linaro.org>
135
136 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
137 instead of register count.
138 * tdesc.c (tdesc_contains_feature): New function.
139 * tdesc.h (tdesc_contains_feature): New prototype.
140
cd850b40
CB
1412019-11-15 Christian Biesinger <cbiesinger@google.com>
142
143 * Makefile.in: Add safe-strerror.c.
144 * configure: Regenerate.
145 * configure.ac: Don't source common.host.
146
5abebf3c
CB
1472019-11-15 Christian Biesinger <cbiesinger@google.com>
148
149 * config.in: Regenerate.
150 * configure: Regenerate.
151
e06f3d6e
AB
1522019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
153
154 * ax.c (ax_printf): Handle size_t_arg.
155
ca3a04f6
CB
1562019-11-06 Christian Biesinger <cbiesinger@google.com>
157
158 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
159 * mi/mi-main.c (output_cores): Likewise.
160 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
161 (linux_xfer_osdata_modules): Likewise.
162 * remote.c (register_remote_support_xml): Likewise.
163 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
164 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
165
e48f6033
CB
1662019-11-01 Christian Biesinger <cbiesinger@google.com>
167
168 * configure: Regenerate.
169 * configure.ac: Remove check for strerror_r.
170
e7e97a2e
CB
1712019-10-31 Christian Biesinger <cbiesinger@google.com>
172
173 * config.in: Regenerate.
174 * configure: Regenerate.
175 * configure.ac: Also check for strerror_r.
176
75cafaa6
CB
1772019-10-31 Christian Biesinger <cbiesinger@google.com>
178
179 * ax.h (debug_agent): Remove duplicate declaration.
180
30baf67b
TV
1812019-10-26 Tom de Vries <tdevries@suse.de>
182
183 * linux-aarch64-low.c: Fix typos in comments.
184 * linux-arm-low.c: Same.
185 * linux-low.c: Same.
186 * linux-ppc-low.c: Same.
187 * proc-service.c: Same.
188 * regcache.h: Same.
189 * server.c: Same.
190 * tracepoint.c: Same.
191 * win32-low.c: Same.
192
52c64cf7
TT
1932019-10-25 Tom Tromey <tromey@adacore.com>
194
195 * utils.c (xstrdup): Remove.
196
c12d372d
TT
1972019-10-23 Tom Tromey <tom@tromey.com>
198
199 * configure, config.in: Rebuild.
200
4d0b984b
TT
2012019-10-23 Tom Tromey <tom@tromey.com>
202
203 * configure: Rebuild.
204 * acinclude.m4: Use m4_include, not sinclude.
205
c5adaa19
TT
2062019-10-17 Tom Tromey <tromey@adacore.com>
207
208 * configure: Rebuild.
209 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
210 in AC_CONFIG_FILES invocation.
211 * Makefile.in (stamp-h, Makefile): Use new-style config.status
212 invocation.
213
fec4e896
CB
2142019-10-16 Christian Biesinger <cbiesinger@google.com>
215
216 * server.c: Include xml-builtin.h.
217 (get_xml_features): Don't declare xml_builtins here.
218
00975ff6
AB
2192019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
220
221 * Makefile.in: Remove references to vec-ipa.o.
222
0dc32745
AB
2232019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
224
225 * Makefile.in: Remove references to vec.c.
226
3e6ec53a
CB
2272019-10-02 Christian Biesinger <cbiesinger@google.com>
228
229 * server.c (server_waiting): Change to bool.
230 (extended_protocol): Likewise.
231 (response_needed): Likewise.
232 (exit_requested): Likewise.
233 (run_once): Likewise.
234 (report_no_resumed): Likewise.
235 (non_stop): Likewise.
236 (disable_packet_vCont): Likewise.
237 (disable_packet_Tthread): Likewise.
238 (disable_packet_qC): Likewise.
239 (disable_packet_qfThreadInfo): Likewise.
240 (handle_general_set): Update.
241 (handle_detach): Update.
242 (handle_monitor_command): Update.
243 (handle_query): Update.
244 (captured_main): Update.
245 (process_serial_event): Update.
246 * server.h (server_waiting): Change to bool.
247 (disable_packet_vCont): Likewise.
248 (disable_packet_Tthread): Likewise.
249 (disable_packet_qC): Likewise.
250 (disable_packet_qfThreadInfo): Likewise.
251 (run_once): Likewise.
252 (non_stop): Likewise.
253 * target.c (target_stop_and_wait): Update.
254
80fd2826
TT
2552019-10-02 Tom Tromey <tromey@adacore.com>
256
257 * Makefile.in (SFILES): Add common-inferior.c.
258 (OBS): Add common-inferior.o.
259 * server.c (startup_with_shell): Don't define.
260
46f29a9a
AB
2612019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
262
263 * linux-low.c (linux_low_read_btrace): Update for change to
264 std::vector.
265
f9d949fb
CB
2662019-09-20 Christian Biesinger <cbiesinger@google.com>
267
268 * debug.c (debug_threads): Remove comment in favor of the header.
269 * debug.h (using_threads): Add declaration.
270 (debug_threads): Add comment.
271 * linux-aarch64-low.c: Include debug.h and remove declaration of
272 debug_threads.
273 * nto-low.c: Likewise.
274 * remote-utils.c: Likewise.
275 * thread-db.c: Likewise.
276
abf516c6
UW
2772019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
278
279 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
280 and powerpc-cell64l-ipa.o.
281 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
282 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
283 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
284 (spu*-*-*): Remove.
285
286 * spu-low.c: Remove file.
287
288 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
289 (parse_spufs_run): Remove.
290 (ppc_get_pc): Remove Cell/B.E. support.
291 (ppc_set_pc): Likewise.
292 (ppc_breakpoint_at): Likewise.
293 (ppc_arch_setup): Likewise.
294 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
295 tdesc_powerpc_cell32l.
296 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
297 or init_registers_powerpc_cell32l.
298 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
299 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
300 or init_registers_powerpc_cell32l.
301 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
302 (init_registers_powerpc_cell32l): Remove prototype.
303 (init_registers_powerpc_cell64l): Likewise.
304
305 * target.h (struct target_ops): Remove qxfer_spu member.
306 * server.c (handle_qxfer_spu): Remove.
307 (qxfer_packets): Remove entry for "spu".
308 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
309 * linux-low.c (SPUFS_MAGIC): Remove.
310 (spu_enumerate_spu_ids): Remove.
311 (linux_qxfer_spu): Remove.
312 (linux_target_ops): Remove qxfer_spu member.
313 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
314 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
315 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
316
2d41fa11
SDJ
3172019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
318
319 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
320 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
321 * config.in: Regenerate.
322 * configure: Regenerate.
323
d59b55f0
TT
3242019-08-15 Tom Tromey <tromey@adacore.com>
325
326 * target.c (target_write_memory): Use gdb::byte_vector.
327
4196ab2a
TT
3282019-08-15 Tom Tromey <tromey@adacore.com>
329
330 * tracepoint.c (write_inferior_data_pointer)
331 (write_inferior_integer, write_inferior_int8)
332 (write_inferior_uinteger, m_tracepoint_action_download)
333 (r_tracepoint_action_download, x_tracepoint_action_download)
334 (l_tracepoint_action_download, clear_inferior_trace_buffer)
335 (download_agent_expr, download_tracepoint_1)
336 (download_trace_state_variables, upload_fast_traceframes): Update.
337 * server.c (gdb_write_memory): Update.
338 * remote-utils.c (relocate_instruction): Update.
339 * proc-service.c (ps_pdwrite): Update.
340 * mem-break.c (remove_memory_breakpoint)
341 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
342 (uninsert_fast_tracepoint_jumps_at)
343 (reinsert_fast_tracepoint_jumps_at): Update.
344 * linux-x86-low.c (append_insns)
345 (i386_install_fast_tracepoint_jump_pad)
346 (amd64_write_goto_address, i386_write_goto_address): Update.
347 * linux-s390-low.c (append_insns, s390_write_goto_address):
348 Update.
349 * linux-ppc-low.c (ppc_relocate_instruction)
350 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
351 (ppc_write_goto_address): Update.
352 * linux-aarch64-low.c (append_insns): Update.
353 * target.h (struct target_ops): Update.
354 (write_inferior_memory): Don't declare.
355 * target.c (target_write_memory): Rename from
356 write_inferior_memory. Remove old target_write_memory.
357
c6778d00
TT
3582019-08-15 Tom Tromey <tromey@adacore.com>
359
360 * target.c (write_inferior_memory): Use std::vector.
361
404f2902
FCE
3622019-08-06 Frank Ch. Eigler <fche@redhat.com>
363
364 PR build/24886
365 * configure.ac: Drop enable-libmcheck support.
366 * configure, config.in: Rebuild.
367 * acinclude.m4: Don't include it.
368
4c5aa8e0
AH
3692019-07-19 Alan Hayward <alan.hayward@arm.com>
370
371 * configure.srv: Remove Arm xml files.
372
7cc17433
AH
3732019-07-19 Alan Hayward <alan.hayward@arm.com>
374
375 * configure.srv: Add new files. Remove xml generated files.
376 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
377 registers.
378 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
379 * linux-aarch32-tdesc.c: New file.
380 * linux-aarch32-tdesc.h: New file.
381 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
382 * linux-arm-low.c (init_registers_arm, tdesc_arm)
383 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
384 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
385 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
386 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
387 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
388 (arm_read_description): Call arm_linux_read_description.
389 (initialize_low_arch): Don't init registers.
390 * linux-arm-tdesc.c: New file.
391 * linux-arm-tdesc.h: New file.
392
166a82be
AH
3932019-07-10 Alan Hayward <alan.hayward@arm.com>
394
395 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
396 Move counter inside for.
397 (arm_read_description): Check ptrace earlier.
398 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
399
268a13a5
TT
4002019-07-09 Tom Tromey <tom@tromey.com>
401
402 * configure: Rebuild.
403 * configure.ac: Change common to gdbsupport.
404 * acinclude.m4: Change common to gdbsupport.
405 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
406 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
407 common to gdbsupport.
408 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
409 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
410 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
411 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
412 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
413 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
414 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
415 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
416 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
417 common to gdbsupport.
418
350fab54
AH
4192019-07-04 Alan Hayward <alan.hayward@arm.com>
420
421 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
422 defines.
423 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
424
2b40fda7
AH
4252019-07-04 Alan Hayward <alan.hayward@arm.com>
426
427 * configure.srv: Remove legacy xml.
428 * linux-aarch64-low.c (initialize_low_arch): Remove
429 initialize_low_tdesc call.
430 * linux-aarch64-tdesc-selftest.c: Remove file.
431 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
432 * linux-x86-low.c (initialize_low_arch): Remove
433 initialize_low_tdesc call.
434 * linux-x86-tdesc-selftest.c: Remove file.
435 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
436
7d10623d
TV
4372019-06-20 Tom de Vries <tdevries@suse.de>
438
439 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
440 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
441
8d6a48df
TV
4422019-06-19 Tom de Vries <tdevries@suse.de>
443
444 * debug.h (debug_write): Change return type to ssize_t.
445 * debug.c (debug_write): Same.
446
73cc7272
TT
4472019-06-14 Tom Tromey <tom@tromey.com>
448
449 * configure.ac: Use new path to gnulib.
450 * configure: Rebuild.
451 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
452 to gnulib.
453
08f10e02
TT
4542019-06-11 Tom Tromey <tom@tromey.com>
455
456 * Makefile.in (SFILES): Add alloc.c.
457 (OBS): Add alloc.o.
458 (IPA_OBJS): Add alloc-ipa.o.
459 (alloc-ipa.o): New target.
460 (%.o: ../%.c): New pattern rule.
461
422186a9
TT
4622019-06-10 Tom Tromey <tromey@adacore.com>
463
464 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
465 end warning with a newline.
466 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
467 newline.
468 * thread-db.c (attach_thread): Don't end warning with a newline.
469 (thread_db_notice_clone): Likewise.
470 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
471 newline.
472 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
473 end warning with a newline.
474
b02f78f9
PA
4752019-06-04 Pedro Alves <palves@redhat.com>
476
477 * server.c (captured_main): Use make_unique_xstrdup.
478
88ed7edb
TT
4792019-06-02 Tom Tromey <tom@tromey.com>
480
481 * gdbreplay.c (fromhex): Remove.
482 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
483
33a6bc35
TT
4842019-05-29 Tom Tromey <tromey@adacore.com>
485
486 * configure: Rebuild.
487
e90a813d
KB
4882019-05-06 Kevin Buettner <kevinb@redhat.com>
489
490 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
491 sign extension code on 32-bit builds.
492
353ea2d1
EZ
4932019-05-03 Eli Zaretskii <eliz@gnu.org>
494
495 * remote-utils.c:
496 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
497
b494cdff
TT
4982019-04-19 Tom Tromey <tom@tromey.com>
499
500 * server.c (struct vstop_notif): Derive from notif_event.
501 <base>: Remove.
502 (queue_stop_reply): Update.
503 (remove_all_on_match_ptid): Change type. Rewrite.
504 (discard_queued_stop_replies): Rewrite.
505 (in_queued_stop_replies_ptid): Change type.
506 (in_queued_stop_replies): Rewrite.
507 (notif_stop): Update.
508 (queue_stop_reply_callback): Update.
509 (captured_main): Don't call initialize_notif.
510 (push_stop_notification): Update.
511 * notif.c (notif_write_event, handle_notif_ack)
512 (notif_event_enque, notif_push): Update.
513 (notif_event_xfree, initialize_notif): Remove.
514 * notif.h (struct notif_event): Include <list>, not
515 "common/queue.h".
516 (struct notif_server) <queue>: Now a std::list.
517 (notif_event_p): Remove typedef.
518 (initialize_notif): Don't declare.
519 (struct notif_event): Add virtual destructor.
520
a7e559cc
AH
5212019-04-17 Alan Hayward <alan.hayward@arm.com>
522
523 * ax.c (ax_vdebug): Call debug_printf.
524 * debug.c (debug_write): New function.
525 * debug.h (debug_write): New declaration.
526 * linux-low.c (sigchld_handler): Call debug_write.
527
aeb2e706
AH
5282019-04-17 Alan Hayward <alan.hayward@arm.com>
529
530 * debug.c (debug_set_output): New function.
531 (debug_vprintf): Send output to debug_file.
532 (debug_flush): Likewise.
533 * debug.h (debug_set_output): New declaration.
534 * server.c (handle_monitor_command): Add debug-file option.
535 (captured_main): Likewise.
536
c1bc0935
AH
5372019-04-17 Alan Hayward <alan.hayward@arm.com>
538
539 * debug.c (remote_debug): Add definition.
540 * debug.h (remote_debug): Add declaration.
541 * hostio.c (remote_debug): Remove declaration.
542 * remote-utils.c (struct ui_file): Likewise.
543 (remote_debug): Likewise.
544 * remote-utils.h (remote_debug): Likewise,
545 * server.c (remote_debug): Remove definition.
546
3f52fdbc
KB
5472019-04-10 Kevin Buettner <kevinb@redhat.com>
548
549 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
550 when using a 64-bit gdbserver.
551
b0319eaa
TT
5522019-04-09 Tom Tromey <tromey@adacore.com>
553
554 * linux-low.c (select_event_lwp): Use find_thread_in_random.
555
eedc3f4f
TT
5562019-04-08 Tom Tromey <tom@tromey.com>
557
558 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
559 throw.
560 (linux_resume_one_lwp): Likewise.
561
230d2906
TT
5622019-04-08 Tom Tromey <tom@tromey.com>
563
564 * gdbreplay.c: Update.
565 * linux-low.c: Update.
566 * server.c: Update.
567
a70b8144
TT
5682019-04-08 Tom Tromey <tom@tromey.com>
569
570 * server.c: Use C++ exception handling.
571 * linux-low.c: Use C++ exception handling.
572 * gdbreplay.c: Use C++ exception handling.
573
3d6e9d23
TT
5742019-04-08 Tom Tromey <tom@tromey.com>
575
576 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
577 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
578 (captured_main, main): Update.
579 * gdbreplay.c (main): Update.
580
0570503d
PFC
5812019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
582
583 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
584 value in argument pointer, return 1 if the entry is found and 0
585 otherwise. Move comment.
586 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
587 * linux-low.h (linux_get_auxv): Declare.
588 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
589
227a9e65
TT
5902019-04-05 Tom Tromey <tromey@adacore.com>
591
592 * server.c (gdbserver_usage): Use upper-case for metasyntactic
593 variables.
594
69f4c9cc
AH
5952019-03-28 Alan Hayward <alan.hayward@arm.com>
596
597 * linux-low.c (AT_HWCAP2): Add define if not already included.
598
974c89e0
AH
5992019-03-26 Alan Hayward <alan.hayward@arm.com>
600
601 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
602 (aarch64_arch_setup): Call linux_get_hwcap.
603 * linux-arm-low.c (arm_get_hwcap): Remove function.
604 (arm_read_description): Call linux_get_hwcap.
605 * linux-low.c (linux_get_auxv): New function.
606 (linux_get_hwcap): Likewise.
607 (linux_get_hwcap2): Likewise.
608 * linux-low.h (linux_get_hwcap): New declaration.
609 (linux_get_hwcap2): Likewise.
610 * linux-ppc-low.c (ppc_get_auxv): Remove function.
611 (ppc_arch_setup): Call linux_get_hwcap.
612 * linux-s390-low.c (s390_get_hwcap): Remove function.
613 (s390_arch_setup): Call linux_get_hwcap.
614
1ef53e6b
AH
6152019-03-22 Alan Hayward <alan.hayward@arm.com>
616 Jiong Wang <jiong.wang@arm.com>
617
618 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
619 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
620 to fail.
621 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
622
ee4fbcfa
AH
6232019-03-22 Alan Hayward <alan.hayward@arm.com>
624 Jiong Wang <jiong.wang@arm.com>
625
626 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
627 (aarch64_get_hwcap): New function.
628 (aarch64_arch_setup): Read APIA hwcap.
629
6dc0ebde
AH
6302019-03-22 Alan Hayward <alan.hayward@arm.com>
631 Jiong Wang <jiong.wang@arm.com>
632
633 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
634 (initialize_low_tracepoint): Likewise.
635 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
636 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
637 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
638 (aarch64_linux_read_description): Likewise.
639 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
640
1163a4b7
JB
6412019-03-12 John Baldwin <jhb@FreeBSD.org>
642
643 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
644 i386_create_target_description for 'segments' parameter.
645 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
646 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
647 * win32-i386-low.c (i386_arch_setup): Likewise.
648
d3a70e03
TT
6492019-03-12 Tom Tromey <tromey@adacore.com>
650
651 * linux-low.c (iterate_over_lwps): Update.
652
37991b4f
TT
6532019-03-06 Tom Tromey <tom@tromey.com>
654
655 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
656 (captured_main): Use SCOPE_EXIT.
657
45950eb6
SDJ
6582019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
659
660 * configure.srv: Use '$enable_unittest' instead of '$development'
661 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
662 case.
663
43ac54fc
TT
6642019-02-27 Tom Tromey <tromey@adacore.com>
665
666 * gdbreplay.c (logchar): Handle \r\n.
667
df0da8a2
AH
6682019-02-07 Alan Hayward <alan.hayward@arm.com>
669
670 * linux-low.c (linux_attach): Add process before lwp.
671 * server.c (attach_inferior): Check if already attached.
672
1a5c2598
TT
6732019-02-07 Tom Tromey <tom@tromey.com>
674
675 * x86-tdesc.h: Rename include guard.
676 * x86-low.h: Add include guard.
677 * wincecompat.h: Rename include guard.
678 * win32-low.h: Add include guard.
679 * utils.h: Rename include guard.
680 * tracepoint.h: Rename include guard.
681 * tdesc.h: Rename include guard.
682 * target.h: Rename include guard.
683 * server.h: Rename include guard.
684 * remote-utils.h: Rename include guard.
685 * regcache.h: Rename include guard.
686 * nto-low.h: Rename include guard.
687 * notif.h: Add include guard.
688 * mem-break.h: Rename include guard.
689 * lynx-low.h: Add include guard.
690 * linux-x86-tdesc.h: Add include guard.
691 * linux-s390-tdesc.h: Add include guard.
692 * linux-ppc-tdesc-init.h: Add include guard.
693 * linux-low.h: Add include guard.
694 * linux-aarch64-tdesc.h: Add include guard.
695 * linux-aarch32-low.h: Add include guard.
696 * inferiors.h: Rename include guard.
697 * i387-fp.h: Rename include guard.
698 * hostio.h: Rename include guard.
699 * gdbthread.h: Rename include guard.
700 * gdb_proc_service.h: Rename include guard.
701 * event-loop.h: Rename include guard.
702 * dll.h: Rename include guard.
703 * debug.h: Rename include guard.
704 * ax.h: Rename include guard.
705
956cc47c
SN
7062018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
707
708 PR gdb/23985
709 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
710 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
711
a0707f3c
TT
7122019-01-25 Tom Tromey <tom@tromey.com>
713
714 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
715
0747795c
TT
7162019-01-25 Tom Tromey <tom@tromey.com>
717
718 * win32-low.c: Fix common/ includes.
719 * win32-i386-low.c: Fix common/ includes.
720 * tracepoint.c: Fix common/ includes.
721 * thread-db.c: Fix common/ includes.
722 * target.h: Fix common/ includes.
723 * symbol.c: Fix common/ includes.
724 * spu-low.c: Fix common/ includes.
725 * server.h: Fix common/ includes.
726 * server.c: Fix common/ includes.
727 * remote-utils.c: Fix common/ includes.
728 * regcache.h: Fix common/ includes.
729 * regcache.c: Fix common/ includes.
730 * nto-x86-low.c: Fix common/ includes.
731 * notif.h: Fix common/ includes.
732 * mem-break.h: Fix common/ includes.
733 * lynx-low.c: Fix common/ includes.
734 * lynx-i386-low.c: Fix common/ includes.
735 * linux-x86-tdesc-selftest.c: Fix common/ includes.
736 * linux-x86-low.c: Fix common/ includes.
737 * linux-low.c: Fix common/ includes.
738 * inferiors.h: Fix common/ includes.
739 * i387-fp.c: Fix common/ includes.
740 * hostio.c: Fix common/ includes.
741 * hostio-errno.c: Fix common/ includes.
742 * gdbthread.h: Fix common/ includes.
743 * gdbreplay.c: Fix common/ includes.
744 * fork-child.c: Fix common/ includes.
745 * event-loop.c: Fix common/ includes.
746 * ax.c:
747 (enum gdb_agent_op): Fix common/ includes.
748
be6d4f74
TT
7492019-01-21 Tom Tromey <tom@tromey.com>
750
751 * tracepoint.c: Fix includes.
752 * remote-utils.c: Fix includes.
753 * linux-x86-low.c: Fix includes.
754
66d91b39
JB
7552019-01-01 Joel Brobecker <brobecker@adacore.com>
756
757 * gdbreplay.c (gdbreplay_version): Update copyright year in
758 version message.
759 * server.c (gdbserver_version): Likewise.
760
754e3168
AH
7612018-12-05 Alan Hayward <alan.hayward@arm.com>
762
763 * linux-low.c (add_lwp): Switch ordering.
764
d105de22
TT
7652018-11-29 Tom Tromey <tom@tromey.com>
766
767 * win32-low.c (win32_join): Take pid, not process.
768 * target.h (struct target_ops) <join>: Change argument type.
769 (join_inferior): Change argument name.
770 * spu-low.c (spu_join): Take pid, not process.
771 * server.c (handle_detach): Preserve pid before destroying
772 process.
773 * lynx-low.c (lynx_join): Take pid, not process.
774 * linux-low.c (linux_join): Take pid, not process.
775
50138245
AH
7762018-11-23 Alan Hayward <alan.hayward@arm.com>
777
778 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
779 (aarch64_cannot_fetch_register): Likewise.
780 (struct linux_target_ops): Update references.
781
64f57f3d
PFC
7822018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
783
784 * linux-ppc-low.c: Include nat/linux-ptrace.h.
785
8d619c01
EBM
7862018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
787
788 * configure.srv (ipa_ppc_linux_regobj): Add
789 powerpc-isa207-htm-vsx32l-ipa.o and
790 powerpc-isa207-htm-vsx64l-ipa.o.
791 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
792 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
793 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
794 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
795 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
796 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
797 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
798 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
799 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
800 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
801 (init_registers_powerpc_isa207_htm_vsx32l)
802 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
803 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
804 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
805 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
806 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
807 (ppc_store_tm_ctarregset): New functions.
808 (ppc_regsets): Add entries for HTM regsets.
809 (ppc_arch_setup): Set htm in features struct when needed. Set
810 sizes for the HTM regsets.
811 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
812 (initialize_low_arch): Call
813 init_registers_powerpc_isa207_htm_vsx32l and
814 init_registers_powerpc_isa207_htm_vsx64l.
815 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
816 PPC_TDESC_ISA207_HTM_VSX.
817 (initialize_low_tracepoint): Call
818 init_registers_powerpc_isa207_htm_vsx32l and
819 init_registers_powerpc_isa207_htm_vsx64l.
820
232bfb86
EBM
8212018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
822
823 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
824 rs6000/power-linux-pmu.xml to srv_xmlfiles.
825 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
826 (ppc_store_pmuregset): New functions.
827 (ppc_regsets): Add entries for ebb and pmu regsets.
828 (ppc_arch_setup): Set isa207 in features struct if the ebb and
829 pmu regsets are available. Set sizes for these regsets.
830
f2cf6173
EBM
8312018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
832
833 * configure.srv (ipa_ppc_linux_regobj): Add
834 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
835 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
836 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
837 rs6000/powerpc-isa207-vsx32l.xml, and
838 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
839 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
840 <PPC_TDESC_ISA207_VSX>: New enum value.
841 (init_registers_powerpc_isa207_vsx32l): Declare.
842 (init_registers_powerpc_isa207_vsx64l): Declare.
843 * linux-ppc-low.c (ppc_fill_tarregset): New function.
844 (ppc_store_tarregset): New function.
845 (ppc_regsets): Add entry for the TAR regset.
846 (ppc_arch_setup): Set isa207 in features struct when needed. Set
847 size for the TAR regsets.
848 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
849 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
850 and init_registers_powerpc_isa207_vsx64l.
851 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
852 (initialize_low_tracepoint): Call
853 init_registers_powerpc_isa207_vsx32l and
854 init_registers_powerpc_isa207_vsx64l.
855
7ca18ed6
EBM
8562018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
857 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
858
859 * configure.srv (ipa_ppc_linux_regobj): Add
860 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
861 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
862 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
863 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
864 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
865 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
866 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
867 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
868 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
869 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
870 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
871 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
872 (ppc_hwcap): Add comment.
873 (ppc_hwcap2): New global.
874 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
875 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
876 (ppc_regsets): Add entries for the DSCR and PPR regsets.
877 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
878 when needed. Set sizes for the the DSCR and PPR regsets.
879 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
880 (initialize_low_arch): Call
881 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
882 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
883 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
884 PPC_TDESC_ISA205_PPR_DSCR_VSX.
885 (initialize_low_tracepoint): Call
886 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
887 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
888
5c849b22
PFC
8892018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
890
891 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
892
8ecfd7bd
SDJ
8932018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
894 Simon Marchi <simark@simark.ca>
895
896 * acinclude.m4: Include "../selftest.m4".
897 * configure: Regenerate.
898 * configure.ac: Use "GDB_AC_SELFTEST".
899 * configure.srv: Use "$enable_unittests" instead of
900 "$development" when checking whether unit tests have been
901 enabled.
902 * server.c (captured_main): Update message informing that
903 selftests have been disabled.
904
96643e35
TT
9052018-10-04 Tom Tromey <tom@tromey.com>
906
907 * configure: Rebuild.
908
da4ae14a
TT
9092018-10-04 Tom Tromey <tom@tromey.com>
910
911 * server.c (handle_status): Rename inner "thread".
912 (process_serial_event): Declare "res" in 'm' case.
913 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
914 (iterate_over_lwps): Rename inner "thread".
915 (linux_qxfer_libraries_svr4): Rename inner "len".
916 * gdbthread.h (find_thread_in_random): Rename inner "thread".
917
7c619dbd
GB
9182018-10-01 Gary Benson <gbenson@redhat.com>
919
920 * gdb_proc_service.h: Moved common code to
921 common/gdb_proc_service.h.
922
3795e814
GB
9232018-10-01 Gary Benson <gbenson@redhat.com>
924
925 * gdb_proc_service.h: Synchronize comments and whitespace with
926 GDB's version of this file.
927
49b036f1
TT
9282018-09-25 Tom Tromey <tom@tromey.com>
929
930 * configure: Rebuild.
931 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
932
8ff03f0b
SM
9332018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
934
935 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
936 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
937 ($(IPA_LIB)): Sort IPA_OBJS.
938
a1cd91dc
SM
9392018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
940
941 * Makefile.in: Remove references to $(ADD_DEPS).
942
752312ba
TT
9432018-09-16 Tom Tromey <tom@tromey.com>
944
945 * remote-utils.c (remote_open): Use GNU style for metasyntactic
946 variables.
947 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
948 variables.
949
f1628857
TT
9502018-09-05 Tom Tromey <tom@tromey.com>
951
952 * configure: Rebuild.
953
ad202fcc
SM
9542018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
955
956 PR build/23399
957 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
958
d3d8724a
TT
9592018-08-27 Tom Tromey <tom@tromey.com>
960
961 PR build/23087:
962 * configure: Rebuild.
963
b4f183d2
TT
9642018-08-27 Tom Tromey <tom@tromey.com>
965
966 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
967 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
968 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
969 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
970 (s390x_emit_stack_adjust): Add casts to unsigned char.
971
4e2aa472
SM
9722018-08-22 Simon Marchi <simon.marchi@ericsson.com>
973
974 PR gdb/23374
975 PR gdb/23375
976 * server.h (struct client_state) <disable_randomization>:
977 Initialize to 1.
978
cf4088a9
SM
9792018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
980
981 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
982 variable.
983 (mips_supply_ptrace_register): Likewise.
984
a0de763e
TT
9852018-07-22 Tom Tromey <tom@tromey.com>
986
987 * configure: Rebuild.
988
b0a7723d
TT
9892018-07-22 Tom Tromey <tom@tromey.com>
990
991 * win32-low.c (win32_create_inferior): Remove unused variables.
992 * gdbreplay.c (remote_open): Remove unused variable.
993 * remote-utils.c (remote_prepare): Remove unused variable.
994 * x86-tdesc.h (X86_TDESC_H): Define.
995 (amd64_expedite_regs): Define conditionally.
996 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
997 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
998 * remote-utils.c (readchar): Remove unused variable.
999
a780ef4f
PA
10002018-07-13 Pedro Alves <palves@redhat.com>
1001
1002 * linux-low.c (linux_kill): Change parameter to process_info
1003 pointer instead of pid. Adjust.
1004 * lynx-low.c (lynx_kill): Likewise.
1005 * nto-low.c (nto_kill): Likewise.
1006 * spu-low.c (spu_kill): Likewise.
1007 * win32-low.c (win32_kill): Likewise.
1008 * server.c (handle_v_kill, kill_inferior_callback)
1009 (detach_or_kill_for_exit): Adjust.
1010 * target.c (kill_inferior): Change parameter to process_info
1011 pointer instead of pid. Adjust.
1012 * target.h (struct target_ops) <kill>: Change parameter to
1013 process_info pointer instead of pid. Adjust all implementations
1014 and callers.
1015 (kill_inferior): Likewise.
1016
ef2ddb33
PA
10172018-07-13 Pedro Alves <palves@redhat.com>
1018
1019 * linux-low.c (linux_detach, linux_join): Change parameter to
1020 process_info pointer instead of pid. Adjust.
1021 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1022 * nto-low.c (nto_detach): Likewise.
1023 * spu-low.c (spu_detach, spu_join): Likewise.
1024 * win32-low.c (win32_detach, win32_join): Likewise.
1025 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1026 * target.h (struct target_ops) <detach, join>: Change parameter to
1027 process_info pointer instead of pid. Adjust all implementations
1028 and callers.
1029 (detach_inferior, join_inferior): Rename 'pid' parameter to
1030 'proc'.
1031
c7ab0aef
SDJ
10322018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1033 Jan Kratochvil <jan.kratochvil@redhat.com>
1034 Paul Fertser <fercerpav@gmail.com>
1035 Tsutomu Seki <sekiriki@gmail.com>
1036
1037 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1038 (OBS): Add 'common/netstuff.o'.
1039 (GDBREPLAY_OBS): Likewise.
1040 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1041 (remote_open): Implement support for IPv6
1042 connections.
1043 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1044 and 'wspiapi.h'.
1045 (handle_accept_event): Accept connections from IPv6 sources.
1046 (remote_prepare): Handle IPv6-style hostnames; implement
1047 support for IPv6 connections.
1048 (remote_open): Implement support for printing connections from
1049 IPv6 sources.
1050
31445d10
PA
10512018-07-11 Pedro Alves <palves@redhat.com>
1052
1053 PR gdb/23377
1054 * mem-break.c (any_persistent_commands): Add process_info
1055 parameter and use it instead of relying on the current process.
1056 Change return type to bool.
1057 * mem-break.h (any_persistent_commands): Add process_info
1058 parameter and change return type to bool.
1059 * server.c (handle_detach): Remove require_running_or_return call.
1060 Look up the process_info for the process we're about to detach.
1061 If not found, return back error to GDB. Adjust
1062 any_persistent_commands call to pass down a process pointer.
1063
cb197132
PA
10642018-07-11 Pedro Alves <palves@redhat.com>
1065
1066 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1067 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1068 instead of collect_register_by_name.
1069 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1070 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1071
1b919490
VB
10722018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1073 Pedro Alves <palves@redhat.com>
1074
1075 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1076
d7e15655
TT
10772018-07-03 Tom Tromey <tom@tromey.com>
1078
1079 * linux-low.c: Update.
1080 * lynx-low.c: Update.
1081 * mem-break.c: Update.
1082 * nto-low.c: Update.
1083 * remote-utils.c: Update.
1084 * server.c: Update.
1085 * spu-low.c: Update.
1086 * target.c: Update.
1087 * win32-low.c: Update.
1088
26a57c92
TT
10892018-07-03 Tom Tromey <tom@tromey.com>
1090
1091 * server.c: Update.
1092
0e998d96
TT
10932018-07-03 Tom Tromey <tom@tromey.com>
1094
1095 * linux-low.c: Update.
1096
cc6bcb54
TT
10972018-07-03 Tom Tromey <tom@tromey.com>
1098
1099 * target.c: Update.
1100
e38504b3
TT
11012018-07-03 Tom Tromey <tom@tromey.com>
1102
1103 * linux-low.c: Update.
1104 * linux-mips-low.c: Update.
1105 * lynx-low.c: Update.
1106 * nto-low.c: Update.
1107 * remote-utils.c: Update.
1108 * server.c: Update.
1109 * spu-low.c: Update.
1110 * target.c: Update.
1111 * thread-db.c: Update.
1112
e99b03dc
TT
11132018-07-03 Tom Tromey <tom@tromey.com>
1114
1115 * linux-low.c: Update.
1116 * linux-mips-low.c: Update.
1117 * lynx-low.c: Update.
1118 * mem-break.c: Update.
1119 * nto-low.c: Update.
1120 * remote-utils.c: Update.
1121 * server.c: Update.
1122 * spu-low.c: Update.
1123 * target.c: Update.
1124 * tracepoint.c: Update.
1125
f2907e49
TT
11262018-07-03 Tom Tromey <tom@tromey.com>
1127
1128 * linux-low.c: Update.
1129 * linux-ppc-low.c: Update.
1130 * linux-x86-low.c: Update.
1131 * proc-service.c: Update.
1132 * server.c: Update.
1133 * spu-low.c: Update.
1134 * thread-db.c: Update.
1135 * win32-low.c: Update.
1136
fd79271b
TT
11372018-07-03 Tom Tromey <tom@tromey.com>
1138
1139 * linux-low.c: Update.
1140 * lynx-low.c: Update.
1141 * nto-low.c: Update.
1142 * remote-utils.c: Update.
1143 * spu-low.c: Update.
1144 * thread-db.c: Update.
1145 * win32-low.c: Update.
1146
c0867626
SDJ
11472018-06-29 Joel Brobecker <brobecker@adacore.com>
1148
1149 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1150 parameter in call to 'amd64_create_target_description'.
1151
2512d7ef
JK
11522018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1153
1154 * x86-tdesc.h: Remove executable permission flag.
1155
d0ac1c44
SM
11562018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1157
1158 * configure.ac: Remove AC_PREREQ, add missing quoting.
1159 * configure: Re-generate.
1160 * config.in: Re-generate.
1161 * aclocal.m4: Re-generate.
1162
c4eb05ff
SM
11632018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1164
1165 * tracepoint.h (current_traceframe): Remove declaration.
1166
02895270
AH
11672018-06-18 Alan Hayward <alan.hayward@arm.com>
1168
1169 * linux-aarch64-low.c (is_sve_tdesc): New function.
1170 (aarch64_sve_regs_copy_to_regcache): Likewise.
1171 (aarch64_sve_regs_copy_from_regcache): Likewise.
1172 (aarch64_regs_info): Add SVE checks.
1173 (initialize_low_arch): Initialize SVE.
1174
e9902bfc
AH
11752018-06-18 Alan Hayward <alan.hayward@arm.com>
1176
1177 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1178
fefa175e
AH
11792018-06-11 Alan Hayward <alan.hayward@arm.com>
1180
1181 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1182 (initialize_low_tracepoint): Likewise
1183 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1184 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1185 param.
1186 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1187 checks.
1188 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1189
b91ad3ff
AH
11902018-06-11 Alan Hayward <alan.hayward@arm.com>
1191
1192 * server.h (PBUFSIZ): Increase size
1193
f868386e
AH
11942018-06-11 Alan Hayward <alan.hayward@arm.com>
1195
1196 * regcache.c (regcache::raw_compare): New function.
1197 * regcache.h (regcache::raw_compare): New declaration.
1198
9c861883
AH
11992018-06-11 Alan Hayward <alan.hayward@arm.com>
1200
1201 * regcache.c (new_register_cache): Use new.
1202 (free_register_cache): Use delete.
1203 (register_data): Use const.
1204 (supply_register): Move body inside regcache.
1205 (regcache::raw_supply): New override function.
1206 (collect_register): Move body inside regcache.
1207 (regcache::raw_collect): New override function.
1208 (regcache::get_register_status): New override function.
1209 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1210
40591844
TT
12112018-06-09 Tom Tromey <tom@tromey.com>
1212
1213 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1214 declare queue.
1215 (event_queue): Use std::queue.
1216 (gdb_event_xfree): Remove.
1217 (initialize_event_loop, process_event, wait_for_event): Update.
1218
6341380d
SC
12192018-06-08 Stan Cox <scox@redhat.com>
1220
1221 * win32-low.c (win32_create_inferior): last_ptid and last_status
1222 moved to client_state.
1223
03349c93
PA
12242018-06-08 Pedro Alves <palves@redhat.com>
1225
1226 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1227 common/common-exceptions.o, common/common-utils.o,
1228 common/errors.o, common/print-utils.o and utils.o.
1229 * gdbreplay.c: Include "common-defs.h" instead of the two
1230 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1231 string.h or alloca.h.
1232 (perror_with_name): Delete.
1233 (remote_open): Use xstrdup instead of strdup.
1234 (main): Rename to ...
1235 (captured_main): ... this.
1236 (main): New.
1237
8dcc53b3
TT
12382018-06-08 Tom Tromey <tom@tromey.com>
1239
1240 * linux-low.c (linux_low_read_btrace): Update.
1241
c12a5089
SC
12422018-06-04 Stan Cox <scox@redhat.com>
1243
1244 * server.h (struct client_state): New.
1245 * server.c (cont_thread, general_thread, multi_process)
1246 (report_fork_events, report_vfork_events, report_exec_events)
1247 (report_thread_events, swbreak_feature, hwbreak_feature)
1248 (vCont_supported, disable_randomization, pass_signals)
1249 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1250 Moved to client_state.
1251 * remote-utils.c (remote_debug, noack_mode)
1252 (transport_is_reliable): Moved to client_state.
1253 * tracepoint.c (current_traceframe): Moved to client_state.
1254
1255 Update all callers.
1256 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1257 linux-low.c, remote-utils.h, target.c: Use client_state.
1258
122394f1
AH
12592018-05-31 Alan Hayward <alan.hayward@arm.com>
1260
1261 * configure.srv: Add new c/h file.
1262
95228a0d
AH
12632018-05-31 Alan Hayward <alan.hayward@arm.com>
1264
1265 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1266 null VQ.
1267
d8dab6c3
MR
12682018-05-25 Maciej W. Rozycki <macro@mips.com>
1269
1270 * gdb.arch/mips-fpregset-core.exp: New test.
1271 * gdb.arch/mips-fpregset-core.c: New test source.
1272
81e25b7c
EK
12732018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1274
1275 PR server/23198
1276 * hostio.c (require_int): Do not report overflow for integers
1277 between 0xfffffff and 0x7fffffff.
1278
7e947ad3
MR
12792018-05-22 Maciej W. Rozycki <macro@mips.com>
1280
1281 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1282 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1283 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1284 functions.
1285 (the_low_target): Wire them.
1286
1d75a658
PFC
12872018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1288
1289 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1290 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1291 mode. Call collect_register_by_name with vscr using
1292 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1293 (ppc_store_vrregset): Add and set vscr_offset variable as in
1294 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1295 vscr_offset.
1296
d078308a
PFC
12972018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1298
1299 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1300 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1301 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1302
7273b5fc
PFC
13032018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1304
1305 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1306 (ppc_store_vsxregset): Likewise.
1307 (ppc_fill_vrregset): Likewise.
1308 (ppc_store_vrregset): Likewise.
1309 (ppc_fill_evrregset): Likewise.
1310 (ppc_store_evrregset): Likewise.
1311 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1312 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1313 needed.
1314
2e077f5e
PFC
13152018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1316
1317 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1318 wordsize of the inferior. Call ppc_linux_target_wordsize.
1319
bd64614e
PFC
13202018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1321
1322 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1323 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1324 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1325 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1326 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1327 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1328 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1329 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1330 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1331 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1332 (tdesc_powerpc_e500l): Remove.
1333 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1334 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1335 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1336 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1337 linux-ppc-tdesc.h.
1338 (ppc_arch_setup): Remove target description matching code. Fill a
1339 ppc_linux_features struct and call ppc_linux_match_description
1340 with it.
1341
75d74cca
MR
13422018-05-22 Maciej W. Rozycki <macro@mips.com>
1343
1344 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1345 width of the requested register exceeds the width of the
1346 `ptrace' data type.
1347 (mips_cannot_store_register): Likewise.
1348
e4439e43
MR
13492018-05-21 Maciej W. Rozycki <macro@mips.com>
1350
1351 * linux-mips-low.c (mips_fetch_register): New function. Update
1352 preceding comment.
1353 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1354 (the_low_target): Wire `mips_fetch_register'.
1355
55271bf9
JB
13562018-05-10 Joel Brobecker <brobecker@adacore.com>
1357
1358 * lynx-i386-low.c (LYNXOS_178): New macro.
1359 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1360 the layout on LynxOS-178.
1361 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1362 handle floating point registers that are not supported by
1363 LynxOS-178.
1364
1a34f210
TT
13652018-05-10 Tom Tromey <tom@tromey.com>
1366
1367 * configure: Rebuild.
1368
190852c8
JB
13692018-05-10 Joel Brobecker <brobecker@adacore.com>
1370
1371 PR server/23158:
1372 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1373 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1374 Use it to set the expedite_regs field in the given tdesc.
1375 * x86-tdesc.h: New file.
1376 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1377 Adjust following the addition of the new expedite_regs parameter
1378 to init_target_desc.
1379 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1380 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1381 (i386_linux_read_description, amd64_linux_read_description):
1382 Adjust following the addition of the new expedite_regs parameter
1383 to init_target_desc.
1384 * lynx-i386-low.c: #include "x86-tdesc.h".
1385 (lynx_i386_arch_setup): Adjust following the addition of the new
1386 expedite_regs parameter to init_target_desc.
1387 * nto-x86-low.c: #include "x86-tdesc.h".
1388 (nto_x86_arch_setup): Adjust following the addition of the new
1389 expedite_regs parameter to init_target_desc.
1390 * win32-i386-low.c: #include "x86-tdesc.h".
1391 (i386_arch_setup): Adjust following the addition of the new
1392 expedite_regs parameter to init_target_desc.
1393
7dbac825
JB
13942018-05-10 Joel Brobecker <brobecker@adacore.com>
1395
1396 PR server/23158:
1397 * win32-low.c (win32_create_inferior): Add call to my_wait
1398 setting last_status global.
1399
906994d9
JB
14002018-05-10 Joel Brobecker <brobecker@adacore.com>
1401
1402 PR server/23158:
1403 * win32-low.c (create_process): Only call gdb_tilde_expand if
1404 inferior_cwd is not NULL.
1405
8ee22052
AB
14062018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1407
1408 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1409 registers to the cache if their values have changed.
1410 (i387_xsave_to_cache): Provide default values for x87 control
1411 registers when these features are available, but disabled.
1412 * regcache.c (supply_register_by_name_zeroed): New function.
1413 * regcache.h (supply_register_by_name_zeroed): Declare new
1414 function.
1415
aff689d3
TT
14162018-05-07 Tom Tromey <tom@tromey.com>
1417
1418 * configure: Rebuild.
1419
85e26832
TT
14202018-05-04 Tom Tromey <tom@tromey.com>
1421
1422 * configure: Rebuild.
1423
a3b60e45
JK
14242018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1425 Pedro Alves <palves@redhat.com>
1426
1427 * linux-aarch64-low.c (aarch64_stopped_data_address):
1428 Likewise.
1429
632e107b
TT
14302018-04-27 Tom Tromey <tom@tromey.com>
1431
1432 * configure: Rebuild.
1433
458412c3
TT
14342018-04-23 Tom Tromey <tom@tromey.com>
1435
1436 * configure: Rebuild.
1437
f31c089e
SM
14382018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1439
1440 * Makefile.in (depcomp): Add "..".
1441 (all_deps_files): New and use it.
1442
b319b098
AH
14432018-04-18 Alan Hayward <alan.hayward@arm.com>
1444
1445 * configure.srv (aarch64*-*-linux*): Don't include xml.
1446 (i[34567]86-*-cygwin*): Likewise.
1447 (i[34567]86-*-linux*): Likewise.
1448 (i[34567]86-*-lynxos*): Likewise.
1449 (i[34567]86-*-mingw32ce*): Likewise.
1450 (i[34567]86-*-mingw*): Likewise.
1451 (i[34567]86-*-nto*): Likewise.
1452 (tic6x-*-uclinux): Likewise.
1453 (x86_64-*-linux*): Likewise.
1454 (x86_64-*-mingw*): Likewise.
1455 (x86_64-*-cygwin*): Likewise.
1456
3b74854b
AH
14572018-04-18 Alan Hayward <alan.hayward@arm.com>
1458
1459 * tdesc.c: Remove xml parameter.
1460
e98577a9
AH
14612018-04-18 Alan Hayward <alan.hayward@arm.com>
1462
1463 * server.c (get_features_xml): Remove cast.
1464 * tdesc.c (void target_desc::accept): Fill in function.
1465 (tdesc_get_features_xml): Remove old xml creation.
1466 (print_xml_feature::visit_pre): Add xml vistor.
1467 * tdesc.h (struct target_desc): Make xmltarget mutable.
1468 (tdesc_get_features_xml): Remove declaration.
1469
d278f585
AH
14702018-04-18 Alan Hayward <alan.hayward@arm.com>
1471
1472 * tdesc.c (tdesc_architecture_name): Add new function.
1473 (tdesc_osabi_name): Likewise.
1474 (tdesc_get_features_xml): Use new functions.
1475
eee8a18d
AH
14762018-04-18 Alan Hayward <alan.hayward@arm.com>
1477
1478 * tdesc.c (tdesc_create_flags): Remove.
1479 (tdesc_add_flag): Likewise.
1480 (tdesc_named_type): Likewise.
1481 (tdesc_create_union): Likewise.
1482 (tdesc_create_struct): Likewise.
1483 (tdesc_create_vector): Likewise.
1484 (tdesc_add_bitfield): Likewise.
1485 (tdesc_add_field): Likewise.
1486 (tdesc_set_struct_size): Likewise.
1487
82ec9bc7
AH
14882018-04-18 Alan Hayward <alan.hayward@arm.com>
1489
1490 * tdesc.c (~target_desc): Remove implictly deleted items.
1491 (init_target_desc): Iterate all features.
1492 (tdesc_get_features_xml): Use vector.
1493 (tdesc_create_feature): Create feature.
1494 * tdesc.h (tdesc_feature) Remove
1495 (target_desc): Add features.
1496
ea3e7d71
AH
14972018-04-18 Alan Hayward <alan.hayward@arm.com>
1498
1499 * Makefile.in: Add common/tdesc.c
1500 * tdesc.c (init_target_desc): init all reg_defs from register
1501 vector.
1502 (tdesc_create_reg): Create tdesc_reg.
1503 * tdesc.h (tdesc_feature): Add register vector.
1504
17d08cd4
SM
15052018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1506
1507 * tdesc.h (struct target_desc) <features>: Change type to
1508 std::vector<std::string>.
1509 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1510 changes.
1511 (tdesc_get_features_xml): Likewise.
1512 (tdesc_create_feature): Likewise.
1513
5cd3e386
AH
15142018-03-26 Alan Hayward <alan.hayward@arm.com>
1515
1516 * regcache.c (find_register_by_number): Return a ref.
1517 (find_regno): Use references.
1518 (register_size): Likewise.
1519 (register_data): Likewise.
1520 * tdesc.c (target_desc::~target_desc): Remove free calls.
1521 (target_desc::operator==): Use std::vector compare.
1522 (init_target_desc): Use reference.
1523 (tdesc_create_reg): Use reg constructors.
1524 * tdesc.h (struct target_desc): Replace pointer with object.
1525
dff7492c
AH
15262018-03-23 Alan Hayward <alan.hayward@arm.com>
1527
1528 * regcache.c (find_register_by_number): Make static.
1529 (find_regno): Use find_register_by_number
1530 * regcache.h (struct reg): Remove declaration.
1531
d80e5242
AH
15322018-03-23 Alan Hayward <alan.hayward@arm.com>
1533
1534 * tdesc.c (target_desc::~target_desc): Move to here.
1535 (target_desc::operator==): Likewise.
1536 * tdesc.h (target_desc::~target_desc): Move from here.
1537 (target_desc::operator==): Likewise.
1538
f69c5afb
AA
15392018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1540
1541 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1542
ce29f843
AA
15432018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1544
1545 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1546 S390_TDESC_GS.
1547 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1548 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1549 and init_registers_s390_gs_linux64.
1550
c49bd90b
AA
15512018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1552
1553 * linux-s390-low.c (s390_fill_gs): Remove function.
1554 (s390_fill_gsbc): Remove function.
1555 (s390_regsets): Set fill functions for the guarded storage regsets
1556 to NULL.
1557
7edb9bd3
AA
15582018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1559
1560 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1561 the word size. Add comment.
1562 (s390_get_wordsize): New function.
1563 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1564 pswm with it. Instead, use s390_get_wordsize to determine the
1565 word size first and derive the correct tdesc from that directly.
1566
39be3c7e
SM
15672018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1568
1569 * Makefile.in: Include silent-rules.mk.
1570 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1571 (COMPILE): Add ECHO_CXX.
1572 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1573 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1574 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1575 (version-generated.c): Add ECHO_GEN.
1576 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1577 (IPAGENT_COMPILE): Add ECHO_CXX.
1578 (%-generated.c): Add ECHO_REGDAT.
1579
3ae9ce5d
TT
15802018-03-14 Tom Tromey <tom@tromey.com>
1581
1582 PR cli/14977:
1583 * ax.c (ax_printf): Special case for NULL.
1584
e6a58aa8
SM
15852018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1586
1587 * linux-low.c (linux_qxfer_libraries_svr4): Use
1588 xml_escape_text_append.
1589
f6e8a41e
SM
15902018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1591
1592 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1593
b9671caf
SM
15942018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1595
1596 * server.c (handle_general_set): Remove unnecessary xstrdup.
1597
e80aaf61
SM
15982018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1599
1600 * server.c (parse_debug_format_options): Adjust to
1601 delim_string_to_char_ptr_vec changes.
1602 * thread-db.c (thread_db_load_search): Adjust to
1603 dirnames_to_char_ptr_vec changes.
1604
b1223e78
MM
16052018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1606
1607 * target.h (target_enable_btrace, target_disable_btrace)
1608 (target_read_btrace, target_read_btrace_conf): Turn macro into
1609 inline function. Throw error if target method is not defined.
1610 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1611 check for btrace target method. Be prepared to handle exceptions
1612 from btrace target methods.
1613
81561546
SDJ
16142018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1615
1616 * server.c (captured_main): Change order of error message printed
1617 when the current working directory cannot be found.
1618
25e3c82c
SDJ
16192018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1620
1621 * server.c: Include "filenames.h" and "pathstuff.h".
1622 (program_name): Delete variable.
1623 (program_path): New anonymous class.
1624 (get_exec_wrapper): Use "program_path" instead of
1625 "program_name".
1626 (handle_v_run): Likewise.
1627 (captured_main): Likewise.
1628 (process_serial_event): Likewise.
1629
b4987c95
SDJ
16302018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1631
1632 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1633 (OBJS): Add "pathstuff.o".
1634 * server.c (current_directory): New global variable.
1635 (captured_main): Initialize "current_directory".
1636
f46cd62a
AH
16372018-02-26 Alan Hayward <alan.hayward@arm.com>
1638
1639 * tdesc.c: Use common/tdesc.h.
1640 * tdesc.h: Likewise.
1641
a543c5ca
AH
16422018-02-20 Alan Hayward <alan.hayward@arm.com>
1643 Simon Marchi <simon.marchi@ericsson.com>
1644
1645 * Makefile.in: Switch order of make rules.
1646
b5884fa7
AH
16472018-02-19 Alan Hayward <alan.hayward@arm.com>
1648
1649 * Makefile.in: Add common directory in build.
1650 * configure.ac: Add common reference.
1651 * configure: Regenerate.
1652
de6242d3
MM
16532018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1654
1655 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1656 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1657 * spu-low.c (spu_target_ops): Likewise.
1658 * win32-low.c (win32_target_ops): Likewise.
1659 * server.c (supported_btrace_packets): Report packets unconditionally.
1660 * target.h (target_ops) <supports_btrace>: Remove.
1661 (target_supports_btrace): Remove.
1662
9ee23a85
MM
16632018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1664
1665 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1666 (handle_btrace_disable): Change return type to void. Use exceptions
1667 to report errors.
1668 (handle_btrace_general_set): Catch exception and copy message to
1669 return message.
1670
8ce47547
TT
16712018-02-08 Tom Tromey <tom@tromey.com>
1672
1673 * linux-low.c (install_software_single_step_breakpoints): Use
1674 make_scoped_restore.
1675 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1676 (do_restore_current_thread_cleanup): Remove.
1677 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1678 declare.
1679
45dd3607
TT
16802018-02-08 Tom Tromey <tom@tromey.com>
1681
1682 * mem-break.c (set_raw_breakpoint_at): Use
1683 gdb::unique_xmalloc_ptr.
1684
e671cd59
PA
16852018-01-30 Pedro Alves <palves@redhat.com>
1686
1687 PR gdb/13211
1688 * target.c (target_terminal::terminal_state): Rename to ...
1689 (target_terminal::m_terminal_state): ... this.
1690
a0aad537
JC
16912018-01-19 James Clarke <jrtc27@jrtc27.com>
1692
1693 * linux-low.c (handle_extended_wait): Surround call to
1694 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1695
4d9b86e1
SM
16962018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1697
1698 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1699 linux_ptrace_attach_fail_reason_string now returning an
1700 std::string.
1701 (linux_attach): Likewise.
1702 * thread-db.c (attach_thread): Likewise.
1703
f517c180
EA
17042018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1705
1706 PR gdb/21559
1707 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1708 checking for fs_base/gs_base fields in struct user_regs_struct.
1709 * configure: Regenerate.
1710
9a70f35c
YQ
17112018-01-16 Yao Qi <yao.qi@linaro.org>
1712
1713 PR gdb/18749
1714 * linux-low.c (fetch_register): Call supply_register instead of
1715 error.
1716
605fd3c6
YQ
17172018-01-08 Yao Qi <yao.qi@linaro.org>
1718 Simon Marchi <simon.marchi@ericsson.com>
1719
1720 * Makefile.in (OBS): Remove selftest.o.
1721 * configure.ac: Set srv_selftest_objs if $development is true.
1722 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1723 * configure: Re-generated.
1724 * server.c (captured_main): Wrap variable selftest_filter with
1725 GDB_SELF_TEST.
1726
2cc05030
SM
17272018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1728
1729 * server.c (parse_debug_format_options): Return std::string.
1730 (handle_monitor_command, captured_main): Adjust.
1731
e379cee6
PA
17322018-01-05 Pedro Alves <palves@redhat.com>
1733
1734 PR gdb/18653
1735 * server.c (captured_main): Pass quiet=false to
1736 save_original_signals_state.
1737
82e1e79a
JB
17382018-01-01 Joel Brobecker <brobecker@adacore.com>
1739
1740 * gdbreplay.c (gdbreplay_version): Update copyright year in
1741 version message.
1742 * server.c (gdbserver_version): Likewise.
1743
8e481c3b
TT
17442017-12-08 Tom Tromey <tom@tromey.com>
1745
1746 * ax.c (ax_printf): Update.
1747
a8806230
YQ
17482017-12-07 Yao Qi <yao.qi@linaro.org>
1749
1750 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1751 aarch64_linux_read_description.
1752 * linux-amd64-ipa.c (idx2mask): New array.
1753 (get_ipa_tdesc): Move idx2mask out.
1754 (initialize_low_tracepoint): Initialize target descriptions.
1755 * linux-i386-ipa.c (idx2mask): New array.
1756 (get_ipa_tdesc): Move idx2mask out.
1757 (initialize_low_tracepoint): Initialize target descriptions.
1758
d4a0e8b5
SM
17592017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1760
1761 * tdesc.c (struct tdesc_type): Change return type.
1762 (tdesc_add_flag): Change parameter type.
1763 (tdesc_add_bitfield): Likewise.
1764 (tdesc_add_field): Likewise.
1765 (tdesc_set_struct_size): Likewise.
1766
798a7429
SM
17672017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1768
1769 * regcache.c (registers_to_string): Remove unused variable.
1770
c0e15c9b
SM
17712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1772
1773 * inferiors.c (for_each_inferior_with_data): Remove.
1774 * inferiors.h (for_each_inferior_with_data): Remove.
1775 * server.c (handle_qxfer_threads_worker): Change parameter type.
1776 (handle_qxfer_threads_proper): Use for_each_thread.
1777
f0045347
SM
17782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1779
1780 * inferiors.c (for_each_inferior): Remove.
1781 (clear_inferiors): Use for_each_thread.
1782 * inferiors.h (for_each_inferior): Remove.
1783 * linux-low.c (linux_wait_for_event_filtered): Use
1784 for_each_thread.
1785 (linux_stabilize_threads): Likewise.
1786 * regcache.c (regcache_release): Likewise.
1787 * server.c (gdb_wants_all_threads_stopped): Likewise.
1788 (clear_pending_status_callback): Remove.
1789 (handle_status): Use for_each_thread.
1790 (captured_main): Likewise.
1791 * win32-low.c (child_init_thread_list): Likewise.
1792 (win32_clear_inferiors): Likewise.
1793 (fake_breakpoint_event): Likewise.
1794
9521758b
SM
17952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1796
1797 * inferiors.h (find_inferior): Remove.
1798 * inferiors.c (find_inferior): Remove.
1799
8f86d7aa
SM
18002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1801
1802 * linux-low.c (resume_status_pending_p): Update comment.
1803 (need_step_over_p): Update comment.
1804
e2b44075
SM
18052017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1806
1807 * linux-low.c (proceed_one_lwp): Return void, change parameter
1808 type.
1809 (unsuspend_and_proceed_one_lwp): Likewise.
1810 (proceed_all_lwps): Use for_each_thread.
1811 (unstop_all_lwps): Likewise.
1812
c80825ff
SM
18132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1814
1815 * linux-low.c (linux_resume_one_thread): Return void, take
1816 parameter directly.
1817 (linux_resume): Use for_each_thread.
1818
df3e4dbe
SM
18192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1820
1821 * linux-low.c (send_sigstop_callback): Return void, change
1822 parameter type. Rename to...
1823 (send_sigstop): ... this.
1824 (suspend_and_send_sigstop_callback): Return void, change parameter
1825 type. Rename to...
1826 (suspend_and_send_sigstop): ... this.
1827 (stop_all_lwps): Use for_each_thread.
1828
5a6b0a41
SM
18292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1830
1831 * linux-low.c (lwp_running): Return bool, remove unused
1832 argument.
1833 (linux_stabilize_threads): Use find_thread.
1834
39a64da5
SM
18352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1836
1837 * linux-low.c (select_singlestep_lwp_callback): Remove.
1838 (count_events_callback): Remove.
1839 (select_event_lwp_callback): Remove.
1840 (select_event_lwp): Use find_thread/for_each_thread.
1841
a1385b7b
SM
18422017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1843
1844 * linux-low.c (not_stopped_callback): Return bool, take filter
1845 argument directly.
1846 (linux_wait_for_event_filtered): Use find_thread.
1847 (linux_wait_1): Likewise.
1848
454296a2
SM
18492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1850
1851 * linux-low.c (same_lwp): Remove.
1852 (find_lwp_pid): Use find_thread.
1853
6b2a85da
SM
18542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1855
1856 * linux-low.c (delete_lwp_callback): Remove.
1857 (linux_mourn): Use for_each_thread.
1858
798a38e8
SM
18592017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1860
1861 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1862 args parameter, don't check for pid.
1863 (linux_detach): Use for_each_thread.
1864
e4eb0dec
SM
18652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1866
1867 * linux-low.c (struct counter): Remove.
1868 (second_thread_of_pid_p): Remove.
1869 (last_thread_of_process_p): Use find_thread.
1870
83e1b6c1
SM
18712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1872
1873 * inferiors.c (find_inferior_in_random): Remove.
1874 * inferiors.h (find_inferior_in_random): Remove.
1875 * linux-low.c (status_pending_p_callback): Return bool, accept
1876 parameter ptid directly.
1877 (linux_wait_for_event_filtered): Use find_thread_in_random.
1878 (linux_wait_1): Likewise.
1879
8dc7b443
SM
18802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1881
1882 * inferiors.c (find_inferior_id): Remove.
1883 (find_thread_ptid): Move implemention from find_inferior_id to
1884 here.
1885 * inferiors.h (find_inferior_id): Remove.
1886 * server.c (handle_status): Use find_thread_ptid.
1887 (process_serial_event): Likewise.
1888 * thread-db.c (find_one_thread): Likewise.
1889 (thread_db_thread_handle): Likewise.
1890 * win32-low.c (thread_rec): Likewise.
1891 (child_delete_thread): Likewise.
1892 (win32_thread_alive): Likewise.
1893 (get_child_debug_event): Likewise.
1894
da25033c
SM
18952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1896
1897 * linux-mips-low.c (update_watch_registers_callback): Return
1898 void, remove pid_p parameter, don't check for pid.
1899 (mips_insert_point, mips_remove_point): Use for_each_thread.
1900
c91bb56b
SM
19012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1902
1903 * lynx.low (lynx_delete_thread_callback): Remove.
1904 (lynx_mourn): Use for_each_thread.
1905
634a3254
SM
19062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1907
1908 * regcache.c (regcache_invalidate_one): Remove.
1909 (regcache_invalidate_pid): use for_each_thread.
1910
41272101
TT
19112017-11-26 Tom Tromey <tom@tromey.com>
1912
1913 * linux-low.c (linux_create_inferior): Update.
1914
f5291a6f
UW
19152017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1916
1917 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1918
6654d750
AH
19192017-11-24 Alan Hayward <alan.hayward@arm.com>
1920
1921 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1922 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1923 * linux-aarch64-tdesc-selftest.c: New file.
1924 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1925
19262017-11-24 Alan Hayward <alan.hayward@arm.com>
1927
1928 * configure.srv: Add new file.
1929 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1930 * linux-aarch64-tdesc-selftest.c: New file.
1931 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1932
49bdb7ee
AH
19332017-11-24 Alan Hayward <alan.hayward@arm.com>
1934
1935 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1936 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1937 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1938
d6d7ce56
AH
19392017-11-24 Alan Hayward <alan.hayward@arm.com>
1940
1941 * configure.srv: Add new files.
1942 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1943 aarch64_linux_read_description.
1944 * linux-aarch64-low.c (aarch64_linux_read_description):
1945 Merge with aarch64_arch_setup.
1946 (aarch64_arch_setup): Call aarch64_linux_read_description.
1947 * linux-aarch64-tdesc.c: New file.
1948 * linux-aarch64-tdesc.h: New file.
1949
506fe5f4
YQ
19502017-11-24 Yao Qi <yao.qi@linaro.org>
1951
1952 * configure.srv: Set $srv_regobj for tic6x-linux.
1953 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1954 (tic6x_read_description): Move some code to tic6x_arch_setup.
1955 (tic6x_tdesc_test): New function.
1956 (initialize_low_arch): Call selftests::register_test.
1957
29f9a567
YQ
19582017-11-22 Yao Qi <yao.qi@linaro.org>
1959
1960 * remote-utils.c (prepare_resume_reply): Use memcpy.
1961
578290ec
SM
19622017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1963
1964 * linux-low.c (kill_one_lwp_callback): Return void, take
1965 argument directly, don't filter on pid.
1966 (linux_kill): Use for_each_thread.
1967
eca55aec
SM
19682017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1969
1970 * linux-low.c (need_step_over_p): Return bool, remove dummy
1971 argument.
1972 (linux_resume, proceed_all_lwps): Use find_thread.
1973
25c28b4d
SM
19742017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1975
1976 * linux-low.c (resume_status_pending_p): Return bool, remove
1977 flag_p argument.
1978 (linux_resume): Use find_thread.
1979
5fdda392
SM
19802017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1981
1982 * linux-low.c (struct thread_resume_array): Remove.
1983 (linux_set_resume_request): Return void, take arguments
1984 directly.
1985 (linux_resume): Use for_each_thread.
1986
fcb056a5
SM
19872017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1988
1989 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1990 return bool, remove data argument.
1991 (linux_stabilize_threads): Use find_thread.
1992
139720c5
SM
19932017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1994
1995 * linux-low.c (unsuspend_one_lwp): Remove.
1996 (unsuspend_all_lwps): Use for_each_thread, inline code from
1997 unsuspend_one_lwp.
1998
6d1e5673
SM
19992017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2000
2001 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2002 * linux-low.c (struct iterate_over_lwps_args): Remove.
2003 (iterate_over_lwps_filter): Remove.
2004 (iterate_over_lwps): Use find_thread.
2005
bbf550d5
SM
20062017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2007
2008 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2009 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2010 code from reset_lwp_ptrace_options_callback.
2011
00192f77
SM
20122017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2013
2014 * linux-arm-low.c (struct update_registers_data): Remove.
2015 (update_registers_callback): Return void, take arguments
2016 directly, don't check thread's pid.
2017 (arm_insert_point, arm_remove_point): Use for_each_thread.
2018
2bee2b6c
SM
20192017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2020
2021 * win32-low.c (continue_one_thread): Return void, take argument
2022 directly.
2023 (child_continue): Use for_each_thread.
2024
0b360f19
SM
20252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2026
2027 * win32-i386-low.c (update_debug_registers_callback): Rename
2028 to ...
2029 (update_debug_registers): ... this, return void, remove pid_p arg.
2030 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2031
f27866ba
SM
20322017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2033
2034 * inferiors.h (struct process_info): Add constructor, initialize
2035 fields..
2036 <syscalls_to_catch>: Change type to std::vector<int>.
2037 * inferiors.c (add_process): Allocate process_info with new.
2038 (remove_process): Free process_info with delete.
2039 * linux-low.c (handle_extended_wait): Adjust.
2040 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2041 * server.c (handle_general_set): Adjust.
2042
e849ea89
PA
20432017-11-16 Pedro Alves <palves@redhat.com>
2044
2045 * remote-utils.c (remote_close): Block SIGIO signals instead of
2046 uninstalling the SIGIO handler.
2047
1d0aa65c
AH
20482017-11-16 Alan Hayward <alan.hayward@arm.com>
2049
2050 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2051
3491a34c
YQ
20522017-11-16 Yao Qi <yao.qi@linaro.org>
2053
2054 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2055 (tic6x_store_gregset): Likewise.
2056 (tic6x_usrregs_info): Move it up.
2057
a602f924
AH
20582017-11-15 Alan Hayward <alan.hayward@arm.com>
2059
2060 * Makefile.in: Update arch rules.
2061 * configure.srv: Explicitly mark arch/ files.
2062
5616b6c3
AS
20632017-11-13 Andreas Schwab <schwab@suse.de>
2064
2065 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2066 function.
2067 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2068
d1928160
PA
20692017-11-06 Pedro Alves <palves@redhat.com>
2070
2071 * config.in, configure: Regenerate.
2072
bac608e7
SM
20732017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2074
2075 * target.c (struct thread_search): Remove.
2076 (thread_search_callback): Remove.
2077 (prepare_to_access_memory): Use for_each_thread instead of
2078 find_inferior. Inline code from thread_search_callback.
2079
eaddb425
SM
20802017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2081
2082 * server.c (struct visit_actioned_threads_data): Remove.
2083 (visit_actioned_threads): Change prototype to take arguments
2084 directly.
2085 (resume): Use find_thread instead of find_inferior.
2086
99078d34
SM
20872017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2088
2089 * server.c (queue_stop_reply_callback): Change prototype, return
2090 void.
2091 (find_status_pending_thread_callback): Remove.
2092 (handle_status): Replace find_inferior with find_thread and
2093 for_each_thread.
2094
cc628f3d
AH
20952017-10-25 Alan Hayward <alan.hayward@arm.com>
2096
2097 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2098 with REGNO.
2099 (aarch64_store_gregset): Likewise.
2100 (aarch64_fill_fpregset): Likewise.
2101 (aarch64_store_fpregset): Likewise.
2102
4d3bb80e
SM
21032017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2104
2105 * gdbthread.h (find_thread, for_each_thread): New functions.
2106 * inferiors.c (thread_of_pid): Remove.
2107 (find_any_thread_of_pid): Use find_thread.
2108 * linux-low.c (num_lwps): Use for_each_thread.
2109
7a7cdfa0
YQ
21102017-10-17 Yao Qi <yao.qi@linaro.org>
2111
2112 * Makefile.in: Remove one rule.
2113 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2114
e675d170
YQ
21152017-10-17 Yao Qi <yao.qi@linaro.org>
2116
2117 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2118 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2119
7eb4e0f9
YQ
21202017-10-17 Yao Qi <yao.qi@linaro.org>
2121
2122 * configure.srv: Rename arm.o with arch/arm.o.
2123
60d6cfc9
YQ
21242017-10-17 Yao Qi <yao.qi@linaro.org>
2125
2126 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2127 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2128 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2129 (arch-i386.o, arch-amd64.o): Remove rules.
2130 (arch/%.o): New rule.
2131 Update POSTCOMPILE and COMPILE.pre.
2132 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2133 * configure: Re-generated.
2134 * configure.srv: Replace arch-i386.o with arch/i386.o.
2135 Replace arch-amd64.o with arch/amd64.o.
2136
5bfda255
YQ
21372017-10-16 Yao Qi <yao.qi@linaro.org>
2138
2139 * configure: Regenerated.
2140
9c80ecd6
SM
21412017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2142
2143 * inferiors.h: (struct inferior_list): Remove.
2144 (struct inferior_list_entry); Remove.
2145 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2146 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2147 get_first_inferior): Remove.
2148 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2149 find_inferior_id, find_inferior_in_random): Change signature.
2150 * inferiors.c (all_threads): Change type to
2151 std::list<thread_info *>.
2152 (get_thread): Remove macro.
2153 (find_inferior, find_inferior_id): Change signature, implement
2154 using find_thread.
2155 (find_inferior_in_random): Change signature, implement using
2156 find_thread_in_random.
2157 (for_each_inferior, for_each_inferior_with_data): Change
2158 signature, implement using for_each_thread.
2159 (add_inferior_to_list, remove_inferior): Remove.
2160 (add_thread, get_first_thread, thread_of_pid,
2161 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2162 (get_first_inferior, one_inferior_p, clear_inferior_list):
2163 Remove.
2164 (clear_inferiors, get_thread_process): Update.
2165 * gdbthread.h: Include <list>.
2166 (struct thread_info) <entry>: Remove field.
2167 <id>: New field.
2168 (all_threads): Change type to std::list<thread_info *>.
2169 (get_first_inferior): Add doc.
2170 (find_thread, for_each_thread, find_thread_in_random): New
2171 functions.
2172 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2173 * linux-arm-low.c (update_registers_callback): Update.
2174 * linux-low.c (second_thread_of_pid_p): Update.
2175 (kill_one_lwp_callback, linux_detach_lwp_callback,
2176 delete_lwp_callback, status_pending_p_callback, same_lwp,
2177 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2178 iterate_over_lwps, not_stopped_callback,
2179 resume_stopped_resumed_lwps, count_events_callback,
2180 select_singlestep_lwp_callback, select_event_lwp_callback,
2181 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2182 suspend_and_send_sigstop_callback, wait_for_sigstop,
2183 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2184 lwp_running, linux_set_resume_request, resume_status_pending_p,
2185 need_step_over_p, start_step_over, linux_resume_one_thread,
2186 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2187 reset_lwp_ptrace_options_callback): Update.
2188 * linux-mips-low.c (update_watch_registers_callback): Update.
2189 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2190 Update.
2191 (free_register_cache_thread_one): Remove.
2192 (regcache_release): Update.
2193 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2194 handle_qxfer_threads_worker): Update.
2195 (handle_query): Update, use list iterator.
2196 (visit_actioned_threads, handle_pending_status,
2197 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2198 clear_pending_status_callback, set_pending_status_callback,
2199 find_status_pending_thread_callback, handle_status,
2200 process_serial_event): Update.
2201 * target.c (thread_search_callback): Update.
2202 * thread-db.c (thread_db_get_tls_address): Update.
2203 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2204 Update.
2205 * win32-i386-low.c (update_debug_registers_callback): Update.
2206 * win32-low.c (delete_thread_info, child_delete_thread,
2207 continue_one_thread, suspend_one_thread,
2208 get_child_debug_event): Adjust.
2209
9179355e
SM
22102017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2211
2212 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2213 * inferiors.h: Include <list>.
2214 (struct process_info) <entry>: Remove field.
2215 <pid>: New field.
2216 (pid_of): Change macro to function.
2217 (ptid_of, lwpid_of): Remove macro.
2218 (all_processes): Change type to std::list<process_info *>.
2219 (ALL_PROCESSES): Remove macro.
2220 (for_each_process, find_process): New function.
2221 * inferiors.c (all_processes): Change type to
2222 std::list<process_info *>.
2223 (find_thread_process): Adjust.
2224 (add_process): Likewise.
2225 (remove_process): Likewise.
2226 (find_process_pid): Likewise.
2227 (get_first_process): Likewise.
2228 (started_inferior_callback): Remove.
2229 (have_started_inferiors_p): Adjust.
2230 (attached_inferior_callback): Remove.
2231 (have_attached_inferiors_p): Adjust.
2232 * linux-low.c (check_zombie_leaders): Likewise.
2233 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2234 (x86_linux_update_xmltarget): Adjust.
2235 * server.c (handle_query): Likewise.
2236 (gdb_reattached_process): Remove.
2237 (handle_status): Adjust.
2238 (kill_inferior_callback): Likewise.
2239 (detach_or_kill_inferior): Remove.
2240 (print_started_pid): Likewise.
2241 (print_attached_pid): Likewise.
2242 (detach_or_kill_for_exit): Update.
2243 (process_serial_event): Likewise.
2244 * linux-arm-low.c (arm_new_fork): Likewise.
2245
c9cb8905
SM
22462017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2247
2248 * dll.h: Include <list>.
2249 (struct dll_info): Add constructor.
2250 <entry>: Remove field.
2251 (all_dlls): Change type to std::list<dll_info>.
2252 * dll.c: Include <algorithm>.
2253 (get_dll): Remove macro.
2254 (all_dlls): Change type to std::list<dll_info *>.
2255 (free_one_dll): Remove.
2256 (match_dll): Likewise.
2257 (loaded_dll): Adjust.
2258 (unloaded_dll): Adjust to all_dlls type change, use
2259 std::find_if. Inline code from match_dll.
2260 (clear_dlls): Adjust to all_dlls type change.
2261 * server.c (emit_dll_description): Remove.
2262 (handle_qxfer_libraries): Adjust to all_dlls type change,
2263 integrate emit_dll_description's functionality.
2264
04ec7890
SM
22652017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2266
2267 * linux-low.h (struct linux_target_ops) <delete_process>: New
2268 field.
2269 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2270 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2271 (struct linux_target_ops): Add delete_process callback.
2272 * linux-arm-low.c (arm_delete_process): New.
2273 (struct linux_target_ops): Add delete_process callback.
2274 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2275 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2276 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2277 * linux-mips-low.c (mips_linux_delete_process): New.
2278 (struct linux_target_ops): Add delete_process callback.
2279 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2280 * linux-s390-low.c (struct linux_target_ops): Likewise.
2281 * linux-sh-low.c (struct linux_target_ops): Likewise.
2282 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2283 * linux-tile-low.c (struct linux_target_ops): Likewise.
2284 * linux-x86-low.c (x86_linux_delete_process): New.
2285 (struct linux_target_ops): Add delete_process callback.
2286 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2287
466eecee
SM
22882017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2289
2290 * linux-aarch64-low.c (the_low_target): Add thread delete
2291 callback.
2292 * linux-arm-low.c (arm_delete_thread): New function.
2293 (the_low_target): Add thread delete callback.
2294 * linux-bfin-low.c (the_low_target): Likewise.
2295 * linux-crisv32-low.c (the_low_target): Likewise.
2296 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2297 set.
2298 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2299 field.
2300 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2301 * linux-mips-low.c (mips_linux_delete_thread): New function.
2302 (the_low_target): Add thread delete callback.
2303 * linux-ppc-low.c (the_low_target): Likewise.
2304 * linux-s390-low.c (the_low_target): Likewise.
2305 * linux-sh-low.c (the_low_target): Likewise.
2306 * linux-tic6x-low.c (the_low_target): Likewise.
2307 * linux-tile-low.c (the_low_target): Likewise.
2308 * linux-x86-low.c (the_low_target): Likewise.
2309 * linux-xtensa-low.c (the_low_target): Likewise.
2310
b79f7801
YZ
23112017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2312
2313 * win32-low.c: Include "common-inferior.h".
2314
bc3b087d
SDJ
23152017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2316
2317 * inferiors.c (set_inferior_cwd): New function.
2318 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2319 (handle_query): Inform that QSetWorkingDir is supported.
2320 * win32-low.c (create_process): Pass the inferior's cwd to
2321 CreateProcess.
2322
d092c5a2
SDJ
23232017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2324
2325 * inferiors.c (current_inferior_cwd): New global variable.
2326 (get_inferior_cwd): New function.
2327 * inferiors.h (struct process_info) <cwd>: New field.
2328
7da0a886
SDJ
23292017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2330
2331 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2332 (OBS): Add gdb_tilde_expand.o.
2333
289a6840
SM
23342017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2335
2336 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2337 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2338
256642e8
PA
23392017-09-29 Pedro Alves <palves@redhat.com>
2340
2341 * ax.c (gdb_parse_agent_expr): Constify.
2342 * ax.h (gdb_parse_agent_expr): Constify.
2343 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2344 Constify.
2345 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2346 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2347 * remote-utils.h (read_ptid): Constify.
2348 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2349 (process_point_options, process_serial_event): Constify.
2350 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2351 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2352 (cmd_qtbuffer): Constify.
2353
5b9ca4d4
PA
23542017-09-29 Pedro Alves <palves@redhat.com>
2355
2356 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2357 fails.
2358
94c207e0
PA
23592017-09-29 Pedro Alves <palves@redhat.com>
2360
2361 * linux-low.c (handle_extended_wait): Pass parent thread instead
2362 of process to thread_db_notice_clone.
2363 * linux-low.h (thread_db_notice_clone): Replace parent process
2364 parameter with parent thread parameter.
2365 * thread-db.c (find_one_thread): Add comment.
2366 (thread_db_notice_clone): Replace parent process parameter with
2367 parent thread parameter. Temporarily switch to the parent thread.
2368
75352e28
SDJ
23692017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2370
2371 * gdbthread.h: Include "common-gdbthread.h".
2372 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2373 "if" when validating the ptid.
2374 * remote-utils.c: Include "gdbthread.h".
2375 (prepare_resume_reply): Use "switch_to_thread".
2376 * target.c (done_accessing_memory): Likewise.
2377
ad339634
AA
23782017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2379
2380 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2381 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2382 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2383 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2384 s390x-gs-linux64-ipa.o to ipa_obj.
2385 * linux-s390-low.c (HWCAP_S390_GS): New define.
2386 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2387 New functions.
2388 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2389 (s390_arch_setup): Check for guarded-storage support and choose
2390 appropriate tdesc.
2391 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2392 init_registers_s390x_gs_linux64.
2393 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2394 enum value.
2395 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2396 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2397
cc4d742f
SM
23982017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2399
2400 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2401
f6327dcb
KB
24022017-09-21 Kevin Buettner <kevinb@redhat.com>
2403
2404 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2405 (thread_db_thread_handle): Declare.
2406 * linux-low.c (linux_target_ops): Initialize thread_handle.
2407 * server.c (handle_qxfer_threads_worker): Add support for
2408 "handle" attribute.
2409 * target.h (struct target_ops): Add new function pointer,
2410 thread_handle.
2411 (target_thread_handle): Define.
2412 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2413 field in lwp.
2414 (thread_db_thread_handle): New function.
2415
86299109
KB
24162017-09-21 Kevin Buettner <kevinb@redhat.com>
2417
2418 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2419 * linux-low.h (thread_db_notice_clone): Declare.
2420 * thread-db.c (thread_db_notice_clone): New function.
2421
f557a88a
PA
24222017-09-21 Pedro Alves <palves@redhat.com>
2423
2424 * server.c (gdb_read_memory, handle_status, process_serial_event)
2425 (handle_serial_event, handle_target_event): Adjust to
2426 set_desired_thread prototype change.
2427 * target.c (set_desired_thread): Remove 'use_general' parameter
2428 and adjust.
2429 * target.h (set_desired_thread): Remove 'use_general' parameter.
2430
223ffa71
TT
24312017-09-20 Tom Tromey <tom@tromey.com>
2432
2433 * target.c (target_terminal::terminal_state): Define.
2434 (target_terminal::init): Rename from target_terminal_init.
2435 (target_terminal::inferior): Rename from
2436 target_terminal_inferior.
2437 (target_terminal::ours): Rename from target_terminal_ours.
2438 (target_terminal::ours_for_output, target_terminal::info): New.
2439
04fd3ba9
SM
24402017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2441
2442 * server.c (accumulate_file_name_length): Remove.
2443 (emit_dll_description): Adjust to std::string change.
2444 (handle_qxfer_libraries): Use std::string to hold document.
2445
5e187554
SM
24462017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2447
2448 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2449 return type of xml_escape_text.
2450 * server.c (emit_dll_description): Likewise.
2451
1526853e
SM
24522017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2453
2454 * server.c (captured_main): Accept argument for --selftest.
2455 Update run_tests call.
2456 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2457 when registering selftests.
2458
c4dfafab
SDJ
24592017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2460
2461 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2462 instead of "VEC" for "target_desc.reg_defs".
2463 (regcache_cpy): Likewise.
2464 (registers_to_string): Likewise.
2465 (registers_from_string): Likewise.
2466 (find_regno): Likewise.
2467 (supply_regblock): Likewise.
2468 (regcache_raw_read_unsigned): Likewise.
2469 * tdesc.c (init_target_desc): Likewise.
2470 (tdesc_create_reg): Likewise.
2471 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2472 (struct target_desc) <reg_defs>: Convert to "std::vector".
2473 (target_desc): Do not initialize "reg_defs".
2474 (~target_desc): Update code to use "std::vector" instead of "VEC"
2475 for "target_desc.reg_defs".
2476 (operator==): Likewise.
2477
124aceb4
SM
24782017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2479
2480 * inferiors.h (thread_to_gdb_id): Remove.
2481 * inferiors.c (thread_to_gdb_id): Remove.
2482 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2483 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2484 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2485 Likewise.
2486 * nto-low.c (nto_fetch_registers, nto_store_registers,
2487 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2488
96cde54f
SM
24892017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2490
2491 * inferiors.h (gdb_id_to_thread_id): Remove.
2492 * inferiors.c (gdb_id_to_thread_id): Remove.
2493 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2494 removal. Move pid declaration closer to where it's used.
2495
e8ca139e
SM
24962017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2497
2498 * server.c (handle_detach): New function.
2499 (process_serial_event): Move code out, call handle_detach.
2500
f8a4e119
SM
25012017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2502
2503 * server.c (require_running): Rename to ...
2504 (require_running_or_return): ... this ...
2505 (require_running_or_break): ... and this.
2506 (handle_query, process_serial_event): Adjust.
2507
0eb0a407
SM
25082017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2509
2510 * linux-low.c (linux_set_resume_request): Remove unused
2511 variables.
2512
785922a5
SM
25132017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2514
2515 * server.c (first_thread_of): Remove.
2516 (process_serial_event): Replace usage of first_thread_of with
2517 find_any_thread_of_pid.
2518 * tracepoint.c (same_process_p): Remove.
2519 (gdb_agent_about_to_close): Replace usage of same_process_p with
2520 find_any_thread_of_pid.
2521 * linux-x86-low.c (same_process_callback): Remove.
2522 (x86_arch_setup_process_callback): Replace usage of
2523 same_process_callback with find_any_thread_of_pid.
2524 * thread-db.c (any_thread_of): Remove.
2525 (switch_to_process): Replace usage of any_thread_of with
2526 find_any_thread_of_pid.
2527 * inferiors.c (thread_pid_matches_callback): Remove.
2528 (find_thread_process): Adjust to use find_any_thread_of_pid.
2529
a059f00c
SDJ
25302017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2531
2532 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2533 with "!VEC_empty".
a059f00c 2534
cc397f3a
SDJ
25352017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2536
2537 * linux-low.c (handle_extended_wait): Use
2538 "allocate_target_description" instead of "XNEW".
2539 * linux-x86-low.c (initialize_low_arch): Likewise.
2540
22916b07
YQ
25412017-09-05 Yao Qi <yao.qi@linaro.org>
2542
2543 * configure.srv (srv_i386_regobj): Remove.
2544 (srv_amd64_regobj): Remove.
2545 (srv_regobj): Set it to "" for x86 non-linux targets.
2546 * linux-x86-tdesc.c (i386_linux_read_description):
2547 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2548 (init_registers_i386): Remove the declaration.
2549 (tdesc_i386): Remove the declaration.
2550 (lynx_i386_arch_setup): Call i386_create_target_description.
2551 * nto-x86-low.c: Likewise.
2552 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2553 [!__x86_64__]: include arch/i386.h.
2554 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2555
38602d55
YQ
25562017-09-05 Yao Qi <yao.qi@linaro.org>
2557
2558 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2559 i386/amd64-XXX-linux from it.
2560
44b886ff
YQ
25612017-09-05 Yao Qi <yao.qi@linaro.org>
2562
2563 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2564 false.
2565 (ipa_amd64_linux_regobj): Remove.
2566 (ipa_x32_linux_regobj): Remove.
2567
b4570e4b
YQ
25682017-09-05 Yao Qi <yao.qi@linaro.org>
2569
2570 * Makefile.in (arch-amd64.o): New rule.
2571 * configure.srv: Append arch-amd64.o.
2572 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2573 (get_ipa_tdesc): Call amd64_linux_read_description.
2574 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2575 and init_registers_amd64_XXX.
2576 * linux-x86-low.c (x86_linux_read_description): Call
2577 amd64_linux_read_description.
2578 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2579 (initialize_low_arch): Don't call init_registers_x32_XXX and
2580 init_registers_amd64_XXX.
2581 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2582 and tdesc_amd64_XXX.
2583 [__x86_64__] (amd64_tdesc_test): New function.
2584 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2585 and init_registers_amd64_XXX.
2586 * linux-x86-tdesc.c: Include arch/amd64.h.
2587 (xcr0_to_tdesc_idx): New function.
2588 (i386_linux_read_description): New function.
2589 (amd64_get_ipa_tdesc_idx): New function.
2590 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2591 (amd64_get_ipa_tdesc): Declare.
2592
d1f28ea2
YQ
25932017-09-05 Yao Qi <yao.qi@linaro.org>
2594
2595 * configure.srv (srv_i386_linux_xmlfiles): Remove
2596 i386/i386-XXX-linux.xml from it.
2597
25a93583
YQ
25982017-09-05 Yao Qi <yao.qi@linaro.org>
2599
2600 * configure.srv: Set srv_i386_linux_regobj empty if $development
2601 is false.
2602 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2603 initialize_low_tdesc.
2604 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2605 with #if initialize_low_tdesc.
2606 * linux-x86-tdesc-selftest.c: New file.
2607 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2608
5f035c07
YQ
26092017-09-05 Yao Qi <yao.qi@linaro.org>
2610
2611 * Makefile.in (arch-i386.o): New rule.
2612 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2613 (x86_64-*-linux*): Likewise.
2614 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2615 include arch/i386.h.
2616 (i386_linux_read_description): Remove code and call
2617 i386_create_target_description.
2618 * tdesc.c (allocate_target_description): New function.
2619 * tdesc.h (set_tdesc_architecture): Remove declaration.
2620 (set_tdesc_osabi): Likewise.
2621
0abe8a89
YQ
26222017-09-05 Yao Qi <yao.qi@linaro.org>
2623
2624 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2625 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2626 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2627 .xmltarget.
2628 * server.c (get_features_xml): Call tdesc_get_features_xml.
2629 * tdesc.c (set_tdesc_architecture): New function.
2630 (set_tdesc_osabi): New function.
2631 (tdesc_get_features_xml): New function.
2632 (tdesc_create_feature): Add an argument.
2633 * tdesc.h (struct target_desc) <features>: New field.
2634 <arch, osabi>: New field.
2635 (~target_desc): xfree features, arch, and osabi.
2636 (target_desc::oerator==): Don't compare .xmltarget.
2637 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2638 (set_tdesc_osabi): Likewise.
2639 (tdesc_get_features_xml): Likewise.
2640
0a188386
YQ
26412017-09-05 Yao Qi <yao.qi@linaro.org>
2642
2643 * linux-x86-tdesc.c: Include selftest.h.
2644 (i386_tdesc_test): New function.
2645 (initialize_low_tdesc): Call selftests::register_test.
2646 * tdesc.h: Include regdef.h.
2647 (target_desc): Override operator == and !=.
2648
f49ff000
YQ
26492017-09-05 Yao Qi <yao.qi@linaro.org>
2650
2651 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2652 (ipa_obj): Likewise.
2653 * linux-i386-ipa.c: Include common/x86-xstate.h
2654 (get_ipa_tdesc): Call i386_linux_read_description.
2655 (initialize_low_tracepoint): Don't call init_registers_XXX
2656 functions, call initialize_low_tdesc instead.
2657 * linux-x86-low.c (x86_linux_read_description): Call
2658 i386_linux_read_description.
2659 (initialize_low_arch): Don't call init_registers_i386_XXX
2660 functions, call initialize_low_tdesc.
2661 * linux-x86-tdesc.c: New file.
2662 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2663 (i386_get_ipa_tdesc_idx): Declare.
2664 (i386_get_ipa_tdesc): Declare.
2665 (initialize_low_tdesc): Declare.
2666
2b68ef2f
YQ
26672017-09-05 Yao Qi <yao.qi@linaro.org>
2668
2669 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2670 instead of 0.
2671
f7000548
YQ
26722017-09-05 Yao Qi <yao.qi@linaro.org>
2673
2674 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2675 * regcache.c (get_thread_regcache): Use VEC_length.
2676 (init_register_cache): Likewise.
2677 (regcache_cpy): Likewise.
2678 (registers_to_string): Iterate reg_defs via VEC_iterate.
2679 (find_regno): Likewise.
2680 (find_register_by_number): Use VEC_index.
2681 (register_size): Call find_register_by_number.
2682 (register_data): Call find_register_by_number.
2683 (supply_regblock): Use VEC_length.
2684 (regcache_raw_read_unsigned): Likewise.
2685 * tdesc.c (init_target_desc): Iterate reg_defs via
2686 VEC_iterate.
2687 (default_description): Update initializer.
2688 (copy_target_description): Don't update field num_registers.
2689 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2690 <num_registers>: Remove.
2691
50a421ac
SM
26922017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2693
2694 * Makefile.in (.SECONDARY): Define target.
2695
23fdd69e
SM
26962017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2697
2698 * linux-low.c (linux_wait_1): Adjust.
2699 * server.c (queue_stop_reply_callback): Adjust.
2700
0a2dde4a
SDJ
27012017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2702
2703 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2704 QEnvironmentUnset and QEnvironmentReset packets.
2705 (handle_query): Inform remote that QEnvironmentHexEncoded,
2706 QEnvironmentUnset and QEnvironmentReset are supported.
2707
6afd337d
SM
27082017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2709
2710 * inferiors.h (inferior_target_data): Rename to ...
2711 (thread_target_data): ... this.
2712 (inferior_regcache_data): Rename to ...
2713 (thread_regcache_data): ... this.
2714 (set_inferior_regcache_data): Rename to ...
2715 (set_thread_regcache_data): ... this.
2716 * inferiors.c (inferior_target_data): Rename to ...
2717 (thread_target_data): ... this.
2718 (inferior_regcache_data): Rename to ...
2719 (thread_regcache_data): ... this.
2720 (set_inferior_regcache_data): Rename to ...
2721 (set_thread_regcache_data): ... this.
2722 (free_one_thread): Update.
2723 * linux-low.h (get_thread_lwp): Update.
2724 * regcache.c (get_thread_regcache): Update.
2725 (regcache_invalidate_thread): Update.
2726 (free_register_cache_thread): Update.
2727 * win32-i386-low.c (update_debug_registers_callback): Update.
2728 (win32_get_current_dr): Update.
2729 * win32-low.c (thread_rec): Update.
2730 (delete_thread_info): Update.
2731 (continue_one_thread): Update.
2732 (suspend_one_thread): Update.
2733
a160cc46
SM
27342017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2735
2736 * inferiors.c (set_inferior_target_data): Remove.
2737 * inferiors.h (set_inferior_target_data): Remove.
2738
6d580b63
YQ
27392017-08-18 Yao Qi <yao.qi@linaro.org>
2740
2741 * Makefile.in (OBS): Add selftest.o.
2742 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2743 * configure, config.in: Re-generated.
2744 * server.c: Include common/sefltest.h.
2745 (captured_main): Handle option --selftest.
2746
f5a29eb0
YQ
27472017-08-09 Yao Qi <yao.qi@linaro.org>
2748
2749 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2750 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2751 i386-avx-mpx.o and i386-mmx.o.
2752 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2753 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2754 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2755 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2756 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2757 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2758 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2759 i386/amd64-avx-mpx.xml.
2760
57757c2f
YQ
27612017-08-09 Yao Qi <yao.qi@linaro.org>
2762
2763 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2764 and x32-avx-avx512.o.
2765 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2766 i386/x32-avx-avx512.xml.
2767
229d26fc
SM
27682017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2769
2770 * tracepoint.h (enum class fast_tpoint_collect_result): New
2771 enumeration.
2772 (fast_tracepoint_collecting): Change return type to
2773 fast_tpoint_collect_result.
2774 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2775 * linux-low.h: Include tracepoint.h.
2776 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2777 fast_tpoint_collect_result.
2778 * linux-low.c (handle_tracepoints): Adjust.
2779 (linux_fast_tracepoint_collecting): Change return type to
2780 fast_tpoint_collect_result.
2781 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2782 linux_wait_1, stuck_in_jump_pad_callback,
2783 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2784 proceed_one_lwp): Adjust to type change.
2785
2e1e43e1
YQ
27862017-07-10 Yao Qi <yao.qi@linaro.org>
2787
2788 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2789
adc764e7
YQ
27902017-06-29 Yao Qi <yao.qi@linaro.org>
2791
2792 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2793 Remove.
2794 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2795
a206891a
SM
27962017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2797
2798 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2799
9a6c7d9c
SDJ
28002017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2801
2802 * linux-low.c (linux_create_inferior): Adjust code to access the
2803 environment information via 'gdb_environ' class.
2804 * lynx-low.c (lynx_create_inferior): Likewise.
2805 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2806 (get_environ): Return a pointer to 'our_environ'.
2807 (captured_main): Initialize 'our_environ'.
2808 * server.h (get_environ): Adjust prototype.
2809 * spu-low.c (spu_create_inferior): Adjust code to access the
2810 environment information via 'gdb_environ' class.
2811
ae3e2ccf
SM
28122017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2813
2814 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2815 usage of "register" keyword.
2816
3e019bdc
SM
28172017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2818
2819 * configure: Re-generate.
2820
8465943a
SM
28212017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2822
2823 * configure: Re-generate.
2824
cf0dd6f0
SM
28252017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2826
2827 * Makefile.in (COMPILE.pre): Add "-x c++".
2828
9845682b
SDJ
28292017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2830
2831 * fork-child.c: Conditionally include <signal.h>.
2832
aefd8b33
SDJ
28332017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2834
2835 * server.c (handle_general_set): Handle new packet
2836 "QStartupWithShell".
2837 (handle_query): Add "QStartupWithShell" to the list of supported
2838 packets.
2839 (gdbserver_usage): Add help text explaining the
2840 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2841 options.
2842 (captured_main): Recognize and act upon the presence of the new
2843 CLI options.
2844
2090129c
SDJ
28452017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2846 Pedro Alves <palves@redhat.com>
2847
2848 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2849 * configure: Regenerate.
2850 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2851 "fork-inferior.o".
2852 (i[34567]86-*-lynxos*): Likewise.
2853 (spu*-*-*): Likewise.
2854 * fork-child.c: New file.
2855 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2856 and "environ.h".
2857 (linux_ptrace_fun): New function.
2858 (linux_create_inferior): Adjust function prototype to reflect
2859 change on "target.h". Adjust function code to use
2860 "fork_inferior".
2861 (linux_request_interrupt): Delete "signal_pid".
2862 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2863 (lynx_ptrace_fun): New function.
2864 (lynx_create_inferior): Adjust function prototype to reflect
2865 change on "target.h". Adjust function code to use
2866 "fork_inferior".
2867 * nto-low.c (nto_create_inferior): Adjust function prototype and
2868 code to reflect change on "target.h". Update comments.
2869 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2870 "common-terminal.h" and "environ.h".
2871 (terminal_fd): Moved to fork-child.c.
2872 (old_foreground_pgrp): Likewise.
2873 (restore_old_foreground_pgrp): Likewise.
2874 (last_status): Make it global.
2875 (last_ptid): Likewise.
2876 (our_environ): New variable.
2877 (startup_with_shell): Likewise.
2878 (program_name): Likewise.
2879 (program_argv): Rename to...
2880 (program_args): ...this.
2881 (wrapper_argv): New variable.
2882 (start_inferior): Delete function.
2883 (get_exec_wrapper): New function.
2884 (get_exec_file): Likewise.
2885 (get_environ): Likewise.
2886 (prefork_hook): Likewise.
2887 (post_fork_inferior): Likewise.
2888 (postfork_hook): Likewise.
2889 (postfork_child_hook): Likewise.
2890 (handle_v_run): Update code to deal with arguments coming from the
2891 remote host. Update calls from "start_inferior" to
2892 "create_inferior".
2893 (captured_main): Likewise. Initialize environment variable. Call
2894 "have_job_control".
2895 * server.h (post_fork_inferior): New prototype.
2896 (get_environ): Likewise.
2897 (last_status): Declare.
2898 (last_ptid): Likewise.
2899 (signal_pid): Likewise.
2900 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2901 (spu_ptrace_fun): New function.
2902 (spu_create_inferior): Adjust function prototype to reflect change
2903 on "target.h". Adjust function code to use "fork_inferior".
2904 * target.c (target_terminal_init): New function.
2905 (target_terminal_inferior): Likewise.
2906 (target_terminal_ours): Likewise.
2907 * target.h: Include <vector>.
2908 (struct target_ops) <create_inferior>: Update prototype.
2909 (create_inferior): Update macro.
2910 * utils.c (gdb_flush_out_err): New function.
2911 * win32-low.c (win32_create_inferior): Adjust function prototype
2912 and code to reflect change on "target.h".
2913
043a4934
SDJ
29142017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2915
2916 * inferiors.c (switch_to_thread): New function.
2917
15652511
SDJ
29182017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2919
2920 * Makefile.in (SFILE): Add "common/job-control.c".
2921 (OBS): Add "job-control.o".
2922
21ea5acd
SDJ
29232017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2924
2925 * Makefile: Remove "@host_makefile_frag@".
2926
e13cb306
PA
29272017-05-05 Pedro Alves <palves@redhat.com>
2928
2929 * configure: Regenerate.
2930
c94fee56
SDJ
29312017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2932
2933 * configure: Regenerate.
2934
a0ff9e1a
SM
29352017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2936
2937 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2938 software_single_step change of return type to
2939 std::vector<CORE_ADDR>.
2940 * linux-low.c (install_software_single_step_breakpoints):
2941 Likewise.
2942 * linux-low.h (install_software_single_step_breakpoints):
2943 Likewise.
2944
be628ab8
SDJ
29452017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2946
2947 * remote-utils.c: Include "gdb_termios.h" instead of
2948 "terminal.h".
2949 * terminal.h: Delete file.
2950
7c5ded6a
SDJ
29512017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2952
2953 * server.c: Include <vector>.
2954 <program_argv, wrapper_argv>: Convert to std::vector.
2955 (start_inferior): Rewrite function to use C++.
2956 (handle_v_run): Likewise. Update code that calculates the argv
2957 based on the vRun packet; use C++.
2958 (captured_main): Likewise.
2959
436252de
SM
29602017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2961
2962 * server.c (handle_v_cont): Initialize thread_resume::thread
2963 with null_ptid.
2964
9bf2a700
PA
29652017-04-05 Pedro Alves <palves@redhat.com>
2966
2967 * configure: Regenerate.
2968
a121b7c1
PA
29692017-04-05 Pedro Alves <palves@redhat.com>
2970
2971 * gdbreplay.c (sync_error): Constify.
2972 * linux-x86-low.c (push_opcode): Constify.
2973
21c8a587
PA
29742017-04-05 Pedro Alves <palves@redhat.com>
2975
2976 * win32-low.c (get_child_debug_event)
2977 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2978 Report TARGET_WAITKIND_SPURIOUS instead.
2979
fb32b4f7
PA
29802017-04-05 Pedro Alves <palves@redhat.com>
2981
e79be6e5
SM
2982 * remote-utils.c (remote_prepare, remote_open): Constify.
2983 * remote-utils.h (remote_prepare, remote_open): Constify.
2984 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2985
65dd1e59
SM
29862017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2987
2988 * Makefile.in (clean): Clear .deps.
2989
8fa5b777
SM
29902017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2991
2992 * .gitignore: Remove generated files, replace with wildcard.
2993 * (clean): Replace removal of generated files with wildcard.
2994 (version.c): Replace with...
2995 (version-generated.c): ...this.
2996 (xml-builtin.c): Replace with...
2997 (xml-builtin-generated.c): ...this.
2998 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2999 (%.c: *regformats*): Replace with...
3000 (%-generated.c: *regformats*): ...this.
3001
a12e714b
MF
30022017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3003
3004 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3005 (xtensa_fill_gregset): Call collect_register_by_name for
3006 threadptr register.
3007 (xtensa_store_gregset): Call supply_register_by_name for
3008 threadptr register.
3009
1a09b50a
MF
30102017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3011
3012 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3013 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3014 (xtensa_store_gregset): Call supply_register for all registers in
3015 a0_regnum..a0_regnum + C0_NREGS range.
3016
1a01e7c6
SM
30172017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3018
3019 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3020 (ax-ipa.o: ax.c): Remove.
3021 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3022 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3023 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3024 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3025 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3026
36bc18a8
SM
30272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3028
3029 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3030 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3031 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3032 (errors-ipa.o: ../common/errors.c): Remove.
3033 (format-ipa.o: ../common/format.c): Remove.
3034 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3035
a8ebe3d5
SM
30362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3037
3038 * Makefile.in (%-ipa.o: %.c): New rule.
3039 (tracepoint-ipa.o: tracepoint.c): Remove.
3040 (utils-ipa.o: utils.c): Remove.
3041 (remote-utils-ipa.o: remote-utils.c): Remove.
3042 (regcache-ipa.o: regcache.c): Remove.
3043 (i386-linux-ipa.o: i386-linux.c): Remove.
3044 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3045 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3046 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3047 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3048 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3049 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3050 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3051 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3052 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3053 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3054 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3055 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3056 (aarch64-ipa.o: aarch64.c): Remove.
3057 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3058 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3059 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3060 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3061 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3062 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3063 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3064 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3065 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3066 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3067 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3068 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3069 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3070 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3071 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3072 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3073 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3074 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3075 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3076 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3077 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3078 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3079 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3080 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3081 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3082 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3083 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3084 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3085 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3086 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3087 (tdesc-ipa.o: tdesc.c): Remove.
3088 (x32-linux-ipa.o: x32-linux.c): Remove.
3089 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3090 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3091
50cfacb7
SM
30922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3093
3094 * Makefile.in (%.o: ../arch/%.c): New rule.
3095 (arm.o: ../arch/arm.c): Remove.
3096 (arm-linux.o: ../arch/arm-linux.c): Remove.
3097 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3098 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3099
c5a22423
SM
31002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3101
3102 * Makefile.in (%.o: ../nat/%.c): New rule.
3103 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3104 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3105 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3106 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3107 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3108 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3109 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3110 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3111 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3112 (linux-personality.o: ../nat/linux-personality.c): Remove.
3113 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3114 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3115 (x86-linux.o: ../nat/x86-linux.c): Remove.
3116 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3117 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3118
6bda016b
SM
31192017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3120
3121 * Makefile.in (%.o: ../common/%.c): New rule.
3122 (signals.o: ../common/signals.c): Remove.
3123 (print-utils.o: ../common/print-utils.c): Remove.
3124 (rsp-low.o: ../common/rsp-low.c): Remove.
3125 (common-utils.o: ../common/common-utils.c): Remove.
3126 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3127 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3128 (vec.o: ../common/vec.c): Remove.
3129 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3130 (xml-utils.o: ../common/xml-utils.c): Remove.
3131 (ptid.o: ../common/ptid.c): Remove.
3132 (buffer.o: ../common/buffer.c): Remove.
3133 (format.o: ../common/format.c): Remove.
3134 (filestuff.o: ../common/filestuff.c): Remove.
3135 (agent.o: ../common/agent.c): Remove.
3136 (errors.o: ../common/errors.c): Remove.
3137 (environ.o: ../common/environ.c): Remove.
3138 (common-debug.o: ../common/common-debug.c): Remove.
3139 (cleanups.o: ../common/cleanups.c): Remove.
3140 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3141 (fileio.o: ../common/fileio.c): Remove.
3142 (common-regcache.o: ../common/common-regcache.c): Remove.
3143 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3144 (new-op.o: ../common/new-op.c): Remove.
3145 (btrace-common.o: ../common/btrace-common.c): Remove.
3146
21122961
SM
31472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3148
3149 * Makefile.in (%.o: ../target/%.c): New rule.
3150 (waitstatus.o: ../target/waitstatus.c): Remove.
3151
c362e621
SM
31522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3153
3154 * Makefile.in
3155 (%.c: ../regformats/%.dat,
3156 (%.c: ../regformats/arm/%.dat,
3157 (%.c: ../regformats/i386/%.dat,
3158 (%.c: ../regformats/rs6000/%.dat): New rules.
3159 (aarch64.c): Remove.
3160 (reg-arm.c): Remove.
3161 (arm-with-iwmmxt.c): Remove.
3162 (arm-with-vfpv2.c): Remove.
3163 (arm-with-vfpv3.c): Remove.
3164 (arm-with-neon.c): Remove.
3165 (reg-bfin.c): Remove.
3166 (reg-cris.c): Remove.
3167 (reg-crisv32.c): Remove.
3168 (i386.c): Remove.
3169 (i386-linux.c): Remove.
3170 (i386-avx.c): Remove.
3171 (i386-avx-linux.c): Remove.
3172 (i386-avx-avx512.c): Remove.
3173 (i386-avx-avx512-linux.c): Remove.
3174 (i386-mpx.c): Remove.
3175 (i386-mpx-linux.c): Remove.
3176 (i386-avx-mpx-avx512-pku.c): Remove.
3177 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3178 (i386-avx-mpx.c): Remove.
3179 (i386-avx-mpx-linux.c): Remove.
3180 (i386-mmx.c): Remove.
3181 (i386-mmx-linux.c): Remove.
3182 (reg-ia64.c): Remove.
3183 (reg-m32r.c): Remove.
3184 (reg-m68k.c): Remove.
3185 (reg-cf.c): Remove.
3186 (mips-linux.c): Remove.
3187 (mips-dsp-linux.c): Remove.
3188 (mips64-linux.c): Remove.
3189 (mips64-dsp-linux.c): Remove.
3190 (nios2-linux.c): Remove.
3191 (powerpc-32.c): Remove.
3192 (powerpc-32l.c): Remove.
3193 (powerpc-altivec32l.c): Remove.
3194 (powerpc-cell32l.c): Remove.
3195 (powerpc-vsx32l.c): Remove.
3196 (powerpc-isa205-32l.c): Remove.
3197 (powerpc-isa205-altivec32l.c): Remove.
3198 (powerpc-isa205-vsx32l.c): Remove.
3199 (powerpc-e500l.c): Remove.
3200 (powerpc-64l.c): Remove.
3201 (powerpc-altivec64l.c): Remove.
3202 (powerpc-cell64l.c): Remove.
3203 (powerpc-vsx64l.c): Remove.
3204 (powerpc-isa205-64l.c): Remove.
3205 (powerpc-isa205-altivec64l.c): Remove.
3206 (powerpc-isa205-vsx64l.c): Remove.
3207 (s390-linux32.c): Remove.
3208 (s390-linux32v1.c): Remove.
3209 (s390-linux32v2.c): Remove.
3210 (s390-linux64.c): Remove.
3211 (s390-linux64v1.c): Remove.
3212 (s390-linux64v2.c): Remove.
3213 (s390-te-linux64.c): Remove.
3214 (s390-vx-linux64.c): Remove.
3215 (s390-tevx-linux64.c): Remove.
3216 (s390x-linux64.c): Remove.
3217 (s390x-linux64v1.c): Remove.
3218 (s390x-linux64v2.c): Remove.
3219 (s390x-te-linux64.c): Remove.
3220 (s390x-vx-linux64.c): Remove.
3221 (s390x-tevx-linux64.c): Remove.
3222 (tic6x-c64xp-linux.c): Remove.
3223 (tic6x-c64x-linux.c): Remove.
3224 (tic6x-c62x-linux.c): Remove.
3225 (reg-sh.c): Remove.
3226 (reg-sparc64.c): Remove.
3227 (reg-spu.c): Remove.
3228 (amd64.c): Remove.
3229 (amd64-linux.c): Remove.
3230 (amd64-avx.c): Remove.
3231 (amd64-avx-linux.c): Remove.
3232 (amd64-avx-avx512.c): Remove.
3233 (amd64-avx-avx512-linux.c): Remove.
3234 (amd64-mpx.c): Remove.
3235 (amd64-mpx-linux.c): Remove.
3236 (amd64-avx-mpx-avx512-pku.c): Remove.
3237 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3238 (amd64-avx-mpx.c): Remove.
3239 (amd64-avx-mpx-linux.c): Remove.
3240 (x32.c): Remove.
3241 (x32-linux.c): Remove.
3242 (x32-avx.c): Remove.
3243 (x32-avx-linux.c): Remove.
3244 (x32-avx-avx512.c): Remove.
3245 (x32-avx-avx512-linux.c): Remove.
3246 (reg-xtensa.c): Remove.
3247 (reg-tilegx.c): Remove.
3248 (reg-tilegx32.c): Remove.
3249
1672e0d9
SDJ
32502017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3251
3252 * Makefile.in (SFILES): Add "common/environ.c".
3253 (OBJS): Add "common/environ.h".
3254
239b6d10
WT
32552017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3256
3257 * configure.ac: Check if the fs_base and gs_base members of
3258 `struct user_regs_struct' exist.
3259 * config.in: Regenerated.
3260 * configure: Likewise.
3261
694b382c
AT
32622017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3263
3264 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3265 target_read_memory.
3266 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3267 (get_next_pcs_syscall_next_pc): Likewise.
3268
7dc53023
LM
32692016-12-23 Luis Machado <lgustavo@codesourcery.com>
3270
3271 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3272 * nto-x86-low.c: Likewise.
3273
ad02e4fe
SM
32742016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3275
3276 * Makefile.in: Include disable-implicit-rules.mk.
3277
dcb07cfa
PA
32782016-11-23 Pedro Alves <palves@redhat.com>
3279
3280 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3281 (debug_vprintf): Use std::chrono::steady_clock instead of
3282 gettimeofday. Use '.' instead of ':'.
3283 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3284 (get_timestamp): Use std::chrono::steady_clock instead of
3285 gettimeofday.
3286
8629c02c
SM
32872016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3288
3289 * Makefile.in: Fix whitespace formatting.
3290
b593ecca
SM
32912016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3292
3293 * Makefile.in (SFILES, OBS): Flatten list and order
3294 alphabetically.
3295
9986ba08
PA
32962016-11-23 Pedro Alves <palves@redhat.com>
3297
3298 * event-loop.c (handle_file_event): Use warning.
3299 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3300 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3301 Use warning.
3302
4eefa7bc
PA
33032016-11-23 Pedro Alves <palves@redhat.com>
3304
3305 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3306 output.
3307 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3308 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3309 debug_printf and debug_flush for debug output.
3310 * server.c (handle_general_set): Likewise.
3311 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3312 output.
3313
5443506e
SM
33142016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3315
3316 * Makefile.in (.c.o): Replace rule with ...
3317 (%.o: %.c): ... this one.
3318
3b165252
SM
33192016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3320
3321 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3322 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3323 make.
3324 * configure.ac: Remove checks for the make program.
3325 * configure: Re-generate.
3326
0bcda685
PA
33272016-10-28 Pedro Alves <palves@redhat.com>
3328
3329 * Makefile.in (CXX_DIALECT): Get from configure.
3330 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3331 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3332 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3333 * config.in: Regenerate.
3334 * configure: Regenerate.
3335
c3805894
YQ
33362016-10-27 Yao Qi <yao.qi@linaro.org>
3337
3338 * linux-low.c (linux_supports_range_stepping): Return true if
3339 can_software_single_step return true.
3340
89342618
YQ
33412016-10-27 Yao Qi <yao.qi@linaro.org>
3342
3343 * inferiors.c (find_inferior_in_random): New function.
3344 * inferiors.h (find_inferior_in_random): Declare.
3345 * linux-low.c (linux_wait_for_event_filtered): Call
3346 find_inferior_in_random instead of find_inferior.
3347
e3652c84
YQ
33482016-10-27 Yao Qi <yao.qi@linaro.org>
3349
3350 * linux-low.c (linux_wait_1): If single-step breakpoints are
3351 inserted, remove them.
3352
5a04c4cf
PA
33532016-10-26 Pedro Alves <palves@redhat.com>
3354
3355 * linux-low.c (handle_extended_wait): Link parent/child fork
3356 threads.
3357 (linux_wait_1): Unlink them.
3358 (linux_set_resume_request): Ignore resume requests for
3359 already-resumed and unhandled fork child threads.
3360 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3361 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3362 New functions.
3363 (handle_v_requests) <vCont>: Don't call require_running.
3364 * server.h (in_queued_stop_replies): New declaration.
3365
cb93dc7f
YQ
33662016-10-24 Yao Qi <yao.qi@linaro.org>
3367
3368 PR server/20733
3369 * linux-aarch64-low.c (append_insns): Cast the return value to
3370 'uint32_t *'.
3371
a1078bea
YQ
33722016-10-10 Yao Qi <yao.qi@linaro.org>
3373
3374 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3375
1fb77080
SDJ
33762016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3377
3378 * target.c (target_supports_multi_process): New function, moved
3379 from...
3380 * target.h (target_supports_multi_process): ... here. Remove
3381 macro.
3382
39b5a3b9
TT
33832016-10-05 Tom Tromey <tom@tromey.com>
3384
3385 PR remote/20655:
3386 * tracepoint.c (handle_tracepoint_bkpts): Check
3387 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3388
c1d0b70a
YQ
33892016-10-05 Yao Qi <yao.qi@linaro.org>
3390
3391 * configure.srv: Update the path of arm-*.xml files.
3392
0a69eedb
YQ
33932016-10-05 Terry Guo <terry.guo@arm.com>
3394 Yao Qi <yao.qi@linaro.org>
3395
3396 * Makefile.in: Adjust the path of rules.
3397 * configure.srv: Update the path of xml files.
3398 * regformats/arm-with-iwmmxt.dat: Regenerated.
3399 * regformats/arm-with-neon.dat: Likewise.
3400 * regformats/arm-with-vfpv2.dat: Likewise.
3401 * regformats/arm-with-vfpv3.dat Likewise.
3402
17e16485
YQ
34032016-09-30 Yao Qi <yao.qi@linaro.org>
3404
3405 PR gdbserver/20627
3406 * target.c (target_stop_and_wait): Don't call
3407 target_continue_no_signal, use resume_stop instead.
3408
edeeb602
YQ
34092016-09-26 Yao Qi <yao.qi@linaro.org>
3410
3411 * linux-low.c (linux_wait_1): Call debug_exit.
3412
503b1c39
PA
34132016-09-23 Pedro Alves <palves@redhat.com>
3414
3415 * Makefile.in (SFILES): Add common/new-op.c.
3416 (OBS): Add common/new-op.o.
3417 (new-op.o): New rule.
3418
74172ecf
SM
34192016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3420
3421 * .gitinore: Ignore more files.
3422
fc6cda2e
YQ
34232016-09-21 Yao Qi <yao.qi@linaro.org>
3424
3425 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3426 23.
3427
bc1e6c81
SDJ
34282016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3429
3430 * server.c (start_inferior): Call target_mourn_inferior instead of
3431 mourn_inferior; pass ptid_t argument to it.
3432 (resume): Likewise.
3433 (handle_target_event): Likewise.
3434 * target.c (target_mourn_inferior): New function.
3435 * target.h (mourn_inferior): Delete macro.
3436
0e00e962
AA
34372016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3438
3439 * linux-low.c (lwp_is_stepping): New function.
3440
1d8cb77d
CL
34412016-09-06 Carl Love <cel@us.ibm.com>
3442
3443 * server.c (start_inferior): Fixed comment, requested comment change
3444 didn't get updated correctly. Removed reference to ptrace () call as
3445 it is only true on Linux systems.
3446
7313bced
CL
34472016-09-06 Carl Love <cel@us.ibm.com>
3448
3449 * server.c (start_inferior): Do not call
3450 function target_post_create_inferior () if the
3451 inferior process has already exited.
3452
cf6de44d
PA
34532016-09-05 Pedro Alves <palves@redhat.com>
3454
3455 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3456 (COMPILE.pre, CC_LD): Use CXX directly.
3457 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3458 * acinclude.m4: Don't include build-with-cxx.m4.
3459 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3460 * configure: Regenerate.
3461
c1da6748
AT
34622016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3463
3464 PR gdb/19495
3465 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3466 call writing data to own_buf.
3467
f2b9e3df
SDJ
34682016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3469
3470 * target.c (mywait): Call target_wait instead of
3471 the_target->wait.
3472 (target_wait): New function.
3473
049a8570
SDJ
34742016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3475
3476 * server.c (start_inferior): New variable 'ptid'. Replace calls
3477 to the_target->resume by target_continue{,_no_signal}, depending
3478 on the case.
3479 * target.c (target_stop_and_wait): Call target_continue_no_signal
3480 instead of the_target->resume.
3481 (target_continue): New function.
3482
3aa5cfa0
AT
34832016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3484
3485 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3486
754653a7
AZ
34872016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3488
3489 PR server/20491
3490 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3491 ps_prochandle.
3492 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3493 * linux-arm-low.c (ps_get_thread_area): Likewise.
3494 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3495 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3496 * linux-mips-low.c (ps_get_thread_area): Likewise.
3497 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3498 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3499 * linux-x86-low.c (ps_get_thread_area): Likewise.
3500 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3501
ed036b40
PA
35022016-08-19 Pedro Alves <palves@redhat.com>
3503
3504 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3505
c8ef42ee
PA
35062016-08-19 Pedro Alves <palves@redhat.com>
3507
3508 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3509 comment. Use memcpy instead of casting through unsigned long.
3510
9c235a72
PA
35112016-08-19 Pedro Alves <palves@redhat.com>
3512
3513 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3514 allocating around 0x80000000.
3515
201506da
PA
35162016-08-19 Pedro Alves <palves@redhat.com>
3517
3518 PR gdb/20415
3519 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3520 (x32-avx512-linux-ipa.o): New rules.
3521 * configure.ac (x86_64-*-linux*): New x32 check.
3522 * configure.srv (ipa_x32_linux_regobj): New.
3523 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3524 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3525 descriptions.
3526 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3527 descriptions.
3528 * configure: Regenerate.
3529
f348d89a
PA
35302016-08-09 Pedro Alves <palves@redhat.com>
3531
3532 PR gdb/18653
3533 * Makefile.in (OBS): Add signals-state-save-restore.o.
3534 (signals-state-save-restore.o): New rule.
3535 * config.in: Regenerate.
3536 * configure: Regenerate.
3537 * linux-low.c: Include "signals-state-save-restore.h".
3538 (linux_create_inferior): Call
3539 restore_original_signals_state.
3540 * server.c: Include "dispositions-save-restore.h".
3541 (captured_main): Call save_original_signals_state.
3542
1baf5149
PA
35432016-08-05 Pedro Alves <palves@redhat.com>
3544
3545 * configure: Regenerate.
3546
fcd4a73d
YQ
35472016-08-04 Yao Qi <yao.qi@linaro.org>
3548
3549 * linux-low.c (regsets_fetch_inferior_registers): Check
3550 errno is ESRCH or not.
3551
979659d0
YQ
35522016-08-02 Yao Qi <yao.qi@linaro.org>
3553
3554 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3555 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3556 (thread_db_load_search): Update.
3557 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3558 td_ta_set_event and td_ta_event_getmsg.
3559
6598661d
PA
35602016-07-26 Pedro Alves <palves@redhat.com>
3561
3562 PR server/20414
3563 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3564 of unsigned long for 64-bit registers and use uint32_t instead of
3565 unsigned int for 32-bit registers.
3566
9cf12d57
PA
35672016-07-26 Pedro Alves <palves@redhat.com>
3568
3569 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3570 to 'ptrace'.
3571
305450ed
TT
35722016-07-21 Tom Tromey <tom@tromey.com>
3573
3574 * configure: Rebuild.
3575
2583da7c
YQ
35762016-07-21 Yao Qi <yao.qi@linaro.org>
3577
3578 * mem-break.c (find_gdb_breakpoint): Cast bp to
3579 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3580
21536b36
YQ
35812016-07-21 Yao Qi <yao.qi@linaro.org>
3582
3583 * server.c (handle_v_requests): Support s and S actions
3584 if target_supports_software_single_step return true.
3585
8901d193
YQ
35862016-07-21 Yao Qi <yao.qi@linaro.org>
3587
3588 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3589 is resume_step, call maybe_hw_step.
3590 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3591 and unstop them.
3592 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3593 breakpoints or not.
3594 (proceed_one_lwp): If resume request is resume_step, install
3595 reinsert breakpoints and call maybe_hw_step.
3596
0e9a339e
YQ
35972016-07-21 Yao Qi <yao.qi@linaro.org>
3598
3599 * linux-low.c (proceed_one_lwp): Declare.
3600 (linux_resume_one_thread): Remove local variable 'step'.
3601 Lift code enqueue signal. Call proceed_one_lwp instead of
3602 linux_resume_one_lwp.
3603
4281b351
YQ
36042016-07-21 Yao Qi <yao.qi@linaro.org>
3605
3606 * linux-low.c (linux_resume_one_thread): Call
3607 enqueue_pending_signal.
3608
984a2c04
YQ
36092016-07-21 Yao Qi <yao.qi@linaro.org>
3610
3611 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3612 * inferiors.c (do_restore_current_thread_cleanup): New function.
3613 (make_cleanup_restore_current_thread): Likewise.
3614 * linux-low.c (install_software_single_step_breakpoints): Call
3615 make_cleanup_restore_current_thread. Switch current_thread to
3616 thread.
3617
bec903c9
YQ
36182016-07-21 Yao Qi <yao.qi@linaro.org>
3619
3620 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3621 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3622 (clone_one_breakpoint): Likewise.
3623 (delete_reinsert_breakpoints): Change parameter to thread.
3624 Callers updated.
3625 (has_reinsert_breakpoints): Likewise.
3626 (uninsert_reinsert_breakpoints): Likewise.
3627 (reinsert_reinsert_breakpoints): Likewise.
3628 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3629 (delete_reinsert_breakpoints): Likewise.
3630 (reinsert_reinsert_breakpoints): Likewise.
3631 (uninsert_reinsert_breakpoints): Likewise.
3632 (has_reinsert_breakpoints): Likewise.
3633
63c40ec7
YQ
36342016-07-21 Yao Qi <yao.qi@linaro.org>
3635
3636 * inferiors.c (get_thread_process): Make parameter const.
3637 * inferiors.h (get_thread_process): Update declaration.
3638 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3639 Add new parameters child_thread and parent_thread. Callers
3640 updated.
3641 * mem-break.h (clone_all_breakpoints): Update declaration.
3642
9aa76cd0
YQ
36432016-07-21 Yao Qi <yao.qi@linaro.org>
3644
3645 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3646 <command_list, handler>: Remove.
3647 (struct gdb_breakpoint): New.
3648 (struct other_breakpoint): New.
3649 (struct reinsert_breakpoint): New.
3650 (is_gdb_breakpoint): New function.
3651 (any_persistent_commands): Update command_list if
3652 is_gdb_breakpoint returns true.
3653 (set_breakpoint): Create breakpoints according to their types.
3654 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3655 (set_gdb_breakpoint_1): Likewise.
3656 (set_gdb_breakpoint): Likewise.
3657 (clear_breakpoint_conditions): Change parameter type to
3658 'struct gdb_breakpoint *'.
3659 (clear_breakpoint_commands): Likewise.
3660 (clear_breakpoint_conditions_and_commands): Likewise.
3661 (add_condition_to_breakpoint): Likewise.
3662 (add_breakpoint_condition): Likewise.
3663 (add_commands_to_breakpoint): Likewise.
3664 (check_breakpoints): Check other_breakpoint.
3665 (clone_one_breakpoint): Clone breakpopint according to its type.
3666 * mem-break.h (struct gdb_breakpoint): Declare.
3667 (set_gdb_breakpoint): Update declaration.
3668 (clear_breakpoint_conditions_and_commands): Likewise.
3669 (add_breakpoint_condition): Likewise.
3670 (add_breakpoint_commands): Likewise.
3671 * server.c (process_point_options): Change parameter type to
3672 'struct gdb_breakpoint *'.
3673
811f8301
YQ
36742016-07-21 Yao Qi <yao.qi@linaro.org>
3675
3676 * mem-break.c (set_breakpoint_at): Rename it to ...
3677 (set_breakpoint_type_at): ... it.
3678 (set_breakpoint_at): Call set_breakpoint_type_at.
3679 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3680 * mem-break.h (set_breakpoint_at): Update comments.
3681
b1c51e36
CLT
36822016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3683
3684 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3685 to buf parameter.
3686 (nios2_store_gregset): Likewise.
3687
ced2dffb
PA
36882016-07-01 Pedro Alves <palves@redhat.com>
3689 Antoine Tremblay <antoine.tremblay@ericsson.com>
3690
3691 * linux-low.c: Change interface to take the target lwp_info
3692 pointer directly and return void. Handle detaching from a zombie
3693 thread.
3694 (linux_detach_lwp_callback): New function.
3695 (linux_detach): Detach from the leader thread after detaching from
3696 the clone threads.
3697
2ac09a5b
YQ
36982016-06-28 Yao Qi <yao.qi@linaro.org>
3699
3700 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3701 for variable new_offset.
3702 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3703 (aarch64_ftrace_insn_reloc_cb): Likewise.
3704 (aarch64_ftrace_insn_reloc_tb): Likewise.
3705 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3706 PRIx64 instead of PRIx32.
3707
79e7fd4f
YQ
37082016-06-28 Yao Qi <yao.qi@linaro.org>
3709
3710 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3711 (the_low_target): Install arm_get_syscall_trapinfo.
3712
061fc021
YQ
37132016-06-28 Yao Qi <yao.qi@linaro.org>
3714
3715 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3716 function.
3717 (the_low_target): Install aarch64_get_syscall_trapinfo.
3718
4cc32bec
YQ
37192016-06-28 Yao Qi <yao.qi@linaro.org>
3720
3721 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3722 Callers updated.
3723 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3724 Remove parameter sysno.
3725 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3726 sysret.
3727
782c1122
AA
37282016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3729
3730 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3731 (s390_emit_ne_goto): Likewise.
3732 (s390_emit_lt_goto): Likewise.
3733 (s390_emit_le_goto): Likewise.
3734 (s390_emit_gt_goto): Likewise.
3735 (s390_emit_ge_goto): Likewise.
3736 (s390x_emit_eq_goto): Likewise.
3737 (s390x_emit_ne_goto): Likewise.
3738 (s390x_emit_lt_goto): Likewise.
3739 (s390x_emit_le_goto): Likewise.
3740 (s390x_emit_gt_goto): Likewise.
3741 (s390x_emit_ge_goto): Likewise.
3742 (s390_emit_ops_impl): Mark variable static.
3743 (s390x_emit_ops): Likewise.
3744
2e7b624b
YQ
37452016-06-17 Yao Qi <yao.qi@linaro.org>
3746
3747 * linux-low.c (handle_extended_wait): Call
3748 uninsert_reinsert_breakpoints for the parent process. Remove
3749 reinsert breakpoints from the child process. Reinsert them to
3750 the parent process when vfork is done.
3751 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3752 (reinsert_reinsert_breakpoints): New function.
3753 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3754 (reinsert_reinsert_breakpoints): Declare.
3755
8a81c5d7
YQ
37562016-06-17 Yao Qi <yao.qi@linaro.org>
3757
3758 * linux-low.c (handle_extended_wait): If the parent is doing
3759 step-over, remove the reinsert breakpoints from the forked child.
3760
f50bf8e5
YQ
37612016-06-17 Yao Qi <yao.qi@linaro.org>
3762
3763 * linux-low.c (unsuspend_all_lwps): Declare.
3764 (linux_low_filter_event): If thread exited, call finish_step_over.
3765 If step-over is finished, unsuspend other threads.
3766
8376a3cb
YQ
37672016-06-17 Yao Qi <yao.qi@linaro.org>
3768
3769 * linux-low.c (linux_resume_one_lwp_throw): Assert
3770 has_reinsert_breakpoints returns false.
3771 * mem-break.c (delete_disabled_breakpoints): Assert
3772 bp type isn't reinsert_breakpoint.
3773
f79b145d
YQ
37742016-06-17 Yao Qi <yao.qi@linaro.org>
3775
3776 * linux-low.c (maybe_hw_step): New function.
3777 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3778 (finish_step_over): Switch current_thread to lwp temporarily,
3779 and assert has_reinsert_breakpoints returns true.
3780 (proceed_one_lwp): Call maybe_hw_step.
3781 * mem-break.c (has_reinsert_breakpoints): New function.
3782 * mem-break.h (has_reinsert_breakpoints): Declare.
3783
0ae534d2
JT
37842016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3785
3786 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3787
fcdad592
YQ
37882016-05-17 Yao Qi <yao.qi@linaro.org>
3789
3790 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3791 instead of find_inferior.
3792
9e784964
YQ
37932016-05-05 Yao Qi <yao.qi@linaro.org>
3794
3795 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3796 Initialize res to zero.
3797
cf2ebb6e
YQ
37982016-05-05 Yao Qi <yao.qi@linaro.org>
3799
3800 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3801 to uint32_t.
3802
c1aebf87
UW
38032016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3804
3805 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3806 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3807 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3808
35fd2deb 38092016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3810 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3811
3812 * tracepoint.c (write_inferior_int8): New function.
3813 (cmd_qtenable_disable): Write enable flag using
3814 write_inferior_int8.
3815
484b3c32
YQ
38162016-04-25 Yao Qi <yao.qi@linaro.org>
3817
3818 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3819 (need_step_over_p): Return zero if the LWP has pending signals
3820 can be delivered on software single step target.
3821
85ba7d86
YQ
38222016-04-25 Yao Qi <yao.qi@linaro.org>
3823
3824 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3825 return instead of error.
3826
3539aa13
YQ
38272016-04-22 Yao Qi <yao.qi@linaro.org>
3828
3829 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3830 to 23.
3831
5b061e98
YQ
38322016-04-22 Yao Qi <yao.qi@linaro.org>
3833
3834 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3835 signal when stepping over breakpoint with software single
3836 step.
3837
3451269c
PA
38382016-04-21 Pedro Alves <palves@redhat.com>
3839
3840 * linux-s390-low.c (s390_collect_ptrace_register)
3841 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3842 add casts.
3843 (s390_check_regset): Use void * instead of gdb_byte *.
3844
a2358508
PA
38452016-04-20 Pedro Alves <palves@redhat.com>
3846
3847 * configure: Renegerate.
3848
6885166d
YQ
38492016-04-20 Yao Qi <yao.qi@linaro.org>
3850
3851 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3852 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3853 number 16.
3854 (arm_store_gregset): Likewise.
3855
2b863f51
WT
38562016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3857
3858 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3859 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3860 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3861 (amd64-avx-mpx-linux.c): New rules.
3862 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3863 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3864 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3865 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3866 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3867 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3868 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3869 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3870 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3871 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3872 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3873 * linux-x86-low.c (x86_linux_read_description): Add case for
3874 X86_XSTATE_AVX_MPX_MASK.
3875 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3876 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3877 init_registers_i386_avx_mpx_linux.
3878 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3879 (initialize_low_tracepoint): Call
3880 init_registers_i386_avx_mpx_linux.
3881 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3882 (initialize_low_tracepoint): Call
3883 init_registers_amd64_avx_mpx_linux.
3884 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3885 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3886 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3887 declarations.
3888
9b30624b
PA
38892016-04-18 Pedro Alves <palves@redhat.com>
3890
3891 * configure: Regenerate.
3892
45e3745e
AT
38932016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3894
3895 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3896 (aarch64_emit_sub): Likewise.
3897
2afc13ff
PA
38982016-04-12 Pedro Alves <palves@redhat.com>
3899
3900 * utils.c (prepare_to_throw_exception): Delete.
3901
6e774b13
SM
39022016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3903
3904 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3905
4dca19f8
MK
39062016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3907
3908 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3909
d0a9981f
MK
39102016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3911
3912 * linux-aarch64-ipa.c: Add <elf.h> include.
3913 * linux-ppc-ipa.c: Add <elf.h> include.
3914 * linux-s390-ipa.c: Add <elf.h> include.
3915
252db07e
MK
39162016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3917
3918 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3919 (get_raw_reg_ptr): Likewise.
3920 (get_trace_state_variable_value_ptr): Likewise.
3921 (set_trace_state_variable_value_ptr): Likewise.
3922 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3923 char *.
3924
14e2b6d9
MK
39252016-03-31 Wei-cheng Wang <cole945@gmail.com>
3926 Marcin Kościelnicki <koriakin@0x04.net>
3927
3928 PR/17221
3929 * linux-ppc-low.c (emit_insns): New function.
3930 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3931 (ppc_emit_prologue): New function.
3932 (ppc_emit_epilogue): New function.
3933 (ppc_emit_add): New function.
3934 (ppc_emit_sub): New function.
3935 (ppc_emit_mul): New function.
3936 (ppc_emit_lsh): New function.
3937 (ppc_emit_rsh_signed): New function.
3938 (ppc_emit_rsh_unsigned): New function.
3939 (ppc_emit_ext): New function.
3940 (ppc_emit_zero_ext): New function.
3941 (ppc_emit_log_not): New function.
3942 (ppc_emit_bit_and): New function.
3943 (ppc_emit_bit_or): New function.
3944 (ppc_emit_bit_xor): New function.
3945 (ppc_emit_bit_not): New function.
3946 (ppc_emit_equal): New function.
3947 (ppc_emit_less_signed): New function.
3948 (ppc_emit_less_unsigned): New function.
3949 (ppc_emit_ref): New function.
3950 (ppc_emit_const): New function.
3951 (ppc_emit_reg): New function.
3952 (ppc_emit_pop): New function.
3953 (ppc_emit_stack_flush): New function.
3954 (ppc_emit_swap): New function.
3955 (ppc_emit_stack_adjust): New function.
3956 (ppc_emit_call): New function.
3957 (ppc_emit_int_call_1): New function.
3958 (ppc_emit_void_call_2): New function.
3959 (ppc_emit_if_goto): New function.
3960 (ppc_emit_goto): New function.
3961 (ppc_emit_eq_goto): New function.
3962 (ppc_emit_ne_goto): New function.
3963 (ppc_emit_lt_goto): New function.
3964 (ppc_emit_le_goto): New function.
3965 (ppc_emit_gt_goto): New function.
3966 (ppc_emit_ge_goto): New function.
3967 (ppc_write_goto_address): New function.
3968 (ppc_emit_ops_impl): New static variable.
3969 (ppc64v1_emit_prologue): New function.
3970 (ppc64v2_emit_prologue): New function.
3971 (ppc64_emit_epilogue): New function.
3972 (ppc64_emit_add): New function.
3973 (ppc64_emit_sub): New function.
3974 (ppc64_emit_mul): New function.
3975 (ppc64_emit_lsh): New function.
3976 (ppc64_emit_rsh_signed): New function.
3977 (ppc64_emit_rsh_unsigned): New function.
3978 (ppc64_emit_ext): New function.
3979 (ppc64_emit_zero_ext): New function.
3980 (ppc64_emit_log_not): New function.
3981 (ppc64_emit_bit_and): New function.
3982 (ppc64_emit_bit_or): New function.
3983 (ppc64_emit_bit_xor): New function.
3984 (ppc64_emit_bit_not): New function.
3985 (ppc64_emit_equal): New function.
3986 (ppc64_emit_less_signed): New function.
3987 (ppc64_emit_less_unsigned): New function.
3988 (ppc64_emit_ref): New function.
3989 (ppc64_emit_const): New function.
3990 (ppc64v1_emit_reg): New function.
3991 (ppc64v2_emit_reg): New function.
3992 (ppc64_emit_pop): New function.
3993 (ppc64_emit_stack_flush): New function.
3994 (ppc64_emit_swap): New function.
3995 (ppc64v1_emit_call): New function.
3996 (ppc64v2_emit_call): New function.
3997 (ppc64v1_emit_int_call_1): New function.
3998 (ppc64v2_emit_int_call_1): New function.
3999 (ppc64v1_emit_void_call_2): New function.
4000 (ppc64v2_emit_void_call_2): New function.
4001 (ppc64_emit_if_goto): New function.
4002 (ppc64_emit_eq_goto): New function.
4003 (ppc64_emit_ne_goto): New function.
4004 (ppc64_emit_lt_goto): New function.
4005 (ppc64_emit_le_goto): New function.
4006 (ppc64_emit_gt_goto): New function.
4007 (ppc64_emit_ge_goto): New function.
4008 (ppc64v1_emit_ops_impl): New static variable.
4009 (ppc64v2_emit_ops_impl): New static variable.
4010 (ppc_emit_ops): New function.
4011 (linux_low_target): Wire in ppc_emit_ops.
4012
a2174ba4
MK
40132016-03-31 Wei-cheng Wang <cole945@gmail.com>
4014 Marcin Kościelnicki <koriakin@0x04.net>
4015
4016 PR/17221
4017 * Makefile.in: Add powerpc-*-ipa.o
4018 * configure.srv: Add ipa_obj for powerpc*-linux.
4019 * linux-ppc-ipa.c: New file.
4020 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4021 includes.
4022 (PPC_FIELD): New macro.
4023 (PPC_SEXT): New macro.
4024 (PPC_OP6): New macro.
4025 (PPC_BO): New macro.
4026 (PPC_LI): New macro.
4027 (PPC_BD): New macro.
4028 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4029 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4030 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4031 (ppc_get_thread_area): New function.
4032 (is_elfv2_inferior): New function.
4033 (gen_ds_form): New function.
4034 (GEN_STD): New macro.
4035 (GEN_STDU): New macro.
4036 (GEN_LD): New macro.
4037 (GEN_LDU): New macro.
4038 (gen_d_form): New function.
4039 (GEN_ADDI): New macro.
4040 (GEN_ADDIS): New macro.
4041 (GEN_LI): New macro.
4042 (GEN_LIS): New macro.
4043 (GEN_ORI): New macro.
4044 (GEN_ORIS): New macro.
4045 (GEN_LWZ): New macro.
4046 (GEN_STW): New macro.
4047 (GEN_STWU): New macro.
4048 (gen_xfx_form): New function.
4049 (GEN_MFSPR): New macro.
4050 (GEN_MTSPR): New macro.
4051 (GEN_MFCR): New macro.
4052 (GEN_MTCR): New macro.
4053 (GEN_SYNC): New macro.
4054 (GEN_LWSYNC): New macro.
4055 (gen_x_form): New function.
4056 (GEN_OR): New macro.
4057 (GEN_MR): New macro.
4058 (GEN_LWARX): New macro.
4059 (GEN_STWCX): New macro.
4060 (GEN_CMPW): New macro.
4061 (gen_md_form): New function.
4062 (GEN_RLDICL): New macro.
4063 (GEN_RLDICR): New macro.
4064 (gen_i_form): New function.
4065 (GEN_B): New macro.
4066 (GEN_BL): New macro.
4067 (gen_b_form): New function.
4068 (GEN_BNE): New macro.
4069 (GEN_LOAD): New macro.
4070 (GEN_STORE): New macro.
4071 (gen_limm): New function.
4072 (gen_atomic_xchg): New function.
4073 (gen_call): New function.
4074 (ppc_relocate_instruction): New function.
4075 (ppc_install_fast_tracepoint_jump_pad): New function.
4076 (ppc_get_min_fast_tracepoint_insn_len): New function.
4077 (ppc_get_ipa_tdesc_idx): New function.
4078 (the_low_target): Wire in the new functions.
4079 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4080 tdescs.
4081 * linux-ppc-tdesc.h: New file.
4082
a13c4696
MK
40832016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4084
4085 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4086 (alloc_jump_pad_buffer): New function.
4087 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4088 (alloc_jump_pad_buffer): New function.
4089 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4090 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4091 (alloc_jump_pad_buffer): New function.
4092 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4093 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4094 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4095 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4096
1cda1512
MK
40972016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4098
4099 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4100 * linux-amd64-ipa.c: Likewise.
4101 * linux-i386-ipa.c: Likewise.
4102 * linux-s390-ipa.c: Likewise.
4103 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4104 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4105 set_trace_state_variable_value_ptr.
4106 (struct ipa_sym_addresses): Likewise.
4107 (symbol_list): Likewise.
4108 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4109 accessing gdb_collect directly.
4110 (gdb_collect_ptr_type): New typedef.
4111 (get_raw_reg_ptr_type): New typedef.
4112 (get_trace_state_variable_value_ptr_type): New typedef.
4113 (set_trace_state_variable_value_ptr_type): New typedef.
4114 (gdb_collect_ptr): New global.
4115 (get_raw_reg_ptr): New global.
4116 (get_trace_state_variable_value_ptr): New global.
4117 (set_trace_state_variable_value_ptr): New global.
4118 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4119 accessing get_raw_reg directly.
4120 (get_get_tsv_func_addr): Likewise for
4121 get_trace_state_variable_value_ptr.
4122 (get_set_tsv_func_addr): Likewise for
4123 set_trace_state_variable_value_ptr.
4124 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4125
72fb5488
SM
41262016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4127
4128 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4129
28170b88
MK
41302016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4131
4132 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4133 packets.
4134 (relocate_instruction): Remove own_buf.
4135 * server.c (own_buf): Make global.
4136 (handle_v_requests): Make global.
4137 * server.h (own_buf): New declaration.
4138 (handle_v_requests): New prototype.
4139
f39e8743
MK
41402016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4141
4142 PR 18377
4143 * linux-s390-low.c (add_insns): New function.
4144 (s390_emit_prologue): New function.
4145 (s390_emit_epilogue): New function.
4146 (s390_emit_add): New function.
4147 (s390_emit_sub): New function.
4148 (s390_emit_mul): New function.
4149 (s390_emit_lsh): New function.
4150 (s390_emit_rsh_signed): New function.
4151 (s390_emit_rsh_unsigned): New function.
4152 (s390_emit_ext): New function.
4153 (s390_emit_log_not): New function.
4154 (s390_emit_bit_and): New function.
4155 (s390_emit_bit_or): New function.
4156 (s390_emit_bit_xor): New function.
4157 (s390_emit_bit_not): New function.
4158 (s390_emit_equal): New function.
4159 (s390_emit_less_signed): New function.
4160 (s390_emit_less_unsigned): New function.
4161 (s390_emit_ref): New function.
4162 (s390_emit_if_goto): New function.
4163 (s390_emit_goto): New function.
4164 (s390_write_goto_address): New function.
4165 (s390_emit_litpool): New function.
4166 (s390_emit_const): New function.
4167 (s390_emit_call): New function.
4168 (s390_emit_reg): New function.
4169 (s390_emit_pop): New function.
4170 (s390_emit_stack_flush): New function.
4171 (s390_emit_zero_ext): New function.
4172 (s390_emit_swap): New function.
4173 (s390_emit_stack_adjust): New function.
4174 (s390_emit_set_r2): New function.
4175 (s390_emit_int_call_1): New function.
4176 (s390_emit_void_call_2): New function.
4177 (s390_emit_eq_goto): New function.
4178 (s390_emit_ne_goto): New function.
4179 (s390_emit_lt_goto): New function.
4180 (s390_emit_le_goto): New function.
4181 (s390_emit_gt_goto): New function.
4182 (s390_emit_ge_goto): New function.
4183 (s390x_emit_prologue): New function.
4184 (s390x_emit_epilogue): New function.
4185 (s390x_emit_add): New function.
4186 (s390x_emit_sub): New function.
4187 (s390x_emit_mul): New function.
4188 (s390x_emit_lsh): New function.
4189 (s390x_emit_rsh_signed): New function.
4190 (s390x_emit_rsh_unsigned): New function.
4191 (s390x_emit_ext): New function.
4192 (s390x_emit_log_not): New function.
4193 (s390x_emit_bit_and): New function.
4194 (s390x_emit_bit_or): New function.
4195 (s390x_emit_bit_xor): New function.
4196 (s390x_emit_bit_not): New function.
4197 (s390x_emit_equal): New function.
4198 (s390x_emit_less_signed): New function.
4199 (s390x_emit_less_unsigned): New function.
4200 (s390x_emit_ref): New function.
4201 (s390x_emit_if_goto): New function.
4202 (s390x_emit_const): New function.
4203 (s390x_emit_call): New function.
4204 (s390x_emit_reg): New function.
4205 (s390x_emit_pop): New function.
4206 (s390x_emit_stack_flush): New function.
4207 (s390x_emit_zero_ext): New function.
4208 (s390x_emit_swap): New function.
4209 (s390x_emit_stack_adjust): New function.
4210 (s390x_emit_int_call_1): New function.
4211 (s390x_emit_void_call_2): New function.
4212 (s390x_emit_eq_goto): New function.
4213 (s390x_emit_ne_goto): New function.
4214 (s390x_emit_lt_goto): New function.
4215 (s390x_emit_le_goto): New function.
4216 (s390x_emit_gt_goto): New function.
4217 (s390x_emit_ge_goto): New function.
4218 (s390_emit_ops): New function.
4219 (struct linux_target_ops): Fill in emit_ops hook.
4220
abd9baf9
MK
42212016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4222
4223 PR 18377
4224 * Makefile.in: Add s390 IPA files.
4225 * configure.srv: Build IPA for s390.
4226 * linux-s390-ipa.c: New file.
4227 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4228 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4229 (tdesc_s390_linux32): Likewise.
4230 (init_registers_s390_linux32v1): Likewise.
4231 (tdesc_s390_linux32v1): Likewise.
4232 (init_registers_s390_linux32v2): Likewise.
4233 (tdesc_s390_linux32v2): Likewise.
4234 (init_registers_s390_linux64): Likewise.
4235 (tdesc_s390_linux64): Likewise.
4236 (init_registers_s390_linux64v1): Likewise.
4237 (tdesc_s390_linux64v1): Likewise.
4238 (init_registers_s390_linux64v2): Likewise.
4239 (tdesc_s390_linux64v2): Likewise.
4240 (init_registers_s390_te_linux64): Likewise.
4241 (tdesc_s390_te_linux64): Likewise.
4242 (init_registers_s390_vx_linux64): Likewise.
4243 (tdesc_s390_vx_linux64): Likewise.
4244 (init_registers_s390_tevx_linux64): Likewise.
4245 (tdesc_s390_tevx_linux64): Likewise.
4246 (init_registers_s390x_linux64): Likewise.
4247 (tdesc_s390x_linux64): Likewise.
4248 (init_registers_s390x_linux64v1): Likewise.
4249 (tdesc_s390x_linux64v1): Likewise.
4250 (init_registers_s390x_linux64v2): Likewise.
4251 (tdesc_s390x_linux64v2): Likewise.
4252 (init_registers_s390x_te_linux64): Likewise.
4253 (tdesc_s390x_te_linux64): Likewise.
4254 (init_registers_s390x_vx_linux64): Likewise.
4255 (tdesc_s390x_vx_linux64): Likewise.
4256 (init_registers_s390x_tevx_linux64): Likewise.
4257 (tdesc_s390x_tevx_linux64): Likewise.
4258 (have_hwcap_s390_vx): New static variable.
4259 (s390_arch_setup): Fill have_hwcap_s390_vx.
4260 (s390_get_thread_area): New function.
4261 (s390_ft_entry_gpr_esa): New const.
4262 (s390_ft_entry_gpr_zarch): New const.
4263 (s390_ft_entry_misc): New const.
4264 (s390_ft_entry_fr): New const.
4265 (s390_ft_entry_vr): New const.
4266 (s390_ft_main_31): New const.
4267 (s390_ft_main_64): New const.
4268 (s390_ft_exit_fr): New const.
4269 (s390_ft_exit_vr): New const.
4270 (s390_ft_exit_misc): New const.
4271 (s390_ft_exit_gpr_esa): New const.
4272 (s390_ft_exit_gpr_zarch): New const.
4273 (append_insns): New function.
4274 (s390_relocate_instruction): New function.
4275 (s390_install_fast_tracepoint_jump_pad): New function.
4276 (s390_get_min_fast_tracepoint_insn_len): New function.
4277 (s390_get_ipa_tdesc_idx): New function.
4278 (struct linux_target_ops): Wire in the above functions.
4279 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4280 * linux-s390-tdesc.h: New file.
4281
a4105d04
MK
42822016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4283
4284 * linux-s390-low.c (s390_supports_tracepoints): New function.
4285 (struct linux_target_ops): Fill supports_tracepoints hook.
4286
35ac8b3e
YQ
42872016-03-18 Yao Qi <yao.qi@linaro.org>
4288
4289 * linux-low.c (lwp_signal_can_be_delivered): New function.
4290 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4291
94610ec4
YQ
42922016-03-18 Yao Qi <yao.qi@linaro.org>
4293
4294 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4295 0 if signal is enqueued. Remove 'signal' from one debugging
4296 message. Move one debugging message to some lines below.
4297 Remove code setting 'signal' to 0.
4298
80aea927
YQ
42992016-03-18 Yao Qi <yao.qi@linaro.org>
4300
4301 * linux-low.c (linux_low_filter_event): Remove redundant
4302 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4303
b04fd3be
MK
43042016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4305
4306 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4307 (struct linux_target_ops): Wire in the above.
4308
c40c8d4b
YQ
43092016-03-03 Yao Qi <yao.qi@linaro.org>
4310
4311 * linux-low.c: Update comments to start_step_over.
4312
0f8288ae
YQ
43132016-03-03 Yao Qi <yao.qi@linaro.org>
4314
4315 PR server/19736
4316 * linux-low.c (handle_extended_wait): Set child suspended
4317 if event_lwp->bp_reinsert isn't zero.
4318
fdbd04a8
YQ
43192016-03-02 Yao Qi <yao.qi@linaro.org>
4320
4321 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4322 enqueue_pending_signal.
4323
6896a8fa
MK
43242016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4325
4326 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4327 is actually loaded.
4328
ab503087
MK
43292016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4330
4331 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4332 (s390_regmap_3264) [!__s390x__]: New global.
4333 (s390_collect_ptrace_register): Skip map entries containing -1.
4334 (s390_supply_ptrace_register): Ditto.
4335 (s390_fill_gprs_high): New function.
4336 (s390_store_gprs_high): New function.
4337 (s390_regsets): Add NT_S390_HIGH_GPRS.
4338 (s390_get_hwcap): Enable on 31-bit.
4339 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4340 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4341 Detect NT_S390_HIGH_GPRS.
4342 (s390_usrregs_info_3264): Enable on 31-bit.
4343 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4344 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4345
ae91f625
MK
43462016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4347
4348 PR gdb/13808
4349 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4350 * configure.srv: Ditto.
4351 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4352 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4353 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4354 (init_registers_amd64_linux): Remove prototype.
4355 (tdesc_amd64_linux): Remove declaration.
4356 (get_ipa_tdesc): New function.
4357 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4358 initialize remaining tdescs.
4359 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4360 (init_registers_i386_linux): Remove prototype.
4361 (tdesc_i386_linux): Remove declaration.
4362 (get_ipa_tdesc): New function.
4363 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4364 initialize remaining tdescs.
4365 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4366 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4367 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4368 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4369 (x86_get_ipa_tdesc_idx): New function.
4370 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4371 * linux-x86-tdesc.h: New file.
4372 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4373 (target_get_ipa_tdesc_idx): New macro.
4374 * tracepoint.c (ipa_tdesc_idx): New macro.
4375 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4376 (symbol_list): Add ipa_tdesc_idx.
4377 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4378 (ipa_tdesc): Remove.
4379 (ipa_tdesc_idx): New variable.
4380 (get_context_regcache): Use get_ipa_tdesc.
4381 (gdb_collect): Ditto.
4382 (gdb_probe): Ditto.
4383 * tracepoint.h (get_ipa_tdesc): New prototype.
4384 (ipa_tdesc): Remove.
4385
e7ad2f14
PA
43862016-02-24 Pedro Alves <palves@redhat.com>
4387
4388 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4389 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4390 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4391 Factor out common code between the USE_SIGTRAP_SIGINFO and
4392 !USE_SIGTRAP_SIGINFO blocks.
4393 (linux_low_filter_event): Call save_stop_reason instead of
4394 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4395 Update comments.
4396 (linux_wait_1): Update comments.
4397
657f9cde
WW
43982016-02-24 Wei-cheng Wang <cole945@gmail.com>
4399
4400 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4401 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4402 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4403 ppc_insert_point, ppc_remove_point.
4404
b00b61e1
MK
44052016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4406
4407 * linux-s390-low.c (s390_supports_z_point_type): New function.
4408 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4409
553cb527
YQ
44102016-02-16 Yao Qi <yao.qi@linaro.org>
4411
4412 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4413 PC. Get pc from regcache_read_pc.
4414
a5652c21
YQ
44152016-02-12 Yao Qi <yao.qi@linaro.org>
4416
4417 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4418 or linux_get_pc_32bit.
4419 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4420
ed443b61
YQ
44212016-02-12 Yao Qi <yao.qi@linaro.org>
4422
4423 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4424 arm_linux_get_next_pcs_fixup.
4425
020ecd38
MK
44262016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4427
4428 * tracepoint.c (x_tracepoint_action_download): Change
4429 write_inferior_data_ptr to write_inferior_data_pointer.
4430 (cmd_qtstart): Likewise.
4431 (write_inferior_data_ptr): Remove.
4432 (download_agent_expr): Change write_inferior_data_ptr to
4433 write_inferior_data_pointer.
4434 (download_tracepoint_1): Likewise.
4435 (download_tracepoint): Likewise.
4436 (download_trace_state_variables): Likewise.
4437
7cae9051
WW
44382016-02-11 Wei-cheng Wang <cole945@gmail.com>
4439 Marcin Kościelnicki <koriakin@0x04.net>
4440
4441 * tracepoint.c (struct tracepoint_action_ops): Remove.
4442 (struct tracepoint_action): Remove ops.
4443 (m_tracepoint_action_download, r_tracepoint_action_download)
4444 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4445 size and offset accordingly.
4446 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4447 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4448 (tracepoint_action_send, tracepoint_action_download): New functions.
4449 Helpers for trace action handlers.
4450 (add_tracepoint_action): Remove setup actions ops.
4451 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4452
9f6a71b4
YQ
44532016-02-10 Yao Qi <yao.qi@linaro.org>
4454
4455 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4456
1e94266c
SM
44572016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4458
4459 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4460 to AC_OUTPUT.
4461 * configure: Regenerate.
4462
8adce034
SM
44632016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4464
4465 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4466 void * to gdb_byte *.
4467 * linux-low.c (siginfo_fixup): Likewise.
4468 (linux_xfer_siginfo): Likewise.
4469 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4470 Likewise.
4471 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4472
93813b37
WT
44732016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4474
4475 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4476 to srv_tgtobj.
4477 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4478 to srv_tgtobj.
4479 * linux-x86-low.c [__x86_64__]: Include
4480 "nat/amd64-linux-siginfo.h".
4481 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4482 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4483 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4484 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4485 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4486 (cpt_si_fd, si_timerid, si_overrun): Move from
4487 nat/amd64-linux-siginfo.c.
4488 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4489
8424cc97
SM
44902016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4491
4492 * server.c (skip_to_semicolon): Remove.
4493 (process_point_options): Use strchrnul instead of
4494 skip_to_semicolon.
4495
4d18591b
YQ
44962016-01-26 Yao Qi <yao.qi@linaro.org>
4497
4498 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4499 * linux-low.c (install_software_single_step_breakpoints): Don't
4500 call regcache_read_pc.
4501 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4502 argument pc.
4503
d8020970
YQ
45042016-01-26 Yao Qi <yao.qi@linaro.org>
4505
4506 * linux-low.c (install_software_single_step_breakpoints): Call
4507 regcache_read_pc instead of get_pc.
4508
8b207339
YQ
45092016-01-26 Yao Qi <yao.qi@linaro.org>
4510
4511 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4512 (unblock_async_io): Rename to ...
4513 (block_unblock_async_io): ... it. New function.
4514 (enable_async_io): Don't install SIGIO handler. Unblock it
4515 instead.
4516 (disable_async_io): Don't ignore SIGIO. Block it instead.
4517 (initialize_async_io): Install SIGIO handler. Don't call
4518 unblock_async_io.
4519
18879fef
YQ
45202016-01-26 Yao Qi <yao.qi@linaro.org>
4521
4522 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4523 first character is '\003', call *the_target->request_interrupt.
4524
a0f8e08a
YQ
45252016-01-25 Yao Qi <yao.qi@linaro.org>
4526
4527 * remote-utils.c (new_thread_notify): Remove.
4528 (dead_thread_notify): Likewise.
4529 * remote-utils.h (new_thread_notify): Remove declaration.
4530 (dead_thread_notify): Likewise.
4531
cc5fd9ab
MK
45322016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4533
4534 * gdb.trace/pending.exp: Fix expected message on continue.
4535
99e8eb11
MK
45362016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4537
4538 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4539 it works properly on big-endian machines where sizeof (CORE_ADDR)
4540 != sizeof (void *).
4541
a994041d
PA
45422016-01-21 Pedro Alves <palves@redhat.com>
4543
4544 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4545 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4546 * configure: Regenerate.
4547
f7a6a40d
YQ
45482016-01-21 Yao Qi <yao.qi@linaro.org>
4549
4550 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4551 is_thumb and set it according to CPSR saved on the stack.
4552 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4553 arm_sigreturn_next_pc.
4554
6f69e520
YQ
45552016-01-18 Yao Qi <yao.qi@linaro.org>
4556
4557 * linux-low.c (linux_set_pc_64bit): New function.
4558 (linux_get_pc_64bit): New function.
4559 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4560 Declare.
4561 * linux-sparc-low.c (debug_threads): Remove declaration.
4562 (sparc_get_pc): Remove.
4563 (the_low_target): Use linux_get_pc_64bit instead of
4564 sparc_get_pc.
4565 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4566 (the_low_target): Use linux_get_pc_64bit and
4567 linux_set_pc_64bit.
4568
276d4552
YQ
45692016-01-18 Yao Qi <yao.qi@linaro.org>
4570
4571 * linux-arm-low.c (debug_threads): Remove declaration.
4572 (arm_get_pc, arm_set_pc): Remove.
4573 (the_low_target): Use linux_get_pc_32bit and
4574 linux_set_pc_32bit.
4575 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4576 (the_low_target): Use linux_get_pc_32bit and
4577 linux_set_pc_32bit.
4578 * linux-cris-low.c (debug_threads): Remove declaration.
4579 (cris_get_pc, cris_set_pc,): Remove.
4580 (the_low_target): Use linux_get_pc_32bit and
4581 linux_set_pc_32bit.
4582 * linux-crisv32-low.c (debug_threads): Remove declaration.
4583 (cris_get_pc, cris_set_pc): Remove.
4584 (the_low_target): Use linux_get_pc_32bit and
4585 linux_set_pc_32bit.
4586 * linux-low.c: Include inttypes.h.
4587 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4588 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4589 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4590 (the_low_target): Use linux_get_pc_32bit and
4591 linux_set_pc_32bit.
4592 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4593 (the_low_target): Use linux_get_pc_32bit and
4594 linux_set_pc_32bit.
4595 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4596 (the_low_target): Use linux_get_pc_32bit and
4597 linux_set_pc_32bit.
4598 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4599 (the_low_target): Use linux_get_pc_32bit and
4600 linux_set_pc_32bit.
4601 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4602 (the_low_target): Use linux_get_pc_32bit and
4603 linux_set_pc_32bit.
4604
eb0edac8
GB
46052016-01-18 Gary Benson <gbenson@redhat.com>
4606
4607 * configure.ac (AC_FUNC_FORK): New check.
4608 * config.in: Regenerate.
4609 * configure: Likewise.
4610
1b451dda
YQ
46112016-01-14 Yao Qi <yao.qi@linaro.org>
4612
4613 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4614 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4615 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4616 arm_get_next_pcs_ctor.
4617
82075af2
JS
46182016-01-12 Josh Stone <jistone@redhat.com>
4619 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4620
4621 * inferiors.h: Include "gdb_vecs.h".
4622 (struct process_info): Add syscalls_to_catch.
4623 * inferiors.c (remove_process): Free syscalls_to_catch.
4624 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4625 syscall_return stops.
4626 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4627 * server.c (handle_general_set): Handle QCatchSyscalls.
4628 (handle_query): Report support for QCatchSyscalls.
4629 * target.h (struct target_ops): Add supports_catch_syscall.
4630 (target_supports_catch_syscall): New macro.
4631 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4632 (struct lwp_info): Add syscall_state.
4633 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4634 Maintain syscall_state and syscalls_to_catch across exec.
4635 (get_syscall_trapinfo): New function, proxy to the_low_target.
4636 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4637 (linux_low_filter_event): Toggle syscall_state entry/return for
4638 syscall traps, and set it ignored for all others.
4639 (gdb_catching_syscalls_p): New function.
4640 (gdb_catch_this_syscall_p): New function.
4641 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4642 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4643 (linux_supports_catch_syscall): New function.
4644 (linux_target_ops): Install it.
4645 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4646 (the_low_target): Install it.
4647
8f13a3ce
MF
46482016-01-12 Mike Frysinger <vapier@gentoo.org>
4649
4650 * acinclude.m4: Include new ../warning.m4 file.
4651 * configure: Regenerated.
4652 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4653
5b3da067
MF
46542016-01-12 Mike Frysinger <vapier@gentoo.org>
4655
4656 * ax.c (is_goto_target): Mark static.
4657 * linux-low.c (register_addr): Likewise.
4658 (linux_fetch_registers, linux_store_registers): Likewise.
4659 * mem-break.c (any_persistent_commands): Fix old prototype.
4660 (add_commands_to_breakpoint): Mark static.
4661 * regcache.c (find_register_by_name): Delete unused func.
4662 * remote-utils.c (hex_or_minus_one): Mark static.
4663 * server.c (monitor_show_help): Mark static.
4664 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4665 handle_v_requests): Likewise.
4666
bc504a31
PA
46672016-01-12 Pedro Alves <palves@redhat.com>
4668
4669 Remove use of the registered trademark symbol throughout.
4670
5a0dd67a
YQ
46712016-01-08 Yao Qi <yao.qi@linaro.org>
4672
4673 * remote-utils.c (getpkt): If c is '\003', call target hook
4674 request_interrupt.
4675
b2ca446f
YQ
46762016-01-06 Yao Qi <yao.qi@linaro.org>
4677
4678 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4679 linux-aarch32-low.c.
4680 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4681 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4682 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4683 (thumb2_breakpoint): Declare.
4684 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4685 linux-aarch32-low.h.
4686 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4687 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4688 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4689
edd88788
JB
46902016-01-01 Joel Brobecker <brobecker@adacore.com>
4691
4692 * gdbreplay.c (gdbreplay_version): Change copyright year in
4693 version message.
4694 * server.c (gdbserver_version): Likewise.
4695
65da7f14
PP
46962015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4697
4698 * server.c (crc32_table): Delete.
4699 (crc32): Use libiberty's xcrc32 function.
4700
4abd5ed2
JB
47012015-12-22 Joel Brobecker <brobecker@adacore.com>
4702
4703 * lynx-low.c (lynx_delete_thread_callback): New function.
4704 (lynx_mourn): Properly delete our process and all of its
4705 threads. Remove call to clear_inferiors.
4706
0e50fe5c
JB
47072015-12-22 Joel Brobecker <brobecker@adacore.com>
4708
4709 * target.c (thread_search_callback): Add check that
4710 the thread_stopped target callback is not NULL before
4711 calling it.
4712
35adc03f
YQ
47132015-12-21 Yao Qi <yao.qi@linaro.org>
4714
4715 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4716 arm breakpoint.
4717
bd2b2909
AT
47182015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4719
4720 * server.c (handle_query): Call target_supports_software_single_step.
4721
7fe5e27e
AT
47222015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4723
4724 * linux-low.c (single_step): New function.
4725 (linux_resume_one_lwp_throw): Call single_step.
4726 (start_step_over): Likewise.
4727
d9311bfa
AT
47282015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4729
4730 * Makefile.in (SFILES): Append arch/arm-linux.c,
4731 arch/arm-get-next-pcs.c.
4732 (arm-linux.o): New rule.
4733 (arm-get-next-pcs.o): New rule.
4734 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4735 arm-linux.o.
4736 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4737 to linux-aarch32-low.c.
4738 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4739 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4740 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4741 (thumb2_breakpoint_len): Likewise.
4742 (arm_is_thumb_mode): Make non-static.
4743 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4744 from linux-aarch32-low.c.
4745 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4746 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4747 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4748 (thumb2_breakpoint_len): Likewise.
4749 (arm_is_thumb_mode): New declaration.
4750 * linux-arm-low.c: Include arch/arm-linux.h
4751 aarch/arm-get-next-pcs.h, sys/syscall.h.
4752 (get_next_pcs_ops): New struct.
4753 (get_next_pcs_addr_bits_remove): New function.
4754 (get_next_pcs_is_thumb): New function.
4755 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4756 (arm_sigreturn_next_pc): Likewise.
4757 (get_next_pcs_syscall_next_pc): Likewise.
4758 (arm_gdbserver_get_next_pcs): Likewise.
4759 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4760 Initialize.
4761 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4762 * server.h: Include gdb_vecs.h.
4763
68ce2059
AT
47642015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4765
4766 * Makefile.in (SFILES): Append common/common-regcache.c.
4767 (OBS): Append common-regcache.o.
4768 (common-regcache.o): New rule.
4769 * regcache.c (init_register_cache): Initialize cache to
4770 REG_UNAVAILABLE.
4771 (regcache_raw_read_unsigned): New function.
4772 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4773 register_status enum.
4774
fa5308bd
AT
47752015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4776
4777 * linux-aarch64-low.c (the_low_targets): Rename
4778 breakpoint_reinsert_addr to get_next_pcs.
4779 * linux-arm-low.c (the_low_targets): Likewise.
4780 * linux-bfin-low.c (the_low_targets): Likewise.
4781 * linux-cris-low.c (the_low_targets): Likewise.
4782 * linux-crisv32-low.c (the_low_targets): Likewise.
4783 * linux-low.c (can_software_single_step): Likewise.
4784 (install_software_single_step_breakpoints): New function.
4785 (start_step_over): Use install_software_single_step_breakpoints.
4786 * linux-low.h: New CORE_ADDR vector.
4787 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4788 get_next_pcs.
4789 * linux-mips-low.c (the_low_targets): Likewise.
4790 * linux-nios2-low.c (the_low_targets): Likewise.
4791 * linux-sparc-low.c (the_low_targets): Likewise.
4792
4a6ed09b
PA
47932015-12-17 Pedro Alves <palves@redhat.com>
4794
4795 * linux-low.c (linux_kill_one_lwp): Remove references to
4796 LinuxThreads.
4797 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4798 to 'kill'.
4799 (linux_init_signals): Delete.
4800 (initialize_low): Adjust.
4801 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4802
7544db95
PA
48032015-12-16 Pedro Alves <palves@redhat.com>
4804
4805 * configure.ac (compiler warning flags): When testing a
4806 -Wno-foo option, check whether -Wfoo works instead.
4807 * configure: Regenerate.
4808
8020350c
DB
48092015-12-11 Don Breazeal <donb@codesourcery.com>
4810
4811 * server.c (process_serial_event): Don't exit from gdbserver
4812 in remote mode if there are still active inferiors.
4813
db91f502
YQ
48142015-12-11 Yao Qi <yao.qi@linaro.org>
4815
4816 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4817 arm_breakpoint_at if the process is 32-bit.
4818
b37a6290
YQ
48192015-12-11 Yao Qi <yao.qi@linaro.org>
4820
4821 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4822 arm breakpoint.
4823
17b1509a
YQ
48242015-12-07 Yao Qi <yao.qi@linaro.org>
4825
4826 * configure.srv: Append arm.o to srv_tgtobj for
4827 aarch64*-*-linux* target.
4828 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4829 from linux-arm-low.c.
4830 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4831 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4832 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4833 (thumb2_breakpoint_len): Likewise.
4834 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4835 (arm_breakpoint_kinds): Likewise.
4836 (arm_breakpoint_kind_from_pc): Likewise.
4837 (arm_sw_breakpoint_from_kind): Likewise.
4838 (arm_breakpoint_kind_from_current_state): Likewise.
4839 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4840 (arm_sw_breakpoint_from_kind): Declare.
4841 (arm_breakpoint_kind_from_current_state): Declare.
4842 (arm_breakpoint_at): Declare.
4843 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4844 arm_sw_breakpoint_from_kind if process is 32-bit.
4845 (aarch64_breakpoint_kind_from_pc): New function.
4846 (aarch64_breakpoint_kind_from_current_state): New function.
4847 (the_low_target): Initialize fields breakpoint_kind_from_pc
4848 and breakpoint_kind_from_current_state.
4849 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4850 linux-aarch32-low.c.
4851 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4852 (arm_breakpoint, arm_breakpoint_len): Likewise.
4853 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4854 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4855 (arm_is_thumb_mode): Likewise.
4856 (arm_breakpoint_at): Likewise.
4857 (arm_breakpoint_kind_from_pc): Likewise.
4858 (arm_sw_breakpoint_from_kind): Likewise.
4859 (arm_breakpoint_kind_from_current_state): Likewise.
4860
4861 Revert:
4862 2015-08-04 Yao Qi <yao.qi@linaro.org>
4863
4864 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4865 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4866 * server.c (extended_protocol): Remove "static".
4867 * server.h (extended_protocol): Declare it.
4868
ece66d65
JS
48692015-12-04 Josh Stone <jistone@redhat.com>
4870
4871 * target.h (struct target_ops) <arch_setup>: Rename to ...
4872 (struct target_ops) <post_create_inferior>: ... this.
4873 (target_arch_setup): Rename to ...
4874 (target_post_create_inferior): ... this, calling post_create_inferior.
4875 * server.c (start_inferior): Update target_arch_setup calls to
4876 target_post_create_inferior.
4877 * linux-low.c (linux_low_ptrace_options): Forward declare.
4878 (linux_arch_setup): Update its comment for general use.
4879 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4880 (struct linux_target_ops): Use linux_post_create_inferior.
4881 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4882 to post_create_inferior.
4883 * nto-low.c (struct nto_target_ops): Likewise.
4884 * spu-low.c (struct spu_target_ops): Likewise.
4885 * win32-low.c (struct win32_target_ops): Likewise.
4886
e58c48b4
AT
48872015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4888
4889 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4890
fbec8956
AT
48912015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4892
4893 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4894 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4895 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4896 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4897 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4898 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4899 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4900 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4901 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4902 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4903 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4904 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4905
9b4c5f87
AT
49062015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4907
4908 * linux-low.c (linux_look_up_symbols): Don't call
4909 linux_supports_traceclone.
4910 * linux-low.h (thread_db_init): Remove use_events argument.
4911 * thread-db.c (thread_db_use_event): Remove global variable.
4912 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4913 (struct thread_db) <td_create_bp>: Remove field.
4914 (thread_db_create_event): Remove function.
4915 (thread_db_enable_reporting): Likewise.
4916 (find_one_thread): Don't check for thread_db_use_events.
4917 (attach_thread): Likewise.
4918 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4919 (try_thread_db_load_1): Don't check for thread_db_use_events.
4920 (thread_db_init): Remove use_events argument and thread events
4921 handling.
4922 (remove_thread_event_breakpoints): Remove function.
4923 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4924
7d00775e
AT
49252015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4926
4927 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4928 New function.
4929 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4930 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4931 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4932 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4933 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4934 Initialize.
4935 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4936 New function.
4937 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4938 * linux-low.c (can_hardware_single_step): Use
4939 supports_hardware_single_step.
4940 (can_software_single_step): New function.
4941 (start_step_over): Call can_software_single_step.
4942 (linux_supports_hardware_single_step): New function.
4943 (struct target_ops) <supports_software_single_step>: Initialize.
4944 * linux-low.h (struct linux_target_ops)
4945 <supports_hardware_single_step>: Initialize.
4946 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4947 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4948 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4949 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4950 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4951 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4952 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4953 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4954 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4955 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4956 Initialize.
4957 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4958 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4959 Initialize.
4960 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4961 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4962 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4963 New function.
4964 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4965 * target.h (struct target_ops): <supports_software_single_step>:
4966 New field.
4967 (target_supports_software_single_step): New macro.
4968
2d97cd35
AT
49692015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4970
4971 * linux-low.c (linux_wait_1): Fix pc advance condition.
4972 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4973 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4974
769ef81f
AT
49752015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4976
4977 * linux-arm-low.c (arm_is_thumb_mode): New function.
4978 (arm_breakpoint_at): Use arm_is_thumb_mode.
4979 (arm_breakpoint_kind_from_current_state): New function.
4980 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4981 Initialize.
4982 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4983 (linux_breakpoint_kind_from_current_state): New function.
4984 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4985 * linux-low.h (struct linux_target_ops)
4986 <breakpoint_kind_from_current_state>: New field.
4987 * target.h (struct target_ops): Likewise.
4988 (target_breakpoint_kind_from_current_state): New macro.
4989
1bebeeca
PA
49902015-11-30 Pedro Alves <palves@redhat.com>
4991
4992 * linux-low.c (linux_resume): Wake up the event loop before
4993 returning.
4994
a67a9fae
PA
49952015-11-30 Pedro Alves <palves@redhat.com>
4996
4997 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4998 check.
4999 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5000 to -1.
5001 * target.c (struct thread_search): New structure.
5002 (thread_search_callback): New function.
5003 (prev_general_thread): New global.
5004 (prepare_to_access_memory, done_accessing_memory): New functions.
5005 * target.h (prepare_to_access_memory, done_accessing_memory):
5006 Replace macros with function declarations.
5007
f2faf941
PA
50082015-11-30 Pedro Alves <palves@redhat.com>
5009
5010 PR 14618
5011 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5012 report TARGET_WAITKIND_NO_RESUMED.
5013 * remote-utils.c (prepare_resume_reply): Handle
5014 TARGET_WAITKIND_NO_RESUMED.
5015 * server.c (report_no_resumed): New global.
5016 (handle_query) <qSupported>: Handle "no-resumed+". Report
5017 "no-resumed+" support.
5018 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5019 return error if the client doesn't support no-resumed events.
5020 (push_stop_notification): New function.
5021 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5022 events if the client supports them.
5023
a681f9c9
PA
50242015-11-30 Pedro Alves <palves@redhat.com>
5025
5026 * linux-low.c (thread_still_has_status_pending_p): Don't check
5027 vCont;t here.
5028 (lwp_resumed): New function.
5029 (status_pending_p_callback): Return early if the LWP is not
5030 supposed to be resumed.
5031
65706a29
PA
50322015-11-30 Pedro Alves <palves@redhat.com>
5033
5034 * linux-low.c (handle_extended_wait): Assert that the LWP's
5035 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5036 thread create events, leave the new child's status pending.
5037 (linux_low_filter_event): If GDB wants to hear about thread exit
5038 events, leave the LWP marked dead and don't delete it.
5039 (linux_wait_for_event_filtered): Don't check for thread exit.
5040 (filter_exit_event): New function.
5041 (linux_wait_1): Use it, when returning an exit event.
5042 (linux_resume_one_lwp_throw): Assert that the LWP's
5043 waitstatus is TARGET_WAITKIND_IGNORE.
5044 * remote-utils.c (prepare_resume_reply): Handle
5045 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5046 * server.c (report_thread_events): New global.
5047 (handle_general_set): Handle QThreadEvents.
5048 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5049 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5050 TARGET_WAITKIND_THREAD_EXITED.
5051 * server.h (report_thread_events): Declare.
5052
56cf4bed
PA
50532015-11-30 Pedro Alves <palves@redhat.com>
5054
5055 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5056 the thread's last_resume_kind was resume_stop.
5057
500c1d85
PA
50582015-11-30 Pedro Alves <palves@redhat.com>
5059
5060 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5061 before returning.
5062
de979965
PA
50632015-11-30 Pedro Alves <palves@redhat.com>
5064
5065 * server.c (handle_v_requests): Handle vCtrlC.
5066
34c65914
PA
50672015-11-30 Pedro Alves <palves@redhat.com>
5068
5069 * gdbthread.h (find_any_thread_of_pid): Declare.
5070 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5071 functions.
5072 * server.c (handle_query): If current_thread is NULL, look for
5073 another thread of the selected process.
5074
79efa585 50752015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5076 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5077
5078 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5079 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5080 name in reply.
5081 * target.h (struct target_ops) <thread_name>: New field.
5082 (target_thread_name): New macro.
5083
80d82c19
JB
50842015-11-23 Joel Brobecker <brobecker@adacore.com>
5085
5086 * regcache.h (regcache_invalidate_pid): Add declaration.
5087 * regcache.c (regcache_invalidate_pid): New function, extracted
5088 from regcache_invalidate.
5089 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5090 Add trivial documentation comment.
5091 * lynx-low.c: Use regcache_invalidate_pid instead of
5092 regcache_invalidate.
5093
64da5dd5
JB
50942015-11-23 Joel Brobecker <brobecker@adacore.com>
5095
5096 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5097 and Elf64_auxv_t if the target is Android.
5098
37ce4055
DE
50992015-11-22 Doug Evans <xdje42@gmail.com>
5100
5101 * target.h: #include <sys/types.h>.
5102
06e03fff
PA
51032015-11-19 Pedro Alves <palves@redhat.com>
5104
5105 * linux-low.c (linux_process_qsupported): Change prototype.
5106 Adjust.
5107 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5108 Change prototype.
5109 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5110 and adjust to loop over all features.
5111 * server.c (handle_query) <qSupported>: Adjust to call
5112 target_process_qsupported once, passing it a vector of unprocessed
5113 features.
5114 * target.h (struct target_ops) <process_qsupported>: Change
5115 prototype.
5116 (target_process_qsupported): Adjust.
5117
9a084706
PA
51182015-11-19 Pedro Alves <palves@redhat.com>
5119
5120 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5121 mode.
5122 * configure: Regenerate.
5123
dad44a1f
PA
51242015-11-19 Pedro Alves <palves@redhat.com>
5125
5126 * configure: Regenerate.
5127
231c0592
YQ
51282015-11-19 Yao Qi <yao.qi@linaro.org>
5129
5130 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5131 type to uint32_t.
5132
6c1c9a8b
YQ
51332015-11-19 Yao Qi <yao.qi@linaro.org>
5134
5135 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5136 (struct aarch64_operand): Move enum out.
5137
9caa3311
YQ
51382015-11-19 Yao Qi <yao.qi@linaro.org>
5139
5140 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5141 struct user_fpsimd_state *.
5142 (aarch64_store_fpregset): Likewise.
5143
6a69a054
YQ
51442015-11-19 Yao Qi <yao.qi@linaro.org>
5145
5146 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5147 struct user_pt_regs *.
5148 (aarch64_store_gregset): Likewise.
5149
1798301e
PA
51502015-11-18 Pedro Alves <palves@redhat.com>
5151
5152 * Makefile.in (all_object_files): Add $IPA_OBJS.
5153
ce7715e2
PA
51542015-11-17 Pedro Alves <palves@redhat.com>
5155
5156 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5157 GDB_SIGNAL_0 and gdb_signal_to_string.
5158
c0879059
PA
51592015-11-17 Pedro Alves <palves@redhat.com>
5160
5161 * win32-low.c (handle_output_debug_string): Remove parameter.
5162 (win32_kill): Remove our_status local and adjust call to
5163 handle_output_debug_string.
5164 (get_child_debug_event): Adjust call to
5165 handle_output_debug_string.
5166
1996e237
SM
51672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5168
5169 * linux-mips-low.c (mips_fill_gregset): Add cast.
5170 (mips_store_gregset): Likewise.
5171 (mips_fill_fpregset): Likewise.
5172 (mips_store_fpregset): Likewise.
5173
cbec665b
SM
51742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5175
5176 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5177 priv.
5178
eb3e3c67
SM
51792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5180
5181 * linux-mips-low.c (mips_linux_new_thread): Change type of
5182 watch_type to enum target_hw_bp_type.
5183
171de4b8
SM
51842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5185
5186 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5187 Change return type to arm_hwbp_type.
5188
04248ead
SM
51892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5190
5191 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5192 (arm_store_gregset): Likewise.
5193 * linux-arm-low.c (arm_get_hwcap): Likewise.
5194 (arm_read_description): Likewise.
5195
04b3479c
SM
51962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5197
5198 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5199
2bc84e8a
SM
52002015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5201
5202 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5203 (ppc_fill_vsxregset): Likewise.
5204 (ppc_store_vsxregset): Likewise.
5205 (ppc_fill_vrregset): Likewise.
5206 (ppc_store_vrregset): Likewise.
5207 (ppc_fill_evrregset): Likewise.
5208 (ppc_store_evrregset): Likewise.
5209
e6c5bb05
SM
52102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5211
5212 * linux-ppc-low.c (ppc_usrregs_info): Remove
5213 forward-declaration.
5214 (ppc_arch_setup): Move lower in file.
5215
7ea45d72
SM
52162015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5217
5218 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5219 (ps_pdwrite): Likewise.
5220
69291610
HW
52212015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5222
5223 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5224 to after assert checks.
5225
b42945fd
SM
52262015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5227
5228 * proc-service.c (ps_pdread): Add/adjust casts.
5229 (ps_pdwrite): Add/adjust casts.
5230
d6f85c84
SM
52312015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5232
5233 * server.c (handle_search_memory_1): Cast return value of
5234 memmem.
5235
f98cd059
SM
52362015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5237
5238 * server.c (write_qxfer_response): Change type of data to
5239 gdb_byte *.
5240
d2412fa5
PA
52412015-10-29 Pedro Alves <palves@redhat.com>
5242
5243 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5244
c17414a2
PA
52452015-10-29 Pedro Alves <palves@redhat.com>
5246
5247 * tracepoint.c (clear_installed_tracepoints): Add casts.
5248
e053fbc4
PA
52492015-10-29 Pedro Alves <palves@redhat.com>
5250
5251 * server.c (handle_v_cont, process_serial_event): Add enum
5252 gdb_signal casts to signal parsing code.
5253
add67df8
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
50bc912a
PA
52722015-10-29 Pedro Alves <palves@redhat.com>
5273
5274 * linux-low.h (NULL_REGSET): Define.
5275 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5276 * linux-arm-low.c (arm_regsets): Likewise.
5277 * linux-crisv32-low.c (cris_regsets): Likewise.
5278 * linux-m68k-low.c (m68k_regsets): Likewise.
5279 * linux-mips-low.c (mips_regsets): Likewise.
5280 * linux-nios2-low.c (nios2_regsets): Likewise.
5281 * linux-ppc-low.c (ppc_regsets): Likewise.
5282 * linux-s390-low.c (s390_regsets): Likewise.
5283 * linux-sh-low.c (sh_regsets): Likewise.
5284 * linux-sparc-low.c (sparc_regsets): Likewise.
5285 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5286 * linux-tile-low.c (tile_regsets): Likewise.
5287 * linux-x86-low.c (x86_regsets): Likewise.
5288 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5289
682b2546
DE
52902015-10-26 Doug Evans <dje@google.com>
5291
5292 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5293
963843d4
DE
52942015-10-26 Doug Evans <dje@google.com>
5295
5296 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5297
d41401ac
DE
52982015-10-26 Doug Evans <dje@google.com>
5299
5300 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5301 for debug_printf.
5302 (attach_thread, find_new_threads_callback): Ditto.
5303
3db28855
AT
53042015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5305
5306 * mem-break.h (set_breakpoint_data): Remove.
5307
fb78e89c
AT
53082015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5309
5310 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5311 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5312 (initialize_low): Remove set_breakpoint_data call.
5313 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5314 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5315 (initialize_low): Remove set_breakpoint_data call.
5316 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5317 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5318 (initialize_low): Remove set_breakpoint_data call.
5319
2e6ee069
AT
53202015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5321
5322 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5323 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5324 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5325 * target.h (target_breakpoint_kind_from_pc): New macro.
5326
1652a986
AT
53272015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5328
5329 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5330 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5331 the default breakpoint kind.
5332
abeead09
AT
53332015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5334
5335 * linux-arm-low.c (arm_supports_z_point_type): Add software
5336 breakpoint support.
5337
b0b4b501
AT
53382015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5339
5340 * linux-arm-low.c: Refactor breakpoint definitions.
5341 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5342 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5343
8689682c
AT
53442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5345
5346 * Makefile.in: Add arm.c/o.
5347 * configure.srv: Likewise.
5348 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5349 (arm_breakpoint_kind_from_pc): New function.
5350 (arm_sw_breakpoint_from_kind): Return proper kind.
5351 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5352
27165294
AT
53532015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5354
5355 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5356 removal.
5357 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5358 (struct raw_breakpoint) <size>: Remove.
5359 (struct raw_breakpoint) <kind>: Add.
5360 (bp_size): New function.
5361 (bp_opcode): Likewise.
5362 (find_raw_breakpoint_at): Adjust for kind.
5363 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5364 (remove_memory_breakpoint): Adjust for kind call bp_size.
5365 (set_raw_breakpoint_at): Adjust for kind.
5366 (set_breakpoint): Likewise.
5367 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5368 (delete_raw_breakpoint): Adjust for kind.
5369 (delete_breakpoint): Likewise.
5370 (find_gdb_breakpoint): Likewise.
5371 (set_gdb_breakpoint_1): Likewise.
5372 (set_gdb_breakpoint): Likewise.
5373 (delete_gdb_breakpoint_1): Likewise.
5374 (delete_gdb_breakpoint): Likewise.
5375 (uninsert_raw_breakpoint): Likewise.
5376 (reinsert_raw_breakpoint): Likewise.
5377 (set_breakpoint_data): Remove.
5378 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5379 (check_mem_read): Adjust for kind call bp_size.
5380 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5381 (clone_one_breakpoint): Adjust for kind.
5382 * mem-break.h (set_gdb_breakpoint): Likewise.
5383 (delete_gdb_breakpoint): Likewise.
5384 * server.c (process_serial_event): Likewise.
5385
dd373349
AT
53862015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5387
5388 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5389 (struct linux_target_ops) <breakpoint>: Remove.
5390 (struct linux_target_ops) <breakpoint_len>: Remove.
5391 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5392 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5393 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5394 (arm_sw_breakpoint_from_kind): New function.
5395 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5396 (struct linux_target_ops) <breakpoint>: Remove.
5397 (struct linux_target_ops) <breakpoint_len>: Remove.
5398 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5399 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5400 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5401 (struct linux_target_ops) <breakpoint>: Remove.
5402 (struct linux_target_ops) <breakpoint_len>: Remove.
5403 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5404 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5405 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5406 (struct linux_target_ops) <breakpoint>: Remove.
5407 (struct linux_target_ops) <breakpoint_len>: Remove.
5408 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5409 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5410 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5411 and sw_breakpoint_from_kind to increment the pc.
5412 (linux_breakpoint_kind_from_pc): New function.
5413 (linux_sw_breakpoint_from_kind): New function.
5414 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5415 (initialize_low): Call breakpoint_kind_from_pc and
5416 sw_breakpoint_from_kind to replace breakpoint_data/len.
5417 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5418 New field.
5419 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5420 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5421 (struct linux_target_ops) <breakpoint>: Remove.
5422 (struct linux_target_ops) <breakpoint_len>: Remove.
5423 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5424 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5425 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5426 (struct linux_target_ops) <breakpoint>: Remove.
5427 (struct linux_target_ops) <breakpoint_len>: Remove.
5428 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5429 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5430 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5431 (struct linux_target_ops) <breakpoint>: Remove.
5432 (struct linux_target_ops) <breakpoint_len>: Remove.
5433 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5434 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5435 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5436 (struct linux_target_ops) <breakpoint>: Remove.
5437 (struct linux_target_ops) <breakpoint_len>: Remove.
5438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5439 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5440 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5441 (struct linux_target_ops) <breakpoint>: Remove.
5442 (struct linux_target_ops) <breakpoint_len>: Remove.
5443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5445 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5446 (struct linux_target_ops) <breakpoint>: Remove.
5447 (struct linux_target_ops) <breakpoint_len>: Remove.
5448 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5449 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5450 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5451 (struct linux_target_ops) <breakpoint>: Remove.
5452 (struct linux_target_ops) <breakpoint_len>: Remove.
5453 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5455 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5456 (struct linux_target_ops) <breakpoint>: Remove.
5457 (struct linux_target_ops) <breakpoint_len>: Remove.
5458 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5459 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5460 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5461 (struct linux_target_ops) <breakpoint>: Remove.
5462 (struct linux_target_ops) <breakpoint_len>: Remove.
5463 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5464 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5465 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5466 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5467 (struct linux_target_ops) <breakpoint>: Remove.
5468 (struct linux_target_ops) <breakpoint_len>: Remove.
5469 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5470 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5471 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5472 (struct linux_target_ops) <breakpoint>: Remove.
5473 (struct linux_target_ops) <breakpoint_len>: Remove.
5474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5476
4cd98a19
AT
54772015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5478
5479 * linux-cris-low.c (cris_get_pc): Remove void arg.
5480
774ee6d2
AR
54812015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5482
5483 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5484 variable name.
5485
833dcd29
AR
54862015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5487
5488 * inferiors.c (thread_pid_matches_callback): New function.
5489 (find_thread_process): New function.
5490 (remove_thread): Reset current_thread.
5491 (remove_process): Assert threads have been removed first.
5492
8d689ee5
YQ
54932015-10-15 Yao Qi <yao.qi@linaro.org>
5494
5495 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5496 if it is 3.
5497 (aarch64_remove_point): Likewise.
5498 * regcache.c (regcache_register_size): New function.
5499
1c2e1515
YQ
55002015-10-12 Yao Qi <yao.qi@linaro.org>
5501
5502 * linux-aarch64-low.c: Update all callers as emit_load_store
5503 is renamed to aarch64_emit_load_store.
5504
e1c587c3
YQ
55052015-10-12 Yao Qi <yao.qi@linaro.org>
5506
5507 * linux-aarch64-low.c: Update all callers of function renaming
5508 from emit_insn to aarch64_emit_insn.
5509
b6542f81
YQ
55102015-10-12 Yao Qi <yao.qi@linaro.org>
5511
5512 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5513 arch/aarch64-insn.h.
5514 (struct aarch64_memory_operand): Likewise.
5515 (ENCODE): Likewise.
5516 (emit_insn): Move to arch/aarch64-insn.c.
5517 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5518 (emit_load_store): Move to arch/aarch64-insn.c.
5519 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5520 (can_encode_int32): Remove.
5521
246994ce
YQ
55222015-10-12 Yao Qi <yao.qi@linaro.org>
5523
5524 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5525 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5526 (aarch64_relocate_instruction): Likewise.
5527 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5528 (struct aarch64_insn_visitor): Likewise.
5529
0badd99f
YQ
55302015-10-12 Yao Qi <yao.qi@linaro.org>
5531
5532 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5533 (struct aarch64_insn_visitor): New.
5534 (struct aarch64_insn_relocation_data): New.
5535 (aarch64_ftrace_insn_reloc_b): New function.
5536 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5537 (aarch64_ftrace_insn_reloc_cb): Likewise.
5538 (aarch64_ftrace_insn_reloc_tb): Likewise.
5539 (aarch64_ftrace_insn_reloc_adr): Likewise.
5540 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5541 (aarch64_ftrace_insn_reloc_others): Likewise.
5542 (visitor): New.
5543 (aarch64_relocate_instruction): Use visitor.
5544
dfaffe9d
YQ
55452015-10-12 Yao Qi <yao.qi@linaro.org>
5546
5547 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5548 int. Add argument buf.
5549 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5550 aarch64_relocate_instruction.
5551
70b439f0
YQ
55522015-10-12 Yao Qi <yao.qi@linaro.org>
5553
5554 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5555 argument insn. Remove local variable insn. Don't call
5556 target_read_uint32.
5557 (aarch64_install_fast_tracepoint_jump_pad): Call
5558 target_read_uint32.
5559
7781c06f
YQ
55602015-09-30 Yao Qi <yao.qi@linaro.org>
5561
5562 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5563 (emit_load_store_pair): Likewise.
5564
9a3c8263
SM
55652015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5566
5567 * dll.c (match_dll): Add cast(s).
5568 (unloaded_dll): Likewise.
5569 * linux-low.c (second_thread_of_pid_p): Likewise.
5570 (delete_lwp_callback): Likewise.
5571 (count_events_callback): Likewise.
5572 (select_event_lwp_callback): Likewise.
5573 (linux_set_resume_request): Likewise.
5574 * server.c (accumulate_file_name_length): Likewise.
5575 (emit_dll_description): Likewise.
5576 (handle_qxfer_threads_worker): Likewise.
5577 (visit_actioned_threads): Likewise.
5578 * thread-db.c (any_thread_of): Likewise.
5579 * tracepoint.c (same_process_p): Likewise.
5580 (match_blocktype): Likewise.
5581 (build_traceframe_info_xml): Likewise.
5582
224c3ddb
SM
55832015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5584
5585 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5586 assignment.
5587 (gdb_unparse_agent_expr): Likewise.
5588 * hostio.c (require_data): Likewise.
5589 (handle_pread): Likewise.
5590 * linux-low.c (disable_regset): Likewise.
5591 (fetch_register): Likewise.
5592 (store_register): Likewise.
5593 (get_dynamic): Likewise.
5594 (linux_qxfer_libraries_svr4): Likewise.
5595 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5596 (set_fast_tracepoint_jump): Likewise.
5597 (uninsert_fast_tracepoint_jumps_at): Likewise.
5598 (reinsert_fast_tracepoint_jumps_at): Likewise.
5599 (validate_inserted_breakpoint): Likewise.
5600 (clone_agent_expr): Likewise.
5601 * regcache.c (init_register_cache): Likewise.
5602 * remote-utils.c (putpkt_binary_1): Likewise.
5603 (decode_M_packet): Likewise.
5604 (decode_X_packet): Likewise.
5605 (look_up_one_symbol): Likewise.
5606 (relocate_instruction): Likewise.
5607 (monitor_output): Likewise.
5608 * server.c (handle_search_memory): Likewise.
5609 (handle_qxfer_exec_file): Likewise.
5610 (handle_qxfer_libraries): Likewise.
5611 (handle_qxfer): Likewise.
5612 (handle_query): Likewise.
5613 (handle_v_cont): Likewise.
5614 (handle_v_run): Likewise.
5615 (captured_main): Likewise.
5616 * target.c (write_inferior_memory): Likewise.
5617 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5618 * tracepoint.c (init_trace_buffer): Likewise.
5619 (add_tracepoint_action): Likewise.
5620 (add_traceframe): Likewise.
5621 (add_traceframe_block): Likewise.
5622 (cmd_qtdpsrc): Likewise.
5623 (cmd_qtdv): Likewise.
5624 (cmd_qtstatus): Likewise.
5625 (response_source): Likewise.
5626 (response_tsv): Likewise.
5627 (cmd_qtnotes): Likewise.
5628 (gdb_collect): Likewise.
5629 (initialize_tracepoint): Likewise.
5630
afbe19f8
PL
56312015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5632
5633 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5634 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5635 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5636 <NOP>: New.
5637 (enum aarch64_condition_codes): New enum.
5638 (w0): New static global.
5639 (fp): Likewise.
5640 (lr): Likewise.
5641 (struct aarch64_memory_operand) <type>: New
5642 MEMORY_OPERAND_POSTINDEX type.
5643 (postindex_memory_operand): New helper function.
5644 (emit_ret): New function.
5645 (emit_load_store_pair): New function, factored out of emit_stp
5646 with support for MEMORY_OPERAND_POSTINDEX.
5647 (emit_stp): Rewrite using emit_load_store_pair.
5648 (emit_ldp): New function.
5649 (emit_load_store): Likewise.
5650 (emit_ldr): Mention post-index instruction in comment.
5651 (emit_ldrh): New function.
5652 (emit_ldrb): New function.
5653 (emit_ldrsw): Mention post-index instruction in comment.
5654 (emit_str): Likewise.
5655 (emit_subs): New function.
5656 (emit_cmp): Likewise.
5657 (emit_and): Likewise.
5658 (emit_orr): Likewise.
5659 (emit_orn): Likewise.
5660 (emit_eor): Likewise.
5661 (emit_mvn): Likewise.
5662 (emit_lslv): Likewise.
5663 (emit_lsrv): Likewise.
5664 (emit_asrv): Likewise.
5665 (emit_mul): Likewise.
5666 (emit_sbfm): Likewise.
5667 (emit_sbfx): Likewise.
5668 (emit_ubfm): Likewise.
5669 (emit_ubfx): Likewise.
5670 (emit_csinc): Likewise.
5671 (emit_cset): Likewise.
5672 (emit_nop): Likewise.
5673 (emit_ops_insns): New helper function.
5674 (emit_pop): Likewise.
5675 (emit_push): Likewise.
5676 (aarch64_emit_prologue): New function.
5677 (aarch64_emit_epilogue): Likewise.
5678 (aarch64_emit_add): Likewise.
5679 (aarch64_emit_sub): Likewise.
5680 (aarch64_emit_mul): Likewise.
5681 (aarch64_emit_lsh): Likewise.
5682 (aarch64_emit_rsh_signed): Likewise.
5683 (aarch64_emit_rsh_unsigned): Likewise.
5684 (aarch64_emit_ext): Likewise.
5685 (aarch64_emit_log_not): Likewise.
5686 (aarch64_emit_bit_and): Likewise.
5687 (aarch64_emit_bit_or): Likewise.
5688 (aarch64_emit_bit_xor): Likewise.
5689 (aarch64_emit_bit_not): Likewise.
5690 (aarch64_emit_equal): Likewise.
5691 (aarch64_emit_less_signed): Likewise.
5692 (aarch64_emit_less_unsigned): Likewise.
5693 (aarch64_emit_ref): Likewise.
5694 (aarch64_emit_if_goto): Likewise.
5695 (aarch64_emit_goto): Likewise.
5696 (aarch64_write_goto_address): Likewise.
5697 (aarch64_emit_const): Likewise.
5698 (aarch64_emit_call): Likewise.
5699 (aarch64_emit_reg): Likewise.
5700 (aarch64_emit_pop): Likewise.
5701 (aarch64_emit_stack_flush): Likewise.
5702 (aarch64_emit_zero_ext): Likewise.
5703 (aarch64_emit_swap): Likewise.
5704 (aarch64_emit_stack_adjust): Likewise.
5705 (aarch64_emit_int_call_1): Likewise.
5706 (aarch64_emit_void_call_2): Likewise.
5707 (aarch64_emit_eq_goto): Likewise.
5708 (aarch64_emit_ne_goto): Likewise.
5709 (aarch64_emit_lt_goto): Likewise.
5710 (aarch64_emit_le_goto): Likewise.
5711 (aarch64_emit_gt_goto): Likewise.
5712 (aarch64_emit_ge_got): Likewise.
5713 (aarch64_emit_ops_impl): New static global variable.
5714 (aarch64_emit_ops): New target function, return
5715 &aarch64_emit_ops_impl.
5716 (struct linux_target_ops): Install it.
5717
bb903df0
PL
57182015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5719
5720 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5721 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5722 aarch64-ipa.o.
5723 * linux-aarch64-ipa.c: New file.
5724 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5725 and endian.h.
5726 (aarch64_get_thread_area): New target method.
5727 (extract_signed_bitfield): New helper function.
5728 (aarch64_decode_ldr_literal): New function.
5729 (enum aarch64_opcodes): New enum.
5730 (struct aarch64_register): New struct.
5731 (struct aarch64_operand): New struct.
5732 (x0): New static global.
5733 (x1): Likewise.
5734 (x2): Likewise.
5735 (x3): Likewise.
5736 (x4): Likewise.
5737 (w2): Likewise.
5738 (ip0): Likewise.
5739 (sp): Likewise.
5740 (xzr): Likewise.
5741 (aarch64_register): New helper function.
5742 (register_operand): Likewise.
5743 (immediate_operand): Likewise.
5744 (struct aarch64_memory_operand): New struct.
5745 (offset_memory_operand): New helper function.
5746 (preindex_memory_operand): Likewise.
5747 (enum aarch64_system_control_registers): New enum.
5748 (ENCODE): New macro.
5749 (emit_insn): New helper function.
5750 (emit_b): New function.
5751 (emit_bcond): Likewise.
5752 (emit_cb): Likewise.
5753 (emit_tb): Likewise.
5754 (emit_blr): Likewise.
5755 (emit_stp): Likewise.
5756 (emit_ldp_q_offset): Likewise.
5757 (emit_stp_q_offset): Likewise.
5758 (emit_load_store): Likewise.
5759 (emit_ldr): Likewise.
5760 (emit_ldrsw): Likewise.
5761 (emit_str): Likewise.
5762 (emit_ldaxr): Likewise.
5763 (emit_stxr): Likewise.
5764 (emit_stlr): Likewise.
5765 (emit_data_processing_reg): Likewise.
5766 (emit_data_processing): Likewise.
5767 (emit_add): Likewise.
5768 (emit_sub): Likewise.
5769 (emit_mov): Likewise.
5770 (emit_movk): Likewise.
5771 (emit_mov_addr): Likewise.
5772 (emit_mrs): Likewise.
5773 (emit_msr): Likewise.
5774 (emit_sevl): Likewise.
5775 (emit_wfe): Likewise.
5776 (append_insns): Likewise.
5777 (can_encode_int32_in): New helper function.
5778 (aarch64_relocate_instruction): New function.
5779 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5780 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5781 (struct linux_target_ops): Install aarch64_get_thread_area,
5782 aarch64_install_fast_tracepoint_jump_pad and
5783 aarch64_get_min_fast_tracepoint_insn_len.
5784
787749ea
PL
57852015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5786
5787 * Makefile.in (aarch64-insn.o): New rule.
5788 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5789
9812b2e6
YQ
57902015-09-21 Yao Qi <yao.qi@linaro.org>
5791
5792 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5793
18fe412b
YQ
57942015-09-21 Yao Qi <yao.qi@linaro.org>
5795
5796 * tracepoint.c (max_jump_pad_size): Remove.
5797
a0cc84cd
YQ
57982015-09-18 Yao Qi <yao.qi@linaro.org>
5799
5800 * linux-aarch64-low.c: Don't include sys/uio.h.
5801 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5802
d78908cf
WW
58032015-09-16 Wei-cheng Wang <cole945@gmail.com>
5804
5805 * tracepoint.c (eval_result_type): Change prototype.
5806 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5807
d57e0d50
PA
58082015-09-15 Pedro Alves <palves@redhat.com>
5809
5810 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5811 Check whether to report exec events instead of checking whether
5812 multiprocess is enabled.
5813
5a676acc
PA
58142015-09-15 Pedro Alves <palves@redhat.com>
5815
5816 PR remote/18965
5817 * remote-utils.c (prepare_resume_reply): Merge
5818 TARGET_WAITKIND_VFORK_DONE switch case with the
5819 TARGET_WAITKIND_FORKED case.
5820
7c5d0fad
YQ
58212015-09-15 Yao Qi <yao.qi@linaro.org>
5822
5823 * server.c (handle_query): Check string comparison using
5824 "else if" instead of "if".
5825
750ce8d1
YQ
58262015-09-15 Yao Qi <yao.qi@linaro.org>
5827
5828 * server.c (vCont_supported): New global variable.
5829 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5830 matches. Append ";vContSupported+" to own_buf.
5831 (handle_v_requests): Append ";s;S" to own_buf if target supports
5832 hardware single step or vCont_supported is false.
5833 (capture_main): Set vCont_supported to zero.
5834
70b90b91
YQ
58352015-09-15 Yao Qi <yao.qi@linaro.org>
5836
5837 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5838 it to ...
5839 (linux_supports_hardware_single_step): ... New function.
5840 (linux_target_ops): Update.
5841 * lynx-low.c (lynx_target_ops): Set field
5842 supports_hardware_single_step to target_can_do_hardware_single_step.
5843 * nto-low.c (nto_target_ops): Likewise.
5844 * spu-low.c (spu_target_ops): Likewise.
5845 * win32-low.c (win32_target_ops): Likewise.
5846 * target.c (target_can_do_hardware_single_step): New function.
5847 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5848 Remove. <supports_hardware_single_step>: New field.
5849 (target_supports_conditional_breakpoints): Remove.
5850 (target_supports_hardware_single_step): New macro.
5851 (target_can_do_hardware_single_step): Declare.
5852 * server.c (handle_query): Use target_supports_hardware_single_step
5853 instead of target_supports_conditional_breakpoints.
5854
ade90bde
YQ
58552015-09-15 Yao Qi <yao.qi@linaro.org>
5856
5857 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5858 function.
5859 (struct linux_target_ops the_low_target): Install
5860 aarch64_linux_siginfo_fixup.
5861
94585166
DB
58622015-09-11 Don Breazeal <donb@codesourcery.com>
5863 Luis Machado <lgustavo@codesourcery.com>
5864
5865 * linux-low.c (linux_mourn): Static declaration.
5866 (linux_arch_setup): Move in front of
5867 handle_extended_wait.
5868 (linux_arch_setup_thread): New function.
5869 (handle_extended_wait): Handle exec events. Call
5870 linux_arch_setup_thread. Make event_lwp argument a
5871 pointer-to-a-pointer.
5872 (check_zombie_leaders): Do not check stopped threads.
5873 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5874 (linux_low_filter_event): Add lwp and thread for exec'ing
5875 non-leader thread if leader thread has been deleted.
5876 Refactor code into linux_arch_setup_thread and call it.
5877 Pass child lwp pointer by reference to handle_extended_wait.
5878 (linux_wait_for_event_filtered): Update comment.
5879 (linux_wait_1): Prevent clobbering exec event status.
5880 (linux_supports_exec_events): New function.
5881 (linux_target_ops) <supports_exec_events>: Initialize new member.
5882 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5883 new member.
5884 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5885 * server.c (report_exec_events): New global variable.
5886 (handle_query): Handle qSupported query for exec-events feature.
5887 (captured_main): Initialize report_exec_events.
5888 * server.h (report_exec_events): Declare new global variable.
5889 * target.h (struct target_ops) <supports_exec_events>: New
5890 member.
5891 (target_supports_exec_events): New macro.
5892 * win32-low.c (win32_target_ops) <supports_exec_events>:
5893 Initialize new member.
5894
0568462b
MM
58952015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5896
5897 * linux-low.c (linux_low_enable_btrace): Remove.
5898 (linux_target_ops): Replace linux_low_enable_btrace with
5899 linux_enable_btrace.
5900
39edd165
YQ
59012015-09-03 Yao Qi <yao.qi@linaro.org>
5902
5903 * linux-aarch64-low.c (aarch64_insert_point): Call
5904 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5905 returns true.
5906
1db33b5a
UW
59072015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5908
5909 * linux-low.c (check_stopped_by_breakpoint): Use
5910 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5911
ab290430
PA
59122015-08-27 Pedro Alves <palves@redhat.com>
5913
5914 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5915
8d749320
SM
59162015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5917
6711b7f8
SM
5918 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5919 the XNEW-family equivalent.
8d749320
SM
5920 (compile_bytecodes): Likewise.
5921 * dll.c (loaded_dll): Likewise.
5922 * event-loop.c (append_callback_event): Likewise.
5923 (create_file_handler): Likewise.
5924 (create_file_event): Likewise.
5925 * hostio.c (handle_open): Likewise.
5926 * inferiors.c (add_thread): Likewise.
5927 (add_process): Likewise.
5928 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5929 * linux-arm-low.c (arm_new_process): Likewise.
5930 (arm_new_thread): Likewise.
5931 * linux-low.c (add_to_pid_list): Likewise.
5932 (linux_add_process): Likewise.
5933 (handle_extended_wait): Likewise.
5934 (add_lwp): Likewise.
5935 (enqueue_one_deferred_signal): Likewise.
5936 (enqueue_pending_signal): Likewise.
5937 (linux_resume_one_lwp_throw): Likewise.
5938 (linux_resume_one_thread): Likewise.
5939 (linux_read_memory): Likewise.
5940 (linux_write_memory): Likewise.
5941 * linux-mips-low.c (mips_linux_new_process): Likewise.
5942 (mips_linux_new_thread): Likewise.
5943 (mips_add_watchpoint): Likewise.
5944 * linux-x86-low.c (initialize_low_arch): Likewise.
5945 * lynx-low.c (lynx_add_process): Likewise.
5946 * mem-break.c (set_raw_breakpoint_at): Likewise.
5947 (set_breakpoint): Likewise.
5948 (add_condition_to_breakpoint): Likewise.
5949 (add_commands_to_breakpoint): Likewise.
5950 (clone_agent_expr): Likewise.
5951 (clone_one_breakpoint): Likewise.
5952 * regcache.c (new_register_cache): Likewise.
5953 * remote-utils.c (look_up_one_symbol): Likewise.
5954 * server.c (queue_stop_reply): Likewise.
5955 (start_inferior): Likewise.
5956 (queue_stop_reply_callback): Likewise.
5957 (handle_target_event): Likewise.
5958 * spu-low.c (fetch_ppc_memory): Likewise.
5959 (store_ppc_memory): Likewise.
5960 * target.c (set_target_ops): Likewise.
5961 * thread-db.c (thread_db_load_search): Likewise.
5962 (try_thread_db_load_1): Likewise.
5963 * tracepoint.c (add_tracepoint): Likewise.
5964 (add_tracepoint_action): Likewise.
5965 (create_trace_state_variable): Likewise.
5966 (cmd_qtdpsrc): Likewise.
5967 (cmd_qtro): Likewise.
5968 (add_while_stepping_state): Likewise.
5969 * win32-low.c (child_add_thread): Likewise.
5970 (get_image_name): Likewise.
5971
ed8b7b42
YQ
59722015-08-25 Yao Qi <yao.qi@linaro.org>
5973
5974 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5975
db3cb7cb
YQ
59762015-08-25 Yao Qi <yao.qi@linaro.org>
5977
5978 * Makefile.in (aarch64-linux.o): New rule.
5979 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5980 srv_tgtobj.
5981 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5982 (aarch64_init_debug_reg_state): Make it extern.
5983 (aarch64_linux_prepare_to_resume): Remove.
5984
f6011a1c
YQ
59852015-08-25 Yao Qi <yao.qi@linaro.org>
5986
5987 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5988 lwp_arch_private_info and ptid_of_lwp.
5989
88e2cf7e
YQ
59902015-08-25 Yao Qi <yao.qi@linaro.org>
5991
5992 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5993 Find proc_info by find_process_pid. All callers updated.
5994
5e35436e
YQ
59952015-08-25 Yao Qi <yao.qi@linaro.org>
5996
5997 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5998 Remove.
5999 (debug_reg_change_callback): Remove.
6000 (aarch64_notify_debug_reg_change): Remove.
6001
4a8a7965
YQ
60022015-08-25 Yao Qi <yao.qi@linaro.org>
6003
6004 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6005 Call current_lwp_ptid.
6006
32a271ee
YQ
60072015-08-25 Yao Qi <yao.qi@linaro.org>
6008
6009 * linux-aarch64-low.c (debug_reg_change_callback): Use
6010 debug_printf.
6011
0d51c8d7
YQ
60122015-08-25 Yao Qi <yao.qi@linaro.org>
6013
6014 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6015
31a43dd5
YQ
60162015-08-25 Yao Qi <yao.qi@linaro.org>
6017
6018 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6019
8ee52567
YQ
60202015-08-25 Yao Qi <yao.qi@linaro.org>
6021
6022 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6023 the code.
6024
ff3f0f45
YQ
60252015-08-25 Yao Qi <yao.qi@linaro.org>
6026
6027 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6028 Remove.
6029 (debug_reg_change_callback): Remove argument entry and add argument
6030 lwp. Remove local variable thread. Don't print thread id in the
6031 debugging output. Don't check whether pid of thread equals to pid.
6032 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6033 iterate_over_lwps instead find_inferior.
6034
3d40fbb5
PA
60352015-08-24 Pedro Alves <palves@redhat.com>
6036
6037 * inferiors.c (get_first_process): New function.
6038 * inferiors.h (get_first_process): New declaration.
6039 * remote-utils.c (read_ptid): Default to the first process in the
6040 list, instead of to the current thread's process.
6041
438e1e42
PA
60422015-08-24 Pedro Alves <palves@redhat.com>
6043
6044 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6045 * event-loop.c: Likewise.
6046 * remote-utils.c: Likewise.
6047 * tracepoint.c: Likewise.
6048
a8c6d4fc
PA
60492015-08-24 Pedro Alves <palves@redhat.com>
6050
6051 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6052 ptid_get_lwp.
6053
99b0bb12
PA
60542015-08-21 Pedro Alves <palves@redhat.com>
6055
6056 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6057 instead of literal 1.
6058
f8904751
PA
60592015-08-21 Pedro Alves <palves@redhat.com>
6060
6061 * tdesc.c (default_description): Explicitly zero-initialize.
6062
465a859e
PA
60632015-08-21 Pedro Alves <palves@redhat.com>
6064
6065 PR gdb/18749
6066 * inferiors.c (remove_thread): Discard any pending stop reply for
6067 this thread.
6068 * server.c (remove_all_on_match_pid): Rename to ...
6069 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6070 instead of a pid.
6071 (discard_queued_stop_replies): Change parameter to a ptid. Now
6072 extern.
6073 (handle_v_kill, kill_inferior_callback, captured_main)
6074 (process_serial_event): Adjust.
6075 * server.h (discard_queued_stop_replies): Declare.
6076
f0db101d
PA
60772015-08-21 Pedro Alves <palves@redhat.com>
6078
6079 * linux-low.c (wait_for_sigstop): Always switch to no thread
6080 selected if the previously current thread dies.
6081 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6082 process instead of the current thread's.
6083 * remote-utils.c (input_interrupt): Don't check if there's no
6084 current thread.
6085 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6086 current thread to the general thread fails, error out.
6087 (handle_qxfer_auxv, handle_qxfer_libraries)
6088 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6089 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6090 (handle_query): Check if there's a thread selected instead of
6091 checking whether there's any thread in the thread list.
6092 (handle_qxfer_threads, handle_qxfer_btrace)
6093 (handle_qxfer_btrace_conf): Don't error out early if there's no
6094 thread in the thread list.
6095 (handle_v_cont, myresume): Don't set the current thread to the
6096 continue thread.
6097 (process_serial_event) <Hg handling>: Also set thread_id if the
6098 previous general thread is still alive.
6099 (process_serial_event) <g/G handling>: If setting the current
6100 thread to the general thread fails, error out.
6101 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6102 thread's lwp instead of the current thread's.
6103 * target.c (set_desired_thread): If the desired thread was not
6104 found, leave the current thread pointing to NULL. Return an int
6105 (boolean) indicating success.
6106 * target.h (set_desired_thread): Change return type to int.
6107
40045d91
MF
61082015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6109
6110 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6111 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6112 #includes.
6113 (ps_get_thread_area): New function.
6114
45face3b
GB
61152015-08-19 Gary Benson <gbenson@redhat.com>
6116
6117 * hostio.c (handle_pread): Do not attempt to read more data
6118 than hostio_reply_with_data can fit in a packet.
6119
16d5f642
JB
61202015-08-18 Joel Brobecker <brobecker@adacore.com>
6121
6122 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6123
a738da3a
MF
61242015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6125
6126 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6127
33ebda9d
PA
61282015-08-06 Pedro Alves <palves@redhat.com>
6129
6130 * tracepoint.c (expr_eval_result): Now an int.
6131
a44892be
PA
61322015-08-06 Pedro Alves <palves@redhat.com>
6133
6134 * gdbthread.h (struct regcache): Forward declare.
6135 (struct thread_info) <regcache_data>: Now a struct regcache
6136 pointer.
6137 * inferiors.c (inferior_regcache_data)
6138 (set_inferior_regcache_data): Now work with struct regcache
6139 pointers.
6140 * inferiors.h (struct regcache): Forward declare.
6141 (inferior_regcache_data, set_inferior_regcache_data): Now work
6142 with struct regcache pointers.
6143 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6144 (free_register_cache_thread): Remove struct regcache pointer
6145 casts.
6146
608a1e46
PA
61472015-08-06 Pedro Alves <palves@redhat.com>
6148
6149 * server.c (captured_main): On error, print the exception message
6150 to stderr, and if run_once is set, throw a quit.
6151
f0ce0d3a
PA
61522015-08-06 Pedro Alves <palves@redhat.com>
6153
6154 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6155 the current thread.
6156
bf47e248
PA
61572015-08-06 Pedro Alves <palves@redhat.com>
6158
6159 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6160 reading beyond the passed in buffer length.
6161
b6b9ffcc
PL
61622015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6163
6164 * tracepoint.c (symbol_list) <required>: Remove.
6165
863d01bd
PA
61662015-08-06 Pedro Alves <palves@redhat.com>
6167
6168 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6169 count if stopping and suspending threads.
6170 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6171 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6172 (linux_detach): Complete an ongoing step-over.
6173 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6174 throughout.
6175 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6176 (linux_wait_1): If passing a signal to the inferior after
6177 finishing a step-over, unsuspend and re-resume all lwps. If we
6178 see a single-step event but the thread should be continuing, don't
6179 pass the trap to gdb.
6180 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6181 internal_error instead of gdb_assert.
6182 (enqueue_pending_signal): New function.
6183 (check_ptrace_stopped_lwp_gone): Add debug output.
6184 (start_step_over): Use internal_error instead of gdb_assert.
6185 (complete_ongoing_step_over): New function.
6186 (linux_resume_one_thread): Don't resume a suspended thread.
6187 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6188 it stepping.
6189
00db26fa
PA
61902015-08-06 Pedro Alves <palves@redhat.com>
6191
6192 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6193 (linux_thread_alive): Use lwp_is_marked_dead.
6194 (extended_event_reported): Delete.
6195 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6196 instead of extended_event_reported.
6197 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6198 as well.
6199 (lwp_is_marked_dead): New function.
6200 (lwp_running): Use lwp_is_marked_dead.
6201 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6202 comment.
6203
ad071a30
PA
62042015-08-06 Pedro Alves <palves@redhat.com>
6205
6206 * linux-low.c (linux_wait_1): Move fork event output out of the
6207 !report_to_gdb check. Pass event_child->waitstatus to
6208 target_waitstatus_to_string instead of ourstatus.
6209
524b57e6
YQ
62102015-08-04 Yao Qi <yao.qi@linaro.org>
6211
6212 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6213 if current_thread is 32 bit.
6214
6085d6f6
YQ
62152015-08-04 Yao Qi <yao.qi@linaro.org>
6216
6217 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6218 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6219 * server.c (extended_protocol): Remove "static".
6220 * server.h (extended_protocol): Declare it.
6221
8a7e4587
YQ
62222015-08-04 Yao Qi <yao.qi@linaro.org>
6223
6224 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6225 both aarch64 and aarch32.
6226 (aarch64_set_pc): Likewise.
6227
3b53ae99
YQ
62282015-08-04 Yao Qi <yao.qi@linaro.org>
6229
6230 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6231 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6232 arm-with-neon.xml to srv_xmlfiles.
6233 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6234 (is_64bit_tdesc): New function.
6235 (aarch64_linux_read_description): New function.
6236 (aarch64_arch_setup): Call aarch64_linux_read_description.
6237 (regs_info): Rename to regs_info_aarch64.
6238 (aarch64_regs_info): Return right regs_info.
6239 (initialize_low_arch): Call initialize_low_arch_aarch32.
6240
bd9e6534
YQ
62412015-08-04 Yao Qi <yao.qi@linaro.org>
6242
6243 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6244 * linux-aarch32-low.c: New file.
6245 * linux-aarch32-low.h: New file.
6246 * linux-arm-low.c (arm_fill_gregset): Move it to
6247 linux-aarch32-low.c.
6248 (arm_store_gregset): Likewise.
6249 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6250 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6251 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6252 (regs_info): Rename to regs_info_arm.
6253 (arm_regs_info): Return regs_info_aarch32 if
6254 have_ptrace_getregset is 1 and target description is
6255 arm_with_neon or arm_with_vfpv3.
6256 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6257 Call initialize_low_arch_aarch32 instead.
6258
ded48a5e
YQ
62592015-08-04 Yao Qi <yao.qi@linaro.org>
6260
6261 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6262 * linux-low.c: ... here.
6263 * linux-low.h (have_ptrace_getregset): Declare it.
6264
96e9210f
PA
62652015-08-04 Pedro Alves <palves@redhat.com>
6266
6267 * thread-db.c (struct thread_db): Use new typedefs.
6268 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6269 CHK calls.
6270 (disable_thread_event_reporting): Cast result of dlsym to
6271 destination function pointer type.
6272 (thread_db_mourn): Use td_ta_delete_ftype.
6273
af60a1ef
SL
62742015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6275
6276 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6277 arch variant.
6278 (CDX_BREAKPOINT): Define for R2.
6279 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6280 (the_low_target): Add comments.
6281
e8b41681
YQ
62822015-07-30 Yao Qi <yao.qi@linaro.org>
6283
6284 * linux-arm-low.c (arm_hwcap): Remove it.
6285 (arm_read_description): New local variable arm_hwcap. Don't
6286 set arm_hwcap to zero.
6287
89abb039
YQ
62882015-07-30 Yao Qi <yao.qi@linaro.org>
6289
6290 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6291 Use regcache->tdesc instead.
6292 (arm_store_wmmxregset): Likewise.
6293 (arm_fill_vfpregset): Likewise.
6294 (arm_store_vfpregset): Likewise.
6295
deca266c
YQ
62962015-07-30 Yao Qi <yao.qi@linaro.org>
6297
6298 * linux-arm-low.c: Include arch/arm.h.
6299 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6300 (arm_store_gregset): Likewise.
6301
aa58a496
SM
63022015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6303
6304 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6305 ptrace's 4th parameter.
6306
50904b25
YQ
63072015-07-27 Yao Qi <yao.qi@linaro.org>
6308
6309 * configure.srv (case aarch64*-*-linux*): Don't set
6310 srv_linux_usrregs.
6311
5826e159
PA
63122015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6313
6314 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6315 sys/ptrace.h.
6316 * linux-arm-low.c: Likewise.
6317 * linux-cris-low.c: Likewise.
6318 * linux-crisv32-low.c: Likewise.
6319 * linux-low.c: Likewise.
6320 * linux-m68k-low.c: Likewise.
6321 * linux-mips-low.c: Likewise.
6322 * linux-nios2-low.c: Likewise.
6323 * linux-s390-low.c: Likewise.
6324 * linux-sparc-low.c: Likewise.
6325 * linux-tic6x-low.c: Likewise.
6326 * linux-tile-low.c: Likewise.
6327 * linux-x86-low.c: Likewise.
6328
54019719
PA
63292015-07-24 Pedro Alves <palves@redhat.com>
6330
6331 * config.in: Regenerate.
6332 * configure: Regenerate.
6333
eb7aa561
PA
63342015-07-24 Pedro Alves <palves@redhat.com>
6335
6336 * acinclude.m4: Include ../ptrace.m4.
6337 * configure.ac: Call GDB_AC_PTRACE.
6338 * config.in, configure: Regenerate.
6339
55d7b841
YQ
63402015-07-24 Yao Qi <yao.qi@linaro.org>
6341
6342 * linux-low.c (linux_create_inferior): Remove setting to
6343 proc->priv->new_inferior.
6344 (linux_attach): Likewise.
6345 (linux_low_filter_event): Likewise.
6346 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6347
c06cbd92
YQ
63482015-07-24 Yao Qi <yao.qi@linaro.org>
6349
6350 * linux-low.c (linux_arch_setup): New function.
6351 (linux_low_filter_event): If proc->tdesc is NULL and
6352 proc->attached is true, call the_low_target.arch_setup.
6353 Otherwise, keep status pending, and return.
6354 (linux_resume_one_lwp_throw): Don't call get_pc if
6355 thread->while_stepping isn't NULL. Don't call
6356 get_thread_regcache if proc->tdesc is NULL.
6357 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6358 (linux_target_ops): Install arch_setup.
6359 * server.c (start_inferior): Call the_target->arch_setup.
6360 * target.h (struct target_ops) <arch_setup>: New field.
6361 (target_arch_setup): New marco.
6362 * lynx-low.c (lynx_target_ops): Update.
6363 * nto-low.c (nto_target_ops): Update.
6364 * spu-low.c (spu_target_ops): Update.
6365 * win32-low.c (win32_target_ops): Update.
6366
5ae3ebba
YQ
63672015-07-24 Yao Qi <yao.qi@linaro.org>
6368
6369 * linux-low.c (linux_add_process): Don't set
6370 proc->priv->new_inferior.
6371 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6372 (linux_attach): Likewise.
6373
eb97750b
YQ
63742015-07-24 Yao Qi <yao.qi@linaro.org>
6375
6376 * server.c (start_inferior): Code refactor.
6377
51aee833
YQ
63782015-07-24 Yao Qi <yao.qi@linaro.org>
6379
6380 * server.c (process_serial_event): Set general_thread.
6381
af1b22f3
YQ
63822015-07-21 Yao Qi <yao.qi@linaro.org>
6383
6384 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6385 aarch64_linux_get_debug_reg_capacity.
6386
554717a3
YQ
63872015-07-17 Yao Qi <yao.qi@linaro.org>
6388
6389 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6390 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6391 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6392 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6393 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6394 (AARCH64_HWP_ALIGNMENT): Likewise.
6395 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6396 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6397 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6398 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6399 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6400 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6401 (struct aarch64_debug_reg_state): Likewise.
6402 (struct arch_lwp_info): Likewise.
6403 (aarch64_align_watchpoint): Likewise.
6404 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6405 (aarch64_watchpoint_length): Likewise.
6406 (aarch64_point_encode_ctrl_reg): Likewise
6407 (aarch64_point_is_aligned): Likewise.
6408 (aarch64_align_watchpoint): Likewise.
6409 (aarch64_linux_set_debug_regs):
6410 (aarch64_dr_state_insert_one_point): Likewise.
6411 (aarch64_dr_state_remove_one_point): Likewise.
6412 (aarch64_handle_breakpoint): Likewise.
6413 (aarch64_handle_aligned_watchpoint): Likewise.
6414 (aarch64_handle_unaligned_watchpoint): Likewise.
6415 (aarch64_handle_watchpoint): Likewise.
6416
c67ca4de
YQ
64172015-07-17 Yao Qi <yao.qi@linaro.org>
6418
6419 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6420 and don't aarch64_get_debug_reg_state. All callers update.
6421 (aarch64_handle_aligned_watchpoint): Likewise.
6422 (aarch64_handle_unaligned_watchpoint): Likewise.
6423 (aarch64_handle_watchpoint): Likewise.
6424 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6425 (aarch64_remove_point): Likewise.
6426
25abf979
YQ
64272015-07-17 Yao Qi <yao.qi@linaro.org>
6428
6429 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6430 debug_printf.
6431 (aarch64_handle_unaligned_watchpoint): Likewise.
6432
db1ff28b
JK
64332015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6434
6435 Revert the previous 3 commits:
6436 Move gdb_regex* to common/
6437 Move linux_find_memory_regions_full & co.
6438 gdbserver build-id attribute generator
6439
700ca40f
JK
64402015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6441 Jan Kratochvil <jan.kratochvil@redhat.com>
6442
6443 gdbserver build-id attribute generator.
6444 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6445 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6446 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6447 (find_phdr): New.
6448 (get_dynamic): Use find_pdhr to traverse program headers.
6449 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6450 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6451 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6452 (get_hex_build_id): New.
6453 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6454 to reply XML document.
6455
9904185c
JK
64562015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6457 Jan Kratochvil <jan.kratochvil@redhat.com>
6458
6459 * target.c: Include target/target-utils.h and fcntl.h.
6460 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6461 (target_fileio_read_stralloc): New functions.
6462
6e5b4429
JK
64632015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6464
6465 * Makefile.in (OBS): Add gdb_regex.o.
6466 (gdb_regex.o): New.
6467 * config.in: Rebuilt.
6468 * configure: Rebuilt.
6469
ddc98fbf
JK
64702015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6471 Jan Kratochvil <jan.kratochvil@redhat.com>
6472
6473 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6474 * Makefile.in (OBS): Add target-utils.o.
6475 (linux-maps.o, target-utils.o): New.
6476 * configure.srv (srv_linux_obj): Add linux-maps.o.
6477
e57bb7a0
PL
64782015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6479
6480 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6481 function, return 1.
6482 (the_low_target): Install it.
6483
586b02a9
PA
64842015-07-14 Pedro Alves <palves@redhat.com>
6485
6486 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6487 Instead, ignore ECHILD, and throw an error for other errnos.
6488
58c1b36c
PA
64892015-07-10 Pedro Alves <palves@redhat.com>
6490
6491 * event-loop.c (struct callback_event) <data>: Change type to
6492 gdb_client_data instance instead of gdb_client_data pointer.
6493 (append_callback_event): Adjust.
6494
421530db
PL
64952015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6496
6497 * linux-aarch64-low.c: Add comments for each linux_target_ops
6498 method. Remove comments already covered in target_ops and
6499 linux_target_ops definitions.
6500 (the_low_target): Add comments for each unimplemented method.
6501
c2d65f38
YQ
65022015-07-09 Yao Qi <yao.qi@linaro.org>
6503
6504 * linux-aarch64-low.c (aarch64_regmap): Remove.
6505 (aarch64_usrregs_info): Remove.
6506 (regs_info): Set field usrregs to NULL.
6507
b20a6524
MM
65082015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6509
6510 * linux-low.c: Include "rsp-low.h"
6511 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6512 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6513 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6514 (handle_btrace_enable_pt): New.
6515 (handle_btrace_general_set): Support "pt".
6516 (handle_btrace_conf_general_set): Support "pt:size".
6517
96c97461
PL
65182015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6519
6520 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6521 Z_PACKET_SW_BP.
6522
37d66942
PL
65232015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6524
6525 * linux-aarch64-low.c: Remove comment about endianness.
6526 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6527 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6528 memcmp.
6529
dc06243f
GB
65302015-06-24 Gary Benson <gbenson@redhat.com>
6531
6532 * linux-i386-ipa.c (stdint.h): Do not include.
6533 * lynx-i386-low.c (stdint.h): Likewise.
6534 * lynx-ppc-low.c (stdint.h): Likewise.
6535 * mem-break.c (stdint.h): Likewise.
6536 * thread-db.c (stdint.h): Likewise.
6537 * tracepoint.c (stdint.h): Likewise.
6538 * win32-low.c (stdint.h): Likewise.
6539
124e13d9
SM
65402015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6541
6542 * server.c (write_qxfer_response): Update call to
6543 remote_escape_output.
6544
909c2cda
JK
65452015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6546 Jan Kratochvil <jan.kratochvil@redhat.com>
6547
6548 Merge multiple hex conversions.
6549 * gdbreplay.c (tohex): Rename to 'fromhex'.
6550 (logchar): Use fromhex.
6551
24c05f46
JK
65522015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6553
6554 * server.c (handle_qxfer_libraries): Set `version' attribute for
6555 <library-list>.
6556
14d2069a
GB
65572015-06-10 Gary Benson <gbenson@redhat.com>
6558
6559 * target.h (struct target_ops) <multifs_open>: New field.
6560 <multifs_unlink>: Likewise.
6561 <multifs_readlink>: Likewise.
6562 * linux-low.c (nat/linux-namespaces.h): New include.
6563 (linux_target_ops): Initialize the_target->multifs_open,
6564 the_target->multifs_unlink and the_target->multifs_readlink.
6565 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6566 * hostio.c (hostio_fs_pid): New static variable.
6567 (hostio_handle_new_gdb_connection): New function.
6568 (handle_setfs): Likewise.
6569 (handle_open): Use the_target->multifs_open as appropriate.
6570 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6571 (handle_readlink): Use the_target->multifs_readlink as
6572 appropriate.
6573 (handle_vFile): Handle vFile:setfs packets.
6574 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6575 after target_handle_new_gdb_connection.
6576
4b8b5e72
GB
65772015-06-10 Gary Benson <gbenson@redhat.com>
6578
6579 * configure.ac (AC_CHECK_FUNCS): Add setns.
6580 * config.in: Regenerate.
6581 * configure: Likewise.
6582 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6583 (linux-namespaces.o): New rule.
6584 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6585
3ac2e371
GB
65862015-06-09 Gary Benson <gbenson@redhat.com>
6587
6588 * hostio.c (handle_open): Process mode argument with
6589 fileio_to_host_mode.
6590
ca9b78ce
YQ
65912015-06-01 Yao Qi <yao.qi@linaro.org>
6592
6593 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6594 * linux-x86-low.c: Likewise.
6595
bfacd19d
DB
65962015-05-28 Don Breazeal <donb@codesourcery.com>
6597
6598 * linux-low.c (handle_extended_wait): Initialize
6599 thread_info.last_resume_kind for new fork children.
6600
452003ef
PA
66012015-05-15 Pedro Alves <palves@redhat.com>
6602
6603 * target.h (target_handle_new_gdb_connection): Rewrite using if
6604 wrapped in do/while.
6605
1041a03c
JB
66062015-05-14 Joel Brobecker <brobecker@adacore.com>
6607
6608 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6609 * configure, config.in: Regenerate.
6610 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6611 Declare typedef.
6612
c269dbdb
DB
66132015-05-12 Don Breazeal <donb@codesourcery.com>
6614
6615 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6616 PTRACE_EVENT_VFORK_DONE.
6617 (linux_low_ptrace_options, extended_event_reported): Add vfork
6618 events.
6619 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6620 and "vforkdone" for RSP 'T' Stop Reply Packet.
6621 * server.h (report_vfork_events): Declare
6622 global variable.
6623
3a8a0396
DB
66242015-05-12 Don Breazeal <donb@codesourcery.com>
6625
6626 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6627 (the_low_target) <new_fork>: Initialize new member.
6628 * linux-arm-low.c (arm_new_fork): New function.
6629 (the_low_target) <new_fork>: Initialize new member.
6630 * linux-low.c (handle_extended_wait): Call new target function
6631 new_fork.
6632 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6633 * linux-mips-low.c (mips_add_watchpoint): New function
6634 extracted from mips_insert_point.
6635 (the_low_target) <new_fork>: Initialize new member.
6636 (mips_linux_new_fork): New function.
6637 (mips_insert_point): Call mips_add_watchpoint.
6638 * linux-x86-low.c (x86_linux_new_fork): New function.
6639 (the_low_target) <new_fork>: Initialize new member.
6640
de0d863e
DB
66412015-05-12 Don Breazeal <donb@codesourcery.com>
6642
6643 * linux-low.c (handle_extended_wait): Implement return value,
6644 rename argument 'event_child' to 'event_lwp', handle
6645 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6646 (linux_low_ptrace_options): New function.
6647 (linux_low_filter_event): Call linux_low_ptrace_options,
6648 use different argument fo linux_enable_event_reporting,
6649 use return value from handle_extended_wait.
6650 (extended_event_reported): New function.
6651 (linux_wait_1): Call extended_event_reported and set
6652 status to report fork events.
6653 (linux_write_memory): Add pid to debug message.
6654 (reset_lwp_ptrace_options_callback): New function.
6655 (linux_handle_new_gdb_connection): New function.
6656 (linux_target_ops): Initialize new structure member.
6657 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6658 * lynx-low.c: Initialize new structure member.
6659 * remote-utils.c (prepare_resume_reply): Implement stop reason
6660 "fork" for "T" stop message.
6661 * server.c (handle_query): Call handle_new_gdb_connection.
6662 * server.h (report_fork_events): Declare global flag.
6663 * target.h (struct target_ops) <handle_new_gdb_connection>:
6664 New member.
6665 (target_handle_new_gdb_connection): New macro.
6666 * win32-low.c: Initialize new structure member.
6667
ddcbc397
DB
66682015-05-12 Don Breazeal <donb@codesourcery.com>
6669
6670 * mem-break.c (APPEND_TO_LIST): Define macro.
6671 (clone_agent_expr): New function.
6672 (clone_one_breakpoint): New function.
6673 (clone_all_breakpoints): New function.
6674 * mem-break.h: Declare new functions.
6675
89245bc0
DB
66762015-05-12 Don Breazeal <donb@codesourcery.com>
6677
6678 * linux-low.c (linux_supports_fork_events): New function.
6679 (linux_supports_vfork_events): New function.
6680 (linux_target_ops): Initialize new structure members.
6681 (initialize_low): Call linux_check_ptrace_features.
6682 * lynx-low.c (lynx_target_ops): Initialize new structure
6683 members.
6684 * server.c (report_fork_events, report_vfork_events):
6685 New global flags.
6686 (handle_query): Add new features to qSupported packet and
6687 response.
6688 (captured_main): Initialize new global variables.
6689 * target.h (struct target_ops) <supports_fork_events>:
6690 New member.
6691 <supports_vfork_events>: New member.
6692 (target_supports_fork_events): New macro.
6693 (target_supports_vfork_events): New macro.
6694 * win32-low.c (win32_target_ops): Initialize new structure
6695 members.
6696
835205d0
GB
66972015-05-12 Gary Benson <gbenson@redhat.com>
6698
6699 * server.c (handle_qxfer_exec_file): Use current process
6700 if annex is empty.
6701
21e94bd9
SL
67022015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6703
6704 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6705 Remove HAVE_PTRACE_GETREGS conditionals.
6706 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6707 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6708
45614f15
YQ
67092015-05-08 Yao Qi <yao.qi@linaro.org>
6710
6711 * linux-low.c (linux_supports_conditional_breakpoints): New
6712 function.
6713 (linux_target_ops): Install new target method.
6714 * lynx-low.c (lynx_target_ops): Install NULL hook for
6715 supports_conditional_breakpoints.
6716 * nto-low.c (nto_target_ops): Likewise.
6717 * spu-low.c (spu_target_ops): Likewise.
6718 * win32-low.c (win32_target_ops): Likewise.
6719 * server.c (handle_query): Check
6720 target_supports_conditional_breakpoints.
6721 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6722 New field.
6723 (target_supports_conditional_breakpoints): New macro.
6724
80ad801e
PA
67252015-05-06 Pedro Alves <palves@redhat.com>
6726
6727 PR server/18081
6728 * server.c (start_inferior): If the process exits, mourn it.
6729
819843c7
GB
67302015-04-21 Gary Benson <gbenson@redhat.com>
6731
6732 * hostio.c (fileio_open_flags_to_host): Factored out to
6733 fileio_to_host_openflags in common/fileio.c. Single use
6734 updated.
6735
a2d5a9d7
MF
67362015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6737
6738 * linux-xtensa-low.c (xtensa_fill_gregset)
6739 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6740 XCHAL_HAVE_LOOP.
6741
deb44829
MF
67422015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6743
6744 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6745 (regs_info): Replace usrregs pointer with NULL.
6746
e57f1de3
GB
67472015-04-17 Gary Benson <gbenson@redhat.com>
6748
6749 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6750 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6751 * server.c (handle_qxfer_exec_file): New function.
6752 (qxfer_packets): Add exec-file entry.
6753 (handle_query): Report qXfer:exec-file:read as supported packet.
6754
62828379
RN
67552015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6756
6757 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6758
b88bb450
GB
67592015-04-09 Gary Benson <gbenson@redhat.com>
6760
6761 * hostio-errno.c (errno_to_fileio_error): Remove function.
6762 Update caller to use remote_fileio_to_fio_error.
6763
c8f4bfdd
YQ
67642015-04-09 Yao Qi <yao.qi@linaro.org>
6765
6766 * linux-low.c (linux_insert_point): Call
6767 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6768 (linux_remove_point): Call remove_memory_breakpoint if type is
6769 raw_bkpt_type_sw.
6770 * linux-x86-low.c (x86_insert_point): Don't call
6771 insert_memory_breakpoint.
6772 (x86_remove_point): Don't call remove_memory_breakpoint.
6773
41f98f02
PA
67742015-04-01 Pedro Alves <palves@redhat.com>
6775 Cleber Rosa <crosa@redhat.com>
6776
6777 * server.c (gdbserver_usage): Reorganize and extend the usage
6778 message.
6779
2bf6fb9d
PA
67802015-03-24 Pedro Alves <palves@redhat.com>
6781
6782 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6783 output. Also dump TRAP_TRACE.
6784 (linux_low_filter_event): In debug output, distinguish a
6785 resume_stop SIGSTOP from a delayed SIGSTOP.
6786
369f6daa
GB
67872015-03-24 Gary Benson <gbenson@redhat.com>
6788
6789 * linux-x86-low.c (x86_linux_new_thread): Moved to
6790 nat/x86-linux.c.
6791 (x86_linux_prepare_to_resume): Likewise.
6792
8e5d4070
GB
67932015-03-24 Gary Benson <gbenson@redhat.com>
6794
6795 * Makefile.in (x86-linux-dregs.o): New rule.
6796 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6797 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6798 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6799 (x86_linux_dr_get): Likewise.
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_update_debug_registers): Likewise.
6808
2b95d440
GB
68092015-03-24 Gary Benson <gbenson@redhat.com>
6810
6811 * linux-x86-low.c (x86_linux_update_debug_registers):
6812 New function, factored out from...
6813 (x86_linux_prepare_to_resume): ...this.
6814
14b0bc68
GB
68152015-03-24 Gary Benson <gbenson@redhat.com>
6816
6817 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6818 (x86_linux_dr_set): Likewise.
6819 (update_debug_registers_callback): Likewise.
6820 (x86_linux_dr_set_addr): Likewise.
6821 (x86_linux_dr_get_addr): Likewise.
6822 (x86_linux_dr_set_control): Likewise.
6823 (x86_linux_dr_get_control): Likewise.
6824 (x86_linux_dr_get_status): Likewise.
6825 (x86_linux_prepare_to_resume): Likewise.
6826
5dfe6ca8
GB
68272015-03-24 Gary Benson <gbenson@redhat.com>
6828
6829 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6830 Use perror_with_name. Pass string through gettext.
6831 (x86_linux_dr_set): Likewise.
6832
d33472ad
GB
68332015-03-24 Gary Benson <gbenson@redhat.com>
6834
6835 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6836 (x86_linux_dr_set_addr): ...this.
6837 (x86_dr_low_get_addr): Rename to...
6838 (x86_linux_dr_get_addr): ...this.
6839 (x86_dr_low_set_control): Rename to...
6840 (x86_linux_dr_set_control): ...this.
6841 (x86_dr_low_get_control): Rename to...
6842 (x86_linux_dr_get_control): ...this.
6843 (x86_dr_low_get_status): Rename to...
6844 (x86_linux_dr_get_status): ...this.
6845 (x86_dr_low): Update with new function names.
6846
4b134ca1
GB
68472015-03-24 Gary Benson <gbenson@redhat.com>
6848
6849 * Makefile.in (x86-linux.o): New rule.
6850 * configure.srv: Add x86-linux.o to relevant targets.
6851 * linux-low.c (lwp_set_arch_private_info): New function.
6852 (lwp_arch_private_info): Likewise.
6853 * linux-x86-low.c: Include nat/x86-linux.h.
6854 (arch_lwp_info): Removed structure.
6855 (update_debug_registers_callback):
6856 Use lwp_set_debug_registers_changed.
6857 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6858 and lwp_set_debug_registers_changed.
6859 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6860
34c703da
GB
68612015-03-24 Gary Benson <gbenson@redhat.com>
6862
6863 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6864 * linux-arm-low.c (arm_new_thread): Likewise.
6865 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6866 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6867 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6868 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6869
cff068da
GB
68702015-03-24 Gary Benson <gbenson@redhat.com>
6871
6872 * linux-low.c (ptid_of_lwp): New function.
6873 (lwp_is_stopped): Likewise.
6874 (lwp_stop_reason): Likewise.
6875 * linux-x86-low.c (update_debug_registers_callback):
6876 Use lwp_is_stopped.
6877 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6878 lwp_stop_reason.
6879
b2f7c7e8
GB
68802015-03-24 Gary Benson <gbenson@redhat.com>
6881
6882 * linux-low.h (linux_stop_lwp): Remove declaration.
6883
6d4ee8c6
GB
68842015-03-24 Gary Benson <gbenson@redhat.com>
6885
6886 * linux-low.h: Include nat/linux-nat.h.
6887 * linux-low.c (iterate_over_lwps_args): New structure.
6888 (iterate_over_lwps_filter): New function.
6889 (iterate_over_lwps): Likewise.
6890 * linux-x86-low.c (update_debug_registers_callback):
6891 Update signature to what iterate_over_lwps expects.
6892 Remove PID check that iterate_over_lwps now performs.
6893 (x86_dr_low_set_addr): Use iterate_over_lwps.
6894 (x86_dr_low_set_control): Likewise.
6895
70a0bb6b
GB
68962015-03-24 Gary Benson <gbenson@redhat.com>
6897
6898 * linux-x86-low.c (x86_debug_reg_state): New function.
6899 (x86_linux_prepare_to_resume): Use the above.
6900
7b669087
GB
69012015-03-24 Gary Benson <gbenson@redhat.com>
6902
6903 * linux-low.c (current_lwp_ptid): New function.
6904 * linux-x86-low.c: Include nat/linux-nat.h.
6905 (x86_dr_low_get_addr): Use current_lwp_ptid.
6906 (x86_dr_low_get_control): Likewise.
6907 (x86_dr_low_get_status): Likewise.
6908
eef49a3d
PA
69092015-03-20 Pedro Alves <palves@redhat.com>
6910
6911 * tracepoint.c (cmd_qtstatus): Make "str" const.
6912
b2333d22
PA
69132015-03-20 Pedro Alves <palves@redhat.com>
6914
6915 * server.c (handle_general_set): Make "req_str" const.
6916
23f238d3
PA
69172015-03-19 Pedro Alves <palves@redhat.com>
6918
6919 * linux-low.c (linux_resume_one_lwp): Rename to ...
6920 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6921 instead call perror_with_name.
6922 (check_ptrace_stopped_lwp_gone): New function.
6923 (linux_resume_one_lwp): Reimplement as wrapper around
6924 linux_resume_one_lwp_throw that swallows errors if the LWP is
6925 gone.
6926
91baf43f
PA
69272015-03-19 Pedro Alves <palves@redhat.com>
6928
6929 * linux-low.c (count_events_callback, select_event_lwp_callback):
6930 No longer check whether the thread has resume_stop as last resume
6931 kind.
6932
8bf3b159
PA
69332015-03-19 Pedro Alves <palves@redhat.com>
6934
6935 * linux-low.c (count_events_callback, select_event_lwp_callback):
6936 Use the lwp's status_pending_p field, not the thread's.
6937
b90fc188
PA
69382015-03-19 Pedro Alves <palves@redhat.com>
6939
6940 * linux-low.c (select_event_lwp_callback): Update comments to
6941 no longer mention SIGTRAP.
6942
464b0089
GB
69432015-03-18 Gary Benson <gbenson@redhat.com>
6944
6945 * server.c (handle_query): Do not report vFile:fstat as supported.
6946
aa9e327f
GB
69472015-03-11 Gary Benson <gbenson@redhat.com>
6948
6949 * hostio.c (sys/types.h): New include.
6950 (sys/stat.h): Likewise.
6951 (common-remote-fileio.h): Likewise.
6952 (handle_fstat): New function.
6953 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6954
791c0056
GB
69552015-03-11 Gary Benson <gbenson@redhat.com>
6956
6957 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6958 struct stat.st_blocks and struct stat.st_blksize.
6959 * configure: Regenerate.
6960 * config.in: Likewise.
6961 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6962 (OBS): Add common-remote-fileio.o.
6963 (common-remote-fileio.o): New rule.
6964
9a9df970
PA
69652015-03-09 Pedro Alves <palves@redhat.com>
6966
6967 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6968 'struct sockaddr' pointer in 'accept' call.
6969
9eb1356e
PA
69702015-03-09 Pedro Alves <palves@redhat.com>
6971
6972 Revert:
6973 2015-03-07 Pedro Alves <palves@redhat.com>
6974 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6975 or <winsock2.h> here. Instead include "gdb_socket.h".
6976 (remote_open): Use union gdb_sockaddr_u.
6977 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6978 or <winsock2.h> here. Instead include "gdb_socket.h".
6979 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6980 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6981 or <sys/un.h>.
6982 (init_named_socket, gdb_agent_helper_thread): Use union
6983 gdb_sockaddr_u.
6984
aac331e4
PA
69852015-03-07 Pedro Alves <palves@redhat.com>
6986
6987 * configure.ac (build_warnings): Move
6988 -Wdeclaration-after-statement to the C-specific set.
6989 * configure: Regenerate.
6990
366c75fc
PA
69912015-03-07 Pedro Alves <palves@redhat.com>
6992
6993 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6994 or <winsock2.h> here. Instead include "gdb_socket.h".
6995 (remote_open): Use union gdb_sockaddr_u.
6996 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6997 or <winsock2.h> here. Instead include "gdb_socket.h".
6998 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6999 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7000 or <sys/un.h>.
7001 (init_named_socket, gdb_agent_helper_thread): Use union
7002 gdb_sockaddr_u.
7003
492d29ea
PA
70042015-03-07 Pedro Alves <palves@redhat.com>
7005
7006 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7007 instead.
7008
60a191ed
YQ
70092015-03-06 Yao Qi <yao.qi@linaro.org>
7010
7011 * linux-aarch64-low.c (aarch64_insert_point): Use
7012 show_debug_regs as a boolean.
7013 (aarch64_remove_point): Likewise.
7014
f5771b1d
PA
70152015-03-05 Pedro Alves <palves@redhat.com>
7016
7017 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7018 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7019 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7020 * nto-low.c (nto_target_ops): Likewise.
7021 * spu-low.c (spu_target_ops): Likewise.
7022 * win32-low.c (win32_target_ops): Likewise.
7023
3e572f71
PA
70242015-03-04 Pedro Alves <palves@redhat.com>
7025
72f4393d 7026 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7027 Decide whether a breakpoint triggered based on the SIGTRAP's
7028 siginfo.si_code.
72f4393d
L
7029 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7030 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7031 (linux_low_filter_event): Check for breakpoints before checking
7032 watchpoints.
7033 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7034 siginfo.si_code.
72f4393d
L
7035 (linux_stopped_by_sw_breakpoint)
7036 (linux_supports_stopped_by_sw_breakpoint)
7037 (linux_stopped_by_hw_breakpoint)
7038 (linux_supports_stopped_by_hw_breakpoint): New functions.
7039 (linux_target_ops): Install new target methods.
3e572f71 7040
1ec68e26
PA
70412015-03-04 Pedro Alves <palves@redhat.com>
7042
7043 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7044 * server.c (swbreak_feature, hwbreak_feature): New globals.
7045 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7046 (captured_main): Clear swbreak_feature and hwbreak_feature.
7047 * server.h (swbreak_feature, hwbreak_feature): Declare.
7048 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7049 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7050 supports_stopped_by_hw_breakpoint>: New fields.
7051 (target_supports_stopped_by_sw_breakpoint)
7052 (target_stopped_by_sw_breakpoint)
7053 (target_supports_stopped_by_hw_breakpoint)
7054 (target_stopped_by_hw_breakpoint): Declare.
7055
15c66dd6
PA
70562015-03-04 Pedro Alves <palves@redhat.com>
7057
7058 enum lwp_stop_reason -> enum target_stop_reason
7059 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7060 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7061 (linux_wait_1, stuck_in_jump_pad_callback)
7062 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7063 (linux_stopped_by_watchpoint):
7064 * linux-low.h (enum lwp_stop_reason): Delete.
7065 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7066 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7067
98fc70d6
YQ
70682015-03-04 Yao Qi <yao.qi@linaro.org>
7069
7070 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7071
dd2ac174
GB
70722015-03-03 Gary Benson <gbenson@redhat.com>
7073
7074 * hostio.c (handle_vFile): Fix prefix lengths.
7075
d68e53f4
MM
70762015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7077
7078 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7079 ptr_bits.
7080
bf2d68ab
AA
70812015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7082
7083 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7084 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7085 (clean): Add "rm -f" for above C files.
7086 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7087 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7088 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7089 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7090 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7091 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7092 (init_registers_s390x_vx_linux64)
7093 (init_registers_s390x_tevx_linux64)
7094 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7095 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7096 declarations.
7097 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7098 (s390_store_vxrs_high): New functions.
7099 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7100 NT_S390_VXRS_HIGH.
7101 (s390_arch_setup): Add logic for selecting one of the new target
7102 descriptions. Activate the new vector regsets if applicable.
7103 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7104 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7105 and init_registers_s390x_tevx_linux64.
7106
c966a859
PA
71072015-03-01 Pedro Alves <palves@redhat.com>
7108
7109 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7110 parameter.
7111
4180215b
PA
71122015-02-27 Pedro Alves <palves@redhat.com>
7113
7114 * linux-x86-low.c (u_debugreg_offset): New function.
7115 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7116
749bab01
PA
71172015-02-27 Pedro Alves <palves@redhat.com>
7118
7119 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7120 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7121 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7122 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7123 (ps_lsetfpregs, ps_getpid)
7124 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7125 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7126 (ps_lsetxregs, ps_plog): Declare.
7127
3c14e5a3
PA
71282015-02-27 Pedro Alves <palves@redhat.com>
7129
7130 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7131 IP_AGENT_EXPORT_FUNC.
7132 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7133 IP_AGENT_EXPORT_FUNC.
7134 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7135 (IP_AGENT_EXPORT): Delete.
7136 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7137 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7138 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7139 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7140 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7141 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7142 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7143 (traceframe_read_count, traceframe_write_count)
7144 (traceframes_created, trace_state_variables, get_raw_reg)
7145 (get_trace_state_variable_value, set_trace_state_variable_value)
7146 (ust_loaded, helper_thread_id, cmd_buf): Use
7147 IPA_SYM_EXPORTED_NAME.
7148 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7149 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7150 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7151 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7152 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7153 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7154 EXTERN_C_PUSH/EXTERN_C_POP.
7155 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7156 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7157 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7158 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7159 (traceframe_write_count, traceframe_read_count)
7160 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7161 (about_to_request_buffer_space, get_trace_state_variable_value)
7162 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7163 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7164 EXTERN_C_PUSH/EXTERN_C_POP.
7165 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7166 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7167 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7168 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7169 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7170 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7171 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7172 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7173 Define.
7174 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7175 (IP_AGENT_EXPORT_VAR_DECL): Define.
7176 (tracing): Declare.
7177 (gdb_agent_get_raw_reg): Declare.
7178
fe978cb0
PA
71792015-02-27 Tom Tromey <tromey@redhat.com>
7180 Pedro Alves <palves@redhat.com>
7181
7182 Rename symbols whose names are reserved C++ keywords throughout.
7183
3bc3d82a
PA
71842015-02-27 Pedro Alves <palves@redhat.com>
7185
7186 * Makefile.in (COMPILER): New, get it from autoconf.
7187 (CXX): Get from autoconf instead.
7188 (COMPILE.pre): Use COMPILER.
7189 (CC-LD): Rename to ...
7190 (CC_LD): ... this. Use COMPILER.
7191 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7192 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7193 * acinclude.m4: Include build-with-cxx.m4.
7194 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7195 Disable -Werror by default if building in C++ mode.
7196 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7197 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7198 the C++ compiler. Save/restore CXXFLAGS too.
7199 * configure: Regenerate.
7200
07697489
PA
72012015-02-27 Pedro Alves <palves@redhat.com>
7202
7203 * acinclude.m4: Include libiberty.m4.
7204 * configure.ac: Call libiberty_INIT.
7205 * config.in, configure: Regenerate.
7206
9beb7c4e
PA
72072015-02-26 Pedro Alves <palves@redhat.com>
7208
7209 * linux-low.c (linux_wait_1): When incrementing the PC past a
7210 program breakpoint always use the_low_target.breakpoint_len as
7211 increment, rather than the maximum between that and
7212 the_low_target.decr_pc_after_break.
7213
8090aef2
PA
72142015-02-23 Pedro Alves <palves@redhat.com>
7215
7216 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7217 thread was doing a step-over; always adjust the PC if
7218 we stepped over a permanent breakpoint.
7219 (linux_wait_1): If we stepped over breakpoint that was on top of a
7220 permanent breakpoint, manually advance the PC past it.
7221
bc9540e8
PA
72222015-02-23 Pedro Alves <palves@redhat.com>
7223
7224 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7225 modes.
7226 (x86_fill_gregset, x86_store_gregset): Use it when handling
7227 $orig_eax.
7228
2db9a427
PA
72292015-02-20 Pedro Alves <palves@redhat.com>
7230
7231 * thread-db.c: Include "nat/linux-procfs.h".
7232 (thread_db_init): Skip listing new threads if the kernel supports
7233 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7234
afa8d396
PA
72352015-02-20 Pedro Alves <palves@redhat.com>
7236
7237 * linux-low.c (status_pending_p_callback): Use ptid_match.
7238
c9587f88
AT
72392015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7240
7241 PR breakpoints/16812
7242 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7243 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7244 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7245
b05ec7a5
AT
72462015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7247
7248 PR breakpoints/15956
7249 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7250
d33501a5
MM
72512015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7252
7253 * linux-low.c (linux_low_btrace_conf): Print size.
7254 * server.c (handle_btrace_conf_general_set): New.
7255 (hanle_general_set): Call handle_btrace_conf_general_set.
7256 (handle_query): Report Qbtrace-conf:bts:size as supported.
7257
f4abbc16
MM
72582015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7259
7260 * linux-low.c (linux_low_enable_btrace): Update parameters.
7261 (linux_low_btrace_conf): New.
7262 (linux_target_ops)<to_btrace_conf>: Initialize.
7263 * server.c (current_btrace_conf): New.
7264 (handle_btrace_enable): Rename to ...
7265 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7266 to target_enable_btrace. Update comment. Update users.
7267 (handle_qxfer_btrace_conf): New.
7268 (qxfer_packets): Add btrace-conf entry.
7269 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7270 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7271 (target_ops)<read_btrace_conf>: New.
7272 (target_enable_btrace): Update parameters.
7273 (target_read_btrace_conf): New.
7274
043c3577
MM
72752015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7276
7277 * server.c (handle_btrace_general_set): Remove call to
7278 target_supports_btrace.
7279 (supported_btrace_packets): New.
7280 (handle_query): Call supported_btrace_packets.
7281 * target.h: include btrace-common.h.
7282 (btrace_target_info): Removed.
7283 (supports_btrace, target_supports_btrace): Update parameters.
7284
734b0e4b
MM
72852015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7286
7287 * Makefile.in (SFILES): Add common/btrace-common.c.
7288 (OBS): Add common/btrace-common.o.
7289 (btrace-common.o): Add build rules.
7290 * linux-low: Include btrace-common.h.
7291 (linux_low_read_btrace): Use struct btrace_data. Call
7292 btrace_data_init and btrace_data_fini.
7293
d6c146e9
PA
72942015-02-06 Pedro Alves <palves@redhat.com>
7295
7296 * thread-db.c (find_new_threads_callback): Add debug output.
7297
20ba1ce6
PA
72982015-02-04 Pedro Alves <palves@redhat.com>
7299
7300 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7301 (resume_stopped_resumed_lwps): New function.
7302 (linux_wait_for_event_filtered): Use it.
7303
8cc73a39
SDJ
73042015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7305
7306 * Makefile.in (SFILES): Add linux-personality.c.
7307 (linux-personality.o): New rule.
7308 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7309 list of objects to be built.
7310 * linux-low.c: Include nat/linux-personality.h.
7311 (linux_create_inferior): Remove code to disable address space
7312 randomization (moved to ../nat/linux-personality.c). Create
7313 cleanup to disable address space randomization.
7314
fb23d554
SDJ
73152015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7316
7317 * Makefile.in (posix-strerror.o): New rule.
7318 (mingw-strerror.o): Likewise.
7319 * configure: Regenerated.
7320 * configure.ac: Source file ../common/common.host. Initialize new
7321 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7322
cdf43629
YQ
73232015-01-14 Yao Qi <yao@codesourcery.com>
7324
7325 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7326 (ppc-linux.o): New rule.
7327 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7328 * configure.ac: AC_CHECK_FUNCS(getauxval).
7329 * config.in: Re-generated.
7330 * configure: Re-generated.
7331 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7332 ppc64_64bit_inferior_p
7333
514c5338
YQ
73342015-01-14 Yao Qi <yao@codesourcery.com>
7335
7336 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7337 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7338 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7339 (PT_ORIG_R3, PT_TRAP): Likewise.
7340 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7341 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7342 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7343
3368c1e5
JB
73442015-01-10 Joel Brobecker <brobecker@adacore.com>
7345
7346 * i387-fp.c (i387_cache_to_xsave): In look over
7347 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7348 zmmh_low_space field by use of zmmh_high_space.
7349
582511be
PA
73502015-01-09 Pedro Alves <palves@redhat.com>
7351
7352 * linux-low.c (step_over_bkpt): Move higher up in the file.
7353 (handle_extended_wait): Don't store the stop_pc here.
7354 (get_stop_pc): Adjust comments and rename to ...
7355 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7356 stopped for a software breakpoint or hardware breakpoint.
7357 (thread_still_has_status_pending_p): New function.
7358 (status_pending_p_callback): Use
7359 thread_still_has_status_pending_p. If the event is no longer
7360 interesting, resume the LWP.
7361 (handle_tracepoints): Add assert.
7362 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7363 (wstatus_maybe_breakpoint): New function.
7364 (cancel_breakpoint): Delete function.
7365 (check_stopped_by_watchpoint): New function, factored out from
7366 linux_low_filter_event.
7367 (lp_status_maybe_breakpoint): Delete function.
7368 (linux_low_filter_event): Remove filter_ptid argument.
7369 Leave thread group exits pending here. Store the LWP's stop PC.
7370 Always leave events pending.
7371 (linux_wait_for_event_filtered): Pull all events out of the
7372 kernel, and leave them all pending.
7373 (count_events_callback, select_event_lwp_callback): Consider all
7374 events.
7375 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7376 (select_event_lwp): Only give preference to the stepping LWP in
7377 all-stop mode. Adjust comments.
7378 (ignore_event): New function.
7379 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7380 references to cancel_breakpoints. Adjust to renames. Also give
7381 equal priority to all LWPs that have had events in non-stop mode.
7382 If reporting a software breakpoint event, unadjust the LWP's PC.
7383 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7384 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7385 Adjust.
7386 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7387 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7388 (linux_stopped_by_watchpoint): Adjust.
7389 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7390 * linux-low.h (enum lwp_stop_reason): New.
7391 (struct lwp_info) <stop_pc>: Adjust comment.
7392 <stopped_by_watchpoint>: Delete field.
7393 <stop_reason>: New field.
7394 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7395 * mem-break.c (software_breakpoint_inserted_here)
7396 (hardware_breakpoint_inserted_here): New function.
7397 * mem-break.h (software_breakpoint_inserted_here)
7398 (hardware_breakpoint_inserted_here): Declare.
7399 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7400 (cancel_breakpoints): Delete.
7401 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7402 (upload_fast_traceframes): Remove references to
7403 cancel_breakpoints.
7404
a33e3959
PA
74052015-01-09 Pedro Alves <palves@redhat.com>
7406
7407 * thread-db.c (find_new_threads_callback): Ignore thread if the
7408 kernel thread ID is -1.
7409
8784d563
PA
74102015-01-09 Pedro Alves <palves@redhat.com>
7411
7412 * linux-low.c (linux_attach_fail_reason_string): Move to
7413 nat/linux-ptrace.c, and rename.
7414 (linux_attach_lwp): Update comment.
7415 (attach_proc_task_lwp_callback): New function.
7416 (linux_attach): Adjust to rename and use
7417 linux_proc_attach_tgid_threads.
7418 (linux_attach_fail_reason_string): Delete declaration.
7419
76f2b779
JB
74202015-01-01 Joel Brobecker <brobecker@adacore.com>
7421
7422 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7423 * server.c (gdbserver_version): Likewise.
7424
fafcc06a
SDJ
74252014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7426
7427 * remote-utils.c: Include ctype.h.
7428 (input_interrupt): Explicitly handle the case when the char
7429 received is the NUL byte. Improve the printing of non-ASCII
7430 characters.
7431
beed38b8
JB
74322014-12-16 Joel Brobecker <brobecker@adacore.com>
7433
7434 * linux-low.c (linux_low_filter_event): Update call to
7435 linux_enable_event_reporting following the addition of
7436 a new parameter to that function.
7437
bf330350
CU
74382014-12-16 Catalin Udma <catalin.udma@freescale.com>
7439
7440 PR server/17457
7441 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7442 (AARCH64_FPCR_REGNO): Likewise.
7443 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7444 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7445 (aarch64_store_fpregset): Likewise.
7446
5227d625
JB
74472014-12-15 Joel Brobecker <brobecker@adacore.com>
7448
7449 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7450 Remove FIXME comment about assumption about N.
7451
f93b65a0
JB
74522014-12-13 Joel Brobecker <brobecker@adacore.com>
7453
7454 * configure.ac: If large-file support is disabled in GDBserver,
7455 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7456 * configure: Regenerate.
7457
e5a9158d
AA
74582014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7459
7460 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7461 warning upon ENODATA from ptrace.
7462 * linux-s390-low.c (s390_store_tdb): New.
7463 (s390_regsets): Add regset for NT_S390_TDB.
7464
feea5f36
AA
74652014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7466
7467 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7468 without a fill_function.
7469 * linux-s390-low.c (s390_fill_last_break): Remove.
7470 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7471 (s390_arch_setup): Use regset's size instead of fill_function for
7472 loop end condition.
7473
098dbe61
AA
74742014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7475
7476 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7477 the regset's store function when ptrace returned an error.
7478 * regcache.c (get_thread_regcache): Invalidate register cache
7479 before fetching inferior's registers.
7480
28eef672
AA
74812014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7482
7483 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7484 while-loop as for-loop.
7485 (regsets_store_inferior_registers): Likewise.
7486
bdca27a2
YQ
74872014-11-28 Yao Qi <yao@codesourcery.com>
7488
7489 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7490 * config.in, configure: Re-generate.
7491 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7492 is defined.
7493
9c232dda
YQ
74942014-11-21 Yao Qi <yao@codesourcery.com>
7495
7496 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7497 (AC_CHECK_HEADERS): Remove malloc.h.
7498 * configure: Re-generated.
7499 * config.in: Re-generated.
7500 * server.h: Don't include alloca.h and malloc.h.
7501 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7502 Don't include malloc.h.
7503
43968415
JB
75042014-11-17 Joel Brobecker <brobecker@adacore.com>
7505
7506 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7507 corresponding ERRNO check in same block.
7508
40e91bc7
PA
75092014-11-12 Pedro Alves <palves@redhat.com>
7510
7511 * server.c (cont_thread): Update comment.
7512 (start_inferior, attach_inferior): No longer clear cont_thread.
7513 (handle_v_cont): No longer set cont_thread.
7514 (captured_main): Clear cont_thread each time a GDB connects.
7515
c2c118cf
PA
75162014-11-12 Pedro Alves <palves@redhat.com>
7517
7518 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7519 thread, and don't resume all threads if the Hc thread has exited.
7520
78708b7c
PA
75212014-11-12 Pedro Alves <palves@redhat.com>
7522
7523 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7524 the process group instead of to a specific LWP.
7525
a2abc7de
PA
75262014-10-15 Pedro Alves <palves@redhat.com>
7527
7528 PR server/17487
7529 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7530 parameter.
7531 (arm_set_thread_context): Delete.
7532 (the_low_target): Adjust.
7533 * win32-i386-low.c (debug_registers_changed)
7534 (debug_registers_used): Delete.
7535 (update_debug_registers_callback): New function.
7536 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7537 needing to update their debug registers.
7538 (win32_get_current_dr): New function.
7539 (x86_dr_low_get_addr, x86_dr_low_get_control)
7540 (x86_dr_low_get_status): Fetch the debug register from the thread
7541 record's context.
7542 (i386_initial_stuff): Adjust.
7543 (i386_get_thread_context): Remove current_event parameter. Don't
7544 clear debug_registers_changed nor copy DR values to
7545 debug_reg_state.
7546 (i386_set_thread_context): Delete.
7547 (i386_prepare_to_resume): New function.
7548 (i386_thread_added): Mark the thread as needing to update irs
7549 debug registers.
7550 (the_low_target): Remove i386_set_thread_context and install
7551 i386_prepare_to_resume.
7552 * win32-low.c (win32_get_thread_context): Adjust.
7553 (win32_set_thread_context): Use SetThreadContext
7554 directly.
7555 (win32_prepare_to_resume): New function.
7556 (win32_require_context): New function, factored out from ...
7557 (thread_rec): ... this.
7558 (continue_one_thread): Call win32_prepare_to_resume on each thread
7559 we're about to continue.
7560 (win32_resume): Call win32_prepare_to_resume on the event thread.
7561 * win32-low.h (struct win32_thread_info)
7562 <debug_registers_changed>: New field.
7563 (struct win32_target_ops): Change prototype of set_thread_context,
7564 delete set_thread_context and add prepare_to_resume.
7565 (win32_require_context): New declaration.
7566
a442d071
GB
75672014-10-08 Gary Benson <gbenson@redhat.com>
7568
7569 * server.h: Do not include common-exceptions.h.
7570
6f1947e8
GB
75712014-10-08 Gary Benson <gbenson@redhat.com>
7572
7573 * server.h: Do not include cleanups.h.
7574
63b434a4
JH
75752014-09-30 James Hogan <james.hogan@imgtec.com>
7576
7577 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7578 mips64-dsp-linux.c.
7579
c4d9ceb6
YQ
75802014-09-23 Yao Qi <yao@codesourcery.com>
7581
7582 * linux-low.c (lp_status_maybe_breakpoint): New function.
7583 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7584 (count_events_callback): Likewise.
7585 (select_event_lwp_callback): Likewise.
7586 (cancel_breakpoints_callback): Likewise.
7587
89a5711c
DB
75882014-09-19 Don Breazeal <donb@codesourcery.com>
7589
7590 * linux-low.c (handle_extended_wait): Call
7591 linux_ptrace_get_extended_event.
7592 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7593 linux_is_extended_waitstatus.
7594
bffc0964
JB
75952014-09-16 Joel Brobecker <brobecker@adacore.com>
7596
7597 * Makefile.in (CPPFLAGS): Define.
7598 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7599 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7600
0bfdf32f
GB
76012014-09-16 Gary Benson <gbenson@redhat.com>
7602
7603 * inferiors.h (current_inferior): Renamed as...
7604 (current_thread): New variable. All uses updated.
7605 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7606 (maybe_move_out_of_jump_pad): Likewise.
7607 (cancel_breakpoint): Likewise.
7608 (linux_low_filter_event): Likewise.
7609 (wait_for_sigstop): Likewise.
7610 (linux_resume_one_lwp): Likewise.
7611 (need_step_over_p): Likewise.
7612 (start_step_over): Likewise.
7613 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7614 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7615 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7616 and save_inferior as saved_thread.
7617 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7618 saved_thread.
7619 (regcache_invalidate_thread): Likewise.
7620 * remote-utils.c (prepare_resume_reply): Likewise.
7621 * thread-db.c (thread_db_get_tls_address): Likewise.
7622 (disable_thread_event_reporting): Likewise.
7623 (remove_thread_event_breakpoints): Likewise.
7624 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7625 as saved_thread.
7626 * target.h (set_desired_inferior): Renamed as...
7627 (set_desired_thread): New declaration. All uses updated.
7628 * server.c (myresume): Updated comment to reference thread instead
7629 of inferior.
7630 (handle_serial_event): Likewise.
7631 (handle_target_event): Likewise.
7632
361c8ade
GB
76332014-09-12 Tom Tromey <tromey@redhat.com>
7634 Gary Benson <gbenson@redhat.com>
7635
7636 * regcache.h: Include common-regcache.h.
7637 (regcache_read_pc): Don't declare.
7638 * regcache.c (get_thread_regcache_for_ptid): New function.
7639
bd9269f7
GB
76402014-09-11 Tom Tromey <tromey@redhat.com>
7641 Gary Benson <gbenson@redhat.com>
7642
7643 * symbol.c: New file.
7644 * Makefile.in (SFILES): Add symbol.c.
7645 (OBS): Add symbol.o.
7646
f8c1d06b
GB
76472014-09-11 Gary Benson <gbenson@redhat.com>
7648
7649 * target.c (target_stop_ptid, target_continue_ptid): New
7650 functions.
7651
721ec300
GB
76522014-09-11 Tom Tromey <tromey@redhat.com>
7653 Gary Benson <gbenson@redhat.com>
7654
7655 * target.h: Include target/target.h.
7656 * target.c (target_read_memory, target_read_uint32)
7657 (target_write_memory): New functions.
7658
c5e92cca
GB
76592014-09-11 Gary Benson <gbenson@redhat.com>
7660
7661 * server.h (debug_hw_points): Don't declare.
7662 * server.c (debug_hw_points): Don't define. Replace all uses
7663 with show_debug_regs.
7664 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7665 all uses with show_debug_regs.
7666
2e4bb98a
EBM
76672014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7668
7669 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7670 endianness into account.
7671 (ppc_supply_ptrace_register): Likewise.
7672
ac740bc7
JH
76732014-09-03 James Hogan <james.hogan@imgtec.com>
7674
7675 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7676 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7677
97ea6506
GB
76782014-09-03 Gary Benson <gbenson@redhat.com>
7679
7680 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7681 ALL_DEBUG_ADDRESS_REGISTERS.
7682
df7e5265
GB
76832014-09-02 Gary Benson <gbenson@redhat.com>
7684
7685 * i386-low.h: Renamed as...
7686 * x86-low.h: New file. All type, function and variable name
7687 prefixes changed from "i386_" to "x86_". All references updated.
7688 * i386-low.c: Renamed as...
7689 * x86-low.c: New file. All type, function and variable name
7690 prefixes changed from "i386_" to "x86_". All references updated.
7691
ed859da7
GB
76922014-09-02 Gary Benson <gbenson@redhat.com>
7693
7694 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7695 (x86_linux_new_thread): Likewise.
7696
860789c7
GB
76972014-08-29 Gary Benson <gbenson@redhat.com>
7698
7699 * server.h (setjmp.h): Do not include.
7700 (toplevel): Do not declare.
7701 (common-exceptions.h): Include.
7702 (cleanups.h): Likewise.
7703 * server.c (toplevel): Do not define.
7704 (exit_code): New static global.
7705 (detach_or_kill_for_exit_cleanup): New function.
7706 (main): New function. Original main renamed to...
7707 (captured_main): New function.
7708 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7709
ff55e1b5
GB
77102014-08-29 Gary Benson <gbenson@redhat.com>
7711
7712 * Makefile.in (SFILES): Add common/common-exceptions.c.
7713 (OBS): Add common-exceptions.o.
7714 (common-exceptions.o): New rule.
7715 * utils.c (prepare_to_throw_exception): New function.
7716
e9bcb658
GB
77172014-08-29 Gary Benson <gbenson@redhat.com>
7718
7719 * config.in: Regenerate.
7720 * configure: Likewise.
7721
e3180625
GB
77222014-08-29 Gary Benson <gbenson@redhat.com>
7723
7724 * Makefile.in (SFILES): Add common/cleanups.c.
7725 (OBS): cleanups.o.
7726 (cleanups.o): New rule.
7727
e3d6ba5d
GB
77282014-08-29 Gary Benson <gbenson@redhat.com>
7729
7730 * utils.c (internal_vwarning): New function.
7731
7096e886
GB
77322014-08-28 Gary Benson <gbenson@redhat.com>
7733
7734 * utils.h (fatal): Remove declaration.
7735 * utils.c (fatal): Remove function.
7736
14ce3192
GB
77372014-08-28 Gary Benson <gbenson@redhat.com>
7738
7739 * tracepoint.c (gdb_agent_init): Replace fatal with
7740 perror_with_name.
7741 (initialize_tracepoint): Likewise.
7742
50278d59
GB
77432014-08-28 Gary Benson <gbenson@redhat.com>
7744
7745 * remote-utils.c (remote_prepare): Replace fatal with error.
7746
aa96c426
GB
77472014-08-28 Gary Benson <gbenson@redhat.com>
7748
7749 * linux-low.c (linux_async): Replace fatal with warning.
7750 Tidy up and return.
7751 (linux_start_non_stop): Return -1 if linux_async failed.
7752
f7160e97
GB
77532014-08-28 Gary Benson <gbenson@redhat.com>
7754
7755 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7756 gdb_assert.
7757 (i386_dr_low_get_addr): Remove vague comment.
7758 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7759 gdb_assert.
7760
38e08fca
GB
77612014-08-28 Gary Benson <gbenson@redhat.com>
7762
7763 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7764 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7765 internal_error.
7766 (linux_resume_one_lwp): Likewise.
7767 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7768 gdb_assert.
7769 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7770 with internal_error.
7771 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7772 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7773 (find_register_by_name): Replace fatal with internal_error.
7774 (find_regno): Likewise.
7775 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7776 * thread-db.c (thread_db_create_event): Likewise.
7777 (thread_db_load_search): Likewise.
7778 (try_thread_db_load_1): Likewise.
7779 * tracepoint.c (get_jump_space_head): Replace fatal with
7780 internal_error.
7781 (claim_trampoline_space): Likewise.
7782 (have_fast_tracepoint_trampoline_buffer): Likewise.
7783 (cmd_qtstart): Likewise.
7784 (stop_tracing): Likewise.
7785 (fast_tracepoint_collecting): Likewise.
7786 (target_malloc): Likewise.
7787 (download_tracepoint): Likewise.
7788 (download_trace_state_variables): Replace check with gdb_assert.
7789 (upload_fast_traceframes): Replace fatal with internal_error.
7790
34abf635
GB
77912014-08-19 Tom Tromey <tromey@redhat.com>
7792 Gary Benson <gbenson@redhat.com>
7793
7794 * Makefile.in (SFILES): Add common/common-debug.c.
7795 (OBS): Add common-debug.o.
7796 (common-debug.o): New rule.
7797 * debug.h (debug_printf): Don't declare.
7798 * debug.c (debug_printf): Renamed and rewritten as...
7799 (debug_vprintf): New function.
7800
f6e94d78
GB
78012014-08-19 Gary Benson <gbenson@redhat.com>
7802
7803 * utils.h: Do not include print-utils.h.
7804
9239eeab
GB
78052014-08-19 Tom Tromey <tromey@redhat.com>
7806 Gary Benson <gbenson@redhat.com>
7807
7808 * server.h: Add static assertion.
7809 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7810
ef87c8bb
GB
78112014-08-19 Tom Tromey <tromey@redhat.com>
7812 Gary Benson <gbenson@redhat.com>
7813
7814 * Makefile.in (SFILES): Add common/errors.c.
7815 (OBS): Add errors.o.
7816 (IPA_OBS): Add errors-ipa.o.
7817 (errors.o): New rule.
7818 (errors-ipa.o): Likewise.
7819 * utils.h (perror_with_name, error, warning): Don't declare.
7820 * utils.c (warning): Renamed and rewritten as...
7821 (vwarning): New function.
7822 (error): Renamed and rewritten as...
7823 (verror): New function.
7824 (internal_error): Renamed and rewritten as...
7825 (internal_verror): New function.
7826
bb974a24
GB
78272014-08-07 Gary Benson <gbenson@redhat.com>
7828
7829 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7830 * configure: Regenerate.
7831 * config.in: Likewise.
7832 * server.h: Do not include errno.h.
7833 * event-loop.c: Likewise.
7834 * hostio-errno.c: Likewise.
7835 * linux-low.c: Likewise.
7836 * remote-utils.c: Likewise.
7837 * spu-low.c: Likewise.
7838 * utils.c: Likewise.
7839 * gdbreplay.c: Unconditionally include errno.h.
7840
6d3d12eb
GB
78412014-08-07 Gary Benson <gbenson@redhat.com>
7842
7843 * server.h: Do not include string.h.
7844 * event-loop.c: Likewise.
7845 * linux-low.c: Likewise.
7846 * regcache.c: Likewise.
7847 * remote-utils.c: Likewise.
7848 * spu-low.c: Likewise.
7849 * utils.c: Likewise.
7850
dccbb609
GB
78512014-08-07 Gary Benson <gbenson@redhat.com>
7852
7853 * server.h: Do not include gdb_assert.h.
7854
e76df0d0
GB
78552014-08-07 Gary Benson <gbenson@redhat.com>
7856
7857 * server.h: Do not include common-utils.h.
7858
4cb9c816
GB
78592014-08-07 Gary Benson <gbenson@redhat.com>
7860
7861 * server.h: Do not include ptid.h.
7862 * notif.h: Likewise.
7863
3995eeee
GB
78642014-08-07 Gary Benson <gbenson@redhat.com>
7865
7866 * server.h: Do not include gdb_locale.h.
7867
cb9f1a9b
GB
78682014-08-07 Gary Benson <gbenson@redhat.com>
7869
7870 * server.h: Do not include gdb/signals.h.
7871 * win32-low.c: Likewise.
7872
a5fceff8
GB
78732014-08-07 Gary Benson <gbenson@redhat.com>
7874
7875 * server.h: Do not include pathmax.h.
7876
b9391142
GB
78772014-08-07 Gary Benson <gbenson@redhat.com>
7878
7879 * server.h: Do not include libiberty.h.
7880 * linux-bfin-low.c: Likewise.
7881
0e443c87
GB
78822014-08-07 Gary Benson <gbenson@redhat.com>
7883
7884 * server.h: Do not include ansidecl.h.
7885
8ebb3f56
GB
78862014-08-07 Gary Benson <gbenson@redhat.com>
7887
7888 * linux-x86-low.c: Do not include stddef.h.
7889 * lynx-ppc-low.c: Likewise.
7890 * tracepoint.c: Likewise.
7891
8980bdf6
GB
78922014-08-07 Gary Benson <gbenson@redhat.com>
7893
7894 * server.h: Do not include stdarg.h.
7895 * nto-low.c: Likewise.
7896
d7096f71
GB
78972014-08-07 Gary Benson <gbenson@redhat.com>
7898
7899 * server.h: Do not include stdlib.h.
7900 * inferiors.c: Likewise.
7901 * linux-low.c: Likewise.
7902 * regcache.c: Likewise.
7903 * spu-low.c: Likewise.
7904 * tracepoint.c: Likewise.
7905 * utils.c: Likewise.
7906
d02f550d
GB
79072014-08-07 Gary Benson <gbenson@redhat.com>
7908
7909 * server.h: Do not include stdio.h.
7910 * linux-low.c: Likewise.
7911 * remote-utils.c: Likewise.
7912 * spu-low.c: Likewise.
7913 * utils.c: Likewise.
7914 * wincecompat.c: Likewise.
7915
87f6c4e3
GB
79162014-08-06 Gary Benson <gbenson@redhat.com>
7917
7918 * regcache.c (init_register_cache): Move conditionals inside if.
7919
7089dca4
GB
79202014-08-06 Gary Benson <gbenson@redhat.com>
7921
7922 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7923
462f517e
GB
79242014-07-31 Gary Benson <gbenson@redhat.com>
7925
7926 * ax.h: Do not include server.h.
7927 * gdbthread.h: Likewise.
7928 * lynx-low.h: Likewise.
7929 * notif.h: Likewise.
7930
976411d6
GB
79312014-07-30 Gary Benson <gbenson@redhat.com>
7932
7933 * server.h: Include common-defs.h.
7934 Do not include config.h or build-gnulib-gdbserver/config.h.
7935
d41f6d8e
GB
79362014-07-30 Gary Benson <gbenson@redhat.com>
7937
7938 * hostio-errno.c: Move server.h to top of includes list.
7939 * inferiors.c: Likewise.
7940 * linux-x86-low.c: Likewise.
7941 * notif.c: Include server.h.
7942
314c6a35
TT
79432014-07-24 Tom Tromey <tromey@redhat.com>
7944 Gary Benson <gbenson@redhat.com>
7945
7946 * server.h (CORE_ADDR): Now unsigned.
7947
69ff6be5
PA
79482014-07-16 Pedro Alves <palves@redhat.com>
7949
7950 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7951
ce9e3fe7
PA
79522014-07-15 Pedro Alves <palves@redhat.com>
7953
7954 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7955 copy.
7956
e76126e8
PA
79572014-07-11 Pedro Alves <palves@redhat.com>
7958
7959 * linux-low.c (kill_wait_lwp): New function, based on
7960 kill_one_lwp_callback, but use my_waitpid directly.
7961 (kill_one_lwp_callback, linux_kill): Use it.
7962
8e9db26e
PA
79632014-06-23 Pedro Alves <palves@redhat.com>
7964
7965 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7966 before setting DR0..DR3.
7967
698b3e08
GB
79682014-06-20 Gary Benson <gbenson@redhat.com>
7969
7970 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7971 * configure: Regenerated.
7972 * config.in: Likewise.
7973
125f8a3d
GB
79742014-06-20 Gary Benson <gbenson@redhat.com>
7975
7976 * Makefile.in (SFILES): Update locations for files moved
7977 from common to nat.
7978 (object file files): Reordered.
7979
42995dbd
GB
79802014-06-20 Gary Benson <gbenson@redhat.com>
7981
7982 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7983 (i386_dr_low_set_addr): Likewise.
7984 (i386_dr_low_get_addr): Likewise.
7985 (i386_dr_low_can_set_control): Likewise.
7986 (i386_dr_low_set_control): Likewise.
7987 (i386_dr_low_get_control): Likewise.
7988 (i386_dr_low_get_status): Likewise.
7989 (i386_get_debug_register_length): Likewise.
7990 * linux-x86-low.c (i386_dr_low_set_addr):
7991 Changed signature. Made static.
7992 (i386_dr_low_get_addr): Likewise.
7993 (i386_dr_low_set_control): Likewise.
7994 (i386_dr_low_get_control): Likewise.
7995 (i386_dr_low_get_status): Likewise.
7996 (i386_dr_low): New global variable.
7997 * win32-i386-low.c (i386_dr_low_set_addr):
7998 Changed signature. Made static.
7999 (i386_dr_low_get_addr): Likewise.
8000 (i386_dr_low_set_control): Likewise.
8001 (i386_dr_low_get_control): Likewise.
8002 (i386_dr_low_get_status): Likewise.
8003 (i386_dr_low): New global variable.
8004
e1d2394b
MS
80052014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8006
8007 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8008 * Makefile.in (AR, AR_FLAGS): Define.
8009 * configure: Regenerate.
8010
3a8ee006
GB
80112014-06-19 Gary Benson <gbenson@redhat.com>
8012
8013 * Makefile.in (i386-dregs.o): New rule.
8014 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8015 * i386-low.c (target.h): Remove include.
8016 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8017 (DR_CONTROL_SHIFT): Likewise.
8018 (DR_CONTROL_SIZE): Likewise.
8019 (DR_RW_EXECUTE): Likewise.
8020 (DR_RW_WRITE): Likewise.
8021 (DR_RW_READ): Likewise.
8022 (DR_RW_IORW): Likewise.
8023 (DR_LEN_1): Likewise.
8024 (DR_LEN_2): Likewise.
8025 (DR_LEN_4): Likewise.
8026 (DR_LEN_8): Likewise.
8027 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8028 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8029 (DR_ENABLE_SIZE): Likewise.
8030 (DR_LOCAL_SLOWDOWN): Likewise.
8031 (DR_GLOBAL_SLOWDOWN): Likewise.
8032 (DR_CONTROL_RESERVED): Likewise.
8033 (I386_DR_CONTROL_MASK): Likewise.
8034 (I386_DR_VACANT): Likewise.
8035 (I386_DR_LOCAL_ENABLE): Likewise.
8036 (I386_DR_GLOBAL_ENABLE): Likewise.
8037 (I386_DR_DISABLE): Likewise.
8038 (I386_DR_SET_RW_LEN): Likewise.
8039 (I386_DR_GET_RW_LEN): Likewise.
8040 (I386_DR_WATCH_HIT): Likewise.
8041 (i386_wp_op_t): Likewise.
8042 (i386_show_dr): Likewise.
8043 (i386_length_and_rw_bits): Likewise.
8044 (i386_insert_aligned_watchpoint): Likewise.
8045 (i386_remove_aligned_watchpoint): Likewise.
8046 (i386_handle_nonaligned_watchpoint): Likewise.
8047 i386_update_inferior_debug_regs(): Likewise.
8048 (i386_dr_insert_watchpoint): Likewise.
8049 (i386_dr_remove_watchpoint): Likewise.
8050 (i386_dr_region_ok_for_watchpoint): Likewise.
8051 (i386_dr_stopped_data_address): Likewise.
8052 (i386_dr_stopped_by_watchpoint): Likewise.
8053
8f26655c
GB
80542014-06-19 Gary Benson <gbenson@redhat.com>
8055
8056 * i386-low.c (i386_dr_show): Renamed to
8057 i386_show_dr and made static. All uses updated.
8058 (i386_dr_length_and_rw_bits): Renamed to
8059 i386_length_and_rw_bits and made static.
8060 All uses updated.
8061 (i386_dr_insert_aligned_watchpoint): Renamed to
8062 i386_insert_aligned_watchpoint and made static.
8063 All uses updated.
8064 (i386_dr_remove_aligned_watchpoint): Renamed to
8065 i386_remove_aligned_watchpoint and made static.
8066 All uses updated.
8067 (i386_dr_update_inferior_debug_regs): Renamed to
8068 i386_update_inferior_debug_regs and made static.
8069 All uses updated.
8070
b9228891
GB
80712014-06-18 Gary Benson <gbenson@redhat.com>
8072
5171def3
GB
8073 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8074 (i386_dr_low_can_set_control): Likewise.
8075 (i386_get_debug_register_length): Likewise.
8076 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8077 (i386_dr_low_can_set_control): Likewise.
8078 (i386_get_debug_register_length): Likewise.
8079
80802014-06-17 Gary Benson <gbenson@redhat.com>
8081
b9228891
GB
8082 * i386-low.h (i386-dregs.h): New include.
8083 (DR_FIRSTADDR): Now in i386-dregs.h.
8084 (DR_LASTADDR): Likewise.
8085 (DR_NADDR): Likewise.
8086 (DR_STATUS): Likewise.
8087 (DR_CONTROL): Likewise.
8088 (i386_debug_reg_state): Likewise.
8089 (i386_dr_insert_watchpoint): Likewise.
8090 (i386_dr_remove_watchpoint): Likewise.
8091 (i386_dr_region_ok_for_watchpoint): Likewise.
8092 (i386_dr_stopped_data_address): Likewise.
8093 (i386_dr_stopped_by_watchpoint): Likewise.
8094 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8095
4be83cc2
GB
80962014-06-18 Gary Benson <gbenson@redhat.com>
8097
8098 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8099 i386_dr_insert_watchpoint.
8100 (i386_low_remove_watchpoint): Renamed to
8101 i386_dr_remove_watchpoint.
8102 (i386_low_region_ok_for_watchpoint): Renamed to
8103 i386_dr_region_ok_for_watchpoint.
8104 (i386_low_stopped_data_address): Renamed to
8105 i386_dr_stopped_data_address.
8106 (i386_low_stopped_by_watchpoint): Renamed to
8107 i386_dr_stopped_by_watchpoint.
8108 * i386-low.c (i386_show_dr): Renamed to
8109 i386_dr_show and made nonstatic. All uses updated.
8110 (i386_length_and_rw_bits): Renamed to
8111 i386_dr_length_and_rw_bits and made nonstatic.
8112 All uses updated.
8113 (i386_insert_aligned_watchpoint): Renamed to
8114 i386_dr_insert_aligned_watchpoint and made nonstatic.
8115 All uses updated.
8116 (i386_remove_aligned_watchpoint): Renamed to
8117 i386_dr_remove_aligned_watchpoint and made nonstatic.
8118 All uses updated.
8119 (i386_update_inferior_debug_regs): Renamed to
8120 i386_dr_update_inferior_debug_regs and made nonstatic.
8121 All uses updated.
8122 (i386_low_insert_watchpoint): Renamed to
8123 i386_dr_insert_watchpoint. All uses updated.
8124 (i386_low_remove_watchpoint): Renamed to
8125 i386_dr_remove_watchpoint. All uses updated.
8126 (i386_low_region_ok_for_watchpoint): Renamed to
8127 i386_dr_region_ok_for_watchpoint. All uses updated.
8128 (i386_low_stopped_data_address): Renamed to
8129 i386_dr_stopped_data_address. All uses updated.
8130 (i386_low_stopped_by_watchpoint): Renamed to
8131 i386_dr_stopped_by_watchpoint. All uses updated.
8132
131aa0d4
GB
81332014-06-18 Gary Benson <gbenson@redhat.com>
8134
8135 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8136 (i386_dr_low_can_set_control): Likewise.
8137 (i386_insert_aligned_watchpoint): New check.
8138
d9305f7f
GB
81392014-06-18 Gary Benson <gbenson@redhat.com>
8140
8141 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8142 Renamed to state.
8143
e927c9fc
GB
81442014-06-18 Gary Benson <gbenson@redhat.com>
8145
8146 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8147 instead of fatal and error.
8148 (i386_handle_nonaligned_watchpoint): Likewise.
8149
1b6d4134
GB
81502014-06-18 Gary Benson <gbenson@redhat.com>
8151
8152 * i386-low.c (i386_get_debug_register_length): New macro.
8153 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8154 (i386_show_dr): Use debug_printf instead of fprintf. Use
8155 phex to format values.
8156
6e62758f
GB
81572014-06-18 Gary Benson <gbenson@redhat.com>
8158
8159 * i386-low.h: Comment changes.
8160 * i386-low.c: Likewise.
8161
fc6e2f03
GB
81622014-06-18 Gary Benson <gbenson@redhat.com>
8163
8164 * i386-low.c: Whitespace changes.
8165
f9d1eeed
TT
81662014-06-12 Tom Tromey <tromey@redhat.com>
8167
8168 * utils.c (freeargv): Remove.
8169
0b04e523
TT
81702014-06-12 Tom Tromey <tromey@redhat.com>
8171
8172 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8173 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8174 (parse_debug_format_options): Likewise.
8175 (gdbserver_usage): Likewise.
8176 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8177 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8178 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8179 against libiberty.
8180 ($(LIBGNU)): Depend on libiberty.
8181 (all-lib): Recurse into all subdirs.
8182 (install-only): Invoke "install" target in subdirs.
8183 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8184 targets.
8185 * configure: Rebuild.
8186 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8187 for vasprintf, vsnprintf, or gettimeofday.
8188 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8189 srv_tgtobj.
8190
270c9937
JB
81912014-06-05 Joel Brobecker <brobecker@adacore.com>
8192
8193 * development.sh: Delete.
8194 * Makefile.in (config.status): Adjust dependency on development.sh.
8195 * configure.ac: Adjust development.sh source call.
8196 * configure: Regenerate.
8197
0a261ed8
PA
81982014-06-02 Pedro Alves <palves@redhat.com>
8199
8200 * ax.c (gdb_free_agent_expr): New function.
8201 * ax.h (gdb_free_agent_expr): New declaration.
8202 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8203 list.
8204 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8205 static.
8206 (clear_breakpoint_conditions_and_commands): New function.
8207 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8208 (clear_breakpoint_conditions_and_commands): New declaration.
8209
e9dae05e
RR
82102014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8211
8212 * linux-aarch64-low.c (asm/ptrace.h): Include.
8213
5876f503
JK
82142014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8215
8216 Fix TLS access for -static -pthread.
8217 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8218 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8219 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8220
802e8e6d
PA
82212014-05-20 Pedro Alves <palves@redhat.com>
8222
8223 * linux-aarch64-low.c (aarch64_insert_point)
8224 (aarch64_remove_point): No longer check whether the type is
8225 supported here. Adjust to new interface.
8226 (the_low_target): Install aarch64_supports_z_point_type as
8227 supports_z_point_type method.
8228 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8229 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8230 instead of a Z packet char. Adjust.
8231 (arm_supports_z_point_type): New function.
8232 (arm_insert_point, arm_remove_point): Adjust to new interface.
8233 (the_low_target): Install arm_supports_z_point_type.
8234 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8235 (cris_insert_point, cris_remove_point): Adjust to new interface.
8236 Don't check whether the type is supported here.
8237 (the_low_target): Install cris_supports_z_point_type.
8238 * linux-low.c (linux_supports_z_point_type): New function.
8239 (linux_insert_point, linux_remove_point): Adjust to new interface.
8240 * linux-low.h (struct linux_target_ops) <insert_point,
8241 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8242 raw_breakpoint pointer parameter.
8243 <supports_z_point_type>: New method.
8244 * linux-mips-low.c (mips_supports_z_point_type): New function.
8245 (mips_insert_point, mips_remove_point): Adjust to new interface.
8246 Use mips_supports_z_point_type.
8247 (the_low_target): Install mips_supports_z_point_type.
8248 * linux-ppc-low.c (the_low_target): Install NULL as
8249 supports_z_point_type method.
8250 * linux-s390-low.c (the_low_target): Install NULL as
8251 supports_z_point_type method.
8252 * linux-sparc-low.c (the_low_target): Install NULL as
8253 supports_z_point_type method.
8254 * linux-x86-low.c (x86_supports_z_point_type): New function.
8255 (x86_insert_point): Adjust to new insert_point interface. Use
8256 insert_memory_breakpoint. Adjust to new
8257 i386_low_insert_watchpoint interface.
8258 (x86_remove_point): Adjust to remove_point interface. Use
8259 remove_memory_breakpoint. Adjust to new
8260 i386_low_remove_watchpoint interface.
8261 (the_low_target): Install x86_supports_z_point_type.
8262 * lynx-low.c (lynx_target_ops): Install NULL as
8263 supports_z_point_type callback.
8264 * nto-low.c (nto_supports_z_point_type): New.
8265 (nto_insert_point, nto_remove_point): Adjust to new interface.
8266 (nto_target_ops): Install nto_supports_z_point_type.
8267 * mem-break.c: Adjust intro comment.
8268 (struct raw_breakpoint) <raw_type, size>: New fields.
8269 <inserted>: Update comment.
8270 <shlib_disabled>: Delete field.
8271 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8272 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8273 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8274 (raw_bkpt_type_to_target_hw_bp_type): New function.
8275 (find_enabled_raw_code_breakpoint_at): New function.
8276 (find_raw_breakpoint_at): New type and size parameters. Use them.
8277 (insert_memory_breakpoint): New function, based off
8278 set_raw_breakpoint_at.
8279 (remove_memory_breakpoint): New function.
8280 (set_raw_breakpoint_at): Reimplement.
8281 (set_breakpoint): New, based on set_breakpoint_at.
8282 (set_breakpoint_at): Reimplement.
8283 (delete_raw_breakpoint): Go through the_target->remove_point
8284 instead of assuming memory breakpoints.
8285 (find_gdb_breakpoint_at): Delete.
8286 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8287 (find_gdb_breakpoint): New function.
8288 (set_gdb_breakpoint_at): Delete.
8289 (z_type_supported): New function.
8290 (set_gdb_breakpoint_1): New function, loosely based off
8291 set_gdb_breakpoint_at.
8292 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8293 (delete_gdb_breakpoint_at): Delete.
8294 (delete_gdb_breakpoint_1): New function, loosely based off
8295 delete_gdb_breakpoint_at.
8296 (delete_gdb_breakpoint): New function.
8297 (clear_gdb_breakpoint_conditions): Rename to ...
8298 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8299 breakpoint.
8300 (add_condition_to_breakpoint): Make static.
8301 (add_breakpoint_condition): Take a struct breakpoint pointer
8302 instead of an address. Adjust.
8303 (gdb_condition_true_at_breakpoint): Rename to ...
8304 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8305 z_type parameter.
8306 (gdb_condition_true_at_breakpoint): Reimplement.
8307 (add_breakpoint_commands): Take a struct breakpoint pointer
8308 instead of an address. Adjust.
8309 (gdb_no_commands_at_breakpoint): Rename to ...
8310 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8311 parameter. Return true if no breakpoint was found. Change debug
8312 output.
8313 (gdb_no_commands_at_breakpoint): Reimplement.
8314 (run_breakpoint_commands): Rename to ...
8315 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8316 and change return type to boolean.
8317 (run_breakpoint_commands): New function.
8318 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8319 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8320 breakpoint. Go through the_target->remove_point instead of
8321 assuming memory breakpoint.
8322 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8323 software and hardware breakpoints.
8324 (reinsert_raw_breakpoint): Go through the_target->insert_point
8325 instead of assuming memory breakpoint.
8326 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8327 software and hardware breakpoints.
8328 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8329 Check both software and hardware breakpoints.
8330 (validate_inserted_breakpoint): Assert the breakpoint is a
8331 software breakpoint. Set the inserted flag to -1 instead of
8332 setting shlib_disabled.
8333 (delete_disabled_breakpoints): Adjust.
8334 (validate_breakpoints): Only validate software breakpoints.
8335 Adjust to inserted flag change.
8336 (check_mem_read, check_mem_write): Skip breakpoint types other
8337 than software breakpoints. Adjust to inserted flag change.
8338 * mem-break.h (enum raw_bkpt_type): New enum.
8339 (raw_breakpoint, struct process_info): Forward declare.
8340 (Z_packet_to_target_hw_bp_type): Delete declaration.
8341 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8342 (set_gdb_breakpoint, delete_gdb_breakpoint)
8343 (clear_breakpoint_conditions): New declarations.
8344 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8345 (breakpoint_inserted_here): Update comment.
8346 (add_breakpoint_condition, add_breakpoint_commands): Replace
8347 address parameter with a breakpoint pointer parameter.
8348 (gdb_breakpoint_here): Update comment.
8349 (delete_gdb_breakpoint_at): Delete.
8350 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8351 * server.c (process_point_options): Take a struct breakpoint
8352 pointer instead of an address. Adjust.
8353 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8354 delete_gdb_breakpoint.
8355 * spu-low.c (spu_target_ops): Install NULL as
8356 supports_z_point_type method.
8357 * target.h: Include mem-break.h.
8358 (struct target_ops) <prepare_to_access_memory>: Update comment.
8359 <supports_z_point_type>: New field.
8360 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8361 instead of a char. Also take a raw breakpoint pointer.
8362 * win32-arm-low.c (the_low_target): Install NULL as
8363 supports_z_point_type.
8364 * win32-i386-low.c (i386_supports_z_point_type): New function.
8365 (i386_insert_point, i386_remove_point): Adjust to new interface.
8366 (the_low_target): Install i386_supports_z_point_type.
8367 * win32-low.c (win32_supports_z_point_type): New function.
8368 (win32_insert_point, win32_remove_point): Adjust to new interface.
8369 (win32_target_ops): Install win32_supports_z_point_type.
8370 * win32-low.h (struct win32_target_ops):
8371 <supports_z_point_type>: New method.
8372 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8373 instead of a char. Also take a raw breakpoint pointer.
8374
932539e3
PA
83752014-05-20 Pedro Alves <palves@redhat.com>
8376
8377 * mem-break.h: Include break-common.h.
8378 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8379 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8380 (Z_packet_to_target_hw_bp_type): New declaration.
8381 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8382 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8383 (Z_PACKET_ACCESS_WP): Delete macros.
8384 (Z_packet_to_hw_type): Delete function.
8385 * i386-low.h: Don't include break-common.h here.
8386 (Z_packet_to_hw_type): Delete declaration.
8387 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8388 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8389 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8390 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8391 * linux-aarch64-low.c: Don't include break-common.h here.
8392 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8393 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8394 (Z_packet_to_target_hw_bp_type): Delete function.
8395 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8396 function.
8397 (mips_insert_point, mips_remove_point): Use
8398 Z_packet_to_target_hw_bp_type.
8399
4ff0d3d8
PA
84002014-05-20 Pedro Alves <palves@redhat.com>
8401
8402 * linux-aarch64-low.c: Include break-common.h.
8403 (enum target_point_type): Delete.
8404 (Z_packet_to_point_type): Rename to ...
8405 (Z_packet_to_target_hw_bp_type): ... this, and return a
8406 target_hw_bp_type instead.
8407 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8408 instead of an enum target_point_type.
8409 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8410 breakpoint type.
8411 (aarch64_dr_state_insert_one_point)
8412 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8413 (aarch64_handle_aligned_watchpoint)
8414 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8415 Take an enum target_hw_bp_type instead of an enum
8416 target_point_type.
8417 (aarch64_supports_z_point_type): New function.
8418 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8419 use Z_packet_to_target_hw_bp_type.
8420
786dc519
JB
84212014-05-20 Joel Brobecker <brobecker@adacore.com>
8422
8423 * configure.ac: Only use -Werror by default when DEVELOPMENT
8424 is true.
8425 * configure: Regenerate.
8426
9e0aa64f
JK
84272014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8428
8429 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8430 * linux-x86-low.c (X86_64_USER_REGS): New.
8431 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8432
2b577b92
YQ
84332014-04-28 Yao Qi <yao@codesourcery.com>
8434
8435 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8436 name.
8437
94611da2
PA
84382014-04-25 Pedro Alves <palves@redhat.com>
8439
8440 PR server/16255
8441 * linux-low.c (linux_attach_fail_reason_string): New function.
8442 (linux_attach_lwp): Delete.
8443 (linux_attach_lwp_1): Rename to ...
8444 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8445 argument. Remove "initial" parameter. Return int instead of
8446 void. Don't error or warn here.
8447 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8448 failure to attach to the tgid. Call warning when failing to
8449 attach to an lwp.
8450 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8451 argument. Remove "initial" parameter. Return int instead of
8452 void. Don't error or warn here.
8453 (linux_attach_fail_reason_string): New declaration.
8454 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8455 interface change. Use linux_attach_fail_reason_string.
8456
01f9f808
MS
84572014-04-24 Michael Sturm <michael.sturm@mintel.com>
8458 Walfred Tedeschi <walfred.tedeschi@intel.com>
8459
8460 * Makefile.in: Added rules to handle new files
8461 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8462 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8463 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8464 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8465 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8466 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8467 x32-avx512-linux.o.
8468 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8469 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8470 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8471 i386/x32-avx512.xml.
8472 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8473 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8474 i386/x32-avx512-linux.xml.
8475 * i387-fp.c (num_avx512_k_registers): New constant for number
8476 of K registers.
8477 (num_avx512_zmmh_low_registers): New constant for number of
8478 lower ZMM registers (0-15).
8479 (num_avx512_zmmh_high_registers): New constant for number of
8480 higher ZMM registers (16-31).
8481 (num_avx512_ymmh_registers): New contant for number of higher
8482 YMM registers (ymm16-31 added by avx521 on x86_64).
8483 (num_avx512_xmm_registers): New constant for number of higher
8484 XMM registers (xmm16-31 added by AVX512 on x86_64).
8485 (struct i387_xsave): Add space for AVX512 registers.
8486 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8487 Add code to handle AVX512 registers.
8488 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8489 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8490 prototypei from generated file.
8491 (tdesc_amd64_avx512_linux): Likewise.
8492 (init_registers_x32_avx512_linux): Likewise.
8493 (tdesc_x32_avx512_linux): Likewise.
8494 (init_registers_i386_avx512_linux): Likewise.
8495 (tdesc_i386_avx512_linux): Likewise.
8496 (x86_64_regmap): Add AVX512 registers.
8497 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8498 mask.
8499 (initialize_low_arch): Add code to initialize AVX512 registers.
8500
51aa91f9
PA
85012014-04-23 Pedro Alves <palves@redhat.com>
8502
8503 * mem-break.c (find_gdb_breakpoint_at): Make static.
8504 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8505
a4165e94
PA
85062014-04-23 Pedro Alves <palves@redhat.com>
8507
8508 * i386-low.c: Don't include break-common.h here.
8509 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8510 prototype to take target_hw_bp_type as argument instead of a Z
8511 packet char.
8512 * i386-low.h: Include break-common.h here.
8513 (Z_packet_to_hw_type): Declare.
8514 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8515 prototypes.
8516 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8517 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8518 (x86_remove_point): Convert the packet number to a
8519 target_hw_bp_type before calling i386_low_remove_watchpoint.
8520 * win32-i386-low.c (i386_insert_point): Convert the packet number
8521 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8522 (i386_remove_point): Convert the packet number to a
8523 target_hw_bp_type before calling i386_low_remove_watchpoint.
8524
b8acf843
PA
85252014-04-23 Pedro Alves <palves@redhat.com>
8526
8527 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8528
d708bcd1
PA
85292014-04-10 Pedro Alves <palves@redhat.com>
8530
8531 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8532 Check if the condition or command is NULL before checking if the
8533 breakpoint is known. On success, return true.
8534 * mem-break.h (add_breakpoint_condition): Document return.
8535 (add_breakpoint_commands): Add describing comment.
8536 * server.c (skip_to_semicolon): New function.
8537 (process_point_options): Use it.
8538
2eec7d5b
PA
85392014-04-09 Pedro Alves <palves@redhat.com>
8540
8541 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8542 to lwpid_of.
8543
fa96cb38
PA
85442014-02-27 Pedro Alves <palves@redhat.com>
8545
8546 PR 12702
8547 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8548 macros.
8549 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8550 output.
8551 (last_thread_of_process_p): Take a PID argument instead of a
8552 thread pointer.
8553 (linux_wait_for_lwp): Delete.
8554 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8555 functions.
8556 (linux_low_filter_event): New function, party factored out from
8557 linux_wait_for_event.
8558 (linux_wait_for_event): Rename to ...
8559 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8560 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8561 sigsuspend. Check for zombie leaders.
8562 (linux_wait_for_event): Reimplement as wrapper around
8563 linux_wait_for_event_filtered.
8564 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8565 a normal or signal exit is seen, it's the whole process exiting.
8566 (wait_for_sigstop): No longer a for_each_inferior callback.
8567 Rewrite on top of linux_wait_for_event_filtered.
8568 (stop_all_lwps): Call wait_for_sigstop directly.
8569 * server.c (resume, handle_target_event): Handle
8570 TARGET_WAITKIND_NO_RESUMED.
8571
d763de10
JB
85722014-02-26 Joel Brobecker <brobecker@adacore.com>
8573
8574 * win32-low.c (psapi_get_dll_name,
8575 * win32_CreateToolhelp32Snapshot): Delete.
8576 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8577 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8578 Delete.
8579 (handle_load_dll): Add function description.
8580 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8581
850a0f76
JB
85822014-02-26 Joel Brobecker <brobecker@adacore.com>
8583
8584 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8585 Add comment.
8586 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8587 base address when calling win32_add_one_solib.
8588 (handle_load_dll): Delete local variable load_addr.
8589 Remove 0x1000 offset applied to DLL base address when calling
8590 win32_add_one_solib.
8591 (handle_unload_dll): Add comment.
8592
f25b3fc3
JB
85932014-02-26 Joel Brobecker <brobecker@adacore.com>
8594
8595 * win32-low.c (win32_add_all_dlls): Renames
8596 win32_ensure_ntdll_loaded. Rewrite function documentation.
8597 Adjust implementation to always load all DLLs.
8598 Add 0x1000 offset to DLL base address when calling
8599 win32_add_one_solib.
8600 (child_initialization_done): New static global.
8601 (do_initial_child_stuff): Set child_initialization_done to
8602 zero during child initialization, and 1 after. Replace call
8603 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8604 Add comment.
8605 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8606 (handle_unload_dll): Add function documentation.
8607 (get_child_debug_event): Ignore load and unload DLL events
8608 during child initialization.
8609
d86d4aaf
DE
86102014-02-20 Doug Evans <dje@google.com>
8611
3bc32da3 8612 Remove global all_lwps.
d86d4aaf
DE
8613 * inferiors.h (ptid_of): Move here from linux-low.h.
8614 (pid_of, lwpid_of): Ditto.
8615 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8616 parameter is a struct thread_info * now.
8617 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8618 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8619 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8620 directly.
8621 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8622 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8623 * linux-arm-low.c (update_registers_callback): Update, "entry"
8624 parameter is a struct thread_info * now.
8625 Fetch lwpid from current_inferior directly.
8626 (arm_insert_point): Pass &all_threads to find_inferior instead of
8627 &all_lwps.
8628 (arm_remove_point): Ditto.
8629 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8630 (arm_prepare_to_resume): Fetch pid from thread.
8631 (arm_read_description): Fetch lwpid from current_inferior directly.
8632 * linux-low.c (all_lwps): Delete.
8633 (delete_lwp): Delete call to remove_inferior.
8634 (handle_extended_wait): Fetch lwpid from thread.
8635 (add_lwp): Don't set lwp->entry.id. Remove call to
8636 add_inferior_to_list.
8637 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8638 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8639 (kill_one_lwp_callback): Ditto.
8640 (linux_kill): Don't dereference NULL pointer.
8641 Fetch ptid,lwpid from thread.
8642 (get_detach_signal): Fetch ptid from thread.
8643 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8644 Simplify call to regcache_invalidate_thread.
8645 (delete_lwp_callback): Update, "entry" parameter is a
8646 struct thread_info * now. Fetch pid from thread.
8647 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8648 (status_pending_p_callback): Update, "entry" parameter is a
8649 struct thread_info * now. Fetch ptid from thread.
8650 (find_lwp_pid): Update, "entry" parameter is a
8651 struct thread_info * now.
8652 (linux_wait_for_lwp): Fetch pid from thread.
8653 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8654 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8655 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8656 (dequeue_one_deferred_signal): Ditto.
8657 (cancel_breakpoint): Fetch ptid from current_inferior.
8658 (linux_wait_for_event): Pass &all_threads to find_inferior,
8659 not &all_lwps. Fetch ptid, lwpid from thread.
8660 (count_events_callback): Update, "entry" parameter is a
8661 struct thread_info * now.
8662 (select_singlestep_lwp_callback): Ditto.
8663 (select_event_lwp_callback): Ditto.
8664 (cancel_breakpoints_callback): Ditto.
8665 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8666 not &all_lwps.
8667 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8668 (unsuspend_one_lwp): Update, "entry" parameter is a
8669 struct thread_info * now.
8670 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8671 not &all_lwps.
8672 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8673 Fetch lwpid from thread, not lwp.
8674 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8675 Pass &all_threads to find_inferior, not &all_lwps.
8676 (send_sigstop): Fetch lwpid from thread, not lwp.
8677 (send_sigstop_callback): Update, "entry" parameter is a
8678 struct thread_info * now.
8679 (suspend_and_send_sigstop_callback): Ditto.
8680 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8681 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8682 struct thread_info * now.
8683 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8684 from thread, lwp.
8685 (lwp_running): Update, "entry" parameter is a
8686 struct thread_info * now.
8687 (stop_all_lwps): Fetch ptid from thread.
8688 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8689 (linux_resume_one_lwp): Fetch lwpid from thread.
8690 (linux_set_resume_request): Update, "entry" parameter is a
8691 struct thread_info * now. Fetch pid, lwpid from thread.
8692 (resume_status_pending_p): Update, "entry" parameter is a
8693 struct thread_info * now.
8694 (need_step_over_p): Ditto. Fetch lwpid from thread.
8695 (start_step_over): Fetch lwpid from thread.
8696 (linux_resume_one_thread): Update, "entry" parameter is a
8697 struct thread_info * now. Fetch lwpid from thread.
8698 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8699 (proceed_one_lwp): Update, "entry" parameter is a
8700 struct thread_info * now. Fetch lwpid from thread.
8701 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8702 struct thread_info * now.
8703 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8704 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8705 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8706 directly.
8707 (regsets_store_inferior_registers): Ditto.
8708 (fetch_register, store_register): Ditto.
8709 (linux_read_memory, linux_write_memory): Ditto.
8710 (linux_request_interrupt): Ditto.
8711 (linux_read_auxv): Ditto.
8712 (linux_xfer_siginfo): Ditto.
8713 (linux_qxfer_spu): Ditto.
8714 (linux_qxfer_libraries_svr4): Ditto.
8715 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8716 moved to inferiors.h.
8717 (get_lwp): Delete.
8718 (get_thread_lwp): Update.
8719 (struct lwp_info): Delete member "entry". Simplify comment for
8720 member "thread".
8721 (all_lwps): Delete.
8722 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8723 current_inferior directly.
8724 (update_watch_registers_callback): Update, "entry" parameter is a
8725 struct thread_info * now. Fetch pid from thread.
8726 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8727 (mips_insert_point): Fetch lwpid from current_inferior.
8728 Pass &all_threads to find_inferior, not &all_lwps.
8729 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8730 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8731 directly.
8732 (mips_stopped_data_address): Ditto.
8733 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8734 directly.
8735 * linux-tile-low.c (tile_arch_setup): Ditto.
8736 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8737 (update_debug_registers_callback): Update, "entry" parameter is a
8738 struct thread_info * now. Fetch pid from thread.
8739 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8740 Pass &all_threads to find_inferior, not &all_lwps.
8741 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8742 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8743 Pass &all_threads to find_inferior, not &all_lwps.
8744 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8745 (i386_dr_low_get_status): Ditto.
8746 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8747 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8748 (x86_linux_read_description): Ditto.
8749 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8750
3b8361aa
DE
87512014-02-20 Doug Evans <dje@google.com>
8752
8753 * inferiors.c (get_first_inferior): Fix buglet.
8754
f7667f0d
DE
87552014-02-19 Doug Evans <dje@google.com>
8756
8757 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8758 * inferiors.c (add_thread): Change result type to struct thread_info *.
8759 All callers updated.
8760 (add_lwp): Call add_thread here instead of in callers.
8761 All callers updated.
8762 * linux-low.h (get_lwp_thread): Rewrite.
8763 (struct lwp_info): New member "thread".
8764
b3312d80
DE
87652014-02-19 Doug Evans <dje@google.com>
8766
8767 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8768 All callers updated.
8769
ecc6f45c
DE
87702014-02-19 Doug Evans <dje@google.com>
8771
8772 * inferiors.c (add_thread): Fix whitespace.
8773
649ebbca
DE
87742014-02-19 Doug Evans <dje@google.com>
8775
8776 * dll.c (clear_dlls): Replace accessing list implemention details
8777 with API function.
8778 * gdbthread.h (get_first_thread): Declare.
8779 * inferiors.c (for_each_inferior_with_data): New function.
8780 (get_first_thread): New function.
8781 (find_thread_ptid): Simplify.
8782 (get_first_inferior): New function.
8783 (clear_list): Delete.
8784 (one_inferior_p): New function.
8785 (clear_inferior_list): New function.
8786 (clear_inferiors): Update.
8787 * inferiors.h (for_each_inferior_with_data): Declare.
8788 (clear_inferior_list): Declare.
8789 (one_inferior_p): Declare.
8790 (get_first_inferior): Declare.
8791 * linux-low.c (linux_wait_for_event): Replace accessing list
8792 implemention details with API function.
8793 * server.c (target_running): Ditto.
8794 (accumulate_file_name_length): New function.
8795 (emit_dll_description): New function.
8796 (handle_qxfer_libraries): Replace accessing list implemention
8797 details with API function.
8798 (handle_qxfer_threads_worker): New function.
8799 (handle_qxfer_threads_proper): Replace accessing list implemention
8800 details with API function.
8801 (handle_query): Ditto.
8802 (visit_actioned_threads_callback_ftype): New typedef.
8803 (visit_actioned_threads_data): New struct.
8804 (visit_actioned_threads): Rewrite to be find_inferior callback.
8805 (resume): Call find_inferior.
8806 (handle_status): Replace accessing list implemention
8807 details with API function.
8808 (process_serial_event): Replace accessing list implemention details
8809 with API function.
8810 * target.c (set_desired_inferior): Replace accessing list implemention
8811 details with API function.
8812 * tracepoint.c (same_process_p): New function.
8813 (gdb_agent_about_to_close): Replace accessing list implemention
8814 details with API function.
8815 * win32-low.c (child_delete_thread): Replace accessing list
8816 implemention details with API function.
8817 (match_dll_by_basename): New function.
8818 (dll_is_loaded_by_basename): New function.
8819 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8820 details call to dll_is_loaded_by_basename.
8821
80894984
DE
88222014-02-19 Doug Evans <dje@google.com>
8823
8824 * dll.h (struct dll_info): Add comment.
8825 * gdbthread.h (struct thread_info): Add comment.
8826 (current_ptid): Simplify.
8827 * inferiors.c (add_process): Update.
8828 (remove_process): Update.
8829 * inferiors.h (struct process_info): Rename member "head" to "entry".
8830 * linux-low.c (delete_lwp): Update.
8831 (add_lwp): Update.
8832 (last_thread_of_process_p): Update.
8833 (kill_one_lwp_callback, linux_kill): Update.
8834 (status_pending_p_callback): Update.
8835 (wait_for_sigstop): Update. Simplify read of ptid.
8836 (start_step_over): Update.
8837 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8838 (get_lwp_thread): Update.
8839 (struct lwp_info): Rename member "head" to "entry".
8840 * regcache.h (inferior_list_entry): Delete.
8841 * server.c (kill_inferior_callback): Update.
8842 (detach_or_kill_inferior_callback): Update.
8843 (print_started_pid): Update.
8844 (print_attached_pid): Update.
8845 (process_serial_event): Simplify read of ptid.
8846 * thread-db.c (thread_db_create_event): Update.
8847 (thread_db_get_tls_address): Update.
8848 * win32-low.c (current_inferior_ptid): Simplify.
8849
46917d26
TT
88502014-02-19 Tom Tromey <tromey@redhat.com>
8851
8852 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8853 argument.
8854 (target_supports_btrace): Update.
8855
0759a81e
YQ
88562014-02-14 Yao Qi <yao@codesourcery.com>
8857
8858 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8859 (rsp-low-ipa.o): New target.
8860
a7191e8b
TT
88612014-02-12 Tom Tromey <tromey@redhat.com>
8862
8863 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8864 convert_ascii_to_int.
8865 * regcache.c (registers_to_string): Likewise.
8866 * remote-utils.c (decode_M_packet): Likewise.
8867 * server.c (process_serial_event): Likewise.
8868
ff0e980e
TT
88692014-02-12 Tom Tromey <tromey@redhat.com>
8870
8871 * server.c (handle_query, handle_v_run): Use hex2bin, not
8872 unhexify.
8873 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8874
e9371aff
TT
88752014-02-12 Tom Tromey <tromey@redhat.com>
8876
8877 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8878 convert_int_to_ascii.
8879 * regcache.c (registers_to_string, collect_register_as_string):
8880 Likewise.
8881 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8882 Likewise.
8883 * server.c (process_serial_event): Likewise.
8884 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8885 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8886
971dc0b8
TT
88872014-02-12 Tom Tromey <tromey@redhat.com>
8888
8889 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8890 bin2hex, not hexify.
8891 * tracepoint.c (cmd_qtstatus): Likewise.
8892
0a822afb
TT
88932014-02-12 Tom Tromey <tromey@redhat.com>
8894
8895 * remote-utils.c (monitor_output): Pass explicit length to
8896 hexify.
8897
9c3d6531
TT
88982014-02-12 Tom Tromey <tromey@redhat.com>
8899
8900 * tracepoint.c: Include rsp-low.h.
8901 * server.c: Include rsp-low.h.
8902 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8903 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8904 declare.
8905 * remote-utils.c: Include rsp-low.h.
8906 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8907 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8908 (convert_int_to_ascii, convert_ascii_to_int): Move to
8909 common/rsp-low.c.
8910 * regcache.c: Include rsp-low.h.
8911 * ax.c: Include rsp-low.h.
8912 * Makefile.in (SFILES): Add common/rsp-low.c.
8913 (OBS): Add rsp-low.o.
8914 (rsp-low.o): New target.
8915
01fd3ea5
TT
89162014-02-12 Tom Tromey <tromey@redhat.com>
8917
8918 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8919 Include print-utils.h.
8920 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8921 (plongest, thirty_two, phex_nz): Remove.
8922 * Makefile.in (SFILES): Add common/print-utils.c.
8923 (OBS): Add print-utils.o.
8924 (print-utils-ipa.o): New target.
8925 (print-utils.o): New target.
8926 (IPA_OBJS): Add print-utils-ipa.o.
8927
e99dc820
TT
89282014-02-06 Tom Tromey <tromey@redhat.com>
8929
8930 * Makefile.in (SFILES): Fix indentation.
8931
ee1e2d4f
DE
89322014-02-05 Doug Evans <dje@google.com>
8933
8934 * linux-low.c (linux_wait_for_event): Improve comment.
8935 (linux_wait_1): Keep current_inferior in sync with event_child.
8936
f5a02773
DE
89372014-01-22 Doug Evans <dje@google.com>
8938
8939 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8940
87ce2a04
DE
89412014-01-22 Doug Evans <dje@google.com>
8942
8943 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8944 * configure: Regenerate.
8945 * config.in: Regenerate.
8946 * Makefile.in (SFILES): Add debug.c.
8947 (OBS): Add debug.o.
8948 * debug.c: New file.
8949 * debug.h: New file.
8950 * linux-aarch64-low.c (*): Update all debugging printfs to use
8951 debug_printf instead of fprintf.
8952 * linux-arm-low.c (*): Ditto.
8953 * linux-cris-low.c (*): Ditto.
8954 * linux-crisv32-low.c (*): Ditto.
8955 * linux-m32r-low.c (*): Ditto.
8956 * linux-sparc-low.c (*): Ditto.
8957 * linux-x86.c (*): Ditto.
8958 * linux-low.c (*): Ditto.
8959 (linux_wait_1): Add calls to debug_enter, debug_exit.
8960 (linux_wait): Remove redundant debugging printf.
8961 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8962 (linux_resume, unstop_all_lwps): Ditto.
8963 * mem-break.c (*): Update all debugging printfs to use
8964 debug_printf instead of fprintf.
8965 * remote-utils.c (*): Ditto.
8966 * thread-db.c (*): Ditto.
8967 * server.c #include <ctype.h>, "gdb_vecs.h".
8968 (debug_threads): Moved to debug.c.
8969 (*): Update all debugging printfs to use debug_printf instead of
8970 fprintf.
8971 (start_inferior): Replace call to fflush with call to debug_flush.
8972 (monitor_show_help): Mention set debug-format.
8973 (parse_debug_format_options): New function.
8974 (handle_monitor_command): Handle "monitor set debug-format".
8975 (gdbserver_usage): Mention --debug-format.
8976 (main): Parse --debug-format.
8977 * server.h (debug_threads): Declaration moved to debug.h.
8978 #include "debug.h".
8979 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8980 trace_debug_1 that uses debug_printf.
8981 (tracepoint_look_up_symbols): Update all debugging printfs to use
8982 debug_printf instead of fprintf.
8983
e671835b
BS
89842014-01-20 Baruch Siach <baruch@tkos.co.il>
8985
8986 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8987 sys/ptrace.h.
8988
b5737fa9
PA
89892014-01-17 Pedro Alves <palves@redhat.com>
8990
ea38d2a9 8991 PR build/16445
c7faa97a
PA
8992 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8993 defined after including gdb_proc_service.h.
b5737fa9 8994
40ed484e
DE
89952014-01-16 Doug Evans <dje@google.com>
8996
8997 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8998 (match_dll): Use it.
8999
969c39fb
MM
90002014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9001
9002 * target.h (target_ops) <read_btrace>: Change parameters and
9003 return type to allow error reporting.
9004 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9005 trace reading errors on.
9006 * linux-low.c (linux_low_read_btrace): Pass trace reading
9007 errors on.
9008 (linux_low_disable_btrace): New.
9009
ab7f45ba
DE
90102014-01-15 Doug Evans <dje@google.com>
9011
9012 * inferiors.c (thread_id_to_gdb_id): Delete.
9013 * inferiors.h (thread_id_to_gdb_id): Delete.
9014
66af0f44
EZ
90152014-01-13 Eli Zaretskii <eliz@gnu.org>
9016
9017 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9018 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9019 versions.
9020
9939e131
PA
90212014-01-08 Pedro Alves <palves@redhat.com>
9022
9023 * server.c (handle_status): Don't discard previous queued stop
9024 replies or thread's pending status here.
9025 (main) <disconnection>: Do it here instead.
9026
b7ea362b
PA
90272014-01-08 Pedro Alves <palves@redhat.com>
9028
9029 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9030 * server.c (visit_actioned_threads, handle_pending_status): New
9031 function.
9032 (handle_v_cont): Factor out parts to ...
9033 (resume): ... this new function. If in all-stop, and a thread
9034 being resumed has a pending status, report it without actually
9035 resuming.
9036 (myresume): Adjust to use the new 'resume' function.
9037 (clear_pending_status_callback, set_pending_status_callback)
9038 (find_status_pending_thread_callback): New functions.
9039 (handle_status): Handle the case of multiple threads having
9040 interesting statuses to report. Report threads' real last signal
9041 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9042 with an interesting thread to report the status for, instead of
9043 always reporting the status of the first thread.
9044
28498c42
JB
90452014-01-01 Joel Brobecker <brobecker@adacore.com>
9046
9047 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9048 * gdbreplay.c (gdbreplay_version): Likewise.
9049
f45c82da
YZ
90502013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9051
9052 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9053 iov.iov_len with the real length in use.
9054
379a5e2d
JB
90552013-12-13 Joel Brobecker <brobecker@adacore.com>
9056
9057 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9058 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9059 for all targets that use win32-low.c.
9060 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9061 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9062
4210d83e
PA
90632013-12-13 Pedro Alves <palves@redhat.com>
9064
9065 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9066 if equal to TARGET_WAITKIND_LOADED.
9067 * win32-low.c (cached_status): New static global.
9068 (win32_wait): Add declaration.
9069 (do_initial_child_stuff): Flush all initial pending debug events
9070 up to the initial breakpoint.
9071 (win32_wait): If CACHED_STATUS was set, return that instead
9072 of doing a real wait. Remove the code resuming the execution
9073 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9074 during the initial phase. Also remove the code changing
9075 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9076 TARGET_WAITKIND_STOPPED.
9077
e7f0d979
YQ
90782013-12-11 Yao Qi <yao@codesourcery.com>
9079
9080 * notif.c (handle_notif_ack): Return 0 if no notification
9081 matches.
9082
ebcf782c
DE
90832013-11-20 Doug Evans <dje@google.com>
9084
9085 * linux-low.c (linux_set_resume_request): Fix comment.
9086
20ad9378
DE
90872013-11-20 Doug Evans <dje@google.com>
9088
9089 * linux-low.c (resume_status_pending_p): Tweak comment.
9090
a196ebeb
WT
90912013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9092
9093 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9094 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9095 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9096 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9097 (srv_amd64_regobj): Add amd64-mpx.o.
9098 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9099 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9100 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9101 * i387-fp.c (num_pl_bnd_register) Added constant.
9102 (num_pl_bnd_cfg_registers) Added constant.
9103 (struct i387_xsave) Added reserved area and MPX fields.
9104 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9105 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9106 function.
9107 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9108 (init_registers_amd64_mpx_linux): Declare new function.
9109 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9110 (x86_64_regmap): Add MPX registers.
9111 (x86_linux_read_description): Add MPX case.
9112 (initialize_low_arch): Initialize MPX targets.
9113
0080a2f6
TT
91142013-11-18 Tom Tromey <tromey@redhat.com>
9115
9116 * configure: Rebuild.
9117 * configure.ac: Don't check for stdlib.h.
9118 * gdbreplay.c: Unconditionally include stdlib.h.
9119
2978b111
TT
91202013-11-18 Tom Tromey <tromey@redhat.com>
9121
9122 * config.in: Rebuild.
9123 * configure: Rebuild.
9124 * configure.ac: Don't use AC_HEADER_DIRENT.
9125
a3d08894
TT
91262013-11-18 Tom Tromey <tromey@redhat.com>
9127
9128 * server.h: Don't check HAVE_STRING_H.
9129 * gdbreplay.c: Don't check HAVE_STRING_H.
9130 * configure: Rebuild.
9131
0a5dd17d
TT
91322013-11-18 Tom Tromey <tromey@redhat.com>
9133
9134 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9135 LIBGNU.
9136
1bd2f0ba
TT
91372013-11-08 Tom Tromey <tromey@redhat.com>
9138
9139 * configure, config.in: Rebuild.
9140 * configure.ac: Remove unused configury.
9141
3266f10b
TT
91422013-11-08 Tom Tromey <tromey@redhat.com>
9143
9144 * acinclude.m4: Include common.m4, codeset.m4.
9145 * configure, config.in: Rebuild.
9146 * configure.ac: Use GDB_AC_COMMON.
9147
6682d959
AA
91482013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9149
9150 * linux-s390-low.c (HWCAP_S390_TE): New define.
9151 (s390_arch_setup): Consider the TE field in the HWCAP for
9152 determining 'have_regset_tdb'.
9153
fd0a4d76
SDJ
91542013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9155
9156 PR gdb/16014
9157 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9158 call to sizeof.
9159
1a3d890b
PA
91602013-10-02 Pedro Alves <palves@redhat.com>
9161
9162 * server.c (process_serial_event): Don't output "GDBserver
9163 exiting" if GDB is connected through stdio.
9164 * target.c (mywait): Likewise, be silent if GDB is connected
9165 through stdio.
9166
97ad4581
JB
91672013-10-01 Joel Brobecker <brobecker@adacore.com>
9168
9169 * lynx-low.c (lynx_add_threads_after_attach): New function.
9170 (lynx_attach): Remove call to add_thread. Add call to
9171 lynx_add_threads_after_attach instead.
9172
5b4e221c
MF
91732013-09-28 Mike Frysinger <vapier@gentoo.org>
9174
9175 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9176 * config.in, configure: Regenerated.
9177
ee47b2f8
YQ
91782013-09-18 Yao Qi <yao@codesourcery.com>
9179
9180 PR server/15959
9181 * server.c (start_inferior): Clear 'resume_info'.
9182
d6707650 91832013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9184
d6707650
JW
9185 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9186 for each register.
9187
9243dd0e 91882013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9189
9243dd0e
JW
9190 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9191 linux-tile-low.o to srv_tgtobj.
9192
c623a6ef
WN
91932013-09-16 Will Newton <will.newton@linaro.org>
9194
9195 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9196 out regs.
9197
fb71d39e
PA
91982013-09-06 Pedro Alves <palves@redhat.com>
9199
9200 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9201 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9202 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9203 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9204 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9205 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9206
8e7e9910
PA
92072013-09-06 Pedro Alves <palves@redhat.com>
9208
9209 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9210 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9211
7c3a12ca
PA
92122013-09-06 Pedro Alves <palves@redhat.com>
9213
9214 * linux-amd64-ipa.c: Include tracepoint.h.
9215 * linux-i386-ipa.c: Include tracepoint.h.
9216
8eb3d7b6
RW
92172013-09-06 Ricard Wanderlof <ricardw@axis.com>
9218
9219 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9220 (ps_get_thread_area): New function.
9221
eddddb9d
RW
92222013-09-06 Ricard Wanderlof <ricardw@axis.com>
9223
9224 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9225 (initialize_low_arch): Call init_registers_crisv32 rather than
9226 init_register_crisv32.
9227
533b0600
PA
92282013-09-05 Pedro Alves <palves@redhat.com>
9229
9230 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9231 to ...
9232 * hostio.h: ... this new file.
9233 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9234 win32-low.c: Include hostio.h.
9235
0ce3d3b5
PA
92362013-09-05 Pedro Alves <palves@redhat.com>
9237
9238 * server.h (gdb_client_data, handler_func, callback_handler_func)
9239 (delete_file_handler, add_file_handler, append_callback_event)
9240 (delete_callback_event, start_event_loop, initialize_event_loop):
9241 Move to event-loop.h and include it.
9242 * event-loop.h: New file.
9243
799cdc37
PA
92442013-09-05 Pedro Alves <palves@redhat.com>
9245
9246 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9247 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9248 (loaded_dll, unloaded_dll): Move to ...
9249 * dll.h: ... this new file.
9250 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9251
6a6bbd9d
PA
92522013-09-05 Pedro Alves <palves@redhat.com>
9253
9254 * server.h (current_process, get_thread_process, all_processes)
9255 (add_inferior_to_list, for_each_inferior, current_inferior)
9256 (remove_inferior, add_process, remove_process, find_process_pid)
9257 (have_started_inferiors_p, have_attached_inferiors_p)
9258 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9259 (clear_inferiors, find_inferior, find_inferior_id)
9260 (inferior_target_data, set_inferior_target_data)
9261 (inferior_regcache_data, set_inferior_regcache_data): Move to
9262 inferiors.h, and include it.
9263 * inferiors.h: New file.
9264
f699aaba
PA
92652013-09-05 Pedro Alves <palves@redhat.com>
9266
9267 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9268 Move ...
72f4393d 9269 * ax.h: ... here.
f699aaba 9270
c144c7a0
PA
92712013-09-05 Pedro Alves <palves@redhat.com>
9272
9273 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9274 tracepoint.h.
9275 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9276 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9277 (handle_tracepoint_general_set, handle_tracepoint_query)
9278 (tracepoint_finished_step, tracepoint_was_hit)
9279 (release_while_stepping_state_list, current_traceframe)
9280 (in_readonly_region, traceframe_read_mem)
9281 (fetch_traceframe_registers, traceframe_read_sdata)
9282 (traceframe_read_info, struct fast_tpoint_collect_status)
9283 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9284 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9285 (supply_fast_tracepoint_registers)
9286 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9287 (ipa_tdesc, claim_trampoline_space)
9288 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9289 (agent_mem_read, agent_get_trace_state_variable_value)
9290 (agent_set_trace_state_variable_value, agent_tsv_read)
9291 (agent_mem_read_string, get_raw_reg_func_addr)
9292 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9293 * tracepoint.h: ... this new file.
9294
ff42e6ab
PA
92952013-09-05 Pedro Alves <palves@redhat.com>
9296
9297 * server.h (perror_with_name, error, fatal, warning, paddress)
9298 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9299 include it.
9300 * utils.h: New file.
9301
541af0f4
PA
93022013-09-05 Pedro Alves <palves@redhat.com>
9303
9304 * server.h (remote_debug, noack_mode, transport_is_reliable)
9305 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9306 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9307 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9308 (write_enn, initialize_async_io, enable_async_io)
9309 (disable_async_io, check_remote_input_interrupt_request)
9310 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9311 (dead_thread_notify, prepare_resume_reply)
9312 (decode_address_to_semicolon, decode_address, decode_m_packet)
9313 (decode_M_packet, decode_X_packet, decode_xfer_write)
9314 (decode_search_memory_packet, unhexify, hexify)
9315 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9316 (look_up_one_symbol, relocate_instruction)
9317 (monitor_output): Move to remote-utils.h, and include it.
9318 * remote-utils.h: New file.
9319
eebdf26b
PA
93202013-09-05 Pedro Alves <palves@redhat.com>
9321
9322 * server.h (_): Delete.
9323
3aafd2ff
PA
93242013-09-02 Pedro Alves <palves@redhat.com>
9325
9326 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9327 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9328 allocated.
9329 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9330
cee83bcb
PM
93312013-09-02 Pierre Muller <muller@sourceware.org>
9332
9333 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9334 or WriteProcessMemory complete successfully and handle
9335 ERROR_PARTIAL_COPY error.
9336
9a13b2fa
PA
93372013-09-02 Pedro Alves <palves@redhat.com>
9338
9339 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9340 error instead of EIO.
9341
602e3198
JK
93422013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9343
9344 PR server/15604
9345 * linux-low.c: Include filestuff.h.
9346 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9347 * lynx-low.c: Include filestuff.h.
9348 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9349 * server.c: Include filestuff.h.
9350 (main): Call notice_open_fds.
9351 * spu-low.c: Include filestuff.h.
9352 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9353
96d7229d
LM
93542013-08-22 Luis Machado <lgustavo@codesourcery.com>
9355
9356 * Makefile.in: Explain why ../target and ../nat are not
9357 listed as include file search paths.
9358 (linux-waitpid.o): New object file rule.
9359 * configure.srv (srv_native_linux_obj): New variable.
9360 Replace all occurrences of linux native object files with
9361 $srv_native_linux_obj.
9362 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9363 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9364 (linux_enable_event_reporting): Remove declaration.
9365 (my_waitpid): Moved to common/linux-waitpid.c.
9366 (linux_wait_for_event): Pass ptid when calling
9367 linux_enable_event_reporting.
9368 (linux_supports_tracefork_flag): Remove.
9369 (linux_enable_event_reporting): Likewise.
9370 (linux_tracefork_grandchild): Remove.
9371 (STACK_SIZE): Moved to common/linux-ptrace.c.
9372 (linux_tracefork_child): Remove.
9373 (linux_test_for_tracefork): Remove.
9374 (linux_look_up_symbols): Call linux_supports_traceclone.
9375 (initialize_low): Remove call to linux_test_for_tracefork.
9376 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9377 common/linux-ptrace.h.
9378 (PTRACE_TYPE_ARG4): Likewise.
9379 Include linux-ptrace.h.
9380
32940073
PA
93812013-08-21 Pedro Alves <palves@redhat.com>
9382
9383 * config.in: Renegerate.
9384
33b60d58 93852013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9386
33b60d58
LM
9387 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9388 (SFILES): Remove $(srcdir)/common/target-common.c and
9389 add $(srcdir)/target/waitstatus.c.
9390 (OBS): Remove target-common.o and add waitstatus.o.
9391 (server_h): Remove $(srcdir)/../common/target-common.h and
9392 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9393 and $(srcdir)/../target/waitstatus.h.
9394 (target-common.o): Remove.
9395 (waitstatus.o): New target object file.
9396 * target.h: Do not include target-common.h and
9397 include target/resume.h, target/wait.h and
9398 target/waitstatus.h.
9399
b8e1b30e
LM
94002013-08-13 Luis Machado <lgustavo@codesourcery.com>
9401
9402 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9403 to PTRACE_TYPE_ARG3.
9404 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9405 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9406 PTRACE_TYPE_ARG4.
9407 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9408 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9409
7a60ad40
YQ
94102013-07-27 Jie Zhang <jie@codesourcery.com>
9411 Daniel Jacobowitz <dan@codesourcery.com>
9412 Yao Qi <yao@codesourcery.com>
9413
9414 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9415 (mips-linux-watch.o): New rule.
9416 (mips_linux_watch_h): New variable.
9417 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9418 srv_tgtobj.
9419 * linux-mips-low.c: Include mips-linux-watch.h.
9420 (struct arch_process_info, struct arch_lwp_info): New.
9421 (update_watch_registers_callback): New function.
9422 (mips_linux_new_process, mips_linux_new_thread) New functions.
9423 (mips_linux_prepare_to_resume, mips_insert_point): New
9424 functions.
9425 (mips_remove_point, mips_stopped_by_watchpoint): New
9426 functions.
9427 (rsp_bp_type_to_target_hw_bp_type): New function.
9428 (mips_stopped_data_address): New function.
9429 (the_low_target): Add watchpoint support functions.
9430
de6f69ad
YQ
94312013-07-27 Yao Qi <yao@codesourcery.com>
9432
9433 * i386-low.c: Include break-common.h.
9434 (enum target_hw_bp_type): Remove.
9435
3360c0bf
LM
94362013-07-24 Luis Machado <lgustavo@codesourcery.com>
9437
9438 * Makefile.in (SFILES): /common/target-common.c.
9439 (OBS): Add target-common.o.
9440 (server_h): Add $(srcdir)/../common/target-common.h.
9441 (target-common.o): New target.
9442 * server.c (queue_stop_reply_callback): Free
9443 status string after use.
9444 * target.c (target_waitstatus_to_string): Remove.
9445 * target.h: Include target-common.h.
9446 (resume_kind): Likewise.
9447 (target_waitkind): Likewise.
9448 (target_waitstatus): Likewise.
9449 (TARGET_WNOHANG): Likewise.
9450
bd885420
YQ
94512013-07-04 Yao Qi <yao@codesourcery.com>
9452
9453 * Makefile.in (host_alias): Use @host_noncanonical@.
9454 (target_alias): Use @target_noncanonical@.
9455 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9456 ACX_NONCANONICAL_HOST.
9457 * configure: Regenerated.
9458
9459 Revert:
9460 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9461
9462 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9463 * configure: Rebuild.
9464 * Makefile.in (version_host, version_target): Get from configure.
9465 (version.c): Use $(version_host) and $(version_target).
9466
17ef446e
PA
94672013-07-03 Pedro Alves <palves@redhat.com>
9468
9469 * Makefile.in (config.status): Depend on development.sh.
9470 * acinclude.m4: Include libmcheck.m4.
9471 * configure: Regenerate.
9472
7a9a7487
MG
94732013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9474
9475 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9476 attribute inside the parentheses.
9477 (winapi_DebugSetProcessKillOnExit): Ditto.
9478 (winapi_DebugBreakProcess): Ditto.
9479 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9480
49b64de6
MG
94812013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9482
9483 * notif.h (notif_event): Add a dummy member to avoid compiler
9484 errors.
9485
d5749ee7
PA
94862013-07-01 Pedro Alves <palves@redhat.com>
9487
9488 * hostio.c (HOSTIO_PATH_MAX): Define.
9489 (require_filename, handle_open, handle_unlink, handle_readlink):
9490 Use it.
9491
d8d2a3ee
PA
94922013-07-01 Pedro Alves <palves@redhat.com>
9493
9494 * server.h: Include "pathmax.h".
9495 * linux-low.c: Don't include sys/param.h.
9496 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9497 MAXPATHLEN.
9498 * win32-low.c: Don't include sys/param.h.
9499 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9500
bc7dea8d
PA
95012013-07-01 Pedro Alves <palves@redhat.com>
9502
9503 * event-loop.c: Don't check HAVE_UNISTD_H before including
9504 <unistd.h>.
9505 * gdbreplay.c: Likewise.
9506 * remote-utils.c: Likewise.
9507 * server.c: Likewise.
9508 * configure.ac: Don't check for unistd.h.
9509 * configure: Regenerate.
9510
d6c2da54
TT
95112013-06-28 Tom Tromey <tromey@redhat.com>
9512
9513 * Makefile.in (version.c): Use version.in, not
9514 common/version.in.
9515
257b6bec
MG
95162013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9517
9518 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9519 * configure: Rebuild.
9520 * Makefile.in (version_host, version_target): Get from configure.
9521 (version.c): Use $(version_host) and $(version_target).
9522
86ebe149
DK
95232013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9524
9525 Fix trace-status to output user name without trailing colon.
9526 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9527
f30aa5af
DK
95282013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9529
9530 Fix trace-status to output proper start-time and stop-time.
9531 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9532 output start time and stop time in hex as gdb expects.
9533
28a93511
YQ
95342013-06-26 Pedro Alves <pedro@codesourcery.com>
9535
9536 * tracepoint.c (build_traceframe_info_xml): Output trace state
9537 variables present in the trace buffer.
9538
01208463
TT
95392013-06-24 Tom Tromey <tromey@redhat.com>
9540
9541 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9542 create-version.sh.
9543 (version.o): Remove.
9544 * gdbreplay.c: Include version.h.
9545 (version, host_name): Don't declare.
9546 * server.h: Include version.h.
9547 (version, host_name): Don't declare.
9548
760256f9
PA
95492013-06-12 Pedro Alves <palves@redhat.com>
9550
9551 * linux-x86-low.c (linux_is_elf64): Delete global.
9552 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9553 with local linux_pid_exe_is_elf_64_file use.
9554
030031ee
PA
95552013-06-11 Pedro Alves <palves@redhat.com>
9556
9557 * linux-low.c (regset_disabled, disable_regset): New functions.
9558 (regsets_fetch_inferior_registers)
9559 (regsets_store_inferior_registers): Use them.
9560 (initialize_regsets_info); Don't allocate the disabled_regsets
9561 array here.
9562 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9563 comment.
9564
5da6eb0a
PA
95652013-06-11 Pedro Alves <palves@redhat.com>
9566
9567 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9568 xmalloc.
9569
7e5aaa09
PA
95702013-06-11 Pedro Alves <palves@redhat.com>
9571
9572 * linux-x86-low.c (initialize_low_arch): Call
9573 init_registers_x32_avx_linux.
9574
d878444c
JK
95752013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9576
9577 Fix compatibility with Android Bionic.
9578 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9579 it is not empty.
9580
3aee8918
PA
95812013-06-07 Pedro Alves <palves@redhat.com>
9582
5f2b57b5 9583 PR server/14823
3aee8918
PA
9584 * Makefile.in (OBS): Add tdesc.o.
9585 (IPA_OBJS): Add tdesc-ipa.o.
9586 (tdesc-ipa.o): New rule.
9587 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9588 interface.
9589 * linux-low.c (new_inferior): Delete.
9590 (disabled_regsets, num_regsets): Delete.
9591 (linux_add_process): Adjust to set the new per-process
9592 new_inferior flag.
9593 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9594 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9595 was a stop. When calling arch_setup, switch the current inferior
9596 to the thread that got an event.
9597 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9598 (regsets_fetch_inferior_registers)
9599 (regsets_store_inferior_registers): New regsets_info parameter.
9600 Adjust to use it.
9601 (linux_register_in_regsets): New regs_info parameter. Adjust to
9602 use it.
9603 (register_addr, fetch_register, store_register): New usrregs_info
9604 parameter. Adjust to use it.
9605 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9606 parameter regs_info. Adjust to use it.
9607 (linux_fetch_registers): Get the current inferior's regs_info, and
9608 adjust to use it.
9609 (linux_store_registers): Ditto.
9610 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9611 (initialize_low): Don't initialize the target_regsets here. Call
9612 initialize_low_arch.
9613 * linux-low.h (target_regsets): Delete declaration.
9614 (struct regsets_info): New.
9615 (struct usrregs_info): New.
9616 (struct regs_info): New.
9617 (struct process_info_private) <new_inferior>: New field.
9618 (struct linux_target_ops): Delete the num_regs, regmap, and
9619 regset_bitmap fields. New field regs_info.
9620 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9621 * i387-fp.c (num_xmm_registers): Delete.
9622 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9623 calls to new interface.
9624 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9625 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9626 Infer the number of xmm registers from the regcache's target
9627 description.
9628 * i387-fp.h (num_xmm_registers): Delete.
9629 * inferiors.c (add_thread): Don't install the thread's regcache
9630 here.
9631 * proc-service.c (gregset_info): Fetch the current inferior's
9632 regs_info. Adjust to use it.
9633 * regcache.c: Include tdesc.h.
9634 (register_bytes, reg_defs, num_registers)
9635 (gdbserver_expedite_regs): Delete.
9636 (get_thread_regcache): If the thread doesn't have a regcache yet,
9637 create one, instead of aborting gdbserver.
9638 (regcache_invalidate_one): Rename to ...
9639 (regcache_invalidate_thread): ... this.
9640 (regcache_invalidate_one): New.
9641 (regcache_invalidate): Only invalidate registers of the current
9642 process.
9643 (init_register_cache): Add target_desc parameter, and use it.
9644 (new_register_cache): Ditto. Assert the target description has a
9645 non zero registers_size.
9646 (regcache_cpy): Add assertions. Adjust.
9647 (realloc_register_cache, set_register_cache): Delete.
9648 (registers_to_string, registers_from_string): Adjust.
9649 (find_register_by_name, find_regno, find_register_by_number)
9650 (register_cache_size): Add target_desc parameter, and use it.
9651 (free_register_cache_thread, free_register_cache_thread_one)
9652 (regcache_release, register_cache_size): New.
9653 (register_size): Add target_desc parameter, and use it.
9654 (register_data, supply_register, supply_register_zeroed)
9655 (supply_regblock, supply_register_by_name, collect_register)
9656 (collect_register_as_string, collect_register_by_name): Adjust.
9657 * regcache.h (struct target_desc): Forward declare.
9658 (struct regcache) <tdesc>: New field.
9659 (init_register_cache, new_register_cache): Add target_desc
9660 parameter.
9661 (regcache_invalidate_thread): Declare.
9662 (regcache_invalidate_one): Delete declaration.
9663 (regcache_release): Declare.
9664 (find_register_by_number, register_cache_size, register_size)
9665 (find_regno): Add target_desc parameter.
9666 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9667 declarations.
9668 * remote-utils.c: Include tdesc.h.
9669 (outreg, prepare_resume_reply): Adjust.
9670 * server.c: Include tdesc.h.
9671 (gdbserver_xmltarget): Delete declaration.
9672 (get_features_xml, process_serial_event): Adjust.
9673 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9674 declare.
9675 (struct process_info) <tdesc>: New field.
9676 (ipa_tdesc): Declare.
9677 * tdesc.c: New file.
9678 * tdesc.h: New file.
9679 * tracepoint.c: Include tdesc.h.
9680 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9681 (get_context_regcache): Adjust to pass ipa_tdesc down.
9682 (do_action_at_tracepoint): Adjust to get the register cache size
9683 from the context regcache's description.
9684 (traceframe_walk_blocks): Adjust to get the register cache size
9685 from the current trace frame's description.
9686 (traceframe_get_pc): Adjust to get current trace frame's
9687 description and pass it down.
9688 (gdb_collect): Adjust to get the register cache size from the
9689 IPA's description.
9690 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9691 (gdbserver_xmltarget): Delete.
9692 (initialize_low_tracepoint): Set the ipa's target description.
9693 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9694 (initialize_low_tracepoint): Set the ipa's target description.
9695 * linux-x86-low.c: Include tdesc.h.
9696 [__x86_64__] (is_64bit_tdesc): New.
9697 (ps_get_thread_area, x86_get_thread_area): Use it.
9698 (i386_cannot_store_register): Rename to ...
9699 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9700 (i386_cannot_fetch_register): Rename to ...
9701 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9702 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9703 to new interface.
9704 (target_regsets): Rename to ...
9705 (x86_regsets): ... this.
9706 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9707 interface.
9708 (x86_siginfo_fixup): Use is_64bit_tdesc.
9709 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9710 (tdesc_x32_avx_linux, tdesc_x32_linux)
9711 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9712 Declare.
9713 (x86_linux_update_xmltarget): Delete.
9714 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9715 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9716 (AMD64_LINUX_USER64_CS): New.
9717 (x86_linux_read_description): New, based on
9718 x86_linux_update_xmltarget.
9719 (same_process_callback): New.
9720 (x86_arch_setup_process_callback): New.
9721 (x86_linux_update_xmltarget): New.
9722 (x86_regsets_info): New.
9723 (amd64_linux_regs_info): New.
9724 (i386_linux_usrregs_info): New.
9725 (i386_linux_regs_info): New.
9726 (x86_linux_regs_info): New.
9727 (x86_arch_setup): Reimplement.
9728 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9729 (x86_emit_ops): Ditto.
9730 (the_low_target): Adjust. Install x86_linux_regs_info,
9731 x86_cannot_fetch_register, and x86_cannot_store_register.
9732 (initialize_low_arch): New.
9733 * linux-ia64-low.c (tdesc_ia64): Declare.
9734 (ia64_fetch_register): Adjust.
9735 (ia64_usrregs_info, regs_info): New globals.
9736 (ia64_regs_info): New function.
9737 (the_low_target): Adjust.
9738 (initialize_low_arch): New function.
9739 * linux-sparc-low.c (tdesc_sparc64): Declare.
9740 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9741 Adjust.
9742 (sparc_arch_setup): New function.
9743 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9744 (the_low_target): Adjust.
9745 (initialize_low_arch): New function.
9746 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9747 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9748 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9749 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9750 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9751 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9752 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9753 (tdesc_powerpc_isa205_vsx64l): Declare.
9754 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9755 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9756 (ppc_set_pc, ppc_get_hwcap): Adjust.
9757 (ppc_usrregs_info): Forward declare.
9758 (!__powerpc64__) ppc_regmap_adjusted: New global.
9759 (ppc_arch_setup): Adjust to the current process'es target
9760 description.
9761 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9762 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9763 (ppc_store_evrregset): Adjust.
9764 (target_regsets): Rename to ...
9765 (ppc_regsets): ... this, and make static.
9766 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9767 (ppc_regs_info): New function.
9768 (the_low_target): Adjust.
9769 (initialize_low_arch): New function.
9770 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9771 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9772 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9773 (tdesc_s390x_linux64v2): Declare.
9774 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9775 (s390_fill_gregset, s390_store_last_break): Adjust.
9776 (target_regsets): Rename to ...
9777 (s390_regsets): ... this, and make static.
9778 (s390_get_pc, s390_set_pc): Adjust.
9779 (s390_get_hwcap): New target_desc parameter, and use it.
9780 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9781 (s390_arch_setup): Adjust to set the current process'es target
9782 description. Don't adjust the regmap.
9783 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9784 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9785 (regs_info_3264): New globals.
9786 (s390_regs_info): New function.
9787 (the_low_target): Adjust.
9788 (initialize_low_arch): New function.
9789 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9790 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9791 [__mips64] (init_registers_mips_linux)
9792 (init_registers_mips_dsp_linux): Delete defines.
9793 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9794 (have_dsp): New global.
9795 (mips_read_description): New, based on mips_arch_setup.
9796 (mips_arch_setup): Reimplement.
9797 (get_usrregs_info): New function.
9798 (mips_cannot_fetch_register, mips_cannot_store_register)
9799 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9800 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9801 (target_regsets): Rename to ...
9802 (mips_regsets): ... this, and make static.
9803 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9804 (dsp_regs_info, regs_info): New globals.
9805 (mips_regs_info): New function.
9806 (the_low_target): Adjust.
9807 (initialize_low_arch): New function.
9808 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9809 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9810 Declare.
9811 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9812 (arm_read_description): New, with bits factored from
9813 arm_arch_setup.
9814 (arm_arch_setup): Reimplement.
9815 (target_regsets): Rename to ...
9816 (arm_regsets): ... this, and make static.
9817 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9818 (arm_regs_info): New function.
9819 (the_low_target): Adjust.
9820 (initialize_low_arch): New function.
9821 * linux-m68k-low.c (tdesc_m68k): Declare.
9822 (target_regsets): Rename to ...
9823 (m68k_regsets): ... this, and make static.
9824 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9825 (m68k_regs_info): New function.
9826 (m68k_arch_setup): New function.
9827 (the_low_target): Adjust.
9828 (initialize_low_arch): New function.
9829 * linux-sh-low.c (tdesc_sharch): Declare.
9830 (target_regsets): Rename to ...
9831 (sh_regsets): ... this, and make static.
9832 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9833 (sh_regs_info, sh_arch_setup): New functions.
9834 (the_low_target): Adjust.
9835 (initialize_low_arch): New function.
9836 * linux-bfin-low.c (tdesc_bfin): Declare.
9837 (bfin_arch_setup): New function.
9838 (bfin_usrregs_info, regs_info): New globals.
9839 (bfin_regs_info): New function.
9840 (the_low_target): Adjust.
9841 (initialize_low_arch): New function.
9842 * linux-cris-low.c (tdesc_cris): Declare.
9843 (cris_arch_setup): New function.
9844 (cris_usrregs_info, regs_info): New globals.
9845 (cris_regs_info): New function.
9846 (the_low_target): Adjust.
9847 (initialize_low_arch): New function.
9848 * linux-cris-low.c (tdesc_crisv32): Declare.
9849 (cris_arch_setup): New function.
9850 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9851 (cris_regs_info): New function.
9852 (the_low_target): Adjust.
9853 (initialize_low_arch): New function.
9854 * linux-m32r-low.c (tdesc_m32r): Declare.
9855 (m32r_arch_setup): New function.
9856 (m32r_usrregs_info, regs_info): New globals.
9857 (m32r_regs_info): Adjust.
9858 (initialize_low_arch): New function.
9859 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9860 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9861 (tic6x_usrregs_info): Forward declare.
9862 (tic6x_read_description): New function, based on ...
9863 (tic6x_arch_setup): ... this. Reimplement.
9864 (target_regsets): Rename to ...
9865 (tic6x_regsets): ... this, and make static.
9866 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9867 (tic6x_regs_info): New function.
9868 (the_low_target): Adjust.
9869 (initialize_low_arch): New function.
9870 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9871 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9872 (target_regsets): Rename to ...
9873 (xtensa_regsets): ... this, and make static.
9874 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9875 globals.
9876 (xtensa_arch_setup, xtensa_regs_info): New functions.
9877 (the_low_target): Adjust.
9878 (initialize_low_arch): New function.
9879 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9880 (nios2_arch_setup): Set the current process'es tdesc.
9881 (target_regsets): Rename to ...
9882 (nios2_regsets): ... this.
9883 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9884 (nios2_regs_info): New function.
9885 (the_low_target): Adjust.
9886 (initialize_low_arch): New function.
a261b8f5
PA
9887 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9888 (aarch64_arch_setup): Set the current process'es tdesc.
9889 (target_regsets): Rename to ...
9890 (aarch64_regsets): ... this.
9891 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9892 (aarch64_regs_info): New function.
9893 (the_low_target): Adjust.
9894 (initialize_low_arch): New function.
3aee8918
PA
9895 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9896 globals.
9897 (target_regsets): Rename to ...
9898 (tile_regsets): ... this.
9899 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9900 (tile_regs_info): New function.
9901 (tile_arch_setup): Set the current process'es tdesc.
9902 (the_low_target): Adjust.
9903 (initialize_low_arch): New function.
9904 * spu-low.c (tdesc_spu): Declare.
9905 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9906 * win32-arm-low.c (tdesc_arm): Declare.
9907 (arm_arch_setup): New function.
9908 (the_low_target): Install arm_arch_setup instead of
9909 init_registers_arm.
9910 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9911 (init_windows_x86): Rename to ...
9912 (i386_arch_setup): ... this. Set `win32_tdesc'.
9913 (the_low_target): Adjust.
9914 * win32-low.c (win32_tdesc): New global.
9915 (child_add_thread): Don't create the thread cache here.
9916 (do_initial_child_stuff): Set the new process'es tdesc.
9917 * win32-low.h (struct target_desc): Forward declare.
9918 (win32_tdesc): Declare.
9919 * lynx-i386-low.c (tdesc_i386): Declare global.
9920 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9921 * lynx-low.c (lynx_tdesc): New global.
9922 (lynx_add_process): Set the new process'es tdesc.
9923 * lynx-low.h (struct target_desc): Forward declare.
9924 (lynx_tdesc): Declare global.
9925 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9926 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9927 * nto-low.c (nto_tdesc): New global.
9928 (do_attach): Set the new process'es tdesc.
9929 * nto-low.h (struct target_desc): Forward declare.
9930 (nto_tdesc): Declare.
9931 * nto-x86-low.c (tdesc_i386): Declare.
9932 (nto_x86_arch_setup): Set `nto_tdesc'.
9933
b1fbec62
GB
99342013-06-04 Gary Benson <gbenson@redhat.com>
9935
9936 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9937 to qSupported response when appropriate.
9938 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9939 with nonzero-length annex.
9940 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9941 arguments supplied in annex.
9942
d1ec4ce7
DE
99432013-05-31 Doug Evans <dje@google.com>
9944
ac44adcb 9945 PR server/15594
d1ec4ce7
DE
9946 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9947 64 bits in 64-cross-32 environment.
9948
9b25f2d3
PA
99492013-05-28 Pedro Alves <palves@redhat.com>
9950
9951 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9952 (aarch64-without-fpu.c): Delete rule.
9953 * configure.srv (aarch64*-*-linux*): Remove references to
9954 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9955 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9956 declaration.
9957
6740dc9c
PA
99582013-05-24 Pedro Alves <palves@redhat.com>
9959
9960 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9961 instead of strchr/decode_address. Error if the range isn't split
9962 with a ','. Don't assume there's be a ':' in the action.
9963
c2d6af84
PA
99642013-05-23 Yao Qi <yao@codesourcery.com>
9965 Pedro Alves <palves@redhat.com>
9966
9967 * linux-low.c (lwp_in_step_range): New function.
9968 (linux_wait_1): If the thread was range stepping and stopped
9969 outside the stepping range, report the stop to GDB. Otherwise,
9970 continue stepping. Add range stepping debug output.
9971 (linux_set_resume_request): Copy the step range from the resume
9972 request to the lwp.
9973 (linux_supports_range_stepping): New.
9974 (linux_target_ops) <supports_range_stepping>: Set to
9975 linux_supports_range_stepping.
9976 * linux-low.h (struct linux_target_ops)
9977 <supports_range_stepping>: New field.
9978 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9979 * linux-x86-low.c (x86_supports_range_stepping): New.
9980 (the_low_target) <supports_range_stepping>: Set to
9981 x86_supports_range_stepping.
9982 * server.c (handle_v_cont): Handle 'r' action.
9983 (handle_v_requests): Append ";r" if the target supports range
9984 stepping.
9985 * target.h (struct thread_resume) <step_range_start,
9986 step_range_end>: New fields.
9987 (struct target_ops) <supports_range_stepping>:
9988 New field.
9989 (target_supports_range_stepping): New macro.
9990
58794e1a
JB
99912013-05-17 Joel Brobecker <brobecker@adacore.com>
9992
9993 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9994 confusion in comment.
9995
d631c5a7
JB
99962013-05-17 Joel Brobecker <brobecker@adacore.com>
9997
9998 * lynx-low.c (struct process_info_private): New type.
9999 (lynx_add_process): New function.
10000 (lynx_create_inferior, lynx_attach): Replace calls to
10001 add_process by calls to lynx_add_process.
10002 (lynx_resume): If PTID is null, then try using
10003 current_process()->private->last_wait_event_ptid.
10004 Add comments.
10005 (lynx_clear_inferiors): Delete. The contents of that function
10006 has been inlined in lynx_mourn;
10007 (lynx_wait_1): Save the ptid in the process's private data.
10008 (lynx_mourn): Free the process' private data. Replace call
10009 to lynx_clear_inferiors by call to clear_inferiors.
10010
96f7a20f
YQ
100112013-05-17 Yao Qi <yao@codesourcery.com>
10012
10013 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10014 the right place.
10015
db0dfaa0
LM
100162013-05-16 Luis Machado <lgustavo@codesourcery.com>
10017
10018 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10019 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10020 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10021 PT_TEXT_END_ADDR guards. Update comments.
10022 (linux_target_op) <read_offsets>: Conditionally define to
10023 linux_read_offsets if the target is UCLIBC and if it defines
10024 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10025
68f5f838
SL
100262013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10027 Andrew Jenner <andrew@codesourcery.com>
10028
10029 * Makefile.in (SFILES): Add linux-nios2-low.c.
10030 (clean): Add action to delete nios2-linux.c.
10031 (nios2-linux.c): New rule.
10032 * configure.srv: Add nios2*-*-linux*.
10033 * linux-nios2-low.c: New.
10034
1ebff1fd
HAQ
100352013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10036
10037 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10038
f6150862
HZ
100392013-04-25 Hui Zhu <hui@codesourcery.com>
10040
10041 PR gdb/15186
f6150862
HZ
10042 * ax.c (ax_printf): Add fflush.
10043
614c279d
TT
100442013-04-22 Tom Tromey <tromey@redhat.com>
10045
10046 * Makefile.in (SFILES): Add filestuff.c.
10047 (OBS): Add filestuff.o.
10048 (filestuff.o): New target.
10049 * config.in, configure: Rebuild.
10050 * configure.ac: Check for fdwalk, pipe2.
10051
7d4e5717
PA
100522013-04-17 Pedro Alves <palves@redhat.com>
10053
10054 * configure.ac (USE_THREAD_DB): Delete variable.
10055 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10056 Don't AC_SUBST USE_THREAD_DB.
10057 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10058 * config.in, configure: Regenerate.
10059
d5c93e41
PA
100602013-04-16 Pedro Alves <palves@redhat.com>
10061
10062 * linux-low.h (struct lwp_info) <thread_known>: Move under
10063 the USE_THREAD_DB #ifdef.
10064
04f5fe89
PA
100652013-04-16 Pedro Alves <palves@redhat.com>
10066
10067 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10068 (linux-low.o): Delete rule.
10069 * linux-low.h: Always include "gdb_thread_db.h" instead of
10070 conditionally including thread_db.h.
10071 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10072 HAVE_THREAD_DB_H.
10073
480b27bf
JK
100742013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10075
10076 * Makefile.in (install-only): Fix make install regression.
10077
43662968
JK
100782013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10079
10080 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10081 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10082 installation.
10083 * gdbserver.1: Remove.
10084
3e74e146
PA
100852013-03-22 Pedro Alves <palves@redhat.com>
10086
10087 * linux-low.c (handle_extended_wait): Don't call
10088 linux_enable_event_reporting.
10089
a8347a2a
TT
100902013-03-15 Tony Theodore <tonyt@logyst.com>
10091
10092 PR build/9098:
10093 * Makefile.in (SHELL): Use @SHELL@.
10094
eeb56fa7
SDJ
100952013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10096
10097 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10098 compiler warning.
10099
4fa7e2ff
JB
101002013-03-13 Joel Brobecker <brobecker@adacore.com>
10101
10102 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10103 Remove extraneous NULL element.
10104
8ddb1965
YQ
101052013-03-13 Yao Qi <yao@codesourcery.com>
10106
10107 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10108 'V' block in trace frame.
10109
9accd112
MM
101102013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10111
10112 * target.h (struct target_ops): Add btrace ops.
10113 (target_supports_btrace): New macro.
10114 (target_enable_btrace): New macro.
10115 (target_disable_btrace): New macro.
10116 (target_read_btrace): New macro.
10117 * gdbthread.h (struct thread_info): Add btrace field.
10118 * server.c: Include btrace-common.h.
10119 (handle_btrace_general_set): New function.
10120 (handle_btrace_enable): New function.
10121 (handle_btrace_disable): New function.
10122 (handle_general_set): Call handle_btrace_general_set.
10123 (handle_qxfer_btrace): New function.
10124 (struct qxfer qxfer_packets[]): Add btrace entry.
10125 * inferiors.c (remove_thread): Disable btrace.
10126 * linux-low: Include linux-btrace.h.
10127 (linux_low_enable_btrace): New function.
10128 (linux_low_read_btrace): New function.
10129 (linux_target_ops): Add btrace ops.
10130 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10131 Add srv_linux_btrace=yes.
10132 (x86_64-*-linux*): Add linux-btrace.o.
10133 Add srv_linux_btrace=yes.
10134 * configure.ac: Define HAVE_LINUX_BTRACE.
10135 * config.in: Regenerated.
10136 * configure: Regenerated.
10137
5cc22e4c
MM
101382013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10139
10140 * server.c (handle_qxfer): Preserve error message if -3 is
10141 returned.
10142 (qxfer): Document the -3 return value.
10143
7c97f91e
MM
101442013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10145
10146 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10147 (linux_btrace_h): New variable.
10148 (linux-btrace.o): New rule.
10149
be9a119c 101502013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10151 Hafiz Abid Qadeer <abidh@codesourcery.com>
10152
10153 * tracepoint.c (trace_buffer_size): New global.
10154 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10155 (init_trace_buffer): Change to one-argument function. Allocate
10156 trace buffer memory.
10157 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10158 handle QTBuffer:size packet.
10159 (cmd_bigqtbuffer_size): New function.
10160 (initialize_tracepoint): Call init_trace_buffer with
10161 DEFAULT_TRACE_BUFFER_SIZE.
10162 * server.c (handle_query): Add QTBuffer:size in the
10163 supported packets.
10164
e64f7499
YQ
101652013-03-07 Yao Qi <yao@codesourcery.com>
10166
10167 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10168 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10169 of -1.
10170 (cmd_qtsp): Adjust condition. Do post increment.
10171 Set cur_action and cur_step_action back to 0.
10172
f0ae6fc3
PA
101732013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10174
10175 PR server/15236
10176 * linux-low.c (linux_write_memory): Return early success if LEN is
10177 zero.
10178
b5b0b0af
CV
101792013-03-05 Corinna Vinschen <vinschen@redhat.de>
10180
334ad4a8 10181 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10182
589bc927
TT
101832013-02-28 Tom Tromey <tromey@redhat.com>
10184
10185 * configure.ac: Invoke AC_SYS_LARGEFILE.
10186 * configure, config.in: Rebuild.
10187
dfe07582
CV
101882013-02-28 Corinna Vinschen <vinschen@redhat.com>
10189
10190 * win32-low.c: Throughout, fix format strings and casts of
10191 printf-like functions to avoid type related warnings on all
10192 platforms.
10193 (get_child_debug_event): Print dwDebugEventCode as hex since
10194 that's how it's usually documented.
10195
736cd585
YQ
101962013-02-28 Yao Qi <yao@codesourcery.com>
10197
10198 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10199 pulongest.
10200
e1f58301
JW
102012013-02-27 Jiong Wang <jiwang@tilera.com>
10202
10203 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10204 (reg-tilegx32.c): New rule.
10205 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10206 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10207 different register info initializer according to elf class.
10208 (init_registers_tilgx32): New function. The tilegx32 register info
10209 initializer.
10210 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10211 (tile_store_gregset): Likewise.
10212
d171ca78
YQ
102132013-02-27 Yao Qi <yao@codesourcery.com>
10214
10215 * server.c (process_point_options): Print debug message when
10216 debug_threads is true.
10217
282bbdf3
YQ
102182013-02-26 Yao Qi <yao@codesourcery.com>
10219
10220 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10221
aca22551
PA
102222013-02-19 Pedro Alves <palves@redhat.com>
10223 Kai Tietz <ktietz@redhat.com>
10224
10225 PR gdb/15161
10226
10227 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10228 instead of strtoul to extract address from packet.
10229 (process_serial_event) <'z'>: Likewise.
10230
4f3cee1c
YQ
102312013-02-18 Yao Qi <yao@codesourcery.com>
10232
10233 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10234
8e1d55a3
PA
102352013-02-14 Pedro Alves <palves@redhat.com>
10236
10237 Plug memory leak.
10238
10239 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10240 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10241
458820da
PA
102422013-02-14 Pedro Alves <palves@redhat.com>
10243
10244 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10245
baea0dae
PA
102462013-02-14 Pedro Alves <palves@redhat.com>
10247
10248 * tracepoint.c (save_string): Delete.
10249 (add_tracepoint_action): Use savestring instead of save_string.
10250
0b1afbb3
PA
102512013-02-12 Pedro Alves <palves@redhat.com>
10252
10253 * linux-xtensa-low.c: Ditto.
10254 * xtensa-xtregs.c: Ditto.
10255
8a4ac37e
PA
102562013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10257
10258 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10259 thread_db.
10260
148de6bb
MS
102612013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10262
10263 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10264 aarch64_num_wp_regs and aarch64_num_bp_regs to
10265 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10266
55fac6e0
MS
102672013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10268
10269 * linux-aarch64-low.c (ps_get_thread_area): Replace
10270 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10271
176eb98c
MS
102722013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10273 Marcus Shawcroft <marcus.shawcroft@arm.com>
10274 Nigel Stephens <nigel.stephens@arm.com>
10275 Yufeng Zhang <yufeng.zhang@arm.com>
10276
10277 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10278 (aarch64.c, aarch64-without-fpu.c): New targets.
10279 * configure.srv (aarch64*-*-linux*): New.
10280 * linux-aarch64-low.c: New file.
10281
56f7af9c
MS
102822013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10283
43aaf8b6 10284 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10285 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10286 (dequeue_one_deferred_signal, linux_resume_one_thread)
10287 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10288 (linux_tracefork_grandchild, linux_test_for_tracefork)
10289 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10290 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10291 where the argument is 0.
10292
60f662b0
YQ
102932013-01-25 Yao Qi <yao@codesourcery.com>
10294
10295 * event-loop.c: Include "queue.h".
10296 (gdb_event_p): New typedef.
10297 (struct gdb_event) <next_event>: Remove.
10298 (event_queue): Change to QUEUE(gdb_event_p).
10299 (async_queue_event): Remove.
10300 (gdb_event_xfree): New.
10301 (initialize_event_loop): New.
10302 (process_event): Use API from QUEUE.
10303 (wait_for_event): Likewise.
10304 * server.c (main): Call initialize_event_loop.
10305 * server.h (initialize_event_loop): Declare.
10306
5ae4861a
YQ
103072013-01-18 Yao Qi <yao@codesourcery.com>
10308
10309 * ax.h (struct eval_agent_expr_context): New.
10310 (gdb_eval_agent_expr): Update declaration.
10311 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10312 TFRAME. Add new argument CTX.
10313 * server.h (struct eval_agent_expr_context): Declare.
10314 (agent_mem_read, agent_tsv_read): Update declaration.
10315 (agent_mem_read_string): Likewise.
10316 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10317 (add_traceframe_block): Add new argument TPOINT.
10318 Increase TPOINT->traceframe_usage.
10319 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10320 eval_tracepoint_agent_expr.
10321 (condition_true_at_tracepoint): Likewise.
10322 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10323 (agent_mem_read_string, agent_tsv_read): Likewise.
10324
85e00e85
YQ
103252013-01-16 Yao Qi <yao@codesourcery.com>
10326
10327 * linux-low.c (linux_resume_one_lwp): Don't check
10328 'lwp->bp_reinsert != 0'.
10329
4039cf45
JB
103302013-01-07 Joel Brobecker <brobecker@adacore.com>
10331 Pedro Alves <palves@redhat.com>
10332
10333 * lynx-low.c (ptrace_request_to_str): Define a temporary
10334 macro and use it to simplify this function's implementation.
10335
9044dee2
JB
103362013-01-07 Joel Brobecker <brobecker@adacore.com>
10337
10338 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10339 sets errno.
10340
e6352c8f
JB
103412013-01-07 Joel Brobecker <brobecker@adacore.com>
10342
10343 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10344
50681a27
JB
103452013-01-07 Joel Brobecker <brobecker@adacore.com>
10346
10347 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10348
3f6e77ef
JB
103492013-01-07 Joel Brobecker <brobecker@adacore.com>
10350
10351 * lynx-low.c (lynx_resume): Use the resume_info parameter
10352 to determine the ptid for the lynx_ptrace call, unless
10353 it is equal to minus_one_ptid, in which case we use the
10354 ptid of the current_inferior.
10355 (lynx_wait_1): After having received a thread create/exit
10356 event, resume the inferior's execution using the signaling
10357 thread's ptid, rather than the old ptid.
10358
7fda33ae
JB
103592013-01-07 Joel Brobecker <brobecker@adacore.com>
10360
10361 * lynx-low.c (lynx_resume): Delete variable ret.
10362
b9786c74
JB
103632013-01-01 Joel Brobecker <brobecker@adacore.com>
10364
10365 * gdbreplay.c (gdbreplay_version): Update copyright year.
10366 * server.c (gdbserver_version): Likewise.
10367
8b93d60f
JB
103682012-12-17 Joel Brobecker <brobecker@adacore.com>
10369
10370 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10371 new thread.
10372
037335a7
JB
103732012-12-17 Joel Brobecker <brobecker@adacore.com>
10374
10375 * lynx-low.c (ptrace_request_to_str): Add handling for
10376 PTRACE_GETTRACESIG.
10377
52d4cbd8
JB
103782012-12-17 Joel Brobecker <brobecker@adacore.com>
10379
10380 * lynx-low.c (lynx_attach): Delete variable new_process.
10381
ab8f6ca9
JB
103822012-12-17 Joel Brobecker <brobecker@adacore.com>
10383
10384 * lynx-low.c (lynx_create_inferior): Delete variable
10385 new_process.
10386
78cbc024
JB
103872012-12-17 Joel Brobecker <brobecker@adacore.com>
10388
10389 * lynx-low.c (ptrace_request_to_str): Do not handle
10390 PTRACE_GETTHREADLIST if this macro does not exist.
10391
14a00470
YQ
103922012-12-15 Yao Qi <yao@codesourcery.com>
10393
10394 * Makefile.in (OBS): Add notif.o.
10395 * notif.c, notif.h: New.
10396 * server.c: Include "notif.h".
10397 (struct vstop_notif) <next>: Remove.
10398 <base>: New field.
10399 (queue_stop_reply): Update.
10400 (push_event, send_next_stop_reply): Remove.
10401 (discard_queued_stop_replies): Update.
10402 (notif_stop): New variable.
10403 (handle_v_stopped): Remove.
10404 (handle_v_requests): Don't call handle_v_stopped. Call
10405 handle_ack_notif instead.
10406 (queue_stop_reply_callback): Call notif_event_enque instead
10407 of queue_stop_reply.
10408 (handle_status): Don't call send_next_stop_reply, call
10409 notif_write_event instead.
10410 (kill_inferior_callback): Likewise.
10411 (detach_or_kill_inferior_callback): Likewise.
10412 (main): Call initialize_notif.
10413 (process_serial_event): Call QUEUE_is_empty.
10414 (handle_target_event): Call notif_push instead of push event.
10415 * server.h (push_event): Remove declaration.
10416
61c125b9
TT
104172012-12-10 Tom Tromey <tromey@redhat.com>
10418
10419 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10420 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10421 macros.
10422 (.c.o): Rewrite.
10423 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10424 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10425 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10426 (amd64-linux-ipa.o, ax.o): Rewrite.
10427 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10428 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10429 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10430 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10431 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10432 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10433 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10434 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10435 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10436 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10437 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10438 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10439 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10440 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10441 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10442 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10443 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10444 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10445 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10446 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10447 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10448 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10449 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10450 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10451 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10452 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10453 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10454 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10455 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10456 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10457 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10458 (reg-tilegx.o): Remove.
10459 (all_object_files): New macro.
10460 Include .deps files.
10461 * aclocal.m4, configure: Rebuild.
10462 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10463 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10464 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10465
e90e9ad9
TT
104662012-12-05 Tom Tromey <tromey@redhat.com>
10467
10468 PR gdb/14917:
10469 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10470
02d403bf 104712012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10472
10473 * configure.ac: Check for linux/perf_event.h.
10474 * config.in: Regenerated.
10475 * configure: Regenerated.
10476
0270a750
PA
104772012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10478
10479 * hostio.c (handle_readlink): Decrease buffer size
10480 parameter passed to readlink by one byte.
10481
8c29b58e
YQ
104822012-11-26 Yao Qi <yao@codesourcery.com>
10483
10484 * configure.ac (build_warnings): Append '-Wempty-body'.
10485 * configure: Regenerated.
10486 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10487 body.
10488
8bdce1ff
PM
104892012-11-15 Pierre Muller <muller@sourceware.org>
10490
10491 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10492 * config.in: Regenerate.
10493 * configure: Regenerate.
10494 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10495 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10496 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10497 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10498 header.
10499 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10500 instead of <sys/wait.h> header.
10501 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10502
02d403bf 105032012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10504
10505 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10506 (various make rules): Remove -DGDBSERVER
10507
fbd5db48
YQ
105082012-11-09 Yao Qi <yao@codesourcery.com>
10509
10510 * spu-low.c (current_ptid): Move it to ..
10511 * gdbthread.h: ... here. New.
10512 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10513 * server.c (myresume, process_serial_event): Likewise.
10514 * thread-db.c (thread_db_find_new_threads): Likewise.
10515 * tracepoint.c (run_inferior_command): Likewise.
10516
b3dc46ff
AB
105172012-10-01 Andrew Burgess <aburgess@broadcom.com>
10518
10519 * server.c (handle_search_memory_1): Include access length in
10520 warning message.
10521
07c04788
HPN
105222012-09-05 Michael Brandt <michael.brandt@axis.com>
10523
10524 * linux-crisv32-low.c: Fix compile errors.
10525
918d227b
YQ
105262012-09-04 Yao Qi <yao@codesourcery.com>
10527
10528 * tracepoint.c (cmd_qtsv): Adjust debug message.
10529 Don't check CUR_TPOINT.
10530
18c1b81a
YQ
105312012-08-28 Yao Qi <yao@codesourcery.com>
10532
10533 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10534 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10535 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10536 Remove declarations of xmalloc, xreallloc, xstrdup and
10537 freeargv.
10538 * Makefile.in (libiberty_h): New.
10539 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10540 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10541
dc82f37b
YQ
105422012-08-23 Yao Qi <yao@codesourcery.com>
10543
10544 * server.h: Remove declaration of 'xsnprintf'.
10545
406b1477
KS
105462012-08-22 Keith Seitz <keiths@redhat.com>
10547
10548 * server.h: Include build-gnulib-gbserver/config.h.
10549 * gdbreplay.c: Likewise.
10550
e6712ff1
DE
105512012-08-08 Doug Evans <dje@google.com>
10552
10553 * Makefile.in (SFILES): Add gdb_vecs.c.
10554 (OBS): Add gdb_vecs.o.
10555 (gdb_vecs_h, host_defs_h): New variables.
10556 (thread-db.o): Add $(gdb_vecs_h) dependency.
10557 (gdb_vecs.o): New rule.
10558 * thread-db.c: #include "gdb_vecs.h".
10559 (thread_db_load_search): Use a vector to iterate over path elements.
10560 Handle text appearing after "$pdir".
10561
10562 * configure.ac: Add check for strstr.
10563 * config.in: Regenerate.
10564 * configure: Regenerate.
10565
7c3270ae
UW
105662012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10567
10568 * hostio.c (handle_pread): If pread fails, fall back to attempting
10569 lseek/read.
10570 (handle_pwrite): Likewise for pwrite.
10571
b62e2b27
UW
105722012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10573
10574 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10575 between unsupported TYPE and unimplementable ADDR/LEN combination.
10576 (arm_insert_point): Act on new return value.
10577
78a99e91
PA
105782012-07-31 Pedro Alves <palves@redhat.com>
10579
10580 * server.c (process_point_options): Only skip tokens if we find
10581 one that is unrecognized. Don't treat 'X' specially while
10582 skipping unrecognized tokens.
10583
fcf303ab
UW
105842012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10585
10586 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10587 to 4-byte-align HW breakpoint addresses for Thumb.
10588
7255706c
YQ
105892012-07-27 Yao Qi <yao@codesourcery.com>
10590
10591 PR remote/14161.
10592
10593 * server.h: Declare gdb_agent_about_to_close.
10594 * target.c (kill_inferior): Include "agent.h".
10595 New. Send command 'kill'.
10596 * target.h (kill_inferior): Removed macro.
10597 * tracepoint.c (gdb_agent_about_to_close): New.
10598 (gdb_agent_helper_thread): Handle command 'close'.
10599 Wait endlessly until the inferior stops.
10600 Install gdb_agent_remove_socket to atexit hook.
10601 (agent_socket_name): New static variable.
10602 (gdb_agent_socket_init): Replace local variable 'name' with
10603 'agent_socket_name'.
10604 (gdb_agent_remove_socket): New.
10605
5a3f286f
YQ
106062012-07-27 Yao Qi <yao@codesourcery.com>
10607
10608 * server.c (process_point_options): Stop at 'X' when parsing.
10609
961bd387
ME
106102012-07-19 Michael Eager <eager@eagercon.com>
10611
a261b8f5 10612 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10613 to hw_execute.
10614 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10615 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10616 hardware breakpoint.
10617
aa7c7447
JK
106182012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10619
10620 * gdbserver/linux-low.c (initialize_low): Call
10621 linux_ptrace_init_warnings.
10622
7f216e7c
DE
106232012-07-02 Doug Evans <dje@google.com>
10624
10625 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10626 pointer to int.
10627
d3ce09f5
SS
106282012-07-02 Stan Shebs <stan@codesourcery.com>
10629
10630 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10631 (ax.o): Add it to build rule.
10632 (ax-ipa.o): Ditto.
10633 (OBS): Add format.o.
10634 (IPA_OBS): Add format.o.
10635 * server.c (handle_query): Claim support for breakpoint commands.
10636 (process_point_options): Add command case.
10637 (process_serial_event): Leave running if there are printfs in
10638 effect.
10639 * mem-break.h (any_persistent_commands): Declare.
10640 (add_breakpoint_commands): Declare.
10641 (gdb_no_commands_at_breakpoint): Declare.
10642 (run_breakpoint_commands): Declare.
10643 * mem-break.c (struct point_command_list): New struct.
10644 (struct breakpoint): New field command_list.
10645 (any_persistent_commands): New function.
10646 (add_commands_to_breakpoint): New function.
10647 (add_breakpoint_commands): New function.
10648 (gdb_no_commands_at_breakpoint): New function.
10649 (run_breakpoint_commands): New function.
10650 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10651 locally.
10652 * ax.c: Include format.h.
10653 (ax_printf): New function.
10654 (gdb_eval_agent_expr): Add printf opcode.
10655
2f8f6aed
YQ
106562012-06-13 Yao Qi <yao@codesourcery.com>
10657
10658 * server.c (start_inferior): Remove duplicated writes to fields
10659 'last_resume_kind' and 'last_status' of 'current_inferior'.
10660
0c9070b3
YQ
106612012-06-12 Yao Qi <yao@codesourcery.com>
10662 Pedro Alves <palves@redhat.com>
10663
10664 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10665 comment.
10666 * server.c (handle_v_cont): Extend comment.
10667
c52daf70
YQ
106682012-06-11 Yao Qi <yao@codesourcery.com>
10669
10670 * linux-low.c (linux_attach): Add 'static'.
10671
d38bbb0a
YQ
106722012-06-06 Yao Qi <yao@codesourcery.com>
10673
10674 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10675
89dc0afd
JK
106762012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10677
10678 Fix gcc -flto compilation warning.
10679 * server.c (main): Make variable multi_mode and attach volatile.
10680
75f62ce7
TJB
106812012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10682
10683 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10684 if the platform doesn't know about it.
10685
65f479b6
PA
106862012-05-30 Jeff Kenton <jkenton@tilera.com>
10687
10688 * Makefile.in (SFILES): Add linux-tile-low.c.
10689 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10690 * configure.srv: Handle tilegx-*-linux*.
10691 * linux-tile-low.c: New file.
10692
0c5bf5a9
JK
106932012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10694
10695 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10696
a493e3e2
PA
106972012-05-24 Pedro Alves <palves@redhat.com>
10698
10699 PR gdb/7205
10700
43aaf8b6 10701 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10702
2ea28649
PA
107032012-05-24 Pedro Alves <palves@redhat.com>
10704
10705 PR gdb/7205
10706
10707 Replace target_signal with gdb_signal throughout.
10708
8d409d16
MR
107092012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10710
10711 * linux-low.c (linux_store_registers): Avoid the copying sequence
10712 when no data has been retrieved by ptrace.
10713
23512c01
MGD
107142012-05-22 Will Deacon <will.deacon@arm.com>
10715
10716 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10717 Include asm/ptrace.h.
10718 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10719 already defined.
10720
4934b29e
MR
107212012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10722
10723 * linux-low.c (linux_store_registers): Don't re-retrieve data
10724 with ptrace that has already been obtained from /proc. Always
10725 copy any data retrieved with ptrace to the buffer supplied.
10726
bde24c0a
PA
107272012-05-11 Yao Qi <yao@codesourcery.com>
10728 Pedro Alves <palves@redhat.com>
10729
10730 * linux-low.c (enum stopping_threads_kind): New.
10731 (stopping_threads): Change type to `enum stopping_threads_kind'.
10732 (handle_extended_wait): If stopping and suspending threads, leave
10733 the new_lwp suspended too.
10734 (linux_wait_for_event): Adjust.
10735 (stop_all_lwps): Set `stopping_threads' to
10736 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10737 whether we're suspending threads or just stopping them. Assert no
10738 recursion happens.
10739
623b6bdf
YQ
107402012-04-29 Yao Qi <yao@codesourcery.com>
10741
10742 * server.h: Move some code to ...
10743 * gdbthread.h: ... here. New.
10744 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10745 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10746 (nto-low.o, win32-low.o): Likewise.
10747 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10748 * regcache.c, remote-utils.c, server.c: Likewise.
10749 * target.c, tracepoint.c, win32-low.c: Likewise.
10750
f15f9948
TJB
107512012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10752
10753 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10754 (PTRACE_ARG4_TYPE): Likewise.
10755 (PTRACE_XFER_TYPE): Likewise.
10756 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10757 ptrace to PTRACE_ARG3_TYPE.
10758 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10759 (PTRACE_ARG4_TYPE): Likewise.
10760 (PTRACE_XFER_TYPE): Likewise.
10761 (linux_detach_one_lwp): Cast fourth argument of
10762 ptrace to long then PTRACE_ARG4_TYPE.
10763 (regsets_fetch_inferior_registers): Cast third argument of
10764 ptrace to long then PTRACE_ARG3_TYPE.
10765 (regsets_store_inferior_registers): Likewise.
10766
38ea300a
PA
107672012-04-20 Pedro Alves <palves@redhat.com>
10768
10769 * configure: Regenerate.
10770
c971b7fa
PA
107712012-04-19 Pedro Alves <palves@redhat.com>
10772
43aaf8b6 10773 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10774 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10775 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10776 (all, install-only, uninstall, clean-info, all-lib, clean): No
10777 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10778 (maintainer-clean realclean distclean): Use subdir_do.
10779 (subdir_do): New.
10780 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10781 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10782 * acinclude.m4: Include acx_configure_dir.m4.
10783 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10784 calls. Call AC_PROG_RANLIB. Configure gnulib using
10785 ACX_CONFIGURE_DIR.
10786 (GNULIB): New.
10787 (GNULIB_STDINT_H): Adjust.
10788 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10789 * gdbreplay.c: Include build-gnulib/config.h.
10790 * server.h: Likewise.
10791 * aclocal.m4: Regenerate.
10792 * config.in: Regenerate.
10793 * configure: Regenerate.
c971b7fa 10794
809277f8
PA
107952012-04-19 Pedro Alves <palves@redhat.com>
10796
10797 * Makefile.in (LIBGNU, INCGNU): Adjust.
10798 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10799 (all, install-only, uninstall, clean-info, all-lib, clean)
10800 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10801 * configure.ac: Adjust AC_OUTPUT output.
10802 * aclocal.m4: Regenerate.
10803 * configure: Regenerate.
10804
fd9bb8b8
PA
108052012-04-19 Pedro Alves <palves@redhat.com>
10806
10807 * Makefile.in (generated_files): New.
10808 (server_h): Remove the explicit dependency on config.h, and depend
10809 on $generated_files.
10810
1c298c66
PA
108112012-04-19 Pedro Alves <palves@redhat.com>
10812
10813 * Makefile.in (INCGNU): Add -Ignulib.
10814
57c4b50b
PA
108152012-04-19 Pedro Alves <palves@redhat.com>
10816
10817 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10818 (INCGNU): ... this, and spell out -I here.
10819 (GNULIB_LIB): Rename to ...
10820 (LIBGNU): ... this.
10821 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10822
1030e047
PA
108232012-04-19 Pedro Alves <palves@redhat.com>
10824
10825 * config.in: Regenerate.
10826
447d4319
PA
108272012-04-19 Pedro Alves <palves@redhat.com>
10828
10829 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10830 * server.h (memmem): Remove declaration.
10831 * config.in: Regenerate.
10832 * configure: Regenerate.
10833
aad9eab9
YQ
108342012-04-19 Yao Qi <yao@codesourcery.com>
10835
10836 * Makefile.in (SFILES): Add common/vec.c.
10837 (OBS): Add vec.o.
10838 (vec.o): New rule.
10839
3e10640f
YQ
108402012-04-19 Yao Qi <yao@codesourcery.com>
10841
10842 * remote-utils.c (prepare_resume_reply): Replace with macro
10843 target_core_of_thread.
10844 * server.c (handle_qxfer_threads_proper): Likewise.
10845 * target.h (traget_core_of_thread): New macro.
10846
71622373
PA
108472012-04-18 Pedro Alves <palves@redhat.com>
10848
10849 * aclocal.m4: Regenerate.
10850 * configure: Regenerate.
10851
80d26939
YQ
108522012-04-16 Yao Qi <yao@codesourcery.com>
10853
10854 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10855 duplicated on address.
10856
42476b70
YQ
108572012-04-16 Yao Qi <yao@codesourcery.com>
10858
10859 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10860 (struct tracepoint_action_ops) <send>: New field.
10861 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10862 (agent_expr_send, x_tracepoint_action_send): New.
10863 (l_tracepoint_action_send): New.
10864 (cmd_qtdp): Download and install tracepoint
10865 according to `use_agent'.
10866 (run_inferior_command): Add one more parameter `len'.
10867 Update callers.
10868 (tracepoint_send_agent): New.
10869 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10870
7bc83639
YQ
108712012-04-16 Yao Qi <yao@codesourcery.com>
10872
10873 * tracepoint.c (download_tracepoints): Moved to ...
10874 (cmd_qtstart): ... here.
10875
5f18041e
YQ
108762012-04-14 Yao Qi <yao@codesourcery.com>
10877
10878 * tracepoint.c: Include inttypes.h.
10879 (struct collect_memory_action): Use sized types.
10880 (struct tracepoint): Likewise.
10881 (cmd_qtdp, stop_tracing): Update print specifiers.
10882 (cmd_qtp, response_tracepoint): Likewise.
10883 (collect_data_at_tracepoint): Likewise.
10884 (collect_data_at_step): Likewise.
10885
55a8c076
YQ
108862012-04-14 Yao Qi <yao@codesourcery.com>
10887
10888 Import gnulib module inttypes.
10889 * aclocal.m4, config.in, configure: Regenerated.
10890
dc750257
YQ
108912012-04-14 Yao Qi <yao@codesourcery.com>
10892
10893 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10894 Makefile and config.status at last.
10895
0ab5faf9
YQ
108962012-04-13 Yao Qi <yao@codesourcery.com>
10897
10898 * tracepoint.c: Include stdint.h unconditionally.
10899
18f5fd81
TJB
109002012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10901
10902 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10903 on BFD_HAVE_SYS_PROCFS_TYPE.
10904 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10905 * configure: Regenerate.
10906 * config.in: Likewise.
10907
4d47af5c
L
109082012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10909
10910 * Makefile.in (clean): Also remove x32.c x32-linux.c
10911 x32-avx.c x32-avx-linux.c.
10912 (x32.o): New target.
10913 (x32.c): Likewise.
10914 (x32-linux.o): Likewise.
10915 (x32-linux.c): Likewise.
10916 (x32-avx.o): Likewise.
10917 (x32-avx.c): Likewise.
10918 (x32-avx-linux.o): Likewise.
10919 (x32-avx-linux.c): Likewise.
10920
10921 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10922 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10923 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10924 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10925 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10926 i386/x32-avx-linux.xml.
10927
10928 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10929 (init_registers_x32_avx_linux): Likwise.
10930 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10931 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10932
ecedbe58
PA
109332012-04-13 Pedro Alves <palves@redhat.com>
10934
10935 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10936 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10937 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10938 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10939 the sub-make.
10940
c92b5177
L
109412012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10942
10943 * linux-x86-low.c (compat_x32_clock_t): New.
10944 (compat_x32_siginfo_t): Likewise.
10945 (compat_x32_siginfo_from_siginfo): Likewise.
10946 (siginfo_from_compat_x32_siginfo): Likewise.
10947 (linux_is_elf64): Likewise.
10948 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10949 and siginfo_from_compat_x32_siginfo for x32.
10950 (x86_arch_setup): Set linux_is_elf64.
10951
214d508e
L
109522012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10953
10954 PR gdb/13969
10955 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10956 e_machine field.
10957 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10958 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10959 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10960 compatible with process.
10961
c9a1864a
YQ
109622012-04-12 Yao Qi <yao@codesourcery.com>
10963
10964 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10965 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10966 (install-only, install-info, clean): Handle sub dir gnulib.
10967 (all-lib, am--refresh): New targets.
10968 (memmem.o): Remove target.
10969 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10970 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10971 (AC_REPLACE_FUNCS): Remove memmem.
10972 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10973 (AC_OUTPUT): Generate Makefile in gnulib/.
10974 * aclocal.m4, config.in, configure: Regenerated.
10975
367ba2c2
MR
109762012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10977
10978 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10979
9d236627
PA
109802012-04-05 Pedro Alves <palves@redhat.com>
10981
10982 -Werror=strict-aliasing
10983
10984 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10985 pointer.
10986
111217b3
PA
109872012-04-04 Pedro Alves <palves@redhat.com>
10988
10989 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10990 (sparc_store_gregset_from_stack, sparc_store_gregset)
10991 (sparc_breakpoint_at): Fix formatting.
10992
8365dcf5
TJB
109932012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10994
10995 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10996 are available.
10997 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10998 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10999 * config.in: Regenerate.
11000 * configure: Likewise.
11001
689cc2ae
PA
110022012-03-29 Pedro Alves <palves@redhat.com>
11003
11004 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11005 Correct ptrace arguments.
11006
c14dfd32
PA
110072012-03-28 Pedro Alves <palves@redhat.com>
11008
11009 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11010 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11011 (IA64_FR1_REGNUM): New defines.
11012 (ia64_fetch_register): New.
11013 (the_low_target): Install it.
11014 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11015 field.
11016 * linux-low.c (linux_fetch_registers): Try the
11017 the_low_target.fetch_register hook first.
11018
11019 * linux-arm-low.c (the_low_target): Adjust.
11020 * linux-bfin-low.c (the_low_target): Adjust.
11021 * linux-cris-low.c (the_low_target): Adjust.
11022 * linux-crisv32-low.c (the_low_target): Adjust.
11023 * linux-m32r-low.c (the_low_target): Adjust.
11024 * linux-m68k-low.c (the_low_target): Adjust.
11025 * linux-mips-low.c (the_low_target): Adjust.
11026 * linux-ppc-low.c (the_low_target): Adjust.
11027 * linux-s390-low.c (the_low_target): Adjust.
11028 * linux-sh-low.c (the_low_target): Adjust.
11029 * linux-sparc-low.c (the_low_target): Adjust.
11030 * linux-tic6x-low.c (the_low_target): Adjust.
11031 * linux-x86-low.c (the_low_target): Adjust.
11032 * linux-xtensa-low.c (the_low_target): Adjust.
11033
63c88e13
PA
110342012-03-26 Pedro Alves <palves@redhat.com>
11035
11036 * server.c (handle_qxfer_libraries): Don't bail early if
11037 the_target->qxfer_libraries_svr4 is not NULL.
11038
fb723180
PA
110392012-03-26 Pedro Alves <palves@redhat.com>
11040
11041 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11042
0afae3cf
PA
110432012-03-23 Pedro Alves <palves@redhat.com>
11044
11045 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11046 "library-list-svr4" element's start tag when the the DSO list is
11047 empty.
11048
485f1ee4
PA
110492012-03-23 Pedro Alves <palves@redhat.com>
11050
11051 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11052 a variable whose type size is the same as the inferior's pointer
11053 size.
11054
a5362b9a
TS
110552012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11056
11057 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11058 struct siginfo.
11059 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11060 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11061 * linux-low.h: Include <signal.h>.
11062 (struct siginfo): Remove forward declaration.
11063 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11064 struct siginfo.
11065
d226c142
MF
110662012-03-21 Mike Frysinger <vapier@gentoo.org>
11067
11068 * .gitignore: Ignore more files.
11069
122f36ef
PA
110702012-03-19 Pedro Alves <palves@redhat.com>
11071 Jan Kratochvil <jan.kratochvil@redhat.com>
11072
11073 * server.c (cont_thread, general_thread): Add describing comments.
11074 (start_inferior): Clear `cont_thread'.
11075 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11076 of a process.
11077
fc3e5175
YQ
110782012-03-15 Yao Qi <yao@codesourcery.com>
11079
11080 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11081 handling to ...
11082 (cmd_qtdp): ... here.
11083
8d0d92cd
YQ
110842012-03-15 Yao Qi <yao@codesourcery.com>
11085
11086 * tracepoint.c (struct tracepoint_action_ops): New.
11087 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11088 (m_tracepoint_action_download): New.
11089 (r_tracepoint_action_download): New.
11090 (x_tracepoint_action_download): New.
11091 (l_tracepoint_action_download): New.
11092 (add_tracepoint_action): Install `action->ops' according type.
11093 (download_tracepoint_1): Move code `download' function pointer
11094 of various tracepoint_action_ops.
11095
87b0bb13
JK
110962012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11097
11098 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11099 linux_ptrace_attach_warnings.
11100
5f572dec
JK
111012012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11102
11103 * Makefile.in (linux-ptrace.o): New.
11104 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11105 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11106 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11107 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11108 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11109 of these targets.
11110 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11111
f4647387
YQ
111122012-03-08 Yao Qi <yao@codesourcery.com>
11113 Pedro Alves <palves@redhat.com>
11114
11115 Fix PR server/13392.
11116 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11117 offset of JMP insn.
11118 * tracepoint.c (remove_tracepoint): New.
11119 (cmd_qtdp): Call remove_tracepoint when failed to install.
11120
9b224c5e
PA
111212012-03-07 Pedro Alves <palves@redhat.com>
11122
11123 * linux-low.c (get_detach_signal): New.
11124 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11125 Pass on pending signals to PTRACE_DETACH. Check the result of the
11126 ptrace call.
11127 * server.c (program_signals, program_signals_p): New.
11128 (handle_general_set): Handle QProgramSignals.
11129 * server.h (program_signals, program_signals_p): Declare.
11130
e237a7e2
JK
111312012-03-05 Pedro Alves <palves@redhat.com>
11132 Jan Kratochvil <jan.kratochvil@redhat.com>
11133
11134 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11135 New comment why.
11136
5808517f
YQ
111372012-03-03 Yao Qi <yao@codesourcery.com>
11138
11139 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11140 agent_look_up_symbols.
11141
58b4daa5
YQ
111422012-03-03 Yao Qi <yao@codesourcery.com>
11143
11144 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11145 (linux-x86-low.o): Likewise.
11146 * server.h: Remove in_process_agent_loaded.
11147 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11148 common/agent.c.
11149 Update callers.
11150
8ffcbaaf
YQ
111512012-03-03 Yao Qi <yao@codesourcery.com>
11152
11153 * tracepoint.c (gdb_agent_capability): New global.
11154 (in_process_agent_loaded_ust): Renamed to
11155 `in_process_agent_supports_ust'.
11156 Update callers.
11157 (in_process_agent_supports_ust): Call agent_capability_check.
11158 (clear_installed_tracepoints): Assert that agent supports
11159 agent.
11160
d1feda86
YQ
111612012-03-03 Yao Qi <yao@codesourcery.com>
11162
11163 * linux-low.c (linux_supports_agent): New.
11164 (linux_target_ops): Initialize field `supports_agent' with
11165 linux_supports_agent.
11166 * target.h (struct target_ops) <supports_agent>: New.
11167 (target_supports_agent): New macro.
11168 * server.c (handle_general_set): Handle packet 'QAgent'.
11169 (handle_query): Send `QAgent+'.
11170 * Makefile.in (server.o): Depends on agent.h.
11171
2fa291ac
YQ
111722012-03-03 Yao Qi <yao@codesourcery.com>
11173
11174 * Makefile.in (OBS): Add agent.o.
11175 Add new rule for agent.o.
11176 Track dependence of tracepoint.c on agent.h.
11177 * tracepoint.c (run_inferior_command_1):
11178 (run_inferior_command): Call agent_run_command.
11179 (gdb_ust_connect_sync_socket): Deleted. Move it to
11180 common/agent.c.
11181 (resume_thread, stop_thread): Likewise.
11182 (gdb_ust_socket_init): Renamed to ...
11183 (gdb_agent_socket_init): ... New.
11184 (gdb_ust_thread): Renamed to ...
11185 (gdb_agent_helper_thread): ... New.
11186 (gdb_ust_init): Move some code to ...
11187 (gdb_agent_init): ... here. New.
11188 [HAVE_UST]: Call gdb_ust_init.
11189 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11190 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11191 * config.in, configure: Regenerated.
11192
05044653
PA
111932012-03-02 Pedro Alves <palves@redhat.com>
11194
11195 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11196 * linux-low.c (struct simple_pid_list): New.
11197 (stopped_pids): New a struct simple_pid_list pointer.
11198 (add_to_pid_list, pull_pid_from_list): New.
11199 (handle_extended_wait): Don't assume the first signal new children
11200 report is SIGSTOP. Adjust call to pull_pid_from_list.
11201 (linux_wait_for_lwp): Adjust.
11202
8d00225b
YQ
112032012-03-02 Yao Qi <yao@codesourcery.com>
11204
11205 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11206 debug log.
11207
19560ba5
YQ
112082012-03-02 Yao Qi <yao@codesourcery.com>
11209
11210 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11211 `stop_pc' and `tpoint'. Update caller.
11212
1faeff08
MR
112132012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11214
11215 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11216 * linux-low.c (use_linux_regsets): New macro.
11217 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11218 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11219 (linux_register_in_regsets): New function.
11220 (usr_fetch_inferior_registers): Skip registers covered by
11221 regsets.
11222 (usr_store_inferior_registers): Likewise.
11223 (usr_fetch_inferior_registers): New macro.
11224 (usr_store_inferior_registers): Likewise.
11225 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11226 (linux_store_registers): Likewise.
11227 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11228 prototype.
11229 (init_registers_mips64_dsp_linux): Likewise.
11230 (init_registers_mips_linux): New macro.
11231 (init_registers_mips_dsp_linux): Likewise.
11232 (mips_dsp_num_regs): Likewise.
11233 (DSP_BASE, DSP_CONTROL): New fallback macros.
11234 (mips_base_regs): New macro.
11235 (mips_regmap): Use it. Fix the size.
11236 (mips_dsp_regmap): New variable.
11237 (mips_dsp_regset_bitmap): Likewise.
11238 (mips_arch_setup): New function.
11239 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11240 than mips_regmap.
11241 (mips_cannot_store_register): Likewise.
11242 (the_low_target): Update .arch_setup, .num_regs and .regmap
11243 initializers. Add .regset_bitmap initializer.
11244 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11245 initializer.
11246 * linux-bfin-low.c (the_low_target): Likewise.
11247 * linux-cris-low.c (the_low_target): Likewise.
11248 * linux-crisv32-low.c (the_low_target): Likewise.
11249 * linux-ia64-low.c (the_low_target): Likewise.
11250 * linux-m32r-low.c (the_low_target): Likewise.
11251 * linux-m68k-low.c (the_low_target): Likewise.
11252 * linux-ppc-low.c (the_low_target): Likewise.
11253 * linux-s390-low.c (the_low_target): Likewise.
11254 * linux-sh-low.c (the_low_target): Likewise.
11255 * linux-sparc-low.c (the_low_target): Likewise.
11256 * linux-tic6x-low.c (the_low_target): Likewise.
11257 * linux-x86-low.c (the_low_target): Likewise.
11258 * linux-xtensa-low.c (the_low_target): Likewise.
11259 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11260 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11261 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11262 srv_xmlfiles.
11263 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11264 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11265
c03e6ccc
YQ
112662012-02-29 Yao Qi <yao@codesourcery.com>
11267 Pedro Alves <palves@redhat.com>
11268
11269 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11270 `step_over_finished' is true.
11271
644cebc9
PA
112722012-02-27 Pedro Alves <palves@redhat.com>
11273
11274 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11275 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11276
c14d7ab2
PA
112772012-02-27 Pedro Alves <palves@redhat.com>
11278
11279 PR server/9684
11280 * linux-low.c (pid_is_stopped): New.
11281 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11282
412c89dd
LM
112832012-02-25 Luis Machado <lgustavo@codesourcery.com>
11284
11285 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11286 of conditions.
11287
b745defe
MR
112882012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11289
11290 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11291
9f3a5c85
LM
112922012-02-24 Luis Machado <lgustavo@codesourcery>
11293
11294 * server.c (handle_query): Advertise support for target-side
11295 breakpoint condition evaluation.
11296 (process_point_options): New function.
11297 (process_serial_event): When inserting a breakpoint, check for
11298 a target-side condition that should be evaluated.
11299
11300 * mem-break.c: Include regcache.h and ax.h.
11301 (point_cond_list_t): New data structure.
11302 (breakpoint) <cond_list>: New field.
11303 (find_gdb_breakpoint_at): Make non-static.
11304 (delete_gdb_breakpoint_at): Clear any target-side
11305 conditions.
11306 (clear_gdb_breakpoint_conditions): New function.
11307 (add_condition_to_breakpoint): Likewise.
11308 (add_breakpoint_condition): Likewise.
11309 (gdb_condition_true_at_breakpoint): Likewise.
11310 (gdb_breakpoint_here): Return result directly instead
11311 of going through a local variable.
11312
11313 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11314 (clear_gdb_breakpoint_conditions): Likewise.
11315 (add_breakpoint_condition): Likewise.
11316 (gdb_condition_true_at_breakpoint): Likewise.
11317
11318 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11319 (need_step_over_p): Take target-side breakpoint condition into
11320 consideration.
11321
5e1dc496
LM
113222012-02-24 Luis Machado <lgustavo@codesourcery>
11323
11324 * server.h: Include tracepoint.h.
11325 (agent_mem_read, agent_get_trace_state_variable_value,
11326 agent_set_trace_state_variable_value,
11327 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11328 get_set_tsv_func_addr): New prototypes.
11329
11330 * ax.h: New include file.
11331 * ax.c: New source file.
11332
11333 * tracepoint.c: Include ax.h.
11334 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11335 agent_expr, eval_result_type): Move to ax.h.
11336 (parse_agent_expr): Rename to ...
11337 (gdb_parse_agent_expr): ... this, make it non-static and move
11338 to ax.h.
11339 (unparse_agent_expr) Rename to ...
11340 (gdb_unparse_agent_expr): ... this, make it non-static and move
11341 to ax.h.
11342 (eval_agent_expr): Rename to ...
11343 (eval_tracepoint_agent_expr): ... this.
11344 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11345 forward declarations.
11346 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11347 (agent_get_trace_state_variable_value): New function.
11348 (agent_set_trace_state_variable_value): New function.
11349 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11350 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11351 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11352 (condition_true_at_tracepoint): Likewise.
11353 (parse_agent_expr): Rename to ...
11354 (gdb_parse_agent_expr): ... this and move to ax.c.
11355 (unparse_agent_expr): Rename to ...
11356 (gdb_unparse_agent_expr): ... this and move to ax.c.
11357 (gdb_agent_op_name): Move to ax.c.
11358 (eval_agent_expr): Rename to ...
11359 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11360 and move to ax.c.
11361 (eval_tracepoint_agent_expr): New function.
11362 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11363 non-static.
5e1dc496
LM
11364 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11365 ax.c.
11366 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11367 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11368 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11369 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11370 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11371 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11372 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11373 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11374 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11375 (compile_bytecodes): Remove forward declaration.
11376 (is_goto_target): Move to ax.c.
11377 (compile_bytecodes): Move to ax.c and call
11378 agent_get_trace_state_variable_value (...) and
11379 agent_set_trace_state_variable_value (...).
11380
11381 * Makefile.in: Update ax.c and IPA dependencies.
11382
277e4e52
PA
113832012-02-24 Pedro Alves <palves@redhat.com>
11384
11385 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11386 (cmd_bigqtbuffer_circular): ... this. Only handle
11387 'QTBuffer:circular:'.
11388 (handle_tracepoint_general_set): Adjust.
11389
bf4c19f7
YQ
113902012-02-16 Yao Qi <yao@codesourcery.com>
11391
11392 * inferiors.c: Move code to ...
11393 * dll.c: .... here. New.
11394 * server.h: Declare clear_dlls.
11395 * Makefile.in (SFILES): Add dll.c.
11396 (OBS): Add dll.o
11397 (dll.o): New rule.
11398
d73f2619
YQ
113992012-02-11 Yao Qi <yao@codesourcery.com>
11400
11401 * server.c: (handle_monitor_command): Add a new parameter
11402 `own_buf'.
11403 (handle_query): Update caller.
11404
f8255c2a
JB
114052012-02-09 Joel Brobecker <brobecker@adacore.com>
11406
11407 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11408 * configure, config.in: Regenerate.
11409 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11410 is not defined.
11411
da84f473
PA
114122012-02-02 Pedro Alves <palves@redhat.com>
11413
11414 Try SIGKILL first, then PTRACE_KILL.
11415 * linux-low.c (linux_kill_one_lwp): New.
11416 (linux_kill_one_lwp): Rename to ...
11417 (kill_one_lwp_callback): ... this. Use the new
11418 linux_kill_one_lwp.
11419
e886a173
PA
114202012-02-02 Pedro Alves <palves@redhat.com>
11421
11422 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11423 inferior.
11424
be07f1a2
PA
114252012-01-27 Pedro Alves <palves@redhat.com>
11426
11427 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11428 (elf_64_file_p): Make static.
11429 (linux_pid_exe_is_elf_64_file): New.
11430 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11431 Delete declarations.
11432 (linux_pid_exe_is_elf_64_file): Declare.
11433 * linux-x86-low.c (x86_arch_setup): Use
11434 linux_pid_exe_is_elf_64_file.
11435
d8301ad1
JK
114362012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11437
11438 * linux-low.c (linux_wait_for_event_1): Rename to ...
11439 (linux_wait_for_event): ... here and merge it with former
11440 linux_wait_for_event - new variable wait_ptid, use it.
11441 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11442
01b17894
PA
114432012-01-23 Pedro Alves <palves@redhat.com>
11444
11445 * server.c (main): Avoid yet another case of infinite loop while
11446 detaching/killing after a longjmp.
11447
e825046f
JK
114482012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11449
11450 Code cleanup.
11451 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11452
b9e7b9c3
UW
114532012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11454
11455 * hostio.c (handle_readlink): New function.
11456 (handle_vFile): Call it to handle "vFile:readlink" packets.
11457
901f9912
UW
114582012-01-20 Pedro Alves <palves@redhat.com>
11459 Ulrich Weigand <ulrich.weigand@linaro.org>
11460
11461 * server.c (handle_v_requests): Only support vAttach and vRun to
11462 start multiple processes when in extended protocol mode.
11463
fc1ab1a0
PA
114642012-01-17 Pedro Alves <palves@redhat.com>
11465
11466 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11467 memalign plus mprotect to allocate the scratch buffer.
11468
7d5d4e98
PA
114692012-01-13 Pedro Alves <palves@redhat.com>
11470
11471 * server.c (attach_inferior): Clear `cont_thread'.
11472
f128d5e9
PA
114732012-01-13 Pedro Alves <palves@redhat.com>
11474
11475 * server.c (main): Avoid infinite loop while detaching/killing
11476 after a longjmp.
11477
06db92f0
DE
114782012-01-09 Doug Evans <dje@google.com>
11479
11480 * server.c (start_inferior): Set last_ptid in --wrapper case.
11481
32d92999
YQ
114822012-01-06 Yao Qi <yao@codesourcery.com>
11483
11484 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11485 defined.
11486 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11487
5e0a92a9
YQ
114882012-01-04 Yao Qi <yao@codesourcery.com>
11489
11490 * tracepoint.c (cmd_qtdp): Print debug message
11491 for static tracepoint.
11492
ae639e8c
YQ
114932012-01-04 Yao Qi <yao@codesourcery.com>
11494
11495 * tracepoint.c (trace_vdebug): Differentiate debug message
11496 between gdbserver and IPA.
11497
f72429c5
YQ
114982012-01-03 Yao Qi <yao@codesourcery.com>
11499
11500 * tracepoint.c (tracepoint_was_hit): Don't collect for
11501 static tracepoint.
11502
12c3e59c
JB
115032012-01-02 Joel Brobecker <brobecker@adacore.com>
11504
11505 * terminal.h: Reformat copyright header.
11506
67827812
JB
115072012-01-02 Joel Brobecker <brobecker@adacore.com>
11508
11509 * server.c (gdbserver_version): Update copyright year.
11510 * gdbreplay.c (gdbreplay_version): Likewise.
11511
3e52c33d
JK
115122011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11513
11514 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11515
11516 Revert:
11517 2011-12-18 Hui Zhu <teawater@gmail.com>
11518 * linux-low.c (linux_create_inferior): Save return value to ret.
11519
66f1260e
HZ
115202011-12-18 Hui Zhu <teawater@gmail.com>
11521
11522 * linux-low.c (linux_create_inferior): Save return value to ret.
11523
e77616d7
DE
115242011-12-16 Doug Evans <dje@google.com>
11525
e7b06c57
DE
11526 * linux-low.c (linux_create_inferior): If stdio connection,
11527 redirect stdin from /dev/null, stdout to stderr.
11528 * remote-utils.c (remote_is_stdio): New static global.
11529 (remote_connection_is_stdio): New function.
11530 (remote_prepare): Handle stdio connection.
11531 (remote_open): Ditto.
11532 (remote_close): Don't close stdin for stdio connections.
11533 (read_prim,write_prim): New functions. Replace all calls to
11534 read/write to these.
11535 * server.c (main): Watch for "-" argument. Move call to
11536 remote_prepare before start_inferior.
11537 * server.h (STDIO_CONNECTION_NAME): New macro.
11538 (remote_connection_is_stdio): Declare.
11539
e77616d7
DE
11540 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11541 in debugging output.
11542
82067193
YQ
115432011-12-15 Yao Qi <yao@codesourcery.com>
11544
11545 * tracepoint.c: Include sys/syscall.h.
11546 (gdb_ust_thread): Remove preprocessor conditional.
11547
82bfbe7e
PA
115482011-12-14 Pedro Alves <pedro@codesourcery.com>
11549
11550 * linux-low.c (linux_detach_one_lwp): Call
11551 the_low_target.prepare_to_resume before detaching.
11552
712c6575
YQ
115532011-12-14 Yao Qi <yao@codesourcery.com>
11554
11555 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11556 of write.
11557
d54d1edf
YQ
115582011-12-14 Yao Qi <yao@codesourcery.com>
11559
11560 * i386-low.c (i386_low_stopped_data_address): Initialize local
11561 variable `control'.
11562
6210a125
PA
115632011-12-13 Pedro Alves <pedro@codesourcery.com>
11564
11565 PR remote/13492
11566
11567 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11568 DR_CONTROL unless necessary. Extend comments.
11569 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11570 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11571
2ece8244
YQ
115722011-12-13 Yao Qi <yao@codesourcery.com>
11573
11574 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11575 macros.
11576 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11577
784867a5
JK
115782011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11579
11580 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11581 Print new debug message for such case.
11582
6bf36717
JK
115832011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11584
11585 Fix overlapping memcpy.
11586 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11587 the read_inferior_memory transfer.
11588 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11589 write_inferior_memory transfer.
11590 (set_fast_tracepoint_jump): New variable buf. Use it for the
11591 read_inferior_memory and write_inferior_memory transfers.
11592 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11593 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11594 Use it for the write_inferior_memory transfer.
11595 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11596 buffers.
11597
50275556
MR
115982011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11599
11600 * linux-low.c (fetch_register, store_register): Make code
11601 consistent, fix formatting.
11602
7325beb4
MR
116032011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11604
11605 * linux-low.c (usr_store_inferior_registers): Factor out code
11606 to handle individual registers into...
11607 (store_register): ... this new function.
11608
c642a434
UW
116092011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11610
11611 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11612 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11613 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11614 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11615 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11616 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11617 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11618 (srv_xmlfiles): Add new XML files.
11619
11620 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11621 and <sys/uio.h>.
11622 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11623 (init_registers_s390_linux32v1): Add prototype.
11624 (init_registers_s390_linux32v2): Likewise.
11625 (init_registers_s390_linux64v1): Likewise.
11626 (init_registers_s390_linux64v2): Likewise.
11627 (init_registers_s390x_linux64v1): Likewise.
11628 (init_registers_s390x_linux64v2): Likewise.
11629 (s390_num_regs): Increment to 52.
11630 (s390_regmap): Add orig_r2 register.
11631 (s390_num_regs_3264): Increment to 68.
11632 (s390_regmap_3264): Add orig_r2 register.
11633 (s390_collect_ptrace_register): Handle orig_r2 register.
11634 (s390_supply_ptrace_register): Likewise.
11635 (s390_fill_last_break): New function.
11636 (s390_store_last_break): Likewise.
11637 (s390_fill_system_call): New function.
11638 (s390_store_system_call): Likewise.
11639 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11640 register sets.
11641 (s390_check_regset): New function.
11642 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11643 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11644 Update target_regsets for available register sets.
11645
2268b414
JK
116462011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11647 Jan Kratochvil <jan.kratochvil@redhat.com>
11648
11649 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11650 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11651 New.
11652 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11653 * linux-low.h (struct process_info_private): New member r_debug.
11654 * server.c (handle_qxfer_libraries): Call
11655 the_target->qxfer_libraries_svr4.
11656 (handle_qxfer_libraries_svr4): New function.
11657 (qxfer_packets): New entry "libraries-svr4".
11658 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11659 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11660 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11661 PACKET_qXfer_libraries_svr4.
11662
d6db1fab
UW
116632011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11664
11665 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11666 PSW address/mask between 8-byte and 16-byte formats.
11667 (s390_supply_ptrace_register): Likewise.
11668 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11669 basic addressing mode bit.
11670
242f5f1c
SS
116712011-11-24 Stan Shebs <stan@codesourcery.com>
11672
11673 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11674
f196051f
SS
116752011-11-17 Stan Shebs <stan@codesourcery.com>
11676
11677 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11678 (tracing_start_time): New global.
11679 (tracing_stop_time): New global.
11680 (tracing_user_name): New global.
11681 (tracing_notes): New global.
11682 (tracing_stop_note): New global.
11683 (cmd_qtstart): Set traceframe_usage, start_time.
11684 (stop_tracing): Set stop_time.
11685 (cmd_qtstatus): Report additional status.
11686 (cmd_qtp): New function.
11687 (handle_tracepoint_query): Call it.
11688 (cmd_qtnotes): New function.
11689 (handle_tracepoint_general_set): Call it.
11690 (get_timestamp): Rename from tsv_get_timestamp.
11691
405f8e94
SS
116922011-11-14 Stan Shebs <stan@codesourcery.com>
11693 Kwok Cheung Yeung <kcy@codesourcery.com>
11694
11695 * linux-x86-low.c (small_jump_insn): New.
11696 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11697 trampoline and error message, build a trampoline and issue a small
11698 jump instruction to it.
11699 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11700 trampoline and error message.
11701 (x86_get_min_fast_tracepoint_insn_len): New.
11702 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11703 * linux-low.h (struct linux_target_ops): Add arguments to
11704 install_fast_tracepoint_jump_pad operation, add new operation.
11705 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11706 arguments.
11707 (linux_get_min_fast_tracepoint_insn_len): New function.
11708 (linux_target_op): Add new operation.
11709 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11710 (gdb_trampoline_buffer_end): Ditto.
11711 (gdb_trampoline_buffer_error): Ditto.
11712 (struct ipa_sym_addresses): Add fields for new IPA variables.
11713 (symbol_list): Add entries for new IPA variables.
11714 (struct tracepoint): Add fields to hold the address range of the
11715 trampoline used by the tracepoint.
11716 (trampoline_buffer_head): New static variable.
11717 (trampoline_buffer_tail): Ditto.
11718 (claim_trampoline_space): New function.
11719 (have_fast_tracepoint_trampoline_buffer): New function.
11720 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11721 structure.
11722 (install_fast_tracepoint): Ditto, also add error buffer argument.
11723 (cmd_qtminftpilen): New function.
11724 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11725 (fast_tracepoint_from_trampoline_address): New function.
11726 (fast_tracepoint_collecting): Handle trampoline as part of jump
11727 pad space.
11728 (set_trampoline_buffer_space): New function.
11729 (initialize_tracepoint): Initialize new IPA variables.
11730 * target.h (struct target_ops): Add arguments to
11731 install_fast_tracepoint_jump_pad operation, add new
11732 get_min_fast_tracepoint_insn_len operation.
11733 (target_get_min_fast_tracepoint_insn_len): New.
11734 (install_fast_tracepoint_jump_pad): Add arguments.
11735 * server.h (IPA_BUFSIZ): Define.
11736 * linux-i386-ipa.c: Include extra header files.
11737 (initialize_fast_tracepoint_trampoline_buffer): New function.
11738 (initialize_low_tracepoint): Call it.
11739 * server.h (set_trampoline_buffer_space): Declare.
11740 (claim_trampoline_space): Ditto.
11741 (have_fast_tracepoint_trampoline_buffer): Ditto.
11742
1e4d1764
YQ
117432011-11-14 Yao Qi <yao@codesourcery.com>
11744
11745 * server.c (handle_query): Handle InstallInTrace for qSupported.
11746 * tracepoint.c (add_tracepoint): Sort list.
11747 (install_tracepoint, download_tracepoint): New.
11748 (cmd_qtdp): Call them to install and download tracepoints.
11749 (sort_tracepoints): Removed.
11750 (cmd_qtstart): Update.
11751
5c73ff4e
YQ
117522011-11-14 Yao Qi <yao@codesourcery.com>
11753
11754 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11755 * mem-break.h: Declare.
11756 * tracepoint.c (cmd_qtstart): Move some code to ...
11757 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11758 New.
11759 (download_tracepoints): Move some code to ...
11760 (download_tracepoint_1): ... here. New.
11761
86a30030
YQ
117622011-11-08 Yao Qi <yao@codesourcery.com>
11763
11764 * remote-utils.c (relocate_instruction): A comment fix.
11765
8d26e50c
JB
117662011-11-07 Joel Brobecker <brobecker@adacore.com>
11767
11768 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11769 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11770 dr_status_mirror and dr_control_mirror from debug_reg_state.
11771 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11772 (i386_initial_stuff): Remove use of deleted globals.
11773 (i386_get_thread_context, i386_set_thread_context,
11774 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11775 from debug_reg_state.
11776
a59306a3
YQ
117772011-11-05 Yao Qi <yao@codesourcery.com>
11778
11779 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11780 address as TPOINT's.
11781
3065dfb6
SS
117822011-11-02 Stan Shebs <stan@codesourcery.com>
11783
11784 * tracepoint.c (agent_mem_read_string): New function.
11785 (eval_agent_expr): Call it for tracenz.
11786 * server.c (handle_query): Report support for tracenz.
11787
fd0d8c7c
YQ
117882011-11-02 Yao Qi <yao@codesourcery.com>
11789
11790 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11791
609086b1
YQ
117922011-11-02 Yao Qi <yao@codesourcery.com>
11793
11794 * target.h: Fix a typo in comment.
11795
b9fd1791
PA
117962011-10-31 Pedro Alves <pedro@codesourcery.com>
11797
11798 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11799 clobber the breakpoints' shadows with fast tracepoint jumps.
11800 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11801 * target.c (write_inferior_memory): Also pass MYADDR down to
11802 check_mem_write.
11803
03583c20
UW
118042011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11805
11806 * configure.ac: Check support for personality routine.
11807 * configure: Regenerate.
11808 * config.in: Likewise.
11809 * linux-low.c: Include <sys/personality.h>.
11810 Define ADDR_NO_RANDOMIZE if necessary.
11811 (linux_create_inferior): Disable address space randomization when
11812 forking inferior, if requested.
11813 (linux_supports_disable_randomization): New function.
11814 (linux_target_ops): Install it.
11815 * server.h (disable_randomization): Declare.
11816 * server.c (disable_randomization): New global variable.
11817 (handle_general_set): Handle QDisableRandomization.
11818 (handle_query): Likewise for qSupported.
11819 (main): Support --disable-randomization and --no-disable-randomization
11820 command line arguments.
11821 * target.h (struct target_ops): Add supports_disable_randomization.
11822 (target_supports_disable_randomization): New macro.
11823
723b724b
MF
118242011-09-29 Mike Frysinger <vapier@gentoo.org>
11825
11826 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11827 ifdef check.
11828 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11829 [!PT_GETDSBT] (target_loadmap): New definition.
11830 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11831 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11832 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11833 and PT_GETDSBT to LINUX_LOADMAP.
11834 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11835 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11836
55329a5c 118372011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11838
11839 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11840 (arm_linux_hwbp_cap): New static variable.
11841 (arm_linux_get_hwbp_cap): Replace by ...
11842 (arm_linux_init_hwbp_cap): ... this new function.
11843 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11844 (arm_linux_get_hw_watchpoint_count): Likewise.
11845 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11846 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11847 (arm_prepare_to_resume): Use perror_with_name instead of error.
11848
55329a5c 118492011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11850
11851 * linux-arm-low.c: Include <signal.h>.
11852 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11853 (struct arm_linux_hwbp_cap): New data type.
11854 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11855 (struct arm_linux_hw_breakpoint): New data type.
11856 (MAX_BPTS, MAX_WPTS): Define.
11857 (struct arch_process_info, struct arch_lwp_info): New data types.
11858 (arm_linux_get_hwbp_cap): New function.
11859 (arm_linux_get_hw_breakpoint_count): Likewise.
11860 (arm_linux_get_hw_watchpoint_count): Likewise.
11861 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11862 (arm_hwbp_control_initialize): Likewise.
11863 (arm_hwbp_control_is_enabled): Likewise.
11864 (arm_hwbp_control_is_initialized): Likewise.
11865 (arm_hwbp_control_disable): Likewise.
11866 (arm_linux_hw_breakpoint_equal): Likewise.
11867 (arm_linux_hw_point_initialize): Likewise.
11868 (struct update_registers_data): New data structure.
11869 (update_registers_callback: New function.
11870 (arm_insert_point): Likewise.
11871 (arm_remove_point): Likewise.
11872 (arm_stopped_by_watchpoint): Likewise.
11873 (arm_stopped_data_address): Likewise.
11874 (arm_new_process): Likewise.
11875 (arm_new_thread): Likewise.
11876 (arm_prepare_to_resume): Likewise.
11877 (the_low_target): Register arm_insert_point, arm_remove_point,
11878 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11879 arm_new_thread, and arm_prepare_to_resume.
11880
6b9801d4
SS
118812011-09-15 Stan Shebs <stan@codesourcery.com>
11882
11883 * server.h (struct emit_ops): Add compare-goto fields.
11884 * tracepoint.c (gdb_agent_op_sizes): New table.
11885 (emit_eq_goto): New function.
11886 (emit_ne_goto): New function.
11887 (emit_lt_goto): New function.
11888 (emit_le_goto): New function.
11889 (emit_gt_goto): New function.
11890 (emit_ge_goto): New function.
11891 (is_goto_target): New function.
11892 (compile_bytecodes): Recognize special cases of compare-goto
11893 combinations and call specialized emitters for them.
11894 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11895 (amd64_emit_ne_goto): New function.
11896 (amd64_emit_lt_goto): New function.
11897 (amd64_emit_le_goto): New function.
11898 (amd64_emit_gt_goto): New function.
11899 (amd64_emit_ge_goto): New function.
11900 (amd64_emit_ops): Add the new functions.
11901 (i386_emit_eq_goto): New function.
11902 (i386_emit_ne_goto): New function.
11903 (i386_emit_lt_goto): New function.
11904 (i386_emit_le_goto): New function.
11905 (i386_emit_gt_goto): New function.
11906 (i386_emit_ge_goto): New function.
11907 (i386_emit_ops): Add the new functions.
11908
bf15cbda
SS
119092011-09-08 Stan Shebs <stan@codesourcery.com>
11910
11911 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11912 (i386_emit_epilogue): Restore %ebx.
11913
943ca1dd
JZ
119142011-08-31 Jie Zhang <jzhang918@gmail.com>
11915
11916 * server.c (step_thread): Remove definition.
11917 (process_serial_event): Don't handle Hs.
11918 * server.h (step_thread): Remove declaration.
11919 * target.c (set_desired_inferior): Remove use of step_thread.
11920
e3deef73
LM
119212011-08-24 Luis Machado <lgustavo@codesourcery.com>
11922
11923 * linux-low.c: Include linux-procfs.h.
11924 (linux_attach_lwp_1): Update comments.
11925 (linux_attach): Scan for existing threads when attaching to a
11926 process that is the tgid.
11927 * Makefile.in: Update dependencies.
11928
13da1c97
LM
119292011-08-24 Luis Machado <lgustavo@codesourcery.com>
11930
11931 * configure.srv: Add linux-procfs.o dependencies.
11932
881127c9
YQ
119332011-08-14 Yao Qi <yao@codesourcery.com>
11934
11935 * target.h (struct target_ops): Fix indent.
11936 * win32-low.c (win32_target_ops): Fix comment.
11937
58dbd541
YQ
119382011-08-14 Andrew Jenner <andrew@codesourcery.com>
11939 Yao Qi <yao@codesourcery.com>
11940
11941 * Makefile.in (clean): Remove tic6x-*.c files.
11942 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11943 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11944 (tic6x-c64xp-linux.c): Likewise.
11945 * configure.srv: Add support for tic6x-*-uclinux.
11946 * linux-tic6x-low.c: New.
11947 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11948
78d85199
YQ
119492011-08-14 Andrew Stubbs <ams@codesourcery.com>
11950 Yao Qi <yao@codesourcery.com>
11951
11952 * target.h (struct target_ops): Add read_loadmap.
11953 * linux-low.c (struct target_loadseg): New type.
11954 (struct target_loadmap): New type.
11955 (linux_read_loadmap): New function.
11956 (linux_target_ops): Add linux_read_loadmap.
11957 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11958 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11959 to NULL.
78d85199 11960
a959a88d
EZ
119612011-08-05 Eli Zaretskii <eliz@gnu.org>
11962
11963 * win32-low.c: Include <stdint.h>.
11964
1ced966e
PA
119652011-07-22 Pedro Alves <pedro@codesourcery.com>
11966
11967 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11968 to the inferior here.
11969 (i386_remove_aligned_watchpoint): Ditto.
11970 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11971 fit part of the watchpoint in the debug registers.
11972 (i386_update_inferior_debug_regs): New.
11973 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11974 registers, and only update the inferior on success.
11975 (i386_low_remove_watchpoint): Ditto.
11976
d26e3629
KY
119772011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11978
11979 * linux-low.c (compare_ints, unique, list_threads, show_process,
11980 linux_core_of_thread): Delete.
11981 (linux_target_ops): Change linux_core_of_thread to
11982 linux_common_core_of_thread.
11983 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11984 * utils.c (malloc_failure): Change type of argument.
11985 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11986 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11987 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11988 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11989 (IPA_OBJS): Add common-utils-ipa.o.
11990 (ptid_h, linux_osdata_h): New macros.
11991 (server_h): Add common/common-utils.h, common/xml-utils.h,
11992 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11993 common/ptid.h.
11994 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11995 ptid.o, buffer.o): New rules.
11996 (linux-low.o): Add common/linux-osdata.h as a dependency.
11997 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11998 * configure.ac: Add AC_HEADER_DIRENT check.
11999 * config.in: Regenerate.
12000 * configure: Regenerate.
12001 * remote-utils.c (xml_escape_text): Delete.
12002 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12003 buffer_xml_printf): Move to common/buffer.c.
12004 * server.c (main): Remove call to initialize_inferiors.
12005 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12006 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12007 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12008 internal_error, gdb_assert, gdb_assert_fail): Delete.
12009 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12010 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12011 common/buffer.h.
12012 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12013 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12014 initialize_inferiors): Delete.
12015
2275a1a7
PA
120162011-07-20 Pedro Alves <pedro@codesourcery.com>
12017
12018 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12019 symbol error.
12020
0a5b1e09
PA
120212011-05-31 Pedro Alves <pedro@codesourcery.com>
12022
12023 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12024 assertion.
12025 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12026
6938fd34
YQ
120272011-05-26 Yao Qi <yao@codesourcery.com>
12028
12029 * Makefile.in (thread-db.o): Track dependence to
12030 common/gdb_thread_db.h.
12031 * thread-db.c: include gdb_thread_db.h from right place.
12032
b481f9e0
TT
120332011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12034
12035 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12036 __FILE__ and __LINE__ to internal_error.
12037
98a5dd13
DE
120382011-05-13 Doug Evans <dje@google.com>
12039
12040 * thread-db.c (try_thread_db_load_from_sdir): New function.
12041 (try_thread_db_load_from_dir): New function.
12042 (thread_db_load_search): Handle $sdir, ignore $pdir.
12043 Remove trying of system directories if search of
12044 libthread-db-search-path fails, that is now done via $sdir.
12045
d248b706
KY
120462011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12047
12048 * server.c (handle_query): Add EnableDisableTracepoints to the list
12049 of supported features.
43aaf8b6 12050 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12051 tracepoints.
43aaf8b6
PA
12052 (cmd_qtenable_disable): New.
12053 (cmd_qtstart): Install tracepoints even if disabled.
12054 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12055 receiving a QTEnable or QTDisable packet.
12056 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12057 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12058 tracepoints.
12059 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12060
84e578fb
DE
120612011-05-10 Doug Evans <dje@google.com>
12062
12063 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12064
71f55dd8
DE
120652011-05-04 Doug Evans <dje@google.com>
12066
12067 * linux-low.c (linux_join): Skip process lookup.
12068 * spu-low.c (spu_join): Ditto.
12069 * server.c (join_inferiors_callback): Delete.
12070 (process_serial_event): For 'D' packet (detach) call join_inferior
12071 directly.
12072
4d393d60
JM
120732011-05-04 Joseph Myers <joseph@codesourcery.com>
12074
12075 * README: Don't mention xscale*-*-linux*.
12076 * configure.srv (xscale*-*-linux*): Don't handle target.
12077
b00ad6ff
NF
120782011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12079
12080 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12081 casting pointers.
12082 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12083 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12084 (i386_emit_void_call_2): Likewise.
12085
af96c192
YQ
120862011-04-26 Yao Qi <yao@codesourcery.com>
12087
43aaf8b6
PA
12088 * linux-low.c: Move common macros to linux-ptrace.h.
12089 Include linux-ptrace.h.
af96c192
YQ
12090 * Makefile.in (linux_ptrace_h): New.
12091 (linux-low.o): Depends on linux-ptrace.h.
12092
03f2bd59
JK
120932011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12094
12095 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12096 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12097 (remote_prepare): New function with most of the TCP code from ...
12098 (remote_open): ... here. Detect PORT here unconditionally. Move also
12099 setting transport_is_reliable.
12100 * server.c (run_once): New variable.
12101 (gdbserver_usage): Document it.
12102 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12103 the first run if RUN_ONCE.
12104 * server.h (run_once, remote_prepare): New declarations.
12105
7a9dd1b2
TT
121062011-04-19 Tom Tromey <tromey@redhat.com>
12107
12108 * win32-low.c (handle_load_dll): Remove duplicate "the".
12109
81239425
PM
121102011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12111
12112 Remove support for old Cygwin 1.5 versions.
12113 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12114 function to avoid warning.
12115 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12116 warning.
12117
9e0627f1
PM
121182011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12119
12120 * gdbserver/server.h (Macro _): Define it if not available.
12121
588eebee
MS
121222011-03-14 Michael Snyder <msnyder@vmware.com>
12123
348af9f7 12124 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12125
43f70d4c
JB
121262011-03-10 Joel Brobecker <brobecker@adacore.com>
12127
12128 * Makefile.in (maintainer-clean realclean distclean): Remove
12129 "make ... subdir_do" command.
12130
348af9f7
MS
121312011-03-10 Michael Snyder <msnyder@vmware.com>
12132
12133 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12134
12135 * server.c (handle_v_run): Free alloced buffer on early return.
12136
e637a4f5
YQ
121372011-03-09 Yao Qi <yao@codesourcery.com>
12138
12139 Revert:
12140 2011-03-04 Yao Qi <yao@codesourcery.com>
12141
12142 * Makefile.in: Remove GNU make feature --directory.
12143
12144 2011-03-05 Yao Qi <yao@codesourcery.com>
12145
12146 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12147 (subdir_do): New make target. Copied from gdb/Makefile.
12148 (maintainer-clean, realclean, distclean, clean): Call corresponding
12149 make targets in common/Makefile.
12150
12151 2011-02-11 Yao Qi <yao@codesourcery.com>
12152
12153 * configure.ac: Call AC_PROG_RANLIB.
12154 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12155 * configure: Regenerate.
12156
e6edda56
JK
121572011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12158
12159 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12160
e5141119
JB
121612011-03-06 Yao Qi <yao@codesourcery.com>
12162
12163 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12164
64794aa4
JB
121652011-03-05 Yao Qi <yao@codesourcery.com>
12166
12167 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12168 (subdir_do): New make target. Copied from gdb/Makefile.
12169 (maintainer-clean, realclean, distclean, clean): Call corresponding
12170 make targets in common/Makefile.
12171
7a762829
YQ
121722011-03-04 Yao Qi <yao@codesourcery.com>
12173
12174 * Makefile.in: Remove GNU make feature --directory.
12175
348af9f7
MS
121762011-03-04 Michael Snyder <msnyder@vmware.com>
12177
12178 * server.c (queue_stop_reply): Call xmalloc not malloc.
12179
121802011-03-02 Michael Snyder <msnyder@vmware.com>
12181
12182 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12183
9f72fee2
MS
121842011-02-28 Michael Snyder <msnyder@vmware.com>
12185
588eebee
MS
12186 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12187 (cmd_qtframe): Ditto.
12188 (cmd_qtbuffer): Ditto.
12189 (cmd_bigqtbuffer): Ditto.
12190
9f72fee2
MS
12191 * utils.c (decimal2str): Initialize 'width' to nine, then
12192 don't mess with it.
12193
8040bd49
UW
121942011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12195
12196 * hostio.c (require_data): Free *data, not data.
12197
7e52cbd0
JK
121982011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12199
12200 * hostio.c (require_data): Use free, not xfree.
12201
9130f83e
MS
122022011-02-27 Michael Snyder <msnyder@vmware.com>
12203
4b812f4e
MS
12204 * server.c (handle_query): Discard unused value.
12205
9130f83e
MS
12206 * hostio.c (require_data): Free malloc memory before returning
12207 error.
12208
69d37113
MS
122092011-02-26 Michael Snyder <msnyder@vmware.com>
12210
12211 * linux-low.c (list_threads): Call closedir for dirent.
12212
35f5825a
MS
122132011-02-27 Michael Snyder <msnyder@vmware.com>
12214
2a589cef
MS
12215 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12216 a case statement falls through.
12217
0adea5f7
MS
12218 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12219
35f5825a
MS
12220 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12221 in comparison.
12222
238f1c74
MS
122232011-02-26 Michael Snyder <msnyder@vmware.com>
12224
12225 * utils.c (decimal2str): Eliminate dead code and dead param.
12226 (pulongest): Drop dead param from call to decimal2str.
12227 (plongest): Ditto.
12228
633ff500
JB
122292011-02-24 Joel Brobecker <brobecker@adacore.com>
12230
12231 Revert the following patch (not approved yet):
12232 2011-02-21 Hui Zhu <teawater@gmail.com>
12233 * tracepoint.c (tp_printf): New function.
12234 (eval_agent_expr): Handle gdb_agent_op_printf.
12235
f9c6ff72
HZ
122362011-02-21 Hui Zhu <teawater@gmail.com>
12237
12238 * tracepoint.c (tp_printf): New function.
12239 (eval_agent_expr): Handle gdb_agent_op_printf.
12240
94d5e490
TT
122412011-02-18 Tom Tromey <tromey@redhat.com>
12242
12243 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12244 (tracepoint.o): Likewise.
12245 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12246 (gdb_agent_op_names): Likewise.
12247
c7f96d2b
TT
122482011-02-18 Tom Tromey <tromey@redhat.com>
12249
12250 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12251 gdb_agent_op_rot>: New constants.
12252 (gdb_agent_op_names): Add pick and roll.
12253 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12254 cases.
12255
0feedb2c
JK
122562011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12257
12258 * aclocal.m4: Regenerated with aclocal-1.11.1.
12259
b3b9301e
PA
122602011-02-14 Pedro Alves <pedro@codesourcery.com>
12261
12262 * server.c (handle_qxfer_traceframe_info): New.
12263 (qxfer_packets): Register "traceframe-info".
12264 (handle_query): Report support for qXfer:traceframe-info:read+.
12265 * tracepoint.c (match_blocktype): New.
12266 (traceframe_find_block_type): Rename to ...
12267 (traceframe_walk_blocks): ... this. Add callback filter argument,
12268 and use it.
12269 (traceframe_find_block_type): New, reimplemented on top of
12270 traceframe_walk_blocks.
12271 (build_traceframe_info_xml): New.
12272 (traceframe_read_info): New.
12273 * server.h (traceframe_read_info): Declare.
12274
4f3e6fb7
YQ
122752011-02-11 Yao Qi <yao@codesourcery.com>
12276
12277 * configure.ac: Call AC_PROG_RANLIB.
12278 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12279 * configure: Regenerate.
12280
764880b7
PA
122812011-02-07 Pedro Alves <pedro@codesourcery.com>
12282
12283 * server.c (gdb_read_memory): Change return semantics to allow
12284 partial transfers.
12285 (handle_search_memory_1): Adjust.
12286 (process_serial_event) <'m' packet>: Handle partial transfers.
12287 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12288
1c79eb8a
PA
122892011-01-28 Pedro Alves <pedro@codesourcery.com>
12290
12291 * regcache.c (init_register_cache): Initialize
12292 regcache->register_status.
12293 (free_register_cache): Release regcache->register_status.
12294 (regcache_cpy): Copy register_status.
12295 (registers_to_string): Print 'x's for unavailable registers.
12296 (supply_register): Mark the register's status valid or
12297 unavailable, depending on whether a buffer was passed in or not.
12298 (supply_register_zeroed): New.
12299 (supply_regblock): Mark the registers' status valid or
12300 unavailable, depending on whether a buffer was passed in or not.
12301 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12302 (struct regcache): New `register_status' field.
12303 (supply_register_zeroed): Declare.
12304 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12305 supply_register_zeroed, rather than passing a NULL buffer to
12306 supply_register.
12307 * tracepoint.c (fetch_traceframe_registers): Update comment.
12308
85724a0e
PA
123092011-01-28 Pedro Alves <pedro@codesourcery.com>
12310
12311 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12312 buffer explicit.
12313
d08aafef
PA
123142011-01-25 Pedro Alves <pedro@codesourcery.com>
12315
12316 * server.h (decode_xfer_write): Change prototype.
12317 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12318 and don't extract the annex here.
12319 * server.c (decode_xfer_read): Remove `annex' parameter,
12320 and don't extract the annex here.
12321 (decode_xfer): New.
12322 (struct qxfer): New.
12323 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12324 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12325 (handle_qxfer_statictrace): New functions, abstracted out from
12326 handle_query, and made to use the struct qxfer interface.
12327 (handle_threads_qxfer_proper): Rename to ...
12328 (handle_qxfer_threads_proper): ... this.
12329 (handle_threads_qxfer): Rename to ...
12330 (handle_qxfer_threads): ... this. Adjust.
12331 (qxfer_packets): New array.
12332 (handle_qxfer): New function.
12333 (handle_query): Use handle_qxfer.
12334
493e2a69
MS
123352011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12336
12337 * gdbreplay.c: Shorten lines of >= 80 columns.
12338 * linux-low.c: Ditto.
12339 * linux-ppc-low.c: Ditto.
12340 * linux-s390-low.c: Ditto.
12341 * linux-sparc-low.c: Ditto.
12342 * linux-x86-low.c: Ditto.
12343 * linux-xtensa-low.c: Ditto.
12344 * mem-break.c: Ditto.
12345 * nto-low.c: Ditto.
12346 * regcache.h: Ditto.
12347 * remote-utils.c: Ditto.
12348 * server.c: Ditto.
12349 * server.h: Ditto.
12350 * thread-db.c: Ditto.
12351 * tracepoint.c: Ditto.
12352 * utils.c: Ditto.
12353 * win32-low.h: Ditto.
12354
44944448
JB
123552011-01-05 Joel Brobecker <brobecker@adacore.com>
12356
12357 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12358 update.
12359
71ce852c
JB
123602011-01-01 Joel Brobecker <brobecker@adacore.com>
12361
12362 * server.c (gdbserver_version): Update copyright year in version
12363 output.
12364 * gdbreplay.c (gdbreplay_version): Ditto.
12365
eb826dc6
MF
123662010-12-29 Jie Zhang <jie.zhang@analog.com>
12367
12368 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12369 * linux-bfin-low.c: New file.
12370 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12371 PT_DATA_ADDR for BFIN targets.
12372 * Makefile.in (SFILES): Add linux-bfin-low.c.
12373 (clean): Remove reg-bfin.c.
12374 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12375 * README: Mention supported Blackfin targets.
12376
39ab222a
MF
123772010-12-23 Mike Frysinger <vapier@gentoo.org>
12378
12379 * .gitignore: New file.
12380
a1f2ce7d
MF
123812010-11-16 Mike Frysinger <vapier@gentoo.org>
12382
12383 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12384
f474844c
JZ
123852010-10-22 Jie Zhang <jie@codesourcery.com>
12386
12387 * Makefile.in: Add FLAGS_TO_PASS variable.
12388 (install): Remove dependency of install-only and recursively
12389 invoke make for install-only.
12390
f1048712
DE
123912010-10-04 Doug Evans <dje@google.com>
12392
12393 * Makefile.in (uninstall): Use $(DESTDIR).
12394
b53a1623
PA
123952010-09-24 Pedro Alves <pedro@codesourcery.com>
12396
e6ee044d
PA
12397 PR gdb/11842
12398
b53a1623
PA
12399 * linux-x86-low.c (compat_siginfo_from_siginfo)
12400 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12401 si_code is < 0. Check for si_code == SI_TIMER before checking for
12402 si_code < 0.
12403
fa1bd1e4
JB
124042010-09-13 Joel Brobecker <brobecker@adacore.com>
12405
12406 * lynx-i386-low.c: New file.
12407 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12408
47fac8f8
JB
124092010-09-13 Joel Brobecker <brobecker@adacore.com>
12410
12411 * lynx-low.c (ptrace_request_to_str): Remove handling for
12412 request values that have been removed in LynxOS 5.x.
12413
1adfc54d
JB
124142010-09-13 Joel Brobecker <brobecker@adacore.com>
12415
12416 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12417 <ptrace.h>
12418
c2a66c29
NS
124192010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12420
12421 * configure.ac: Add --enable-inprocess-agent option.
12422 * configure: Rebuilt.
12423
32fcada3
YQ
124242010-09-06 Yao Qi <yao@codesourcery.com>
12425
12426 * linux-low.c (linux_kill): Remove unused variable.
12427 (linux_stabilize_threads): Likewise.
12428 * server.c (start_inferior): Likewise.
12429 (queue_stop_reply_callback): Likewise.
12430 * tracepoint.c (do_action_at_tracepoint): Likewise.
12431
0cccb683
YQ
124322010-09-06 Yao Qi <yao@codesourcery.com>
12433
12434 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12435 on return.
12436
423ec54c
JK
124372010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12438
12439 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12440
12ac6819
PA
124412010-09-06 Pedro Alves <pedro@codesourcery.com>
12442
12443 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12444 "$(IPA_DEPFILES)".
12445
8ed54b31
JB
124462010-09-01 Joel Brobecker <brobecker@adacore.com>
12447
12448 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12449 gdbserver/lynx-ppc-low.c: New files.
12450 * Makefile.in (lynx_low_h): New variable.
12451 (lynx-low.o, lynx-ppc-low.o): New rules.
12452 * configure.ac: On LynxOS, link with -lnetinet.
12453 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12454 * configure: regenerate.
12455
bb0116a4
JB
124562010-09-01 Joel Brobecker <brobecker@adacore.com>
12457
12458 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12459 * configure.ac: Add check for vasprintf and vsnprintf.
12460 * configure, config.in: Regenerate.
12461 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12462
a778ab81 124632010-09-01 Joel Brobecker <brobecker@adacore.com>
12464
12465 * gdbreplay.c: Move include of alloca.h up, next to include of
12466 malloc.h.
12467 * server.h: Add include of malloc.h.
12468 * mem-break.c: Remove include of malloc.h.
12469 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12470
8b034a19 124712010-09-01 Joel Brobecker <brobecker@adacore.com>
12472
12473 * Makefile.in (memmem.o): Build with -Wno-error.
12474
124752010-09-01 Joel Brobecker <brobecker@adacore.com>
12476
12477 * utils.c (xsnprintf): Make non-static.
12478 * server.h: Add xsnprintf declaration.
12479 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12480 replace calls to snprintf by calls to xsnprintf throughout.
12481
124822010-09-01 Joel Brobecker <brobecker@adacore.com>
12483
12484 * configure.ac: Add configure check for alloca.
12485 * configure, config.in: Regenerate.
12486 * server.h: Include alloca.h if it exists.
12487 * gdbreplay.c: Include alloca.h if it exists.
12488
1a981360
PA
124892010-08-28 Pedro Alves <pedro@codesourcery.com>
12490
12491 * linux-low.c (__SIGRTMIN): Define if not already defined.
12492 (linux_create_inferior): Check for __ANDROID__ rather than
12493 __SIGRTMIN.
12494 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12495 are already deferred.
12496 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12497 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12498 stopped and already has a pending signal to report.
12499 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12500 a pending signal to report or is moving out of a jump pad.
12501 (linux_init_signals): Check for __ANDROID__ rather than
12502 __SIGRTMIN.
12503
b4d51a55
PA
125042010-08-28 Pedro Alves <pedro@codesourcery.com>
12505
12506 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12507 debug_threads check. Avoid a linear search when not doing debug
12508 output.
12509
ec48365d
PA
125102010-08-27 Pedro Alves <pedro@codesourcery.com>
12511
12512 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12513 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12514 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12515 (process_event): Change local fd's type to gdb_fildes_t.
12516 (create_file_handler): Adjust prototype.
12517 (delete_file_handler): Adjust prototype.
12518 (handle_file_event): Adjust prototype. Use pfildes.
12519 (create_file_event): Adjsut prototype.
12520 * remote-utils.c (remote_desc, listen_desc): Change type to
12521 gdb_fildes_t.
12522 * server.h: New gdb_fildes_t typedef.
12523 [USE_WIN32API]: Include winsock2.h.
12524 (delete_file_handler, add_file_handler): Adjust prototypes.
12525 (pfildes): Declare.
12526 * utils.c (pfildes): New.
12527
854d88f0
PA
125282010-08-27 Pedro Alves <pedro@codesourcery.com>
12529
12530 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12531 * configure: Regenerate.
12532
0146f85b
PA
125332010-08-27 Pedro Alves <pedro@codesourcery.com>
12534
12535 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12536 (linux_done_accessing_memory): ... this.
12537 (linux_target_ops): Adjust.
12538 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12539 * nto-low.c (nto_target_ops): Adjust comment.
12540 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12541 * spu-low.c (spu_target_ops): Adjust comment.
12542 * target.h (target_ops): Rename unprepare_to_access_memory field
12543 to done_accessing_memory.
12544 (unprepare_to_access_memory): Rename to ...
12545 (done_accessing_memory): ... this.
12546
90d74c30
PA
125472010-08-26 Pedro Alves <pedro@codesourcery.com>
12548
12549 * linux-low.c (linux_prepare_to_access_memory): New.
12550 (linux_unprepare_to_access_memory): New.
12551 (linux_target_ops): Install them.
12552 * server.c (read_memory): Rename to ...
12553 (gdb_read_memory): ... this. Use
12554 prepare_to_access_memory/prepare_to_access_memory.
12555 (write_memory): Rename to ...
12556 (gdb_write_memory): ... this. Use
12557 prepare_to_access_memory/prepare_to_access_memory.
12558 (handle_search_memory_1): Adjust.
12559 (process_serial_event): Adjust.
12560 * target.h (struct target_ops): New fields
12561 prepare_to_access_memory and unprepare_to_access_memory.
12562 (prepare_to_access_memory, unprepare_to_access_memory): New.
12563 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12564 prepare_to_access_memory/prepare_to_access_memory.
12565 * nto-low.c (nto_target_ops): Adjust.
12566 * spu-low.c (spu_target_ops): Adjust.
12567 * win32-low.c (win32_target_ops): Adjust.
12568
fd467969
PA
125692010-08-26 Pedro Alves <pedro@codesourcery.com>
12570
12571 * Makefile.in (WARN_CFLAGS): Get it from configure.
12572 (WERROR_CFLAGS): New.
12573 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12574 * configure.ac: Introduce --enable-werror, which adds -Werror to
12575 the compiler command line. Enabled by default. Disable with
12576 --disable-werror. Add -Wdeclaration-after-statement
12577 Wpointer-arith and -Wformat-nonliteral to warning flags.
12578 * configure: Regenerate.
12579
331e2f5f
PA
125802010-08-26 Pedro Alves <pedro@codesourcery.com>
12581
12582 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12583
e581f2b4
PA
125842010-08-26 Pedro Alves <pedro@codesourcery.com>
12585
12586 * gdbreplay.c (remote_error): New.
12587 (gdbchar): New.
12588 (expect): Use gdbchar. Check for error reading from GDB.
12589 Clarify sync error output.
12590 (play): Check for errors writing to GDB.
12591 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12592 * remote-utils.c (getpkt): Check for errors writing to the remote
12593 descriptor.
12594
3c11dd79
PA
125952010-08-25 Pedro Alves <pedro@codesourcery.com>
12596
12597 * linux-low.c (linux_wait_1): Move non-debugging code out of
12598 `debug_threads' control.
12599
d20a8ad9
PA
126002010-08-25 Pedro Alves <pedro@codesourcery.com>
12601
12602 * linux-low.c (linux_wait_1): Don't set last_status here.
12603 * server.c (push_event, queue_stop_reply_callback): Assert we're
12604 not pushing a TARGET_WAITKIND_IGNORE event.
12605 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12606 (myresume, handle_target_event): Set the thread's last_resume_kind
12607 and last_status from the target returned status.
12608
964e4306
PA
126092010-08-25 Pedro Alves <pedro@codesourcery.com>
12610
12611 PR threads/10729
12612
12613 * linux-x86-low.c (update_debug_registers_callback): New.
12614 (i386_dr_low_set_addr): Use it.
12615 (i386_dr_low_get_addr): New.
12616 (i386_dr_low_set_control): Use update_debug_registers_callback.
12617 (i386_dr_low_get_control): New.
12618 (i386_dr_low_get_status): Adjust.
12619 * linux-low.c (linux_stop_lwp): New.
12620 * linux-low.h (linux_stop_lwp): Declare.
12621
12622 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12623 argument instead of a i386_debug_reg_state.
12624 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12625 a i386_debug_reg_state.
12626 (i386_insert_aligned_watchpoint): Adjust.
12627 (i386_remove_aligned_watchpoint): Adjust.
12628 (i386_low_stopped_data_address): Read the debug registers from the
12629 inferior instead of from the mirrors.
12630 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12631 (i386_dr_low_get_addr): Declare.
12632 (i386_dr_low_get_control): Declare.
12633 (i386_dr_low_get_status): Change prototype.
12634
12635 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12636 (i386_dr_low_get_addr): New.
12637 (i386_dr_low_get_control): New.
12638 (i386_dr_low_get_status): Adjust prototype. Return
12639 dr_status_mirror.
12640 (i386_initial_stuff): Clear dr_status_mirror and
12641 dr_control_mirror.
12642 (i386_get_thread_context): Adjust.
12643 (i386_set_thread_context): Adjust.
12644 (i386_thread_added): Adjust.
12645
5f21a75b
PA
126462010-08-24 Pedro Alves <pedro@codesourcery.com>
12647
12648 * linux-low.h (linux_thread_area): Delete declaration.
12649
3e4c1235
TS
126502010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12651
12652 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12653 after its termination.
12654
1971b033
PA
126552010-08-09 Pedro Alves <pedro@codesourcery.com>
12656
12657 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12658 (gdb_wants_all_stopped): Delete.
12659 (linux_wait_1): Don't call them.
12660 * server.c (handle_v_cont): Tag all threads as want-stopped.
12661 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12662 stopped as "client-wants-stopped".
12663
310444ac
PA
126642010-07-31 Pedro Alves <pedro@codesourcery.com>
12665
12666 * Makefile.in (signals_h): New.
12667 (server_h): Depend on it.
12668 (server.o): Don't depend on $(signals_def).
12669 (signals.o): Depend on $(signals_def).
12670
a19cae16
JK
126712010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12672
12673 * Makefile.in (signals_def): New.
12674 (server_h): Append include/gdb/signals.h and signals_def.
12675 (server.o): Append signals_def.
12676
30d50328
JK
126772010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12678
12679 * server.c (handle_target_event): Use target_signal_to_host for
12680 resume_info.sig initialization.
12681 * target.h (struct thread_resume) <sig>: New comment.
12682
5c3216e2
OS
126832010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12684
c6f46ca0
OS
12685 * server.c (handle_query): strcpy() the returned string from paddress()
12686 instead of sprintf().
5c3216e2
OS
12687 * utils.c (paddress): Return phex_nz().
12688
6bd31874
JB
126892010-07-07 Joel Brobecker <brobecker@adacore.com>
12690
12691 * server.c (handle_v_cont): Call mourn_inferior if process
12692 just exited.
12693 (myresume): Likewise.
12694
0fb4aa4b
PA
126952010-07-01 Pedro Alves <pedro@codesourcery.com>
12696
12697 Static tracepoints, and integration with UST.
12698
12699 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12700 * mem-break.c (uninsert_all_breakpoints)
12701 (reinsert_all_breakpoints): New.
12702 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12703 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12704 (gdb_agent_ust_loaded, helper_thread_id)
12705 (gdb_agent_helper_thread_id): New macros.
12706 (struct ipa_sym_addresses): Add addr_ust_loaded,
12707 addr_helper_thread_id, addr_cmd_buf.
12708 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12709 (in_process_agent_loaded_ust): New.
12710 (write_e_ust_not_loaded): New.
12711 (maybe_write_ipa_ust_not_loaded): New.
12712 (struct collect_static_trace_data_action): New.
12713 (enum tracepoint_type) <static_tracepoint>: New.
12714 (struct tracepoint) <handle>: Mention static tracepoints.
12715 (struct static_tracepoint_ctx): New.
12716 (CMD_BUF_SIZE): New.
12717 (add_tracepoint_action): Handle static tracepoint actions.
12718 (unprobe_marker_at): New.
12719 (clear_installed_tracepoints): Handle static tracepoints.
12720 (cmd_qtdp): Handle static tracepoints.
12721 (probe_marker_at): New.
12722 (cmd_qtstart): Handle static tracepoints.
12723 (response_tracepoint): Handle static tracepoints.
12724 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12725 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12726 (get_context_regcache): Handle static tracepoints.
12727 (do_action_at_tracepoint): Handle static tracepoint actions.
12728 (traceframe_find_block_type): Handle static trace data blocks.
12729 (traceframe_read_sdata): New.
12730 (download_tracepoints): Download static tracepoint actions.
12731 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12732 (GDB_PROBE_NAME): New.
12733 (ust_ops): New.
12734 (GET_UST_SYM): New.
12735 (USTF): New.
12736 (dlsym_ust): New.
12737 (ust_marker_to_static_tracepoint): New.
12738 (gdb_probe): New.
12739 (collect_ust_data_at_tracepoint): New.
12740 (gdb_ust_probe): New.
12741 (UNIX_PATH_MAX, SOCK_DIR): New.
12742 (gdb_ust_connect_sync_socket): New.
12743 (resume_thread, stop_thread): New.
12744 (run_inferior_command): New.
12745 (init_named_socket): New.
12746 (gdb_ust_socket_init): New.
12747 (cstr_to_hexstr): New.
12748 (next_st): New.
12749 (first_marker, next_marker): New.
12750 (response_ust_marker): New.
12751 (cmd_qtfstm, cmd_qtsstm): New.
12752 (unprobe_marker_at, probe_marker_at): New.
12753 (cmd_qtstmat, gdb_ust_thread): New.
12754 (gdb_ust_init): New.
12755 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12756 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12757 (ST_REGENTRY): New.
12758 (x86_64_st_collect_regmap): New.
12759 (X86_64_NUM_ST_COLLECT_GREGS): New.
12760 (AMD64_RIP_REGNUM): New.
12761 (supply_static_tracepoint_registers): New.
12762 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12763 (ST_REGENTRY): New.
12764 (i386_st_collect_regmap): New.
12765 (i386_NUM_ST_COLLECT_GREGS): New.
12766 (supply_static_tracepoint_registers): New.
12767 * server.c (handle_query): Handle qXfer:statictrace:read.
12768 <qSupported>: Report support for StaticTracepoints, and
12769 qXfer:statictrace:read features.
12770 * server.h (traceframe_read_sdata)
12771 (supply_static_tracepoint_registers): Declare.
12772 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12773 (unpack_varlen_hex): Include in IPA build.
12774 * Makefile.in (ustlibs, ustinc): New.
12775 (IPA_OBJS): Add remote-utils-ipa.o.
12776 ($(IPA_LIB)): Link -ldl and -lpthread.
12777 (UST_CFLAGS): New.
12778 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12779 * config.in, configure: Regenerate.
12780
9e4344e5
PA
127812010-06-20 Ian Lance Taylor <iant@google.com>
12782 Pedro Alves <pedro@codesourcery.com>
12783
12784 * linux-x86-low.c (always_true): Delete.
12785 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12786 trying to fool the compiler with always_true.
12787
c6beb2cb
PA
127882010-06-20 Pedro Alves <pedro@codesourcery.com>
12789
12790 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12791 conditions in gdbserver.
12792
d2ed6730
UW
127932010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12794
12795 * spu-low.c (spu_read_memory): Wrap around local store limit.
12796 (spu_write_memory): Likewise.
12797
4e29fb54
PA
127982010-06-15 Pedro Alves <pedro@codesourcery.com>
12799
12800 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12801 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12802 LONGEST uses.
12803 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12804 uses.
12805 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12806 uses with LONGEST uses.
12807
6a271cae
PA
128082010-06-14 Stan Shebs <stan@codesourcery.com>
12809 Pedro Alves <pedro@codesourcery.com>
12810
12811 Bytecode compiler.
12812
12813 * linux-x86-low.c: Include limits.h.
12814 (add_insns): New.
12815 (always_true): New.
12816 (EMIT_ASM): New.
12817 (EMIT_ASM32): New.
12818 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12819 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12820 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12821 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12822 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12823 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12824 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12825 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12826 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12827 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12828 (amd64_emit_void_call_2): New.
12829 (amd64_emit_ops): New.
12830 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12831 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12832 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12833 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12834 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12835 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12836 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12837 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12838 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12839 (i386_emit_stack_adjust, i386_emit_int_call_1)
12840 (i386_emit_void_call_2): New.
12841 (i386_emit_ops): New.
12842 (x86_emit_ops): New.
12843 (the_low_target): Install x86_emit_ops.
12844 * server.h (struct emit_ops): New.
12845 (get_raw_reg_func_addr): Declare.
12846 (current_insn_ptr, emit_error): Declare.
12847 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12848 (set_trace_state_variable_value): New defines.
12849 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12850 addr_get_trace_state_variable_value and
12851 addr_set_trace_state_variable_value.
12852 (symbol_list): New fields for get_raw_reg,
12853 get_trace_state_variable_value and set_trace_state_variable_value.
12854 (condfn): New typedef.
12855 (struct tracepoint): New field `compiled_cond'.
12856 (do_action_at_tracepoint): Clear compiled_cond.
12857 (get_trace_state_variable_value, set_trace_state_variable_value):
12858 Export in the IPA.
12859 (condition_true_at_tracepoint): If there's a compiled condition,
12860 run that.
12861 (current_insn_ptr, emit_error): New globals.
12862 (struct bytecode_address): New.
12863 (get_raw_reg_func_addr): New.
12864 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12865 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12866 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12867 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12868 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12869 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12870 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12871 (compile_tracepoint_condition, compile_bytecodes): New.
12872 * target.h (emit_ops): Forward declare.
12873 (struct target_ops): New field emit_ops.
12874 (target_emit_ops): New.
12875 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12876 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12877 * linux-low.c (linux_emit_ops): New.
12878 (linux_target_ops): Install it.
12879 * linux-low.h (struct linux_target_ops): New field emit_ops.
12880
92b72907
UW
128812010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12882
12883 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12884 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12885
fa593d66
PA
128862010-06-01 Pedro Alves <pedro@codesourcery.com>
12887 Stan Shebs <stan@codesourcery.com>
12888
12889 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12890 (all): Depend on $(extra_libraries).
12891 (install-only): Install the IPA.
12892 (IPA_OBJS, IPA_LIB): New.
12893 (clean): Remove the IPA lib.
12894 (IPAGENT_CFLAGS): New.
12895 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12896 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12897 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12898 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12899 * configure.ac: Check for atomic builtins support in the compiler.
12900 (IPA_DEPFILES, extra_libraries): Define.
12901 * configure.srv (ipa_obj): Add description.
12902 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12903 (i[34567]86-*-linux*): Set ipa_obj.
12904 (x86_64-*-linux*): Set ipa_obj.
12905 * linux-low.c (stabilizing_threads): New.
12906 (supports_fast_tracepoints): New.
12907 (linux_detach): Stabilize threads before detaching.
12908 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12909 the lwp is either not stabilizing, or is moving out of a jump pad.
12910 (linux_fast_tracepoint_collecting): New.
12911 (maybe_move_out_of_jump_pad): New.
12912 (enqueue_one_deferred_signal): New.
12913 (dequeue_one_deferred_signal): New.
12914 (linux_wait_for_event_1): If moving out of a jump pad, defer
12915 pending signals to later.
12916 (linux_stabilize_threads): New.
12917 (linux_wait_1): Check if threads need moving out of jump pads, and
12918 do it if so.
12919 (stuck_in_jump_pad_callback): New.
12920 (move_out_of_jump_pad_callback): New.
12921 (lwp_running): New.
12922 (linux_resume_one_lwp): Handle moving out of jump pads.
12923 (linux_set_resume_request): Dequeue deferred signals.
12924 (need_step_over_p): Also step over fast tracepoint jumps.
12925 (start_step_over): Also uninsert fast tracepoint jumps.
12926 (finish_step_over): Also reinsert fast tracepoint jumps.
12927 (linux_install_fast_tracepoint_jump): New.
12928 (linux_target_ops): Install linux_stabilize_threads and
12929 linux_install_fast_tracepoint_jump_pad.
12930 * linux-low.h (linux_target_ops) <get_thread_area,
12931 install_fast_tracepoint_jump_pad>: New fields.
12932 (struct lwp_info) <collecting_fast_tracepoint,
12933 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12934 (linux_get_thread_area): Declare.
12935 * linux-x86-low.c (jump_insn): New.
12936 (x86_get_thread_area): New.
12937 (append_insns): New.
12938 (push_opcode): New.
12939 (amd64_install_fast_tracepoint_jump_pad): New.
12940 (i386_install_fast_tracepoint_jump_pad): New.
12941 (x86_install_fast_tracepoint_jump_pad): New.
12942 (the_low_target): Install x86_get_thread_area and
12943 x86_install_fast_tracepoint_jump_pad.
12944 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12945 (struct fast_tracepoint_jump): New.
12946 (fast_tracepoint_jump_insn): New.
12947 (fast_tracepoint_jump_shadow): New.
12948 (find_fast_tracepoint_jump_at): New.
12949 (fast_tracepoint_jump_here): New.
12950 (delete_fast_tracepoint_jump): New.
12951 (set_fast_tracepoint_jump): New.
12952 (uninsert_fast_tracepoint_jumps_at): New.
12953 (reinsert_fast_tracepoint_jumps_at): New.
12954 (set_breakpoint_at): Use write_inferior_memory.
12955 (uninsert_raw_breakpoint): Use write_inferior_memory.
12956 (check_mem_read): Mask out fast tracepoint jumps.
12957 (check_mem_write): Mask out fast tracepoint jumps.
12958 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12959 (set_fast_tracepoint_jump): Declare.
12960 (delete_fast_tracepoint_jump)
12961 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12962 (reinsert_fast_tracepoint_jumps_at): Declare.
12963 * regcache.c: Don't compile many functions when building the
12964 in-process agent library.
12965 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12966 the register buffer in the heap.
12967 (free_register_cache): If the register buffer isn't owned by the
12968 regcache, don't free it.
12969 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12970 pre-existing register caches.
12971 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12972 type.
12973 (convert_ascii_to_int): : Constify `from' parameter type.
12974 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12975 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12976 the needed buffer in-place.
12977 (relocate_instruction): New.
12978 * server.c (handle_query) <qSymbols>: If the target supports
12979 tracepoints, give it a chance of looking up symbols. Report
12980 support for fast tracepoints.
12981 (handle_status): Stabilize threads.
12982 (process_serial_event): Adjust.
12983 * server.h (struct fast_tracepoint_jump): Forward declare.
12984 (struct process_info) <fast_tracepoint_jumps>: New field.
12985 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12986 (decode_X_packet, decode_M_packet): Adjust.
12987 (relocate_instruction): Declare.
12988 (in_process_agent_loaded): Declare.
12989 (tracepoint_look_up_symbols): Declare.
12990 (struct fast_tpoint_collect_status): Declare.
12991 (fast_tracepoint_collecting): Declare.
12992 (force_unlock_trace_buffer): Declare.
12993 (handle_tracepoint_bkpts): Declare.
12994 (initialize_low_tracepoint)
12995 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12996 * target.h (struct target_ops) <stabilize_threads,
12997 install_fast_tracepoint_jump_pad>: New fields.
12998 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12999 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13000 [HAVE_STDINT_H]: Include stdint.h.
13001 (trace_debug_1): Rename to ...
13002 (trace_vdebug): ... this.
13003 (trace_debug): Rename to ...
13004 (trace_debug_1): ... this. Add `level' parameter.
13005 (trace_debug): New.
13006 (ATTR_USED, ATTR_NOINLINE): New.
13007 (IP_AGENT_EXPORT): New.
13008 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13009 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13010 (about_to_request_buffer_space, trace_buffer_is_full)
13011 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13012 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13013 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13014 (traceframe_write_count, traceframes_created)
13015 (trace_state_variables)
13016 New renaming defines.
13017 (struct ipa_sym_addresses): New.
13018 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13019 (symbol_list): New.
13020 (ipa_sym_addrs): New.
13021 (all_tracepoint_symbols_looked_up): New.
13022 (in_process_agent_loaded): New.
13023 (write_e_ipa_not_loaded): New.
13024 (maybe_write_ipa_not_loaded): New.
13025 (tracepoint_look_up_symbols): New.
13026 (debug_threads) [IN_PROCESS_AGENT]: New.
13027 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13028 (UNKNOWN_SIDE_EFFECTS): New.
13029 (stop_tracing): New.
13030 (flush_trace_buffer): New.
13031 (stop_tracing_bkpt): New.
13032 (flush_trace_buffer_bkpt): New.
13033 (read_inferior_integer): New.
13034 (read_inferior_uinteger): New.
13035 (read_inferior_data_pointer): New.
13036 (write_inferior_data_pointer): New.
13037 (write_inferior_integer): New.
13038 (write_inferior_uinteger): New.
13039 (struct collect_static_trace_data_action): Delete.
13040 (enum tracepoint_type): New.
13041 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13042 <actions_str, step_actions, step_actions_str>: Only include in
13043 GDBserver.
fa593d66
PA
13044 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13045 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13046 (tracepoints): Use IP_AGENT_EXPORT.
13047 (last_tracepoint): Don't include in the IPA.
13048 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13049 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13050 (alloced_trace_state_variables): New.
13051 (trace_state_variables): Use IP_AGENT_EXPORT.
13052 (traceframe_t): Delete unused variable.
13053 (circular_trace_buffer): Don't include in the IPA.
13054 (trace_buffer_start): Delete.
13055 (struct trace_buffer_control): New.
13056 (trace_buffer_free): Delete.
13057 (struct ipa_trace_buffer_control): New.
13058 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13059 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13060 New.
13061 (trace_buffer_ctrl): New.
13062 (TRACE_BUFFER_CTRL_CURR): New.
13063 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13064 Reimplement as macros.
13065 (trace_buffer_wrap): Delete.
13066 (traceframe_write_count, traceframe_read_count)
13067 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13068 (struct tracepoint_hit_ctx) <type>: New field.
13069 (struct fast_tracepoint_ctx): New.
13070 (memory_barrier): New.
13071 (cmpxchg): New.
13072 (record_tracepoint_error): Update atomically in the IPA.
13073 (clear_inferior_trace_buffer): New.
13074 (about_to_request_buffer_space): New.
13075 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13076 updating the same buffer.
13077 (add_tracepoint): Default the tracepoint's type to trap
13078 tracepoint, and orig_size to -1.
13079 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13080 internal variables.
13081 (create_trace_state_variable): New parameter `gdb'. Handle it.
13082 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13083 (cmd_qtdp): Handle fast tracepoints.
13084 (cmd_qtdv): Adjust.
13085 (max_jump_pad_size): New.
13086 (gdb_jump_pad_head): New.
13087 (get_jump_space_head): New.
13088 (claim_jump_space): New.
13089 (sort_tracepoints): New.
13090 (MAX_JUMP_SIZE): New.
13091 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13092 IPA.
13093 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13094 support. Upload fast traceframes, and delete internal IPA
13095 breakpoints.
13096 (stop_tracing_handler): New.
13097 (flush_trace_buffer_handler): New.
13098 (cmd_qtstop): Upload fast tracepoints.
13099 (response_tracepoint): Handle fast tracepoints.
13100 (tracepoint_finished_step): Upload fast traceframes. Set the
13101 tracepoint hit context's tracepoint type.
13102 (handle_tracepoint_bkpts): New.
13103 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13104 type. Add comment about fast tracepoints.
13105 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13106 non-existing action_str field.
13107 (get_context_regcache): Handle fast tracepoints.
13108 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13109 to the regcache.
13110 (fast_tracepoint_from_jump_pad_address): New.
13111 (fast_tracepoint_from_ipa_tpoint_address): New.
13112 (collecting_t): New.
13113 (force_unlock_trace_buffer): New.
13114 (fast_tracepoint_collecting): New.
13115 (collecting): New.
13116 (gdb_collect): New.
13117 (write_inferior_data_ptr): New.
13118 (target_tp_heap): New.
13119 (target_malloc): New.
13120 (download_agent_expr): New.
13121 (UALIGN): New.
13122 (download_tracepoints): New.
13123 (download_trace_state_variables): New.
13124 (upload_fast_traceframes): New.
13125 (IPA_FIRST_TRACEFRAME): New.
13126 (IPA_NEXT_TRACEFRAME_1): New.
13127 (IPA_NEXT_TRACEFRAME): New.
13128 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13129 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13130 (gdb_jump_pad_buffer_end): New.
13131 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13132 (initialize_tracepoint): Adjust.
13133 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13134 buffer. Initialize the low module.
13135 * utils.c (PREFIX, TOOLNAME): New.
13136 (malloc_failure): Use PREFIX.
13137 (error): In the IPA, an error causes an exit.
13138 (fatal, warning): Use PREFIX.
13139 (internal_error): Use TOOLNAME.
13140 (NUMCELLS): Increase to 10.
13141 * configure, config.in: Regenerate.
13142
d149dd1d
PA
131432010-06-01 Pedro Alves <pedro@codesourcery.com>
13144
13145 * server.c (handle_query) <qSupported>: Do two passes over the
13146 qSupported string to avoid nesting strtok.
13147
f6528abd
JK
131482010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13149
13150 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13151 (CDEPS): New.
13152 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13153 -Wl,--dynamic-list.
13154 * configure: Regenerate.
13155 * proc-service.list: New.
13156
ca2a87a0
JK
131572010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13158
13159 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13160 New comment.
13161
363a6e9f
OS
131622010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13163
13164 * gdbreplay.c (remote_open): Check error return from socket() call by
13165 its equality to -1 not by it being negative.
13166 * remote-utils.c (remote_open): Likewise.
13167
d23b6cb1
PA
131682010-05-23 Pedro Alves <pedro@codesourcery.com>
13169
13170 * config.h: Regenerate.
13171
28d3cf85
MK
131722010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13173
13174 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13175 doesn't provide PTRACE_GET_THREAD_AREA.
13176
fea36a59
MK
131772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13178
13179 * linux-m68k-low.c: Include <asm/ptrace.h>
13180 (ps_get_thread_area): Implement.
13181
24b066ba
DE
131822010-05-03 Doug Evans <dje@google.com>
13183
13184 * event-loop.c (struct callback_event): New struct.
13185 (callback_list): New global.
13186 (append_callback_event, delete_callback_event): New functions.
13187 (process_callback): New function.
13188 (start_event_loop): Call it.
13189 * remote-utils.c (NOT_SCHEDULED): Define.
13190 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13191 moved out of readchar.
13192 (readchar): Rewrite. Call reschedule before returning.
13193 (reset_readchar): New function.
13194 (remote_close): Call it.
13195 (process_remaining, reschedule): New functions.
13196 * server.h (callback_handler_func): New typedef.
13197 (append_callback_event, delete_callback_event): Declare.
13198
9836d6ea
PA
131992010-05-03 Pedro Alves <pedro@codesourcery.com>
13200
13201 * proc-service.c (ps_pglobal_lookup): Use
13202 thread_db_look_up_one_symbol.
13203 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13204 parameter. Use it instead of all_symbols_looked_up.
13205 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13206 field.
13207 (all_symbols_looked_up): Don't declare.
13208 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13209 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13210 field.
13211 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13212 Set all_symbols_looked_up here.
13213 (thread_db_look_up_one_symbol): New.
13214 (thread_db_get_tls_address): Adjust.
13215 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13216 thread_db object on the heap, and tentatively set it in the
13217 process structure.
13218 (thread_db_init): Don't set all_symbols_looked_up here.
13219 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13220
7984d532
PA
132212010-05-03 Pedro Alves <pedro@codesourcery.com>
13222
13223 * linux-low.c (linux_kill, linux_detach): Adjust.
13224 (status_pending_p_callback): Remove redundant statement. Check
13225 for !TARGET_WAITIKIND_IGNORE, instead of
13226 TARGET_WAITKIND_STOPPED.
13227 (handle_tracepoints): Make sure LWP is locked. Adjust.
13228 (linux_wait_for_event_1): Adjust.
13229 (linux_cancel_breakpoints): New.
13230 (unsuspend_one_lwp): New.
13231 (unsuspend_all_lwps): New.
13232 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13233 (send_sigstop_callback): Change return type to int, add new
13234 `except' parameter and handle it.
13235 (suspend_and_send_sigstop_callback): New.
13236 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13237 pass them down. If SUSPEND, also increment the lwp's suspend
13238 count.
13239 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13240 (need_step_over_p): Don't consider suspended LWPs.
13241 (start_step_over): Adjust.
13242 (proceed_one_lwp): Change return type to int, add new `except'
13243 parameter and handle it.
13244 (unsuspend_and_proceed_one_lwp): New.
13245 (proceed_all_lwps): Use find_inferior instead of
13246 for_each_inferior.
13247 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13248 also decrement the suspend count of LWPs. Pass `except' down,
13249 instead of hacking its suspend count.
13250 (linux_pause_all): Add `freeze' parameter. Adjust.
13251 (linux_unpause_all): New.
13252 (linux_target_ops): Install linux_unpause_all.
13253 * server.c (handle_status): Adjust.
13254 * target.h (struct target_ops): New fields `unpause_all' and
13255 `cancel_breakpoints'. Add new parameter to `pause_all'.
13256 (pause_all): Add new `freeze' parameter.
13257 (unpause_all): New.
13258 (cancel_breakpoints): New.
13259 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13260 cancel breakpoints.
13261 (cmd_qtstart): Pause threads.
13262 (stop_tracing): Pause threads, and cancel breakpoints.
13263 * win32-low.c (win32_target_ops): Adjust.
13264
e471f25b
PA
132652010-05-03 Pedro Alves <pedro@codesourcery.com>
13266
13267 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13268 the inferior right away from here...
13269 (linux_wait_1): ... to here, and adjust to check the thread's
13270 last_resume_kind instead of the lwp's step or stop_expected flags.
13271
1915ef4f
PA
132722010-05-02 Pedro Alves <pedro@codesourcery.com>
13273
13274 * README: Use consistent `GDB' and `GDBserver' spellings.
13275
f9e39928
PA
132762010-05-02 Pedro Alves <pedro@codesourcery.com>
13277
13278 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13279 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13280 (linux_detach_one_lwp): Assume the lwp is stopped.
13281 (any_thread_of): Delete.
13282 (linux_detach): Stop all lwps here. Don't blindly delete all
13283 breakpoints.
13284 (delete_lwp_callback): New.
13285 (linux_mourn): Delete all lwps of the process that is gone.
13286 (linux_wait_1): Don't delete the last lwp of the process here.
13287 * mem-break.h (mark_breakpoints_out): Declare.
13288 * mem-break.c (mark_breakpoints_out): New.
13289 (free_all_breakpoints): Use it.
13290 * server.c (handle_target_event): If the process is gone, mark
13291 breakpoints out.
13292 * thread-db.c (struct thread_db) <create_bp>: New field.
13293 (thread_db_enable_reporting): Fix prototype. Store a thread event
13294 breakpoint reference in the thread_db struct.
13295 (thread_db_load_search): Clear the thread_db object.
13296 (try_thread_db_load_1): Ditto.
13297 (switch_to_process): New.
13298 (disable_thread_event_reporting): Use it.
13299 (remove_thread_event_breakpoints): New.
13300 (thread_db_detach, thread_db_mourn): Use it.
13301
1e7fc18c
PA
133022010-05-01 Pedro Alves <pedro@codesourcery.com>
13303
13304 * linux-low.c (linux_enable_event_reporting): New.
13305 (linux_wait_for_event_1, handle_extended_wait): Use it.
13306
02fc4de7
PA
133072010-04-30 Pedro Alves <pedro@codesourcery.com>
13308
13309 * linux-low.c (linux_kill_one_lwp, linux_kill)
13310 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13311 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13312 SIGSTOP even if the LWP is stopped.
13313 (send_sigstop_callback): New.
13314 (stop_all_lwps): Use send_sigstop_callback instead.
13315 (linux_resume_one_thread): Adjust.
13316 (proceed_one_lwp): Still proceed an LWP that the client has
13317 requested to stop, if we haven't reported it as stopped yet. Make
13318 sure that LWPs the client want stopped, have a pending SIGSTOP.
13319
bc3b5632
DE
133202010-04-26 Doug Evans <dje@google.com>
13321
ae1ada35
DE
13322 * server.c (handle_general_set): Make static.
13323
bc3b5632
DE
13324 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13325 Print received char after testing for error/eof instead of before.
13326 (input_interrupt): Tweak comment.
13327
65730243
DE
133282010-04-23 Doug Evans <dje@google.com>
13329
13330 * server.c (start_inferior): Print inferior argv if --debug.
13331
a8ae7dc0
AR
133322010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13333
13334 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13335 * nto-x86-low.c: Include server.h
13336
1c07cc19
PM
133372010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13338
13339 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13340 be consistent with other sources of this directory.
13341 (init_registers_amd64): Correct name of source file of this function
13342 in the comment.
13343
e0a61e09
PM
133442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13345
13346 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13347 64-bit executables.
13348
54709339
PM
133492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13350
13351 * win32-i386-low.c: Add 64-bit support.
13352 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13353 (init_registers_amd64): Declare.
13354 (mappings): Add 64-bit version of array.
13355 (init_windows_x86): New function.
13356 (the_low_target): Change init_arch field to init_windows_x86.
13357
e8f0053d
PM
133582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13359
13360 * win32-low.c: Adapt to support also 64-bit architecture.
13361 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13362 (get_image_name): Use SIZE_T type for local variable `done'.
13363 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13364 (toolhelp_get_dll_name): Idem.
13365 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13366 Use uintptr_t typecast to avoid warning.
13367 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13368 (handle_exception): Use phex_nz to avoid warning.
13369 (win32_wait): Remove unused local variable `process'.
13370
c481e77e
PM
133712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13372
13373 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13374 `amd64-avx.o'.
13375
12ea4b69
PM
133762010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13377
13378 * configure.ac: Use `ws2_32' library for srv_mingw.
13379 * configure: Regenerate.
13380 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13381 * remote-utils.c: Likewise.
13382
f6d1620c
L
133832010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13384
13385 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13386 if __x86_64__ is defined.
13387
8e642873
PM
133882010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13389
13390 * configure: Regenerate.
13391
711e434b
PM
133922010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13393
13394 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13395 * target.h (target_ops): New get_tib_address field.
13396 * win32-low.h (win32_thread_info): Add thread_local_base field.
13397 * win32-low.c (child_add_thread): Add tlb argument.
13398 Set thread_local_base field to TLB.
13399 (get_child_debug_event): Adapt to child_add_thread change.
13400 (win32_get_tib_address): New function.
13401 (win32_target_ops): Set get_tib_address field to
13402 win32_get_tib_address.
13403 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13404
505106cd
PA
134052010-04-12 Pedro Alves <pedro@codesourcery.com>
13406
505106cd
PA
13407 * linux-low.c (linux_mourn): Also remove the process.
13408 * server.c (handle_target_event): Don't remove the process here.
13409 * nto-low.c (nto_mourn): New.
13410 (nto_target_ops): Install it.
13411 * spu-low.c (spu_mourn): New.
13412 (spu_target_ops): Install it.
13413 * win32-low.c (win32_mourn): New.
13414 (win32_target_ops): Install it.
13415
e8470a06
PA
134162010-04-12 Pedro Alves <pedro@codesourcery.com>
13417
13418 * server.h (buffer_xml_printf): Remove redundant `;'.
13419
45ba0d02
PA
134202010-04-12 Pedro Alves <pedro@codesourcery.com>
13421
13422 * regcache.c (set_register_cache): Invalidate regcaches before
13423 changing the register cache layout.
13424 (regcache_invalidate_one): Allow a NULL regcache.
13425 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13426 regcaches before changing the register cache layout or the target
13427 regsets.
13428
59e04013
L
134292010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13430
13431 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13432 variable warning on Linux/x86-64.
13433
8336d594
PA
134342010-04-11 Pedro Alves <pedro@codesourcery.com>
13435
13436 GDBserver disconnected tracing support.
13437
13438 * linux-low.c (linux_remove_process): Delete.
13439 (add_lwp): Don't set last_resume_kind here.
13440 (linux_kill): Use `mourn'.
13441 (linux_detach): Use `thread_db_detach', and `mourn'.
13442 (linux_mourn): New.
13443 (linux_attach_lwp_1): Adjust comment.
13444 (linux_attach): last_resume_kind moved the thread_info; adjust.
13445 (status_pending_p_callback): Adjust.
13446 (linux_wait_for_event_1): Adjust.
13447 (count_events_callback, select_singlestep_lwp_callback)
13448 (select_event_lwp_callback, cancel_breakpoints_callback)
13449 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13450 (proceed_one_lwp): Adjust.
13451 (linux_async): Add debug output.
13452 (linux_thread_stopped): New.
13453 (linux_pause_all): New.
13454 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13455 linux_pause_all.
13456 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13457 (thread_db_free): Delete declaration.
13458 (thread_db_detach, thread_db_mourn): Declare.
13459 * thread-db.c (thread_db_init): Use thread_db_mourn.
13460 (thread_db_free): Delete, split in two.
13461 (disable_thread_event_reporting): New.
13462 (thread_db_detach): New.
13463 (thread_db_mourn): New.
13464
13465 * server.h (struct thread_info) <last_resume_kind>: New field.
13466 <attached>: Add comment.
13467 <gdb_detached>: New field.
13468 (handler_func): Change return type to int.
13469 (handle_serial_event, handle_target_event): Ditto.
13470 (gdb_connected): Declare.
13471 (tracing): Delete.
13472 (disconnected_tracing): Declare.
13473 (stop_tracing): Declare.
13474
13475 * server.c (handle_query) <qSupported>: Report support for
13476 disconnected tracing.
13477 (queue_stop_reply_callback): Account for running threads.
13478 (gdb_wants_thread_stopped): New.
13479 (gdb_wants_all_threads_stopped): New.
13480 (gdb_reattached_process): New.
13481 (handle_status): Clear the `gdb_detached' flag of all processes.
13482 In all-stop, stop all threads.
13483 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13484 (process_serial_event): If the remote connection breaks, or if an
13485 exit was forced with "monitor exit", force an event loop exit.
13486 Handle disconnected tracing on detach.
13487 (handle_serial_event): Adjust.
13488 (handle_target_event): If GDB isn't connected, forward events back
13489 to the inferior, unless the last process exited, in which case,
13490 exit gdbserver. Adjust interface.
13491
13492 * remote-utils.c (remote_open): Don't block in accept. Instead
13493 register an event loop source on the listen socket file
13494 descriptor. Refactor bits into ...
13495 (listen_desc): ... this new global.
13496 (gdb_connected): ... this new function.
13497 (enable_async_notification): ... this new function.
13498 (handle_accept_event): ... this new function.
13499 (remote_close): Clear remote_desc.
13500
13501 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13502
13503 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13504 New fields.
13505 (mourn_inferior): Define.
13506 (target_process_qsupported): Avoid the dangling else problem.
13507 (thread_stopped): Define.
13508 (pause_all): Define.
13509 (target_waitstatus_to_string): Declare.
13510 * target.c (target_waitstatus_to_string): New.
13511
13512 * tracepoint.c (tracing): Make extern.
13513 (disconnected_tracing): New.
13514 (stop_tracing): Make extern. Handle tracing stops due to GDB
13515 disconnecting.
13516 (cmd_qtdisconnected): New.
13517 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13518 (handle_tracepoint_general_set): Handle QTDisconnected.
13519
13520 * event-loop.c (event_handler_func): Change return type to int.
13521 (process_event): Bail out if the event handler wants the event
13522 loop to stop.
13523 (handle_file_event): Ditto.
13524 (start_event_loop): Bail out if the event handler wants the event
13525 loop to stop.
13526
13527 * nto-low.c (nto_target_ops): Adjust.
13528 * spu-low.c (spu_wait): Don't remove the process here.
13529 (spu_target_ops): Adjust.
13530 * win32-low.c (win32_wait): Don't remove the process here.
13531 (win32_target_ops): Adjust.
13532
5d267c4c
PA
135332010-04-11 Pedro Alves <pedro@codesourcery.com>
13534
13535 * regcache.c (realloc_register_cache): Invalidate inferior's
13536 regcache before recreating it.
13537
623ccd72
PA
135382010-04-09 Pedro Alves <pedro@codesourcery.com>
13539
13540 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13541
219f2f23
PA
135422010-04-09 Stan Shebs <stan@codesourcery.com>
13543 Pedro Alves <pedro@codesourcery.com>
13544
13545 * server.h (LONGEST): New.
13546 (struct thread_info) <while_stepping>: New field.
13547 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13548 Declare.
13549 (initialize_tracepoint, handle_tracepoint_general_set)
13550 (handle_tracepoint_query, tracepoint_finished_step)
13551 (tracepoint_was_hit, release_while_stepping_state_list):
13552 (current_traceframe): Declare.
13553 * server.c (handle_general_set): Handle tracepoint packets.
13554 (read_memory): New.
13555 (write_memory): New.
13556 (handle_search_memory_1): Use read_memory.
13557 (handle_query): Report support for conditional tracepoints, trace
13558 state variables, and tracepoint sources. Handle tracepoint
13559 queries.
13560 (main): Initialize the tracepoints module.
13561 (process_serial_event): Handle traceframe reads/writes.
13562
13563 * linux-low.c (handle_tracepoints): New.
13564 (linux_wait_1): Call it.
13565 (linux_resume_one_lwp): Handle while-stepping.
13566 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13567 (linux_target_ops): Install them.
13568 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13569 New field.
13570 * linux-x86-low.c (x86_supports_tracepoints): New.
13571 (the_low_target). Install it.
13572
13573 * mem-break.h (delete_breakpoint): Declare.
13574 * mem-break.c (delete_breakpoint): Make external.
13575
13576 * target.h (struct target_ops): Add `supports_tracepoints',
13577 `read_pc', and `write_pc' fields.
13578 (target_supports_tracepoints): Define.
13579 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13580 (phex_nz): New.
13581
13582 * regcache.h (struct regcache) <registers_owned>: New field.
13583 (init_register_cache, regcache_cpy): Declare.
13584 (regcache_read_pc, regcache_write_pc): Declare.
13585 (register_cache_size): Declare.
13586 (supply_regblock): Declare.
13587 * regcache.c (init_register_cache): New.
13588 (new_register_cache): Use it.
13589 (regcache_cpy): New.
13590 (register_cache_size): New.
13591 (supply_regblock): New.
13592 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13593
219f2f23
PA
13594 * tracepoint.c: New.
13595
13596 * Makefile.in (OBS): Add tracepoint.o.
13597 (tracepoint.o): New rule.
13598
3a13a53b
L
135992010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13600
13601 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13602 (i386-mmx.o): New.
13603 (i386-mmx.c): Likewise.
13604 (i386-mmx-linux.o): Likewise.
13605 (i386-mmx-linux.c): Likewise.
13606
13607 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13608 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13609 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13610 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13611
13612 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13613 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13614 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13615
1570b33e
L
136162010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13617
13618 * Makefile.in (clean): Updated.
13619 (i386-avx.o): New.
13620 (i386-avx.c): Likewise.
13621 (i386-avx-linux.o): Likewise.
13622 (i386-avx-linux.c): Likewise.
13623 (amd64-avx.o): Likewise.
13624 (amd64-avx.c): Likewise.
13625 (amd64-avx-linux.o): Likewise.
13626 (amd64-avx-linux.c): Likewise.
13627
13628 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13629 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13630 (srv_amd64_regobj): Add amd64-avx.o.
13631 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13632 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13633 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13634 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13635 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13636 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13637 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13638
13639 * i387-fp.c: Include "i386-xstate.h".
13640 (i387_xsave): New.
13641 (i387_cache_to_xsave): Likewise.
13642 (i387_xsave_to_cache): Likewise.
13643 (x86_xcr0): Likewise.
13644
13645 * i387-fp.h (i387_cache_to_xsave): Likewise.
13646 (i387_xsave_to_cache): Likewise.
13647 (x86_xcr0): Likewise.
13648
13649 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13650 * linux-crisv32-low.c (target_regsets): Likewise.
13651 * linux-m68k-low.c (target_regsets): Likewise.
13652 * linux-mips-low.c (target_regsets): Likewise.
13653 * linux-ppc-low.c (target_regsets): Likewise.
13654 * linux-s390-low.c (target_regsets): Likewise.
13655 * linux-sh-low.c (target_regsets): Likewise.
13656 * linux-sparc-low.c (target_regsets): Likewise.
13657 * linux-xtensa-low.c (target_regsets): Likewise.
13658
13659 * linux-low.c: Include <sys/uio.h>.
13660 (regsets_fetch_inferior_registers): Support nt_type.
13661 (regsets_store_inferior_registers): Likewise.
13662 (linux_process_qsupported): New.
13663 (linux_target_ops): Add linux_process_qsupported.
13664
13665 * linux-low.h (regset_info): Add nt_type.
13666 (linux_target_ops): Add process_qsupported.
13667
13668 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13669 and <sys/uio.h>.
13670 (init_registers_i386_avx_linux): New.
13671 (init_registers_amd64_avx_linux): Likewise.
13672 (xmltarget_i386_linux_no_xml): Likewise.
13673 (xmltarget_amd64_linux_no_xml): Likewise.
13674 (PTRACE_GETREGSET): Likewise.
13675 (PTRACE_SETREGSET): Likewise.
13676 (x86_fill_xstateregset): Likewise.
13677 (x86_store_xstateregset): Likewise.
13678 (use_xml): Likewise.
13679 (x86_linux_update_xmltarget): Likewise.
13680 (x86_linux_process_qsupported): Likewise.
13681 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13682 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13683 init_registers_i386_linux here. Call
13684 x86_linux_update_xmltarget.
13685 (the_low_target): Add x86_linux_process_qsupported.
13686
13687 * server.c (handle_query): Call target_process_qsupported.
13688
13689 * target.h (target_ops): Add process_qsupported.
13690 (target_process_qsupported): New.
13691
fc7238bb
PA
136922010-04-03 Pedro Alves <pedro@codesourcery.com>
13693
13694 * inferiors.c (add_thread): Set last_status kind to
13695 TARGET_WAITKIND_IGNORE.
13696 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13697 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13698 (linux_wait_1): Move `thread' local definition to block that uses
13699 it. Don't NULL initialize `event_child'.
13700 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13701 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13702 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13703
bdabb078
PA
137042010-04-01 Pedro Alves <pedro@codesourcery.com>
13705
13706 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13707 an extended waitstatus, or by a watchpoint.
13708 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13709 thread was stepping or has been stopped by a watchpoint.
13710
d3bbe7a0
PA
137112010-04-01 Pedro Alves <pedro@codesourcery.com>
13712
13713 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13714 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13715 of another, then delete the previous, and validate all
13716 breakpoints.
13717 (validate_inserted_breakpoint): New.
13718 (delete_disabled_breakpoints): New.
13719 (validate_breakpoints): New.
13720 (check_mem_read): Validate breakpoints before trusting their
13721 shadow. Delete disabled breakpoints.
13722 (check_mem_write): Validate breakpoints before trusting they
13723 should be inserted. Delete disabled breakpoints.
13724 * mem-break.h (validate_breakpoints):
13725 * server.c (handle_query): Validate breakpoints when we see a
13726 qSymbol query.
13727
8b07ae33
PA
137282010-04-01 Pedro Alves <pedro@codesourcery.com>
13729
13730 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13731 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13732 if we could tell there's a GDB breakpoint at stop_pc.
13733 (need_step_over_p): Don't do a step over if we find a GDB
13734 breakpoint at the resume PC.
13735
13736 * mem-break.c (struct raw_breakpoint): New.
13737 (enum bkpt_type): New type `gdb_breakpoint'.
13738 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13739 fields. New field `raw'.
13740 (find_raw_breakpoint_at): New.
13741 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13742 breakpoint instead.
13743 (set_breakpoint_at): Adjust.
13744 (delete_raw_breakpoint): New.
13745 (release_breakpoint): New.
13746 (delete_breakpoint): Rename to...
13747 (delete_breakpoint_1): ... this. Add proc parameter. Use
13748 release_breakpoint. Return ENOENT.
13749 (delete_breakpoint): Reimplement.
13750 (find_breakpoint_at): Delete.
13751 (find_gdb_breakpoint_at): New.
13752 (delete_breakpoint_at): Delete.
13753 (set_gdb_breakpoint_at): New.
13754 (delete_gdb_breakpoint_at): New.
13755 (gdb_breakpoint_here): New.
13756 (set_reinsert_breakpoint): Use release_breakpoint.
13757 (uninsert_breakpoint): Rename to ...
13758 (uninsert_raw_breakpoint): ... this.
13759 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13760 (reinsert_raw_breakpoint): Change parameter type to
13761 raw_breakpoint.
13762 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13763 instead.
13764 (check_breakpoints): Adjust. Use release_breakpoint.
13765 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13766 (breakpoint_inserted_here): Ditto.
13767 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13768 Don't trust the breakpoint's shadow if it is not inserted.
13769 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13770 (delete_all_breakpoints): Adjust.
13771 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13772 use delete_breakpoint_1.
13773
13774 * mem-break.h (breakpoints_supported): Delete declaration.
13775 (set_gdb_breakpoint_at): Declare.
13776 (gdb_breakpoint_here): Declare.
13777 (delete_breakpoint_at): Delete.
13778 (delete_gdb_breakpoint_at): Declare.
13779
13780 * server.h (struct raw_breakpoint): Forward declare.
13781 (struct process_info): New field `raw_breakpoints'.
13782
13783 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13784 breakpoints.
13785
6bf5e0ba
PA
137862010-03-24 Pedro Alves <pedro@codesourcery.com>
13787
13788 * linux-low.c (status_pending_p_callback): Fix comment.
13789 (linux_wait_for_event_1): Move most of the internal breakpoint
13790 handling from here...
13791 (linux_wait_1): ... to here.
13792 (count_events_callback): New.
13793 (select_singlestep_lwp_callback): New.
13794 (select_event_lwp_callback): New.
13795 (cancel_breakpoints_callback): New.
13796 (select_event_lwp): New.
13797 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13798 priority to all LWPs that have had events that should be reported
13799 to the client. Cancel breakpoints when about to reporting the
13800 event to the client, not while stopping lwps. No longer cancel
13801 finished single-steps here.
13802 (cancel_finished_single_step): Delete.
13803 (cancel_finished_single_steps): Delete.
13804
414a389f
PA
138052010-03-24 Pedro Alves <pedro@codesourcery.com>
13806
13807 * mem-break.c (enum bkpt_type): New.
13808 (struct breakpoint): New field `type'.
13809 (set_breakpoint_at): Change return type to struct breakpoint
13810 pointer. Set type to `other_breakpoint' by default.
13811 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13812 in the breakpoint list.
13813 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13814 (reinsert_breakpoint): Rename to ...
13815 (reinsert_raw_breakpoint): ... this.
13816 (reinsert_breakpoints_at): Adjust.
13817 * mem-break.h (struct breakpoint): Declare.
13818 (set_breakpoint_at): Change return type to struct breakpoint
13819 pointer.
13820
2280c721
PA
138212010-03-24 Pedro Alves <pedro@codesourcery.com>
13822
13823 * server.c (handle_query): Assign, not compare.
13824
d50171e4
PA
138252010-03-24 Pedro Alves <pedro@codesourcery.com>
13826
13827 Teach linux gdbserver to step-over-breakpoints.
13828
13829 * linux-low.c (can_hardware_single_step): New.
13830 (supports_breakpoints): New.
13831 (handle_extended_wait): If stopping threads, read the stop pc of
13832 the new cloned LWP.
13833 (get_pc): New.
13834 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13835 low target doesn't support retrieving the PC.
13836 (add_lwp): Set last_resume_kind to resume_continue.
13837 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13838 (linux_attach): Don't clear stop_expected. Set the lwp's
13839 last_resume_kind to resume_stop.
13840 (linux_detach_one_lwp): Don't check for removed breakpoints.
13841 (check_removed_breakpoint): Delete.
13842 (status_pending_p): Rename to ...
13843 (status_pending_p_callback): ... this. Don't check for removed
13844 breakpoints. Don't consider threads that are stopped from GDB's
13845 perspective.
13846 (linux_wait_for_lwp): Always read the stop_pc here.
13847 (cancel_breakpoint): New.
13848 (step_over_bkpt): New global.
13849 (linux_wait_for_event_1): Implement stepping over breakpoints.
13850 (gdb_wants_lwp_stopped): New.
13851 (gdb_wants_all_stopped): New.
13852 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13853 single-step traps here. Store the thread's last reported target
13854 wait status.
13855 (send_sigstop): Don't clear stop_expected. Always set it,
13856 instead.
13857 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13858 (cancel_finished_single_step): New.
13859 (cancel_finished_single_steps): New.
13860 (wait_for_sigstop): Don't cancel finished single-step traps here.
13861 (linux_resume_one_lwp): Don't check for removed breakpoints.
13862 Don't set `step' on non-hardware step archs.
13863 (linux_set_resume_request): Ignore resume_stop requests if already
13864 stopping or stopped. Set the lwp's last_resume_kind.
13865 (resume_status_pending_p): Don't check for removed breakpoints.
13866 (need_step_over_p): New.
13867 (start_step_over): New.
13868 (finish_step_over): New.
13869 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13870 requests. Clear the thread's last reported target waitstatus.
13871 Don't use the `suspended' flag. Don't consider pending breakpoints.
13872 (linux_resume): Start a step-over if necessary.
13873 (proceed_one_lwp): New.
13874 (proceed_all_lwps): New.
13875 (unstop_all_lwps): New.
13876 * linux-low.h (struct lwp_info): Rewrite comment for the
13877 `suspended' flag. Add the `stop_pc' field. Delete the
13878 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13879 Add `'last_resume_kind' and `need_step_over' fields.
13880 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13881 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13882 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13883 (set_raw_breakpoint_at): New.
13884 (set_breakpoint_at): Rewrite to use it.
13885 (reinsert_breakpoint_handler): Delete.
13886 (set_reinsert_breakpoint): New.
13887 (reinsert_breakpoint_by_bp): Delete.
13888 (delete_reinsert_breakpoints): New.
13889 (uninsert_breakpoint): Rewrite.
13890 (uninsert_breakpoints_at): New.
13891 (reinsert_breakpoint): Rewrite.
13892 (reinsert_breakpoints_at): New.
13893 (check_breakpoints): Rewrite.
13894 (breakpoint_here): New.
13895 (breakpoint_inserted_here): New.
13896 (check_mem_read): Adjust.
13897 * mem-break.h (breakpoints_supported, breakpoint_here)
13898 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13899 (reinsert_breakpoint_by_bp): Delete declaration.
13900 (delete_reinsert_breakpoints): Declare.
13901 (reinsert_breakpoint): Delete declaration.
13902 (reinsert_breakpoints_at): Declare.
13903 (uninsert_breakpoint): Delete declaration.
13904 (uninsert_breakpoints_at): Declare.
13905 (check_breakpoints): Adjust prototype.
13906 * server.h: Adjust include order.
13907 (struct thread_info): Declare here. Add a `last_status' field.
13908
30ba68cb
MS
139092010-03-23 Michael Snyder <msnyder@vmware.com>
13910
13911 * server.c (crc32): New function.
13912 (handle_query): Add handling for 'qCRC:' request.
13913
b9a881c2
PA
139142010-03-23 Pedro Alves <pedro@codesourcery.com>
13915
13916 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13917 lwp had been stopped by a watchpoint.
13918
e92d13d5
PA
139192010-03-16 Pedro Alves <pedro@codesourcery.com>
13920
13921 * server.h (internal_error): Declare.
13922 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13923 * utils.c (internal_error): New function.
13924
64daa791
AS
139252010-03-15 Andreas Schwab <schwab@redhat.com>
13926
13927 * configure.srv: Fix typo setting srv_regobj.
13928
f52cd8cd
PA
139292010-03-15 Pedro Alves <pedro@codesourcery.com>
13930
13931 * linux-low.c (fetch_register): Avoid passing a non string literal
13932 format to `error'.
13933 (usr_store_inferior_registers): Ditto.
13934
93ae6fdc
PA
139352010-03-14 Pedro Alves <pedro@codesourcery.com>
13936
13937 * linux-low.c (linux_write_memory): Bail out early if peeking
13938 memory failed.
13939
c3adc08c
PA
139402010-03-14 Pedro Alves <pedro@codesourcery.com>
13941
13942 * linux-low.h (struct lwp_info): New fields
13943 `stopped_by_watchpoint' and `stopped_data_address'.
13944 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13945 here, and cache them in the lwp object.
13946 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13947 directly.
13948 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13949 field.
13950 (linux_stopped_by_watchpoint): Rewrite.
13951 (linux_stopped_data_address): Rewrite.
13952
bce522a2
PA
139532010-03-06 Simo Melenius <simo.melenius@iki.fi>
13954
13955 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13956 switching the current inferior, not before.
13957
90884b2b
L
139582010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13959
13960 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13961 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13962 i386-linux.c and amd64-linux.c.
13963 (reg-i386.o): Removed.
13964 (reg-i386.c): Likewise.
13965 (reg-i386-linux.o): Likewise.
13966 (reg-i386-linux.c): Likewise.
13967 (reg-x86-64.o): Likewise.
13968 (reg-x86-64.c): Likewise.
13969 (reg-x86-64-linux.o): Likewise.
13970 (reg-x86-64-linux.c): Likewise.
13971 (i386.o): New.
13972 (i386.c): Likewise.
13973 (i386-linux.o): Likewise.
13974 (i386-linux.c): Likewise.
13975 (amd64.o): Likewise.
13976 (amd64.c): Likewise.
13977 (amd64-linux.o): Likewise.
13978 (amd64-linux.c): Likewise.
13979
13980 * configure.srv (srv_i386_regobj): New.
13981 (srv_i386_linux_regobj): Likewise.
13982 (srv_amd64_regobj): Likewise.
13983 (srv_amd64_linux_regobj): Likewise.
13984 (srv_i386_32bit_xmlfiles): Likewise.
13985 (srv_i386_64bit_xmlfiles): Likewise.
13986 (srv_i386_xmlfiles): Likewise.
13987 (srv_amd64_xmlfiles): Likewise.
13988 (srv_i386_linux_xmlfiles): Likewise.
13989 (srv_amd64_linux_xmlfiles): Likewise.
13990 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13991 srv_xmlfiles to $srv_i386_xmlfiles.
13992 (i[34567]86-*-mingw32ce*): Likewise.
13993 (i[34567]86-*-mingw*): Likewise.
13994 (i[34567]86-*-nto*): Likewise.
13995 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13996 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13997 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13998 (x86_64-*-linux*): Likewise.
13999
14000 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14001 (init_registers_amd64_linux): New.
14002 (x86_arch_setup): Replace init_registers_x86_64_linux with
14003 init_registers_amd64_linux.
14004
193f13e6
MK
140052010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14006
14007 * configure.ac: Check for libdl. If it is not available link against
14008 static libthread_db.
14009 * configure: Regenerate.
14010
85d721b8
PA
140112010-02-22 Pedro Alves <pedro@codesourcery.com>
14012
14013 PR9605
14014
14015 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14016 handing a read watchpoint.
14017 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14018
6076632b
DE
140192010-02-12 Doug Evans <dje@google.com>
14020
14021 * linux-low.c (linux_supports_tracefork_flag): Document.
14022 (linux_look_up_symbols): Add comment.
14023
3327ccf7
L
140242010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14025
14026 * regcache.c (supply_register): Clear regcache if buf is NULL.
14027
0718675c 140282010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14029 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14030
14031 * inferiors.c (find_inferior): Add function documentation.
14032 (unloaded_dll): Handle the case where the unloaded dll has not
14033 been previously registered in the dll list.
14034
177321bd
DJ
140352010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14036
14037 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14038 (thumb2_breakpoint): New.
14039 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14040
2b009048
DJ
140412010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14042
14043 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14044 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14045 breakpoints.
14046
3be029c7
PA
140472010-01-21 Pedro Alves <pedro@codesourcery.com>
14048
14049 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14050
18f5de3b
JK
140512010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14052
14053 * linux-s390-low.c (s390_collect_ptrace_register)
14054 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14055
3743bb4f
DE
140562010-01-21 Doug Evans <dje@google.com>
14057
14ce3065
DE
14058 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14059 (PTRACE_ARG4_TYPE): New macro.
14060 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14061 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14062 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14063 (usr_store_inferior_registers): Ditto.
14064 (linux_read_memory, linux_write_memory): Ditto.
14065 (linux_test_for_tracefork): Ditto.
14066
3743bb4f
DE
14067 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14068 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14069
8b315be5
PA
140702010-01-21 Pedro Alves <pedro@codesourcery.com>
14071
14072 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14073 target.
14074
85492558
PA
140752010-01-21 Pedro Alves <pedro@codesourcery.com>
14076
14077 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14078 prototype to take a regcache. Adjust.
14079
442ea881
PA
140802010-01-20 Pedro Alves <pedro@codesourcery.com>
14081
14082 * regcache.h (struct thread_info): Forward declare.
14083 (struct regcache): New.
14084 (new_register_cache): Adjust prototype.
14085 (get_thread_regcache): Declare.
14086 (free_register_cache): Adjust prototype.
14087 (registers_to_string, registers_from_string): Ditto.
14088 (supply_register, supply_register_by_name, collect_register)
14089 (collect_register_as_string, collect_register_by_name): Ditto.
14090 * regcache.c (struct inferior_regcache_data): Delete.
14091 (get_regcache): Rename to ...
14092 (get_thread_regcache): ... this. Adjust. Switch inferior before
14093 fetching registers.
14094 (regcache_invalidate_one): Adjust.
14095 (regcache_invalidate): Fix prototype.
14096 (new_register_cache): Return the new register cache.
14097 (free_register_cache): Change prototype.
14098 (realloc_register_cache): Adjust.
14099 (registers_to_string): Change prototype to take a regcache. Adjust.
14100 (registers_from_string): Ditto.
14101 (register_data): Ditto.
14102 (supply_register): Ditto.
14103 (supply_register_by_name): Ditto.
14104 (collect_register): Ditto.
14105 (collect_register_as_string): Ditto.
14106 (collect_register_by_name): Ditto.
14107 * server.c (process_serial_event): Adjust.
14108 * linux-low.h (regset_fill_func, regset_store_func): Change
14109 prototype.
14110 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14111 Change prototype.
14112 * linux-low.c (get_stop_pc): Adjust.
14113 (check_removed_breakpoint): Adjust.
14114 (linux_wait_for_event): Adjust.
14115 (linux_resume_one_lwp): Adjust.
14116 (fetch_register): Add regcache parameter. Adjust.
14117 (usr_store_inferior_registers): Ditto.
14118 (regsets_fetch_inferior_registers): Ditto.
14119 (regsets_store_inferior_registers): Ditto.
14120 (linux_fetch_registers, linux_store_registers): Ditto.
14121 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14122 regcache. Adjust.
43aaf8b6
PA
14123 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14124 Ditto.
442ea881
PA
14125 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14126 prototype to take a regcache.
14127 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14128 * remote-utils.c (convert_ascii_to_int, outreg)
14129 (prepare_resume_reply): Change prototype to take a regcache.
14130 Adjust.
14131 * target.h (struct target_ops) <fetch_registers, store_registers>:
14132 Change prototype to take a regcache.
14133 (fetch_inferior_registers, store_inferior_registers): Change
14134 prototype to take a regcache. Adjust.
14135 * proc-service.c (ps_lgetregs): Adjust.
14136 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14137 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14138 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14139 take a regcache. Adjust.
14140 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14141 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14142 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14143 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14144 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14145 (cris_cannot_fetch_register):
14146 (cris_breakpoint_at): Change prototype to take a regcache.
14147 Adjust.
14148 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14149 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14150 to take a regcache. Adjust.
14151 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14152 Adjust.
14153 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14154 take a regcache. Adjust.
14155 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14156 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14157 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14158 * linux-mips-low.c (mips_get_pc):
14159 (mips_set_pc): Change prototype to take a regcache. Adjust.
14160 (mips_reinsert_addr): Adjust.
14161 (mips_collect_register): Change prototype to take a regcache.
14162 Adjust.
14163 (mips_supply_register):
14164 (mips_collect_register_32bit, mips_supply_register_32bit)
14165 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14166 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14167 * linux-ppc-low.c (ppc_supply_ptrace_register)
14168 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14169 (parse_spufs_run): Adjust.
14170 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14171 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14172 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14173 take a regcache. Adjust.
14174 * linux-s390-low.c (s390_collect_ptrace_register)
14175 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14176 (s390_set_pc): Change prototype to take a regcache. Adjust.
14177 (s390_arch_setup): Adjust.
14178 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14179 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14180 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14181 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14182 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14183 regcache. Adjust.
14184 (sparc_breakpoint_at): Adjust.
14185 * linux-xtensa-low.c (xtensa_fill_gregset):
14186 (xtensa_store_gregset):
14187 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14188 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14189 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14190 prototype to take a regcache. Adjust.
14191 * win32-arm-low.c (arm_fetch_inferior_register)
14192 (arm_store_inferior_register): Change prototype to take a
14193 regcache. Adjust.
14194 * win32-i386-low.c (i386_fetch_inferior_register)
14195 (i386_store_inferior_register): Change prototype to take a
14196 regcache. Adjust.
14197 * win32-low.c (child_fetch_inferior_registers)
14198 (child_store_inferior_registers): Change prototype to take a
14199 regcache. Adjust.
14200 (win32_wait): Adjust.
14201 (win32_fetch_inferior_registers): Change prototype to take a
14202 regcache. Adjust.
14203 (win32_store_inferior_registers): Adjust.
14204 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14205 store_inferior_register>: Change prototype to take a regcache.
14206
60c3d7b0
DE
142072010-01-20 Doug Evans <dje@google.com>
14208
14209 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14210 #ifdef.
14211 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14212 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14213
dc146f7c
VP
142142010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14215
14216 * linux-low.c (linux_core_of_thread): New.
14217 (compare_ints, show_process, list_threads): New.
14218 (linux_qxfer_osdata): Report threads and cores.
14219 (linux_target_op): Register linux_core_of_thread.
14220 * remote-utils.c (prepare_resume_reply): Report the core.
14221 (buffer_xml_printf): Support %d specifier.
14222 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14223 New.
14224 (handle_query): Handle qXfer:threads. Announce availability
14225 thereof.
14226 * target.h (struct target_ops): New field core_of_thread.
14227
7803799a
UW
142282010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14229
14230 * Makefile.in (clean): Remove new generated files.
14231 (reg-s390.o, reg-s390.c): Remove rules.
14232 (reg-s390x.o, reg-s390x.c): Likewise.
14233 (s390-linux32.o, s390-linux32.c): Add rules.
14234 (s390-linux64.o, s390-linux64.c): Likewise.
14235 (s390x-linux64.o, s390x-linux64.c): Likewise.
14236 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14237 * linux-s390-low.c: Include <elf.h>.
14238 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14239 (init_registers_s390): Remove prototype.
14240 (init_registers_s390x): Likewise.
14241 (init_registers_s390_linux32): Add prototype.
14242 (init_registers_s390_linux64): Likewise.
14243 (init_registers_s390x_linux64): Likewise.
14244 (s390_num_regs_3264): New define.
14245 (s390_regmap_3264): New global variable.
14246 (s390_cannot_fetch_register): Remove obsolete check.
14247 (s390_cannot_store_register): Likewise.
14248 (s390_collect_ptrace_register): Handle upper/lower register halves.
14249 (s390_supply_ptrace_register): Likewise.
14250 (s390_fill_gregset): Update to register number changes.
14251 (s390_get_hwcap): New routine.
14252 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14253 Install appropriate regmap and register set.
14254
6e7ffa39
JB
142552010-01-01 Joel Brobecker <brobecker@adacore.com>
14256
14257 * server.c (gdbserver_version): Update copyright year to 2010.
14258 * gdbreplay.c (gdbreplay_version): Likewise.
14259
957f3f49
DE
142602009-12-28 Doug Evans <dje@google.com>
14261
14262 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14263 elf/external.h. Include <elf.h> instead but only if necessary.
14264
ca5c370d
PA
142652009-12-28 Pedro Alves <pedro@codesourcery.com>
14266
14267 * linux-low.c (linux_remove_process): Remove `detaching'
14268 parameter. Don't release/detach from thread_db here.
14269 (linux_kill): Release/detach from thread_db here, ...
14270 (linux_detach): ... and here, before actually detaching.
14271 (linux_wait_1): ... and here, when a process exits.
14272 * thread-db.c (any_thread_of): New.
14273 (thread_db_free): Switch the current inferior to a thread of the
14274 passed in process.
14275
4ee62156
DE
142762009-12-21 Doug Evans <dje@google.com>
14277
d90e6a88
DE
14278 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14279
c5f62d5f
DE
14280 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14281 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14282 warning ifndef __NR_tkill. Move setting of errno there too.
14283 Delete unnecessary resetting of errno after syscall.
14284 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14285
10e86dd7
DE
14286 * configure.ac: Check for dladdr.
14287 * config.in: Regenerate.
14288 * configure: Regenerate.
14289 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14290 (try_thread_db_load): Update.
14291
4ee62156
DE
14292 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14293
00f515da
DE
142942009-12-18 Doug Evans <dje@google.com>
14295
e9464885
DE
14296 * event-loop.c: Include unistd.h if it exists.
14297
07d4f67e
DE
14298 * linux-low.c (my_waitpid): Move definition away from being in
14299 between linux_tracefork_child/linux_test_for_tracefork.
14300
00f515da
DE
14301 * gdb_proc_service.h (psaddr_t): Fix type.
14302 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14303 signature to match glibc.
14304
1de1badb
DE
143052009-12-16 Doug Evans <dje@google.com>
14306
14307 * linux-low.c (linux_read_memory): Fix argument to read.
14308
aeeb81d1
PA
143092009-11-26 Pedro Alves <pedro@codesourcery.com>
14310
14311 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14312 events, don't leave current_inferior pointing at null.
14313
10357975
PA
143142009-11-26 Pedro Alves <pedro@codesourcery.com>
14315
14316 * win32-low.c (LOG): Delete.
14317 (OUTMSG): Output to stderr.
14318 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14319 on compile time LOG macro.
14320 (win32_wait): Fix debug output.
14321
cf6e3471
PA
143222009-11-26 Pedro Alves <pedro@codesourcery.com>
14323
14324 * win32-low.c (win32_add_one_solib): If the dll name is
14325 "ntdll.dll", prepend the system directory to the dll path.
14326
0c85e18e
MK
143272009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14328
14329 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14330
9ac544ce 143312009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14332 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14333
14334 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14335 * configure.ac: Check for __mcoldfire__ and set
14336 gdb_cv_m68k_is_coldfire.
14337 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14338 reg-cf.o and reg-m68k.o.
14339 * configure: Regenerated.
14340
fd7dd3e6
PA
143412009-11-16 Pedro Alves <pedro@codesourcery.com>
14342
14343 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14344 Pass it to thread_db_free.
14345 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14346 proper `detaching' argument to linux_remove_process.
14347 * linux-low.h (thread_db_free): Add `detaching' parameter.
14348 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14349 to thread_db_free.
14350 (thread_db_free): Add `detaching' parameter. Only
14351 call td_ta_clear_event if detaching from process.
14352
75aa492e
MK
143532009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14354
14355 * thread-db.c (thread_db_free): Fix typo.
14356
21e1bee4
PP
143572009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14358
14359 PR gdb/10838
14360 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14361
8838b45e
NS
143622009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14363
14364 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14365 with an i686 compiler.
14366 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14367 needed.
14368 * configure: Rebuilt.
14369
8a35fb51
SL
143702009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14371
14372 PR gdb/10783
14373
14374 * server.c (handle_search_memory_1): Correct read_addr initialization
14375 in loop for searching subsequent chunks.
14376
96f15937
PP
143772009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14378
14379 * configure.ac: New --with-libthread-db option.
14380 * thread-db.c: Allow direct dependence on libthread_db.
14381 (thread_db_free): Adjust.
14382 * config.in: Regenerate.
14383 * configure: Likewise.
889bf7c5 14384
5f7d1694
PP
143852009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14386
14387 PR gdb/10757
14388 * thread-db.c (attach_thread): New function.
14389 (maybe_attach_thread): Return success/failure.
14390 (find_new_threads_callback): Adjust.
889bf7c5
PA
14391 (thread_db_find_new_threads): Loop until no new threads.
14392
88e3b899
PA
143932009-10-13 Pedro Alves <pedro@codesourcery.com>
14394
14395 * proc-service.c (ps_lgetregs): Formatting.
14396
cdbfd419
PP
143972009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14398
14399 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14400 * configure.ac: Adjust.
14401 * linux-low.h (struct process_info_private): Move members to struct
14402 thread_db.
14403 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14404 * linux-low.c (linux_remove_process): Adjust.
14405 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14406 * server.c (handle_query): Move code ...
14407 (handle_monitor_command): ... here. New function.
14408 * target.h (struct target_ops): New member.
14409 * thread-db.c (struct thread_db): New.
14410 (libthread_db_search_path): New variable.
14411 (thread_db_create_event, thread_db_enable_reporting)
14412 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14413 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14414 (try_thread_db_load_1, dladdr_to_soname): New functions.
14415 (try_thread_db_load, thread_db_load_search): New functions.
14416 (thread_db_init): Search for libthread_db.
14417 (thread_db_free): New function.
14418 (thread_db_handle_monitor_command): Likewise.
14419 * config.in: Regenerate.
14420 * configure: Regenerate.
889bf7c5 14421
4168d2d6
UW
144222009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14423
14424 * spu-low.c (spu_kill): Wait for inferior to terminate.
14425 Call clear_inferiors.
14426 (spu_detach): Call clear_inferiors.
14427
81ecdfbb
RW
144282009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14429
14430 * aclocal.m4: Regenerate.
14431 * config.in: Likewise.
14432 * configure: Likewise.
14433
0b9ff2c0
UW
144342009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14435
14436 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14437 (parse_spufs_run): New function.
14438 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14439 (ppc_breakpoint_at): Handle SPU breakpoints.
14440
efcbbd14
UW
144412009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14442
14443 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14444 (SPUFS_MAGIC): Define.
14445 (spu_enumerate_spu_ids): New function.
14446 (linux_qxfer_spu): New function.
14447 (linux_target_ops): Install linux_qxfer_spu.
14448
f4d9bade
UW
144492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14450
14451 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14452 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14453 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14454 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14455 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14456 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14457 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14458 (init_registers_powerpc_cell32l): Add prototype.
14459 (init_registers_powerpc_cell64l): Likewise.
14460 (ppc_arch_setup): Detect Cell/B.E. architecture.
14461
96e946ca
RW
144622009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14463
14464 * Makefile.in (datarootdir): New variable.
14465
58d6951d
DJ
144662009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14467
14468 * linux-low.c (linux_write_memory): Update debugging output.
14469 * Makefile.in (clean): Add new descriptions.
14470 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14471 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14472 * configure.srv: Add new files for arm*-*-linux*.
14473 * linux-arm-low.c: Add new declarations.
14474 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14475 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14476 (HWCAP_VFPv3D16): New.
14477 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14478 instead of __IWMMXT__.
14479 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14480 (arm_arch_setup): New.
14481 (target_regsets): Remove #ifdef. Add VFP regset.
14482 (the_low_target): Use arm_arch_setup.
14483
12b42a12
DJ
144842009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14485
14486 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14487 the main thread again.
14488
ac8c974e
AR
144892009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14490
14491 Adding Neutrino gdbserver.
14492 * configure: Regenerated.
14493 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14494 * configure.srv (i[34567]86-*-nto*): New target.
14495 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14496 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14497 (nto_comctrl) [__QNX__]: New function.
14498 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14499
4424e0c3 145002009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14501
14502 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14503 srv_tgtobj.
14504
912cf4ba
PA
145052009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14506 Pedro Alves <pedro@codesourcery.com>
14507
14508 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14509 don't support CONTEXT_EXTENDED_REGISTERS.
14510 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14511 (the_low_target): Install them.
14512 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14513 failing with ERROR_PIPE_NOT_CONNECTED.
14514
aa5ca48f
DE
145152009-06-30 Doug Evans <dje@google.com>
14516 Pierre Muller <muller@ics.u-strasbg.fr>
14517
14518 Add h/w watchpoint support to x86-linux, win32-i386.
14519 * Makefile.in (SFILES): Add i386-low.c
14520 (i386_low_h): Define.
14521 (i386-low.o): Add dependencies.
14522 (linux-x86-low.o): Add i386-low.h dependency.
14523 (win32-i386-low.o): Ditto.
14524 * i386-low.c: New file.
14525 * i386-low.h: New file.
14526 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14527 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14528 * linux-low.c (linux_add_process): Initialize arch_private.
14529 (linux_remove_process): Free arch_private.
14530 (add_lwp): Initialize arch_private.
14531 (delete_lwp): Free arch_private.
14532 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14533 provided.
14534 * linux-low.h (process_info_private): New member arch_private.
14535 (lwp_info): New member arch_private.
14536 (linux_target_ops): New members new_process, new_thread,
14537 prepare_to_resume.
14538 (ptid_of): New macro.
14539 * linux-x86-low.c: Include stddef.h, i386-low.h.
14540 (arch_process_info): New struct.
14541 (arch_lwp_info): New struct.
14542 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14543 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14544 (i386_dr_low_get_status): New function.
14545 (x86_insert_point, x86_remove_point): New functions.
14546 (x86_stopped_by_watchpoint): New function.
14547 (x86_stopped_data_address): New function.
14548 (x86_linux_new_process, x86_linux_new_thread): New functions.
14549 (x86_linux_prepare_to_resume): New function.
14550 (the_low_target): Add entries for insert_point, remove_point,
14551 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14552 prepare_to_resume.
14553 * server.c (debug_hw_points): New global.
14554 (monitor_show_help): Document set debug-hw-points.
14555 (handle_query): Process "set debug-hw-points".
14556 * server.h (debug_hw_points): Declare.
14557 (paddress): Declare.
14558 * utils.c (NUMCELLS, CELLSIZE): New macros.
14559 (get_sell, xsnprintf, paddress): New functions.
14560 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14561 remove_point, stopped_by_watchpoint, stopped_data_address.
14562 * win32-i386-low.c: Include i386-low.h.
14563 (debug_reg_state): Replaces dr.
14564 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14565 (i386_dr_low_get_status): New function.
14566 (i386_insert_point, i386_remove_point): New functions.
14567 (i386_stopped_by_watchpoint): New function.
14568 (i386_stopped_data_address): New function.
14569 (i386_initial_stuff): Update.
14570 (get_thread_context,set_thread_context,i386_thread_added): Update.
14571 (the_low_target): Add entries for insert_point,
14572 remove_point, stopped_by_watchpoint, stopped_data_address.
14573 * win32-low.c (win32_insert_watchpoint): New function.
14574 (win32_remove_watchpoint): New function.
14575 (win32_stopped_by_watchpoint): New function.
14576 (win32_stopped_data_address): New function.
14577 (win32_target_ops): Add entries for insert_watchpoint,
14578 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14579 * win32-low.h (win32_target_ops): New members insert_point,
14580 remove_point, stopped_by_watchpoint, stopped_data_address.
14581
d993e290
PA
145822009-06-25 Pedro Alves <pedro@codesourcery.com>
14583
14584 * server.c (process_serial_event): Re-return unsupported, not
14585 error, if the type isn't recognized. Re-allow supporting only
14586 insert or remove packets. Also call require_running for
14587 breakpoints. Add missing break statement to default case. Tidy.
14588 * target.h (struct target_ops): Rename insert_watchpoint to
14589 insert_point, and remove_watchpoint to remove_point.
14590
14591 * linux-low.h (struct linux_target_ops): Likewise.
14592 * linux-low.c (linux_insert_watchpoint): Rename to ...
14593 (linux_insert_point): ... this. Adjust.
14594 (linux_remove_watchpoint): Rename to ...
14595 (linux_remove_point): ... this. Adjust.
14596 (linux_target_ops): Adjust.
14597 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14598 (cris_insert_point): ... this.
14599 (cris_remove_watchpoint): Rename to ...
14600 (cris_remove_point): ... this.
14601 (the_low_target): Adjust.
14602
0f54c268
PM
146032009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14604
14605 * server.c (handle_v_kill): Pass signal_pid to
14606 kill_inferior if multi_process is zero.
14607
c6314022
AR
146082009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14609
14610 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14611 * target.h (target_ops): Comment for *_watchpoint to make it clear
14612 the functions can get types '0' and '1'.
14613
4463ce24
AR
146142009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14615
14616 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14617 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14618 * regcache.c (get_regcache): Likewise.
14619 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14620 * win32-low.c (child_fetch_inferior_registers): Remove check for
14621 regno 0.
14622
cf8fd78b
PA
146232009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14624 Pedro Alves <pedro@codesourcery.com>
14625
14626 * target.h (struct target_ops) <supports_multi_process>: New
14627 callback.
14628 (target_supports_multi_process): New.
14629 * server.c (handle_query): Even if GDB reports support, only
14630 enable multi-process if the target also supports it. Report
14631 multi-process support only if the target backend supports it.
14632 * linux-low.c (linux_supports_multi_process): New function.
14633 (linux_target_ops): Install it as target_supports_multi_process
14634 callback.
14635
47c0c975
DE
146362009-05-24 Doug Evans <dje@google.com>
14637
e09875d4
DE
14638 Global renaming of find_thread_pid to find_thread_ptid.
14639 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14640 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14641 All callers updated.
14642
e27d73f6
DE
14643 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14644 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14645 directly.
14646
47c0c975
DE
14647 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14648 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14649 (linux_resume_one_lwp): Ditto.
14650
2acc282a
DE
146512009-05-23 Doug Evans <dje@google.com>
14652
14653 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14654 from struct inferior_list_entry * to struct lwp_info *.
14655 All callers updated.
14656
9f1036c1
DE
146572009-05-13 Doug Evans <dje@google.com>
14658
14659 * linux-x86-low.c: Don't include assert.h.
14660 (x86_siginfo_fixup): Use fatal, not assert.
14661 (x86_arch_setup): Fix comment.
14662
d0722149
DE
146632009-05-12 Doug Evans <dje@google.com>
14664
14665 Biarch support for i386/amd64 gdbserver.
14666 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14667 Add linux-x86-low.c.
14668 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14669 (linux-x86-low.o): Add.
14670 * linux-x86-64-low.c: Delete.
14671 * linux-i386-low.c: Delete.
14672 * linux-x86-low.c: New file.
14673 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14674 linux-x86-low.o.
14675 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14676 linux-x86-low.o.
14677 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14678 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14679 (linux_child_pid_to_exec_file): New function.
14680 (elf_64_header_p, elf_64_file_p): New functions.
14681 (siginfo_fixup): New function.
14682 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14683 give target a chance to convert layout.
14684 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14685 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14686
fdeb2a12
DE
146872009-05-07 Doug Evans <dje@google.com>
14688
14689 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14690 (regsets_store_inferior_registers): Ditto.
14691
a6dbe5df
PA
146922009-05-06 Pedro Alves <pedro@codesourcery.com>
14693
14694 PR server/10048
14695
14696 * linux-low.c (must_set_ptrace_flags): Delete.
14697 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14698 of the global.
14699 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14700 `lwp->must_set_ptrace_flags' instead.
ba42693b 14701 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14702 (linux_wait_1): ... not here.
14703
5091eb23
DE
147042009-04-30 Doug Evans <dje@google.com>
14705
9f767825
DE
14706 * inferiors.c (started_inferior_callback): New function.
14707 (attached_inferior_callback): New function.
14708 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14709 * server.c (print_started_pid, print_attached_pid): New functions.
14710 (detach_or_kill_for_exit): New function.
14711 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14712 * server.h (have_started_inferiors_p): Declare.
14713 (have_attached_inferiors_p): Declare.
14714
5091eb23
DE
14715 * inferiors.c (remove_process): Fix memory leak, free process.
14716 * linux-low.c (linux_remove_process): New function.
14717 (linux_kill): Call it instead of remove_process.
14718 (linux_detach, linux_wait_1): Ditto.
14719
155c8968
PA
147202009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14721
14722 * configure.srv: Add x86 Windows CE target.
14723
7fe519cb
UW
147242009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14725
14726 * inferiors.c (get_thread_process): Make global.
14727 * server.h (get_thread_process): Add prototype.
14728 * thread-db.c (find_one_thread): Use get_thread_process
14729 instead of current_process.
14730 (thread_db_get_tls_address): Do not crash if called when
14731 thread layer is not yet initialized.
14732
5472f405
UW
147332009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14734
14735 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14736 * spu-low.c (current_tid): Rename to ...
14737 (current_ptid): ... this.
14738 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14739 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14740 ptid_get_lwp (current_ptid) instead of current_tid.
14741 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14742 instead of current_tid. Use find_process_pid to verify pid
14743 argument is valid. Pass proper argument to remove_process.
14744 (spu_thread_alive): Compare current_ptid instead of current_tid.
14745 (spu_resume): Likewise.
14746
55ac2b99
PA
147472009-04-02 Pedro Alves <pedro@codesourcery.com>
14748
14749 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14750 variable.
14751
95954743
PA
147522009-04-01 Pedro Alves <pedro@codesourcery.com>
14753
14754 Implement the multiprocess extensions, and add linux multiprocess
14755 support.
14756
14757 * server.h (ULONGEST): Declare.
14758 (struct ptid, ptid_t): New.
14759 (minus_one_ptid, null_ptid): Declare.
14760 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14761 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14762 (struct inferior_list_entry): Change `id' type from unsigned from
14763 to ptid_t.
14764 (struct sym_cache, struct breakpoint, struct
14765 process_info_private): Forward declare.
14766 (struct process_info): Declare.
14767 (current_process): Declare.
14768 (all_processes): Declare.
14769 (initialize_inferiors): Declare.
14770 (add_thread): Adjust to use ptid_t.
14771 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14772 (add_process, remove_process, find_thread_pid): Declare.
14773 (find_inferior_id): Adjust to use ptid_t.
14774 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14775 (multi_process): Declare.
14776 (push_event): Adjust to use ptid_t.
14777 (read_ptid, write_ptid): Declare.
14778 (prepare_resume_reply): Adjust to use ptid_t.
14779 (clear_symbol_cache): Declare.
14780 * inferiors.c (all_processes): New.
14781 (null_ptid, minus_one_ptid): New.
14782 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14783 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14784 (add_thread): Change unsigned long to ptid. Remove gdb_id
14785 parameter. Adjust.
14786 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14787 (gdb_id_to_thread): Rename to ...
14788 (find_thread_pid): ... this. Change unsigned long to ptid.
14789 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14790 (loaded_dll, pull_pid_from_list): Adjust.
14791 (add_process, remove_process, find_process_pid)
14792 (get_thread_process, current_process, initialize_inferiors): New.
14793 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14794 (struct target_waitstatus) <related_pid>: Ditto.
14795 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14796 return type to int.
14797 (struct target_ops) <join>: Add `pid' argument.
14798 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14799 (struct target_ops) <wait>: Add `ptid' field. Change return type
14800 to ptid.
14801 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14802 (mywait): Add `ptid' argument. Change return type to ptid_t.
14803 (target_pid_to_str): Declare.
14804 * target.c (set_desired_inferior): Adjust to use ptids.
14805 (mywait): Add new `ptid' argument. Adjust.
14806 (target_pid_to_str): New.
14807 * mem-break.h (free_all_breakpoints): Declare.
14808 * mem-break.c (breakpoints): Delelete.
14809 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14810 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14811 to use per-process breakpoint list.
14812 (free_all_breakpoints): New.
14813 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14814 (symbol_cache, all_symbols_looked_up): Delete.
14815 (hexchars): New.
14816 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14817 read_ptid): New.
14818 (prepare_resume_reply): Change ptid argument's type from unsigned
14819 long to ptid_t. Adjust. Implement W;process and X;process.
14820 (free_sym_cache, clear_symbol_cache): New.
14821 (look_up_one_symbol): Adjust to per-process symbol cache. *
14822 * server.c (cont_thread, general_thread, step_thread): Change type
14823 to ptid_t.
14824 (attached): Delete.
14825 (multi_process): New.
14826 (last_ptid): Change type to ptid_t.
14827 (struct vstop_notif) <ptid>: Change type to ptid_t.
14828 (queue_stop_reply, push_event): Change `ptid' argument's type to
14829 ptid_t.
14830 (discard_queued_stop_replies): Add `pid' argument.
14831 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14832 changes. Don't reference the `attached' global.
14833 (attach_inferior): Adjust to mywait interface changes.
14834 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14835 features. Handle and report "multiprocess+". Handle
14836 "qAttached:PID".
14837 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14838 changes.
14839 (handle_v_kill): New.
14840 (handle_v_stopped): Adjust to use target_pid_to_str.
14841 (handle_v_requests): Allow multiple attaches and runs when
14842 multiprocess extensions are in effect. Handle "vKill".
14843 (myresume): Adjust to use ptids.
14844 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14845 (handle_status): Adjust to discard_queued_stop_replies interface
14846 change.
14847 (first_thread_of, kill_inferior_callback)
14848 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14849 (main): Call initialize_inferiors. Adjust to use ptids, killing
14850 and detaching from all inferiors. Handle multiprocess packet
14851 variants.
14852 * linux-low.h: Include gdb_proc_service.h.
14853 (struct process_info_private): New.
14854 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14855 <lwpid_of>: Use ptid_get_lwp.
14856 (get_lwp_thread): Adjust.
14857 (struct lwp_info): Add `dead' member.
14858 (find_lwp_pid): Declare.
14859 * linux-low.c (thread_db_active): Delete.
14860 (new_inferior): Adjust comment.
14861 (inferior_pid): Delete.
14862 (linux_add_process): New.
14863 (handle_extended_wait): Adjust.
14864 (add_lwp): Change unsigned long to ptid.
14865 (linux_create_inferior): Add process to processes table. Adjust
14866 to use ptids. Don't set new_inferior here.
14867 (linux_attach_lwp): Rename to ...
14868 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14869 it. Adjust to use ptids.
14870 (linux_attach_lwp): New.
14871 (linux_attach): Add process to processes table. Don't set
14872 new_inferior here.
14873 (struct counter): New.
14874 (second_thread_of_pid_p, last_thread_of_process_p): New.
14875 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14876 multiple processes.
14877 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14878 processes. Remove process from process table.
14879 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14880 to multiple processes.
14881 (any_thread_of): New.
14882 (linux_detach): Add `pid' argument, and handle it. Remove process
14883 from processes table.
14884 (linux_join): Add `pid' argument. Handle it.
14885 (linux_thread_alive): Change unsighed long argument to ptid_t.
14886 Consider dead lwps as not being alive.
14887 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14888 threads we're not interested in.
14889 (same_lwp, find_lwp_pid): New.
14890 (linux_wait_for_lwp): Change `pid' argument's type from int to
14891 ptid_t. Adjust.
14892 (linux_wait_for_event): Rename to ...
14893 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14894 from int to ptid_t. Adjust.
14895 (linux_wait_for_event): New.
14896 (linux_wait_1): Add `ptid' argument. Change return type to
14897 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14898 that exit from the process table.
14899 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14900 Adjust.
14901 (mark_lwp_dead): New.
14902 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14903 stopping all threads, mark its main lwp as dead.
14904 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14905 ptids.
14906 (fetch_register, usr_store_inferior_registers)
14907 (regsets_fetch_inferior_registers)
14908 (regsets_store_inferior_registers, linux_read_memory)
14909 (linux_write_memory): Inline `inferior_pid'.
14910 (linux_look_up_symbols): Adjust to use per-process
14911 `thread_db_active'.
14912 (linux_request_interrupt): Adjust to use ptids.
14913 (linux_read_auxv): Inline `inferior_pid'.
14914 (initialize_low): Don't reference thread_db_active.
14915 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14916 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14917 (ps_getpid): Return the pid of the current inferior.
14918 * thread-db.c (proc_handle, thread_agent): Delete.
14919 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14920 per-process data.
14921 (find_one_thread): Change argument type to ptid_t. Adjust to
14922 per-process data.
14923 (maybe_attach_thread): Adjust to per-process data and ptids.
14924 (thread_db_find_new_threads): Ditto.
14925 (thread_db_init): Ditto.
14926 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14927 processes table. Adjust to use ptids.
14928 (spu_kill, spu_detach): Adjust interface. Remove process from
14929 processes table.
14930 (spu_join, spu_thread_alive): Adjust interface.
14931 (spu_wait): Adjust interface. Remove process from processes
14932 table. Adjust to use ptids.
14933 * win32-low.c (current_inferior_tid): Delete.
14934 (current_inferior_ptid): New.
14935 (debug_event_ptid): New.
14936 (thread_rec): Take a ptid. Adjust.
14937 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14938 (child_delete_thread): Ditto.
14939 (do_initial_child_stuff): Add `attached' argument. Add process to
14940 processes table.
14941 (child_fetch_inferior_registers, child_store_inferior_registers):
14942 Adjust.
14943 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14944 (win32_attach): Pass 1 to do_initial_child_stuff.
14945 (win32_kill): Adjust interface. Remove process from processes
14946 table.
14947 (win32_detach): Ditto.
14948 (win32_join): Adjust interface.
14949 (win32_thread_alive): Take a ptid.
14950 (win32_resume): Adjust to use ptids.
14951 (get_child_debug_event): Ditto.
14952 (win32_wait): Adjust interface. Remove exiting process from
14953 processes table.
14954
bd99dc85
PA
149552009-04-01 Pedro Alves <pedro@codesourcery.com>
14956
14957 Non-stop mode support.
14958
14959 * server.h (non_stop): Declare.
14960 (gdb_client_data, handler_func): Declare.
14961 (delete_file_handler, add_file_handler, start_event_loop):
14962 Declare.
14963 (handle_serial_event, handle_target_event, push_event)
14964 (putpkt_notif): Declare.
14965 * target.h (enum resume_kind): New.
14966 (struct thread_resume): Replace `step' field by `kind' field.
14967 (TARGET_WNOHANG): Define.
14968 (struct target_ops) <wait>: Add `options' argument.
14969 <supports_non_stop, async, start_non_stop>: New fields.
14970 (target_supports_non_stop, target_async): New.
14971 (start_non_stop): Declare.
14972 (mywait): Add `options' argument.
14973 * target.c (mywait): Add `options' argument. Print child exit
14974 notifications here.
14975 (start_non_stop): New.
14976 * server.c (non_stop, own_buf, mem_buf): New globals.
14977 (struct vstop_notif): New.
14978 (notif_queue): New global.
14979 (queue_stop_reply, push_event, discard_queued_stop_replies)
14980 (send_next_stop_reply): New.
14981 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14982 interface changes.
14983 (attach_inferior): In non-stop mode, don't wait for the target
14984 here.
14985 (handle_general_set): Handle QNonStop.
14986 (handle_query): When handling qC, return the current general
14987 thread, instead of the first thread of the list.
14988 (handle_query): If the backend supports non-stop mode, include
14989 QNonStop+ in the qSupported query response.
14990 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14991 and non-stop mode.
14992 (handle_v_attach, handle_v_run): Handle non-stop mode.
14993 (handle_v_stopped): New.
14994 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14995 (myresume): Adjust to use resume_kind. Handle non-stop.
14996 (queue_stop_reply_callback): New.
14997 (handle_status): Handle non-stop mode.
14998 (main): Clear non_stop flag on reconnection. Use the event-loop.
14999 Refactor serial protocol handling from here ...
15000 (process_serial_event): ... to this new function. When GDB
15001 selects any thread, select one here. In non-stop mode, wait until
15002 GDB acks all pending events before exiting.
15003 (handle_serial_event, handle_target_event): New.
15004 * remote-utils.c (remote_open): Install remote_desc in the event
15005 loop.
15006 (remote_close): Remove remote_desc from the event loop.
15007 (putpkt_binary): Rename to...
15008 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15009 (putpkt_binary): New as wrapper around putpkt_binary_1.
15010 (putpkt_notif): New.
15011 (prepare_resume_reply): In non-stop mode, don't change the
15012 general_thread.
15013 * event-loop.c: New.
15014 * Makefile.in (OBJ): Add event-loop.o.
15015 (event-loop.o): New rule.
15016
15017 * linux-low.h (pid_of): Moved here.
15018 (lwpid_of): New.
15019 (get_lwp_thread): Use lwpid_of.
15020 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15021 * linux-low.c (pid_of): Delete.
15022 (inferior_pid): Use lwpid_of.
15023 (linux_event_pipe): New.
15024 (target_is_async_p): New.
15025 (delete_lwp): New.
15026 (handle_extended_wait): Use lwpid_of.
15027 (add_lwp): Don't set lwpid field.
15028 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15029 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15030 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15031 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15032 first. Adjust to linux_wait_for_event interface changes. Use
15033 lwpid_of.
15034 (linux_detach): Don't delete the main lwp here.
15035 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15036 (status_pending_p): Don't consider explicitly suspended lwps.
15037 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15038 pointer. Add OPTIONS argument. Change return type to int. Use
15039 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15040 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15041 pointer. Add status pointer argument. Return a pid instead of a
15042 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15043 changes. In non-stop mode, don't switch to a random thread.
15044 (linux_wait): Rename to...
15045 (linux_wait_1): ... this. Add target_options argument, and handle
15046 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15047 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15048 clean exit and signal exit code. Don't stop all threads in
15049 non-stop mode. In all-stop mode, only stop all threads when
15050 reporting a stop to GDB. Handle explicit thread stop requests.
15051 (async_file_flush, async_file_mark): New.
15052 (linux_wait): New.
15053 (send_sigstop): Use lwpid_of.
15054 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15055 interface changes. In non-stop mode, don't switch to a random
15056 thread.
15057 (linux_resume_one_lwp): Use lwpid_of.
15058 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15059 (linux_resume_one_thread): ... this. Handle resume_stop. In
15060 non-stop mode, don't look for pending flag in all threads.
15061 (resume_status_pending_p): Don't consider explicitly suspended
15062 threads.
15063 (my_waitpid): Reimplement. Emulate __WALL.
15064 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15065 Use lwpid_of.
15066 (sigchld_handler, linux_supports_non_stop, linux_async)
15067 (linux_start_non_stop): New.
15068 (linux_target_ops): Register linux_supports_non_stop, linux_async
15069 and linux_start_non_stop.
15070 (initialize_low): Install SIGCHLD handler.
15071 * thread-db.c (thread_db_create_event, find_one_thread)
15072 (thread_db_get_tls_address): Use lwpid_of.
15073 * win32-low.c (win32_detach): Adjust to use resume_kind.
15074 (win32_wait): Add `options' argument.
15075 * spu-low.c (spu_resume): Adjust to use resume_kind.
15076 (spu_wait): Add `options' argument.
15077
5b1c542e
PA
150782009-04-01 Pedro Alves <pedro@codesourcery.com>
15079
15080 Decouple target code from remote protocol.
15081
15082 * target.h (enum target_waitkind): New.
15083 (struct target_waitstatus): New.
15084 (struct target_ops) <wait>: Return an unsigned long. Take a
15085 target_waitstatus pointer instead of a char pointer.
15086 (mywait): Likewise.
15087 * target.c (mywait): Change prototype to return an unsigned long.
15088 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15089 * server.h (thread_from_wait, old_thread_from_wait): Delete
15090 declarations.
15091 (prepare_resume_reply): Change prototype to take a
15092 target_waitstatus.
15093 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15094 (last_status, last_ptid): New.
15095 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15096 pid instead of a signal.
15097 (attach_inferior): Remove "status" and "signal" parameters.
15098 Adjust.
15099 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15100 not as an address.
15101 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15102 (handle_v_requests, myresume): Remove "status" and "signal"
15103 parameters. Adjust.
15104 (handle_status): New.
15105 (main): Delete local `status'. Adjust.
15106 * remote-utils.c: Include target.h.
15107 (prepare_resume_reply): Change prototype to take a
15108 target_waitstatus. Adjust.
15109
15110 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15111 interface.
15112 * spu-low.c (spu_wait): Adjust.
15113 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15114 Delete.
15115 (win32_wait): Adjust.
15116
2bd7c093
PA
151172009-04-01 Pedro Alves <pedro@codesourcery.com>
15118
15119 * target.h (struct thread_resume): Delete leave_stopped member.
15120 (struct target_ops): Add a `n' argument to the `resume' callback.
15121 * server.c (start_inferior): Adjust.
15122 (handle_v_cont, myresume): Adjust.
15123 * linux-low.c (check_removed_breakpoint): Adjust to resume
15124 interface change, and to removed leave_stopped field.
15125 (resume_ptr): Delete.
15126 (struct thread_resume_array): New.
15127 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15128 resume interface change.
15129 (linux_continue_one_thread, linux_queue_one_thread)
15130 (resume_status_pending_p): Check if the resume field is NULL
15131 instead of checking the leave_stopped member.
15132 (linux_resume): Adjust to the target resume interface change.
15133 * spu-low.c (spu_resume): Adjust to the target resume interface
15134 change.
15135 * win32-low.c (win32_detach, win32_resume): Ditto.
15136
c35fafde
PA
151372009-04-01 Pedro Alves <pedro@codesourcery.com>
15138
15139 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15140 flag.
15141 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15142 pending.
15143 (linux_continue_one_thread): Only preserve the stepping flag if
15144 there's a pending breakpoint.
15145
0a59d50b
PA
151462009-03-31 Pedro Alves <pedro@codesourcery.com>
15147
15148 * server.c (main): After the inferior having exited, call
15149 remote_close before exiting gdbserver.
15150
f04c6d38
TJB
151512009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15152
15153 Fix size of FPSCR in Power 7 processors.
15154 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15155 (PPC_FEATURE_HAS_DFP): New #define.
15156 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15157 size of the FPSCR.
15158
78e5cee6
PA
151592009-03-23 Pedro Alves <pedro@codesourcery.com>
15160
15161 * server.c (handle_query) Whitespace and formatting.
15162
1b3f6016
PA
151632009-03-22 Pedro Alves <pedro@codesourcery.com>
15164
15165 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15166 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15167 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15168 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15169 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15170 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15171 Makefile.in, configure.ac: Fix whitespace throughout.
15172 * configure: Regenerate.
15173
a07b2135
PA
151742009-03-22 Pedro Alves <pedro@codesourcery.com>
15175
15176 * inferiors.c (find_inferior): Make it safe for the callback
15177 function to delete the currently iterated inferior.
15178
67cc2626
PA
151792009-03-22 Pedro Alves <pedro@codesourcery.com>
15180
15181 * Makefile.in (linuw_low_h): Move higher.
15182 (thread-db.o): Depend on $(linux_low_h).
15183
54a0b537
PA
151842009-03-17 Pedro Alves <pedro@codesourcery.com>
15185
15186 Rename "process" to "lwp" throughout.
15187
15188 * linux-low.c (all_processes): Rename to...
15189 (all_lwps): ... this.
15190 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15191 (add_process): Rename to ...
15192 (add_lwp): ... this. Adjust.
15193 (linux_create_inferior): Adjust.
15194 (linux_attach_lwp): Adjust.
15195 (linux_attach): Adjust.
15196 (linux_kill_one_process): Rename to ...
15197 (linux_kill_one_lwp): ... this. Adjust.
15198 (linux_kill): Adjust.
15199 (linux_detach_one_process): Rename to ...
15200 (linux_detach_one_lwp): ... this. Adjust.
15201 (linux_detach): Adjust.
15202 (check_removed_breakpoint): Adjust.
15203 (status_pending_p): Adjust.
15204 (linux_wait_for_process): Rename to ...
15205 (linux_wait_for_lwp): ... this. Adjust.
15206 (linux_wait_for_event): Adjust.
15207 (send_sigstop): Adjust.
15208 (wait_for_sigstop): Adjust.
15209 (stop_all_processes): Rename to ...
15210 (stop_all_lwps): ... this.
15211 (linux_resume_one_process): Rename to ...
15212 (linux_resume_one_lwp): ... this. Adjust.
15213 (linux_set_resume_request, linux_continue_one_thread)
15214 (linux_queue_one_thread, resume_status_pending_p)
15215 (usr_store_inferior_registers, regsets_store_inferior_registers)
15216 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15217 Adjust.
15218 * linux-low.h (get_process): Rename to ...
15219 (get_lwp): ... this. Adjust.
15220 (get_thread_process): Rename to ...
15221 (get_thread_lwp): ... this. Adjust.
15222 (get_process_thread): Rename to ...
15223 (get_lwp_thread): ... this. Adjust.
15224 (struct process_info): Rename to ...
15225 (struct lwp_info): ... this.
15226 (all_processes): Rename to ...
15227 (all_lwps): ... this.
15228 * proc-service.c (ps_lgetregs): Adjust.
15229 * thread-db.c (thread_db_create_event, find_one_thread)
15230 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15231
0b16c5cf
PA
152322009-03-14 Pedro Alves <pedro@codesourcery.com>
15233
15234 * server.c (handle_query): Handle "qAttached".
15235
32de4b9d
NS
152362009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15237
15238 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15239 GPLv3, update license URL.
15240
2aecd87f
DE
152412009-03-01 Doug Evans <dje@google.com>
15242
93efd302 15243 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15244 (server_h): Add gdb_signals.h.
15245 (signals.o): Update.
15246 * server.h (target_signal_from_host,target_signal_to_host_p)
15247 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15248
86b1f9c5
PM
152492009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15250
15251 * remote-utils.c (getpkt): Also generate remote-debug
15252 information if noack_mode is set.
15253
4aa995e1
PA
152542009-02-06 Pedro Alves <pedro@codesourcery.com>
15255
15256 * server.c (handle_query): Report qXfer:siginfo:read and
15257 qXfer:siginfo:write as supported and handle them.
15258 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15259 * linux-low.c (linux_xfer_siginfo): New.
15260 (linux_target_ops): Set it.
15261
62709adf
PA
152622009-01-26 Pedro Alves <pedro@codesourcery.com>
15263
15264 * server.c (gdbserver_usage): Mention --remote-debug.
15265 (main): Accept '--remote-debug' switch.
15266
aef93bd7
DE
152672009-01-18 Doug Evans <dje@google.com>
15268
15269 * regcache.c (new_register_cache): No need to check result of xcalloc.
15270 * server.c (handle_search_memory): Back out calls to xmalloc,
15271 result is checked and error is returned to user upon failure.
15272 (handle_query): Ditto. Add more checks for result of malloc.
15273 (handle_v_cont): Check result of malloc, report error back to
15274 user upon failure.
15275 (handle_v_run): Ditto. Call freeargv.
15276 * server.h (freeargv): Declare.
15277 * utils.c (freeargv): New fn.
15278
54363045
DE
152792009-01-15 Doug Evans <dje@google.com>
15280
f626972c
DE
15281 * gdbreplay.c (perror_with_name): Make arg const char *.
15282 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15283 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15284 * utils.c (perror_with_name): Make arg const char *.
54363045 15285
18aae699
PA
152862009-01-14 Pedro Alves <pedro@codesourcery.com>
15287
15288 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15289 when handling a EXIT_PROCESS_DEBUG_EVENT.
15290
ff703abe
JB
152912009-01-06 Joel Brobecker <brobecker@adacore.com>
15292
15293 * gdbreplay.c (gdbreplay_version): Update copyright year.
15294 * server.c (gdbserver_version): Likewise.
15295
f21cc1a2 152962009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15297
15298 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15299 (handle_extended_wait): Improve comment.
0e21c1ec 15300
bca929d3
DE
153012008-12-13 Doug Evans <dje@google.com>
15302
15303 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15304 * server.h (ATTR_MALLOC): New macro.
15305 (xmalloc,xcalloc,xstrdup): Declare.
15306 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15307 * inferiors.c: Ditto.
15308 * linux-low.c: Ditto.
15309 * mem-break.c: Ditto.
15310 * regcache.c: Ditto.
15311 * remote-utils.c: Ditto.
15312 * server.c: Ditto.
15313 * target.c: Ditto.
15314 * win32-low.c: Ditto.
15315
97438e3f
DE
153162008-12-12 Doug Evans <dje@google.com>
15317
896c7fbb
DE
15318 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15319 in debugging printf.
15320
97438e3f
DE
15321 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15322
e3b886f8
DE
153232008-12-09 Doug Evans <dje@google.com>
15324
15325 * linux-low.h (struct process_info): Delete member tid, unused.
15326 * thread-db.c (find_one_thread): Update.
15327 (maybe_attach_thread): Update.
15328
07e059b5
VP
153292008-12-02 Pedro Alves <pedro@codesourcery.com>
15330
889bf7c5
PA
15331 * target.h (struct target_ops): Add qxfer_osdata member.
15332 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15333 and dirent.h.
15334 (linux_qxfer_osdata): New functions.
15335 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15336 callback.
15337 * server.c (handle_query): Handle "qXfer:osdata:read:".
15338 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15339 (buffer_xml_printf): New functions.
15340 * server.h (struct buffer): New.
15341 (buffer_grow_str, buffer_grow_str0): New macros.
15342 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15343 (buffer_xml_printf): Declare.
07e059b5 15344
4cab47ab
DE
153452008-11-24 Doug Evans <dje@google.com>
15346
15347 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15348
f142445f
DJ
153492008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15350
15351 * server.c (handle_v_run): Always use the supplied argument list.
15352
d0107bb6 153532008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15354
d0107bb6
BW
15355 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15356 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15357
2c4ad781
TJB
153582008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15359
15360 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15361 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15362 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15363 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15364 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15365 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15366 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15367 XML target descriptions.
15368 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15369 when inferior is running on an ISA 2.05 or later processor. Add
15370 special case to return offset for full 64-bit slot of FPSCR when
15371 in 32-bits.
15372
dfb64f85
DJ
153732008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15374
15375 * Makefile.in (SFILES, clean): Added sparc64 files.
15376 (reg-sparc64.o, reg-sparc64.c): New.
15377 * configure.srv (sparc*-*-linux*): New configuration.
15378 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15379 syscall arguments for SPARC.
15380 (regsets_store_inferior_registers): Likewise.
15381 * linux-sparc-low.c: New file.
15382
66b6e1dd
DE
153832008-10-21 Doug Evans <dje@google.com>
15384
15385 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15386 (READLINE_DIR,READLINE_DEP): Delete.
15387 (INTERNAL_CFLAGS): Update.
15388 (LINTFLAGS): Update.
15389
9b710a42
PA
153902008-10-10 Pedro Alves <pedro@codesourcery.com>
15391
15392 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15393 whole argv from the last run, not just argv[0].
15394
5822d809
PA
153952008-09-08 Pedro Alves <pedro@codesourcery.com>
15396
15397 * regcache.c (new_register_cache): Return NULL if the register
15398 cache size isn't known yet.
15399 (free_register_cache): Avoid dereferencing a NULL regcache.
15400
74aac56f
DJ
154012008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15402
15403 * configure.srv: Merge MIPS and MIPS64.
15404
400b20f5
MR
154052008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15406
15407 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15408
677c5bb1
LM
154092008-08-18 Luis Machado <luisgpm@br.ibm.com>
15410
15411 * Makefile.in: Add required vsx dependencies.
15412
15413 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15414 Declare init_registers_powerpc_vsx32l.
15415 Declare init_registers_powerpc_vsx64l.
15416 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15417 (ppc_arch_setup): Check for VSX in hwcap.
15418 (ppc_fill_vsxregset): New function.
15419 (ppc_store_vsxregset): New function.
15420 Add new VSX entry in regset_info target_regsets.
15421
15422 * configure.srv: Add new VSX dependencies.
15423
a6f3e723
SL
154242008-08-12 Pedro Alves <pedro@codesourcery.com>
15425
15426 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15427 (remote_open): Set or clear transport_is_reliable.
15428 (putpkt_binary): Don't expect acks in noack mode.
15429 (getpkt): Don't send ack/nac in noack mode.
15430 * server.c (handle_general_set): Handle QStartNoAckMode.
15431 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15432 qSupported.
15433 (main): Reset noack_mode on every connection.
15434 * server.h (noack_mode): Declare.
15435
a417dc56
RW
154362008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15437
15438 * Makefile.in (GDBREPLAY_OBS): New variable.
15439 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15440
3221518c
UW
154412008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15442 Daniel Jacobowitz <dan@codesourcery.com>
15443
15444 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15445 (usr_store_inferior_registers): Likewise.
15446 (regsets_store_inferior_registers): Likewise.
15447
ec56be1b
PA
154482008-07-31 Rolf Jansen <rj@surtec.com>
15449 Pedro Alves <pedro@codesourcery.com>
15450
15451 * configure.ac: Check for memmem declaration.
15452 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15453 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15454 (disable_packet_qfThreadInfo): Unconditionally compile.
15455 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15456 * configure, config.in: Regenerate.
15457
2fe5e3ff
DE
154582008-07-28 Doug Kwan <dougkwan@google.com>
15459
15460 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15461 (linux_write_memory): Remove declaration of errno.
15462
836acd6d
UW
154632008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15464
15465 * linux-low.c (handle_extended_wait): Do not use "status"
15466 variable uninitialized.
15467
aeba519e
PA
154682008-07-07 Pedro Alves <pedro@codesourcery.com>
15469
15470 * server.c (handle_v_attach): Inhibit reporting dll changes.
15471
db42f210
PA
154722008-06-27 Pedro Alves <pedro@codesourcery.com>
15473
15474 * remote-utils.c (prepare_resume_reply): If requested, don't
15475 output "thread:TID" in the T stop reply.
15476
15477 * server.c (disable_packet_vCont, disable_packet_Tthread)
15478 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15479 (handle_query): If requested, disable support for qC, qfThreadInfo
15480 and qsThreadInfo.
15481 (handle_v_requests): If requested, disable support for vCont.
15482 (gdbserver_show_disableable): New.
15483 (main): Handle --disable-packet and --disable-packet=LIST.
15484
15485 * server.h (disable_packet_vCont, disable_packet_Tthread)
15486 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15487
8e4c5421
CD
154882008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15489
15490 * server.c (gdbserver_usage): Mention --version.
15491
6e23a804
DJ
154922008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15493
15494 * Makefile.in (gdbreplay.o): New rule.
15495
90aa6a40
JM
154962008-06-06 Joseph Myers <joseph@codesourcery.com>
15497
15498 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15499 message, not gdbserver.
15500
c16158bc 155012008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15502 Nathan Sidwell <nathan@codesourcery.com>
15503 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15504
15505 * acinclude.m4: Include ../../config/acx.m4.
15506 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15507 * configure, config.in: Regenerate.
15508 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15509 * server.c (gdbserver_version): Print PKGVERSION.
15510 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15511 (main): Adjust gdbserver_usage calls.
15512 * gdbreplay.c (version, host_name): Add declarations.
15513 (gdbreplay_version, gdbreplay_usage): New.
15514 (main): Accept --version and --help options.
15515
aeb75bf5
DJ
155162008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15517
15518 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15519 (arm_breakpoint_at): Handle Thumb.
15520 (the_low_target): Add comment.
15521
76b233dd
UW
155222008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15523
15524 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15525
08388c79
DE
155262008-05-09 Doug Evans <dje@google.com>
15527
a3c83fae
DE
15528 * server.h (decode_search_memory_packet): Declare.
15529 * remote-utils.c (decode_search_memory_packet): New fn.
15530 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15531 (handle_search_memory): New fn.
15532 (handle_query): Process qSearch:memory packets.
15533
bb9c3d36
UW
155342008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15535
15536 * regcache.c (registers_length): Remove.
15537 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15538 full register packet.
15539 * regcache.h (registers_length): Remove prototype.
15540 * server.h (PBUFSIZ): Define to 16384.
15541
7284e1be
UW
155422008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15543
15544 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15545 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15546 powerpc-64l.o, and powerpc-altivec64l.o.
15547 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15548 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15549 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15550 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15551 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15552 to srv_xmlfiles.
15553
15554 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15555 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15556 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15557 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15558 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15559 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15560 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15561 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15562 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15563 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15564 (clean): Update.
15565
15566 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15567 (init_registers_powerpc_32l): ... this new prototype.
15568 (init_registers_powerpc_32): Remove, replace by ...
15569 (init_registers_powerpc_altivec32l): ... this new prototype.
15570 (init_registers_powerpc_e500): Remove, replace by ...
15571 (init_registers_powerpc_e500l): ... this new prototype.
15572 (init_registers_ppc64): Remove, replace by ...
15573 (init_registers_powerpc_64l): ... this new prototype.
15574 (init_registers_powerpc_64): Remove, replace by ...
15575 (init_registers_powerpc_altivec64l): ... this new prototype.
15576 (ppc_num_regs): Set to 73.
15577 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15578 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15579 (ppc_cannot_store_register): Handle orig_r3 and trap.
15580 (ppc_arch_setup): Update init_registers_... calls.
15581 (ppc_fill_gregset): Handle orig_r3 and trap.
15582
15583 * inferiors.c (clear_inferiors): Reset current_inferior.
15584
fdc59709
PB
155852008-04-23 Paolo Bonzini <bonzini@gnu.org>
15586
889bf7c5
PA
15587 * acinclude.m4: Add override.m4.
15588 * configure: Regenerate.
fdc59709 15589
c9b2f845
UW
155902008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15591
15592 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15593 initial call to init_register_ppc64.
15594
550512b8
UW
155952008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15596
43aaf8b6
PA
15597 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15598 single powerpc*-*-linux* case.
550512b8
UW
15599 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15600
b6430ec3
UW
156012008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15602
15603 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15604 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15605 from reg_xmlfiles.
15606 * linux-ppc-low.c: Include <elf.h>.
15607 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15608 (ppc_hwcap): New global variable.
15609 (ppc_regmap): Remove __SPE__ #ifdef sections.
15610 (ppc_regmap_e500): New global variable.
15611 (ppc_cannot_store_register): Update __SPE__ special case.
15612 (ppc_get_hwcap): New function.
15613 (ppc_arch_setup): Use it to determine whether inferior supports
15614 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15615 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15616 Do not access registers if target does not support AltiVec.
15617 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15618 Do not access registers if target does not support SPE.
15619 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15620
52fa2412
UW
156212008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15622
15623 * linux-low.c (disabled_regsets, num_regsets): New.
15624 (use_regsets_p): Delete.
15625 (linux_wait_for_process): Clear disabled_regsets.
15626 (regsets_fetch_inferior_registers): Check and set it.
15627 (regsets_store_inferior_registers): Likewise.
15628 (linux_fetch_registers, linux_store_registers): Do not use
15629 use_regsets_p.
15630 (initialize_low): Allocate disabled_regsets.
15631
e28b3332
DJ
156322008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15633
15634 * Makefile.in (LIBOBJS): New.
15635 (OBS): Use LIBOBJS.
15636 (memmem.o): New rule.
15637 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15638 * configure: Regenerated.
15639
4536995d
UW
156402008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15641
15642 * server.c (handle_query): Never return "unsupported" for
15643 qXfer:features:read queries.
15644
221c031f
UW
156452008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15646
15647 * server.c (get_features_xml): Fix inverted condition.
15648 (handle_query): Always support qXfer:feature:read.
15649
ccd213ac
DJ
156502008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15651
15652 * server.c (wrapper_argv): New.
15653 (start_inferior): Handle wrapper_argv. If set, expect an extra
15654 trap.
15655 (gdbserver_usage): Document --wrapper.
15656 (main): Parse --wrapper.
15657
6fe305f7
UW
156582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15659
15660 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15661 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15662 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15663 (ppc_set_pc): Likewise.
15664 (ppc_arch_setup): New function.
15665 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15666 of collect_register.
889bf7c5 15667 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15668
5b0a002e
UW
156692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15670
15671 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15672 instead of linux-ppc64-low.o.
15673 * linux-ppc64-low.c: Remove file.
15674 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15675 (linux-ppc64-low.o): Remove rule.
15676
15677 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15678 (init_registers_powerpc_64): Likewise.
15679 (ppc_regmap): Conditionally define depending on __powerpc64__.
15680 (ppc_cannot_store_register): Do not special-case "fpscr" when
15681 compiled on __powerpc64__.
15682 (ppc_collect_ptrace_register): New function.
15683 (ppc_supply_ptrace_register): New function.
15684 (ppc_breakpoint): Change type to "unsigned int".
15685 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15686 (the_low_target): Conditionally provide initializers for the
889bf7c5 15687 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15688 collect_ptrace_register and supply_ptrace_register members.
15689
9b4b61c8
UW
156902008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15691
15692 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15693 * server.c (gdbserver_xmltarget): Define.
15694 (get_features_xml): Use it to replace "target.xml" and arch_string.
15695
15696 * configure.srv: Remove srv_xmltarget. Add XML files that were
15697 mentioned there to srv_xmlfiles instead. Remove conditional tests
15698 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15699 srv_xmlfiles and srv_regobj to include all possible choices.
15700 * configure.ac (srv_xmltarget): Remove.
15701 (srv_xmlfiles): Do not add "target.xml".
15702 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15703 checks for supplementary target information.
15704 * configure: Regenerate.
15705 * Makefile.in (XML_TARGET): Remove.
15706 (target.xml): Remove rule.
15707 (clean): Do not clean up target.xml.
15708 (.PRECIOUS): Do not mention target.xml.
15709
15710 * target.h (struct target_ops): Remove arch_string member.
15711 * linux-low.c (linux_arch_string): Remove.
15712 (linux_target_ops): Remove arch_string initializer.
15713 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15714 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15715 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15716 * spu-low.c (spu_arch_string): Remove.
15717 (spu_target_ops): Remove arch_string initializer.
15718 * win32-low.c (win32_arch_string): Remove.
15719 (win32_target_ops): Remove arch_string initializer.
15720 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15721 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15722 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15723
ee1a7ae4
UW
157242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15725
15726 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15727 by collect_ptrace_register and supply_ptrace_register hooks.
15728 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15729 instead of checking for the_low_target.left_pad_xfer.
15730 (usr_store_inferior_registers): Use collect_ptrace_register callback
15731 instead of checking for the_low_target.left_pad_xfer.
15732
15733 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15734 (s390_supply_ptrace_register): Likewise.
15735 (s390_fill_gregset): Call s390_collect_ptrace_register.
15736 (the_low_target): Update.
15737
15738 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15739 (ppc_supply_ptrace_register): Likewise.
15740 (the_low_target): Update.
15741
15742 * linux-i386-low.c (the_low_target): Update.
15743 * linux-x86-64-low.c (the_low_target): Update.
15744
d61ddec4
UW
157452008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15746
15747 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15748 reg-s390.o and reg-s390x.o.
15749
15750 * linux-low.c (new_inferior): New global variable.
15751 (linux_create_inferior, linux_attach): Set it.
15752 (linux_wait_for_process): Call the_low_target.arch_setup after the
15753 target has stopped for the first time.
15754 (initialize_low): Do not call the_low_target.arch_setup.
15755
15756 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15757 (s390_set_pc): Likewise.
15758 (s390_arch_setup): New function.
15759 (the_low_target): Use s390_arch_setup as arch_setup routine.
15760
15761 * regcache.c (realloc_register_cache): New function.
15762 (set_register_cache): Call it for each existing regcache.
15763
d05b4ac3
UW
157642008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15765
15766 * server.h (init_registers): Remove prototype.
15767
15768 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15769 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15770 instead of init_registers ().
15771 * linux-arm-low.c (init_registers_arm): Add prototype.
15772 (init_registers_arm_with_iwmmxt): Likewise.
15773 (the_low_target): Add initializer for arch_setup field.
15774 * linux-cris-low.c (init_registers_cris): Add prototype.
15775 (the_low_target): Add initializer for arch_setup field.
15776 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15777 (the_low_target): Add initializer for arch_setup field.
15778 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15779 (the_low_target): Add initializer for arch_setup field.
15780 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15781 (the_low_target): Add initializer for arch_setup field.
15782 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15783 (the_low_target): Add initializer for arch_setup field.
15784 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15785 (the_low_target): Add initializer for arch_setup field.
15786 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15787 (init_registers_mips64_linux): Likewise.
15788 (the_low_target): Add initializer for arch_setup field.
15789 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15790 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15791 (the_low_target): Add initializer for arch_setup field.
15792 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15793 (init_registers_powerpc_64): Likewise.
15794 (the_low_target): Add initializer for arch_setup field.
15795 * linux-s390-low.c (init_registers_s390): Add prototype.
15796 (init_registers_s390x): Likewise.
15797 (the_low_target): Add initializer for arch_setup field.
15798 * linux-sh-low.c (init_registers_sh): Add prototype.
15799 (the_low_target): Add initializer for arch_setup field.
15800 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15801 (the_low_target): Add initializer for arch_setup field.
15802 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15803 (the_low_target): Add initializer for arch_setup field.
15804
15805 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15806 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15807 instead of init_registers ().
15808 * win32-arm-low.c (init_registers_arm): Add prototype.
15809 (the_low_target): Add initializer for arch_setup field.
15810 * win32-i386-low.c (init_registers_i386): Add prototype.
15811 (the_low_target): Add initializer for arch_setup field.
15812
15813 * spu-low.c (init_registers_spu): Add prototype.
15814 (initialize_low): Call initialie_registers_spu () instead of
15815 initialize_registers ().
15816
fd96d250
PA
158172008-02-19 Pedro Alves <pedro@codesourcery.com>
15818
15819 * server.c (handle_v_requests): When handling the vRun and vAttach
15820 packets, if already debugging a process, don't kill it. Return an
15821 error instead.
15822
d41b6bb4
DJ
158232008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15824
15825 * server.c (handle_query): Correct length check.
15826
5ac588cf
PA
158272008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15828
15829 * win32-low.c (do_initial_child_stuff): Add process handle
15830 parameter. Set current_process_handle and current_process_id from the
15831 parameters. Clear globals.
15832 (win32_create_inferior): Don't set current_process_handle and
15833 current_process_id here. Instead pass them on the call to
15834 do_initial_child_stuff.
15835 (win32_attach): Likewise.
15836 (win32_clear_inferiors): New.
15837 (win32_kill): Don't close the current process handle or the
15838 current thread handle here. Instead call win32_clear_inferiors.
15839 (win32_detach): Don't open a new handle to the process. Call
15840 win32_clear_inferiors.
15841 (win32_join): Don't rely on current_process_handle; open a new
15842 handle using the process id.
15843 (win32_wait): Call win32_clear_inferiors when the inferior process
15844 has exited.
15845
ecd7ecbc
DJ
158462008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15847
15848 * server.c (monitor_show_help): Add "exit".
15849
1525d545
MG
158502008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15851
ecd7ecbc 15852 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15853 (clean): Add reg-xtensa.c.
15854 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15855 * configure.srv (xtensa*-*-linux*) New target.
15856 * linux-xtensa-low.c: New.
15857 * xtensa-xtregs.c: New.
1525d545 15858
59a016f0
PA
158592008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15860
15861 * hostio.c: Don't include errno.h.
15862 (errno_to_fileio_errno): Move to hostio-errno.
15863 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15864 error number outputting to the target->hostio_last_error callback.
15865 (hostio_packet_error): Use FILEIO_EINVAL directly.
15866 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15867 calls to hostio_error.
15868 * hostio-errno.c: New.
15869 * server.h (hostio_last_error_from_errno): Declare.
15870 * target.h (target_ops): Add hostio_last_error member.
15871 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15872 as hostio_last_error handler.
889bf7c5 15873 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15874 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15875 (wince_hostio_last_error): New functions.
15876 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15877 as hostio_last_error handler.
15878 (win32_target_ops) [!_WIN32_WCE]: Register
15879 hostio_last_error_from_errno as hostio_last_error handler.
15880 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15881 (hostio-errno.o): New rule.
15882 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15883 * configure.srv (srv_hostio_err_objs): New variable. Default to
15884 hostio-errno.o.
15885 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15886 * configure: Regenerate.
15887
2d717e4f
DJ
158882008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15889
15890 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15891 (linux_kill, linux_detach): Clean up the process list.
15892 * remote-utils.c (remote_open): Improve port number parsing.
15893 (putpkt_binary, input_interrupt): Only send interrupts if the target
15894 is running.
15895 * server.c (extended_protocol): Make static.
15896 (attached): Define earlier.
15897 (exit_requested, response_needed, program_argv): New variables.
15898 (target_running): New.
15899 (start_inferior): Clear attached here.
15900 (attach_inferior): Set attached here.
15901 (require_running): Define.
15902 (handle_query): Use require_running and target_running. Implement
15903 "monitor exit".
15904 (handle_v_attach, handle_v_run): New.
15905 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15906 (gdbserver_usage): Update.
15907 (main): Redo argument parsing. Handle --debug and --multi. Handle
15908 --attach along with other options or after the port. Save
15909 program_argv. Support no initial program. Resynchronize
15910 communication with GDB after an error. Handle "monitor exit".
15911 Use require_running and target_running. Always allow the extended
15912 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15913 restart in extended mode.
15914 * README: Refer to the GDB manual. Update --attach usage.
15915
7407e2de
AS
159162007-12-20 Andreas Schwab <schwab@suse.de>
15917
15918 * linux-low.c (STACK_SIZE): Define.
15919 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15920 (linux_test_for_tracefork): Likewise.
15921
b65d95c5
DJ
159222007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15923
15924 * linux-low.c (linux_wait_for_event): Update messages. Do not
15925 reinsert auto-delete breakpoints.
15926 * mem-break.c (struct breakpoint): Change return type of handler to
15927 int.
15928 (set_breakpoint_at): Update handler type.
15929 (reinsert_breakpoint_handler): Return 1 instead of calling
15930 delete_breakpoint.
15931 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15932 setting a new one.
15933 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15934 * mem-break.h (set_breakpoint_at): Update handler type.
15935 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15936 * win32-low.c (auto_delete_breakpoint): New.
15937 (get_child_debug_event): Use it.
15938
4e799345
DJ
159392007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15940
15941 * configure.ac: Check for pread and pwrite.
15942 * hostio.c (handle_pread): Fall back to lseek and read.
15943 (handle_pwrite): Fall back to lseek and write.
15944 * config.in, configure: Regenerated.
15945
27524b67
DJ
159462007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15947
15948 * server.c (myresume): Add own_buf argument.
15949 (main): Update calls.
15950
a20d5e98
DJ
159512007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15952
15953 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15954 * remote-utils.c (remote_open): Do not call disable_async_io.
15955 (block_async_io): Delete.
15956 (unblock_async_io): Make static.
15957 (initialize_async_io): New.
15958 * server.c (handle_v_cont): Handle async I/O here.
15959 (myresume): Likewise. Move other common resume tasks here...
15960 (main): ... from here. Call initialize_async_io. Disable async
15961 I/O before the main loop.
15962 * server.h (initialize_async_io): Declare.
15963 (block_async_io, unblock_async_io): Delete prototypes.
15964 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15965
b79d787e
DJ
159662007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15967
15968 * remote-utils.c (readchar): Allow binary data in received messages.
15969
d97903b2
PA
159702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15971
15972 * win32-low.c (attaching): New global.
15973 (win32_create_inferior): Clear the `attaching' global.
15974 (win32_attach): Set the `attaching' global.
15975 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15976 attaching. Only set a breakpoint at the entry point if not
15977 attaching.
15978
311de423
PA
159792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15980
15981 * server.c (main): Don't report dll events on the initial
15982 connection on attaches.
15983
6c2d16d2
PA
159842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15985
15986 * server.c (main): Relax numerical bases supported for the pid of
15987 the --attach command line argument.
15988
5ca906e6
PA
159892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15990
15991 * win32-low.c (win32_attach): Call OpenProcess before
15992 DebugActiveProcess, not after. Add last error output to error
15993 call.
15994
9c6c8194
PA
159952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15996
15997 * win32-low.c (win32_get_thread_context)
15998 (win32_set_thread_context): New functions.
15999 (thread_rec): Use win32_get_thread_context.
16000 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16001 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16002 field.
16003
4d5d1aaa
PA
160042007-12-03 Leo Zayas
16005 Pedro Alves <pedro_alves@portugalmail.pt>
16006
16007 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16008 global variables.
16009 (child_add_thread): Minor cleanup.
16010 (child_continue): Resume artificially suspended threads before
16011 calling ContinueDebugEvent.
16012 (suspend_one_thread): New.
16013 (fake_breakpoint_event): New.
16014 (get_child_debug_event): Change return type to int. Check here if
16015 gdb sent an interrupt request. If a soft interrupt was requested,
16016 fake a breakpoint event. Return 0 if there is no event to handle,
16017 and 1 otherwise.
16018 (win32_wait): Don't check here if gdb sent an interrupt request.
16019 Ensure there is a valid event to handle.
16020 (win32_request_interrupt): Add soft interruption method as last
16021 resort.
16022
c436e841
PA
160232007-12-03 Leo Zayas
16024 Pedro Alves <pedro_alves@portugalmail.pt>
16025
16026 * win32-low.h (win32_thread_info): Add descriptions to the
16027 structure members. Replace `suspend_count' counter by a
16028 `suspended' flag.
16029 * win32-low.c (thread_rec): Update condition of when to get the
16030 context from the inferior. Rely on ContextFlags being set if it
16031 has already been retrieved. Only suspend the inferior thread if
16032 we haven't already. Warn if that fails.
16033 (continue_one_thread): s/suspend_count/suspended/. Only call
16034 ResumeThread once. Warn if that fails.
16035
e7b5fa67
PA
160362007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16037
16038 * win32-low.c (win32_wait): Don't read from the inferior when it
16039 has already exited.
16040
a385171d
PA
160412007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16042
16043 * Makefile.in (win32_low_h): New variable.
16044 (win32-low.o): Add dependency on $(win32_low_h).
16045 (win32-arm-low.o, win32-i386-low.o): New rules.
16046
f80c84b3
DJ
160472007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16048
16049 * hostio.c: Correct copyright year.
16050
a6b151f1
DJ
160512007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16052
16053 * Makefile.in (OBS): Add hostio.o.
16054 (hostio.o): New rule.
16055 * server.h (handle_vFile): Declare.
16056 * hostio.c: New file.
16057 * server.c (handle_v_requests): Take packet_len and new_packet_len
16058 for binary packets. Call handle_vFile.
16059 (main): Update call to handle_v_requests.
16060
f9387fc3
DJ
160612007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16062
16063 * linux-low.c: Include <sched.h>.
16064
51c2684e
DJ
160652007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16066
16067 * linux-low.c (linux_tracefork_grandchild): New.
16068 (linux_tracefork_child): Use clone.
16069 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16070
75f83163
JB
160712007-10-31 Joel Brobecker <brobecker@adacore.com>
16072
16073 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16074
da5898ce
DJ
160752007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16076
16077 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16078
24a09b5f
DJ
160792007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16080
16081 * inferiors.c (change_inferior_id): Delete.
16082 (add_pid_to_list, pull_pid_from_list): New.
16083 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16084 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16085 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16086 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16087 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16088 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16089 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16090 (using_threads): Always set to 1.
16091 (handle_extended_wait): New.
16092 (add_process): Do not set TID.
16093 (linux_create_inferior): Set must_set_ptrace_flags.
16094 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16095 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16096 (linux_thread_alive): Rename TID argument to LWPID.
16097 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16098 (linux_wait_for_event): Do not use TID or check using_threads. Update
16099 call to dead_thread_notify. Call handle_extended_wait.
16100 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16101 (send_sigstop): Delete sigstop_sent.
16102 (wait_for_sigstop): Avoid TID.
16103 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16104 (linux_test_for_tracefork): New.
16105 (linux_lookup_signals): Use thread_db_active and
16106 linux_supports_tracefork_flag.
16107 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16108 * linux-low.h (get_process_thread): Avoid TID.
16109 (struct process_ifo): Move thread_known and tid to the end. Remove
16110 sigstop_sent.
16111 (linux_attach_lwp, thread_db_init): Update prototypes.
16112 * server.h (change_inferior_id): Delete prototype.
16113 (add_pid_to_list, pull_pid_from_list): New prototypes.
16114 * thread-db.c (thread_db_use_events): New.
16115 (find_first_thread): Rename to...
16116 (find_one_thread): ...this. Update callers and messages. Do not
16117 call fatal. Check thread_db_use_events. Do not call
16118 change_inferior_id or new_thread_notify.
16119 (maybe_attach_thread): Update. Do not call new_thread_notify.
16120 (thread_db_init): Set thread_db_use_events. Check use_events.
16121 * utils.c (fatal, warning): Correct message prefix.
16122
30ed0a8f
DJ
161232007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16124
16125 * Makefile.in (clean): Remove new files.
16126 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16127 (powerpc-64.o, powerpc-64.c): New rules.
16128 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16129 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16130 with SPE.
16131 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16132 SPE targets.
16133 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16134 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16135 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16136 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16137 (target_regsets): Add AltiVec and SPE register sets.
16138 * configure.ac: Check for AltiVec and SPE.
16139 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16140 (ppc_fill_vrregset, ppc_store_vrregset): New.
16141 (target_regsets): Add AltiVec register set.
16142 * configure: Regenerated.
16143
fd462a61
DJ
161442007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16145
16146 * linux-low.c (O_LARGEFILE): Define.
16147 (linux_read_memory): Use /proc/PID/mem.
16148 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16149 * configure, config.in: Regenerated.
16150
69f223ed
DJ
161512007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16152
16153 * linux-low.c (linux_wait_for_event): Do not pass signals while
16154 single-stepping.
16155
aec18585
PA
161562007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16157
16158 * win32-low.c (create_process): New.
16159 (win32_create_inferior): Use create_process instead of
16160 CreateProcess. If create_process failed retry appending an ".exe"
16161 suffix. Store the GetLastError result immediatelly after
16162 create_process calls and use it on the call to error.
16163
34d86ddd
PA
161642007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16165
16166 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16167
5a0e3bd0
JB
161682007-08-23 Joel Brobecker <brobecker@adacore.com>
16169
16170 * configure.ac: Switch license to GPLv3.
16171
f88c79e6
MS
161722007-08-01 Michael Snyder <msnyder@access-company.com>
16173
16174 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16175
6b3d9b83
PA
161762007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16177
16178 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16179 typedef.
16180 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16181 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16182 CloseToolhelp32Snapshot.
16183 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16184 CloseToolhelp32Snapshot.
16185
c588c53c
MS
161862007-07-27 Michael Snyder <michael.snyder@access-company.com>
16187
16188 * server.c (main): Check for inferior exit before main loop.
16189
aa0403d9
PA
161902007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16191
16192 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16193 instead of on tmp_desc.
16194
255e7678
DJ
161952007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16196 Daniel Jacobowitz <dan@codesourcery.com>
16197
16198 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16199 (add_thread): Minor cleanups.
16200 (clear_inferiors): Move lower in the file. Clear the DLL
16201 list.
16202 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16203 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16204 (xml_escape_text): New.
16205 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16206 for qSupported.
16207 (handle_v_cont): Report errors.
16208 (gdbserver_version): Update.
16209 (main): Correct size of own_buf. Do not report initial DLL events.
16210 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16211 (unloaded_dll, xml_escape_text): New.
16212 * win32-low.c (enum target_waitkind): Update comments.
16213 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16214 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16215 (win32_EnumProcessModules, win32_GetModuleInformation)
16216 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16217 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16218 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16219 (win32_Module32First, win32_Module32Next, load_toolhelp)
16220 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16221 (get_child_debug_event): Handle DLL events.
16222 (win32_wait): Likewise.
16223
0d37add9
DJ
162242007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16225
16226 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16227 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16228
45e2715e
PA
162292007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16230
16231 * win32-low.c (handle_output_debug_string): Ignore event if not
16232 waiting.
16233
c5674cf1
PA
162342007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16235
16236 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16237
2bbe3cc1
DJ
162382007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16239
16240 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16241
ae13219e
DJ
162422007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16243
16244 * inferiors.c (change_inferior_id): Add comment.
16245 * linux-low.c (check_removed_breakpoint): Add an early
16246 prototype. Improve debug output.
16247 (linux_attach): Doc update.
16248 (linux_detach_one_process, linux_detach): Clean up before releasing
16249 each process.
16250 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16251 * linux-low.h (struct process_info): Doc improvement.
16252 * mem-break.c (delete_all_breakpoints): New.
16253 * mem-break.h (delete_all_breakpoints): New prototype.
16254 * thread-db.c (find_first_thread): New.
16255 (thread_db_create_event): Call it instead of
16256 thread_db_find_new_threads. Clean up unused variables.
16257 (maybe_attach_thread): Remove first thread handling.
16258 (thread_db_find_new_threads): Use find_first_thread.
16259 (thread_db_get_tls_address): Likewise.
16260
4105de34
DJ
162612007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16262
16263 * thread-db.c (thread_db_find_new_threads): Add prototype.
16264 (thread_db_create_event): Check for the main thread before adding
16265 a new thread.
16266 (maybe_attach_thread): Only enable event reporting if TID == 0.
16267 (thread_db_get_tls_address): Check for new threads.
16268
2b876972
DJ
162692007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16270
16271 * linux-low.c (linux_create_inferior): Try execv before execvp.
16272 * spu-low.c (spu_create_inferior): Likewise.
16273
7a245884
DJ
162742007-06-13 Mike Frysinger <vapier@gentoo.org>
16275
16276 * linux-low.c (linux_create_inferior): Change execv to execvp.
16277 * spu-low.c (spu_create_inferior): Likewies.
16278
117ce543
DJ
162792007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16280
16281 * Makefile.in (clean): Clean new files instead of deleted ones.
16282 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16283 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16284 rules.
16285 * configure.srv: Specify XML files and new regformats for MIPS and
16286 MIPS64 GNU/Linux.
16287 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16288 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16289 an entry for the restart register.
16290 (mips_cannot_fetch_register, mips_cannot_store_register)
16291 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16292 register names to match the XML descriptions.
16293 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16294 restart register instead of $0.
16295
0e7f50da
UW
162962007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16297 Markus Deuling <deuling@de.ibm.com>
16298
16299 * remote-utils.c (decode_xfer_write): New function.
16300 * server.h (decode_xfer_write): Add prototype.
16301 * server.c (handle_query): Add PACKET_LEN argument. Support
16302 qXfer:spu:read and qXfer:spu:write packets.
16303 (main): Pass packet_len to handle_query.
16304 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16305 * target.h (target_ops): Add qxfer_spu.
16306
374c1d38
UW
163072007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16308
16309 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16310 accessing non-seekable spufs files.
16311
bb63802a
UW
163122007-05-16 Markus Deuling <deuling@de.ibm.com>
16313
889bf7c5 16314 * server.c (handle_query): Add reply for qC packet.
bb63802a 16315
7390519e
PA
163162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16317 Leo Zayas <lerele@champenstudios@com>
16318
16319 * server.h (check_remote_input_interrupt_request): New function.
16320 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16321 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16322 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16323 (check_remote_input_interrupt_request): New function.
16324 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16325 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16326 winapi_GenerateConsoleCtrlEvent): New typedefs.
16327 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16328 to 250 ms.
16329 (win32_wait): Check for remote interrupt request
16330 with check_remote_input_interrupt_request.
16331 (win32_request_interrupt): New function.
16332 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16333
34b34921
PA
163342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16335
16336 * win32-low.c (debug_registers_changed,
16337 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16338 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16339 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16340 (thread_rec): Get context using the low target.
16341 (child_add_thread): Call thread_added on the low target,
16342 which does the same thing.
16343 (regptr): Delete.
16344 (do_initial_child_stuff): Remove debug registers references.
16345 Set context using the low target. Resume threads after
16346 setting the contexts.
16347 (child_continue): Remove dead variable. Remove debug
16348 registers references.
16349 (child_fetch_inferior_registers): Go through the low target.
16350 (do_child_store_inferior_registers): Remove.
16351 (child_store_inferior_registers): Go through the low target.
16352 (win32_resume): Remove debug registers references.
16353 Set context using the low target.
16354 (handle_exception): Change return type to void. Don't record
16355 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16356 first chance exception.
889bf7c5 16357 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16358 goto loop. Always return after waiting for debug event.
16359 (win32_wait): Convert to switch statement. Handle spurious
16360 events.
16361
16362 * win32-i386-low.c (debug_registers_changed,
16363 debug_registers_used): New.
16364 (initial_stuff): Rename to ...
16365 (i386_initial_stuff): ... this. Clear debug registers
16366 state variables.
16367 (store_debug_registers): Delete.
16368 (i386_get_thread_context): New.
16369 (load_debug_registers): Delete.
16370 (i386_set_thread_context): New.
16371 (i386_thread_added): New.
16372 (single_step): Rename to ...
16373 (i386_single_step): ... this.
16374 (do_fetch_inferior_registers): Rename to ...
16375 (i386_fetch_inferior_register): ... this.
16376 (i386_store_inferior_register): New.
16377 (the_low_target): Adapt to new interface.
16378
16379 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16380 (arm_get_thread_context): New.
16381 (arm_set_thread_context): New.
16382 (regptr): New.
16383 (do_fetch_inferior_registers): Rename to ...
16384 (arm_fetch_inferior_register): ... this.
16385 (arm_store_inferior_register): New.
16386 (arm_wince_breakpoint): Reimplement as unsigned long.
16387 (arm_wince_breakpoint_len): Define.
16388 (the_low_target): Adapt to new interface.
16389
16390 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16391 load_debug_registers. Add get_thread_context, set_thread_context,
16392 thread_added and store_inferior_register. Rename
16393 fetch_inferior_registers to fetch_inferior_register.
16394 (regptr): Remove declaration.
16395
dd6953e1
PA
163962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16397
16398 * linux-low.c (linux_detach): Change return type to int. Return 0.
16399 * spu-low.c (spu_detach): Likewise.
16400
444d6139
PA
164012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16402
16403 * target.h (target_ops): Change return type of detach to int.
16404 Add join.
16405 (join_inferior): New.
16406 * server.c (main): Don't skip detach support on mingw32.
16407 If the inferior doesn't support detaching return error.
16408 Call join_inferior instead of using waitpid.
16409 * linux-low.c (linux_join): New.
16410 (linux_target_op): Add linux_join.
16411 * spu-low.c (spu_join): New.
16412 (spu_target_ops): Add spu_join.
16413 * win32-low.c (win32_detach): Adapt to new interface.
16414 Reopen current_process_handle before detaching. Issue a child
16415 resume before detaching.
16416 (win32_join): New.
16417 (win32_target_op): Add win32_join.
16418
1d5315fe
PA
164192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16420
16421 * win32-low.c (win32-attach): Fix return value.
16422 * target.h (target_ops): Describe ATTACH return values.
16423
bf914831
PA
164242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16425
16426 * win32-low.c (GETPROCADDRESS): Define.
16427 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16428 (winapi_DebugSetProcessKillOnExit): Likewise.
16429 (win32_create_inferior): Force usage of ansi CreateProcessA.
16430 (win32_attach): Use GETPROCADDRESS.
16431 (win32_detach): Likewise.
16432
f72f3e60
PA
164332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16434
16435 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16436
ed50f18f
PA
164372007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16438
16439 * win32-low.c: Commit leftover changes from 2007-03-29.
16440
0c2ead7e
DJ
164412007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16442
16443 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16444 fields short instead of int. Add explicit padding.
16445 (i387_cache_to_fsave): Remove unnecessary casts.
16446 (i387_fsave_to_cache): Doc fix.
16447 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16448
73725ff3
DJ
164492007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16450
16451 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16452 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16453
d99f33d8
PA
164542007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16455
16456 * configure.srv (arm*-*-mingw32ce*): Move near the other
16457 arm targets.
16458
68070c10
PA
164592007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16460
2482afc6 16461 * configure.ac: Add errno checking.
68070c10
PA
16462 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16463 sys/file.h and malloc.h.
16464 (AC_CHECK_DECLS): Add perror.
16465 (srv_mingwce): Handle.
2482afc6 16466 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16467 win32-i386-low.o to srv_tgtobj.
16468 (i[34567]86-*-mingw*): Likewise.
16469 (arm*-*-mingw32ce*): Add case.
16470 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16471 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16472 [__MINGW32CE__] (strerror): New function.
16473 [__MINGW32CE__] (errno): Define to GetLastError.
16474 [__MINGW32CE__] (COUNTOF): New macro.
16475 (remote_open): Remove extra close call.
16476 * mem-break.c (delete_breakpoint_at): New function.
16477 * mem-break.h (delete_breakpoint_at): Declare.
16478 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16479 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16480 [USE_WIN32API] (read, write): Add char* casts.
16481 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16482 * server.h: Include wincecompat.h on Windows CE.
16483 [HAVE_ERRNO_H]: Check.
16484 (perror): Declare if not declared.
16485 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16486 (perror_with_name): Remove errno declaration.
16487 * wincecompat.h: New.
16488 * wincecompat.c: New.
16489 * win32-low.h: New.
16490 * win32-arm-low.c: New.
16491 * win32-i386-low.c: New.
16492 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16493 (OUTMSG2): Make it safe.
16494 (_T): New macro.
16495 (COUNTOF): New macro.
16496 (NUM_REGS): Get it from the low target.
16497 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16498 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16499 (thread_rec): Let low target handle debug registers.
16500 (child_add_thread): Likewise.
16501 (child_init_thread_list): Likewise.
16502 (continue_one_thread): Likewise.
16503 (regptr): New.
16504 (do_child_fetch_inferior_registers): Move to ...
16505 * win32-i386-low.c: ... here, and rename to ...
16506 (do_fetch_inferior_registers): ... this.
889bf7c5 16507 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16508 Go through the low target.
16509 (do_child_store_inferior_registers): Use regptr.
16510 (strwinerror): New function.
16511 (win32_create_inferior): Handle Windows CE.
16512 Use strwinerror instead of strerror on Windows error
16513 codes. Add program to the error output.
16514 Don't close the main thread handle on Windows CE.
16515 (win32_attach): Use coredll.dll on Windows CE.
16516 (win32_kill): Close current process and current
16517 thread handles.
16518 (win32_detach): Use coredll.dll on Windows CE.
16519 (win32_resume): Let low target handle debug registers, and
16520 step request.
16521 (handle_exception): Add/Remove initial breakpoint. Avoid
16522 non-existant WSTOPSIG on Windows CE.
16523 (win32_read_inferior_memory): Cast to remove warning.
16524 (win32_arch_string): Go through the low target.
16525 (initialize_low): Call set_breakpoint_data with the low
16526 target's breakpoint.
16527 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16528 FOP_REGNUM, mappings): Move to ...
16529 * win32-i386-low.c: ... here.
16530 * win32-low.c (win32_thread_info): Move to ...
16531 * win32-low.h: ... here.
16532 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16533 win32-arm-low.c and wincecompat.c.
16534 (all:): Add $EXEEXT.
16535 (install-only:): Likewise.
16536 (gdbserver:): Likewise.
16537 (gdbreplay:): Likewise.
16538 * config.in: Regenerate.
16539 * configure: Regenerate.
16540
41093d81
PA
165412007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16542
16543 * win32-low.c: Rename typedef thread_info to
16544 win32_thread_info throughout.
16545
544afa54
PA
165462007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16547
16548 * win32-i386-low.c: Rename to ...
16549 * win32-low.c: ... this.
16550 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16551 * Makefile.in: Likewise.
16552
bce7165d
PA
165532007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16554
16555 * remote-utils.c (monitor_output): Constify msg parameter.
16556 * server.h (monitor_output): Likewise.
16557 * win32-i386-low.c (handle_output_debug_string): New.
16558 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16559 handle_output_debug_string.
16560 (get_child_debug_event): Likewise.
16561
506c7aa0
DJ
165622007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16563
16564 * server.c (main): Correct strtoul check.
16565
42c81e2a
DJ
165662007-03-27 Jon Ringle <jon@ringle.org>
16567
16568 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16569
9453113a
DJ
165702007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16571
16572 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16573
64a69107
DJ
165742007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16575
16576 * terminal.h: Check HAVE_SGTTY_H.
16577
165782007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16579
16580 * remote-utils.c (remote_open): Print out the assigned port number.
16581
c74d0ad8
DJ
165822007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16583
16584 * remote-utils.c (monitor_output): New function.
16585 * server.c (debug_threads): Define here.
16586 (monitor_show_help): New function.
16587 (handle_query): Handle qRcmd.
16588 (main): Do not handle 'd' packet.
16589 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16590 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16591 of debug_threads.
16592
de7c3b4a
PA
165932007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16594
16595 * Makefile.in (EXEEXT): New.
16596 (clean): Use $(EXEEXT).
16597
ef57601b
PA
165982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16599
16600 * target.h (target_ops): Rename send_signal to request_interrupt,
16601 and remove enum target_signal parameter.
16602 * linux-low.c (linux_request_interrupt): Rename from
16603 linux_send_signal, and always send SIGINT.
16604 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16605 and always send SIGINT.
16606 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16607 of send_signal.
16608 (input_interrupt): Likewise.
16609
820f2bda
PA
166102007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16611
16612 * server.c (get_features_xml): Check if target implemented
16613 arch_string.
16614 * win32-i386-low.c (win32_arch_string): New.
16615 (win32_target_ops): Add win32_arch_string as arch_string member.
16616
ab39bf24
UW
166172007-02-22 Markus Deuling <deuling@de.ibm.com>
16618
16619 * spu-low.c (spu_arch_string): New.
16620 (spu_target_ops): Add spu_arch_string.
16621
61ff6e04
DJ
166222007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16623
16624 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16625 * configure.ac: Do not check for terminal.h.
16626 * configure, config.in: Regenerated.
16627
fb1e4ffc
DJ
166282007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16629
16630 * Makefile.in (OBS): Add $(XML_BUILTIN).
16631 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16632 (clean): Update.
16633 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16634 (arm-with-iwmmxt.c): New.
16635 * config.in, configure: Regenerate.
16636 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16637 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16638 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16639 (arm*-*-linux*): Add iWMMXt and regset support.
16640 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16641 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16642 (arm_store_wmmxregset, target_regsets): New.
16643 * server.c (get_features_xml): Take annex argument. Check builtin
16644 XML documents.
16645 (handle_query): Handle multiple annexes.
16646
0f48aa01
DJ
166472007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16648
16649 * remote-utils.c [USE_WIN32API] (read, write): Define.
16650 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16651 write.
16652
23181151
DJ
166532007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16654
16655 * linux-i386-low.c (the_low_target): Set arch_string.
16656 * linux-x86-64-low.c (the_low_target): Likewise.
16657 * linux-low.c (linux_arch_string): New.
16658 (linux_target_ops): Add it.
16659 * linux-low.h (struct linux_target_ops): Add arch_string.
16660 * server.c (write_qxfer_response): Use const void * for DATA.
16661 (get_features_xml): New.
16662 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16663 * target.h (struct target_ops): Add arch_string method.
16664
9d606399
DJ
166652007-01-03 Denis Pilat <denis.pilat@st.com>
16666 Daniel Jacobowitz <dan@codesourcery.com>
16667
16668 * linux-low.c (linux_kill): Handle being called with no threads.
16669 * win32-i386-low.c (win32_kill): Likewise.
16670 (get_child_debug_event): Clear current_process_handle.
16671
166722006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16673 Daniel Jacobowitz <dan@codesourcery.com>
16674
16675 * remote-utils.c (remote_open): Check the type of specified
16676 serial port devices before opening them.
16677 * server.c (main): Kill the inferior if an error occurs during
16678 the first remote_open.
16679
a5e13d24
DJ
166802006-12-05 Markus Deuling <deuling@de.ibm.com>
16681
16682 * README: Update supported targets.
16683
186947f7
DJ
166842006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16685
16686 * Makefile.in (clean): Remove reg-mips64.c.
16687 (reg-mips64.c, reg-mips64.o): New rules.
16688 * configure.srv: Handle mips64. Include regset support for mips.
16689 * linux-mips-low.c (union mips_register): New.
16690 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16691 (mips_breakpoint, mips_breakpoint_at): Use int.
16692 (mips_collect_register, mips_supply_register)
16693 (mips_collect_register_32bit, mips_supply_register_32bit)
16694 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16695 (mips_store_fpregset, target_regsets): New.
16696 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16697
a13e2c95
UW
166982006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16699
16700 * configure.srv: Add target "spu*-*-*".
16701 * Makefile.in (clean): Remove reg-spu.c.
16702 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16703 * spu-low.c: New file.
16704
cb7283db
DJ
167052006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16706
16707 * configure.ac: Correct td_thr_tls_get_addr test.
16708 * configure: Regenerated.
16709
89be2091
DJ
167102006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16711
16712 * linux-low.c (linux_wait_for_event): Reformat. Use the
16713 pass_signals array.
16714 * remote-utils.c (decode_address_to_semicolon): New.
16715 * server.c (pass_signals, handle_general_set): New.
16716 (handle_query): Mention QPassSignals for qSupported.
16717 (main): Call handle_general_set.
16718 * server.h (pass_signals, decode_address_to_semicolon): New.
16719
000ef4f0
DJ
167202006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16721
16722 * server.c (handle_query): Correct error handling for read_auxv.
16723
b7149293
UW
167242005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16725
16726 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16727 and srv_linux_thread_db to yes.
16728 * linux-s390-low.c (s390_fill_gregset): New function.
16729 (target_regsets): Define data structure.
16730
dae5f5cf
DJ
167312006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16732
16733 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16734 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16735 * config.in, configure: Regenerated.
16736 * inferiors.c (gdb_id_to_thread): New function.
16737 (gdb_id_to_thread_id): Use it.
16738 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16739 * linux-low.h (struct process_info): Add th member.
16740 (thread_db_get_tls_address): New prototype.
16741 * remote-utils.c (decode_address): Make non-static.
16742 * server.c (handle_query): Handle qGetTLSAddr.
16743 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16744 * target.h (struct target_ops): Add get_tls_address.
16745 * thread-db.c (maybe_attach_thread): Save the thread handle.
16746 (thread_db_get_tls_address): New.
16747
32ca6d61
DJ
167482006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16749
16750 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16751 (linux_resume_one_process): Take a siginfo_t *. Update all
16752 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16753 (struct pending_signals): Add a siginfo_t.
16754 (linux_wait_for_process): Always set last_status.
16755 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16756 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16757 * linux-low.h (struct process_info): Add last_status.
16758
5ffff7c1
DJ
167592006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16760
16761 * remote-utils.c (try_rle): New function.
16762 (putpkt_binary): Use it.
16763
8695c747
DJ
167642006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16765
16766 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16767 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16768 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16769 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16770 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16771 point registers.
16772
290fadea
RS
167732006-08-08 Richard Sandiford <richard@codesourcery.com>
16774
16775 * server.c (terminal_fd): New variable.
16776 (old_foreground_pgrp): Likewise.
16777 (restore_old_foreground_pgrp): New function.
16778 (start_inferior): Record the terminal file descriptor in terminal_fd
16779 and its original foreground group in old_foreground_pgrp. Register
16780 restore_old_foreground_pgrp with atexit().
16781
9f2e1e63
DJ
167822006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16783
16784 * server.c (handle_query): Correct qPart to qXfer.
16785
b80864fb
DJ
167862006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16787
16788 * configure.ac: Check for more headers which are missing on
16789 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16790 * configure.srv: Add Cygwin and mingw32.
16791 * remote-utils.c: Don't include headers unconditionally which
16792 are missing on mingw32. Include <winsock.h> for mingw32.
16793 (remote_open): Adjust for mingw32 support. Flush
16794 standard error after writing to it.
16795 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16796 (unblock_async_io, enable_async_io, disable_async_io)
16797 (readchar, getpkt): Update for Winsock support.
16798 (prepare_resume_reply): Expect a protocol signal number.
16799 * server.c: Disable <sys/wait.h> on mingw32.
16800 (start_inferior): Adjust for mingw32 support. Flush
16801 standard error after writing to it.
16802 (attach_inferior): Likewise. Use protocol signal
16803 numbers.
16804 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16805 and names.
16806 * win32-i386-low.c: New file.
16807 * Makefile.in (XM_CLIBS): Set.
16808 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16809 (win32-i386-low.o): New dependency rule.
16810 * linux-low.c (linux_wait): Use target signal numbers.
16811 * target.h (struct target_ops): Doc fix.
16812 * server.h (target_signal_to_name): New prototype.
16813 * gdbreplay.c: Don't include headers unconditionally which
16814 are missing on mingw32. Include <winsock.h> for mingw32.
16815 (remote_close, remote_open): Adjust for Winsock support.
16816 * configure, config.in: Regenerated.
16817
0876f84a
DJ
168182006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16819
16820 * server.c (decode_xfer_read, write_qxfer_response): New.
16821 (handle_query): Take a packet length argument. Handle
16822 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16823 the qSupported response.
16824 (main): Update call to handle_query.
16825
01f9e8fa
DJ
168262006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16827
16828 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16829 (putpkt_binary): Renamed from putpkt and adjusted for binary
16830 data.
16831 (putpkt): New wrapper for putpkt_binary.
16832 (readchar): Don't mask off the high bit.
16833 (decode_X_packet): New function.
16834 * server.c (main): Call putpkt_binary if a handler sets the packet
16835 length. Save the length of the incoming packet. Handle 'X'.
16836 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16837
be2a5f71
DJ
168382006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16839
16840 * server.c (handle_query): Handle qSupported.
16841
ea025f5f
DJ
168422006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16843
16844 * remote-utils.c (all_symbols_looked_up): New variable.
16845 (look_up_one_symbol): Check it.
16846 * server.h (look_up_one_symbol): New declaration.
16847 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16848
9308fc88
DJ
168492006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16850
16851 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16852 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16853 (PTRACE_GET_THREAD_AREA): Define.
16854 (ps_get_thread_area): New function.
16855
52fb6437
NS
168562006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16857
16858 * configure.srv (m68k*-*-uclinux*): New target.
16859 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16860 (linux_resume_one_process): Remove extraneous cast.
16861 (linux_read_offsets): New.
16862 (linux_target_op): Add linux_read_offsets on mmuless systems.
16863 * server.c (handle_query): Add qOffsets logic.
16864 * target.h (struct target_ops): Add read_offsets.
16865
21b0f40c
DJ
168662006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16867
16868 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16869 (PTRACE_GET_THREAD_AREA): Define.
16870 (ps_get_thread_area): New function.
16871 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16872 (linux-x86-64-low.o): Update.
16873
0050a760
DJ
168742006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16875
16876 * configure.ac: Remove checks for prfpregset_t.
16877 * gdb_proc_service.h: New file.
16878 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16879 new "gdb_proc_service.h".
16880 * proc-service.c: Likewise.
16881 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16882 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16883 * Makefile.in (gdb_proc_service_h): Updated.
16884 * configure, config.in: Regenerated.
16885
b92a518e
DJ
168862006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16887
16888 * remote-utils.c (prepare_resume_reply): Move declaration
16889 of gdb_id_from_wait to the top of the block.
16890
545587ee
DJ
168912006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16892
16893 * linux-low.c (regsets_store_inferior_registers): Read the regset
16894 from the target before filling it.
16895
9db87ebd
DJ
168962006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16897
16898 * server.c (attach_inferior): Return SIGTRAP for a successful
16899 attach.
16900
dd24457d
DJ
169012006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16902
16903 * Makefile.in (OBS): Add version.o.
16904 (STAGESTUFF): Delete.
16905 (version.o): Add dependencies.
16906 (version.c): Replace rule.
16907 (clean): Remove version.c.
16908 * server.c (gdbserver_version): New.
16909 (gdbserver_usage): Use printf.
16910 (main): Handle --version and --help.
16911 * server.h (version, host_name): Add declarations.
16912
6f0f660e
EZ
169132005-12-23 Eli Zaretskii <eliz@gnu.org>
16914
889bf7c5
PA
16915 * linux-arm-low.c:
16916 * linux-arm-low.c:
16917 * inferiors.c:
16918 * i387-fp.h:
16919 * i387-fp.c:
16920 * gdbreplay.c:
16921 * regcache.c:
16922 * proc-service.c:
16923 * mem-break.h:
16924 * mem-break.c:
16925 * linux-x86-64-low.c:
16926 * linux-sh-low.c:
16927 * linux-s390-low.c:
16928 * linux-ppc64-low.c:
16929 * linux-ppc-low.c:
16930 * linux-mips-low.c:
16931 * linux-m68k-low.c:
16932 * linux-m32r-low.c:
16933 * linux-low.h:
16934 * linux-low.c:
16935 * linux-ia64-low.c:
16936 * linux-i386-low.c:
16937 * linux-crisv32-low.c:
16938 * thread-db.c:
16939 * terminal.h:
16940 * target.h:
16941 * target.c:
16942 * server.h:
16943 * server.c:
16944 * remote-utils.c:
16945 * regcache.h:
16946 * utils.c:
16947 * Makefile.in:
16948 * configure.ac:
6f0f660e
EZ
16949 * gdbserver.1: Add (C) after Copyright. Update the FSF
16950 address.
16951
9d1fb177
DJ
169522005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16953
16954 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16955 (arm_breakpoint_at): Recognize both breakpoints.
16956 (the_low_target): Use the correct breakpoint instruction.
16957
011a70c2
DJ
169582005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16959
16960 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16961 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16962 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16963 (the_low_target): Update.
16964
7fb85e41
AS
169652005-10-25 Andreas Schwab <schwab@suse.de>
16966
16967 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16968
16969 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16970 (ia64_num_regs): Reduce to 462.
16971
3db0444b
DJ
169722005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16973
16974 * acinclude.m4: Correct quoting.
16975 * aclocal.m4: Regenerated.
16976
16977 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16978 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16979 (thread_db_init): Call thread_db_err_str.
16980 * configure.ac: Check for TD_VERSION.
16981 * config.in, configure: Regenerated.
16982
bee0189a
DJ
169832005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16984
16985 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16986
e9d25b98
DJ
169872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16988
16989 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16990 is not available. Define HAVE_PTRACE_GETREGS if it is.
16991 * config.in, configure: Regenerated.
16992 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16993 * linux-i386-low.c, linux-m68k-low.c: Update to use
16994 HAVE_PTRACE_GETREGS.
16995 * linux-low.c (regsets_fetch_inferior_registers)
16996 (regsets_store_inferior_registers): Only return 0 if we processed
16997 GENERAL_REGS.
16998 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16999 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17000
a06660f7
DJ
170012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17002
17003 * inferiors.c (struct thread_info): Add gdb_id.
17004 (add_thread): Add gdb_id argument.
17005 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17006 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17007 calls to add_thread.
17008 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17009 * server.c (handle_query): Use thread_to_gdb_id.
17010 (handle_v_cont, main): Use gdb_id_to_thread_id.
17011 * server.h (add_thread): Update prototype.
17012 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17013 prototypes.
17014
5a1f5858
DJ
170152005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17016
17017 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17018 left-padded registers.
17019 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17020 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17021
e122f1f5
SE
170222005-07-01 Steve Ellcey <sje@cup.hp.com>
17023
17024 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17025 * configure: Regenerate.
17026 * config.in: Regenerate.
17027 * server.h (NEED_DECLARATION_STRERROR):
17028 Replace with !HAVE_DECL_STRERROR.
17029
d592fa2f
DJ
170302005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17031
17032 * linux-low.c (linux_wait, linux_send_signal): Don't test
17033 an unsigned long variable for > 0 if it could be MAX_ULONG.
17034 * server.c (myresume): Likewise.
17035 * target.c (set_desired_inferior): Likewise.
17036
ccbd4912
MK
170372005-06-13 Mark Kettenis <kettenis@gnu.org>
17038
17039 * configure.ac: Simplify and improve check for socklen_t.
17040 * configure, config.in: Regenerate.
17041
f450004a
DJ
170422005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17043
17044 * acconfig.h: Remove.
17045 * configure.ac: Add a test for socklen_t. Use three-argument
17046 AC_DEFINE throughout.
17047 * config.in: Regenerated using autoheader 2.59.
17048 * configure: Regenerated.
17049
17050 * gdbreplay.c (socklen_t): Provide a default.
17051 (remote_open): Use socklen_t.
17052 * remote-utils.c (socklen_t): Provide a default.
17053 (remote_open): Use socklen_t.
17054 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17055 unsigned char.
17056
17057 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17058 char for buffers.
17059 * linux-low.c (linux_read_memory, linux_write_memory)
17060 (linux_read_auxv): Likewise.
17061 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17062 (check_mem_write): Likewise.
17063 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17064 Likewise.
17065 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17066 (registers_from_string, register_data): Likewise.
17067 * server.c (handle_query, main): Likewise.
17068 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17069 (decode_M_packet): Likewise.
17070 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17071 * target.h (struct target_ops): Update read_memory, write_memory,
17072 and read_auxv.
17073 (read_inferior_memory, write_inferior_memory): Update.
17074 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17075 to unsigned char *.
17076 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17077 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17078 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17079 linux-s390-low.c, linux-sh-low.c: Update for changes in
17080 read_inferior_memory and the_low_target->breakpoint.
17081
eee84df1
DJ
170822005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17083
17084 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17085 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17086 * configure.srv: Add powerpc64-*-linux*.
17087 * linux-ppc64-low.c: New file.
17088
45b134e5
OF
170892005-05-23 Orjan Friberg <orjanf@axis.com>
17090
17091 * linux-cris-low.c: New file with support for CRIS.
17092 * linux-crisv32-low.c: Ditto for CRISv32.
17093 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17094 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17095 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17096 reg-crisv32.o, and reg-crisv32.c to make rules.
17097 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17098 recognized targets.
17099
48d93c75
UW
171002005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17101
17102 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17103 of sizeof (PTRACE_XFER_TYPE).
17104 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17105
e013ee27
OF
171062005-05-12 Orjan Friberg <orjanf@axis.com>
17107
889bf7c5 17108 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17109 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17110 pointers for hardware watchpoint support.
17111 * linux-low.h (struct linux_target_ops): Ditto.
17112 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17113 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17114 to linux_target_ops.
17115 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17116 reply packet.
17117 * server.c (main): Recognize 'Z' and 'z' packets.
17118
b0ded00b
UW
171192005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17120
17121 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17122 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17123 (the_low_target): Add new members.
17124
8643e2ad
DJ
171252005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17126
17127 * proc-service.c (ps_lgetregs): Search all_processes instead of
17128 all_threads.
17129
fc620387
DJ
171302005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17131
17132 * server.c (start_inferior): Change return type to int.
17133 (attach_inferior): Change sigptr to int *.
17134 (handle_v_cont, handle_v_requests): Change signal to int *.
17135 (main): Change signal to int.
17136
171372005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17138
17139 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17140 * configure.srv: Add m32r*-*-linux*.
17141 * linux-m32r-low.c: New file.
17142
e0e76420
DJ
171432005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17144
17145 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17146
a1928bad
DJ
171472005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17148
17149 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17150 Take unsigned long arguments for PIDs.
17151 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17152 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17153 (wait_for_sigstop, linux_resume_one_process)
17154 (regsets_fetch_inferior_registers, linux_send_signal)
17155 (linux_read_auxv): Likewise. Update the types of variables holding
17156 PIDs. Update format string specifiers.
17157 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17158 * remote-utils.c (prepare_resume_reply): Likewise.
17159 * server.c (cont_thread, general_thread, step_thread)
17160 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17161 unsigned long.
17162 (handle_query): Update format specifiers.
17163 (handle_v_cont, main): Use strtoul for thread IDs.
17164 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17165 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17166 (general_thread, step_thread, thread_from_wait)
17167 (old_thread_from_wait): Update.
17168 * target.h (struct thread_resume): Use unsigned long for THREAD.
17169 (struct target_ops): Use unsigned long for arguments to attach and
17170 thread_alive.
17171
dcdb98d2
DJ
171722005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17173
17174 * acinclude.m4: Include bfd/bfd.m4 directly.
17175 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17176 <agriffis@toolchain.org>.
17177 * aclocal.m4, configure: Regenerated.
17178
bec39cab
AC
171792005-01-07 Andrew Cagney <cagney@gnu.org>
17180
17181 * configure.ac: Rename configure.in, require autoconf 2.59.
17182 * configure: Re-generate.
17183
434c4c77
DJ
171842004-12-08 Daniel Jacobowitz <dan@debian.org>
17185
17186 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17187 LIBS when finished.
17188 * aclocal.m4: Regenerated.
17189 * configure: Regenerated.
17190
db1d3e1b
AS
171912004-11-21 Andreas Schwab <schwab@suse.de>
17192
17193 * linux-m68k-low.c (m68k_num_gregs): Define.
17194 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17195 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17196 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17197 (m68k_breakpoint_at): New. Add to the_low_target.
17198
17199 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17200 srv_linux_thread_db to yes.
17201
43360365
JB
172022004-10-20 Joel Brobecker <brobecker@gnat.com>
17203
17204 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17205 (ARCH_SET_FS): Likewise.
17206 (ARCH_GET_FS): Likewise.
17207 (ARCH_GET_GS): Likewise.
17208
fd500816
DJ
172092004-10-16 Daniel Jacobowitz <dan@debian.org>
17210
17211 * linux-i386-low.c (ps_get_thread_area): New.
17212 * linux-x86-64-low.c (ps_get_thread_area): New.
17213 * linux-low.c: Include <sys/syscall.h>.
17214 (linux_kill_one_process): Don't kill the first thread here.
17215 (linux_kill): Kill the first thread here.
17216 (kill_lwp): New function.
17217 (send_sigstop, linux_send_signal): Use it.
17218 * proc-service.c: Clean up #ifdefs.
17219 (fpregset_info): Delete.
17220 (ps_lgetregs): Update and enable implementation.
17221 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17222 implementations.
17223 * remote-utils.c (struct sym_cache, symbol_cache): New.
17224 (input_interrupt): Print a clearer message.
17225 (async_io_enabled): New variable.
17226 (enable_async_io, disable_async_io): Use it. Update comments.
17227 (look_up_one_symbol): Use the symbol cache.
17228 * thread-db.c (thread_db_look_up_symbols): New function.
17229 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17230
f6de3c42
DJ
172312004-10-16 Daniel Jacobowitz <dan@debian.org>
17232
17233 * configure.in: Test for -rdynamic.
17234 * configure: Regenerated.
17235 * Makefile (INTERNAL_LDFLAGS): New.
17236 (gdbserver, gdbreplay): Use it.
17237
2c0fc042
AC
172382004-09-02 Andrew Cagney <cagney@gnu.org>
17239
17240 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17241
075b3282
DJ
172422004-03-23 Daniel Jacobowitz <drow@mvista.com>
17243
17244 * linux-low.c (linux_wait): Clear all_processes list also.
17245
fa6a77dc
DJ
172462004-03-12 Daniel Jacobowitz <drow@mvista.com>
17247
17248 * linux-low.c: Include <errno.h>. Remove extern declaration of
17249 errno.
17250
6d782a97
DJ
172512004-03-12 Daniel Jacobowitz <drow@mvista.com>
17252
17253 * gdbreplay.c, server.h, utils.c: Update copyright years.
17254
3a7fb99b
DJ
172552004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17256
17257 * server.c (main): Print child status or termination signal from
17258 variable 'signal', not 'sig'.
17259
c3e735a6
DJ
172602004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17261
17262 * linux-low.c (linux_read_memory): Change return type to
17263 int. Check for and return error from ptrace().
17264 * target.c (read_inferior_memory): Change return type to int. Pass
17265 back return status from the_target->read_memory().
17266 * target.h (struct target_ops): Adapt *read_memory() prototype.
17267 Update comment.
17268 (read_inferior_memory): Adapt prototype.
17269 * server.c (main): Return an error packet if
17270 read_inferior_memory() returns an error.
17271
a59d1c82
DJ
172722004-03-04 Daniel Jacobowitz <drow@mvista.com>
17273
17274 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17275 Unify with other clean targets.
17276
dc3f8883
DJ
172772004-02-29 Daniel Jacobowitz <drow@mvista.com>
17278
17279 * server.c (handle_v_cont): Call set_desired_inferior.
17280
89a208da
DJ
172812004-02-29 Daniel Jacobowitz <drow@mvista.com>
17282
17283 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17284
62ea82f5
DJ
172852004-02-29 Daniel Jacobowitz <drow@mvista.com>
17286
17287 * linux-low.c (linux_wait): Unblock async I/O.
17288 (linux_resume): Block and enable async I/O.
17289 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17290 * server.h (block_async_io, unblock_async_io): Add prototypes.
17291
6910d122
DJ
172922004-02-29 Daniel Jacobowitz <drow@mvista.com>
17293
17294 * remote-utils.c (remote_open): Print a status notice after
17295 opening a TCP port.
17296 * server.c (attach_inferior): Print a status notice after
17297 attaching.
17298
172992004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17300
17301 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17302
c89dc5d4
DJ
173032004-02-26 Daniel Jacobowitz <drow@mvista.com>
17304
17305 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17306 error packet.
17307 * server.c, target.h: Update copyright years.
17308
4b8dad4a
RM
173092004-02-25 Roland McGrath <roland@redhat.com>
17310
17311 * target.h (struct target_ops): New member `read_auxv'.
17312 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17313 * linux-low.c (linux_read_auxv): New function.
17314 (linux_target_ops): Initialize `read_auxv' member to that.
17315
d7446758
JB
173162004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17317
17318 Committed by Jim Blandy <jimb@redhat.com>.
17319
17320 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17321 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17322 instead of GPR_SIZE to distiguish s390 and s390x targets.
17323
5544ad89
DJ
173242004-01-31 Daniel Jacobowitz <drow@mvista.com>
17325
17326 * linux-low.c: Update copyright year.
17327 (check_removed_breakpoint): Clear pending_is_breakpoint.
17328 (linux_set_resume_request, linux_queue_one_thread)
17329 (resume_status_pending_p): New functions.
17330 (linux_continue_one_thread): Use process->resume.
17331 (linux_resume): Only resume threads if there are no pending events.
17332 * linux-low.h (struct process_info): Add resume request
17333 pointer.
17334
2a68b70e
DJ
173352004-01-30 Daniel Jacobowitz <drow@mvista.com>
17336
17337 * regcache.c (new_register_cache): Clear the allocated register
17338 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17339
64386c31
DJ
173402003-10-13 Daniel Jacobowitz <drow@mvista.com>
17341
17342 * linux-low.c (linux_resume): Take a struct thread_resume *
17343 argument.
17344 (linux_wait): Update call.
17345 (resume_ptr): New static variable.
17346 (linux_continue_one_thread): Renamed from
17347 linux_continue_one_process. Use resume_ptr.
17348 (linux_resume): Use linux_continue_one_thread.
17349 * server.c (handle_v_cont, handle_v_requests): New functions.
17350 (myresume): New function.
17351 (main): Handle 'v' case.
17352 * target.h (struct thread_resume): New type.
17353 (struct target_ops): Change argument of "resume" to struct
17354 thread_resume *.
17355 (myresume): Delete macro.
17356
c938e9b0
L
173572003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17358
17359 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17360 (uninstall): Support DESTDIR.
17361
7f313d07
BC
17362Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17363
17364 * configure.srv: Add xscale*linux copy of arm*linux entry.
17365
3b2fc2ea
DJ
173662003-07-24 Daniel Jacobowitz <drow@mvista.com>
17367
17368 * linux-arm-low.c (arm_reinsert_addr): New function.
17369 (the_low_target): Add arm_reinsert_addr.
17370
1c0a559e
MK
173712003-07-08 Mark Kettenis <kettenis@gnu.org>
17372
17373 * mem-break.c: Remove whitespace at end of file.
17374
43d5792c
DJ
173752003-06-28 Daniel Jacobowitz <drow@mvista.com>
17376
17377 * configure.in: Check whether we need to prototype strerror.
17378 * server.h: Optionally prototype strerror.
17379 * gdbreplay.c (perror_with_name): Use strerror.
17380 * linux-low.c (linux_attach_lwp): Use strerror.
17381 * utils.c (perror_with_name): Use strerror.
17382 * config.in, configure: Regenerated.
17383
c8a86edf
DJ
173842003-06-28 Daniel Jacobowitz <drow@mvista.com>
17385
17386 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17387 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17388
73d37363
DJ
173892003-06-20 Daniel Jacobowitz <drow@mvista.com>
17390
17391 * Makefile.in (SFILES): Update.
17392 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17393 low-sun3.c: Remove files.
17394
6ad8ae5c
DJ
173952003-06-17 Daniel Jacobowitz <drow@mvista.com>
17396
17397 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17398 (linux_detach_one_process, linux_detach): New functions.
17399 (linux_target_ops): Add linux_detach.
17400 * server.c (main): Handle 'D' packet.
17401 * target.h (struct target_ops): Add "detach" member.
17402 (detach_inferior): Define.
17403
1581182a
MK
174042003-06-13 Mark Kettenis <kettenis@gnu.org>
17405
17406 From Kelley Cook <kelleycook@wideopenwest.com>:
17407 * configure.srv: Accept i[34567]86 variants.
17408
e5379b03
DJ
174092003-06-05 Daniel Jacobowitz <drow@mvista.com>
17410
17411 * linux-low.c (linux_wait_for_event): Correct comment typos.
17412 (linux_resume_one_process): Call check_removed_breakpoint.
17413 (linux_send_signal): New function.
17414 (linux_target_ops): Add linux_send_signal.
17415 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17416 of kill.
17417 * target.h (struct target_ops): Add send_signal.
17418
2ff29de4
JB
174192003-05-29 Jim Blandy <jimb@redhat.com>
17420
17421 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17422 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17423 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17424 away part of the register's value.
17425
254787d4
DJ
174262003-03-26 Daniel Jacobowitz <drow@mvista.com>
17427
17428 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17429 (linux_wait_for_event, linux_init_signals): Likewise.
17430
94e10508
DJ
174312003-03-17 Daniel Jacobowitz <drow@mvista.com>
17432
17433 * configure.in: Check for stdlib.h.
17434 * configure: Regenerated.
17435 * config.in: Regenerated.
17436
4c0711e0
DJ
174372003-01-04 Andreas Schwab <schwab@suse.de>
17438
17439 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17440
ef66e766
AC
174412003-01-02 Andrew Cagney <ac131313@redhat.com>
17442
17443 * Makefile.in: Remove obsolete code.
17444
a1358604
DJ
174452002-11-20 Daniel Jacobowitz <drow@mvista.com>
17446
17447 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17448 defined(PT_FPR0_HI).
17449
23ce3b1c
DJ
174502002-11-17 Stuart Hughes <seh@zee2.com>
17451
17452 * linux-arm-low.c (arm_num_regs): Increase.
17453 (arm_regmap): Include status register.
17454
174552002-11-17 Daniel Jacobowitz <drow@mvista.com>
17456
17457 * linux-low.c (register_addr): Remove incorrect -1 check.
17458
a9fa9f7d
DJ
174592002-08-29 Daniel Jacobowitz <drow@mvista.com>
17460
17461 * linux-low.c (linux_create_inferior): Call setpgid. Return
17462 the new PID.
17463 (unstopped_p, linux_signal_pid): Remove.
17464 (linux_target_ops): Remove linux_signal_pid.
17465 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17466 global instead of target method.
17467 * target.h (struct target_ops): Remove signal_pid. Update comment
17468 for create_inferior.
17469 * server.c (signal_pid): New variable.
17470 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17471 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17472 (attach_inferior): Set signal_pid.
17473
17574093
DJ
174742002-08-23 Daniel Jacobowitz <drow@mvista.com>
17475
17476 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17477
174782002-08-20 Jim Blandy <jimb@redhat.com>
17479
17480 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17481 default for this.
17482
174832002-08-01 Andrew Cagney <cagney@redhat.com>
17484
17485 * Makefile.in: Make chill references obsolete.
17486
174872002-07-24 Kevin Buettner <kevinb@redhat.com>
17488
17489 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17490 * configure: Regenerate.
17491 * config.in: Regenerate.
17492
174932002-07-09 David O'Brien <obrien@FreeBSD.org>
17494
17495 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17496 (perror_with_name, remote_close, remote_open, expect, play): Static.
17497
174982002-07-04 Michal Ludvig <mludvig@suse.cz>
17499
4b8dad4a 17500 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17501 byte offsets instead of an array of indexes.
17502 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17503
175042002-06-13 Daniel Jacobowitz <drow@mvista.com>
17505
17506 * regcache.c: Add comment.
17507
175082002-06-11 Daniel Jacobowitz <drow@mvista.com>
17509
17510 * thread-db.c: New file.
17511 * proc-service.c: New file.
17512 * acinclude.m4: New file.
17513 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17514 proc-service.o, and thread-db.o.
17515 (linux-low.o): Add USE_THREAD_DB.
17516 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17517 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17518 * aclocal.m4: Regenerated.
17519 * config.in: Regenerated.
17520 * configure: Regenerated.
17521 * configure.in: Check for proc_service.h, sys/procfs.h,
17522 thread_db.h, and linux/elf.h headrs.
17523 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17524 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17525 Check for -lthread_db and thread support.
17526 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17527 PowerPC, and SuperH.
17528 * i387-fp.c: Constify arguments.
17529 * i387-fp.h: Likewise.
17530 * inferiors.c: (struct thread_info): Renamed from
17531 `struct inferior_info'. Remove PID member. Use generic inferior
17532 list header. All uses updated.
17533 (inferiors, signal_pid): Removed.
17534 (all_threads): New variable.
17535 (get_thread): Define.
17536 (add_inferior_to_list): New function.
17537 (for_each_inferior): New function.
17538 (change_inferior_id): New function.
17539 (add_inferior): Removed.
17540 (remove_inferior): New function.
17541 (add_thread): New function.
17542 (free_one_thread): New function.
17543 (remove_thread): New function.
17544 (clear_inferiors): Use for_each_inferior and free_one_thread.
17545 (find_inferior): New function.
17546 (find_inferior_id): New function.
17547 (inferior_target_data): Update argument type.
17548 (set_inferior_target_data): Likewise.
17549 (inferior_regcache_data): Likewise.
17550 (set_inferior_regcache_data): Likewise.
17551 * linux-low.c (linux_bp_reinsert): Remove.
17552 (all_processes, stopping_threads, using_thrads)
17553 (struct pending_signals, debug_threads, pid_of): New.
17554 (inferior_pid): Replace with macro.
17555 (struct inferior_linux_data): Remove.
17556 (get_stop_pc, add_process): New functions.
17557 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17558 Use add_process and add_thread.
17559 (linux_attach_lwp): New function, based on old linux_attach. Use
17560 add_process and add_thread. Set stop_expected for new threads.
17561 (linux_attach): New function.
17562 (linux_kill_one_process): New function.
17563 (linux_kill): Kill all LWPs.
17564 (linux_thread_alive): Use find_inferior_id.
17565 (check_removed_breakpoints, status_pending_p): New functions.
17566 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17567 Update. Use WNOHANG. Wait for cloned processes also. Update process
17568 struct for the found process.
17569 (linux_wait_for_event): New function.
17570 (linux_wait): Use it. Support LWPs.
17571 (send_sigstop, wait_for_sigstop, stop_all_processes)
17572 (linux_resume_one_process, linux_continue_one_process): New functions.
17573 (linux_resume): Support LWPs.
17574 (REGISTER_RAW_SIZE): Remove.
17575 (fetch_register): Use register_size instead. Call supply_register.
17576 (usr_store_inferior_registers): Likewise. Call collect_register.
17577 Fix recursive case.
17578 (regsets_fetch_inferior_registers): Improve error message.
17579 (regsets_store_inferior_registers): Add debugging.
17580 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17581 (unstopped_p, linux_signal_pid): New functions.
17582 (linux_target_ops): Add linux_signal_pid.
17583 (linux_init_signals): New function.
17584 (initialize_low): Call it. Initialize using_threads.
17585 * regcache.c (inferior_regcache_data): Add valid
17586 flag.
17587 (get_regcache): Fetch registers lazily. Add fetch argument
17588 and update all callers.
17589 (regcache_invalidate_one, regcache_invalidate): New
17590 functions.
17591 (new_register_cache): Renamed from create_register_cache.
17592 Return the new regcache.
17593 (free_register_cache): Change argument to a void *.
17594 (registers_to_string, registers_from_string): Call get_regcache
17595 with fetch flag set.
17596 (register_data): Make static. Pass fetch flag to get_regcache.
17597 (supply_register): Call get_regcache with fetch flag clear.
17598 (collect_register): Call get_regcache with fetch flag set.
17599 (collect_register_as_string): New function.
17600 * regcache.h: Update.
17601 * remote-utils.c (putpkt): Flush after debug output and use
17602 stderr.
17603 Handle input interrupts while waiting for an ACK.
17604 (input_interrupt): Use signal_pid method.
17605 (getpkt): Flush after debug output and use stderr.
17606 (outreg): Use collect_register_as_string.
17607 (new_thread_notify, dead_thread_notify): New functions.
17608 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17609 and general_thread.
17610 (look_up_one_symbol): Flush after debug output.
17611 * server.c (step_thread, server_waiting): New variables.
17612 (start_inferior): Don't use signal_pid. Update call to mywait.
17613 (attach_inferior): Update call to mywait.
17614 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17615 (main): Don't fetch/store registers explicitly. Use
17616 set_desired_inferior. Support proposed ``Hs'' packet. Update
17617 calls to mywait.
17618 * server.h: Update.
17619 (struct inferior_list, struct_inferior_list_entry): New.
17620 * target.c (set_desired_inferior): New.
17621 (write_inferior_memory): Constify.
17622 (mywait): New function.
17623 * target.h: Update.
17624 (struct target_ops): New signal_pid method.
17625 (mywait): Removed macro, added prototype.
17626
17627 * linux-low.h (regset_func): Removed.
17628 (regset_fill_func, regset_store_func): New.
17629 (enum regset_type): New.
17630 (struct regset_info): Add type field. Use new operation types.
17631 (struct linux_target_ops): stop_pc renamed to get_pc.
17632 Add decr_pc_after_break and breakpoint_at.
17633 (get_process, get_thread_proess, get_process_thread)
17634 (strut process_info, all_processes, linux_attach_lwp)
17635 (thread_db_init): New.
17636
17637 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17638 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17639 (the_low_target): Add new members.
17640 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17641 (i386_store_fpxregset): Constify.
17642 (target_regsets): Add new kind identifier.
17643 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17644 (i386_set_pc): Add debugging.
17645 (i386_breakpoint_at): New function.
17646 (the_low_target): Add new members.
17647 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17648 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17649 (mips_breakpoint_at): New.
17650 (the_low_target): Add new members.
17651 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17652 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17653 (the_low_target): Add new members.
17654 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17655 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17656 (the_low_target): Add new members.
17657 * linux-x86-64-low.c (target_regsets): Add new kind
17658 identifier.
17659
176602002-05-15 Daniel Jacobowitz <drow@mvista.com>
17661
17662 From Martin Pool <mbp@samba.org>:
17663 * server.c (gdbserver_usage): New function.
17664 (main): Call it.
17665
176662002-05-14 Daniel Jacobowitz <drow@mvista.com>
17667
17668 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17669 stop_at -> stop_pc.
17670
176712002-05-04 Andrew Cagney <ac131313@redhat.com>
17672
17673 * Makefile.in: Remove obsolete code.
17674
176752002-04-24 Michal Ludvig <mludvig@suse.cz>
17676
17677 * linux-low.c (regsets_fetch_inferior_registers),
17678 (regsets_store_inferior_registers): Removed cast to int from
17679 ptrace() calls.
17680 * regcache.h: Added declaration of struct inferior_info.
17681
176822002-04-20 Daniel Jacobowitz <drow@mvista.com>
17683
17684 * inferiors.c (struct inferior_info): Add regcache_data.
17685 (add_inferior): Call create_register_cache.
17686 (clear_inferiors): Call free_register_cache.
17687 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17688 * regcache.c (struct inferior_regcache_data): New.
17689 (registers): Remove.
17690 (get_regcache): New function.
17691 (create_register_cache, free_register_cache): New functions.
17692 (set_register_cache): Don't initialize the register cache here.
17693 (registers_to_string, registers_from_string, register_data): Call
17694 get_regcache.
17695 * regcache.h: Add prototypes.
17696 * server.h: Likewise.
17697
176982002-04-20 Daniel Jacobowitz <drow@mvista.com>
17699
17700 * mem-break.c: New file.
17701 * mem-break.h: New file.
17702 * Makefile.in: Add mem-break.o rule; update server.h
17703 dependencies.
17704 * inferiors.c (struct inferior_info): Add target_data
17705 member.
17706 (clear_inferiors): Free target_data member if set.
17707 (inferior_target_data, set_inferior_target_data): New functions.
17708 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17709 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17710 * linux-low.c (linux_bp_reinsert): New variable.
17711 (struct inferior_linux_data): New.
17712 (linux_create_inferior): Use set_inferior_target_data.
17713 (linux_attach): Likewise. Call add_inferior.
17714 (linux_wait_for_one_inferior): New function.
17715 (linux_wait): Call it.
17716 (linux_write_memory): Add const.
17717 (initialize_low): Call set_breakpoint_data.
17718 * linux-low.h (struct linux_target_ops): Add breakpoint
17719 handling members.
17720 * server.c (attach_inferior): Remove extra add_inferior
17721 call.
17722 * server.h: Include mem-break.h. Update inferior.c
17723 prototypes.
17724 * target.c (read_inferior_memory)
17725 (write_inferior_memory): New functions.
17726 * target.h (read_inferior_memory)
17727 (write_inferior_memory): Change macros to prototypes.
17728 (struct target_ops): Update comments. Add const to write_memory
17729 definition.
17730
177312002-04-11 Daniel Jacobowitz <drow@mvista.com>
17732
17733 * linux-low.c (usr_store_inferior_registers): Support
17734 registers which are allowed to fail to store.
17735 * linux-low.h (linux_target_ops): Likewise.
17736 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17737 (ppc_cannot_store_register): FPSCR may not be storable.
17738
177392002-04-09 Daniel Jacobowitz <drow@mvista.com>
17740
17741 * server.h: Include <string.h> if HAVE_STRING_H.
17742 * ChangeLog: Correct paths in last ChangeLog entry.
17743
177442002-04-09 Daniel Jacobowitz <drow@mvista.com>
17745
17746 * linux-low.h: Remove obsolete prototypes.
17747 (struct linux_target_ops): New.
17748 (extern the_low_target): New.
17749 * linux-low.c (num_regs, regmap): Remove declarations.
17750 (register_addr): Use the_low_target explicitly.
17751 (fetch_register): Likewise.
17752 (usr_fetch_inferior_registers): Likewise.
17753 (usr_store_inferior_registers): Likewise.
17754 * linux-arm-low.c (num_regs): Remove.
17755 (arm_num_regs): Define.
17756 (arm_regmap): Renamed from regmap, made static.
17757 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17758 made static.
17759 (arm_cannot_store_register): Renamed from cannot_store_register,
17760 made static.
17761 (the_low_target): New.
17762 * linux-i386-low.c (num_regs): Remove.
17763 (i386_num_regs): Define.
17764 (i386_regmap): Renamed from regmap, made static.
17765 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17766 made static.
17767 (i386_cannot_store_register): Renamed from cannot_store_register,
17768 made static.
17769 (the_low_target): New.
17770 * linux-ia64-low.c (num_regs): Remove.
17771 (ia64_num_regs): Define.
17772 (ia64_regmap): Renamed from regmap, made static.
17773 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17774 made static.
17775 (ia64_cannot_store_register): Renamed from cannot_store_register,
17776 made static.
17777 (the_low_target): New.
17778 * linux-m68k-low.c (num_regs): Remove.
17779 (m68k_num_regs): Define.
17780 (m68k_regmap): Renamed from regmap, made static.
17781 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17782 made static.
17783 (m68k_cannot_store_register): Renamed from cannot_store_register,
17784 made static.
17785 (the_low_target): New.
17786 * linux-mips-low.c (num_regs): Remove.
17787 (mips_num_regs): Define.
17788 (mips_regmap): Renamed from regmap, made static.
17789 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17790 made static.
17791 (mips_cannot_store_register): Renamed from cannot_store_register,
17792 made static.
17793 (the_low_target): New.
17794 * linux-ppc-low.c (num_regs): Remove.
17795 (ppc_num_regs): Define.
17796 (ppc_regmap): Renamed from regmap, made static.
17797 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17798 made static.
17799 (ppc_cannot_store_register): Renamed from cannot_store_register,
17800 made static.
17801 (the_low_target): New.
17802 * linux-s390-low.c (num_regs): Remove.
17803 (s390_num_regs): Define.
17804 (s390_regmap): Renamed from regmap, made static.
17805 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17806 made static.
17807 (s390_cannot_store_register): Renamed from cannot_store_register,
17808 made static.
17809 (the_low_target): New.
17810 * linux-sh-low.c (num_regs): Remove.
17811 (sh_num_regs): Define.
17812 (sh_regmap): Renamed from regmap, made static.
17813 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17814 made static.
17815 (sh_cannot_store_register): Renamed from cannot_store_register,
17816 made static.
17817 (the_low_target): New.
17818 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17819 (the_low_target): New.
17820
178212002-04-09 Daniel Jacobowitz <drow@mvista.com>
17822
17823 * Makefile.in: Add stamp-h target.
17824 * configure.in: Create stamp-h.
17825 * configure: Regenerated.
17826
178272002-04-09 Daniel Jacobowitz <drow@mvista.com>
17828
17829 * inferiors.c: New file.
17830 * target.c: New file.
17831 * target.h: New file.
17832 * Makefile.in: Add target.o and inferiors.o. Update
17833 dependencies.
17834 * linux-low.c (inferior_pid): New static variable,
17835 moved from server.c.
17836 (linux_create_inferior): Renamed from create_inferior.
17837 Call add_inferior. Return 0 on success instead of a PID.
17838 (linux_attach): Renamed from myattach.
17839 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17840 (linux_thread_alive): Renamed from mythread_alive.
17841 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17842 child dies.
17843 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17844 (regsets_store_inferior_registers): Correct error message.
17845 Add missing ``return 0''.
17846 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17847 (linux_store_registers): Renamed from store_inferior_registers.
17848 (linux_read_memory): Renamed from read_inferior_memory.
17849 (linux_write_memory): Renamed from write_inferior_memory.
17850 (linux_target_ops): New structure.
17851 (initialize_low): Call set_target_ops ().
17852 * remote-utils.c (unhexify): New function.
17853 (hexify): New function.
17854 (input_interrupt): Send signals to ``signal_pid''.
17855 * server.c (inferior_pid): Remove.
17856 (start_inferior): Update create_inferior call.
17857 (attach_inferior): Call add_inferior.
17858 (handle_query): New function.
17859 (main): Call handle_query for `q' packets.
17860 * server.h: Include "target.h". Remove obsolete prototypes.
17861 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17862
178632002-04-09 Daniel Jacobowitz <drow@mvista.com>
17864
17865 * Makefile.in: Add WARN_CFLAGS. Update configury
17866 dependencies.
17867 * configure.in: Check for <string.h>
17868 * configure: Regenerate.
17869 * config.in: Regenerate.
17870 * gdbreplay.c: Include needed system headers.
17871 (remote_open): Remove strchr prototype.
17872 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17873 * regcache.c (supply_register): Change buf argument to const void *.
17874 (supply_register_by_name): Likewise.
17875 (collect_register): Change buf argument to void *.
17876 (collect_register_by_name): Likewise.
17877 * regcache.h: Add missing prototypes.
17878 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17879 * server.c (handle_query): New function.
17880 (attached): New static variable, moved out of main.
17881 (main): Quiet longjmp clobber warnings.
17882 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17883 * utils.c (error): Remove NORETURN.
17884 (fatal): Likewise.