gdbsupport: use AM_GDB_WARNINGS
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
7928d571
HD
12020-02-09 Hannes Domani <ssbssa@yahoo.de>
2
3 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4 (handle_exception): Set siginfo_er.
5 (win32_xfer_siginfo): New function.
6
919adfe8
TT
72020-02-07 Tom Tromey <tom@tromey.com>
8 Pedro Alves <palves@redhat.com>
9
10 * README: Update build documentation.
11 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
12 host, not target.
13 * configure.ac: Update paths.
14 * configure: Rebuild.
15 * acinclude.m4: Update paths.
16 * Makefile.in: Update include paths.
17 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
18 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
19 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
20 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
21 (%-generated.c): Update paths.
22 * Move entire directory from ../gdb/gdbserver.
23
287c844a
MR
242020-01-29 Maciej W. Rozycki <macro@wdc.com>
25
26 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
27
548a204f
PFC
282020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
29
30 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
31 assignment instead of srv_linux_obj.
32
a2236a08
HD
332020-01-28 Hannes Domani <ssbssa@yahoo.de>
34
35 * server.c (handle_qxfer_libraries): Write segment-address with
36 paddress.
37
bdaed379
HD
382020-01-24 Hannes Domani <ssbssa@yahoo.de>
39
40 * Makefile.in (install-strip): New target.
41 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
42 * aclocal.m4: Regenerate.
43 * configure: Regenerate.
44 * configure.ac: Add AM_PROG_INSTALL_STRIP.
45
42cd72aa
MR
462020-01-24 Maciej W. Rozycki <macro@wdc.com>
47
48 * Makefile.in (SFILES): Adjust paths to point to real files.
49 (OBS): Move waitstatus.o to target/waitstatus.o.
50 (TAGS): Transform paths appropriately.
51 (%.o): Rename to...
52 (nat/%.o): ... this pattern rule.
53 (%.o): Rename to...
54 (target/%.o): ... this pattern rule.
55 * configure.srv: Adjust paths throughout to include nat/ prefix
56 with the revant files.
57 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
58 * configure: Regenerate.
59
42ba50ec
MR
602020-01-24 Maciej W. Rozycki <macro@wdc.com>
61
62 * Makefile.in (TAGS): Remove config files from the recipe.
63
05ea2a05
TT
642020-01-14 Tom Tromey <tom@tromey.com>
65
66 * configure: Rebuild.
67 * configure.ac: Remove any checks that were added to common.m4.
68 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
69 lib-link.m4.
70
01027315
TT
712020-01-14 Tom Tromey <tom@tromey.com>
72
73 * server.h: Include config.h.
74 * gdbreplay.c: Include config.h.
75 * configure: Rebuild.
76 * configure.ac: Don't source common.host.
77 * acinclude.m4: Update path.
78 * Makefile.in (INCSUPPORT): New variable.
79 (INCLUDE_CFLAGS): Add INCSUPPORT.
80 (SFILES): Update paths.
81 (version-generated.c): Update path to create-version.sh.
82 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
83
b2ceabe8
TT
842020-01-14 Tom Tromey <tom@tromey.com>
85
86 * configure.ac (LIBS): Use WIN32APILIBS.
87 (USE_WIN32API): Don't define.
88 * configure: Rebuild.
89
25c51f71
TT
902020-01-14 Tom Tromey <tom@tromey.com>
91
92 * configure: Rebuild.
93
c0bd321d
SM
942020-01-13 Simon Marchi <simon.marchi@efficios.com>
95
96 * Makefile.in (%-generated.c): Remove rule for files from
97 regformats/i386.
98
bb564c58
SM
992020-01-13 Simon Marchi <simon.marchi@efficios.com>
100
101 * configure: Re-generate.
102
6e37c371
SM
1032020-01-13 Simon Marchi <simon.marchi@efficios.com>
104
105 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
106 Define to static.
107 * tracepoint.c (stop_tracing, flush_trace_buffer,
108 about_to_request_buffer_space, get_trace_state_variable_value,
109 set_trace_state_variable_value, gdb_collect): Add declaration.
110
df4a0200
SM
1112020-01-13 Simon Marchi <simon.marchi@efficios.com>
112
113 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
114 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
115 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
116 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
117 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
118 static.
119
89e94ec9
SM
1202020-01-13 Simon Marchi <simon.marchi@efficios.com>
121
122 * inferiors.c: Include gdbsupport/common-inferior.h.
123
2552728a
SM
1242020-01-13 Simon Marchi <simon.marchi@efficios.com>
125
126 * hostio-errno.c: Include hostio.h.
127
4025fa09
SM
1282020-01-13 Simon Marchi <simon.marchi@efficios.com>
129
130 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
131 prerequisite.
132
c0b0a142
SM
1332020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
134
135 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
136 * linux-arm-tdesc.h: Include arch/arm.h.
137
bb1183e2
SM
1382020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
139
140 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
141
f5df0b5f
SM
1422020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
143
144 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
145 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
146
5b6d1e4f
PA
1472020-01-10 Pedro Alves <palves@redhat.com>
148
149 * fork-child.c (post_fork_inferior): Pass target down to
150 startup_inferior.
151 * inferiors.c (switch_to_thread): Add process_stratum_target
152 parameter.
153 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
154 * nto-low.c (nto_target_ops): Now a process_stratum_target.
155 * linux-low.c (linux_target_ops): Now a process_stratum_target.
156 * remote-utils.c (prepare_resume_reply): Pass the target to
157 switch_to_thread.
158 * target.c (the_target): Now a process_stratum_target.
159 (done_accessing_memory): Pass the target to switch_to_thread.
160 (set_target_ops): Ajust to use process_stratum_target.
161 * target.h (struct target_ops): Rename to ...
162 (struct process_stratum_target): ... this.
163 (the_target, set_target_ops): Adjust.
164 (prepare_to_access_memory): Adjust comment.
165 * win32-low.c (child_xfer_memory): Adjust to use
166 process_stratum_target.
167 (win32_target_ops): Now a process_stratum_target.
168
559e7e50
EZ
1692020-01-06 Eli Zaretskii <eliz@gnu.org>
170 Pedro Alves <palves@redhat.com>
171
172 * win32-low.c (get_child_debug_event): Extract the fatal exception
173 from the exit status and convert to the equivalent Posix signal
174 number.
175 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
176 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
177
48189bec
HD
1782020-01-01 Hannes Domani <ssbssa@yahoo.de>
179
180 * Makefile.in: Use INSTALL_PROGRAM_ENV.
181
5dd8bf88
JB
1822020-01-01 Joel Brobecker <brobecker@adacore.com>
183
184 * server.c (gdbserver_version): Change copyright year to 2020.
185 * gdbreplay.c (gdbreplay_version): Likewise.
186
0ad6b8ee
CB
1872019-12-19 Christian Biesinger <cbiesinger@google.com>
188
189 * configure: Regenerate.
190 * configure.ac: Quote variable arguments of test.
191
1ee7b812
BE
1922019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
193
194 * Makefile.in: Fix build with GNU Make 3.81
195
d9fa87f4
TT
1962019-12-16 Tom Tromey <tromey@adacore.com>
197
198 * server.c (get_exec_file): Constify result.
199
ab7d13f0
CB
2002019-12-10 Christian Biesinger <cbiesinger@google.com>
201
202 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
203 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
204 * config.in: Regenerate.
205 * configure: Regenerate.
206 * configure.ac: Don't check for strerror.
207 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
208 Call safe_strerror instead of strerror.
209 * server.h (strerror): Remove this now-unnecessary declaration.
210 * tracepoint.c (init_named_socket): Call safe_strerror instead of
211 strerror.
212 (gdb_agent_helper_thread): Likewise.
213 * utils.c (perror_with_name): Likewise.
214
4da8c3a8
TT
2152019-11-26 Tom Tromey <tom@tromey.com>
216
217 * configure, config.in: Rebuild.
218
21987b9c
TT
2192019-11-26 Tom Tromey <tom@tromey.com>
220
221 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
222 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
223 gdb_sigmask.
224 * configure, config.in: Rebuild.
225
5e030278
TT
2262019-11-26 Tom Tromey <tom@tromey.com>
227
228 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
229 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
230 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
231 * acinclude.m4: Include ax_pthread.m4.
232 * config.in, configure: Rebuild.
233
6d91ce9a
CB
2342019-11-26 Christian Biesinger <cbiesinger@google.com>
235
236 * debug.c (debug_set_output): Call safe_strerror instead of
237 strerror.
238 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
239 (linux_kill_one_lwp): Likewise.
240 (linux_detach_one_lwp): Likewise.
241 (linux_wait_for_event_filtered): Likewise.
242 (store_register): Likewise.
243 * lynx-low.c (lynx_attach): Likewise.
244 * mem-break.c (insert_memory_breakpoint): Likewise.
245 (remove_memory_breakpoint): Likewise.
246 (delete_fast_tracepoint_jump): Likewise.
247 (set_fast_tracepoint_jump): Likewise.
248 (uninsert_fast_tracepoint_jumps_at): Likewise.
249 (reinsert_fast_tracepoint_jumps_at): Likewise.
250 * nto-low.c (nto_xfer_memory): Likewise.
251 (nto_resume): Likewise.
252
6cdd651f
LM
2532019-11-20 Luis Machado <luis.machado@linaro.org>
254
255 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
256 instead of register count.
257 * tdesc.c (tdesc_contains_feature): New function.
258 * tdesc.h (tdesc_contains_feature): New prototype.
259
cd850b40
CB
2602019-11-15 Christian Biesinger <cbiesinger@google.com>
261
262 * Makefile.in: Add safe-strerror.c.
263 * configure: Regenerate.
264 * configure.ac: Don't source common.host.
265
5abebf3c
CB
2662019-11-15 Christian Biesinger <cbiesinger@google.com>
267
268 * config.in: Regenerate.
269 * configure: Regenerate.
270
e06f3d6e
AB
2712019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
272
273 * ax.c (ax_printf): Handle size_t_arg.
274
ca3a04f6
CB
2752019-11-06 Christian Biesinger <cbiesinger@google.com>
276
277 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
278 * mi/mi-main.c (output_cores): Likewise.
279 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
280 (linux_xfer_osdata_modules): Likewise.
281 * remote.c (register_remote_support_xml): Likewise.
282 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
283 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
284
e48f6033
CB
2852019-11-01 Christian Biesinger <cbiesinger@google.com>
286
287 * configure: Regenerate.
288 * configure.ac: Remove check for strerror_r.
289
e7e97a2e
CB
2902019-10-31 Christian Biesinger <cbiesinger@google.com>
291
292 * config.in: Regenerate.
293 * configure: Regenerate.
294 * configure.ac: Also check for strerror_r.
295
75cafaa6
CB
2962019-10-31 Christian Biesinger <cbiesinger@google.com>
297
298 * ax.h (debug_agent): Remove duplicate declaration.
299
30baf67b
TV
3002019-10-26 Tom de Vries <tdevries@suse.de>
301
302 * linux-aarch64-low.c: Fix typos in comments.
303 * linux-arm-low.c: Same.
304 * linux-low.c: Same.
305 * linux-ppc-low.c: Same.
306 * proc-service.c: Same.
307 * regcache.h: Same.
308 * server.c: Same.
309 * tracepoint.c: Same.
310 * win32-low.c: Same.
311
52c64cf7
TT
3122019-10-25 Tom Tromey <tromey@adacore.com>
313
314 * utils.c (xstrdup): Remove.
315
c12d372d
TT
3162019-10-23 Tom Tromey <tom@tromey.com>
317
318 * configure, config.in: Rebuild.
319
4d0b984b
TT
3202019-10-23 Tom Tromey <tom@tromey.com>
321
322 * configure: Rebuild.
323 * acinclude.m4: Use m4_include, not sinclude.
324
c5adaa19
TT
3252019-10-17 Tom Tromey <tromey@adacore.com>
326
327 * configure: Rebuild.
328 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
329 in AC_CONFIG_FILES invocation.
330 * Makefile.in (stamp-h, Makefile): Use new-style config.status
331 invocation.
332
fec4e896
CB
3332019-10-16 Christian Biesinger <cbiesinger@google.com>
334
335 * server.c: Include xml-builtin.h.
336 (get_xml_features): Don't declare xml_builtins here.
337
00975ff6
AB
3382019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
339
340 * Makefile.in: Remove references to vec-ipa.o.
341
0dc32745
AB
3422019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
343
344 * Makefile.in: Remove references to vec.c.
345
3e6ec53a
CB
3462019-10-02 Christian Biesinger <cbiesinger@google.com>
347
348 * server.c (server_waiting): Change to bool.
349 (extended_protocol): Likewise.
350 (response_needed): Likewise.
351 (exit_requested): Likewise.
352 (run_once): Likewise.
353 (report_no_resumed): Likewise.
354 (non_stop): Likewise.
355 (disable_packet_vCont): Likewise.
356 (disable_packet_Tthread): Likewise.
357 (disable_packet_qC): Likewise.
358 (disable_packet_qfThreadInfo): Likewise.
359 (handle_general_set): Update.
360 (handle_detach): Update.
361 (handle_monitor_command): Update.
362 (handle_query): Update.
363 (captured_main): Update.
364 (process_serial_event): Update.
365 * server.h (server_waiting): Change to bool.
366 (disable_packet_vCont): Likewise.
367 (disable_packet_Tthread): Likewise.
368 (disable_packet_qC): Likewise.
369 (disable_packet_qfThreadInfo): Likewise.
370 (run_once): Likewise.
371 (non_stop): Likewise.
372 * target.c (target_stop_and_wait): Update.
373
80fd2826
TT
3742019-10-02 Tom Tromey <tromey@adacore.com>
375
376 * Makefile.in (SFILES): Add common-inferior.c.
377 (OBS): Add common-inferior.o.
378 * server.c (startup_with_shell): Don't define.
379
46f29a9a
AB
3802019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
381
382 * linux-low.c (linux_low_read_btrace): Update for change to
383 std::vector.
384
f9d949fb
CB
3852019-09-20 Christian Biesinger <cbiesinger@google.com>
386
387 * debug.c (debug_threads): Remove comment in favor of the header.
388 * debug.h (using_threads): Add declaration.
389 (debug_threads): Add comment.
390 * linux-aarch64-low.c: Include debug.h and remove declaration of
391 debug_threads.
392 * nto-low.c: Likewise.
393 * remote-utils.c: Likewise.
394 * thread-db.c: Likewise.
395
abf516c6
UW
3962019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
397
398 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
399 and powerpc-cell64l-ipa.o.
400 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
401 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
402 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
403 (spu*-*-*): Remove.
404
405 * spu-low.c: Remove file.
406
407 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
408 (parse_spufs_run): Remove.
409 (ppc_get_pc): Remove Cell/B.E. support.
410 (ppc_set_pc): Likewise.
411 (ppc_breakpoint_at): Likewise.
412 (ppc_arch_setup): Likewise.
413 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
414 tdesc_powerpc_cell32l.
415 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
416 or init_registers_powerpc_cell32l.
417 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
418 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
419 or init_registers_powerpc_cell32l.
420 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
421 (init_registers_powerpc_cell32l): Remove prototype.
422 (init_registers_powerpc_cell64l): Likewise.
423
424 * target.h (struct target_ops): Remove qxfer_spu member.
425 * server.c (handle_qxfer_spu): Remove.
426 (qxfer_packets): Remove entry for "spu".
427 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
428 * linux-low.c (SPUFS_MAGIC): Remove.
429 (spu_enumerate_spu_ids): Remove.
430 (linux_qxfer_spu): Remove.
431 (linux_target_ops): Remove qxfer_spu member.
432 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
433 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
434 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
435
2d41fa11
SDJ
4362019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
437
438 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
439 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
440 * config.in: Regenerate.
441 * configure: Regenerate.
442
d59b55f0
TT
4432019-08-15 Tom Tromey <tromey@adacore.com>
444
445 * target.c (target_write_memory): Use gdb::byte_vector.
446
4196ab2a
TT
4472019-08-15 Tom Tromey <tromey@adacore.com>
448
449 * tracepoint.c (write_inferior_data_pointer)
450 (write_inferior_integer, write_inferior_int8)
451 (write_inferior_uinteger, m_tracepoint_action_download)
452 (r_tracepoint_action_download, x_tracepoint_action_download)
453 (l_tracepoint_action_download, clear_inferior_trace_buffer)
454 (download_agent_expr, download_tracepoint_1)
455 (download_trace_state_variables, upload_fast_traceframes): Update.
456 * server.c (gdb_write_memory): Update.
457 * remote-utils.c (relocate_instruction): Update.
458 * proc-service.c (ps_pdwrite): Update.
459 * mem-break.c (remove_memory_breakpoint)
460 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
461 (uninsert_fast_tracepoint_jumps_at)
462 (reinsert_fast_tracepoint_jumps_at): Update.
463 * linux-x86-low.c (append_insns)
464 (i386_install_fast_tracepoint_jump_pad)
465 (amd64_write_goto_address, i386_write_goto_address): Update.
466 * linux-s390-low.c (append_insns, s390_write_goto_address):
467 Update.
468 * linux-ppc-low.c (ppc_relocate_instruction)
469 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
470 (ppc_write_goto_address): Update.
471 * linux-aarch64-low.c (append_insns): Update.
472 * target.h (struct target_ops): Update.
473 (write_inferior_memory): Don't declare.
474 * target.c (target_write_memory): Rename from
475 write_inferior_memory. Remove old target_write_memory.
476
c6778d00
TT
4772019-08-15 Tom Tromey <tromey@adacore.com>
478
479 * target.c (write_inferior_memory): Use std::vector.
480
404f2902
FCE
4812019-08-06 Frank Ch. Eigler <fche@redhat.com>
482
483 PR build/24886
484 * configure.ac: Drop enable-libmcheck support.
485 * configure, config.in: Rebuild.
486 * acinclude.m4: Don't include it.
487
4c5aa8e0
AH
4882019-07-19 Alan Hayward <alan.hayward@arm.com>
489
490 * configure.srv: Remove Arm xml files.
491
7cc17433
AH
4922019-07-19 Alan Hayward <alan.hayward@arm.com>
493
494 * configure.srv: Add new files. Remove xml generated files.
495 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
496 registers.
497 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
498 * linux-aarch32-tdesc.c: New file.
499 * linux-aarch32-tdesc.h: New file.
500 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
501 * linux-arm-low.c (init_registers_arm, tdesc_arm)
502 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
503 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
504 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
505 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
506 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
507 (arm_read_description): Call arm_linux_read_description.
508 (initialize_low_arch): Don't init registers.
509 * linux-arm-tdesc.c: New file.
510 * linux-arm-tdesc.h: New file.
511
166a82be
AH
5122019-07-10 Alan Hayward <alan.hayward@arm.com>
513
514 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
515 Move counter inside for.
516 (arm_read_description): Check ptrace earlier.
517 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
518
268a13a5
TT
5192019-07-09 Tom Tromey <tom@tromey.com>
520
521 * configure: Rebuild.
522 * configure.ac: Change common to gdbsupport.
523 * acinclude.m4: Change common to gdbsupport.
524 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
525 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
526 common to gdbsupport.
527 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
528 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
529 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
530 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
531 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
532 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
533 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
534 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
535 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
536 common to gdbsupport.
537
350fab54
AH
5382019-07-04 Alan Hayward <alan.hayward@arm.com>
539
540 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
541 defines.
542 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
543
2b40fda7
AH
5442019-07-04 Alan Hayward <alan.hayward@arm.com>
545
546 * configure.srv: Remove legacy xml.
547 * linux-aarch64-low.c (initialize_low_arch): Remove
548 initialize_low_tdesc call.
549 * linux-aarch64-tdesc-selftest.c: Remove file.
550 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
551 * linux-x86-low.c (initialize_low_arch): Remove
552 initialize_low_tdesc call.
553 * linux-x86-tdesc-selftest.c: Remove file.
554 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
555
7d10623d
TV
5562019-06-20 Tom de Vries <tdevries@suse.de>
557
558 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
559 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
560
8d6a48df
TV
5612019-06-19 Tom de Vries <tdevries@suse.de>
562
563 * debug.h (debug_write): Change return type to ssize_t.
564 * debug.c (debug_write): Same.
565
73cc7272
TT
5662019-06-14 Tom Tromey <tom@tromey.com>
567
568 * configure.ac: Use new path to gnulib.
569 * configure: Rebuild.
570 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
571 to gnulib.
572
08f10e02
TT
5732019-06-11 Tom Tromey <tom@tromey.com>
574
575 * Makefile.in (SFILES): Add alloc.c.
576 (OBS): Add alloc.o.
577 (IPA_OBJS): Add alloc-ipa.o.
578 (alloc-ipa.o): New target.
579 (%.o: ../%.c): New pattern rule.
580
422186a9
TT
5812019-06-10 Tom Tromey <tromey@adacore.com>
582
583 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
584 end warning with a newline.
585 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
586 newline.
587 * thread-db.c (attach_thread): Don't end warning with a newline.
588 (thread_db_notice_clone): Likewise.
589 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
590 newline.
591 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
592 end warning with a newline.
593
b02f78f9
PA
5942019-06-04 Pedro Alves <palves@redhat.com>
595
596 * server.c (captured_main): Use make_unique_xstrdup.
597
88ed7edb
TT
5982019-06-02 Tom Tromey <tom@tromey.com>
599
600 * gdbreplay.c (fromhex): Remove.
601 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
602
33a6bc35
TT
6032019-05-29 Tom Tromey <tromey@adacore.com>
604
605 * configure: Rebuild.
606
e90a813d
KB
6072019-05-06 Kevin Buettner <kevinb@redhat.com>
608
609 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
610 sign extension code on 32-bit builds.
611
353ea2d1
EZ
6122019-05-03 Eli Zaretskii <eliz@gnu.org>
613
614 * remote-utils.c:
615 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
616
b494cdff
TT
6172019-04-19 Tom Tromey <tom@tromey.com>
618
619 * server.c (struct vstop_notif): Derive from notif_event.
620 <base>: Remove.
621 (queue_stop_reply): Update.
622 (remove_all_on_match_ptid): Change type. Rewrite.
623 (discard_queued_stop_replies): Rewrite.
624 (in_queued_stop_replies_ptid): Change type.
625 (in_queued_stop_replies): Rewrite.
626 (notif_stop): Update.
627 (queue_stop_reply_callback): Update.
628 (captured_main): Don't call initialize_notif.
629 (push_stop_notification): Update.
630 * notif.c (notif_write_event, handle_notif_ack)
631 (notif_event_enque, notif_push): Update.
632 (notif_event_xfree, initialize_notif): Remove.
633 * notif.h (struct notif_event): Include <list>, not
634 "common/queue.h".
635 (struct notif_server) <queue>: Now a std::list.
636 (notif_event_p): Remove typedef.
637 (initialize_notif): Don't declare.
638 (struct notif_event): Add virtual destructor.
639
a7e559cc
AH
6402019-04-17 Alan Hayward <alan.hayward@arm.com>
641
642 * ax.c (ax_vdebug): Call debug_printf.
643 * debug.c (debug_write): New function.
644 * debug.h (debug_write): New declaration.
645 * linux-low.c (sigchld_handler): Call debug_write.
646
aeb2e706
AH
6472019-04-17 Alan Hayward <alan.hayward@arm.com>
648
649 * debug.c (debug_set_output): New function.
650 (debug_vprintf): Send output to debug_file.
651 (debug_flush): Likewise.
652 * debug.h (debug_set_output): New declaration.
653 * server.c (handle_monitor_command): Add debug-file option.
654 (captured_main): Likewise.
655
c1bc0935
AH
6562019-04-17 Alan Hayward <alan.hayward@arm.com>
657
658 * debug.c (remote_debug): Add definition.
659 * debug.h (remote_debug): Add declaration.
660 * hostio.c (remote_debug): Remove declaration.
661 * remote-utils.c (struct ui_file): Likewise.
662 (remote_debug): Likewise.
663 * remote-utils.h (remote_debug): Likewise,
664 * server.c (remote_debug): Remove definition.
665
3f52fdbc
KB
6662019-04-10 Kevin Buettner <kevinb@redhat.com>
667
668 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
669 when using a 64-bit gdbserver.
670
b0319eaa
TT
6712019-04-09 Tom Tromey <tromey@adacore.com>
672
673 * linux-low.c (select_event_lwp): Use find_thread_in_random.
674
eedc3f4f
TT
6752019-04-08 Tom Tromey <tom@tromey.com>
676
677 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
678 throw.
679 (linux_resume_one_lwp): Likewise.
680
230d2906
TT
6812019-04-08 Tom Tromey <tom@tromey.com>
682
683 * gdbreplay.c: Update.
684 * linux-low.c: Update.
685 * server.c: Update.
686
a70b8144
TT
6872019-04-08 Tom Tromey <tom@tromey.com>
688
689 * server.c: Use C++ exception handling.
690 * linux-low.c: Use C++ exception handling.
691 * gdbreplay.c: Use C++ exception handling.
692
3d6e9d23
TT
6932019-04-08 Tom Tromey <tom@tromey.com>
694
695 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
696 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
697 (captured_main, main): Update.
698 * gdbreplay.c (main): Update.
699
0570503d
PFC
7002019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
701
702 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
703 value in argument pointer, return 1 if the entry is found and 0
704 otherwise. Move comment.
705 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
706 * linux-low.h (linux_get_auxv): Declare.
707 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
708
227a9e65
TT
7092019-04-05 Tom Tromey <tromey@adacore.com>
710
711 * server.c (gdbserver_usage): Use upper-case for metasyntactic
712 variables.
713
69f4c9cc
AH
7142019-03-28 Alan Hayward <alan.hayward@arm.com>
715
716 * linux-low.c (AT_HWCAP2): Add define if not already included.
717
974c89e0
AH
7182019-03-26 Alan Hayward <alan.hayward@arm.com>
719
720 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
721 (aarch64_arch_setup): Call linux_get_hwcap.
722 * linux-arm-low.c (arm_get_hwcap): Remove function.
723 (arm_read_description): Call linux_get_hwcap.
724 * linux-low.c (linux_get_auxv): New function.
725 (linux_get_hwcap): Likewise.
726 (linux_get_hwcap2): Likewise.
727 * linux-low.h (linux_get_hwcap): New declaration.
728 (linux_get_hwcap2): Likewise.
729 * linux-ppc-low.c (ppc_get_auxv): Remove function.
730 (ppc_arch_setup): Call linux_get_hwcap.
731 * linux-s390-low.c (s390_get_hwcap): Remove function.
732 (s390_arch_setup): Call linux_get_hwcap.
733
1ef53e6b
AH
7342019-03-22 Alan Hayward <alan.hayward@arm.com>
735 Jiong Wang <jiong.wang@arm.com>
736
737 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
738 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
739 to fail.
740 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
741
ee4fbcfa
AH
7422019-03-22 Alan Hayward <alan.hayward@arm.com>
743 Jiong Wang <jiong.wang@arm.com>
744
745 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
746 (aarch64_get_hwcap): New function.
747 (aarch64_arch_setup): Read APIA hwcap.
748
6dc0ebde
AH
7492019-03-22 Alan Hayward <alan.hayward@arm.com>
750 Jiong Wang <jiong.wang@arm.com>
751
752 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
753 (initialize_low_tracepoint): Likewise.
754 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
755 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
756 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
757 (aarch64_linux_read_description): Likewise.
758 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
759
1163a4b7
JB
7602019-03-12 John Baldwin <jhb@FreeBSD.org>
761
762 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
763 i386_create_target_description for 'segments' parameter.
764 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
765 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
766 * win32-i386-low.c (i386_arch_setup): Likewise.
767
d3a70e03
TT
7682019-03-12 Tom Tromey <tromey@adacore.com>
769
770 * linux-low.c (iterate_over_lwps): Update.
771
37991b4f
TT
7722019-03-06 Tom Tromey <tom@tromey.com>
773
774 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
775 (captured_main): Use SCOPE_EXIT.
776
45950eb6
SDJ
7772019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
778
779 * configure.srv: Use '$enable_unittest' instead of '$development'
780 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
781 case.
782
43ac54fc
TT
7832019-02-27 Tom Tromey <tromey@adacore.com>
784
785 * gdbreplay.c (logchar): Handle \r\n.
786
df0da8a2
AH
7872019-02-07 Alan Hayward <alan.hayward@arm.com>
788
789 * linux-low.c (linux_attach): Add process before lwp.
790 * server.c (attach_inferior): Check if already attached.
791
1a5c2598
TT
7922019-02-07 Tom Tromey <tom@tromey.com>
793
794 * x86-tdesc.h: Rename include guard.
795 * x86-low.h: Add include guard.
796 * wincecompat.h: Rename include guard.
797 * win32-low.h: Add include guard.
798 * utils.h: Rename include guard.
799 * tracepoint.h: Rename include guard.
800 * tdesc.h: Rename include guard.
801 * target.h: Rename include guard.
802 * server.h: Rename include guard.
803 * remote-utils.h: Rename include guard.
804 * regcache.h: Rename include guard.
805 * nto-low.h: Rename include guard.
806 * notif.h: Add include guard.
807 * mem-break.h: Rename include guard.
808 * lynx-low.h: Add include guard.
809 * linux-x86-tdesc.h: Add include guard.
810 * linux-s390-tdesc.h: Add include guard.
811 * linux-ppc-tdesc-init.h: Add include guard.
812 * linux-low.h: Add include guard.
813 * linux-aarch64-tdesc.h: Add include guard.
814 * linux-aarch32-low.h: Add include guard.
815 * inferiors.h: Rename include guard.
816 * i387-fp.h: Rename include guard.
817 * hostio.h: Rename include guard.
818 * gdbthread.h: Rename include guard.
819 * gdb_proc_service.h: Rename include guard.
820 * event-loop.h: Rename include guard.
821 * dll.h: Rename include guard.
822 * debug.h: Rename include guard.
823 * ax.h: Rename include guard.
824
956cc47c
SN
8252018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
826
827 PR gdb/23985
828 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
829 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
830
a0707f3c
TT
8312019-01-25 Tom Tromey <tom@tromey.com>
832
833 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
834
0747795c
TT
8352019-01-25 Tom Tromey <tom@tromey.com>
836
837 * win32-low.c: Fix common/ includes.
838 * win32-i386-low.c: Fix common/ includes.
839 * tracepoint.c: Fix common/ includes.
840 * thread-db.c: Fix common/ includes.
841 * target.h: Fix common/ includes.
842 * symbol.c: Fix common/ includes.
843 * spu-low.c: Fix common/ includes.
844 * server.h: Fix common/ includes.
845 * server.c: Fix common/ includes.
846 * remote-utils.c: Fix common/ includes.
847 * regcache.h: Fix common/ includes.
848 * regcache.c: Fix common/ includes.
849 * nto-x86-low.c: Fix common/ includes.
850 * notif.h: Fix common/ includes.
851 * mem-break.h: Fix common/ includes.
852 * lynx-low.c: Fix common/ includes.
853 * lynx-i386-low.c: Fix common/ includes.
854 * linux-x86-tdesc-selftest.c: Fix common/ includes.
855 * linux-x86-low.c: Fix common/ includes.
856 * linux-low.c: Fix common/ includes.
857 * inferiors.h: Fix common/ includes.
858 * i387-fp.c: Fix common/ includes.
859 * hostio.c: Fix common/ includes.
860 * hostio-errno.c: Fix common/ includes.
861 * gdbthread.h: Fix common/ includes.
862 * gdbreplay.c: Fix common/ includes.
863 * fork-child.c: Fix common/ includes.
864 * event-loop.c: Fix common/ includes.
865 * ax.c:
866 (enum gdb_agent_op): Fix common/ includes.
867
be6d4f74
TT
8682019-01-21 Tom Tromey <tom@tromey.com>
869
870 * tracepoint.c: Fix includes.
871 * remote-utils.c: Fix includes.
872 * linux-x86-low.c: Fix includes.
873
66d91b39
JB
8742019-01-01 Joel Brobecker <brobecker@adacore.com>
875
876 * gdbreplay.c (gdbreplay_version): Update copyright year in
877 version message.
878 * server.c (gdbserver_version): Likewise.
879
754e3168
AH
8802018-12-05 Alan Hayward <alan.hayward@arm.com>
881
882 * linux-low.c (add_lwp): Switch ordering.
883
d105de22
TT
8842018-11-29 Tom Tromey <tom@tromey.com>
885
886 * win32-low.c (win32_join): Take pid, not process.
887 * target.h (struct target_ops) <join>: Change argument type.
888 (join_inferior): Change argument name.
889 * spu-low.c (spu_join): Take pid, not process.
890 * server.c (handle_detach): Preserve pid before destroying
891 process.
892 * lynx-low.c (lynx_join): Take pid, not process.
893 * linux-low.c (linux_join): Take pid, not process.
894
50138245
AH
8952018-11-23 Alan Hayward <alan.hayward@arm.com>
896
897 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
898 (aarch64_cannot_fetch_register): Likewise.
899 (struct linux_target_ops): Update references.
900
64f57f3d
PFC
9012018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
902
903 * linux-ppc-low.c: Include nat/linux-ptrace.h.
904
8d619c01
EBM
9052018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
906
907 * configure.srv (ipa_ppc_linux_regobj): Add
908 powerpc-isa207-htm-vsx32l-ipa.o and
909 powerpc-isa207-htm-vsx64l-ipa.o.
910 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
911 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
912 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
913 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
914 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
915 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
916 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
917 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
918 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
919 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
920 (init_registers_powerpc_isa207_htm_vsx32l)
921 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
922 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
923 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
924 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
925 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
926 (ppc_store_tm_ctarregset): New functions.
927 (ppc_regsets): Add entries for HTM regsets.
928 (ppc_arch_setup): Set htm in features struct when needed. Set
929 sizes for the HTM regsets.
930 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
931 (initialize_low_arch): Call
932 init_registers_powerpc_isa207_htm_vsx32l and
933 init_registers_powerpc_isa207_htm_vsx64l.
934 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
935 PPC_TDESC_ISA207_HTM_VSX.
936 (initialize_low_tracepoint): Call
937 init_registers_powerpc_isa207_htm_vsx32l and
938 init_registers_powerpc_isa207_htm_vsx64l.
939
232bfb86
EBM
9402018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
941
942 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
943 rs6000/power-linux-pmu.xml to srv_xmlfiles.
944 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
945 (ppc_store_pmuregset): New functions.
946 (ppc_regsets): Add entries for ebb and pmu regsets.
947 (ppc_arch_setup): Set isa207 in features struct if the ebb and
948 pmu regsets are available. Set sizes for these regsets.
949
f2cf6173
EBM
9502018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
951
952 * configure.srv (ipa_ppc_linux_regobj): Add
953 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
954 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
955 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
956 rs6000/powerpc-isa207-vsx32l.xml, and
957 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
958 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
959 <PPC_TDESC_ISA207_VSX>: New enum value.
960 (init_registers_powerpc_isa207_vsx32l): Declare.
961 (init_registers_powerpc_isa207_vsx64l): Declare.
962 * linux-ppc-low.c (ppc_fill_tarregset): New function.
963 (ppc_store_tarregset): New function.
964 (ppc_regsets): Add entry for the TAR regset.
965 (ppc_arch_setup): Set isa207 in features struct when needed. Set
966 size for the TAR regsets.
967 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
968 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
969 and init_registers_powerpc_isa207_vsx64l.
970 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
971 (initialize_low_tracepoint): Call
972 init_registers_powerpc_isa207_vsx32l and
973 init_registers_powerpc_isa207_vsx64l.
974
7ca18ed6
EBM
9752018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
976 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
977
978 * configure.srv (ipa_ppc_linux_regobj): Add
979 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
980 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
981 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
982 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
983 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
984 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
985 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
986 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
987 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
988 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
989 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
990 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
991 (ppc_hwcap): Add comment.
992 (ppc_hwcap2): New global.
993 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
994 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
995 (ppc_regsets): Add entries for the DSCR and PPR regsets.
996 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
997 when needed. Set sizes for the the DSCR and PPR regsets.
998 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
999 (initialize_low_arch): Call
1000 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1001 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1002 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1003 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1004 (initialize_low_tracepoint): Call
1005 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1006 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1007
5c849b22
PFC
10082018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1009
1010 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1011
8ecfd7bd
SDJ
10122018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1013 Simon Marchi <simark@simark.ca>
1014
1015 * acinclude.m4: Include "../selftest.m4".
1016 * configure: Regenerate.
1017 * configure.ac: Use "GDB_AC_SELFTEST".
1018 * configure.srv: Use "$enable_unittests" instead of
1019 "$development" when checking whether unit tests have been
1020 enabled.
1021 * server.c (captured_main): Update message informing that
1022 selftests have been disabled.
1023
96643e35
TT
10242018-10-04 Tom Tromey <tom@tromey.com>
1025
1026 * configure: Rebuild.
1027
da4ae14a
TT
10282018-10-04 Tom Tromey <tom@tromey.com>
1029
1030 * server.c (handle_status): Rename inner "thread".
1031 (process_serial_event): Declare "res" in 'm' case.
1032 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1033 (iterate_over_lwps): Rename inner "thread".
1034 (linux_qxfer_libraries_svr4): Rename inner "len".
1035 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1036
7c619dbd
GB
10372018-10-01 Gary Benson <gbenson@redhat.com>
1038
1039 * gdb_proc_service.h: Moved common code to
1040 common/gdb_proc_service.h.
1041
3795e814
GB
10422018-10-01 Gary Benson <gbenson@redhat.com>
1043
1044 * gdb_proc_service.h: Synchronize comments and whitespace with
1045 GDB's version of this file.
1046
49b036f1
TT
10472018-09-25 Tom Tromey <tom@tromey.com>
1048
1049 * configure: Rebuild.
1050 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1051
8ff03f0b
SM
10522018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1053
1054 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1055 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1056 ($(IPA_LIB)): Sort IPA_OBJS.
1057
a1cd91dc
SM
10582018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1059
1060 * Makefile.in: Remove references to $(ADD_DEPS).
1061
752312ba
TT
10622018-09-16 Tom Tromey <tom@tromey.com>
1063
1064 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1065 variables.
1066 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1067 variables.
1068
f1628857
TT
10692018-09-05 Tom Tromey <tom@tromey.com>
1070
1071 * configure: Rebuild.
1072
ad202fcc
SM
10732018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1074
1075 PR build/23399
1076 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1077
d3d8724a
TT
10782018-08-27 Tom Tromey <tom@tromey.com>
1079
1080 PR build/23087:
1081 * configure: Rebuild.
1082
b4f183d2
TT
10832018-08-27 Tom Tromey <tom@tromey.com>
1084
1085 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1086 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1087 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1088 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1089 (s390x_emit_stack_adjust): Add casts to unsigned char.
1090
4e2aa472
SM
10912018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1092
1093 PR gdb/23374
1094 PR gdb/23375
1095 * server.h (struct client_state) <disable_randomization>:
1096 Initialize to 1.
1097
cf4088a9
SM
10982018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1099
1100 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1101 variable.
1102 (mips_supply_ptrace_register): Likewise.
1103
a0de763e
TT
11042018-07-22 Tom Tromey <tom@tromey.com>
1105
1106 * configure: Rebuild.
1107
b0a7723d
TT
11082018-07-22 Tom Tromey <tom@tromey.com>
1109
1110 * win32-low.c (win32_create_inferior): Remove unused variables.
1111 * gdbreplay.c (remote_open): Remove unused variable.
1112 * remote-utils.c (remote_prepare): Remove unused variable.
1113 * x86-tdesc.h (X86_TDESC_H): Define.
1114 (amd64_expedite_regs): Define conditionally.
1115 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1116 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1117 * remote-utils.c (readchar): Remove unused variable.
1118
a780ef4f
PA
11192018-07-13 Pedro Alves <palves@redhat.com>
1120
1121 * linux-low.c (linux_kill): Change parameter to process_info
1122 pointer instead of pid. Adjust.
1123 * lynx-low.c (lynx_kill): Likewise.
1124 * nto-low.c (nto_kill): Likewise.
1125 * spu-low.c (spu_kill): Likewise.
1126 * win32-low.c (win32_kill): Likewise.
1127 * server.c (handle_v_kill, kill_inferior_callback)
1128 (detach_or_kill_for_exit): Adjust.
1129 * target.c (kill_inferior): Change parameter to process_info
1130 pointer instead of pid. Adjust.
1131 * target.h (struct target_ops) <kill>: Change parameter to
1132 process_info pointer instead of pid. Adjust all implementations
1133 and callers.
1134 (kill_inferior): Likewise.
1135
ef2ddb33
PA
11362018-07-13 Pedro Alves <palves@redhat.com>
1137
1138 * linux-low.c (linux_detach, linux_join): Change parameter to
1139 process_info pointer instead of pid. Adjust.
1140 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1141 * nto-low.c (nto_detach): Likewise.
1142 * spu-low.c (spu_detach, spu_join): Likewise.
1143 * win32-low.c (win32_detach, win32_join): Likewise.
1144 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1145 * target.h (struct target_ops) <detach, join>: Change parameter to
1146 process_info pointer instead of pid. Adjust all implementations
1147 and callers.
1148 (detach_inferior, join_inferior): Rename 'pid' parameter to
1149 'proc'.
1150
c7ab0aef
SDJ
11512018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1152 Jan Kratochvil <jan.kratochvil@redhat.com>
1153 Paul Fertser <fercerpav@gmail.com>
1154 Tsutomu Seki <sekiriki@gmail.com>
1155
1156 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1157 (OBS): Add 'common/netstuff.o'.
1158 (GDBREPLAY_OBS): Likewise.
1159 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1160 (remote_open): Implement support for IPv6
1161 connections.
1162 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1163 and 'wspiapi.h'.
1164 (handle_accept_event): Accept connections from IPv6 sources.
1165 (remote_prepare): Handle IPv6-style hostnames; implement
1166 support for IPv6 connections.
1167 (remote_open): Implement support for printing connections from
1168 IPv6 sources.
1169
31445d10
PA
11702018-07-11 Pedro Alves <palves@redhat.com>
1171
1172 PR gdb/23377
1173 * mem-break.c (any_persistent_commands): Add process_info
1174 parameter and use it instead of relying on the current process.
1175 Change return type to bool.
1176 * mem-break.h (any_persistent_commands): Add process_info
1177 parameter and change return type to bool.
1178 * server.c (handle_detach): Remove require_running_or_return call.
1179 Look up the process_info for the process we're about to detach.
1180 If not found, return back error to GDB. Adjust
1181 any_persistent_commands call to pass down a process pointer.
1182
cb197132
PA
11832018-07-11 Pedro Alves <palves@redhat.com>
1184
1185 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1186 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1187 instead of collect_register_by_name.
1188 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1189 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1190
1b919490
VB
11912018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1192 Pedro Alves <palves@redhat.com>
1193
1194 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1195
d7e15655
TT
11962018-07-03 Tom Tromey <tom@tromey.com>
1197
1198 * linux-low.c: Update.
1199 * lynx-low.c: Update.
1200 * mem-break.c: Update.
1201 * nto-low.c: Update.
1202 * remote-utils.c: Update.
1203 * server.c: Update.
1204 * spu-low.c: Update.
1205 * target.c: Update.
1206 * win32-low.c: Update.
1207
26a57c92
TT
12082018-07-03 Tom Tromey <tom@tromey.com>
1209
1210 * server.c: Update.
1211
0e998d96
TT
12122018-07-03 Tom Tromey <tom@tromey.com>
1213
1214 * linux-low.c: Update.
1215
cc6bcb54
TT
12162018-07-03 Tom Tromey <tom@tromey.com>
1217
1218 * target.c: Update.
1219
e38504b3
TT
12202018-07-03 Tom Tromey <tom@tromey.com>
1221
1222 * linux-low.c: Update.
1223 * linux-mips-low.c: Update.
1224 * lynx-low.c: Update.
1225 * nto-low.c: Update.
1226 * remote-utils.c: Update.
1227 * server.c: Update.
1228 * spu-low.c: Update.
1229 * target.c: Update.
1230 * thread-db.c: Update.
1231
e99b03dc
TT
12322018-07-03 Tom Tromey <tom@tromey.com>
1233
1234 * linux-low.c: Update.
1235 * linux-mips-low.c: Update.
1236 * lynx-low.c: Update.
1237 * mem-break.c: Update.
1238 * nto-low.c: Update.
1239 * remote-utils.c: Update.
1240 * server.c: Update.
1241 * spu-low.c: Update.
1242 * target.c: Update.
1243 * tracepoint.c: Update.
1244
f2907e49
TT
12452018-07-03 Tom Tromey <tom@tromey.com>
1246
1247 * linux-low.c: Update.
1248 * linux-ppc-low.c: Update.
1249 * linux-x86-low.c: Update.
1250 * proc-service.c: Update.
1251 * server.c: Update.
1252 * spu-low.c: Update.
1253 * thread-db.c: Update.
1254 * win32-low.c: Update.
1255
fd79271b
TT
12562018-07-03 Tom Tromey <tom@tromey.com>
1257
1258 * linux-low.c: Update.
1259 * lynx-low.c: Update.
1260 * nto-low.c: Update.
1261 * remote-utils.c: Update.
1262 * spu-low.c: Update.
1263 * thread-db.c: Update.
1264 * win32-low.c: Update.
1265
c0867626
SDJ
12662018-06-29 Joel Brobecker <brobecker@adacore.com>
1267
1268 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1269 parameter in call to 'amd64_create_target_description'.
1270
2512d7ef
JK
12712018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1272
1273 * x86-tdesc.h: Remove executable permission flag.
1274
d0ac1c44
SM
12752018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1276
1277 * configure.ac: Remove AC_PREREQ, add missing quoting.
1278 * configure: Re-generate.
1279 * config.in: Re-generate.
1280 * aclocal.m4: Re-generate.
1281
c4eb05ff
SM
12822018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1283
1284 * tracepoint.h (current_traceframe): Remove declaration.
1285
02895270
AH
12862018-06-18 Alan Hayward <alan.hayward@arm.com>
1287
1288 * linux-aarch64-low.c (is_sve_tdesc): New function.
1289 (aarch64_sve_regs_copy_to_regcache): Likewise.
1290 (aarch64_sve_regs_copy_from_regcache): Likewise.
1291 (aarch64_regs_info): Add SVE checks.
1292 (initialize_low_arch): Initialize SVE.
1293
e9902bfc
AH
12942018-06-18 Alan Hayward <alan.hayward@arm.com>
1295
1296 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1297
fefa175e
AH
12982018-06-11 Alan Hayward <alan.hayward@arm.com>
1299
1300 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1301 (initialize_low_tracepoint): Likewise
1302 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1303 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1304 param.
1305 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1306 checks.
1307 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1308
b91ad3ff
AH
13092018-06-11 Alan Hayward <alan.hayward@arm.com>
1310
1311 * server.h (PBUFSIZ): Increase size
1312
f868386e
AH
13132018-06-11 Alan Hayward <alan.hayward@arm.com>
1314
1315 * regcache.c (regcache::raw_compare): New function.
1316 * regcache.h (regcache::raw_compare): New declaration.
1317
9c861883
AH
13182018-06-11 Alan Hayward <alan.hayward@arm.com>
1319
1320 * regcache.c (new_register_cache): Use new.
1321 (free_register_cache): Use delete.
1322 (register_data): Use const.
1323 (supply_register): Move body inside regcache.
1324 (regcache::raw_supply): New override function.
1325 (collect_register): Move body inside regcache.
1326 (regcache::raw_collect): New override function.
1327 (regcache::get_register_status): New override function.
1328 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1329
40591844
TT
13302018-06-09 Tom Tromey <tom@tromey.com>
1331
1332 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1333 declare queue.
1334 (event_queue): Use std::queue.
1335 (gdb_event_xfree): Remove.
1336 (initialize_event_loop, process_event, wait_for_event): Update.
1337
6341380d
SC
13382018-06-08 Stan Cox <scox@redhat.com>
1339
1340 * win32-low.c (win32_create_inferior): last_ptid and last_status
1341 moved to client_state.
1342
03349c93
PA
13432018-06-08 Pedro Alves <palves@redhat.com>
1344
1345 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1346 common/common-exceptions.o, common/common-utils.o,
1347 common/errors.o, common/print-utils.o and utils.o.
1348 * gdbreplay.c: Include "common-defs.h" instead of the two
1349 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1350 string.h or alloca.h.
1351 (perror_with_name): Delete.
1352 (remote_open): Use xstrdup instead of strdup.
1353 (main): Rename to ...
1354 (captured_main): ... this.
1355 (main): New.
1356
8dcc53b3
TT
13572018-06-08 Tom Tromey <tom@tromey.com>
1358
1359 * linux-low.c (linux_low_read_btrace): Update.
1360
c12a5089
SC
13612018-06-04 Stan Cox <scox@redhat.com>
1362
1363 * server.h (struct client_state): New.
1364 * server.c (cont_thread, general_thread, multi_process)
1365 (report_fork_events, report_vfork_events, report_exec_events)
1366 (report_thread_events, swbreak_feature, hwbreak_feature)
1367 (vCont_supported, disable_randomization, pass_signals)
1368 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1369 Moved to client_state.
1370 * remote-utils.c (remote_debug, noack_mode)
1371 (transport_is_reliable): Moved to client_state.
1372 * tracepoint.c (current_traceframe): Moved to client_state.
1373
1374 Update all callers.
1375 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1376 linux-low.c, remote-utils.h, target.c: Use client_state.
1377
122394f1
AH
13782018-05-31 Alan Hayward <alan.hayward@arm.com>
1379
1380 * configure.srv: Add new c/h file.
1381
95228a0d
AH
13822018-05-31 Alan Hayward <alan.hayward@arm.com>
1383
1384 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1385 null VQ.
1386
d8dab6c3
MR
13872018-05-25 Maciej W. Rozycki <macro@mips.com>
1388
1389 * gdb.arch/mips-fpregset-core.exp: New test.
1390 * gdb.arch/mips-fpregset-core.c: New test source.
1391
81e25b7c
EK
13922018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1393
1394 PR server/23198
1395 * hostio.c (require_int): Do not report overflow for integers
1396 between 0xfffffff and 0x7fffffff.
1397
7e947ad3
MR
13982018-05-22 Maciej W. Rozycki <macro@mips.com>
1399
1400 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1401 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1402 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1403 functions.
1404 (the_low_target): Wire them.
1405
1d75a658
PFC
14062018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1407
1408 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1409 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1410 mode. Call collect_register_by_name with vscr using
1411 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1412 (ppc_store_vrregset): Add and set vscr_offset variable as in
1413 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1414 vscr_offset.
1415
d078308a
PFC
14162018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1417
1418 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1419 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1420 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1421
7273b5fc
PFC
14222018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1423
1424 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1425 (ppc_store_vsxregset): Likewise.
1426 (ppc_fill_vrregset): Likewise.
1427 (ppc_store_vrregset): Likewise.
1428 (ppc_fill_evrregset): Likewise.
1429 (ppc_store_evrregset): Likewise.
1430 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1431 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1432 needed.
1433
2e077f5e
PFC
14342018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1435
1436 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1437 wordsize of the inferior. Call ppc_linux_target_wordsize.
1438
bd64614e
PFC
14392018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1440
1441 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1442 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1443 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1444 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1445 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1446 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1447 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1448 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1449 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1450 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1451 (tdesc_powerpc_e500l): Remove.
1452 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1453 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1454 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1455 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1456 linux-ppc-tdesc.h.
1457 (ppc_arch_setup): Remove target description matching code. Fill a
1458 ppc_linux_features struct and call ppc_linux_match_description
1459 with it.
1460
75d74cca
MR
14612018-05-22 Maciej W. Rozycki <macro@mips.com>
1462
1463 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1464 width of the requested register exceeds the width of the
1465 `ptrace' data type.
1466 (mips_cannot_store_register): Likewise.
1467
e4439e43
MR
14682018-05-21 Maciej W. Rozycki <macro@mips.com>
1469
1470 * linux-mips-low.c (mips_fetch_register): New function. Update
1471 preceding comment.
1472 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1473 (the_low_target): Wire `mips_fetch_register'.
1474
55271bf9
JB
14752018-05-10 Joel Brobecker <brobecker@adacore.com>
1476
1477 * lynx-i386-low.c (LYNXOS_178): New macro.
1478 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1479 the layout on LynxOS-178.
1480 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1481 handle floating point registers that are not supported by
1482 LynxOS-178.
1483
1a34f210
TT
14842018-05-10 Tom Tromey <tom@tromey.com>
1485
1486 * configure: Rebuild.
1487
190852c8
JB
14882018-05-10 Joel Brobecker <brobecker@adacore.com>
1489
1490 PR server/23158:
1491 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1492 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1493 Use it to set the expedite_regs field in the given tdesc.
1494 * x86-tdesc.h: New file.
1495 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1496 Adjust following the addition of the new expedite_regs parameter
1497 to init_target_desc.
1498 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1499 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1500 (i386_linux_read_description, amd64_linux_read_description):
1501 Adjust following the addition of the new expedite_regs parameter
1502 to init_target_desc.
1503 * lynx-i386-low.c: #include "x86-tdesc.h".
1504 (lynx_i386_arch_setup): Adjust following the addition of the new
1505 expedite_regs parameter to init_target_desc.
1506 * nto-x86-low.c: #include "x86-tdesc.h".
1507 (nto_x86_arch_setup): Adjust following the addition of the new
1508 expedite_regs parameter to init_target_desc.
1509 * win32-i386-low.c: #include "x86-tdesc.h".
1510 (i386_arch_setup): Adjust following the addition of the new
1511 expedite_regs parameter to init_target_desc.
1512
7dbac825
JB
15132018-05-10 Joel Brobecker <brobecker@adacore.com>
1514
1515 PR server/23158:
1516 * win32-low.c (win32_create_inferior): Add call to my_wait
1517 setting last_status global.
1518
906994d9
JB
15192018-05-10 Joel Brobecker <brobecker@adacore.com>
1520
1521 PR server/23158:
1522 * win32-low.c (create_process): Only call gdb_tilde_expand if
1523 inferior_cwd is not NULL.
1524
8ee22052
AB
15252018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1526
1527 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1528 registers to the cache if their values have changed.
1529 (i387_xsave_to_cache): Provide default values for x87 control
1530 registers when these features are available, but disabled.
1531 * regcache.c (supply_register_by_name_zeroed): New function.
1532 * regcache.h (supply_register_by_name_zeroed): Declare new
1533 function.
1534
aff689d3
TT
15352018-05-07 Tom Tromey <tom@tromey.com>
1536
1537 * configure: Rebuild.
1538
85e26832
TT
15392018-05-04 Tom Tromey <tom@tromey.com>
1540
1541 * configure: Rebuild.
1542
a3b60e45
JK
15432018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1544 Pedro Alves <palves@redhat.com>
1545
1546 * linux-aarch64-low.c (aarch64_stopped_data_address):
1547 Likewise.
1548
632e107b
TT
15492018-04-27 Tom Tromey <tom@tromey.com>
1550
1551 * configure: Rebuild.
1552
458412c3
TT
15532018-04-23 Tom Tromey <tom@tromey.com>
1554
1555 * configure: Rebuild.
1556
f31c089e
SM
15572018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1558
1559 * Makefile.in (depcomp): Add "..".
1560 (all_deps_files): New and use it.
1561
b319b098
AH
15622018-04-18 Alan Hayward <alan.hayward@arm.com>
1563
1564 * configure.srv (aarch64*-*-linux*): Don't include xml.
1565 (i[34567]86-*-cygwin*): Likewise.
1566 (i[34567]86-*-linux*): Likewise.
1567 (i[34567]86-*-lynxos*): Likewise.
1568 (i[34567]86-*-mingw32ce*): Likewise.
1569 (i[34567]86-*-mingw*): Likewise.
1570 (i[34567]86-*-nto*): Likewise.
1571 (tic6x-*-uclinux): Likewise.
1572 (x86_64-*-linux*): Likewise.
1573 (x86_64-*-mingw*): Likewise.
1574 (x86_64-*-cygwin*): Likewise.
1575
3b74854b
AH
15762018-04-18 Alan Hayward <alan.hayward@arm.com>
1577
1578 * tdesc.c: Remove xml parameter.
1579
e98577a9
AH
15802018-04-18 Alan Hayward <alan.hayward@arm.com>
1581
1582 * server.c (get_features_xml): Remove cast.
1583 * tdesc.c (void target_desc::accept): Fill in function.
1584 (tdesc_get_features_xml): Remove old xml creation.
1585 (print_xml_feature::visit_pre): Add xml vistor.
1586 * tdesc.h (struct target_desc): Make xmltarget mutable.
1587 (tdesc_get_features_xml): Remove declaration.
1588
d278f585
AH
15892018-04-18 Alan Hayward <alan.hayward@arm.com>
1590
1591 * tdesc.c (tdesc_architecture_name): Add new function.
1592 (tdesc_osabi_name): Likewise.
1593 (tdesc_get_features_xml): Use new functions.
1594
eee8a18d
AH
15952018-04-18 Alan Hayward <alan.hayward@arm.com>
1596
1597 * tdesc.c (tdesc_create_flags): Remove.
1598 (tdesc_add_flag): Likewise.
1599 (tdesc_named_type): Likewise.
1600 (tdesc_create_union): Likewise.
1601 (tdesc_create_struct): Likewise.
1602 (tdesc_create_vector): Likewise.
1603 (tdesc_add_bitfield): Likewise.
1604 (tdesc_add_field): Likewise.
1605 (tdesc_set_struct_size): Likewise.
1606
82ec9bc7
AH
16072018-04-18 Alan Hayward <alan.hayward@arm.com>
1608
1609 * tdesc.c (~target_desc): Remove implictly deleted items.
1610 (init_target_desc): Iterate all features.
1611 (tdesc_get_features_xml): Use vector.
1612 (tdesc_create_feature): Create feature.
1613 * tdesc.h (tdesc_feature) Remove
1614 (target_desc): Add features.
1615
ea3e7d71
AH
16162018-04-18 Alan Hayward <alan.hayward@arm.com>
1617
1618 * Makefile.in: Add common/tdesc.c
1619 * tdesc.c (init_target_desc): init all reg_defs from register
1620 vector.
1621 (tdesc_create_reg): Create tdesc_reg.
1622 * tdesc.h (tdesc_feature): Add register vector.
1623
17d08cd4
SM
16242018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1625
1626 * tdesc.h (struct target_desc) <features>: Change type to
1627 std::vector<std::string>.
1628 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1629 changes.
1630 (tdesc_get_features_xml): Likewise.
1631 (tdesc_create_feature): Likewise.
1632
5cd3e386
AH
16332018-03-26 Alan Hayward <alan.hayward@arm.com>
1634
1635 * regcache.c (find_register_by_number): Return a ref.
1636 (find_regno): Use references.
1637 (register_size): Likewise.
1638 (register_data): Likewise.
1639 * tdesc.c (target_desc::~target_desc): Remove free calls.
1640 (target_desc::operator==): Use std::vector compare.
1641 (init_target_desc): Use reference.
1642 (tdesc_create_reg): Use reg constructors.
1643 * tdesc.h (struct target_desc): Replace pointer with object.
1644
dff7492c
AH
16452018-03-23 Alan Hayward <alan.hayward@arm.com>
1646
1647 * regcache.c (find_register_by_number): Make static.
1648 (find_regno): Use find_register_by_number
1649 * regcache.h (struct reg): Remove declaration.
1650
d80e5242
AH
16512018-03-23 Alan Hayward <alan.hayward@arm.com>
1652
1653 * tdesc.c (target_desc::~target_desc): Move to here.
1654 (target_desc::operator==): Likewise.
1655 * tdesc.h (target_desc::~target_desc): Move from here.
1656 (target_desc::operator==): Likewise.
1657
f69c5afb
AA
16582018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1659
1660 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1661
ce29f843
AA
16622018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1663
1664 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1665 S390_TDESC_GS.
1666 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1667 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1668 and init_registers_s390_gs_linux64.
1669
c49bd90b
AA
16702018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1671
1672 * linux-s390-low.c (s390_fill_gs): Remove function.
1673 (s390_fill_gsbc): Remove function.
1674 (s390_regsets): Set fill functions for the guarded storage regsets
1675 to NULL.
1676
7edb9bd3
AA
16772018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1678
1679 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1680 the word size. Add comment.
1681 (s390_get_wordsize): New function.
1682 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1683 pswm with it. Instead, use s390_get_wordsize to determine the
1684 word size first and derive the correct tdesc from that directly.
1685
39be3c7e
SM
16862018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1687
1688 * Makefile.in: Include silent-rules.mk.
1689 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1690 (COMPILE): Add ECHO_CXX.
1691 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1692 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1693 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1694 (version-generated.c): Add ECHO_GEN.
1695 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1696 (IPAGENT_COMPILE): Add ECHO_CXX.
1697 (%-generated.c): Add ECHO_REGDAT.
1698
3ae9ce5d
TT
16992018-03-14 Tom Tromey <tom@tromey.com>
1700
1701 PR cli/14977:
1702 * ax.c (ax_printf): Special case for NULL.
1703
e6a58aa8
SM
17042018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1705
1706 * linux-low.c (linux_qxfer_libraries_svr4): Use
1707 xml_escape_text_append.
1708
f6e8a41e
SM
17092018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1710
1711 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1712
b9671caf
SM
17132018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1714
1715 * server.c (handle_general_set): Remove unnecessary xstrdup.
1716
e80aaf61
SM
17172018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1718
1719 * server.c (parse_debug_format_options): Adjust to
1720 delim_string_to_char_ptr_vec changes.
1721 * thread-db.c (thread_db_load_search): Adjust to
1722 dirnames_to_char_ptr_vec changes.
1723
b1223e78
MM
17242018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1725
1726 * target.h (target_enable_btrace, target_disable_btrace)
1727 (target_read_btrace, target_read_btrace_conf): Turn macro into
1728 inline function. Throw error if target method is not defined.
1729 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1730 check for btrace target method. Be prepared to handle exceptions
1731 from btrace target methods.
1732
81561546
SDJ
17332018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1734
1735 * server.c (captured_main): Change order of error message printed
1736 when the current working directory cannot be found.
1737
25e3c82c
SDJ
17382018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1739
1740 * server.c: Include "filenames.h" and "pathstuff.h".
1741 (program_name): Delete variable.
1742 (program_path): New anonymous class.
1743 (get_exec_wrapper): Use "program_path" instead of
1744 "program_name".
1745 (handle_v_run): Likewise.
1746 (captured_main): Likewise.
1747 (process_serial_event): Likewise.
1748
b4987c95
SDJ
17492018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1750
1751 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1752 (OBJS): Add "pathstuff.o".
1753 * server.c (current_directory): New global variable.
1754 (captured_main): Initialize "current_directory".
1755
f46cd62a
AH
17562018-02-26 Alan Hayward <alan.hayward@arm.com>
1757
1758 * tdesc.c: Use common/tdesc.h.
1759 * tdesc.h: Likewise.
1760
a543c5ca
AH
17612018-02-20 Alan Hayward <alan.hayward@arm.com>
1762 Simon Marchi <simon.marchi@ericsson.com>
1763
1764 * Makefile.in: Switch order of make rules.
1765
b5884fa7
AH
17662018-02-19 Alan Hayward <alan.hayward@arm.com>
1767
1768 * Makefile.in: Add common directory in build.
1769 * configure.ac: Add common reference.
1770 * configure: Regenerate.
1771
de6242d3
MM
17722018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1773
1774 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1775 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1776 * spu-low.c (spu_target_ops): Likewise.
1777 * win32-low.c (win32_target_ops): Likewise.
1778 * server.c (supported_btrace_packets): Report packets unconditionally.
1779 * target.h (target_ops) <supports_btrace>: Remove.
1780 (target_supports_btrace): Remove.
1781
9ee23a85
MM
17822018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1783
1784 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1785 (handle_btrace_disable): Change return type to void. Use exceptions
1786 to report errors.
1787 (handle_btrace_general_set): Catch exception and copy message to
1788 return message.
1789
8ce47547
TT
17902018-02-08 Tom Tromey <tom@tromey.com>
1791
1792 * linux-low.c (install_software_single_step_breakpoints): Use
1793 make_scoped_restore.
1794 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1795 (do_restore_current_thread_cleanup): Remove.
1796 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1797 declare.
1798
45dd3607
TT
17992018-02-08 Tom Tromey <tom@tromey.com>
1800
1801 * mem-break.c (set_raw_breakpoint_at): Use
1802 gdb::unique_xmalloc_ptr.
1803
e671cd59
PA
18042018-01-30 Pedro Alves <palves@redhat.com>
1805
1806 PR gdb/13211
1807 * target.c (target_terminal::terminal_state): Rename to ...
1808 (target_terminal::m_terminal_state): ... this.
1809
a0aad537
JC
18102018-01-19 James Clarke <jrtc27@jrtc27.com>
1811
1812 * linux-low.c (handle_extended_wait): Surround call to
1813 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1814
4d9b86e1
SM
18152018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1816
1817 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1818 linux_ptrace_attach_fail_reason_string now returning an
1819 std::string.
1820 (linux_attach): Likewise.
1821 * thread-db.c (attach_thread): Likewise.
1822
f517c180
EA
18232018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1824
1825 PR gdb/21559
1826 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1827 checking for fs_base/gs_base fields in struct user_regs_struct.
1828 * configure: Regenerate.
1829
9a70f35c
YQ
18302018-01-16 Yao Qi <yao.qi@linaro.org>
1831
1832 PR gdb/18749
1833 * linux-low.c (fetch_register): Call supply_register instead of
1834 error.
1835
605fd3c6
YQ
18362018-01-08 Yao Qi <yao.qi@linaro.org>
1837 Simon Marchi <simon.marchi@ericsson.com>
1838
1839 * Makefile.in (OBS): Remove selftest.o.
1840 * configure.ac: Set srv_selftest_objs if $development is true.
1841 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1842 * configure: Re-generated.
1843 * server.c (captured_main): Wrap variable selftest_filter with
1844 GDB_SELF_TEST.
1845
2cc05030
SM
18462018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1847
1848 * server.c (parse_debug_format_options): Return std::string.
1849 (handle_monitor_command, captured_main): Adjust.
1850
e379cee6
PA
18512018-01-05 Pedro Alves <palves@redhat.com>
1852
1853 PR gdb/18653
1854 * server.c (captured_main): Pass quiet=false to
1855 save_original_signals_state.
1856
82e1e79a
JB
18572018-01-01 Joel Brobecker <brobecker@adacore.com>
1858
1859 * gdbreplay.c (gdbreplay_version): Update copyright year in
1860 version message.
1861 * server.c (gdbserver_version): Likewise.
1862
8e481c3b
TT
18632017-12-08 Tom Tromey <tom@tromey.com>
1864
1865 * ax.c (ax_printf): Update.
1866
a8806230
YQ
18672017-12-07 Yao Qi <yao.qi@linaro.org>
1868
1869 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1870 aarch64_linux_read_description.
1871 * linux-amd64-ipa.c (idx2mask): New array.
1872 (get_ipa_tdesc): Move idx2mask out.
1873 (initialize_low_tracepoint): Initialize target descriptions.
1874 * linux-i386-ipa.c (idx2mask): New array.
1875 (get_ipa_tdesc): Move idx2mask out.
1876 (initialize_low_tracepoint): Initialize target descriptions.
1877
d4a0e8b5
SM
18782017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1879
1880 * tdesc.c (struct tdesc_type): Change return type.
1881 (tdesc_add_flag): Change parameter type.
1882 (tdesc_add_bitfield): Likewise.
1883 (tdesc_add_field): Likewise.
1884 (tdesc_set_struct_size): Likewise.
1885
798a7429
SM
18862017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1887
1888 * regcache.c (registers_to_string): Remove unused variable.
1889
c0e15c9b
SM
18902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1891
1892 * inferiors.c (for_each_inferior_with_data): Remove.
1893 * inferiors.h (for_each_inferior_with_data): Remove.
1894 * server.c (handle_qxfer_threads_worker): Change parameter type.
1895 (handle_qxfer_threads_proper): Use for_each_thread.
1896
f0045347
SM
18972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1898
1899 * inferiors.c (for_each_inferior): Remove.
1900 (clear_inferiors): Use for_each_thread.
1901 * inferiors.h (for_each_inferior): Remove.
1902 * linux-low.c (linux_wait_for_event_filtered): Use
1903 for_each_thread.
1904 (linux_stabilize_threads): Likewise.
1905 * regcache.c (regcache_release): Likewise.
1906 * server.c (gdb_wants_all_threads_stopped): Likewise.
1907 (clear_pending_status_callback): Remove.
1908 (handle_status): Use for_each_thread.
1909 (captured_main): Likewise.
1910 * win32-low.c (child_init_thread_list): Likewise.
1911 (win32_clear_inferiors): Likewise.
1912 (fake_breakpoint_event): Likewise.
1913
9521758b
SM
19142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1915
1916 * inferiors.h (find_inferior): Remove.
1917 * inferiors.c (find_inferior): Remove.
1918
8f86d7aa
SM
19192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1920
1921 * linux-low.c (resume_status_pending_p): Update comment.
1922 (need_step_over_p): Update comment.
1923
e2b44075
SM
19242017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1925
1926 * linux-low.c (proceed_one_lwp): Return void, change parameter
1927 type.
1928 (unsuspend_and_proceed_one_lwp): Likewise.
1929 (proceed_all_lwps): Use for_each_thread.
1930 (unstop_all_lwps): Likewise.
1931
c80825ff
SM
19322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1933
1934 * linux-low.c (linux_resume_one_thread): Return void, take
1935 parameter directly.
1936 (linux_resume): Use for_each_thread.
1937
df3e4dbe
SM
19382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1939
1940 * linux-low.c (send_sigstop_callback): Return void, change
1941 parameter type. Rename to...
1942 (send_sigstop): ... this.
1943 (suspend_and_send_sigstop_callback): Return void, change parameter
1944 type. Rename to...
1945 (suspend_and_send_sigstop): ... this.
1946 (stop_all_lwps): Use for_each_thread.
1947
5a6b0a41
SM
19482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1949
1950 * linux-low.c (lwp_running): Return bool, remove unused
1951 argument.
1952 (linux_stabilize_threads): Use find_thread.
1953
39a64da5
SM
19542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1955
1956 * linux-low.c (select_singlestep_lwp_callback): Remove.
1957 (count_events_callback): Remove.
1958 (select_event_lwp_callback): Remove.
1959 (select_event_lwp): Use find_thread/for_each_thread.
1960
a1385b7b
SM
19612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1962
1963 * linux-low.c (not_stopped_callback): Return bool, take filter
1964 argument directly.
1965 (linux_wait_for_event_filtered): Use find_thread.
1966 (linux_wait_1): Likewise.
1967
454296a2
SM
19682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1969
1970 * linux-low.c (same_lwp): Remove.
1971 (find_lwp_pid): Use find_thread.
1972
6b2a85da
SM
19732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1974
1975 * linux-low.c (delete_lwp_callback): Remove.
1976 (linux_mourn): Use for_each_thread.
1977
798a38e8
SM
19782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1979
1980 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1981 args parameter, don't check for pid.
1982 (linux_detach): Use for_each_thread.
1983
e4eb0dec
SM
19842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1985
1986 * linux-low.c (struct counter): Remove.
1987 (second_thread_of_pid_p): Remove.
1988 (last_thread_of_process_p): Use find_thread.
1989
83e1b6c1
SM
19902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1991
1992 * inferiors.c (find_inferior_in_random): Remove.
1993 * inferiors.h (find_inferior_in_random): Remove.
1994 * linux-low.c (status_pending_p_callback): Return bool, accept
1995 parameter ptid directly.
1996 (linux_wait_for_event_filtered): Use find_thread_in_random.
1997 (linux_wait_1): Likewise.
1998
8dc7b443
SM
19992017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2000
2001 * inferiors.c (find_inferior_id): Remove.
2002 (find_thread_ptid): Move implemention from find_inferior_id to
2003 here.
2004 * inferiors.h (find_inferior_id): Remove.
2005 * server.c (handle_status): Use find_thread_ptid.
2006 (process_serial_event): Likewise.
2007 * thread-db.c (find_one_thread): Likewise.
2008 (thread_db_thread_handle): Likewise.
2009 * win32-low.c (thread_rec): Likewise.
2010 (child_delete_thread): Likewise.
2011 (win32_thread_alive): Likewise.
2012 (get_child_debug_event): Likewise.
2013
da25033c
SM
20142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2015
2016 * linux-mips-low.c (update_watch_registers_callback): Return
2017 void, remove pid_p parameter, don't check for pid.
2018 (mips_insert_point, mips_remove_point): Use for_each_thread.
2019
c91bb56b
SM
20202017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2021
2022 * lynx.low (lynx_delete_thread_callback): Remove.
2023 (lynx_mourn): Use for_each_thread.
2024
634a3254
SM
20252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2026
2027 * regcache.c (regcache_invalidate_one): Remove.
2028 (regcache_invalidate_pid): use for_each_thread.
2029
41272101
TT
20302017-11-26 Tom Tromey <tom@tromey.com>
2031
2032 * linux-low.c (linux_create_inferior): Update.
2033
f5291a6f
UW
20342017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2035
2036 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2037
6654d750
AH
20382017-11-24 Alan Hayward <alan.hayward@arm.com>
2039
2040 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2041 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2042 * linux-aarch64-tdesc-selftest.c: New file.
2043 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2044
20452017-11-24 Alan Hayward <alan.hayward@arm.com>
2046
2047 * configure.srv: Add new file.
2048 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2049 * linux-aarch64-tdesc-selftest.c: New file.
2050 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2051
49bdb7ee
AH
20522017-11-24 Alan Hayward <alan.hayward@arm.com>
2053
2054 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2055 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2056 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2057
d6d7ce56
AH
20582017-11-24 Alan Hayward <alan.hayward@arm.com>
2059
2060 * configure.srv: Add new files.
2061 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2062 aarch64_linux_read_description.
2063 * linux-aarch64-low.c (aarch64_linux_read_description):
2064 Merge with aarch64_arch_setup.
2065 (aarch64_arch_setup): Call aarch64_linux_read_description.
2066 * linux-aarch64-tdesc.c: New file.
2067 * linux-aarch64-tdesc.h: New file.
2068
506fe5f4
YQ
20692017-11-24 Yao Qi <yao.qi@linaro.org>
2070
2071 * configure.srv: Set $srv_regobj for tic6x-linux.
2072 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2073 (tic6x_read_description): Move some code to tic6x_arch_setup.
2074 (tic6x_tdesc_test): New function.
2075 (initialize_low_arch): Call selftests::register_test.
2076
29f9a567
YQ
20772017-11-22 Yao Qi <yao.qi@linaro.org>
2078
2079 * remote-utils.c (prepare_resume_reply): Use memcpy.
2080
578290ec
SM
20812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2082
2083 * linux-low.c (kill_one_lwp_callback): Return void, take
2084 argument directly, don't filter on pid.
2085 (linux_kill): Use for_each_thread.
2086
eca55aec
SM
20872017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2088
2089 * linux-low.c (need_step_over_p): Return bool, remove dummy
2090 argument.
2091 (linux_resume, proceed_all_lwps): Use find_thread.
2092
25c28b4d
SM
20932017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2094
2095 * linux-low.c (resume_status_pending_p): Return bool, remove
2096 flag_p argument.
2097 (linux_resume): Use find_thread.
2098
5fdda392
SM
20992017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2100
2101 * linux-low.c (struct thread_resume_array): Remove.
2102 (linux_set_resume_request): Return void, take arguments
2103 directly.
2104 (linux_resume): Use for_each_thread.
2105
fcb056a5
SM
21062017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2107
2108 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2109 return bool, remove data argument.
2110 (linux_stabilize_threads): Use find_thread.
2111
139720c5
SM
21122017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2113
2114 * linux-low.c (unsuspend_one_lwp): Remove.
2115 (unsuspend_all_lwps): Use for_each_thread, inline code from
2116 unsuspend_one_lwp.
2117
6d1e5673
SM
21182017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2119
2120 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2121 * linux-low.c (struct iterate_over_lwps_args): Remove.
2122 (iterate_over_lwps_filter): Remove.
2123 (iterate_over_lwps): Use find_thread.
2124
bbf550d5
SM
21252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2126
2127 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2128 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2129 code from reset_lwp_ptrace_options_callback.
2130
00192f77
SM
21312017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2132
2133 * linux-arm-low.c (struct update_registers_data): Remove.
2134 (update_registers_callback): Return void, take arguments
2135 directly, don't check thread's pid.
2136 (arm_insert_point, arm_remove_point): Use for_each_thread.
2137
2bee2b6c
SM
21382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2139
2140 * win32-low.c (continue_one_thread): Return void, take argument
2141 directly.
2142 (child_continue): Use for_each_thread.
2143
0b360f19
SM
21442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2145
2146 * win32-i386-low.c (update_debug_registers_callback): Rename
2147 to ...
2148 (update_debug_registers): ... this, return void, remove pid_p arg.
2149 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2150
f27866ba
SM
21512017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2152
2153 * inferiors.h (struct process_info): Add constructor, initialize
2154 fields..
2155 <syscalls_to_catch>: Change type to std::vector<int>.
2156 * inferiors.c (add_process): Allocate process_info with new.
2157 (remove_process): Free process_info with delete.
2158 * linux-low.c (handle_extended_wait): Adjust.
2159 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2160 * server.c (handle_general_set): Adjust.
2161
e849ea89
PA
21622017-11-16 Pedro Alves <palves@redhat.com>
2163
2164 * remote-utils.c (remote_close): Block SIGIO signals instead of
2165 uninstalling the SIGIO handler.
2166
1d0aa65c
AH
21672017-11-16 Alan Hayward <alan.hayward@arm.com>
2168
2169 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2170
3491a34c
YQ
21712017-11-16 Yao Qi <yao.qi@linaro.org>
2172
2173 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2174 (tic6x_store_gregset): Likewise.
2175 (tic6x_usrregs_info): Move it up.
2176
a602f924
AH
21772017-11-15 Alan Hayward <alan.hayward@arm.com>
2178
2179 * Makefile.in: Update arch rules.
2180 * configure.srv: Explicitly mark arch/ files.
2181
5616b6c3
AS
21822017-11-13 Andreas Schwab <schwab@suse.de>
2183
2184 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2185 function.
2186 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2187
d1928160
PA
21882017-11-06 Pedro Alves <palves@redhat.com>
2189
2190 * config.in, configure: Regenerate.
2191
bac608e7
SM
21922017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2193
2194 * target.c (struct thread_search): Remove.
2195 (thread_search_callback): Remove.
2196 (prepare_to_access_memory): Use for_each_thread instead of
2197 find_inferior. Inline code from thread_search_callback.
2198
eaddb425
SM
21992017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2200
2201 * server.c (struct visit_actioned_threads_data): Remove.
2202 (visit_actioned_threads): Change prototype to take arguments
2203 directly.
2204 (resume): Use find_thread instead of find_inferior.
2205
99078d34
SM
22062017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2207
2208 * server.c (queue_stop_reply_callback): Change prototype, return
2209 void.
2210 (find_status_pending_thread_callback): Remove.
2211 (handle_status): Replace find_inferior with find_thread and
2212 for_each_thread.
2213
cc628f3d
AH
22142017-10-25 Alan Hayward <alan.hayward@arm.com>
2215
2216 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2217 with REGNO.
2218 (aarch64_store_gregset): Likewise.
2219 (aarch64_fill_fpregset): Likewise.
2220 (aarch64_store_fpregset): Likewise.
2221
4d3bb80e
SM
22222017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2223
2224 * gdbthread.h (find_thread, for_each_thread): New functions.
2225 * inferiors.c (thread_of_pid): Remove.
2226 (find_any_thread_of_pid): Use find_thread.
2227 * linux-low.c (num_lwps): Use for_each_thread.
2228
7a7cdfa0
YQ
22292017-10-17 Yao Qi <yao.qi@linaro.org>
2230
2231 * Makefile.in: Remove one rule.
2232 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2233
e675d170
YQ
22342017-10-17 Yao Qi <yao.qi@linaro.org>
2235
2236 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2237 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2238
7eb4e0f9
YQ
22392017-10-17 Yao Qi <yao.qi@linaro.org>
2240
2241 * configure.srv: Rename arm.o with arch/arm.o.
2242
60d6cfc9
YQ
22432017-10-17 Yao Qi <yao.qi@linaro.org>
2244
2245 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2246 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2247 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2248 (arch-i386.o, arch-amd64.o): Remove rules.
2249 (arch/%.o): New rule.
2250 Update POSTCOMPILE and COMPILE.pre.
2251 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2252 * configure: Re-generated.
2253 * configure.srv: Replace arch-i386.o with arch/i386.o.
2254 Replace arch-amd64.o with arch/amd64.o.
2255
5bfda255
YQ
22562017-10-16 Yao Qi <yao.qi@linaro.org>
2257
2258 * configure: Regenerated.
2259
9c80ecd6
SM
22602017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2261
2262 * inferiors.h: (struct inferior_list): Remove.
2263 (struct inferior_list_entry); Remove.
2264 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2265 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2266 get_first_inferior): Remove.
2267 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2268 find_inferior_id, find_inferior_in_random): Change signature.
2269 * inferiors.c (all_threads): Change type to
2270 std::list<thread_info *>.
2271 (get_thread): Remove macro.
2272 (find_inferior, find_inferior_id): Change signature, implement
2273 using find_thread.
2274 (find_inferior_in_random): Change signature, implement using
2275 find_thread_in_random.
2276 (for_each_inferior, for_each_inferior_with_data): Change
2277 signature, implement using for_each_thread.
2278 (add_inferior_to_list, remove_inferior): Remove.
2279 (add_thread, get_first_thread, thread_of_pid,
2280 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2281 (get_first_inferior, one_inferior_p, clear_inferior_list):
2282 Remove.
2283 (clear_inferiors, get_thread_process): Update.
2284 * gdbthread.h: Include <list>.
2285 (struct thread_info) <entry>: Remove field.
2286 <id>: New field.
2287 (all_threads): Change type to std::list<thread_info *>.
2288 (get_first_inferior): Add doc.
2289 (find_thread, for_each_thread, find_thread_in_random): New
2290 functions.
2291 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2292 * linux-arm-low.c (update_registers_callback): Update.
2293 * linux-low.c (second_thread_of_pid_p): Update.
2294 (kill_one_lwp_callback, linux_detach_lwp_callback,
2295 delete_lwp_callback, status_pending_p_callback, same_lwp,
2296 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2297 iterate_over_lwps, not_stopped_callback,
2298 resume_stopped_resumed_lwps, count_events_callback,
2299 select_singlestep_lwp_callback, select_event_lwp_callback,
2300 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2301 suspend_and_send_sigstop_callback, wait_for_sigstop,
2302 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2303 lwp_running, linux_set_resume_request, resume_status_pending_p,
2304 need_step_over_p, start_step_over, linux_resume_one_thread,
2305 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2306 reset_lwp_ptrace_options_callback): Update.
2307 * linux-mips-low.c (update_watch_registers_callback): Update.
2308 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2309 Update.
2310 (free_register_cache_thread_one): Remove.
2311 (regcache_release): Update.
2312 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2313 handle_qxfer_threads_worker): Update.
2314 (handle_query): Update, use list iterator.
2315 (visit_actioned_threads, handle_pending_status,
2316 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2317 clear_pending_status_callback, set_pending_status_callback,
2318 find_status_pending_thread_callback, handle_status,
2319 process_serial_event): Update.
2320 * target.c (thread_search_callback): Update.
2321 * thread-db.c (thread_db_get_tls_address): Update.
2322 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2323 Update.
2324 * win32-i386-low.c (update_debug_registers_callback): Update.
2325 * win32-low.c (delete_thread_info, child_delete_thread,
2326 continue_one_thread, suspend_one_thread,
2327 get_child_debug_event): Adjust.
2328
9179355e
SM
23292017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2330
2331 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2332 * inferiors.h: Include <list>.
2333 (struct process_info) <entry>: Remove field.
2334 <pid>: New field.
2335 (pid_of): Change macro to function.
2336 (ptid_of, lwpid_of): Remove macro.
2337 (all_processes): Change type to std::list<process_info *>.
2338 (ALL_PROCESSES): Remove macro.
2339 (for_each_process, find_process): New function.
2340 * inferiors.c (all_processes): Change type to
2341 std::list<process_info *>.
2342 (find_thread_process): Adjust.
2343 (add_process): Likewise.
2344 (remove_process): Likewise.
2345 (find_process_pid): Likewise.
2346 (get_first_process): Likewise.
2347 (started_inferior_callback): Remove.
2348 (have_started_inferiors_p): Adjust.
2349 (attached_inferior_callback): Remove.
2350 (have_attached_inferiors_p): Adjust.
2351 * linux-low.c (check_zombie_leaders): Likewise.
2352 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2353 (x86_linux_update_xmltarget): Adjust.
2354 * server.c (handle_query): Likewise.
2355 (gdb_reattached_process): Remove.
2356 (handle_status): Adjust.
2357 (kill_inferior_callback): Likewise.
2358 (detach_or_kill_inferior): Remove.
2359 (print_started_pid): Likewise.
2360 (print_attached_pid): Likewise.
2361 (detach_or_kill_for_exit): Update.
2362 (process_serial_event): Likewise.
2363 * linux-arm-low.c (arm_new_fork): Likewise.
2364
c9cb8905
SM
23652017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2366
2367 * dll.h: Include <list>.
2368 (struct dll_info): Add constructor.
2369 <entry>: Remove field.
2370 (all_dlls): Change type to std::list<dll_info>.
2371 * dll.c: Include <algorithm>.
2372 (get_dll): Remove macro.
2373 (all_dlls): Change type to std::list<dll_info *>.
2374 (free_one_dll): Remove.
2375 (match_dll): Likewise.
2376 (loaded_dll): Adjust.
2377 (unloaded_dll): Adjust to all_dlls type change, use
2378 std::find_if. Inline code from match_dll.
2379 (clear_dlls): Adjust to all_dlls type change.
2380 * server.c (emit_dll_description): Remove.
2381 (handle_qxfer_libraries): Adjust to all_dlls type change,
2382 integrate emit_dll_description's functionality.
2383
04ec7890
SM
23842017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2385
2386 * linux-low.h (struct linux_target_ops) <delete_process>: New
2387 field.
2388 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2389 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2390 (struct linux_target_ops): Add delete_process callback.
2391 * linux-arm-low.c (arm_delete_process): New.
2392 (struct linux_target_ops): Add delete_process callback.
2393 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2394 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2395 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2396 * linux-mips-low.c (mips_linux_delete_process): New.
2397 (struct linux_target_ops): Add delete_process callback.
2398 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2399 * linux-s390-low.c (struct linux_target_ops): Likewise.
2400 * linux-sh-low.c (struct linux_target_ops): Likewise.
2401 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2402 * linux-tile-low.c (struct linux_target_ops): Likewise.
2403 * linux-x86-low.c (x86_linux_delete_process): New.
2404 (struct linux_target_ops): Add delete_process callback.
2405 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2406
466eecee
SM
24072017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2408
2409 * linux-aarch64-low.c (the_low_target): Add thread delete
2410 callback.
2411 * linux-arm-low.c (arm_delete_thread): New function.
2412 (the_low_target): Add thread delete callback.
2413 * linux-bfin-low.c (the_low_target): Likewise.
2414 * linux-crisv32-low.c (the_low_target): Likewise.
2415 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2416 set.
2417 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2418 field.
2419 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2420 * linux-mips-low.c (mips_linux_delete_thread): New function.
2421 (the_low_target): Add thread delete callback.
2422 * linux-ppc-low.c (the_low_target): Likewise.
2423 * linux-s390-low.c (the_low_target): Likewise.
2424 * linux-sh-low.c (the_low_target): Likewise.
2425 * linux-tic6x-low.c (the_low_target): Likewise.
2426 * linux-tile-low.c (the_low_target): Likewise.
2427 * linux-x86-low.c (the_low_target): Likewise.
2428 * linux-xtensa-low.c (the_low_target): Likewise.
2429
b79f7801
YZ
24302017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2431
2432 * win32-low.c: Include "common-inferior.h".
2433
bc3b087d
SDJ
24342017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2435
2436 * inferiors.c (set_inferior_cwd): New function.
2437 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2438 (handle_query): Inform that QSetWorkingDir is supported.
2439 * win32-low.c (create_process): Pass the inferior's cwd to
2440 CreateProcess.
2441
d092c5a2
SDJ
24422017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2443
2444 * inferiors.c (current_inferior_cwd): New global variable.
2445 (get_inferior_cwd): New function.
2446 * inferiors.h (struct process_info) <cwd>: New field.
2447
7da0a886
SDJ
24482017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2449
2450 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2451 (OBS): Add gdb_tilde_expand.o.
2452
289a6840
SM
24532017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2454
2455 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2456 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2457
256642e8
PA
24582017-09-29 Pedro Alves <palves@redhat.com>
2459
2460 * ax.c (gdb_parse_agent_expr): Constify.
2461 * ax.h (gdb_parse_agent_expr): Constify.
2462 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2463 Constify.
2464 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2465 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2466 * remote-utils.h (read_ptid): Constify.
2467 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2468 (process_point_options, process_serial_event): Constify.
2469 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2470 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2471 (cmd_qtbuffer): Constify.
2472
5b9ca4d4
PA
24732017-09-29 Pedro Alves <palves@redhat.com>
2474
2475 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2476 fails.
2477
94c207e0
PA
24782017-09-29 Pedro Alves <palves@redhat.com>
2479
2480 * linux-low.c (handle_extended_wait): Pass parent thread instead
2481 of process to thread_db_notice_clone.
2482 * linux-low.h (thread_db_notice_clone): Replace parent process
2483 parameter with parent thread parameter.
2484 * thread-db.c (find_one_thread): Add comment.
2485 (thread_db_notice_clone): Replace parent process parameter with
2486 parent thread parameter. Temporarily switch to the parent thread.
2487
75352e28
SDJ
24882017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2489
2490 * gdbthread.h: Include "common-gdbthread.h".
2491 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2492 "if" when validating the ptid.
2493 * remote-utils.c: Include "gdbthread.h".
2494 (prepare_resume_reply): Use "switch_to_thread".
2495 * target.c (done_accessing_memory): Likewise.
2496
ad339634
AA
24972017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2498
2499 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2500 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2501 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2502 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2503 s390x-gs-linux64-ipa.o to ipa_obj.
2504 * linux-s390-low.c (HWCAP_S390_GS): New define.
2505 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2506 New functions.
2507 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2508 (s390_arch_setup): Check for guarded-storage support and choose
2509 appropriate tdesc.
2510 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2511 init_registers_s390x_gs_linux64.
2512 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2513 enum value.
2514 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2515 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2516
cc4d742f
SM
25172017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2518
2519 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2520
f6327dcb
KB
25212017-09-21 Kevin Buettner <kevinb@redhat.com>
2522
2523 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2524 (thread_db_thread_handle): Declare.
2525 * linux-low.c (linux_target_ops): Initialize thread_handle.
2526 * server.c (handle_qxfer_threads_worker): Add support for
2527 "handle" attribute.
2528 * target.h (struct target_ops): Add new function pointer,
2529 thread_handle.
2530 (target_thread_handle): Define.
2531 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2532 field in lwp.
2533 (thread_db_thread_handle): New function.
2534
86299109
KB
25352017-09-21 Kevin Buettner <kevinb@redhat.com>
2536
2537 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2538 * linux-low.h (thread_db_notice_clone): Declare.
2539 * thread-db.c (thread_db_notice_clone): New function.
2540
f557a88a
PA
25412017-09-21 Pedro Alves <palves@redhat.com>
2542
2543 * server.c (gdb_read_memory, handle_status, process_serial_event)
2544 (handle_serial_event, handle_target_event): Adjust to
2545 set_desired_thread prototype change.
2546 * target.c (set_desired_thread): Remove 'use_general' parameter
2547 and adjust.
2548 * target.h (set_desired_thread): Remove 'use_general' parameter.
2549
223ffa71
TT
25502017-09-20 Tom Tromey <tom@tromey.com>
2551
2552 * target.c (target_terminal::terminal_state): Define.
2553 (target_terminal::init): Rename from target_terminal_init.
2554 (target_terminal::inferior): Rename from
2555 target_terminal_inferior.
2556 (target_terminal::ours): Rename from target_terminal_ours.
2557 (target_terminal::ours_for_output, target_terminal::info): New.
2558
04fd3ba9
SM
25592017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2560
2561 * server.c (accumulate_file_name_length): Remove.
2562 (emit_dll_description): Adjust to std::string change.
2563 (handle_qxfer_libraries): Use std::string to hold document.
2564
5e187554
SM
25652017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2566
2567 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2568 return type of xml_escape_text.
2569 * server.c (emit_dll_description): Likewise.
2570
1526853e
SM
25712017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2572
2573 * server.c (captured_main): Accept argument for --selftest.
2574 Update run_tests call.
2575 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2576 when registering selftests.
2577
c4dfafab
SDJ
25782017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2579
2580 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2581 instead of "VEC" for "target_desc.reg_defs".
2582 (regcache_cpy): Likewise.
2583 (registers_to_string): Likewise.
2584 (registers_from_string): Likewise.
2585 (find_regno): Likewise.
2586 (supply_regblock): Likewise.
2587 (regcache_raw_read_unsigned): Likewise.
2588 * tdesc.c (init_target_desc): Likewise.
2589 (tdesc_create_reg): Likewise.
2590 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2591 (struct target_desc) <reg_defs>: Convert to "std::vector".
2592 (target_desc): Do not initialize "reg_defs".
2593 (~target_desc): Update code to use "std::vector" instead of "VEC"
2594 for "target_desc.reg_defs".
2595 (operator==): Likewise.
2596
124aceb4
SM
25972017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2598
2599 * inferiors.h (thread_to_gdb_id): Remove.
2600 * inferiors.c (thread_to_gdb_id): Remove.
2601 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2602 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2603 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2604 Likewise.
2605 * nto-low.c (nto_fetch_registers, nto_store_registers,
2606 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2607
96cde54f
SM
26082017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2609
2610 * inferiors.h (gdb_id_to_thread_id): Remove.
2611 * inferiors.c (gdb_id_to_thread_id): Remove.
2612 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2613 removal. Move pid declaration closer to where it's used.
2614
e8ca139e
SM
26152017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2616
2617 * server.c (handle_detach): New function.
2618 (process_serial_event): Move code out, call handle_detach.
2619
f8a4e119
SM
26202017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2621
2622 * server.c (require_running): Rename to ...
2623 (require_running_or_return): ... this ...
2624 (require_running_or_break): ... and this.
2625 (handle_query, process_serial_event): Adjust.
2626
0eb0a407
SM
26272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2628
2629 * linux-low.c (linux_set_resume_request): Remove unused
2630 variables.
2631
785922a5
SM
26322017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2633
2634 * server.c (first_thread_of): Remove.
2635 (process_serial_event): Replace usage of first_thread_of with
2636 find_any_thread_of_pid.
2637 * tracepoint.c (same_process_p): Remove.
2638 (gdb_agent_about_to_close): Replace usage of same_process_p with
2639 find_any_thread_of_pid.
2640 * linux-x86-low.c (same_process_callback): Remove.
2641 (x86_arch_setup_process_callback): Replace usage of
2642 same_process_callback with find_any_thread_of_pid.
2643 * thread-db.c (any_thread_of): Remove.
2644 (switch_to_process): Replace usage of any_thread_of with
2645 find_any_thread_of_pid.
2646 * inferiors.c (thread_pid_matches_callback): Remove.
2647 (find_thread_process): Adjust to use find_any_thread_of_pid.
2648
a059f00c
SDJ
26492017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2650
2651 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2652 with "!VEC_empty".
a059f00c 2653
cc397f3a
SDJ
26542017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2655
2656 * linux-low.c (handle_extended_wait): Use
2657 "allocate_target_description" instead of "XNEW".
2658 * linux-x86-low.c (initialize_low_arch): Likewise.
2659
22916b07
YQ
26602017-09-05 Yao Qi <yao.qi@linaro.org>
2661
2662 * configure.srv (srv_i386_regobj): Remove.
2663 (srv_amd64_regobj): Remove.
2664 (srv_regobj): Set it to "" for x86 non-linux targets.
2665 * linux-x86-tdesc.c (i386_linux_read_description):
2666 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2667 (init_registers_i386): Remove the declaration.
2668 (tdesc_i386): Remove the declaration.
2669 (lynx_i386_arch_setup): Call i386_create_target_description.
2670 * nto-x86-low.c: Likewise.
2671 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2672 [!__x86_64__]: include arch/i386.h.
2673 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2674
38602d55
YQ
26752017-09-05 Yao Qi <yao.qi@linaro.org>
2676
2677 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2678 i386/amd64-XXX-linux from it.
2679
44b886ff
YQ
26802017-09-05 Yao Qi <yao.qi@linaro.org>
2681
2682 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2683 false.
2684 (ipa_amd64_linux_regobj): Remove.
2685 (ipa_x32_linux_regobj): Remove.
2686
b4570e4b
YQ
26872017-09-05 Yao Qi <yao.qi@linaro.org>
2688
2689 * Makefile.in (arch-amd64.o): New rule.
2690 * configure.srv: Append arch-amd64.o.
2691 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2692 (get_ipa_tdesc): Call amd64_linux_read_description.
2693 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2694 and init_registers_amd64_XXX.
2695 * linux-x86-low.c (x86_linux_read_description): Call
2696 amd64_linux_read_description.
2697 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2698 (initialize_low_arch): Don't call init_registers_x32_XXX and
2699 init_registers_amd64_XXX.
2700 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2701 and tdesc_amd64_XXX.
2702 [__x86_64__] (amd64_tdesc_test): New function.
2703 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2704 and init_registers_amd64_XXX.
2705 * linux-x86-tdesc.c: Include arch/amd64.h.
2706 (xcr0_to_tdesc_idx): New function.
2707 (i386_linux_read_description): New function.
2708 (amd64_get_ipa_tdesc_idx): New function.
2709 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2710 (amd64_get_ipa_tdesc): Declare.
2711
d1f28ea2
YQ
27122017-09-05 Yao Qi <yao.qi@linaro.org>
2713
2714 * configure.srv (srv_i386_linux_xmlfiles): Remove
2715 i386/i386-XXX-linux.xml from it.
2716
25a93583
YQ
27172017-09-05 Yao Qi <yao.qi@linaro.org>
2718
2719 * configure.srv: Set srv_i386_linux_regobj empty if $development
2720 is false.
2721 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2722 initialize_low_tdesc.
2723 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2724 with #if initialize_low_tdesc.
2725 * linux-x86-tdesc-selftest.c: New file.
2726 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2727
5f035c07
YQ
27282017-09-05 Yao Qi <yao.qi@linaro.org>
2729
2730 * Makefile.in (arch-i386.o): New rule.
2731 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2732 (x86_64-*-linux*): Likewise.
2733 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2734 include arch/i386.h.
2735 (i386_linux_read_description): Remove code and call
2736 i386_create_target_description.
2737 * tdesc.c (allocate_target_description): New function.
2738 * tdesc.h (set_tdesc_architecture): Remove declaration.
2739 (set_tdesc_osabi): Likewise.
2740
0abe8a89
YQ
27412017-09-05 Yao Qi <yao.qi@linaro.org>
2742
2743 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2744 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2745 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2746 .xmltarget.
2747 * server.c (get_features_xml): Call tdesc_get_features_xml.
2748 * tdesc.c (set_tdesc_architecture): New function.
2749 (set_tdesc_osabi): New function.
2750 (tdesc_get_features_xml): New function.
2751 (tdesc_create_feature): Add an argument.
2752 * tdesc.h (struct target_desc) <features>: New field.
2753 <arch, osabi>: New field.
2754 (~target_desc): xfree features, arch, and osabi.
2755 (target_desc::oerator==): Don't compare .xmltarget.
2756 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2757 (set_tdesc_osabi): Likewise.
2758 (tdesc_get_features_xml): Likewise.
2759
0a188386
YQ
27602017-09-05 Yao Qi <yao.qi@linaro.org>
2761
2762 * linux-x86-tdesc.c: Include selftest.h.
2763 (i386_tdesc_test): New function.
2764 (initialize_low_tdesc): Call selftests::register_test.
2765 * tdesc.h: Include regdef.h.
2766 (target_desc): Override operator == and !=.
2767
f49ff000
YQ
27682017-09-05 Yao Qi <yao.qi@linaro.org>
2769
2770 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2771 (ipa_obj): Likewise.
2772 * linux-i386-ipa.c: Include common/x86-xstate.h
2773 (get_ipa_tdesc): Call i386_linux_read_description.
2774 (initialize_low_tracepoint): Don't call init_registers_XXX
2775 functions, call initialize_low_tdesc instead.
2776 * linux-x86-low.c (x86_linux_read_description): Call
2777 i386_linux_read_description.
2778 (initialize_low_arch): Don't call init_registers_i386_XXX
2779 functions, call initialize_low_tdesc.
2780 * linux-x86-tdesc.c: New file.
2781 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2782 (i386_get_ipa_tdesc_idx): Declare.
2783 (i386_get_ipa_tdesc): Declare.
2784 (initialize_low_tdesc): Declare.
2785
2b68ef2f
YQ
27862017-09-05 Yao Qi <yao.qi@linaro.org>
2787
2788 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2789 instead of 0.
2790
f7000548
YQ
27912017-09-05 Yao Qi <yao.qi@linaro.org>
2792
2793 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2794 * regcache.c (get_thread_regcache): Use VEC_length.
2795 (init_register_cache): Likewise.
2796 (regcache_cpy): Likewise.
2797 (registers_to_string): Iterate reg_defs via VEC_iterate.
2798 (find_regno): Likewise.
2799 (find_register_by_number): Use VEC_index.
2800 (register_size): Call find_register_by_number.
2801 (register_data): Call find_register_by_number.
2802 (supply_regblock): Use VEC_length.
2803 (regcache_raw_read_unsigned): Likewise.
2804 * tdesc.c (init_target_desc): Iterate reg_defs via
2805 VEC_iterate.
2806 (default_description): Update initializer.
2807 (copy_target_description): Don't update field num_registers.
2808 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2809 <num_registers>: Remove.
2810
50a421ac
SM
28112017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2812
2813 * Makefile.in (.SECONDARY): Define target.
2814
23fdd69e
SM
28152017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2816
2817 * linux-low.c (linux_wait_1): Adjust.
2818 * server.c (queue_stop_reply_callback): Adjust.
2819
0a2dde4a
SDJ
28202017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2821
2822 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2823 QEnvironmentUnset and QEnvironmentReset packets.
2824 (handle_query): Inform remote that QEnvironmentHexEncoded,
2825 QEnvironmentUnset and QEnvironmentReset are supported.
2826
6afd337d
SM
28272017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2828
2829 * inferiors.h (inferior_target_data): Rename to ...
2830 (thread_target_data): ... this.
2831 (inferior_regcache_data): Rename to ...
2832 (thread_regcache_data): ... this.
2833 (set_inferior_regcache_data): Rename to ...
2834 (set_thread_regcache_data): ... this.
2835 * inferiors.c (inferior_target_data): Rename to ...
2836 (thread_target_data): ... this.
2837 (inferior_regcache_data): Rename to ...
2838 (thread_regcache_data): ... this.
2839 (set_inferior_regcache_data): Rename to ...
2840 (set_thread_regcache_data): ... this.
2841 (free_one_thread): Update.
2842 * linux-low.h (get_thread_lwp): Update.
2843 * regcache.c (get_thread_regcache): Update.
2844 (regcache_invalidate_thread): Update.
2845 (free_register_cache_thread): Update.
2846 * win32-i386-low.c (update_debug_registers_callback): Update.
2847 (win32_get_current_dr): Update.
2848 * win32-low.c (thread_rec): Update.
2849 (delete_thread_info): Update.
2850 (continue_one_thread): Update.
2851 (suspend_one_thread): Update.
2852
a160cc46
SM
28532017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2854
2855 * inferiors.c (set_inferior_target_data): Remove.
2856 * inferiors.h (set_inferior_target_data): Remove.
2857
6d580b63
YQ
28582017-08-18 Yao Qi <yao.qi@linaro.org>
2859
2860 * Makefile.in (OBS): Add selftest.o.
2861 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2862 * configure, config.in: Re-generated.
2863 * server.c: Include common/sefltest.h.
2864 (captured_main): Handle option --selftest.
2865
f5a29eb0
YQ
28662017-08-09 Yao Qi <yao.qi@linaro.org>
2867
2868 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2869 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2870 i386-avx-mpx.o and i386-mmx.o.
2871 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2872 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2873 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2874 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2875 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2876 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2877 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2878 i386/amd64-avx-mpx.xml.
2879
57757c2f
YQ
28802017-08-09 Yao Qi <yao.qi@linaro.org>
2881
2882 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2883 and x32-avx-avx512.o.
2884 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2885 i386/x32-avx-avx512.xml.
2886
229d26fc
SM
28872017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2888
2889 * tracepoint.h (enum class fast_tpoint_collect_result): New
2890 enumeration.
2891 (fast_tracepoint_collecting): Change return type to
2892 fast_tpoint_collect_result.
2893 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2894 * linux-low.h: Include tracepoint.h.
2895 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2896 fast_tpoint_collect_result.
2897 * linux-low.c (handle_tracepoints): Adjust.
2898 (linux_fast_tracepoint_collecting): Change return type to
2899 fast_tpoint_collect_result.
2900 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2901 linux_wait_1, stuck_in_jump_pad_callback,
2902 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2903 proceed_one_lwp): Adjust to type change.
2904
2e1e43e1
YQ
29052017-07-10 Yao Qi <yao.qi@linaro.org>
2906
2907 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2908
adc764e7
YQ
29092017-06-29 Yao Qi <yao.qi@linaro.org>
2910
2911 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2912 Remove.
2913 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2914
a206891a
SM
29152017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2916
2917 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2918
9a6c7d9c
SDJ
29192017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2920
2921 * linux-low.c (linux_create_inferior): Adjust code to access the
2922 environment information via 'gdb_environ' class.
2923 * lynx-low.c (lynx_create_inferior): Likewise.
2924 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2925 (get_environ): Return a pointer to 'our_environ'.
2926 (captured_main): Initialize 'our_environ'.
2927 * server.h (get_environ): Adjust prototype.
2928 * spu-low.c (spu_create_inferior): Adjust code to access the
2929 environment information via 'gdb_environ' class.
2930
ae3e2ccf
SM
29312017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2932
2933 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2934 usage of "register" keyword.
2935
3e019bdc
SM
29362017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2937
2938 * configure: Re-generate.
2939
8465943a
SM
29402017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2941
2942 * configure: Re-generate.
2943
cf0dd6f0
SM
29442017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2945
2946 * Makefile.in (COMPILE.pre): Add "-x c++".
2947
9845682b
SDJ
29482017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2949
2950 * fork-child.c: Conditionally include <signal.h>.
2951
aefd8b33
SDJ
29522017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2953
2954 * server.c (handle_general_set): Handle new packet
2955 "QStartupWithShell".
2956 (handle_query): Add "QStartupWithShell" to the list of supported
2957 packets.
2958 (gdbserver_usage): Add help text explaining the
2959 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2960 options.
2961 (captured_main): Recognize and act upon the presence of the new
2962 CLI options.
2963
2090129c
SDJ
29642017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2965 Pedro Alves <palves@redhat.com>
2966
2967 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2968 * configure: Regenerate.
2969 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2970 "fork-inferior.o".
2971 (i[34567]86-*-lynxos*): Likewise.
2972 (spu*-*-*): Likewise.
2973 * fork-child.c: New file.
2974 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2975 and "environ.h".
2976 (linux_ptrace_fun): New function.
2977 (linux_create_inferior): Adjust function prototype to reflect
2978 change on "target.h". Adjust function code to use
2979 "fork_inferior".
2980 (linux_request_interrupt): Delete "signal_pid".
2981 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2982 (lynx_ptrace_fun): New function.
2983 (lynx_create_inferior): Adjust function prototype to reflect
2984 change on "target.h". Adjust function code to use
2985 "fork_inferior".
2986 * nto-low.c (nto_create_inferior): Adjust function prototype and
2987 code to reflect change on "target.h". Update comments.
2988 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2989 "common-terminal.h" and "environ.h".
2990 (terminal_fd): Moved to fork-child.c.
2991 (old_foreground_pgrp): Likewise.
2992 (restore_old_foreground_pgrp): Likewise.
2993 (last_status): Make it global.
2994 (last_ptid): Likewise.
2995 (our_environ): New variable.
2996 (startup_with_shell): Likewise.
2997 (program_name): Likewise.
2998 (program_argv): Rename to...
2999 (program_args): ...this.
3000 (wrapper_argv): New variable.
3001 (start_inferior): Delete function.
3002 (get_exec_wrapper): New function.
3003 (get_exec_file): Likewise.
3004 (get_environ): Likewise.
3005 (prefork_hook): Likewise.
3006 (post_fork_inferior): Likewise.
3007 (postfork_hook): Likewise.
3008 (postfork_child_hook): Likewise.
3009 (handle_v_run): Update code to deal with arguments coming from the
3010 remote host. Update calls from "start_inferior" to
3011 "create_inferior".
3012 (captured_main): Likewise. Initialize environment variable. Call
3013 "have_job_control".
3014 * server.h (post_fork_inferior): New prototype.
3015 (get_environ): Likewise.
3016 (last_status): Declare.
3017 (last_ptid): Likewise.
3018 (signal_pid): Likewise.
3019 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3020 (spu_ptrace_fun): New function.
3021 (spu_create_inferior): Adjust function prototype to reflect change
3022 on "target.h". Adjust function code to use "fork_inferior".
3023 * target.c (target_terminal_init): New function.
3024 (target_terminal_inferior): Likewise.
3025 (target_terminal_ours): Likewise.
3026 * target.h: Include <vector>.
3027 (struct target_ops) <create_inferior>: Update prototype.
3028 (create_inferior): Update macro.
3029 * utils.c (gdb_flush_out_err): New function.
3030 * win32-low.c (win32_create_inferior): Adjust function prototype
3031 and code to reflect change on "target.h".
3032
043a4934
SDJ
30332017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3034
3035 * inferiors.c (switch_to_thread): New function.
3036
15652511
SDJ
30372017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3038
3039 * Makefile.in (SFILE): Add "common/job-control.c".
3040 (OBS): Add "job-control.o".
3041
21ea5acd
SDJ
30422017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3043
3044 * Makefile: Remove "@host_makefile_frag@".
3045
e13cb306
PA
30462017-05-05 Pedro Alves <palves@redhat.com>
3047
3048 * configure: Regenerate.
3049
c94fee56
SDJ
30502017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3051
3052 * configure: Regenerate.
3053
a0ff9e1a
SM
30542017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3055
3056 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3057 software_single_step change of return type to
3058 std::vector<CORE_ADDR>.
3059 * linux-low.c (install_software_single_step_breakpoints):
3060 Likewise.
3061 * linux-low.h (install_software_single_step_breakpoints):
3062 Likewise.
3063
be628ab8
SDJ
30642017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3065
3066 * remote-utils.c: Include "gdb_termios.h" instead of
3067 "terminal.h".
3068 * terminal.h: Delete file.
3069
7c5ded6a
SDJ
30702017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3071
3072 * server.c: Include <vector>.
3073 <program_argv, wrapper_argv>: Convert to std::vector.
3074 (start_inferior): Rewrite function to use C++.
3075 (handle_v_run): Likewise. Update code that calculates the argv
3076 based on the vRun packet; use C++.
3077 (captured_main): Likewise.
3078
436252de
SM
30792017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3080
3081 * server.c (handle_v_cont): Initialize thread_resume::thread
3082 with null_ptid.
3083
9bf2a700
PA
30842017-04-05 Pedro Alves <palves@redhat.com>
3085
3086 * configure: Regenerate.
3087
a121b7c1
PA
30882017-04-05 Pedro Alves <palves@redhat.com>
3089
3090 * gdbreplay.c (sync_error): Constify.
3091 * linux-x86-low.c (push_opcode): Constify.
3092
21c8a587
PA
30932017-04-05 Pedro Alves <palves@redhat.com>
3094
3095 * win32-low.c (get_child_debug_event)
3096 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3097 Report TARGET_WAITKIND_SPURIOUS instead.
3098
fb32b4f7
PA
30992017-04-05 Pedro Alves <palves@redhat.com>
3100
e79be6e5
SM
3101 * remote-utils.c (remote_prepare, remote_open): Constify.
3102 * remote-utils.h (remote_prepare, remote_open): Constify.
3103 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3104
65dd1e59
SM
31052017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3106
3107 * Makefile.in (clean): Clear .deps.
3108
8fa5b777
SM
31092017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3110
3111 * .gitignore: Remove generated files, replace with wildcard.
3112 * (clean): Replace removal of generated files with wildcard.
3113 (version.c): Replace with...
3114 (version-generated.c): ...this.
3115 (xml-builtin.c): Replace with...
3116 (xml-builtin-generated.c): ...this.
3117 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3118 (%.c: *regformats*): Replace with...
3119 (%-generated.c: *regformats*): ...this.
3120
a12e714b
MF
31212017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3122
3123 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3124 (xtensa_fill_gregset): Call collect_register_by_name for
3125 threadptr register.
3126 (xtensa_store_gregset): Call supply_register_by_name for
3127 threadptr register.
3128
1a09b50a
MF
31292017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3130
3131 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3132 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3133 (xtensa_store_gregset): Call supply_register for all registers in
3134 a0_regnum..a0_regnum + C0_NREGS range.
3135
1a01e7c6
SM
31362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3137
3138 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3139 (ax-ipa.o: ax.c): Remove.
3140 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3141 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3142 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3143 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3144 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3145
36bc18a8
SM
31462017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3147
3148 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3149 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3150 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3151 (errors-ipa.o: ../common/errors.c): Remove.
3152 (format-ipa.o: ../common/format.c): Remove.
3153 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3154
a8ebe3d5
SM
31552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3156
3157 * Makefile.in (%-ipa.o: %.c): New rule.
3158 (tracepoint-ipa.o: tracepoint.c): Remove.
3159 (utils-ipa.o: utils.c): Remove.
3160 (remote-utils-ipa.o: remote-utils.c): Remove.
3161 (regcache-ipa.o: regcache.c): Remove.
3162 (i386-linux-ipa.o: i386-linux.c): Remove.
3163 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3164 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3165 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3166 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3167 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3168 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3169 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3170 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3171 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3172 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3173 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3174 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3175 (aarch64-ipa.o: aarch64.c): Remove.
3176 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3177 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3178 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3179 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3180 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3181 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3182 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3183 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3184 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3185 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3186 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3187 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3188 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3189 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3190 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3191 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3192 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3193 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3194 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3195 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3196 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3197 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3198 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3199 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3200 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3201 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3202 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3203 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3204 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3205 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3206 (tdesc-ipa.o: tdesc.c): Remove.
3207 (x32-linux-ipa.o: x32-linux.c): Remove.
3208 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3209 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3210
50cfacb7
SM
32112017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3212
3213 * Makefile.in (%.o: ../arch/%.c): New rule.
3214 (arm.o: ../arch/arm.c): Remove.
3215 (arm-linux.o: ../arch/arm-linux.c): Remove.
3216 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3217 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3218
c5a22423
SM
32192017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3220
3221 * Makefile.in (%.o: ../nat/%.c): New rule.
3222 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3223 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3224 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3225 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3226 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3227 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3228 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3229 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3230 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3231 (linux-personality.o: ../nat/linux-personality.c): Remove.
3232 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3233 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3234 (x86-linux.o: ../nat/x86-linux.c): Remove.
3235 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3236 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3237
6bda016b
SM
32382017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3239
3240 * Makefile.in (%.o: ../common/%.c): New rule.
3241 (signals.o: ../common/signals.c): Remove.
3242 (print-utils.o: ../common/print-utils.c): Remove.
3243 (rsp-low.o: ../common/rsp-low.c): Remove.
3244 (common-utils.o: ../common/common-utils.c): Remove.
3245 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3246 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3247 (vec.o: ../common/vec.c): Remove.
3248 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3249 (xml-utils.o: ../common/xml-utils.c): Remove.
3250 (ptid.o: ../common/ptid.c): Remove.
3251 (buffer.o: ../common/buffer.c): Remove.
3252 (format.o: ../common/format.c): Remove.
3253 (filestuff.o: ../common/filestuff.c): Remove.
3254 (agent.o: ../common/agent.c): Remove.
3255 (errors.o: ../common/errors.c): Remove.
3256 (environ.o: ../common/environ.c): Remove.
3257 (common-debug.o: ../common/common-debug.c): Remove.
3258 (cleanups.o: ../common/cleanups.c): Remove.
3259 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3260 (fileio.o: ../common/fileio.c): Remove.
3261 (common-regcache.o: ../common/common-regcache.c): Remove.
3262 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3263 (new-op.o: ../common/new-op.c): Remove.
3264 (btrace-common.o: ../common/btrace-common.c): Remove.
3265
21122961
SM
32662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3267
3268 * Makefile.in (%.o: ../target/%.c): New rule.
3269 (waitstatus.o: ../target/waitstatus.c): Remove.
3270
c362e621
SM
32712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3272
3273 * Makefile.in
3274 (%.c: ../regformats/%.dat,
3275 (%.c: ../regformats/arm/%.dat,
3276 (%.c: ../regformats/i386/%.dat,
3277 (%.c: ../regformats/rs6000/%.dat): New rules.
3278 (aarch64.c): Remove.
3279 (reg-arm.c): Remove.
3280 (arm-with-iwmmxt.c): Remove.
3281 (arm-with-vfpv2.c): Remove.
3282 (arm-with-vfpv3.c): Remove.
3283 (arm-with-neon.c): Remove.
3284 (reg-bfin.c): Remove.
3285 (reg-cris.c): Remove.
3286 (reg-crisv32.c): Remove.
3287 (i386.c): Remove.
3288 (i386-linux.c): Remove.
3289 (i386-avx.c): Remove.
3290 (i386-avx-linux.c): Remove.
3291 (i386-avx-avx512.c): Remove.
3292 (i386-avx-avx512-linux.c): Remove.
3293 (i386-mpx.c): Remove.
3294 (i386-mpx-linux.c): Remove.
3295 (i386-avx-mpx-avx512-pku.c): Remove.
3296 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3297 (i386-avx-mpx.c): Remove.
3298 (i386-avx-mpx-linux.c): Remove.
3299 (i386-mmx.c): Remove.
3300 (i386-mmx-linux.c): Remove.
3301 (reg-ia64.c): Remove.
3302 (reg-m32r.c): Remove.
3303 (reg-m68k.c): Remove.
3304 (reg-cf.c): Remove.
3305 (mips-linux.c): Remove.
3306 (mips-dsp-linux.c): Remove.
3307 (mips64-linux.c): Remove.
3308 (mips64-dsp-linux.c): Remove.
3309 (nios2-linux.c): Remove.
3310 (powerpc-32.c): Remove.
3311 (powerpc-32l.c): Remove.
3312 (powerpc-altivec32l.c): Remove.
3313 (powerpc-cell32l.c): Remove.
3314 (powerpc-vsx32l.c): Remove.
3315 (powerpc-isa205-32l.c): Remove.
3316 (powerpc-isa205-altivec32l.c): Remove.
3317 (powerpc-isa205-vsx32l.c): Remove.
3318 (powerpc-e500l.c): Remove.
3319 (powerpc-64l.c): Remove.
3320 (powerpc-altivec64l.c): Remove.
3321 (powerpc-cell64l.c): Remove.
3322 (powerpc-vsx64l.c): Remove.
3323 (powerpc-isa205-64l.c): Remove.
3324 (powerpc-isa205-altivec64l.c): Remove.
3325 (powerpc-isa205-vsx64l.c): Remove.
3326 (s390-linux32.c): Remove.
3327 (s390-linux32v1.c): Remove.
3328 (s390-linux32v2.c): Remove.
3329 (s390-linux64.c): Remove.
3330 (s390-linux64v1.c): Remove.
3331 (s390-linux64v2.c): Remove.
3332 (s390-te-linux64.c): Remove.
3333 (s390-vx-linux64.c): Remove.
3334 (s390-tevx-linux64.c): Remove.
3335 (s390x-linux64.c): Remove.
3336 (s390x-linux64v1.c): Remove.
3337 (s390x-linux64v2.c): Remove.
3338 (s390x-te-linux64.c): Remove.
3339 (s390x-vx-linux64.c): Remove.
3340 (s390x-tevx-linux64.c): Remove.
3341 (tic6x-c64xp-linux.c): Remove.
3342 (tic6x-c64x-linux.c): Remove.
3343 (tic6x-c62x-linux.c): Remove.
3344 (reg-sh.c): Remove.
3345 (reg-sparc64.c): Remove.
3346 (reg-spu.c): Remove.
3347 (amd64.c): Remove.
3348 (amd64-linux.c): Remove.
3349 (amd64-avx.c): Remove.
3350 (amd64-avx-linux.c): Remove.
3351 (amd64-avx-avx512.c): Remove.
3352 (amd64-avx-avx512-linux.c): Remove.
3353 (amd64-mpx.c): Remove.
3354 (amd64-mpx-linux.c): Remove.
3355 (amd64-avx-mpx-avx512-pku.c): Remove.
3356 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3357 (amd64-avx-mpx.c): Remove.
3358 (amd64-avx-mpx-linux.c): Remove.
3359 (x32.c): Remove.
3360 (x32-linux.c): Remove.
3361 (x32-avx.c): Remove.
3362 (x32-avx-linux.c): Remove.
3363 (x32-avx-avx512.c): Remove.
3364 (x32-avx-avx512-linux.c): Remove.
3365 (reg-xtensa.c): Remove.
3366 (reg-tilegx.c): Remove.
3367 (reg-tilegx32.c): Remove.
3368
1672e0d9
SDJ
33692017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3370
3371 * Makefile.in (SFILES): Add "common/environ.c".
3372 (OBJS): Add "common/environ.h".
3373
239b6d10
WT
33742017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3375
3376 * configure.ac: Check if the fs_base and gs_base members of
3377 `struct user_regs_struct' exist.
3378 * config.in: Regenerated.
3379 * configure: Likewise.
3380
694b382c
AT
33812017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3382
3383 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3384 target_read_memory.
3385 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3386 (get_next_pcs_syscall_next_pc): Likewise.
3387
7dc53023
LM
33882016-12-23 Luis Machado <lgustavo@codesourcery.com>
3389
3390 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3391 * nto-x86-low.c: Likewise.
3392
ad02e4fe
SM
33932016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3394
3395 * Makefile.in: Include disable-implicit-rules.mk.
3396
dcb07cfa
PA
33972016-11-23 Pedro Alves <palves@redhat.com>
3398
3399 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3400 (debug_vprintf): Use std::chrono::steady_clock instead of
3401 gettimeofday. Use '.' instead of ':'.
3402 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3403 (get_timestamp): Use std::chrono::steady_clock instead of
3404 gettimeofday.
3405
8629c02c
SM
34062016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3407
3408 * Makefile.in: Fix whitespace formatting.
3409
b593ecca
SM
34102016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3411
3412 * Makefile.in (SFILES, OBS): Flatten list and order
3413 alphabetically.
3414
9986ba08
PA
34152016-11-23 Pedro Alves <palves@redhat.com>
3416
3417 * event-loop.c (handle_file_event): Use warning.
3418 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3419 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3420 Use warning.
3421
4eefa7bc
PA
34222016-11-23 Pedro Alves <palves@redhat.com>
3423
3424 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3425 output.
3426 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3427 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3428 debug_printf and debug_flush for debug output.
3429 * server.c (handle_general_set): Likewise.
3430 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3431 output.
3432
5443506e
SM
34332016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3434
3435 * Makefile.in (.c.o): Replace rule with ...
3436 (%.o: %.c): ... this one.
3437
3b165252
SM
34382016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3439
3440 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3441 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3442 make.
3443 * configure.ac: Remove checks for the make program.
3444 * configure: Re-generate.
3445
0bcda685
PA
34462016-10-28 Pedro Alves <palves@redhat.com>
3447
3448 * Makefile.in (CXX_DIALECT): Get from configure.
3449 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3450 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3451 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3452 * config.in: Regenerate.
3453 * configure: Regenerate.
3454
c3805894
YQ
34552016-10-27 Yao Qi <yao.qi@linaro.org>
3456
3457 * linux-low.c (linux_supports_range_stepping): Return true if
3458 can_software_single_step return true.
3459
89342618
YQ
34602016-10-27 Yao Qi <yao.qi@linaro.org>
3461
3462 * inferiors.c (find_inferior_in_random): New function.
3463 * inferiors.h (find_inferior_in_random): Declare.
3464 * linux-low.c (linux_wait_for_event_filtered): Call
3465 find_inferior_in_random instead of find_inferior.
3466
e3652c84
YQ
34672016-10-27 Yao Qi <yao.qi@linaro.org>
3468
3469 * linux-low.c (linux_wait_1): If single-step breakpoints are
3470 inserted, remove them.
3471
5a04c4cf
PA
34722016-10-26 Pedro Alves <palves@redhat.com>
3473
3474 * linux-low.c (handle_extended_wait): Link parent/child fork
3475 threads.
3476 (linux_wait_1): Unlink them.
3477 (linux_set_resume_request): Ignore resume requests for
3478 already-resumed and unhandled fork child threads.
3479 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3480 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3481 New functions.
3482 (handle_v_requests) <vCont>: Don't call require_running.
3483 * server.h (in_queued_stop_replies): New declaration.
3484
cb93dc7f
YQ
34852016-10-24 Yao Qi <yao.qi@linaro.org>
3486
3487 PR server/20733
3488 * linux-aarch64-low.c (append_insns): Cast the return value to
3489 'uint32_t *'.
3490
a1078bea
YQ
34912016-10-10 Yao Qi <yao.qi@linaro.org>
3492
3493 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3494
1fb77080
SDJ
34952016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3496
3497 * target.c (target_supports_multi_process): New function, moved
3498 from...
3499 * target.h (target_supports_multi_process): ... here. Remove
3500 macro.
3501
39b5a3b9
TT
35022016-10-05 Tom Tromey <tom@tromey.com>
3503
3504 PR remote/20655:
3505 * tracepoint.c (handle_tracepoint_bkpts): Check
3506 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3507
c1d0b70a
YQ
35082016-10-05 Yao Qi <yao.qi@linaro.org>
3509
3510 * configure.srv: Update the path of arm-*.xml files.
3511
0a69eedb
YQ
35122016-10-05 Terry Guo <terry.guo@arm.com>
3513 Yao Qi <yao.qi@linaro.org>
3514
3515 * Makefile.in: Adjust the path of rules.
3516 * configure.srv: Update the path of xml files.
3517 * regformats/arm-with-iwmmxt.dat: Regenerated.
3518 * regformats/arm-with-neon.dat: Likewise.
3519 * regformats/arm-with-vfpv2.dat: Likewise.
3520 * regformats/arm-with-vfpv3.dat Likewise.
3521
17e16485
YQ
35222016-09-30 Yao Qi <yao.qi@linaro.org>
3523
3524 PR gdbserver/20627
3525 * target.c (target_stop_and_wait): Don't call
3526 target_continue_no_signal, use resume_stop instead.
3527
edeeb602
YQ
35282016-09-26 Yao Qi <yao.qi@linaro.org>
3529
3530 * linux-low.c (linux_wait_1): Call debug_exit.
3531
503b1c39
PA
35322016-09-23 Pedro Alves <palves@redhat.com>
3533
3534 * Makefile.in (SFILES): Add common/new-op.c.
3535 (OBS): Add common/new-op.o.
3536 (new-op.o): New rule.
3537
74172ecf
SM
35382016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3539
3540 * .gitinore: Ignore more files.
3541
fc6cda2e
YQ
35422016-09-21 Yao Qi <yao.qi@linaro.org>
3543
3544 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3545 23.
3546
bc1e6c81
SDJ
35472016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3548
3549 * server.c (start_inferior): Call target_mourn_inferior instead of
3550 mourn_inferior; pass ptid_t argument to it.
3551 (resume): Likewise.
3552 (handle_target_event): Likewise.
3553 * target.c (target_mourn_inferior): New function.
3554 * target.h (mourn_inferior): Delete macro.
3555
0e00e962
AA
35562016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3557
3558 * linux-low.c (lwp_is_stepping): New function.
3559
1d8cb77d
CL
35602016-09-06 Carl Love <cel@us.ibm.com>
3561
3562 * server.c (start_inferior): Fixed comment, requested comment change
3563 didn't get updated correctly. Removed reference to ptrace () call as
3564 it is only true on Linux systems.
3565
7313bced
CL
35662016-09-06 Carl Love <cel@us.ibm.com>
3567
3568 * server.c (start_inferior): Do not call
3569 function target_post_create_inferior () if the
3570 inferior process has already exited.
3571
cf6de44d
PA
35722016-09-05 Pedro Alves <palves@redhat.com>
3573
3574 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3575 (COMPILE.pre, CC_LD): Use CXX directly.
3576 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3577 * acinclude.m4: Don't include build-with-cxx.m4.
3578 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3579 * configure: Regenerate.
3580
c1da6748
AT
35812016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3582
3583 PR gdb/19495
3584 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3585 call writing data to own_buf.
3586
f2b9e3df
SDJ
35872016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3588
3589 * target.c (mywait): Call target_wait instead of
3590 the_target->wait.
3591 (target_wait): New function.
3592
049a8570
SDJ
35932016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3594
3595 * server.c (start_inferior): New variable 'ptid'. Replace calls
3596 to the_target->resume by target_continue{,_no_signal}, depending
3597 on the case.
3598 * target.c (target_stop_and_wait): Call target_continue_no_signal
3599 instead of the_target->resume.
3600 (target_continue): New function.
3601
3aa5cfa0
AT
36022016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3603
3604 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3605
754653a7
AZ
36062016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3607
3608 PR server/20491
3609 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3610 ps_prochandle.
3611 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3612 * linux-arm-low.c (ps_get_thread_area): Likewise.
3613 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3614 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3615 * linux-mips-low.c (ps_get_thread_area): Likewise.
3616 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3617 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3618 * linux-x86-low.c (ps_get_thread_area): Likewise.
3619 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3620
ed036b40
PA
36212016-08-19 Pedro Alves <palves@redhat.com>
3622
3623 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3624
c8ef42ee
PA
36252016-08-19 Pedro Alves <palves@redhat.com>
3626
3627 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3628 comment. Use memcpy instead of casting through unsigned long.
3629
9c235a72
PA
36302016-08-19 Pedro Alves <palves@redhat.com>
3631
3632 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3633 allocating around 0x80000000.
3634
201506da
PA
36352016-08-19 Pedro Alves <palves@redhat.com>
3636
3637 PR gdb/20415
3638 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3639 (x32-avx512-linux-ipa.o): New rules.
3640 * configure.ac (x86_64-*-linux*): New x32 check.
3641 * configure.srv (ipa_x32_linux_regobj): New.
3642 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3643 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3644 descriptions.
3645 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3646 descriptions.
3647 * configure: Regenerate.
3648
f348d89a
PA
36492016-08-09 Pedro Alves <palves@redhat.com>
3650
3651 PR gdb/18653
3652 * Makefile.in (OBS): Add signals-state-save-restore.o.
3653 (signals-state-save-restore.o): New rule.
3654 * config.in: Regenerate.
3655 * configure: Regenerate.
3656 * linux-low.c: Include "signals-state-save-restore.h".
3657 (linux_create_inferior): Call
3658 restore_original_signals_state.
3659 * server.c: Include "dispositions-save-restore.h".
3660 (captured_main): Call save_original_signals_state.
3661
1baf5149
PA
36622016-08-05 Pedro Alves <palves@redhat.com>
3663
3664 * configure: Regenerate.
3665
fcd4a73d
YQ
36662016-08-04 Yao Qi <yao.qi@linaro.org>
3667
3668 * linux-low.c (regsets_fetch_inferior_registers): Check
3669 errno is ESRCH or not.
3670
979659d0
YQ
36712016-08-02 Yao Qi <yao.qi@linaro.org>
3672
3673 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3674 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3675 (thread_db_load_search): Update.
3676 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3677 td_ta_set_event and td_ta_event_getmsg.
3678
6598661d
PA
36792016-07-26 Pedro Alves <palves@redhat.com>
3680
3681 PR server/20414
3682 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3683 of unsigned long for 64-bit registers and use uint32_t instead of
3684 unsigned int for 32-bit registers.
3685
9cf12d57
PA
36862016-07-26 Pedro Alves <palves@redhat.com>
3687
3688 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3689 to 'ptrace'.
3690
305450ed
TT
36912016-07-21 Tom Tromey <tom@tromey.com>
3692
3693 * configure: Rebuild.
3694
2583da7c
YQ
36952016-07-21 Yao Qi <yao.qi@linaro.org>
3696
3697 * mem-break.c (find_gdb_breakpoint): Cast bp to
3698 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3699
21536b36
YQ
37002016-07-21 Yao Qi <yao.qi@linaro.org>
3701
3702 * server.c (handle_v_requests): Support s and S actions
3703 if target_supports_software_single_step return true.
3704
8901d193
YQ
37052016-07-21 Yao Qi <yao.qi@linaro.org>
3706
3707 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3708 is resume_step, call maybe_hw_step.
3709 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3710 and unstop them.
3711 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3712 breakpoints or not.
3713 (proceed_one_lwp): If resume request is resume_step, install
3714 reinsert breakpoints and call maybe_hw_step.
3715
0e9a339e
YQ
37162016-07-21 Yao Qi <yao.qi@linaro.org>
3717
3718 * linux-low.c (proceed_one_lwp): Declare.
3719 (linux_resume_one_thread): Remove local variable 'step'.
3720 Lift code enqueue signal. Call proceed_one_lwp instead of
3721 linux_resume_one_lwp.
3722
4281b351
YQ
37232016-07-21 Yao Qi <yao.qi@linaro.org>
3724
3725 * linux-low.c (linux_resume_one_thread): Call
3726 enqueue_pending_signal.
3727
984a2c04
YQ
37282016-07-21 Yao Qi <yao.qi@linaro.org>
3729
3730 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3731 * inferiors.c (do_restore_current_thread_cleanup): New function.
3732 (make_cleanup_restore_current_thread): Likewise.
3733 * linux-low.c (install_software_single_step_breakpoints): Call
3734 make_cleanup_restore_current_thread. Switch current_thread to
3735 thread.
3736
bec903c9
YQ
37372016-07-21 Yao Qi <yao.qi@linaro.org>
3738
3739 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3740 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3741 (clone_one_breakpoint): Likewise.
3742 (delete_reinsert_breakpoints): Change parameter to thread.
3743 Callers updated.
3744 (has_reinsert_breakpoints): Likewise.
3745 (uninsert_reinsert_breakpoints): Likewise.
3746 (reinsert_reinsert_breakpoints): Likewise.
3747 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3748 (delete_reinsert_breakpoints): Likewise.
3749 (reinsert_reinsert_breakpoints): Likewise.
3750 (uninsert_reinsert_breakpoints): Likewise.
3751 (has_reinsert_breakpoints): Likewise.
3752
63c40ec7
YQ
37532016-07-21 Yao Qi <yao.qi@linaro.org>
3754
3755 * inferiors.c (get_thread_process): Make parameter const.
3756 * inferiors.h (get_thread_process): Update declaration.
3757 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3758 Add new parameters child_thread and parent_thread. Callers
3759 updated.
3760 * mem-break.h (clone_all_breakpoints): Update declaration.
3761
9aa76cd0
YQ
37622016-07-21 Yao Qi <yao.qi@linaro.org>
3763
3764 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3765 <command_list, handler>: Remove.
3766 (struct gdb_breakpoint): New.
3767 (struct other_breakpoint): New.
3768 (struct reinsert_breakpoint): New.
3769 (is_gdb_breakpoint): New function.
3770 (any_persistent_commands): Update command_list if
3771 is_gdb_breakpoint returns true.
3772 (set_breakpoint): Create breakpoints according to their types.
3773 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3774 (set_gdb_breakpoint_1): Likewise.
3775 (set_gdb_breakpoint): Likewise.
3776 (clear_breakpoint_conditions): Change parameter type to
3777 'struct gdb_breakpoint *'.
3778 (clear_breakpoint_commands): Likewise.
3779 (clear_breakpoint_conditions_and_commands): Likewise.
3780 (add_condition_to_breakpoint): Likewise.
3781 (add_breakpoint_condition): Likewise.
3782 (add_commands_to_breakpoint): Likewise.
3783 (check_breakpoints): Check other_breakpoint.
3784 (clone_one_breakpoint): Clone breakpopint according to its type.
3785 * mem-break.h (struct gdb_breakpoint): Declare.
3786 (set_gdb_breakpoint): Update declaration.
3787 (clear_breakpoint_conditions_and_commands): Likewise.
3788 (add_breakpoint_condition): Likewise.
3789 (add_breakpoint_commands): Likewise.
3790 * server.c (process_point_options): Change parameter type to
3791 'struct gdb_breakpoint *'.
3792
811f8301
YQ
37932016-07-21 Yao Qi <yao.qi@linaro.org>
3794
3795 * mem-break.c (set_breakpoint_at): Rename it to ...
3796 (set_breakpoint_type_at): ... it.
3797 (set_breakpoint_at): Call set_breakpoint_type_at.
3798 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3799 * mem-break.h (set_breakpoint_at): Update comments.
3800
b1c51e36
CLT
38012016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3802
3803 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3804 to buf parameter.
3805 (nios2_store_gregset): Likewise.
3806
ced2dffb
PA
38072016-07-01 Pedro Alves <palves@redhat.com>
3808 Antoine Tremblay <antoine.tremblay@ericsson.com>
3809
3810 * linux-low.c: Change interface to take the target lwp_info
3811 pointer directly and return void. Handle detaching from a zombie
3812 thread.
3813 (linux_detach_lwp_callback): New function.
3814 (linux_detach): Detach from the leader thread after detaching from
3815 the clone threads.
3816
2ac09a5b
YQ
38172016-06-28 Yao Qi <yao.qi@linaro.org>
3818
3819 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3820 for variable new_offset.
3821 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3822 (aarch64_ftrace_insn_reloc_cb): Likewise.
3823 (aarch64_ftrace_insn_reloc_tb): Likewise.
3824 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3825 PRIx64 instead of PRIx32.
3826
79e7fd4f
YQ
38272016-06-28 Yao Qi <yao.qi@linaro.org>
3828
3829 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3830 (the_low_target): Install arm_get_syscall_trapinfo.
3831
061fc021
YQ
38322016-06-28 Yao Qi <yao.qi@linaro.org>
3833
3834 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3835 function.
3836 (the_low_target): Install aarch64_get_syscall_trapinfo.
3837
4cc32bec
YQ
38382016-06-28 Yao Qi <yao.qi@linaro.org>
3839
3840 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3841 Callers updated.
3842 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3843 Remove parameter sysno.
3844 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3845 sysret.
3846
782c1122
AA
38472016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3848
3849 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3850 (s390_emit_ne_goto): Likewise.
3851 (s390_emit_lt_goto): Likewise.
3852 (s390_emit_le_goto): Likewise.
3853 (s390_emit_gt_goto): Likewise.
3854 (s390_emit_ge_goto): Likewise.
3855 (s390x_emit_eq_goto): Likewise.
3856 (s390x_emit_ne_goto): Likewise.
3857 (s390x_emit_lt_goto): Likewise.
3858 (s390x_emit_le_goto): Likewise.
3859 (s390x_emit_gt_goto): Likewise.
3860 (s390x_emit_ge_goto): Likewise.
3861 (s390_emit_ops_impl): Mark variable static.
3862 (s390x_emit_ops): Likewise.
3863
2e7b624b
YQ
38642016-06-17 Yao Qi <yao.qi@linaro.org>
3865
3866 * linux-low.c (handle_extended_wait): Call
3867 uninsert_reinsert_breakpoints for the parent process. Remove
3868 reinsert breakpoints from the child process. Reinsert them to
3869 the parent process when vfork is done.
3870 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3871 (reinsert_reinsert_breakpoints): New function.
3872 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3873 (reinsert_reinsert_breakpoints): Declare.
3874
8a81c5d7
YQ
38752016-06-17 Yao Qi <yao.qi@linaro.org>
3876
3877 * linux-low.c (handle_extended_wait): If the parent is doing
3878 step-over, remove the reinsert breakpoints from the forked child.
3879
f50bf8e5
YQ
38802016-06-17 Yao Qi <yao.qi@linaro.org>
3881
3882 * linux-low.c (unsuspend_all_lwps): Declare.
3883 (linux_low_filter_event): If thread exited, call finish_step_over.
3884 If step-over is finished, unsuspend other threads.
3885
8376a3cb
YQ
38862016-06-17 Yao Qi <yao.qi@linaro.org>
3887
3888 * linux-low.c (linux_resume_one_lwp_throw): Assert
3889 has_reinsert_breakpoints returns false.
3890 * mem-break.c (delete_disabled_breakpoints): Assert
3891 bp type isn't reinsert_breakpoint.
3892
f79b145d
YQ
38932016-06-17 Yao Qi <yao.qi@linaro.org>
3894
3895 * linux-low.c (maybe_hw_step): New function.
3896 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3897 (finish_step_over): Switch current_thread to lwp temporarily,
3898 and assert has_reinsert_breakpoints returns true.
3899 (proceed_one_lwp): Call maybe_hw_step.
3900 * mem-break.c (has_reinsert_breakpoints): New function.
3901 * mem-break.h (has_reinsert_breakpoints): Declare.
3902
0ae534d2
JT
39032016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3904
3905 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3906
fcdad592
YQ
39072016-05-17 Yao Qi <yao.qi@linaro.org>
3908
3909 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3910 instead of find_inferior.
3911
9e784964
YQ
39122016-05-05 Yao Qi <yao.qi@linaro.org>
3913
3914 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3915 Initialize res to zero.
3916
cf2ebb6e
YQ
39172016-05-05 Yao Qi <yao.qi@linaro.org>
3918
3919 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3920 to uint32_t.
3921
c1aebf87
UW
39222016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3923
3924 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3925 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3926 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3927
35fd2deb 39282016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3929 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3930
3931 * tracepoint.c (write_inferior_int8): New function.
3932 (cmd_qtenable_disable): Write enable flag using
3933 write_inferior_int8.
3934
484b3c32
YQ
39352016-04-25 Yao Qi <yao.qi@linaro.org>
3936
3937 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3938 (need_step_over_p): Return zero if the LWP has pending signals
3939 can be delivered on software single step target.
3940
85ba7d86
YQ
39412016-04-25 Yao Qi <yao.qi@linaro.org>
3942
3943 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3944 return instead of error.
3945
3539aa13
YQ
39462016-04-22 Yao Qi <yao.qi@linaro.org>
3947
3948 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3949 to 23.
3950
5b061e98
YQ
39512016-04-22 Yao Qi <yao.qi@linaro.org>
3952
3953 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3954 signal when stepping over breakpoint with software single
3955 step.
3956
3451269c
PA
39572016-04-21 Pedro Alves <palves@redhat.com>
3958
3959 * linux-s390-low.c (s390_collect_ptrace_register)
3960 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3961 add casts.
3962 (s390_check_regset): Use void * instead of gdb_byte *.
3963
a2358508
PA
39642016-04-20 Pedro Alves <palves@redhat.com>
3965
3966 * configure: Renegerate.
3967
6885166d
YQ
39682016-04-20 Yao Qi <yao.qi@linaro.org>
3969
3970 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3971 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3972 number 16.
3973 (arm_store_gregset): Likewise.
3974
2b863f51
WT
39752016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3976
3977 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3978 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3979 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3980 (amd64-avx-mpx-linux.c): New rules.
3981 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3982 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3983 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3984 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3985 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3986 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3987 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3988 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3989 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3990 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3991 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3992 * linux-x86-low.c (x86_linux_read_description): Add case for
3993 X86_XSTATE_AVX_MPX_MASK.
3994 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3995 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3996 init_registers_i386_avx_mpx_linux.
3997 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3998 (initialize_low_tracepoint): Call
3999 init_registers_i386_avx_mpx_linux.
4000 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4001 (initialize_low_tracepoint): Call
4002 init_registers_amd64_avx_mpx_linux.
4003 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4004 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4005 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4006 declarations.
4007
9b30624b
PA
40082016-04-18 Pedro Alves <palves@redhat.com>
4009
4010 * configure: Regenerate.
4011
45e3745e
AT
40122016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4013
4014 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4015 (aarch64_emit_sub): Likewise.
4016
2afc13ff
PA
40172016-04-12 Pedro Alves <palves@redhat.com>
4018
4019 * utils.c (prepare_to_throw_exception): Delete.
4020
6e774b13
SM
40212016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4022
4023 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4024
4dca19f8
MK
40252016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4026
4027 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4028
d0a9981f
MK
40292016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4030
4031 * linux-aarch64-ipa.c: Add <elf.h> include.
4032 * linux-ppc-ipa.c: Add <elf.h> include.
4033 * linux-s390-ipa.c: Add <elf.h> include.
4034
252db07e
MK
40352016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4036
4037 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4038 (get_raw_reg_ptr): Likewise.
4039 (get_trace_state_variable_value_ptr): Likewise.
4040 (set_trace_state_variable_value_ptr): Likewise.
4041 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4042 char *.
4043
14e2b6d9
MK
40442016-03-31 Wei-cheng Wang <cole945@gmail.com>
4045 Marcin Kościelnicki <koriakin@0x04.net>
4046
4047 PR/17221
4048 * linux-ppc-low.c (emit_insns): New function.
4049 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4050 (ppc_emit_prologue): New function.
4051 (ppc_emit_epilogue): New function.
4052 (ppc_emit_add): New function.
4053 (ppc_emit_sub): New function.
4054 (ppc_emit_mul): New function.
4055 (ppc_emit_lsh): New function.
4056 (ppc_emit_rsh_signed): New function.
4057 (ppc_emit_rsh_unsigned): New function.
4058 (ppc_emit_ext): New function.
4059 (ppc_emit_zero_ext): New function.
4060 (ppc_emit_log_not): New function.
4061 (ppc_emit_bit_and): New function.
4062 (ppc_emit_bit_or): New function.
4063 (ppc_emit_bit_xor): New function.
4064 (ppc_emit_bit_not): New function.
4065 (ppc_emit_equal): New function.
4066 (ppc_emit_less_signed): New function.
4067 (ppc_emit_less_unsigned): New function.
4068 (ppc_emit_ref): New function.
4069 (ppc_emit_const): New function.
4070 (ppc_emit_reg): New function.
4071 (ppc_emit_pop): New function.
4072 (ppc_emit_stack_flush): New function.
4073 (ppc_emit_swap): New function.
4074 (ppc_emit_stack_adjust): New function.
4075 (ppc_emit_call): New function.
4076 (ppc_emit_int_call_1): New function.
4077 (ppc_emit_void_call_2): New function.
4078 (ppc_emit_if_goto): New function.
4079 (ppc_emit_goto): New function.
4080 (ppc_emit_eq_goto): New function.
4081 (ppc_emit_ne_goto): New function.
4082 (ppc_emit_lt_goto): New function.
4083 (ppc_emit_le_goto): New function.
4084 (ppc_emit_gt_goto): New function.
4085 (ppc_emit_ge_goto): New function.
4086 (ppc_write_goto_address): New function.
4087 (ppc_emit_ops_impl): New static variable.
4088 (ppc64v1_emit_prologue): New function.
4089 (ppc64v2_emit_prologue): New function.
4090 (ppc64_emit_epilogue): New function.
4091 (ppc64_emit_add): New function.
4092 (ppc64_emit_sub): New function.
4093 (ppc64_emit_mul): New function.
4094 (ppc64_emit_lsh): New function.
4095 (ppc64_emit_rsh_signed): New function.
4096 (ppc64_emit_rsh_unsigned): New function.
4097 (ppc64_emit_ext): New function.
4098 (ppc64_emit_zero_ext): New function.
4099 (ppc64_emit_log_not): New function.
4100 (ppc64_emit_bit_and): New function.
4101 (ppc64_emit_bit_or): New function.
4102 (ppc64_emit_bit_xor): New function.
4103 (ppc64_emit_bit_not): New function.
4104 (ppc64_emit_equal): New function.
4105 (ppc64_emit_less_signed): New function.
4106 (ppc64_emit_less_unsigned): New function.
4107 (ppc64_emit_ref): New function.
4108 (ppc64_emit_const): New function.
4109 (ppc64v1_emit_reg): New function.
4110 (ppc64v2_emit_reg): New function.
4111 (ppc64_emit_pop): New function.
4112 (ppc64_emit_stack_flush): New function.
4113 (ppc64_emit_swap): New function.
4114 (ppc64v1_emit_call): New function.
4115 (ppc64v2_emit_call): New function.
4116 (ppc64v1_emit_int_call_1): New function.
4117 (ppc64v2_emit_int_call_1): New function.
4118 (ppc64v1_emit_void_call_2): New function.
4119 (ppc64v2_emit_void_call_2): New function.
4120 (ppc64_emit_if_goto): New function.
4121 (ppc64_emit_eq_goto): New function.
4122 (ppc64_emit_ne_goto): New function.
4123 (ppc64_emit_lt_goto): New function.
4124 (ppc64_emit_le_goto): New function.
4125 (ppc64_emit_gt_goto): New function.
4126 (ppc64_emit_ge_goto): New function.
4127 (ppc64v1_emit_ops_impl): New static variable.
4128 (ppc64v2_emit_ops_impl): New static variable.
4129 (ppc_emit_ops): New function.
4130 (linux_low_target): Wire in ppc_emit_ops.
4131
a2174ba4
MK
41322016-03-31 Wei-cheng Wang <cole945@gmail.com>
4133 Marcin Kościelnicki <koriakin@0x04.net>
4134
4135 PR/17221
4136 * Makefile.in: Add powerpc-*-ipa.o
4137 * configure.srv: Add ipa_obj for powerpc*-linux.
4138 * linux-ppc-ipa.c: New file.
4139 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4140 includes.
4141 (PPC_FIELD): New macro.
4142 (PPC_SEXT): New macro.
4143 (PPC_OP6): New macro.
4144 (PPC_BO): New macro.
4145 (PPC_LI): New macro.
4146 (PPC_BD): New macro.
4147 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4148 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4149 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4150 (ppc_get_thread_area): New function.
4151 (is_elfv2_inferior): New function.
4152 (gen_ds_form): New function.
4153 (GEN_STD): New macro.
4154 (GEN_STDU): New macro.
4155 (GEN_LD): New macro.
4156 (GEN_LDU): New macro.
4157 (gen_d_form): New function.
4158 (GEN_ADDI): New macro.
4159 (GEN_ADDIS): New macro.
4160 (GEN_LI): New macro.
4161 (GEN_LIS): New macro.
4162 (GEN_ORI): New macro.
4163 (GEN_ORIS): New macro.
4164 (GEN_LWZ): New macro.
4165 (GEN_STW): New macro.
4166 (GEN_STWU): New macro.
4167 (gen_xfx_form): New function.
4168 (GEN_MFSPR): New macro.
4169 (GEN_MTSPR): New macro.
4170 (GEN_MFCR): New macro.
4171 (GEN_MTCR): New macro.
4172 (GEN_SYNC): New macro.
4173 (GEN_LWSYNC): New macro.
4174 (gen_x_form): New function.
4175 (GEN_OR): New macro.
4176 (GEN_MR): New macro.
4177 (GEN_LWARX): New macro.
4178 (GEN_STWCX): New macro.
4179 (GEN_CMPW): New macro.
4180 (gen_md_form): New function.
4181 (GEN_RLDICL): New macro.
4182 (GEN_RLDICR): New macro.
4183 (gen_i_form): New function.
4184 (GEN_B): New macro.
4185 (GEN_BL): New macro.
4186 (gen_b_form): New function.
4187 (GEN_BNE): New macro.
4188 (GEN_LOAD): New macro.
4189 (GEN_STORE): New macro.
4190 (gen_limm): New function.
4191 (gen_atomic_xchg): New function.
4192 (gen_call): New function.
4193 (ppc_relocate_instruction): New function.
4194 (ppc_install_fast_tracepoint_jump_pad): New function.
4195 (ppc_get_min_fast_tracepoint_insn_len): New function.
4196 (ppc_get_ipa_tdesc_idx): New function.
4197 (the_low_target): Wire in the new functions.
4198 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4199 tdescs.
4200 * linux-ppc-tdesc.h: New file.
4201
a13c4696
MK
42022016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4203
4204 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4205 (alloc_jump_pad_buffer): New function.
4206 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4207 (alloc_jump_pad_buffer): New function.
4208 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4209 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4210 (alloc_jump_pad_buffer): New function.
4211 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4212 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4213 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4214 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4215
1cda1512
MK
42162016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4217
4218 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4219 * linux-amd64-ipa.c: Likewise.
4220 * linux-i386-ipa.c: Likewise.
4221 * linux-s390-ipa.c: Likewise.
4222 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4223 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4224 set_trace_state_variable_value_ptr.
4225 (struct ipa_sym_addresses): Likewise.
4226 (symbol_list): Likewise.
4227 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4228 accessing gdb_collect directly.
4229 (gdb_collect_ptr_type): New typedef.
4230 (get_raw_reg_ptr_type): New typedef.
4231 (get_trace_state_variable_value_ptr_type): New typedef.
4232 (set_trace_state_variable_value_ptr_type): New typedef.
4233 (gdb_collect_ptr): New global.
4234 (get_raw_reg_ptr): New global.
4235 (get_trace_state_variable_value_ptr): New global.
4236 (set_trace_state_variable_value_ptr): New global.
4237 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4238 accessing get_raw_reg directly.
4239 (get_get_tsv_func_addr): Likewise for
4240 get_trace_state_variable_value_ptr.
4241 (get_set_tsv_func_addr): Likewise for
4242 set_trace_state_variable_value_ptr.
4243 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4244
72fb5488
SM
42452016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4246
4247 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4248
28170b88
MK
42492016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4250
4251 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4252 packets.
4253 (relocate_instruction): Remove own_buf.
4254 * server.c (own_buf): Make global.
4255 (handle_v_requests): Make global.
4256 * server.h (own_buf): New declaration.
4257 (handle_v_requests): New prototype.
4258
f39e8743
MK
42592016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4260
4261 PR 18377
4262 * linux-s390-low.c (add_insns): New function.
4263 (s390_emit_prologue): New function.
4264 (s390_emit_epilogue): New function.
4265 (s390_emit_add): New function.
4266 (s390_emit_sub): New function.
4267 (s390_emit_mul): New function.
4268 (s390_emit_lsh): New function.
4269 (s390_emit_rsh_signed): New function.
4270 (s390_emit_rsh_unsigned): New function.
4271 (s390_emit_ext): New function.
4272 (s390_emit_log_not): New function.
4273 (s390_emit_bit_and): New function.
4274 (s390_emit_bit_or): New function.
4275 (s390_emit_bit_xor): New function.
4276 (s390_emit_bit_not): New function.
4277 (s390_emit_equal): New function.
4278 (s390_emit_less_signed): New function.
4279 (s390_emit_less_unsigned): New function.
4280 (s390_emit_ref): New function.
4281 (s390_emit_if_goto): New function.
4282 (s390_emit_goto): New function.
4283 (s390_write_goto_address): New function.
4284 (s390_emit_litpool): New function.
4285 (s390_emit_const): New function.
4286 (s390_emit_call): New function.
4287 (s390_emit_reg): New function.
4288 (s390_emit_pop): New function.
4289 (s390_emit_stack_flush): New function.
4290 (s390_emit_zero_ext): New function.
4291 (s390_emit_swap): New function.
4292 (s390_emit_stack_adjust): New function.
4293 (s390_emit_set_r2): New function.
4294 (s390_emit_int_call_1): New function.
4295 (s390_emit_void_call_2): New function.
4296 (s390_emit_eq_goto): New function.
4297 (s390_emit_ne_goto): New function.
4298 (s390_emit_lt_goto): New function.
4299 (s390_emit_le_goto): New function.
4300 (s390_emit_gt_goto): New function.
4301 (s390_emit_ge_goto): New function.
4302 (s390x_emit_prologue): New function.
4303 (s390x_emit_epilogue): New function.
4304 (s390x_emit_add): New function.
4305 (s390x_emit_sub): New function.
4306 (s390x_emit_mul): New function.
4307 (s390x_emit_lsh): New function.
4308 (s390x_emit_rsh_signed): New function.
4309 (s390x_emit_rsh_unsigned): New function.
4310 (s390x_emit_ext): New function.
4311 (s390x_emit_log_not): New function.
4312 (s390x_emit_bit_and): New function.
4313 (s390x_emit_bit_or): New function.
4314 (s390x_emit_bit_xor): New function.
4315 (s390x_emit_bit_not): New function.
4316 (s390x_emit_equal): New function.
4317 (s390x_emit_less_signed): New function.
4318 (s390x_emit_less_unsigned): New function.
4319 (s390x_emit_ref): New function.
4320 (s390x_emit_if_goto): New function.
4321 (s390x_emit_const): New function.
4322 (s390x_emit_call): New function.
4323 (s390x_emit_reg): New function.
4324 (s390x_emit_pop): New function.
4325 (s390x_emit_stack_flush): New function.
4326 (s390x_emit_zero_ext): New function.
4327 (s390x_emit_swap): New function.
4328 (s390x_emit_stack_adjust): New function.
4329 (s390x_emit_int_call_1): New function.
4330 (s390x_emit_void_call_2): New function.
4331 (s390x_emit_eq_goto): New function.
4332 (s390x_emit_ne_goto): New function.
4333 (s390x_emit_lt_goto): New function.
4334 (s390x_emit_le_goto): New function.
4335 (s390x_emit_gt_goto): New function.
4336 (s390x_emit_ge_goto): New function.
4337 (s390_emit_ops): New function.
4338 (struct linux_target_ops): Fill in emit_ops hook.
4339
abd9baf9
MK
43402016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4341
4342 PR 18377
4343 * Makefile.in: Add s390 IPA files.
4344 * configure.srv: Build IPA for s390.
4345 * linux-s390-ipa.c: New file.
4346 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4347 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4348 (tdesc_s390_linux32): Likewise.
4349 (init_registers_s390_linux32v1): Likewise.
4350 (tdesc_s390_linux32v1): Likewise.
4351 (init_registers_s390_linux32v2): Likewise.
4352 (tdesc_s390_linux32v2): Likewise.
4353 (init_registers_s390_linux64): Likewise.
4354 (tdesc_s390_linux64): Likewise.
4355 (init_registers_s390_linux64v1): Likewise.
4356 (tdesc_s390_linux64v1): Likewise.
4357 (init_registers_s390_linux64v2): Likewise.
4358 (tdesc_s390_linux64v2): Likewise.
4359 (init_registers_s390_te_linux64): Likewise.
4360 (tdesc_s390_te_linux64): Likewise.
4361 (init_registers_s390_vx_linux64): Likewise.
4362 (tdesc_s390_vx_linux64): Likewise.
4363 (init_registers_s390_tevx_linux64): Likewise.
4364 (tdesc_s390_tevx_linux64): Likewise.
4365 (init_registers_s390x_linux64): Likewise.
4366 (tdesc_s390x_linux64): Likewise.
4367 (init_registers_s390x_linux64v1): Likewise.
4368 (tdesc_s390x_linux64v1): Likewise.
4369 (init_registers_s390x_linux64v2): Likewise.
4370 (tdesc_s390x_linux64v2): Likewise.
4371 (init_registers_s390x_te_linux64): Likewise.
4372 (tdesc_s390x_te_linux64): Likewise.
4373 (init_registers_s390x_vx_linux64): Likewise.
4374 (tdesc_s390x_vx_linux64): Likewise.
4375 (init_registers_s390x_tevx_linux64): Likewise.
4376 (tdesc_s390x_tevx_linux64): Likewise.
4377 (have_hwcap_s390_vx): New static variable.
4378 (s390_arch_setup): Fill have_hwcap_s390_vx.
4379 (s390_get_thread_area): New function.
4380 (s390_ft_entry_gpr_esa): New const.
4381 (s390_ft_entry_gpr_zarch): New const.
4382 (s390_ft_entry_misc): New const.
4383 (s390_ft_entry_fr): New const.
4384 (s390_ft_entry_vr): New const.
4385 (s390_ft_main_31): New const.
4386 (s390_ft_main_64): New const.
4387 (s390_ft_exit_fr): New const.
4388 (s390_ft_exit_vr): New const.
4389 (s390_ft_exit_misc): New const.
4390 (s390_ft_exit_gpr_esa): New const.
4391 (s390_ft_exit_gpr_zarch): New const.
4392 (append_insns): New function.
4393 (s390_relocate_instruction): New function.
4394 (s390_install_fast_tracepoint_jump_pad): New function.
4395 (s390_get_min_fast_tracepoint_insn_len): New function.
4396 (s390_get_ipa_tdesc_idx): New function.
4397 (struct linux_target_ops): Wire in the above functions.
4398 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4399 * linux-s390-tdesc.h: New file.
4400
a4105d04
MK
44012016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4402
4403 * linux-s390-low.c (s390_supports_tracepoints): New function.
4404 (struct linux_target_ops): Fill supports_tracepoints hook.
4405
35ac8b3e
YQ
44062016-03-18 Yao Qi <yao.qi@linaro.org>
4407
4408 * linux-low.c (lwp_signal_can_be_delivered): New function.
4409 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4410
94610ec4
YQ
44112016-03-18 Yao Qi <yao.qi@linaro.org>
4412
4413 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4414 0 if signal is enqueued. Remove 'signal' from one debugging
4415 message. Move one debugging message to some lines below.
4416 Remove code setting 'signal' to 0.
4417
80aea927
YQ
44182016-03-18 Yao Qi <yao.qi@linaro.org>
4419
4420 * linux-low.c (linux_low_filter_event): Remove redundant
4421 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4422
b04fd3be
MK
44232016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4424
4425 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4426 (struct linux_target_ops): Wire in the above.
4427
c40c8d4b
YQ
44282016-03-03 Yao Qi <yao.qi@linaro.org>
4429
4430 * linux-low.c: Update comments to start_step_over.
4431
0f8288ae
YQ
44322016-03-03 Yao Qi <yao.qi@linaro.org>
4433
4434 PR server/19736
4435 * linux-low.c (handle_extended_wait): Set child suspended
4436 if event_lwp->bp_reinsert isn't zero.
4437
fdbd04a8
YQ
44382016-03-02 Yao Qi <yao.qi@linaro.org>
4439
4440 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4441 enqueue_pending_signal.
4442
6896a8fa
MK
44432016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4444
4445 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4446 is actually loaded.
4447
ab503087
MK
44482016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4449
4450 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4451 (s390_regmap_3264) [!__s390x__]: New global.
4452 (s390_collect_ptrace_register): Skip map entries containing -1.
4453 (s390_supply_ptrace_register): Ditto.
4454 (s390_fill_gprs_high): New function.
4455 (s390_store_gprs_high): New function.
4456 (s390_regsets): Add NT_S390_HIGH_GPRS.
4457 (s390_get_hwcap): Enable on 31-bit.
4458 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4459 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4460 Detect NT_S390_HIGH_GPRS.
4461 (s390_usrregs_info_3264): Enable on 31-bit.
4462 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4463 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4464
ae91f625
MK
44652016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4466
4467 PR gdb/13808
4468 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4469 * configure.srv: Ditto.
4470 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4471 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4472 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4473 (init_registers_amd64_linux): Remove prototype.
4474 (tdesc_amd64_linux): Remove declaration.
4475 (get_ipa_tdesc): New function.
4476 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4477 initialize remaining tdescs.
4478 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4479 (init_registers_i386_linux): Remove prototype.
4480 (tdesc_i386_linux): Remove declaration.
4481 (get_ipa_tdesc): New function.
4482 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4483 initialize remaining tdescs.
4484 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4485 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4486 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4487 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4488 (x86_get_ipa_tdesc_idx): New function.
4489 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4490 * linux-x86-tdesc.h: New file.
4491 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4492 (target_get_ipa_tdesc_idx): New macro.
4493 * tracepoint.c (ipa_tdesc_idx): New macro.
4494 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4495 (symbol_list): Add ipa_tdesc_idx.
4496 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4497 (ipa_tdesc): Remove.
4498 (ipa_tdesc_idx): New variable.
4499 (get_context_regcache): Use get_ipa_tdesc.
4500 (gdb_collect): Ditto.
4501 (gdb_probe): Ditto.
4502 * tracepoint.h (get_ipa_tdesc): New prototype.
4503 (ipa_tdesc): Remove.
4504
e7ad2f14
PA
45052016-02-24 Pedro Alves <palves@redhat.com>
4506
4507 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4508 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4509 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4510 Factor out common code between the USE_SIGTRAP_SIGINFO and
4511 !USE_SIGTRAP_SIGINFO blocks.
4512 (linux_low_filter_event): Call save_stop_reason instead of
4513 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4514 Update comments.
4515 (linux_wait_1): Update comments.
4516
657f9cde
WW
45172016-02-24 Wei-cheng Wang <cole945@gmail.com>
4518
4519 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4520 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4521 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4522 ppc_insert_point, ppc_remove_point.
4523
b00b61e1
MK
45242016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4525
4526 * linux-s390-low.c (s390_supports_z_point_type): New function.
4527 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4528
553cb527
YQ
45292016-02-16 Yao Qi <yao.qi@linaro.org>
4530
4531 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4532 PC. Get pc from regcache_read_pc.
4533
a5652c21
YQ
45342016-02-12 Yao Qi <yao.qi@linaro.org>
4535
4536 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4537 or linux_get_pc_32bit.
4538 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4539
ed443b61
YQ
45402016-02-12 Yao Qi <yao.qi@linaro.org>
4541
4542 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4543 arm_linux_get_next_pcs_fixup.
4544
020ecd38
MK
45452016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4546
4547 * tracepoint.c (x_tracepoint_action_download): Change
4548 write_inferior_data_ptr to write_inferior_data_pointer.
4549 (cmd_qtstart): Likewise.
4550 (write_inferior_data_ptr): Remove.
4551 (download_agent_expr): Change write_inferior_data_ptr to
4552 write_inferior_data_pointer.
4553 (download_tracepoint_1): Likewise.
4554 (download_tracepoint): Likewise.
4555 (download_trace_state_variables): Likewise.
4556
7cae9051
WW
45572016-02-11 Wei-cheng Wang <cole945@gmail.com>
4558 Marcin Kościelnicki <koriakin@0x04.net>
4559
4560 * tracepoint.c (struct tracepoint_action_ops): Remove.
4561 (struct tracepoint_action): Remove ops.
4562 (m_tracepoint_action_download, r_tracepoint_action_download)
4563 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4564 size and offset accordingly.
4565 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4566 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4567 (tracepoint_action_send, tracepoint_action_download): New functions.
4568 Helpers for trace action handlers.
4569 (add_tracepoint_action): Remove setup actions ops.
4570 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4571
9f6a71b4
YQ
45722016-02-10 Yao Qi <yao.qi@linaro.org>
4573
4574 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4575
1e94266c
SM
45762016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4577
4578 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4579 to AC_OUTPUT.
4580 * configure: Regenerate.
4581
8adce034
SM
45822016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4583
4584 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4585 void * to gdb_byte *.
4586 * linux-low.c (siginfo_fixup): Likewise.
4587 (linux_xfer_siginfo): Likewise.
4588 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4589 Likewise.
4590 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4591
93813b37
WT
45922016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4593
4594 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4595 to srv_tgtobj.
4596 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4597 to srv_tgtobj.
4598 * linux-x86-low.c [__x86_64__]: Include
4599 "nat/amd64-linux-siginfo.h".
4600 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4601 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4602 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4603 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4604 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4605 (cpt_si_fd, si_timerid, si_overrun): Move from
4606 nat/amd64-linux-siginfo.c.
4607 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4608
8424cc97
SM
46092016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4610
4611 * server.c (skip_to_semicolon): Remove.
4612 (process_point_options): Use strchrnul instead of
4613 skip_to_semicolon.
4614
4d18591b
YQ
46152016-01-26 Yao Qi <yao.qi@linaro.org>
4616
4617 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4618 * linux-low.c (install_software_single_step_breakpoints): Don't
4619 call regcache_read_pc.
4620 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4621 argument pc.
4622
d8020970
YQ
46232016-01-26 Yao Qi <yao.qi@linaro.org>
4624
4625 * linux-low.c (install_software_single_step_breakpoints): Call
4626 regcache_read_pc instead of get_pc.
4627
8b207339
YQ
46282016-01-26 Yao Qi <yao.qi@linaro.org>
4629
4630 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4631 (unblock_async_io): Rename to ...
4632 (block_unblock_async_io): ... it. New function.
4633 (enable_async_io): Don't install SIGIO handler. Unblock it
4634 instead.
4635 (disable_async_io): Don't ignore SIGIO. Block it instead.
4636 (initialize_async_io): Install SIGIO handler. Don't call
4637 unblock_async_io.
4638
18879fef
YQ
46392016-01-26 Yao Qi <yao.qi@linaro.org>
4640
4641 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4642 first character is '\003', call *the_target->request_interrupt.
4643
a0f8e08a
YQ
46442016-01-25 Yao Qi <yao.qi@linaro.org>
4645
4646 * remote-utils.c (new_thread_notify): Remove.
4647 (dead_thread_notify): Likewise.
4648 * remote-utils.h (new_thread_notify): Remove declaration.
4649 (dead_thread_notify): Likewise.
4650
cc5fd9ab
MK
46512016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4652
4653 * gdb.trace/pending.exp: Fix expected message on continue.
4654
99e8eb11
MK
46552016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4656
4657 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4658 it works properly on big-endian machines where sizeof (CORE_ADDR)
4659 != sizeof (void *).
4660
a994041d
PA
46612016-01-21 Pedro Alves <palves@redhat.com>
4662
4663 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4664 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4665 * configure: Regenerate.
4666
f7a6a40d
YQ
46672016-01-21 Yao Qi <yao.qi@linaro.org>
4668
4669 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4670 is_thumb and set it according to CPSR saved on the stack.
4671 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4672 arm_sigreturn_next_pc.
4673
6f69e520
YQ
46742016-01-18 Yao Qi <yao.qi@linaro.org>
4675
4676 * linux-low.c (linux_set_pc_64bit): New function.
4677 (linux_get_pc_64bit): New function.
4678 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4679 Declare.
4680 * linux-sparc-low.c (debug_threads): Remove declaration.
4681 (sparc_get_pc): Remove.
4682 (the_low_target): Use linux_get_pc_64bit instead of
4683 sparc_get_pc.
4684 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4685 (the_low_target): Use linux_get_pc_64bit and
4686 linux_set_pc_64bit.
4687
276d4552
YQ
46882016-01-18 Yao Qi <yao.qi@linaro.org>
4689
4690 * linux-arm-low.c (debug_threads): Remove declaration.
4691 (arm_get_pc, arm_set_pc): Remove.
4692 (the_low_target): Use linux_get_pc_32bit and
4693 linux_set_pc_32bit.
4694 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4695 (the_low_target): Use linux_get_pc_32bit and
4696 linux_set_pc_32bit.
4697 * linux-cris-low.c (debug_threads): Remove declaration.
4698 (cris_get_pc, cris_set_pc,): Remove.
4699 (the_low_target): Use linux_get_pc_32bit and
4700 linux_set_pc_32bit.
4701 * linux-crisv32-low.c (debug_threads): Remove declaration.
4702 (cris_get_pc, cris_set_pc): Remove.
4703 (the_low_target): Use linux_get_pc_32bit and
4704 linux_set_pc_32bit.
4705 * linux-low.c: Include inttypes.h.
4706 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4707 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4708 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4709 (the_low_target): Use linux_get_pc_32bit and
4710 linux_set_pc_32bit.
4711 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4712 (the_low_target): Use linux_get_pc_32bit and
4713 linux_set_pc_32bit.
4714 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4715 (the_low_target): Use linux_get_pc_32bit and
4716 linux_set_pc_32bit.
4717 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4718 (the_low_target): Use linux_get_pc_32bit and
4719 linux_set_pc_32bit.
4720 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4721 (the_low_target): Use linux_get_pc_32bit and
4722 linux_set_pc_32bit.
4723
eb0edac8
GB
47242016-01-18 Gary Benson <gbenson@redhat.com>
4725
4726 * configure.ac (AC_FUNC_FORK): New check.
4727 * config.in: Regenerate.
4728 * configure: Likewise.
4729
1b451dda
YQ
47302016-01-14 Yao Qi <yao.qi@linaro.org>
4731
4732 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4733 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4734 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4735 arm_get_next_pcs_ctor.
4736
82075af2
JS
47372016-01-12 Josh Stone <jistone@redhat.com>
4738 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4739
4740 * inferiors.h: Include "gdb_vecs.h".
4741 (struct process_info): Add syscalls_to_catch.
4742 * inferiors.c (remove_process): Free syscalls_to_catch.
4743 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4744 syscall_return stops.
4745 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4746 * server.c (handle_general_set): Handle QCatchSyscalls.
4747 (handle_query): Report support for QCatchSyscalls.
4748 * target.h (struct target_ops): Add supports_catch_syscall.
4749 (target_supports_catch_syscall): New macro.
4750 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4751 (struct lwp_info): Add syscall_state.
4752 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4753 Maintain syscall_state and syscalls_to_catch across exec.
4754 (get_syscall_trapinfo): New function, proxy to the_low_target.
4755 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4756 (linux_low_filter_event): Toggle syscall_state entry/return for
4757 syscall traps, and set it ignored for all others.
4758 (gdb_catching_syscalls_p): New function.
4759 (gdb_catch_this_syscall_p): New function.
4760 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4761 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4762 (linux_supports_catch_syscall): New function.
4763 (linux_target_ops): Install it.
4764 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4765 (the_low_target): Install it.
4766
8f13a3ce
MF
47672016-01-12 Mike Frysinger <vapier@gentoo.org>
4768
4769 * acinclude.m4: Include new ../warning.m4 file.
4770 * configure: Regenerated.
4771 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4772
5b3da067
MF
47732016-01-12 Mike Frysinger <vapier@gentoo.org>
4774
4775 * ax.c (is_goto_target): Mark static.
4776 * linux-low.c (register_addr): Likewise.
4777 (linux_fetch_registers, linux_store_registers): Likewise.
4778 * mem-break.c (any_persistent_commands): Fix old prototype.
4779 (add_commands_to_breakpoint): Mark static.
4780 * regcache.c (find_register_by_name): Delete unused func.
4781 * remote-utils.c (hex_or_minus_one): Mark static.
4782 * server.c (monitor_show_help): Mark static.
4783 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4784 handle_v_requests): Likewise.
4785
bc504a31
PA
47862016-01-12 Pedro Alves <palves@redhat.com>
4787
4788 Remove use of the registered trademark symbol throughout.
4789
5a0dd67a
YQ
47902016-01-08 Yao Qi <yao.qi@linaro.org>
4791
4792 * remote-utils.c (getpkt): If c is '\003', call target hook
4793 request_interrupt.
4794
b2ca446f
YQ
47952016-01-06 Yao Qi <yao.qi@linaro.org>
4796
4797 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4798 linux-aarch32-low.c.
4799 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4800 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4801 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4802 (thumb2_breakpoint): Declare.
4803 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4804 linux-aarch32-low.h.
4805 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4806 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4807 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4808
edd88788
JB
48092016-01-01 Joel Brobecker <brobecker@adacore.com>
4810
4811 * gdbreplay.c (gdbreplay_version): Change copyright year in
4812 version message.
4813 * server.c (gdbserver_version): Likewise.
4814
65da7f14
PP
48152015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4816
4817 * server.c (crc32_table): Delete.
4818 (crc32): Use libiberty's xcrc32 function.
4819
4abd5ed2
JB
48202015-12-22 Joel Brobecker <brobecker@adacore.com>
4821
4822 * lynx-low.c (lynx_delete_thread_callback): New function.
4823 (lynx_mourn): Properly delete our process and all of its
4824 threads. Remove call to clear_inferiors.
4825
0e50fe5c
JB
48262015-12-22 Joel Brobecker <brobecker@adacore.com>
4827
4828 * target.c (thread_search_callback): Add check that
4829 the thread_stopped target callback is not NULL before
4830 calling it.
4831
35adc03f
YQ
48322015-12-21 Yao Qi <yao.qi@linaro.org>
4833
4834 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4835 arm breakpoint.
4836
bd2b2909
AT
48372015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4838
4839 * server.c (handle_query): Call target_supports_software_single_step.
4840
7fe5e27e
AT
48412015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4842
4843 * linux-low.c (single_step): New function.
4844 (linux_resume_one_lwp_throw): Call single_step.
4845 (start_step_over): Likewise.
4846
d9311bfa
AT
48472015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4848
4849 * Makefile.in (SFILES): Append arch/arm-linux.c,
4850 arch/arm-get-next-pcs.c.
4851 (arm-linux.o): New rule.
4852 (arm-get-next-pcs.o): New rule.
4853 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4854 arm-linux.o.
4855 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4856 to linux-aarch32-low.c.
4857 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4858 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4859 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4860 (thumb2_breakpoint_len): Likewise.
4861 (arm_is_thumb_mode): Make non-static.
4862 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4863 from linux-aarch32-low.c.
4864 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4865 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4866 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4867 (thumb2_breakpoint_len): Likewise.
4868 (arm_is_thumb_mode): New declaration.
4869 * linux-arm-low.c: Include arch/arm-linux.h
4870 aarch/arm-get-next-pcs.h, sys/syscall.h.
4871 (get_next_pcs_ops): New struct.
4872 (get_next_pcs_addr_bits_remove): New function.
4873 (get_next_pcs_is_thumb): New function.
4874 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4875 (arm_sigreturn_next_pc): Likewise.
4876 (get_next_pcs_syscall_next_pc): Likewise.
4877 (arm_gdbserver_get_next_pcs): Likewise.
4878 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4879 Initialize.
4880 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4881 * server.h: Include gdb_vecs.h.
4882
68ce2059
AT
48832015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4884
4885 * Makefile.in (SFILES): Append common/common-regcache.c.
4886 (OBS): Append common-regcache.o.
4887 (common-regcache.o): New rule.
4888 * regcache.c (init_register_cache): Initialize cache to
4889 REG_UNAVAILABLE.
4890 (regcache_raw_read_unsigned): New function.
4891 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4892 register_status enum.
4893
fa5308bd
AT
48942015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4895
4896 * linux-aarch64-low.c (the_low_targets): Rename
4897 breakpoint_reinsert_addr to get_next_pcs.
4898 * linux-arm-low.c (the_low_targets): Likewise.
4899 * linux-bfin-low.c (the_low_targets): Likewise.
4900 * linux-cris-low.c (the_low_targets): Likewise.
4901 * linux-crisv32-low.c (the_low_targets): Likewise.
4902 * linux-low.c (can_software_single_step): Likewise.
4903 (install_software_single_step_breakpoints): New function.
4904 (start_step_over): Use install_software_single_step_breakpoints.
4905 * linux-low.h: New CORE_ADDR vector.
4906 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4907 get_next_pcs.
4908 * linux-mips-low.c (the_low_targets): Likewise.
4909 * linux-nios2-low.c (the_low_targets): Likewise.
4910 * linux-sparc-low.c (the_low_targets): Likewise.
4911
4a6ed09b
PA
49122015-12-17 Pedro Alves <palves@redhat.com>
4913
4914 * linux-low.c (linux_kill_one_lwp): Remove references to
4915 LinuxThreads.
4916 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4917 to 'kill'.
4918 (linux_init_signals): Delete.
4919 (initialize_low): Adjust.
4920 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4921
7544db95
PA
49222015-12-16 Pedro Alves <palves@redhat.com>
4923
4924 * configure.ac (compiler warning flags): When testing a
4925 -Wno-foo option, check whether -Wfoo works instead.
4926 * configure: Regenerate.
4927
8020350c
DB
49282015-12-11 Don Breazeal <donb@codesourcery.com>
4929
4930 * server.c (process_serial_event): Don't exit from gdbserver
4931 in remote mode if there are still active inferiors.
4932
db91f502
YQ
49332015-12-11 Yao Qi <yao.qi@linaro.org>
4934
4935 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4936 arm_breakpoint_at if the process is 32-bit.
4937
b37a6290
YQ
49382015-12-11 Yao Qi <yao.qi@linaro.org>
4939
4940 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4941 arm breakpoint.
4942
17b1509a
YQ
49432015-12-07 Yao Qi <yao.qi@linaro.org>
4944
4945 * configure.srv: Append arm.o to srv_tgtobj for
4946 aarch64*-*-linux* target.
4947 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4948 from linux-arm-low.c.
4949 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4950 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4951 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4952 (thumb2_breakpoint_len): Likewise.
4953 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4954 (arm_breakpoint_kinds): Likewise.
4955 (arm_breakpoint_kind_from_pc): Likewise.
4956 (arm_sw_breakpoint_from_kind): Likewise.
4957 (arm_breakpoint_kind_from_current_state): Likewise.
4958 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4959 (arm_sw_breakpoint_from_kind): Declare.
4960 (arm_breakpoint_kind_from_current_state): Declare.
4961 (arm_breakpoint_at): Declare.
4962 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4963 arm_sw_breakpoint_from_kind if process is 32-bit.
4964 (aarch64_breakpoint_kind_from_pc): New function.
4965 (aarch64_breakpoint_kind_from_current_state): New function.
4966 (the_low_target): Initialize fields breakpoint_kind_from_pc
4967 and breakpoint_kind_from_current_state.
4968 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4969 linux-aarch32-low.c.
4970 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4971 (arm_breakpoint, arm_breakpoint_len): Likewise.
4972 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4973 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4974 (arm_is_thumb_mode): Likewise.
4975 (arm_breakpoint_at): Likewise.
4976 (arm_breakpoint_kind_from_pc): Likewise.
4977 (arm_sw_breakpoint_from_kind): Likewise.
4978 (arm_breakpoint_kind_from_current_state): Likewise.
4979
4980 Revert:
4981 2015-08-04 Yao Qi <yao.qi@linaro.org>
4982
4983 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4984 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4985 * server.c (extended_protocol): Remove "static".
4986 * server.h (extended_protocol): Declare it.
4987
ece66d65
JS
49882015-12-04 Josh Stone <jistone@redhat.com>
4989
4990 * target.h (struct target_ops) <arch_setup>: Rename to ...
4991 (struct target_ops) <post_create_inferior>: ... this.
4992 (target_arch_setup): Rename to ...
4993 (target_post_create_inferior): ... this, calling post_create_inferior.
4994 * server.c (start_inferior): Update target_arch_setup calls to
4995 target_post_create_inferior.
4996 * linux-low.c (linux_low_ptrace_options): Forward declare.
4997 (linux_arch_setup): Update its comment for general use.
4998 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4999 (struct linux_target_ops): Use linux_post_create_inferior.
5000 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5001 to post_create_inferior.
5002 * nto-low.c (struct nto_target_ops): Likewise.
5003 * spu-low.c (struct spu_target_ops): Likewise.
5004 * win32-low.c (struct win32_target_ops): Likewise.
5005
e58c48b4
AT
50062015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5007
5008 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5009
fbec8956
AT
50102015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5011
5012 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5013 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5014 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5015 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5016 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5017 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5018 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5019 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5020 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5021 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5022 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5023 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5024
9b4c5f87
AT
50252015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5026
5027 * linux-low.c (linux_look_up_symbols): Don't call
5028 linux_supports_traceclone.
5029 * linux-low.h (thread_db_init): Remove use_events argument.
5030 * thread-db.c (thread_db_use_event): Remove global variable.
5031 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5032 (struct thread_db) <td_create_bp>: Remove field.
5033 (thread_db_create_event): Remove function.
5034 (thread_db_enable_reporting): Likewise.
5035 (find_one_thread): Don't check for thread_db_use_events.
5036 (attach_thread): Likewise.
5037 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5038 (try_thread_db_load_1): Don't check for thread_db_use_events.
5039 (thread_db_init): Remove use_events argument and thread events
5040 handling.
5041 (remove_thread_event_breakpoints): Remove function.
5042 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5043
7d00775e
AT
50442015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5045
5046 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5047 New function.
5048 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5049 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5050 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5051 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5052 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5053 Initialize.
5054 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5055 New function.
5056 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5057 * linux-low.c (can_hardware_single_step): Use
5058 supports_hardware_single_step.
5059 (can_software_single_step): New function.
5060 (start_step_over): Call can_software_single_step.
5061 (linux_supports_hardware_single_step): New function.
5062 (struct target_ops) <supports_software_single_step>: Initialize.
5063 * linux-low.h (struct linux_target_ops)
5064 <supports_hardware_single_step>: Initialize.
5065 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5066 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5067 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5068 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5069 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5070 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5071 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5072 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5073 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5074 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5075 Initialize.
5076 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5077 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5078 Initialize.
5079 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5080 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5081 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5082 New function.
5083 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5084 * target.h (struct target_ops): <supports_software_single_step>:
5085 New field.
5086 (target_supports_software_single_step): New macro.
5087
2d97cd35
AT
50882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5089
5090 * linux-low.c (linux_wait_1): Fix pc advance condition.
5091 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5092 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5093
769ef81f
AT
50942015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5095
5096 * linux-arm-low.c (arm_is_thumb_mode): New function.
5097 (arm_breakpoint_at): Use arm_is_thumb_mode.
5098 (arm_breakpoint_kind_from_current_state): New function.
5099 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5100 Initialize.
5101 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5102 (linux_breakpoint_kind_from_current_state): New function.
5103 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5104 * linux-low.h (struct linux_target_ops)
5105 <breakpoint_kind_from_current_state>: New field.
5106 * target.h (struct target_ops): Likewise.
5107 (target_breakpoint_kind_from_current_state): New macro.
5108
1bebeeca
PA
51092015-11-30 Pedro Alves <palves@redhat.com>
5110
5111 * linux-low.c (linux_resume): Wake up the event loop before
5112 returning.
5113
a67a9fae
PA
51142015-11-30 Pedro Alves <palves@redhat.com>
5115
5116 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5117 check.
5118 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5119 to -1.
5120 * target.c (struct thread_search): New structure.
5121 (thread_search_callback): New function.
5122 (prev_general_thread): New global.
5123 (prepare_to_access_memory, done_accessing_memory): New functions.
5124 * target.h (prepare_to_access_memory, done_accessing_memory):
5125 Replace macros with function declarations.
5126
f2faf941
PA
51272015-11-30 Pedro Alves <palves@redhat.com>
5128
5129 PR 14618
5130 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5131 report TARGET_WAITKIND_NO_RESUMED.
5132 * remote-utils.c (prepare_resume_reply): Handle
5133 TARGET_WAITKIND_NO_RESUMED.
5134 * server.c (report_no_resumed): New global.
5135 (handle_query) <qSupported>: Handle "no-resumed+". Report
5136 "no-resumed+" support.
5137 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5138 return error if the client doesn't support no-resumed events.
5139 (push_stop_notification): New function.
5140 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5141 events if the client supports them.
5142
a681f9c9
PA
51432015-11-30 Pedro Alves <palves@redhat.com>
5144
5145 * linux-low.c (thread_still_has_status_pending_p): Don't check
5146 vCont;t here.
5147 (lwp_resumed): New function.
5148 (status_pending_p_callback): Return early if the LWP is not
5149 supposed to be resumed.
5150
65706a29
PA
51512015-11-30 Pedro Alves <palves@redhat.com>
5152
5153 * linux-low.c (handle_extended_wait): Assert that the LWP's
5154 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5155 thread create events, leave the new child's status pending.
5156 (linux_low_filter_event): If GDB wants to hear about thread exit
5157 events, leave the LWP marked dead and don't delete it.
5158 (linux_wait_for_event_filtered): Don't check for thread exit.
5159 (filter_exit_event): New function.
5160 (linux_wait_1): Use it, when returning an exit event.
5161 (linux_resume_one_lwp_throw): Assert that the LWP's
5162 waitstatus is TARGET_WAITKIND_IGNORE.
5163 * remote-utils.c (prepare_resume_reply): Handle
5164 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5165 * server.c (report_thread_events): New global.
5166 (handle_general_set): Handle QThreadEvents.
5167 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5168 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5169 TARGET_WAITKIND_THREAD_EXITED.
5170 * server.h (report_thread_events): Declare.
5171
56cf4bed
PA
51722015-11-30 Pedro Alves <palves@redhat.com>
5173
5174 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5175 the thread's last_resume_kind was resume_stop.
5176
500c1d85
PA
51772015-11-30 Pedro Alves <palves@redhat.com>
5178
5179 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5180 before returning.
5181
de979965
PA
51822015-11-30 Pedro Alves <palves@redhat.com>
5183
5184 * server.c (handle_v_requests): Handle vCtrlC.
5185
34c65914
PA
51862015-11-30 Pedro Alves <palves@redhat.com>
5187
5188 * gdbthread.h (find_any_thread_of_pid): Declare.
5189 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5190 functions.
5191 * server.c (handle_query): If current_thread is NULL, look for
5192 another thread of the selected process.
5193
79efa585 51942015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5195 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5196
5197 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5198 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5199 name in reply.
5200 * target.h (struct target_ops) <thread_name>: New field.
5201 (target_thread_name): New macro.
5202
80d82c19
JB
52032015-11-23 Joel Brobecker <brobecker@adacore.com>
5204
5205 * regcache.h (regcache_invalidate_pid): Add declaration.
5206 * regcache.c (regcache_invalidate_pid): New function, extracted
5207 from regcache_invalidate.
5208 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5209 Add trivial documentation comment.
5210 * lynx-low.c: Use regcache_invalidate_pid instead of
5211 regcache_invalidate.
5212
64da5dd5
JB
52132015-11-23 Joel Brobecker <brobecker@adacore.com>
5214
5215 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5216 and Elf64_auxv_t if the target is Android.
5217
37ce4055
DE
52182015-11-22 Doug Evans <xdje42@gmail.com>
5219
5220 * target.h: #include <sys/types.h>.
5221
06e03fff
PA
52222015-11-19 Pedro Alves <palves@redhat.com>
5223
5224 * linux-low.c (linux_process_qsupported): Change prototype.
5225 Adjust.
5226 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5227 Change prototype.
5228 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5229 and adjust to loop over all features.
5230 * server.c (handle_query) <qSupported>: Adjust to call
5231 target_process_qsupported once, passing it a vector of unprocessed
5232 features.
5233 * target.h (struct target_ops) <process_qsupported>: Change
5234 prototype.
5235 (target_process_qsupported): Adjust.
5236
9a084706
PA
52372015-11-19 Pedro Alves <palves@redhat.com>
5238
5239 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5240 mode.
5241 * configure: Regenerate.
5242
dad44a1f
PA
52432015-11-19 Pedro Alves <palves@redhat.com>
5244
5245 * configure: Regenerate.
5246
231c0592
YQ
52472015-11-19 Yao Qi <yao.qi@linaro.org>
5248
5249 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5250 type to uint32_t.
5251
6c1c9a8b
YQ
52522015-11-19 Yao Qi <yao.qi@linaro.org>
5253
5254 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5255 (struct aarch64_operand): Move enum out.
5256
9caa3311
YQ
52572015-11-19 Yao Qi <yao.qi@linaro.org>
5258
5259 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5260 struct user_fpsimd_state *.
5261 (aarch64_store_fpregset): Likewise.
5262
6a69a054
YQ
52632015-11-19 Yao Qi <yao.qi@linaro.org>
5264
5265 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5266 struct user_pt_regs *.
5267 (aarch64_store_gregset): Likewise.
5268
1798301e
PA
52692015-11-18 Pedro Alves <palves@redhat.com>
5270
5271 * Makefile.in (all_object_files): Add $IPA_OBJS.
5272
ce7715e2
PA
52732015-11-17 Pedro Alves <palves@redhat.com>
5274
5275 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5276 GDB_SIGNAL_0 and gdb_signal_to_string.
5277
c0879059
PA
52782015-11-17 Pedro Alves <palves@redhat.com>
5279
5280 * win32-low.c (handle_output_debug_string): Remove parameter.
5281 (win32_kill): Remove our_status local and adjust call to
5282 handle_output_debug_string.
5283 (get_child_debug_event): Adjust call to
5284 handle_output_debug_string.
5285
1996e237
SM
52862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5287
5288 * linux-mips-low.c (mips_fill_gregset): Add cast.
5289 (mips_store_gregset): Likewise.
5290 (mips_fill_fpregset): Likewise.
5291 (mips_store_fpregset): Likewise.
5292
cbec665b
SM
52932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5294
5295 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5296 priv.
5297
eb3e3c67
SM
52982015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5299
5300 * linux-mips-low.c (mips_linux_new_thread): Change type of
5301 watch_type to enum target_hw_bp_type.
5302
171de4b8
SM
53032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5304
5305 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5306 Change return type to arm_hwbp_type.
5307
04248ead
SM
53082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5309
5310 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5311 (arm_store_gregset): Likewise.
5312 * linux-arm-low.c (arm_get_hwcap): Likewise.
5313 (arm_read_description): Likewise.
5314
04b3479c
SM
53152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5316
5317 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5318
2bc84e8a
SM
53192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5320
5321 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5322 (ppc_fill_vsxregset): Likewise.
5323 (ppc_store_vsxregset): Likewise.
5324 (ppc_fill_vrregset): Likewise.
5325 (ppc_store_vrregset): Likewise.
5326 (ppc_fill_evrregset): Likewise.
5327 (ppc_store_evrregset): Likewise.
5328
e6c5bb05
SM
53292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5330
5331 * linux-ppc-low.c (ppc_usrregs_info): Remove
5332 forward-declaration.
5333 (ppc_arch_setup): Move lower in file.
5334
7ea45d72
SM
53352015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5336
5337 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5338 (ps_pdwrite): Likewise.
5339
69291610
HW
53402015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5341
5342 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5343 to after assert checks.
5344
b42945fd
SM
53452015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5346
5347 * proc-service.c (ps_pdread): Add/adjust casts.
5348 (ps_pdwrite): Add/adjust casts.
5349
d6f85c84
SM
53502015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5351
5352 * server.c (handle_search_memory_1): Cast return value of
5353 memmem.
5354
f98cd059
SM
53552015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5356
5357 * server.c (write_qxfer_response): Change type of data to
5358 gdb_byte *.
5359
d2412fa5
PA
53602015-10-29 Pedro Alves <palves@redhat.com>
5361
5362 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5363
c17414a2
PA
53642015-10-29 Pedro Alves <palves@redhat.com>
5365
5366 * tracepoint.c (clear_installed_tracepoints): Add casts.
5367
e053fbc4
PA
53682015-10-29 Pedro Alves <palves@redhat.com>
5369
5370 * server.c (handle_v_cont, process_serial_event): Add enum
5371 gdb_signal casts to signal parsing code.
5372
add67df8
PA
53732015-10-29 Pedro Alves <palves@redhat.com>
5374
5375 * linux-low.h (NULL_REGSET): Define.
5376 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5377 * linux-arm-low.c (arm_regsets): Likewise.
5378 * linux-crisv32-low.c (cris_regsets): Likewise.
5379 * linux-m68k-low.c (m68k_regsets): Likewise.
5380 * linux-mips-low.c (mips_regsets): Likewise.
5381 * linux-nios2-low.c (nios2_regsets): Likewise.
5382 * linux-ppc-low.c (ppc_regsets): Likewise.
5383 * linux-s390-low.c (s390_regsets): Likewise.
5384 * linux-sh-low.c (sh_regsets): Likewise.
5385 * linux-sparc-low.c (sparc_regsets): Likewise.
5386 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5387 * linux-tile-low.c (tile_regsets): Likewise.
5388 * linux-x86-low.c (x86_regsets): Likewise.
5389 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5390
50bc912a
PA
53912015-10-29 Pedro Alves <palves@redhat.com>
5392
5393 * linux-low.h (NULL_REGSET): Define.
5394 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5395 * linux-arm-low.c (arm_regsets): Likewise.
5396 * linux-crisv32-low.c (cris_regsets): Likewise.
5397 * linux-m68k-low.c (m68k_regsets): Likewise.
5398 * linux-mips-low.c (mips_regsets): Likewise.
5399 * linux-nios2-low.c (nios2_regsets): Likewise.
5400 * linux-ppc-low.c (ppc_regsets): Likewise.
5401 * linux-s390-low.c (s390_regsets): Likewise.
5402 * linux-sh-low.c (sh_regsets): Likewise.
5403 * linux-sparc-low.c (sparc_regsets): Likewise.
5404 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5405 * linux-tile-low.c (tile_regsets): Likewise.
5406 * linux-x86-low.c (x86_regsets): Likewise.
5407 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5408
682b2546
DE
54092015-10-26 Doug Evans <dje@google.com>
5410
5411 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5412
963843d4
DE
54132015-10-26 Doug Evans <dje@google.com>
5414
5415 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5416
d41401ac
DE
54172015-10-26 Doug Evans <dje@google.com>
5418
5419 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5420 for debug_printf.
5421 (attach_thread, find_new_threads_callback): Ditto.
5422
3db28855
AT
54232015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5424
5425 * mem-break.h (set_breakpoint_data): Remove.
5426
fb78e89c
AT
54272015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5428
5429 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5430 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5431 (initialize_low): Remove set_breakpoint_data call.
5432 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5433 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5434 (initialize_low): Remove set_breakpoint_data call.
5435 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5436 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5437 (initialize_low): Remove set_breakpoint_data call.
5438
2e6ee069
AT
54392015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5440
5441 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5442 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5443 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5444 * target.h (target_breakpoint_kind_from_pc): New macro.
5445
1652a986
AT
54462015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5447
5448 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5449 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5450 the default breakpoint kind.
5451
abeead09
AT
54522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5453
5454 * linux-arm-low.c (arm_supports_z_point_type): Add software
5455 breakpoint support.
5456
b0b4b501
AT
54572015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5458
5459 * linux-arm-low.c: Refactor breakpoint definitions.
5460 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5461 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5462
8689682c
AT
54632015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5464
5465 * Makefile.in: Add arm.c/o.
5466 * configure.srv: Likewise.
5467 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5468 (arm_breakpoint_kind_from_pc): New function.
5469 (arm_sw_breakpoint_from_kind): Return proper kind.
5470 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5471
27165294
AT
54722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5473
5474 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5475 removal.
5476 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5477 (struct raw_breakpoint) <size>: Remove.
5478 (struct raw_breakpoint) <kind>: Add.
5479 (bp_size): New function.
5480 (bp_opcode): Likewise.
5481 (find_raw_breakpoint_at): Adjust for kind.
5482 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5483 (remove_memory_breakpoint): Adjust for kind call bp_size.
5484 (set_raw_breakpoint_at): Adjust for kind.
5485 (set_breakpoint): Likewise.
5486 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5487 (delete_raw_breakpoint): Adjust for kind.
5488 (delete_breakpoint): Likewise.
5489 (find_gdb_breakpoint): Likewise.
5490 (set_gdb_breakpoint_1): Likewise.
5491 (set_gdb_breakpoint): Likewise.
5492 (delete_gdb_breakpoint_1): Likewise.
5493 (delete_gdb_breakpoint): Likewise.
5494 (uninsert_raw_breakpoint): Likewise.
5495 (reinsert_raw_breakpoint): Likewise.
5496 (set_breakpoint_data): Remove.
5497 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5498 (check_mem_read): Adjust for kind call bp_size.
5499 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5500 (clone_one_breakpoint): Adjust for kind.
5501 * mem-break.h (set_gdb_breakpoint): Likewise.
5502 (delete_gdb_breakpoint): Likewise.
5503 * server.c (process_serial_event): Likewise.
5504
dd373349
AT
55052015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5506
5507 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5508 (struct linux_target_ops) <breakpoint>: Remove.
5509 (struct linux_target_ops) <breakpoint_len>: Remove.
5510 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5511 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5512 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5513 (arm_sw_breakpoint_from_kind): New function.
5514 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5515 (struct linux_target_ops) <breakpoint>: Remove.
5516 (struct linux_target_ops) <breakpoint_len>: Remove.
5517 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5518 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5519 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5520 (struct linux_target_ops) <breakpoint>: Remove.
5521 (struct linux_target_ops) <breakpoint_len>: Remove.
5522 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5523 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5524 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5525 (struct linux_target_ops) <breakpoint>: Remove.
5526 (struct linux_target_ops) <breakpoint_len>: Remove.
5527 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5528 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5529 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5530 and sw_breakpoint_from_kind to increment the pc.
5531 (linux_breakpoint_kind_from_pc): New function.
5532 (linux_sw_breakpoint_from_kind): New function.
5533 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5534 (initialize_low): Call breakpoint_kind_from_pc and
5535 sw_breakpoint_from_kind to replace breakpoint_data/len.
5536 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5537 New field.
5538 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5539 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5540 (struct linux_target_ops) <breakpoint>: Remove.
5541 (struct linux_target_ops) <breakpoint_len>: Remove.
5542 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5543 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5544 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5545 (struct linux_target_ops) <breakpoint>: Remove.
5546 (struct linux_target_ops) <breakpoint_len>: Remove.
5547 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5548 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5549 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5550 (struct linux_target_ops) <breakpoint>: Remove.
5551 (struct linux_target_ops) <breakpoint_len>: Remove.
5552 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5553 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5554 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5555 (struct linux_target_ops) <breakpoint>: Remove.
5556 (struct linux_target_ops) <breakpoint_len>: Remove.
5557 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5558 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5559 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5560 (struct linux_target_ops) <breakpoint>: Remove.
5561 (struct linux_target_ops) <breakpoint_len>: Remove.
5562 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5563 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5564 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5565 (struct linux_target_ops) <breakpoint>: Remove.
5566 (struct linux_target_ops) <breakpoint_len>: Remove.
5567 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5568 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5569 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5570 (struct linux_target_ops) <breakpoint>: Remove.
5571 (struct linux_target_ops) <breakpoint_len>: Remove.
5572 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5573 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5574 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5575 (struct linux_target_ops) <breakpoint>: Remove.
5576 (struct linux_target_ops) <breakpoint_len>: Remove.
5577 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5578 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5579 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5580 (struct linux_target_ops) <breakpoint>: Remove.
5581 (struct linux_target_ops) <breakpoint_len>: Remove.
5582 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5583 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5584 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5585 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5586 (struct linux_target_ops) <breakpoint>: Remove.
5587 (struct linux_target_ops) <breakpoint_len>: Remove.
5588 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5589 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5590 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5591 (struct linux_target_ops) <breakpoint>: Remove.
5592 (struct linux_target_ops) <breakpoint_len>: Remove.
5593 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5594 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5595
4cd98a19
AT
55962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5597
5598 * linux-cris-low.c (cris_get_pc): Remove void arg.
5599
774ee6d2
AR
56002015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5601
5602 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5603 variable name.
5604
833dcd29
AR
56052015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5606
5607 * inferiors.c (thread_pid_matches_callback): New function.
5608 (find_thread_process): New function.
5609 (remove_thread): Reset current_thread.
5610 (remove_process): Assert threads have been removed first.
5611
8d689ee5
YQ
56122015-10-15 Yao Qi <yao.qi@linaro.org>
5613
5614 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5615 if it is 3.
5616 (aarch64_remove_point): Likewise.
5617 * regcache.c (regcache_register_size): New function.
5618
1c2e1515
YQ
56192015-10-12 Yao Qi <yao.qi@linaro.org>
5620
5621 * linux-aarch64-low.c: Update all callers as emit_load_store
5622 is renamed to aarch64_emit_load_store.
5623
e1c587c3
YQ
56242015-10-12 Yao Qi <yao.qi@linaro.org>
5625
5626 * linux-aarch64-low.c: Update all callers of function renaming
5627 from emit_insn to aarch64_emit_insn.
5628
b6542f81
YQ
56292015-10-12 Yao Qi <yao.qi@linaro.org>
5630
5631 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5632 arch/aarch64-insn.h.
5633 (struct aarch64_memory_operand): Likewise.
5634 (ENCODE): Likewise.
5635 (emit_insn): Move to arch/aarch64-insn.c.
5636 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5637 (emit_load_store): Move to arch/aarch64-insn.c.
5638 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5639 (can_encode_int32): Remove.
5640
246994ce
YQ
56412015-10-12 Yao Qi <yao.qi@linaro.org>
5642
5643 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5644 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5645 (aarch64_relocate_instruction): Likewise.
5646 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5647 (struct aarch64_insn_visitor): Likewise.
5648
0badd99f
YQ
56492015-10-12 Yao Qi <yao.qi@linaro.org>
5650
5651 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5652 (struct aarch64_insn_visitor): New.
5653 (struct aarch64_insn_relocation_data): New.
5654 (aarch64_ftrace_insn_reloc_b): New function.
5655 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5656 (aarch64_ftrace_insn_reloc_cb): Likewise.
5657 (aarch64_ftrace_insn_reloc_tb): Likewise.
5658 (aarch64_ftrace_insn_reloc_adr): Likewise.
5659 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5660 (aarch64_ftrace_insn_reloc_others): Likewise.
5661 (visitor): New.
5662 (aarch64_relocate_instruction): Use visitor.
5663
dfaffe9d
YQ
56642015-10-12 Yao Qi <yao.qi@linaro.org>
5665
5666 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5667 int. Add argument buf.
5668 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5669 aarch64_relocate_instruction.
5670
70b439f0
YQ
56712015-10-12 Yao Qi <yao.qi@linaro.org>
5672
5673 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5674 argument insn. Remove local variable insn. Don't call
5675 target_read_uint32.
5676 (aarch64_install_fast_tracepoint_jump_pad): Call
5677 target_read_uint32.
5678
7781c06f
YQ
56792015-09-30 Yao Qi <yao.qi@linaro.org>
5680
5681 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5682 (emit_load_store_pair): Likewise.
5683
9a3c8263
SM
56842015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5685
5686 * dll.c (match_dll): Add cast(s).
5687 (unloaded_dll): Likewise.
5688 * linux-low.c (second_thread_of_pid_p): Likewise.
5689 (delete_lwp_callback): Likewise.
5690 (count_events_callback): Likewise.
5691 (select_event_lwp_callback): Likewise.
5692 (linux_set_resume_request): Likewise.
5693 * server.c (accumulate_file_name_length): Likewise.
5694 (emit_dll_description): Likewise.
5695 (handle_qxfer_threads_worker): Likewise.
5696 (visit_actioned_threads): Likewise.
5697 * thread-db.c (any_thread_of): Likewise.
5698 * tracepoint.c (same_process_p): Likewise.
5699 (match_blocktype): Likewise.
5700 (build_traceframe_info_xml): Likewise.
5701
224c3ddb
SM
57022015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5703
5704 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5705 assignment.
5706 (gdb_unparse_agent_expr): Likewise.
5707 * hostio.c (require_data): Likewise.
5708 (handle_pread): Likewise.
5709 * linux-low.c (disable_regset): Likewise.
5710 (fetch_register): Likewise.
5711 (store_register): Likewise.
5712 (get_dynamic): Likewise.
5713 (linux_qxfer_libraries_svr4): Likewise.
5714 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5715 (set_fast_tracepoint_jump): Likewise.
5716 (uninsert_fast_tracepoint_jumps_at): Likewise.
5717 (reinsert_fast_tracepoint_jumps_at): Likewise.
5718 (validate_inserted_breakpoint): Likewise.
5719 (clone_agent_expr): Likewise.
5720 * regcache.c (init_register_cache): Likewise.
5721 * remote-utils.c (putpkt_binary_1): Likewise.
5722 (decode_M_packet): Likewise.
5723 (decode_X_packet): Likewise.
5724 (look_up_one_symbol): Likewise.
5725 (relocate_instruction): Likewise.
5726 (monitor_output): Likewise.
5727 * server.c (handle_search_memory): Likewise.
5728 (handle_qxfer_exec_file): Likewise.
5729 (handle_qxfer_libraries): Likewise.
5730 (handle_qxfer): Likewise.
5731 (handle_query): Likewise.
5732 (handle_v_cont): Likewise.
5733 (handle_v_run): Likewise.
5734 (captured_main): Likewise.
5735 * target.c (write_inferior_memory): Likewise.
5736 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5737 * tracepoint.c (init_trace_buffer): Likewise.
5738 (add_tracepoint_action): Likewise.
5739 (add_traceframe): Likewise.
5740 (add_traceframe_block): Likewise.
5741 (cmd_qtdpsrc): Likewise.
5742 (cmd_qtdv): Likewise.
5743 (cmd_qtstatus): Likewise.
5744 (response_source): Likewise.
5745 (response_tsv): Likewise.
5746 (cmd_qtnotes): Likewise.
5747 (gdb_collect): Likewise.
5748 (initialize_tracepoint): Likewise.
5749
afbe19f8
PL
57502015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5751
5752 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5753 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5754 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5755 <NOP>: New.
5756 (enum aarch64_condition_codes): New enum.
5757 (w0): New static global.
5758 (fp): Likewise.
5759 (lr): Likewise.
5760 (struct aarch64_memory_operand) <type>: New
5761 MEMORY_OPERAND_POSTINDEX type.
5762 (postindex_memory_operand): New helper function.
5763 (emit_ret): New function.
5764 (emit_load_store_pair): New function, factored out of emit_stp
5765 with support for MEMORY_OPERAND_POSTINDEX.
5766 (emit_stp): Rewrite using emit_load_store_pair.
5767 (emit_ldp): New function.
5768 (emit_load_store): Likewise.
5769 (emit_ldr): Mention post-index instruction in comment.
5770 (emit_ldrh): New function.
5771 (emit_ldrb): New function.
5772 (emit_ldrsw): Mention post-index instruction in comment.
5773 (emit_str): Likewise.
5774 (emit_subs): New function.
5775 (emit_cmp): Likewise.
5776 (emit_and): Likewise.
5777 (emit_orr): Likewise.
5778 (emit_orn): Likewise.
5779 (emit_eor): Likewise.
5780 (emit_mvn): Likewise.
5781 (emit_lslv): Likewise.
5782 (emit_lsrv): Likewise.
5783 (emit_asrv): Likewise.
5784 (emit_mul): Likewise.
5785 (emit_sbfm): Likewise.
5786 (emit_sbfx): Likewise.
5787 (emit_ubfm): Likewise.
5788 (emit_ubfx): Likewise.
5789 (emit_csinc): Likewise.
5790 (emit_cset): Likewise.
5791 (emit_nop): Likewise.
5792 (emit_ops_insns): New helper function.
5793 (emit_pop): Likewise.
5794 (emit_push): Likewise.
5795 (aarch64_emit_prologue): New function.
5796 (aarch64_emit_epilogue): Likewise.
5797 (aarch64_emit_add): Likewise.
5798 (aarch64_emit_sub): Likewise.
5799 (aarch64_emit_mul): Likewise.
5800 (aarch64_emit_lsh): Likewise.
5801 (aarch64_emit_rsh_signed): Likewise.
5802 (aarch64_emit_rsh_unsigned): Likewise.
5803 (aarch64_emit_ext): Likewise.
5804 (aarch64_emit_log_not): Likewise.
5805 (aarch64_emit_bit_and): Likewise.
5806 (aarch64_emit_bit_or): Likewise.
5807 (aarch64_emit_bit_xor): Likewise.
5808 (aarch64_emit_bit_not): Likewise.
5809 (aarch64_emit_equal): Likewise.
5810 (aarch64_emit_less_signed): Likewise.
5811 (aarch64_emit_less_unsigned): Likewise.
5812 (aarch64_emit_ref): Likewise.
5813 (aarch64_emit_if_goto): Likewise.
5814 (aarch64_emit_goto): Likewise.
5815 (aarch64_write_goto_address): Likewise.
5816 (aarch64_emit_const): Likewise.
5817 (aarch64_emit_call): Likewise.
5818 (aarch64_emit_reg): Likewise.
5819 (aarch64_emit_pop): Likewise.
5820 (aarch64_emit_stack_flush): Likewise.
5821 (aarch64_emit_zero_ext): Likewise.
5822 (aarch64_emit_swap): Likewise.
5823 (aarch64_emit_stack_adjust): Likewise.
5824 (aarch64_emit_int_call_1): Likewise.
5825 (aarch64_emit_void_call_2): Likewise.
5826 (aarch64_emit_eq_goto): Likewise.
5827 (aarch64_emit_ne_goto): Likewise.
5828 (aarch64_emit_lt_goto): Likewise.
5829 (aarch64_emit_le_goto): Likewise.
5830 (aarch64_emit_gt_goto): Likewise.
5831 (aarch64_emit_ge_got): Likewise.
5832 (aarch64_emit_ops_impl): New static global variable.
5833 (aarch64_emit_ops): New target function, return
5834 &aarch64_emit_ops_impl.
5835 (struct linux_target_ops): Install it.
5836
bb903df0
PL
58372015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5838
5839 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5840 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5841 aarch64-ipa.o.
5842 * linux-aarch64-ipa.c: New file.
5843 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5844 and endian.h.
5845 (aarch64_get_thread_area): New target method.
5846 (extract_signed_bitfield): New helper function.
5847 (aarch64_decode_ldr_literal): New function.
5848 (enum aarch64_opcodes): New enum.
5849 (struct aarch64_register): New struct.
5850 (struct aarch64_operand): New struct.
5851 (x0): New static global.
5852 (x1): Likewise.
5853 (x2): Likewise.
5854 (x3): Likewise.
5855 (x4): Likewise.
5856 (w2): Likewise.
5857 (ip0): Likewise.
5858 (sp): Likewise.
5859 (xzr): Likewise.
5860 (aarch64_register): New helper function.
5861 (register_operand): Likewise.
5862 (immediate_operand): Likewise.
5863 (struct aarch64_memory_operand): New struct.
5864 (offset_memory_operand): New helper function.
5865 (preindex_memory_operand): Likewise.
5866 (enum aarch64_system_control_registers): New enum.
5867 (ENCODE): New macro.
5868 (emit_insn): New helper function.
5869 (emit_b): New function.
5870 (emit_bcond): Likewise.
5871 (emit_cb): Likewise.
5872 (emit_tb): Likewise.
5873 (emit_blr): Likewise.
5874 (emit_stp): Likewise.
5875 (emit_ldp_q_offset): Likewise.
5876 (emit_stp_q_offset): Likewise.
5877 (emit_load_store): Likewise.
5878 (emit_ldr): Likewise.
5879 (emit_ldrsw): Likewise.
5880 (emit_str): Likewise.
5881 (emit_ldaxr): Likewise.
5882 (emit_stxr): Likewise.
5883 (emit_stlr): Likewise.
5884 (emit_data_processing_reg): Likewise.
5885 (emit_data_processing): Likewise.
5886 (emit_add): Likewise.
5887 (emit_sub): Likewise.
5888 (emit_mov): Likewise.
5889 (emit_movk): Likewise.
5890 (emit_mov_addr): Likewise.
5891 (emit_mrs): Likewise.
5892 (emit_msr): Likewise.
5893 (emit_sevl): Likewise.
5894 (emit_wfe): Likewise.
5895 (append_insns): Likewise.
5896 (can_encode_int32_in): New helper function.
5897 (aarch64_relocate_instruction): New function.
5898 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5899 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5900 (struct linux_target_ops): Install aarch64_get_thread_area,
5901 aarch64_install_fast_tracepoint_jump_pad and
5902 aarch64_get_min_fast_tracepoint_insn_len.
5903
787749ea
PL
59042015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5905
5906 * Makefile.in (aarch64-insn.o): New rule.
5907 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5908
9812b2e6
YQ
59092015-09-21 Yao Qi <yao.qi@linaro.org>
5910
5911 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5912
18fe412b
YQ
59132015-09-21 Yao Qi <yao.qi@linaro.org>
5914
5915 * tracepoint.c (max_jump_pad_size): Remove.
5916
a0cc84cd
YQ
59172015-09-18 Yao Qi <yao.qi@linaro.org>
5918
5919 * linux-aarch64-low.c: Don't include sys/uio.h.
5920 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5921
d78908cf
WW
59222015-09-16 Wei-cheng Wang <cole945@gmail.com>
5923
5924 * tracepoint.c (eval_result_type): Change prototype.
5925 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5926
d57e0d50
PA
59272015-09-15 Pedro Alves <palves@redhat.com>
5928
5929 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5930 Check whether to report exec events instead of checking whether
5931 multiprocess is enabled.
5932
5a676acc
PA
59332015-09-15 Pedro Alves <palves@redhat.com>
5934
5935 PR remote/18965
5936 * remote-utils.c (prepare_resume_reply): Merge
5937 TARGET_WAITKIND_VFORK_DONE switch case with the
5938 TARGET_WAITKIND_FORKED case.
5939
7c5d0fad
YQ
59402015-09-15 Yao Qi <yao.qi@linaro.org>
5941
5942 * server.c (handle_query): Check string comparison using
5943 "else if" instead of "if".
5944
750ce8d1
YQ
59452015-09-15 Yao Qi <yao.qi@linaro.org>
5946
5947 * server.c (vCont_supported): New global variable.
5948 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5949 matches. Append ";vContSupported+" to own_buf.
5950 (handle_v_requests): Append ";s;S" to own_buf if target supports
5951 hardware single step or vCont_supported is false.
5952 (capture_main): Set vCont_supported to zero.
5953
70b90b91
YQ
59542015-09-15 Yao Qi <yao.qi@linaro.org>
5955
5956 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5957 it to ...
5958 (linux_supports_hardware_single_step): ... New function.
5959 (linux_target_ops): Update.
5960 * lynx-low.c (lynx_target_ops): Set field
5961 supports_hardware_single_step to target_can_do_hardware_single_step.
5962 * nto-low.c (nto_target_ops): Likewise.
5963 * spu-low.c (spu_target_ops): Likewise.
5964 * win32-low.c (win32_target_ops): Likewise.
5965 * target.c (target_can_do_hardware_single_step): New function.
5966 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5967 Remove. <supports_hardware_single_step>: New field.
5968 (target_supports_conditional_breakpoints): Remove.
5969 (target_supports_hardware_single_step): New macro.
5970 (target_can_do_hardware_single_step): Declare.
5971 * server.c (handle_query): Use target_supports_hardware_single_step
5972 instead of target_supports_conditional_breakpoints.
5973
ade90bde
YQ
59742015-09-15 Yao Qi <yao.qi@linaro.org>
5975
5976 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5977 function.
5978 (struct linux_target_ops the_low_target): Install
5979 aarch64_linux_siginfo_fixup.
5980
94585166
DB
59812015-09-11 Don Breazeal <donb@codesourcery.com>
5982 Luis Machado <lgustavo@codesourcery.com>
5983
5984 * linux-low.c (linux_mourn): Static declaration.
5985 (linux_arch_setup): Move in front of
5986 handle_extended_wait.
5987 (linux_arch_setup_thread): New function.
5988 (handle_extended_wait): Handle exec events. Call
5989 linux_arch_setup_thread. Make event_lwp argument a
5990 pointer-to-a-pointer.
5991 (check_zombie_leaders): Do not check stopped threads.
5992 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5993 (linux_low_filter_event): Add lwp and thread for exec'ing
5994 non-leader thread if leader thread has been deleted.
5995 Refactor code into linux_arch_setup_thread and call it.
5996 Pass child lwp pointer by reference to handle_extended_wait.
5997 (linux_wait_for_event_filtered): Update comment.
5998 (linux_wait_1): Prevent clobbering exec event status.
5999 (linux_supports_exec_events): New function.
6000 (linux_target_ops) <supports_exec_events>: Initialize new member.
6001 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6002 new member.
6003 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6004 * server.c (report_exec_events): New global variable.
6005 (handle_query): Handle qSupported query for exec-events feature.
6006 (captured_main): Initialize report_exec_events.
6007 * server.h (report_exec_events): Declare new global variable.
6008 * target.h (struct target_ops) <supports_exec_events>: New
6009 member.
6010 (target_supports_exec_events): New macro.
6011 * win32-low.c (win32_target_ops) <supports_exec_events>:
6012 Initialize new member.
6013
0568462b
MM
60142015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6015
6016 * linux-low.c (linux_low_enable_btrace): Remove.
6017 (linux_target_ops): Replace linux_low_enable_btrace with
6018 linux_enable_btrace.
6019
39edd165
YQ
60202015-09-03 Yao Qi <yao.qi@linaro.org>
6021
6022 * linux-aarch64-low.c (aarch64_insert_point): Call
6023 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6024 returns true.
6025
1db33b5a
UW
60262015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6027
6028 * linux-low.c (check_stopped_by_breakpoint): Use
6029 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6030
ab290430
PA
60312015-08-27 Pedro Alves <palves@redhat.com>
6032
6033 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6034
8d749320
SM
60352015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6036
6711b7f8
SM
6037 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6038 the XNEW-family equivalent.
8d749320
SM
6039 (compile_bytecodes): Likewise.
6040 * dll.c (loaded_dll): Likewise.
6041 * event-loop.c (append_callback_event): Likewise.
6042 (create_file_handler): Likewise.
6043 (create_file_event): Likewise.
6044 * hostio.c (handle_open): Likewise.
6045 * inferiors.c (add_thread): Likewise.
6046 (add_process): Likewise.
6047 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6048 * linux-arm-low.c (arm_new_process): Likewise.
6049 (arm_new_thread): Likewise.
6050 * linux-low.c (add_to_pid_list): Likewise.
6051 (linux_add_process): Likewise.
6052 (handle_extended_wait): Likewise.
6053 (add_lwp): Likewise.
6054 (enqueue_one_deferred_signal): Likewise.
6055 (enqueue_pending_signal): Likewise.
6056 (linux_resume_one_lwp_throw): Likewise.
6057 (linux_resume_one_thread): Likewise.
6058 (linux_read_memory): Likewise.
6059 (linux_write_memory): Likewise.
6060 * linux-mips-low.c (mips_linux_new_process): Likewise.
6061 (mips_linux_new_thread): Likewise.
6062 (mips_add_watchpoint): Likewise.
6063 * linux-x86-low.c (initialize_low_arch): Likewise.
6064 * lynx-low.c (lynx_add_process): Likewise.
6065 * mem-break.c (set_raw_breakpoint_at): Likewise.
6066 (set_breakpoint): Likewise.
6067 (add_condition_to_breakpoint): Likewise.
6068 (add_commands_to_breakpoint): Likewise.
6069 (clone_agent_expr): Likewise.
6070 (clone_one_breakpoint): Likewise.
6071 * regcache.c (new_register_cache): Likewise.
6072 * remote-utils.c (look_up_one_symbol): Likewise.
6073 * server.c (queue_stop_reply): Likewise.
6074 (start_inferior): Likewise.
6075 (queue_stop_reply_callback): Likewise.
6076 (handle_target_event): Likewise.
6077 * spu-low.c (fetch_ppc_memory): Likewise.
6078 (store_ppc_memory): Likewise.
6079 * target.c (set_target_ops): Likewise.
6080 * thread-db.c (thread_db_load_search): Likewise.
6081 (try_thread_db_load_1): Likewise.
6082 * tracepoint.c (add_tracepoint): Likewise.
6083 (add_tracepoint_action): Likewise.
6084 (create_trace_state_variable): Likewise.
6085 (cmd_qtdpsrc): Likewise.
6086 (cmd_qtro): Likewise.
6087 (add_while_stepping_state): Likewise.
6088 * win32-low.c (child_add_thread): Likewise.
6089 (get_image_name): Likewise.
6090
ed8b7b42
YQ
60912015-08-25 Yao Qi <yao.qi@linaro.org>
6092
6093 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6094
db3cb7cb
YQ
60952015-08-25 Yao Qi <yao.qi@linaro.org>
6096
6097 * Makefile.in (aarch64-linux.o): New rule.
6098 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6099 srv_tgtobj.
6100 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6101 (aarch64_init_debug_reg_state): Make it extern.
6102 (aarch64_linux_prepare_to_resume): Remove.
6103
f6011a1c
YQ
61042015-08-25 Yao Qi <yao.qi@linaro.org>
6105
6106 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6107 lwp_arch_private_info and ptid_of_lwp.
6108
88e2cf7e
YQ
61092015-08-25 Yao Qi <yao.qi@linaro.org>
6110
6111 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6112 Find proc_info by find_process_pid. All callers updated.
6113
5e35436e
YQ
61142015-08-25 Yao Qi <yao.qi@linaro.org>
6115
6116 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6117 Remove.
6118 (debug_reg_change_callback): Remove.
6119 (aarch64_notify_debug_reg_change): Remove.
6120
4a8a7965
YQ
61212015-08-25 Yao Qi <yao.qi@linaro.org>
6122
6123 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6124 Call current_lwp_ptid.
6125
32a271ee
YQ
61262015-08-25 Yao Qi <yao.qi@linaro.org>
6127
6128 * linux-aarch64-low.c (debug_reg_change_callback): Use
6129 debug_printf.
6130
0d51c8d7
YQ
61312015-08-25 Yao Qi <yao.qi@linaro.org>
6132
6133 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6134
31a43dd5
YQ
61352015-08-25 Yao Qi <yao.qi@linaro.org>
6136
6137 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6138
8ee52567
YQ
61392015-08-25 Yao Qi <yao.qi@linaro.org>
6140
6141 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6142 the code.
6143
ff3f0f45
YQ
61442015-08-25 Yao Qi <yao.qi@linaro.org>
6145
6146 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6147 Remove.
6148 (debug_reg_change_callback): Remove argument entry and add argument
6149 lwp. Remove local variable thread. Don't print thread id in the
6150 debugging output. Don't check whether pid of thread equals to pid.
6151 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6152 iterate_over_lwps instead find_inferior.
6153
3d40fbb5
PA
61542015-08-24 Pedro Alves <palves@redhat.com>
6155
6156 * inferiors.c (get_first_process): New function.
6157 * inferiors.h (get_first_process): New declaration.
6158 * remote-utils.c (read_ptid): Default to the first process in the
6159 list, instead of to the current thread's process.
6160
438e1e42
PA
61612015-08-24 Pedro Alves <palves@redhat.com>
6162
6163 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6164 * event-loop.c: Likewise.
6165 * remote-utils.c: Likewise.
6166 * tracepoint.c: Likewise.
6167
a8c6d4fc
PA
61682015-08-24 Pedro Alves <palves@redhat.com>
6169
6170 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6171 ptid_get_lwp.
6172
99b0bb12
PA
61732015-08-21 Pedro Alves <palves@redhat.com>
6174
6175 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6176 instead of literal 1.
6177
f8904751
PA
61782015-08-21 Pedro Alves <palves@redhat.com>
6179
6180 * tdesc.c (default_description): Explicitly zero-initialize.
6181
465a859e
PA
61822015-08-21 Pedro Alves <palves@redhat.com>
6183
6184 PR gdb/18749
6185 * inferiors.c (remove_thread): Discard any pending stop reply for
6186 this thread.
6187 * server.c (remove_all_on_match_pid): Rename to ...
6188 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6189 instead of a pid.
6190 (discard_queued_stop_replies): Change parameter to a ptid. Now
6191 extern.
6192 (handle_v_kill, kill_inferior_callback, captured_main)
6193 (process_serial_event): Adjust.
6194 * server.h (discard_queued_stop_replies): Declare.
6195
f0db101d
PA
61962015-08-21 Pedro Alves <palves@redhat.com>
6197
6198 * linux-low.c (wait_for_sigstop): Always switch to no thread
6199 selected if the previously current thread dies.
6200 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6201 process instead of the current thread's.
6202 * remote-utils.c (input_interrupt): Don't check if there's no
6203 current thread.
6204 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6205 current thread to the general thread fails, error out.
6206 (handle_qxfer_auxv, handle_qxfer_libraries)
6207 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6208 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6209 (handle_query): Check if there's a thread selected instead of
6210 checking whether there's any thread in the thread list.
6211 (handle_qxfer_threads, handle_qxfer_btrace)
6212 (handle_qxfer_btrace_conf): Don't error out early if there's no
6213 thread in the thread list.
6214 (handle_v_cont, myresume): Don't set the current thread to the
6215 continue thread.
6216 (process_serial_event) <Hg handling>: Also set thread_id if the
6217 previous general thread is still alive.
6218 (process_serial_event) <g/G handling>: If setting the current
6219 thread to the general thread fails, error out.
6220 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6221 thread's lwp instead of the current thread's.
6222 * target.c (set_desired_thread): If the desired thread was not
6223 found, leave the current thread pointing to NULL. Return an int
6224 (boolean) indicating success.
6225 * target.h (set_desired_thread): Change return type to int.
6226
40045d91
MF
62272015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6228
6229 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6230 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6231 #includes.
6232 (ps_get_thread_area): New function.
6233
45face3b
GB
62342015-08-19 Gary Benson <gbenson@redhat.com>
6235
6236 * hostio.c (handle_pread): Do not attempt to read more data
6237 than hostio_reply_with_data can fit in a packet.
6238
16d5f642
JB
62392015-08-18 Joel Brobecker <brobecker@adacore.com>
6240
6241 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6242
a738da3a
MF
62432015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6244
6245 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6246
33ebda9d
PA
62472015-08-06 Pedro Alves <palves@redhat.com>
6248
6249 * tracepoint.c (expr_eval_result): Now an int.
6250
a44892be
PA
62512015-08-06 Pedro Alves <palves@redhat.com>
6252
6253 * gdbthread.h (struct regcache): Forward declare.
6254 (struct thread_info) <regcache_data>: Now a struct regcache
6255 pointer.
6256 * inferiors.c (inferior_regcache_data)
6257 (set_inferior_regcache_data): Now work with struct regcache
6258 pointers.
6259 * inferiors.h (struct regcache): Forward declare.
6260 (inferior_regcache_data, set_inferior_regcache_data): Now work
6261 with struct regcache pointers.
6262 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6263 (free_register_cache_thread): Remove struct regcache pointer
6264 casts.
6265
608a1e46
PA
62662015-08-06 Pedro Alves <palves@redhat.com>
6267
6268 * server.c (captured_main): On error, print the exception message
6269 to stderr, and if run_once is set, throw a quit.
6270
f0ce0d3a
PA
62712015-08-06 Pedro Alves <palves@redhat.com>
6272
6273 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6274 the current thread.
6275
bf47e248
PA
62762015-08-06 Pedro Alves <palves@redhat.com>
6277
6278 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6279 reading beyond the passed in buffer length.
6280
b6b9ffcc
PL
62812015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6282
6283 * tracepoint.c (symbol_list) <required>: Remove.
6284
863d01bd
PA
62852015-08-06 Pedro Alves <palves@redhat.com>
6286
6287 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6288 count if stopping and suspending threads.
6289 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6290 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6291 (linux_detach): Complete an ongoing step-over.
6292 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6293 throughout.
6294 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6295 (linux_wait_1): If passing a signal to the inferior after
6296 finishing a step-over, unsuspend and re-resume all lwps. If we
6297 see a single-step event but the thread should be continuing, don't
6298 pass the trap to gdb.
6299 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6300 internal_error instead of gdb_assert.
6301 (enqueue_pending_signal): New function.
6302 (check_ptrace_stopped_lwp_gone): Add debug output.
6303 (start_step_over): Use internal_error instead of gdb_assert.
6304 (complete_ongoing_step_over): New function.
6305 (linux_resume_one_thread): Don't resume a suspended thread.
6306 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6307 it stepping.
6308
00db26fa
PA
63092015-08-06 Pedro Alves <palves@redhat.com>
6310
6311 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6312 (linux_thread_alive): Use lwp_is_marked_dead.
6313 (extended_event_reported): Delete.
6314 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6315 instead of extended_event_reported.
6316 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6317 as well.
6318 (lwp_is_marked_dead): New function.
6319 (lwp_running): Use lwp_is_marked_dead.
6320 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6321 comment.
6322
ad071a30
PA
63232015-08-06 Pedro Alves <palves@redhat.com>
6324
6325 * linux-low.c (linux_wait_1): Move fork event output out of the
6326 !report_to_gdb check. Pass event_child->waitstatus to
6327 target_waitstatus_to_string instead of ourstatus.
6328
524b57e6
YQ
63292015-08-04 Yao Qi <yao.qi@linaro.org>
6330
6331 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6332 if current_thread is 32 bit.
6333
6085d6f6
YQ
63342015-08-04 Yao Qi <yao.qi@linaro.org>
6335
6336 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6337 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6338 * server.c (extended_protocol): Remove "static".
6339 * server.h (extended_protocol): Declare it.
6340
8a7e4587
YQ
63412015-08-04 Yao Qi <yao.qi@linaro.org>
6342
6343 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6344 both aarch64 and aarch32.
6345 (aarch64_set_pc): Likewise.
6346
3b53ae99
YQ
63472015-08-04 Yao Qi <yao.qi@linaro.org>
6348
6349 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6350 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6351 arm-with-neon.xml to srv_xmlfiles.
6352 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6353 (is_64bit_tdesc): New function.
6354 (aarch64_linux_read_description): New function.
6355 (aarch64_arch_setup): Call aarch64_linux_read_description.
6356 (regs_info): Rename to regs_info_aarch64.
6357 (aarch64_regs_info): Return right regs_info.
6358 (initialize_low_arch): Call initialize_low_arch_aarch32.
6359
bd9e6534
YQ
63602015-08-04 Yao Qi <yao.qi@linaro.org>
6361
6362 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6363 * linux-aarch32-low.c: New file.
6364 * linux-aarch32-low.h: New file.
6365 * linux-arm-low.c (arm_fill_gregset): Move it to
6366 linux-aarch32-low.c.
6367 (arm_store_gregset): Likewise.
6368 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6369 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6370 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6371 (regs_info): Rename to regs_info_arm.
6372 (arm_regs_info): Return regs_info_aarch32 if
6373 have_ptrace_getregset is 1 and target description is
6374 arm_with_neon or arm_with_vfpv3.
6375 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6376 Call initialize_low_arch_aarch32 instead.
6377
ded48a5e
YQ
63782015-08-04 Yao Qi <yao.qi@linaro.org>
6379
6380 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6381 * linux-low.c: ... here.
6382 * linux-low.h (have_ptrace_getregset): Declare it.
6383
96e9210f
PA
63842015-08-04 Pedro Alves <palves@redhat.com>
6385
6386 * thread-db.c (struct thread_db): Use new typedefs.
6387 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6388 CHK calls.
6389 (disable_thread_event_reporting): Cast result of dlsym to
6390 destination function pointer type.
6391 (thread_db_mourn): Use td_ta_delete_ftype.
6392
af60a1ef
SL
63932015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6394
6395 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6396 arch variant.
6397 (CDX_BREAKPOINT): Define for R2.
6398 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6399 (the_low_target): Add comments.
6400
e8b41681
YQ
64012015-07-30 Yao Qi <yao.qi@linaro.org>
6402
6403 * linux-arm-low.c (arm_hwcap): Remove it.
6404 (arm_read_description): New local variable arm_hwcap. Don't
6405 set arm_hwcap to zero.
6406
89abb039
YQ
64072015-07-30 Yao Qi <yao.qi@linaro.org>
6408
6409 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6410 Use regcache->tdesc instead.
6411 (arm_store_wmmxregset): Likewise.
6412 (arm_fill_vfpregset): Likewise.
6413 (arm_store_vfpregset): Likewise.
6414
deca266c
YQ
64152015-07-30 Yao Qi <yao.qi@linaro.org>
6416
6417 * linux-arm-low.c: Include arch/arm.h.
6418 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6419 (arm_store_gregset): Likewise.
6420
aa58a496
SM
64212015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6422
6423 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6424 ptrace's 4th parameter.
6425
50904b25
YQ
64262015-07-27 Yao Qi <yao.qi@linaro.org>
6427
6428 * configure.srv (case aarch64*-*-linux*): Don't set
6429 srv_linux_usrregs.
6430
5826e159
PA
64312015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6432
6433 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6434 sys/ptrace.h.
6435 * linux-arm-low.c: Likewise.
6436 * linux-cris-low.c: Likewise.
6437 * linux-crisv32-low.c: Likewise.
6438 * linux-low.c: Likewise.
6439 * linux-m68k-low.c: Likewise.
6440 * linux-mips-low.c: Likewise.
6441 * linux-nios2-low.c: Likewise.
6442 * linux-s390-low.c: Likewise.
6443 * linux-sparc-low.c: Likewise.
6444 * linux-tic6x-low.c: Likewise.
6445 * linux-tile-low.c: Likewise.
6446 * linux-x86-low.c: Likewise.
6447
54019719
PA
64482015-07-24 Pedro Alves <palves@redhat.com>
6449
6450 * config.in: Regenerate.
6451 * configure: Regenerate.
6452
eb7aa561
PA
64532015-07-24 Pedro Alves <palves@redhat.com>
6454
6455 * acinclude.m4: Include ../ptrace.m4.
6456 * configure.ac: Call GDB_AC_PTRACE.
6457 * config.in, configure: Regenerate.
6458
55d7b841
YQ
64592015-07-24 Yao Qi <yao.qi@linaro.org>
6460
6461 * linux-low.c (linux_create_inferior): Remove setting to
6462 proc->priv->new_inferior.
6463 (linux_attach): Likewise.
6464 (linux_low_filter_event): Likewise.
6465 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6466
c06cbd92
YQ
64672015-07-24 Yao Qi <yao.qi@linaro.org>
6468
6469 * linux-low.c (linux_arch_setup): New function.
6470 (linux_low_filter_event): If proc->tdesc is NULL and
6471 proc->attached is true, call the_low_target.arch_setup.
6472 Otherwise, keep status pending, and return.
6473 (linux_resume_one_lwp_throw): Don't call get_pc if
6474 thread->while_stepping isn't NULL. Don't call
6475 get_thread_regcache if proc->tdesc is NULL.
6476 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6477 (linux_target_ops): Install arch_setup.
6478 * server.c (start_inferior): Call the_target->arch_setup.
6479 * target.h (struct target_ops) <arch_setup>: New field.
6480 (target_arch_setup): New marco.
6481 * lynx-low.c (lynx_target_ops): Update.
6482 * nto-low.c (nto_target_ops): Update.
6483 * spu-low.c (spu_target_ops): Update.
6484 * win32-low.c (win32_target_ops): Update.
6485
5ae3ebba
YQ
64862015-07-24 Yao Qi <yao.qi@linaro.org>
6487
6488 * linux-low.c (linux_add_process): Don't set
6489 proc->priv->new_inferior.
6490 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6491 (linux_attach): Likewise.
6492
eb97750b
YQ
64932015-07-24 Yao Qi <yao.qi@linaro.org>
6494
6495 * server.c (start_inferior): Code refactor.
6496
51aee833
YQ
64972015-07-24 Yao Qi <yao.qi@linaro.org>
6498
6499 * server.c (process_serial_event): Set general_thread.
6500
af1b22f3
YQ
65012015-07-21 Yao Qi <yao.qi@linaro.org>
6502
6503 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6504 aarch64_linux_get_debug_reg_capacity.
6505
554717a3
YQ
65062015-07-17 Yao Qi <yao.qi@linaro.org>
6507
6508 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6509 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6510 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6511 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6512 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6513 (AARCH64_HWP_ALIGNMENT): Likewise.
6514 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6515 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6516 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6517 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6518 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6519 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6520 (struct aarch64_debug_reg_state): Likewise.
6521 (struct arch_lwp_info): Likewise.
6522 (aarch64_align_watchpoint): Likewise.
6523 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6524 (aarch64_watchpoint_length): Likewise.
6525 (aarch64_point_encode_ctrl_reg): Likewise
6526 (aarch64_point_is_aligned): Likewise.
6527 (aarch64_align_watchpoint): Likewise.
6528 (aarch64_linux_set_debug_regs):
6529 (aarch64_dr_state_insert_one_point): Likewise.
6530 (aarch64_dr_state_remove_one_point): Likewise.
6531 (aarch64_handle_breakpoint): Likewise.
6532 (aarch64_handle_aligned_watchpoint): Likewise.
6533 (aarch64_handle_unaligned_watchpoint): Likewise.
6534 (aarch64_handle_watchpoint): Likewise.
6535
c67ca4de
YQ
65362015-07-17 Yao Qi <yao.qi@linaro.org>
6537
6538 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6539 and don't aarch64_get_debug_reg_state. All callers update.
6540 (aarch64_handle_aligned_watchpoint): Likewise.
6541 (aarch64_handle_unaligned_watchpoint): Likewise.
6542 (aarch64_handle_watchpoint): Likewise.
6543 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6544 (aarch64_remove_point): Likewise.
6545
25abf979
YQ
65462015-07-17 Yao Qi <yao.qi@linaro.org>
6547
6548 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6549 debug_printf.
6550 (aarch64_handle_unaligned_watchpoint): Likewise.
6551
db1ff28b
JK
65522015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6553
6554 Revert the previous 3 commits:
6555 Move gdb_regex* to common/
6556 Move linux_find_memory_regions_full & co.
6557 gdbserver build-id attribute generator
6558
700ca40f
JK
65592015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6560 Jan Kratochvil <jan.kratochvil@redhat.com>
6561
6562 gdbserver build-id attribute generator.
6563 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6564 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6565 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6566 (find_phdr): New.
6567 (get_dynamic): Use find_pdhr to traverse program headers.
6568 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6569 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6570 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6571 (get_hex_build_id): New.
6572 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6573 to reply XML document.
6574
9904185c
JK
65752015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6576 Jan Kratochvil <jan.kratochvil@redhat.com>
6577
6578 * target.c: Include target/target-utils.h and fcntl.h.
6579 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6580 (target_fileio_read_stralloc): New functions.
6581
6e5b4429
JK
65822015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6583
6584 * Makefile.in (OBS): Add gdb_regex.o.
6585 (gdb_regex.o): New.
6586 * config.in: Rebuilt.
6587 * configure: Rebuilt.
6588
ddc98fbf
JK
65892015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6590 Jan Kratochvil <jan.kratochvil@redhat.com>
6591
6592 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6593 * Makefile.in (OBS): Add target-utils.o.
6594 (linux-maps.o, target-utils.o): New.
6595 * configure.srv (srv_linux_obj): Add linux-maps.o.
6596
e57bb7a0
PL
65972015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6598
6599 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6600 function, return 1.
6601 (the_low_target): Install it.
6602
586b02a9
PA
66032015-07-14 Pedro Alves <palves@redhat.com>
6604
6605 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6606 Instead, ignore ECHILD, and throw an error for other errnos.
6607
58c1b36c
PA
66082015-07-10 Pedro Alves <palves@redhat.com>
6609
6610 * event-loop.c (struct callback_event) <data>: Change type to
6611 gdb_client_data instance instead of gdb_client_data pointer.
6612 (append_callback_event): Adjust.
6613
421530db
PL
66142015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6615
6616 * linux-aarch64-low.c: Add comments for each linux_target_ops
6617 method. Remove comments already covered in target_ops and
6618 linux_target_ops definitions.
6619 (the_low_target): Add comments for each unimplemented method.
6620
c2d65f38
YQ
66212015-07-09 Yao Qi <yao.qi@linaro.org>
6622
6623 * linux-aarch64-low.c (aarch64_regmap): Remove.
6624 (aarch64_usrregs_info): Remove.
6625 (regs_info): Set field usrregs to NULL.
6626
b20a6524
MM
66272015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6628
6629 * linux-low.c: Include "rsp-low.h"
6630 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6631 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6632 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6633 (handle_btrace_enable_pt): New.
6634 (handle_btrace_general_set): Support "pt".
6635 (handle_btrace_conf_general_set): Support "pt:size".
6636
96c97461
PL
66372015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6638
6639 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6640 Z_PACKET_SW_BP.
6641
37d66942
PL
66422015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6643
6644 * linux-aarch64-low.c: Remove comment about endianness.
6645 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6646 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6647 memcmp.
6648
dc06243f
GB
66492015-06-24 Gary Benson <gbenson@redhat.com>
6650
6651 * linux-i386-ipa.c (stdint.h): Do not include.
6652 * lynx-i386-low.c (stdint.h): Likewise.
6653 * lynx-ppc-low.c (stdint.h): Likewise.
6654 * mem-break.c (stdint.h): Likewise.
6655 * thread-db.c (stdint.h): Likewise.
6656 * tracepoint.c (stdint.h): Likewise.
6657 * win32-low.c (stdint.h): Likewise.
6658
124e13d9
SM
66592015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6660
6661 * server.c (write_qxfer_response): Update call to
6662 remote_escape_output.
6663
909c2cda
JK
66642015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6665 Jan Kratochvil <jan.kratochvil@redhat.com>
6666
6667 Merge multiple hex conversions.
6668 * gdbreplay.c (tohex): Rename to 'fromhex'.
6669 (logchar): Use fromhex.
6670
24c05f46
JK
66712015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6672
6673 * server.c (handle_qxfer_libraries): Set `version' attribute for
6674 <library-list>.
6675
14d2069a
GB
66762015-06-10 Gary Benson <gbenson@redhat.com>
6677
6678 * target.h (struct target_ops) <multifs_open>: New field.
6679 <multifs_unlink>: Likewise.
6680 <multifs_readlink>: Likewise.
6681 * linux-low.c (nat/linux-namespaces.h): New include.
6682 (linux_target_ops): Initialize the_target->multifs_open,
6683 the_target->multifs_unlink and the_target->multifs_readlink.
6684 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6685 * hostio.c (hostio_fs_pid): New static variable.
6686 (hostio_handle_new_gdb_connection): New function.
6687 (handle_setfs): Likewise.
6688 (handle_open): Use the_target->multifs_open as appropriate.
6689 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6690 (handle_readlink): Use the_target->multifs_readlink as
6691 appropriate.
6692 (handle_vFile): Handle vFile:setfs packets.
6693 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6694 after target_handle_new_gdb_connection.
6695
4b8b5e72
GB
66962015-06-10 Gary Benson <gbenson@redhat.com>
6697
6698 * configure.ac (AC_CHECK_FUNCS): Add setns.
6699 * config.in: Regenerate.
6700 * configure: Likewise.
6701 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6702 (linux-namespaces.o): New rule.
6703 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6704
3ac2e371
GB
67052015-06-09 Gary Benson <gbenson@redhat.com>
6706
6707 * hostio.c (handle_open): Process mode argument with
6708 fileio_to_host_mode.
6709
ca9b78ce
YQ
67102015-06-01 Yao Qi <yao.qi@linaro.org>
6711
6712 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6713 * linux-x86-low.c: Likewise.
6714
bfacd19d
DB
67152015-05-28 Don Breazeal <donb@codesourcery.com>
6716
6717 * linux-low.c (handle_extended_wait): Initialize
6718 thread_info.last_resume_kind for new fork children.
6719
452003ef
PA
67202015-05-15 Pedro Alves <palves@redhat.com>
6721
6722 * target.h (target_handle_new_gdb_connection): Rewrite using if
6723 wrapped in do/while.
6724
1041a03c
JB
67252015-05-14 Joel Brobecker <brobecker@adacore.com>
6726
6727 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6728 * configure, config.in: Regenerate.
6729 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6730 Declare typedef.
6731
c269dbdb
DB
67322015-05-12 Don Breazeal <donb@codesourcery.com>
6733
6734 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6735 PTRACE_EVENT_VFORK_DONE.
6736 (linux_low_ptrace_options, extended_event_reported): Add vfork
6737 events.
6738 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6739 and "vforkdone" for RSP 'T' Stop Reply Packet.
6740 * server.h (report_vfork_events): Declare
6741 global variable.
6742
3a8a0396
DB
67432015-05-12 Don Breazeal <donb@codesourcery.com>
6744
6745 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6746 (the_low_target) <new_fork>: Initialize new member.
6747 * linux-arm-low.c (arm_new_fork): New function.
6748 (the_low_target) <new_fork>: Initialize new member.
6749 * linux-low.c (handle_extended_wait): Call new target function
6750 new_fork.
6751 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6752 * linux-mips-low.c (mips_add_watchpoint): New function
6753 extracted from mips_insert_point.
6754 (the_low_target) <new_fork>: Initialize new member.
6755 (mips_linux_new_fork): New function.
6756 (mips_insert_point): Call mips_add_watchpoint.
6757 * linux-x86-low.c (x86_linux_new_fork): New function.
6758 (the_low_target) <new_fork>: Initialize new member.
6759
de0d863e
DB
67602015-05-12 Don Breazeal <donb@codesourcery.com>
6761
6762 * linux-low.c (handle_extended_wait): Implement return value,
6763 rename argument 'event_child' to 'event_lwp', handle
6764 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6765 (linux_low_ptrace_options): New function.
6766 (linux_low_filter_event): Call linux_low_ptrace_options,
6767 use different argument fo linux_enable_event_reporting,
6768 use return value from handle_extended_wait.
6769 (extended_event_reported): New function.
6770 (linux_wait_1): Call extended_event_reported and set
6771 status to report fork events.
6772 (linux_write_memory): Add pid to debug message.
6773 (reset_lwp_ptrace_options_callback): New function.
6774 (linux_handle_new_gdb_connection): New function.
6775 (linux_target_ops): Initialize new structure member.
6776 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6777 * lynx-low.c: Initialize new structure member.
6778 * remote-utils.c (prepare_resume_reply): Implement stop reason
6779 "fork" for "T" stop message.
6780 * server.c (handle_query): Call handle_new_gdb_connection.
6781 * server.h (report_fork_events): Declare global flag.
6782 * target.h (struct target_ops) <handle_new_gdb_connection>:
6783 New member.
6784 (target_handle_new_gdb_connection): New macro.
6785 * win32-low.c: Initialize new structure member.
6786
ddcbc397
DB
67872015-05-12 Don Breazeal <donb@codesourcery.com>
6788
6789 * mem-break.c (APPEND_TO_LIST): Define macro.
6790 (clone_agent_expr): New function.
6791 (clone_one_breakpoint): New function.
6792 (clone_all_breakpoints): New function.
6793 * mem-break.h: Declare new functions.
6794
89245bc0
DB
67952015-05-12 Don Breazeal <donb@codesourcery.com>
6796
6797 * linux-low.c (linux_supports_fork_events): New function.
6798 (linux_supports_vfork_events): New function.
6799 (linux_target_ops): Initialize new structure members.
6800 (initialize_low): Call linux_check_ptrace_features.
6801 * lynx-low.c (lynx_target_ops): Initialize new structure
6802 members.
6803 * server.c (report_fork_events, report_vfork_events):
6804 New global flags.
6805 (handle_query): Add new features to qSupported packet and
6806 response.
6807 (captured_main): Initialize new global variables.
6808 * target.h (struct target_ops) <supports_fork_events>:
6809 New member.
6810 <supports_vfork_events>: New member.
6811 (target_supports_fork_events): New macro.
6812 (target_supports_vfork_events): New macro.
6813 * win32-low.c (win32_target_ops): Initialize new structure
6814 members.
6815
835205d0
GB
68162015-05-12 Gary Benson <gbenson@redhat.com>
6817
6818 * server.c (handle_qxfer_exec_file): Use current process
6819 if annex is empty.
6820
21e94bd9
SL
68212015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6822
6823 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6824 Remove HAVE_PTRACE_GETREGS conditionals.
6825 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6826 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6827
45614f15
YQ
68282015-05-08 Yao Qi <yao.qi@linaro.org>
6829
6830 * linux-low.c (linux_supports_conditional_breakpoints): New
6831 function.
6832 (linux_target_ops): Install new target method.
6833 * lynx-low.c (lynx_target_ops): Install NULL hook for
6834 supports_conditional_breakpoints.
6835 * nto-low.c (nto_target_ops): Likewise.
6836 * spu-low.c (spu_target_ops): Likewise.
6837 * win32-low.c (win32_target_ops): Likewise.
6838 * server.c (handle_query): Check
6839 target_supports_conditional_breakpoints.
6840 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6841 New field.
6842 (target_supports_conditional_breakpoints): New macro.
6843
80ad801e
PA
68442015-05-06 Pedro Alves <palves@redhat.com>
6845
6846 PR server/18081
6847 * server.c (start_inferior): If the process exits, mourn it.
6848
819843c7
GB
68492015-04-21 Gary Benson <gbenson@redhat.com>
6850
6851 * hostio.c (fileio_open_flags_to_host): Factored out to
6852 fileio_to_host_openflags in common/fileio.c. Single use
6853 updated.
6854
a2d5a9d7
MF
68552015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6856
6857 * linux-xtensa-low.c (xtensa_fill_gregset)
6858 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6859 XCHAL_HAVE_LOOP.
6860
deb44829
MF
68612015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6862
6863 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6864 (regs_info): Replace usrregs pointer with NULL.
6865
e57f1de3
GB
68662015-04-17 Gary Benson <gbenson@redhat.com>
6867
6868 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6869 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6870 * server.c (handle_qxfer_exec_file): New function.
6871 (qxfer_packets): Add exec-file entry.
6872 (handle_query): Report qXfer:exec-file:read as supported packet.
6873
62828379
RN
68742015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6875
6876 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6877
b88bb450
GB
68782015-04-09 Gary Benson <gbenson@redhat.com>
6879
6880 * hostio-errno.c (errno_to_fileio_error): Remove function.
6881 Update caller to use remote_fileio_to_fio_error.
6882
c8f4bfdd
YQ
68832015-04-09 Yao Qi <yao.qi@linaro.org>
6884
6885 * linux-low.c (linux_insert_point): Call
6886 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6887 (linux_remove_point): Call remove_memory_breakpoint if type is
6888 raw_bkpt_type_sw.
6889 * linux-x86-low.c (x86_insert_point): Don't call
6890 insert_memory_breakpoint.
6891 (x86_remove_point): Don't call remove_memory_breakpoint.
6892
41f98f02
PA
68932015-04-01 Pedro Alves <palves@redhat.com>
6894 Cleber Rosa <crosa@redhat.com>
6895
6896 * server.c (gdbserver_usage): Reorganize and extend the usage
6897 message.
6898
2bf6fb9d
PA
68992015-03-24 Pedro Alves <palves@redhat.com>
6900
6901 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6902 output. Also dump TRAP_TRACE.
6903 (linux_low_filter_event): In debug output, distinguish a
6904 resume_stop SIGSTOP from a delayed SIGSTOP.
6905
369f6daa
GB
69062015-03-24 Gary Benson <gbenson@redhat.com>
6907
6908 * linux-x86-low.c (x86_linux_new_thread): Moved to
6909 nat/x86-linux.c.
6910 (x86_linux_prepare_to_resume): Likewise.
6911
8e5d4070
GB
69122015-03-24 Gary Benson <gbenson@redhat.com>
6913
6914 * Makefile.in (x86-linux-dregs.o): New rule.
6915 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6916 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6917 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6918 (x86_linux_dr_get): Likewise.
6919 (x86_linux_dr_set): Likewise.
6920 (update_debug_registers_callback): Likewise.
6921 (x86_linux_dr_set_addr): Likewise.
6922 (x86_linux_dr_get_addr): Likewise.
6923 (x86_linux_dr_set_control): Likewise.
6924 (x86_linux_dr_get_control): Likewise.
6925 (x86_linux_dr_get_status): Likewise.
6926 (x86_linux_update_debug_registers): Likewise.
6927
2b95d440
GB
69282015-03-24 Gary Benson <gbenson@redhat.com>
6929
6930 * linux-x86-low.c (x86_linux_update_debug_registers):
6931 New function, factored out from...
6932 (x86_linux_prepare_to_resume): ...this.
6933
14b0bc68
GB
69342015-03-24 Gary Benson <gbenson@redhat.com>
6935
6936 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6937 (x86_linux_dr_set): Likewise.
6938 (update_debug_registers_callback): Likewise.
6939 (x86_linux_dr_set_addr): Likewise.
6940 (x86_linux_dr_get_addr): Likewise.
6941 (x86_linux_dr_set_control): Likewise.
6942 (x86_linux_dr_get_control): Likewise.
6943 (x86_linux_dr_get_status): Likewise.
6944 (x86_linux_prepare_to_resume): Likewise.
6945
5dfe6ca8
GB
69462015-03-24 Gary Benson <gbenson@redhat.com>
6947
6948 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6949 Use perror_with_name. Pass string through gettext.
6950 (x86_linux_dr_set): Likewise.
6951
d33472ad
GB
69522015-03-24 Gary Benson <gbenson@redhat.com>
6953
6954 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6955 (x86_linux_dr_set_addr): ...this.
6956 (x86_dr_low_get_addr): Rename to...
6957 (x86_linux_dr_get_addr): ...this.
6958 (x86_dr_low_set_control): Rename to...
6959 (x86_linux_dr_set_control): ...this.
6960 (x86_dr_low_get_control): Rename to...
6961 (x86_linux_dr_get_control): ...this.
6962 (x86_dr_low_get_status): Rename to...
6963 (x86_linux_dr_get_status): ...this.
6964 (x86_dr_low): Update with new function names.
6965
4b134ca1
GB
69662015-03-24 Gary Benson <gbenson@redhat.com>
6967
6968 * Makefile.in (x86-linux.o): New rule.
6969 * configure.srv: Add x86-linux.o to relevant targets.
6970 * linux-low.c (lwp_set_arch_private_info): New function.
6971 (lwp_arch_private_info): Likewise.
6972 * linux-x86-low.c: Include nat/x86-linux.h.
6973 (arch_lwp_info): Removed structure.
6974 (update_debug_registers_callback):
6975 Use lwp_set_debug_registers_changed.
6976 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6977 and lwp_set_debug_registers_changed.
6978 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6979
34c703da
GB
69802015-03-24 Gary Benson <gbenson@redhat.com>
6981
6982 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6983 * linux-arm-low.c (arm_new_thread): Likewise.
6984 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6985 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6986 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6987 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6988
cff068da
GB
69892015-03-24 Gary Benson <gbenson@redhat.com>
6990
6991 * linux-low.c (ptid_of_lwp): New function.
6992 (lwp_is_stopped): Likewise.
6993 (lwp_stop_reason): Likewise.
6994 * linux-x86-low.c (update_debug_registers_callback):
6995 Use lwp_is_stopped.
6996 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6997 lwp_stop_reason.
6998
b2f7c7e8
GB
69992015-03-24 Gary Benson <gbenson@redhat.com>
7000
7001 * linux-low.h (linux_stop_lwp): Remove declaration.
7002
6d4ee8c6
GB
70032015-03-24 Gary Benson <gbenson@redhat.com>
7004
7005 * linux-low.h: Include nat/linux-nat.h.
7006 * linux-low.c (iterate_over_lwps_args): New structure.
7007 (iterate_over_lwps_filter): New function.
7008 (iterate_over_lwps): Likewise.
7009 * linux-x86-low.c (update_debug_registers_callback):
7010 Update signature to what iterate_over_lwps expects.
7011 Remove PID check that iterate_over_lwps now performs.
7012 (x86_dr_low_set_addr): Use iterate_over_lwps.
7013 (x86_dr_low_set_control): Likewise.
7014
70a0bb6b
GB
70152015-03-24 Gary Benson <gbenson@redhat.com>
7016
7017 * linux-x86-low.c (x86_debug_reg_state): New function.
7018 (x86_linux_prepare_to_resume): Use the above.
7019
7b669087
GB
70202015-03-24 Gary Benson <gbenson@redhat.com>
7021
7022 * linux-low.c (current_lwp_ptid): New function.
7023 * linux-x86-low.c: Include nat/linux-nat.h.
7024 (x86_dr_low_get_addr): Use current_lwp_ptid.
7025 (x86_dr_low_get_control): Likewise.
7026 (x86_dr_low_get_status): Likewise.
7027
eef49a3d
PA
70282015-03-20 Pedro Alves <palves@redhat.com>
7029
7030 * tracepoint.c (cmd_qtstatus): Make "str" const.
7031
b2333d22
PA
70322015-03-20 Pedro Alves <palves@redhat.com>
7033
7034 * server.c (handle_general_set): Make "req_str" const.
7035
23f238d3
PA
70362015-03-19 Pedro Alves <palves@redhat.com>
7037
7038 * linux-low.c (linux_resume_one_lwp): Rename to ...
7039 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7040 instead call perror_with_name.
7041 (check_ptrace_stopped_lwp_gone): New function.
7042 (linux_resume_one_lwp): Reimplement as wrapper around
7043 linux_resume_one_lwp_throw that swallows errors if the LWP is
7044 gone.
7045
91baf43f
PA
70462015-03-19 Pedro Alves <palves@redhat.com>
7047
7048 * linux-low.c (count_events_callback, select_event_lwp_callback):
7049 No longer check whether the thread has resume_stop as last resume
7050 kind.
7051
8bf3b159
PA
70522015-03-19 Pedro Alves <palves@redhat.com>
7053
7054 * linux-low.c (count_events_callback, select_event_lwp_callback):
7055 Use the lwp's status_pending_p field, not the thread's.
7056
b90fc188
PA
70572015-03-19 Pedro Alves <palves@redhat.com>
7058
7059 * linux-low.c (select_event_lwp_callback): Update comments to
7060 no longer mention SIGTRAP.
7061
464b0089
GB
70622015-03-18 Gary Benson <gbenson@redhat.com>
7063
7064 * server.c (handle_query): Do not report vFile:fstat as supported.
7065
aa9e327f
GB
70662015-03-11 Gary Benson <gbenson@redhat.com>
7067
7068 * hostio.c (sys/types.h): New include.
7069 (sys/stat.h): Likewise.
7070 (common-remote-fileio.h): Likewise.
7071 (handle_fstat): New function.
7072 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7073
791c0056
GB
70742015-03-11 Gary Benson <gbenson@redhat.com>
7075
7076 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7077 struct stat.st_blocks and struct stat.st_blksize.
7078 * configure: Regenerate.
7079 * config.in: Likewise.
7080 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7081 (OBS): Add common-remote-fileio.o.
7082 (common-remote-fileio.o): New rule.
7083
9a9df970
PA
70842015-03-09 Pedro Alves <palves@redhat.com>
7085
7086 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7087 'struct sockaddr' pointer in 'accept' call.
7088
9eb1356e
PA
70892015-03-09 Pedro Alves <palves@redhat.com>
7090
7091 Revert:
7092 2015-03-07 Pedro Alves <palves@redhat.com>
7093 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7094 or <winsock2.h> here. Instead include "gdb_socket.h".
7095 (remote_open): Use union gdb_sockaddr_u.
7096 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7097 or <winsock2.h> here. Instead include "gdb_socket.h".
7098 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7099 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7100 or <sys/un.h>.
7101 (init_named_socket, gdb_agent_helper_thread): Use union
7102 gdb_sockaddr_u.
7103
aac331e4
PA
71042015-03-07 Pedro Alves <palves@redhat.com>
7105
7106 * configure.ac (build_warnings): Move
7107 -Wdeclaration-after-statement to the C-specific set.
7108 * configure: Regenerate.
7109
366c75fc
PA
71102015-03-07 Pedro Alves <palves@redhat.com>
7111
7112 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7113 or <winsock2.h> here. Instead include "gdb_socket.h".
7114 (remote_open): Use union gdb_sockaddr_u.
7115 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7116 or <winsock2.h> here. Instead include "gdb_socket.h".
7117 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7118 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7119 or <sys/un.h>.
7120 (init_named_socket, gdb_agent_helper_thread): Use union
7121 gdb_sockaddr_u.
7122
492d29ea
PA
71232015-03-07 Pedro Alves <palves@redhat.com>
7124
7125 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7126 instead.
7127
60a191ed
YQ
71282015-03-06 Yao Qi <yao.qi@linaro.org>
7129
7130 * linux-aarch64-low.c (aarch64_insert_point): Use
7131 show_debug_regs as a boolean.
7132 (aarch64_remove_point): Likewise.
7133
f5771b1d
PA
71342015-03-05 Pedro Alves <palves@redhat.com>
7135
7136 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7137 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7138 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7139 * nto-low.c (nto_target_ops): Likewise.
7140 * spu-low.c (spu_target_ops): Likewise.
7141 * win32-low.c (win32_target_ops): Likewise.
7142
3e572f71
PA
71432015-03-04 Pedro Alves <palves@redhat.com>
7144
72f4393d 7145 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7146 Decide whether a breakpoint triggered based on the SIGTRAP's
7147 siginfo.si_code.
72f4393d
L
7148 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7149 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7150 (linux_low_filter_event): Check for breakpoints before checking
7151 watchpoints.
7152 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7153 siginfo.si_code.
72f4393d
L
7154 (linux_stopped_by_sw_breakpoint)
7155 (linux_supports_stopped_by_sw_breakpoint)
7156 (linux_stopped_by_hw_breakpoint)
7157 (linux_supports_stopped_by_hw_breakpoint): New functions.
7158 (linux_target_ops): Install new target methods.
3e572f71 7159
1ec68e26
PA
71602015-03-04 Pedro Alves <palves@redhat.com>
7161
7162 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7163 * server.c (swbreak_feature, hwbreak_feature): New globals.
7164 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7165 (captured_main): Clear swbreak_feature and hwbreak_feature.
7166 * server.h (swbreak_feature, hwbreak_feature): Declare.
7167 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7168 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7169 supports_stopped_by_hw_breakpoint>: New fields.
7170 (target_supports_stopped_by_sw_breakpoint)
7171 (target_stopped_by_sw_breakpoint)
7172 (target_supports_stopped_by_hw_breakpoint)
7173 (target_stopped_by_hw_breakpoint): Declare.
7174
15c66dd6
PA
71752015-03-04 Pedro Alves <palves@redhat.com>
7176
7177 enum lwp_stop_reason -> enum target_stop_reason
7178 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7179 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7180 (linux_wait_1, stuck_in_jump_pad_callback)
7181 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7182 (linux_stopped_by_watchpoint):
7183 * linux-low.h (enum lwp_stop_reason): Delete.
7184 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7185 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7186
98fc70d6
YQ
71872015-03-04 Yao Qi <yao.qi@linaro.org>
7188
7189 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7190
dd2ac174
GB
71912015-03-03 Gary Benson <gbenson@redhat.com>
7192
7193 * hostio.c (handle_vFile): Fix prefix lengths.
7194
d68e53f4
MM
71952015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7196
7197 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7198 ptr_bits.
7199
bf2d68ab
AA
72002015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7201
7202 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7203 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7204 (clean): Add "rm -f" for above C files.
7205 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7206 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7207 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7208 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7209 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7210 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7211 (init_registers_s390x_vx_linux64)
7212 (init_registers_s390x_tevx_linux64)
7213 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7214 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7215 declarations.
7216 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7217 (s390_store_vxrs_high): New functions.
7218 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7219 NT_S390_VXRS_HIGH.
7220 (s390_arch_setup): Add logic for selecting one of the new target
7221 descriptions. Activate the new vector regsets if applicable.
7222 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7223 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7224 and init_registers_s390x_tevx_linux64.
7225
c966a859
PA
72262015-03-01 Pedro Alves <palves@redhat.com>
7227
7228 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7229 parameter.
7230
4180215b
PA
72312015-02-27 Pedro Alves <palves@redhat.com>
7232
7233 * linux-x86-low.c (u_debugreg_offset): New function.
7234 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7235
749bab01
PA
72362015-02-27 Pedro Alves <palves@redhat.com>
7237
7238 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7239 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7240 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7241 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7242 (ps_lsetfpregs, ps_getpid)
7243 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7244 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7245 (ps_lsetxregs, ps_plog): Declare.
7246
3c14e5a3
PA
72472015-02-27 Pedro Alves <palves@redhat.com>
7248
7249 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7250 IP_AGENT_EXPORT_FUNC.
7251 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7252 IP_AGENT_EXPORT_FUNC.
7253 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7254 (IP_AGENT_EXPORT): Delete.
7255 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7256 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7257 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7258 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7259 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7260 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7261 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7262 (traceframe_read_count, traceframe_write_count)
7263 (traceframes_created, trace_state_variables, get_raw_reg)
7264 (get_trace_state_variable_value, set_trace_state_variable_value)
7265 (ust_loaded, helper_thread_id, cmd_buf): Use
7266 IPA_SYM_EXPORTED_NAME.
7267 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7268 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7269 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7270 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7271 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7272 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7273 EXTERN_C_PUSH/EXTERN_C_POP.
7274 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7275 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7276 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7277 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7278 (traceframe_write_count, traceframe_read_count)
7279 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7280 (about_to_request_buffer_space, get_trace_state_variable_value)
7281 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7282 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7283 EXTERN_C_PUSH/EXTERN_C_POP.
7284 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7285 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7286 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7287 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7288 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7289 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7290 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7291 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7292 Define.
7293 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7294 (IP_AGENT_EXPORT_VAR_DECL): Define.
7295 (tracing): Declare.
7296 (gdb_agent_get_raw_reg): Declare.
7297
fe978cb0
PA
72982015-02-27 Tom Tromey <tromey@redhat.com>
7299 Pedro Alves <palves@redhat.com>
7300
7301 Rename symbols whose names are reserved C++ keywords throughout.
7302
3bc3d82a
PA
73032015-02-27 Pedro Alves <palves@redhat.com>
7304
7305 * Makefile.in (COMPILER): New, get it from autoconf.
7306 (CXX): Get from autoconf instead.
7307 (COMPILE.pre): Use COMPILER.
7308 (CC-LD): Rename to ...
7309 (CC_LD): ... this. Use COMPILER.
7310 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7311 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7312 * acinclude.m4: Include build-with-cxx.m4.
7313 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7314 Disable -Werror by default if building in C++ mode.
7315 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7316 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7317 the C++ compiler. Save/restore CXXFLAGS too.
7318 * configure: Regenerate.
7319
07697489
PA
73202015-02-27 Pedro Alves <palves@redhat.com>
7321
7322 * acinclude.m4: Include libiberty.m4.
7323 * configure.ac: Call libiberty_INIT.
7324 * config.in, configure: Regenerate.
7325
9beb7c4e
PA
73262015-02-26 Pedro Alves <palves@redhat.com>
7327
7328 * linux-low.c (linux_wait_1): When incrementing the PC past a
7329 program breakpoint always use the_low_target.breakpoint_len as
7330 increment, rather than the maximum between that and
7331 the_low_target.decr_pc_after_break.
7332
8090aef2
PA
73332015-02-23 Pedro Alves <palves@redhat.com>
7334
7335 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7336 thread was doing a step-over; always adjust the PC if
7337 we stepped over a permanent breakpoint.
7338 (linux_wait_1): If we stepped over breakpoint that was on top of a
7339 permanent breakpoint, manually advance the PC past it.
7340
bc9540e8
PA
73412015-02-23 Pedro Alves <palves@redhat.com>
7342
7343 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7344 modes.
7345 (x86_fill_gregset, x86_store_gregset): Use it when handling
7346 $orig_eax.
7347
2db9a427
PA
73482015-02-20 Pedro Alves <palves@redhat.com>
7349
7350 * thread-db.c: Include "nat/linux-procfs.h".
7351 (thread_db_init): Skip listing new threads if the kernel supports
7352 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7353
afa8d396
PA
73542015-02-20 Pedro Alves <palves@redhat.com>
7355
7356 * linux-low.c (status_pending_p_callback): Use ptid_match.
7357
c9587f88
AT
73582015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7359
7360 PR breakpoints/16812
7361 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7362 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7363 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7364
b05ec7a5
AT
73652015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7366
7367 PR breakpoints/15956
7368 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7369
d33501a5
MM
73702015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7371
7372 * linux-low.c (linux_low_btrace_conf): Print size.
7373 * server.c (handle_btrace_conf_general_set): New.
7374 (hanle_general_set): Call handle_btrace_conf_general_set.
7375 (handle_query): Report Qbtrace-conf:bts:size as supported.
7376
f4abbc16
MM
73772015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7378
7379 * linux-low.c (linux_low_enable_btrace): Update parameters.
7380 (linux_low_btrace_conf): New.
7381 (linux_target_ops)<to_btrace_conf>: Initialize.
7382 * server.c (current_btrace_conf): New.
7383 (handle_btrace_enable): Rename to ...
7384 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7385 to target_enable_btrace. Update comment. Update users.
7386 (handle_qxfer_btrace_conf): New.
7387 (qxfer_packets): Add btrace-conf entry.
7388 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7389 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7390 (target_ops)<read_btrace_conf>: New.
7391 (target_enable_btrace): Update parameters.
7392 (target_read_btrace_conf): New.
7393
043c3577
MM
73942015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7395
7396 * server.c (handle_btrace_general_set): Remove call to
7397 target_supports_btrace.
7398 (supported_btrace_packets): New.
7399 (handle_query): Call supported_btrace_packets.
7400 * target.h: include btrace-common.h.
7401 (btrace_target_info): Removed.
7402 (supports_btrace, target_supports_btrace): Update parameters.
7403
734b0e4b
MM
74042015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7405
7406 * Makefile.in (SFILES): Add common/btrace-common.c.
7407 (OBS): Add common/btrace-common.o.
7408 (btrace-common.o): Add build rules.
7409 * linux-low: Include btrace-common.h.
7410 (linux_low_read_btrace): Use struct btrace_data. Call
7411 btrace_data_init and btrace_data_fini.
7412
d6c146e9
PA
74132015-02-06 Pedro Alves <palves@redhat.com>
7414
7415 * thread-db.c (find_new_threads_callback): Add debug output.
7416
20ba1ce6
PA
74172015-02-04 Pedro Alves <palves@redhat.com>
7418
7419 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7420 (resume_stopped_resumed_lwps): New function.
7421 (linux_wait_for_event_filtered): Use it.
7422
8cc73a39
SDJ
74232015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7424
7425 * Makefile.in (SFILES): Add linux-personality.c.
7426 (linux-personality.o): New rule.
7427 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7428 list of objects to be built.
7429 * linux-low.c: Include nat/linux-personality.h.
7430 (linux_create_inferior): Remove code to disable address space
7431 randomization (moved to ../nat/linux-personality.c). Create
7432 cleanup to disable address space randomization.
7433
fb23d554
SDJ
74342015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7435
7436 * Makefile.in (posix-strerror.o): New rule.
7437 (mingw-strerror.o): Likewise.
7438 * configure: Regenerated.
7439 * configure.ac: Source file ../common/common.host. Initialize new
7440 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7441
cdf43629
YQ
74422015-01-14 Yao Qi <yao@codesourcery.com>
7443
7444 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7445 (ppc-linux.o): New rule.
7446 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7447 * configure.ac: AC_CHECK_FUNCS(getauxval).
7448 * config.in: Re-generated.
7449 * configure: Re-generated.
7450 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7451 ppc64_64bit_inferior_p
7452
514c5338
YQ
74532015-01-14 Yao Qi <yao@codesourcery.com>
7454
7455 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7456 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7457 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7458 (PT_ORIG_R3, PT_TRAP): Likewise.
7459 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7460 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7461 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7462
3368c1e5
JB
74632015-01-10 Joel Brobecker <brobecker@adacore.com>
7464
7465 * i387-fp.c (i387_cache_to_xsave): In look over
7466 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7467 zmmh_low_space field by use of zmmh_high_space.
7468
582511be
PA
74692015-01-09 Pedro Alves <palves@redhat.com>
7470
7471 * linux-low.c (step_over_bkpt): Move higher up in the file.
7472 (handle_extended_wait): Don't store the stop_pc here.
7473 (get_stop_pc): Adjust comments and rename to ...
7474 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7475 stopped for a software breakpoint or hardware breakpoint.
7476 (thread_still_has_status_pending_p): New function.
7477 (status_pending_p_callback): Use
7478 thread_still_has_status_pending_p. If the event is no longer
7479 interesting, resume the LWP.
7480 (handle_tracepoints): Add assert.
7481 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7482 (wstatus_maybe_breakpoint): New function.
7483 (cancel_breakpoint): Delete function.
7484 (check_stopped_by_watchpoint): New function, factored out from
7485 linux_low_filter_event.
7486 (lp_status_maybe_breakpoint): Delete function.
7487 (linux_low_filter_event): Remove filter_ptid argument.
7488 Leave thread group exits pending here. Store the LWP's stop PC.
7489 Always leave events pending.
7490 (linux_wait_for_event_filtered): Pull all events out of the
7491 kernel, and leave them all pending.
7492 (count_events_callback, select_event_lwp_callback): Consider all
7493 events.
7494 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7495 (select_event_lwp): Only give preference to the stepping LWP in
7496 all-stop mode. Adjust comments.
7497 (ignore_event): New function.
7498 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7499 references to cancel_breakpoints. Adjust to renames. Also give
7500 equal priority to all LWPs that have had events in non-stop mode.
7501 If reporting a software breakpoint event, unadjust the LWP's PC.
7502 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7503 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7504 Adjust.
7505 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7506 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7507 (linux_stopped_by_watchpoint): Adjust.
7508 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7509 * linux-low.h (enum lwp_stop_reason): New.
7510 (struct lwp_info) <stop_pc>: Adjust comment.
7511 <stopped_by_watchpoint>: Delete field.
7512 <stop_reason>: New field.
7513 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7514 * mem-break.c (software_breakpoint_inserted_here)
7515 (hardware_breakpoint_inserted_here): New function.
7516 * mem-break.h (software_breakpoint_inserted_here)
7517 (hardware_breakpoint_inserted_here): Declare.
7518 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7519 (cancel_breakpoints): Delete.
7520 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7521 (upload_fast_traceframes): Remove references to
7522 cancel_breakpoints.
7523
a33e3959
PA
75242015-01-09 Pedro Alves <palves@redhat.com>
7525
7526 * thread-db.c (find_new_threads_callback): Ignore thread if the
7527 kernel thread ID is -1.
7528
8784d563
PA
75292015-01-09 Pedro Alves <palves@redhat.com>
7530
7531 * linux-low.c (linux_attach_fail_reason_string): Move to
7532 nat/linux-ptrace.c, and rename.
7533 (linux_attach_lwp): Update comment.
7534 (attach_proc_task_lwp_callback): New function.
7535 (linux_attach): Adjust to rename and use
7536 linux_proc_attach_tgid_threads.
7537 (linux_attach_fail_reason_string): Delete declaration.
7538
76f2b779
JB
75392015-01-01 Joel Brobecker <brobecker@adacore.com>
7540
7541 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7542 * server.c (gdbserver_version): Likewise.
7543
fafcc06a
SDJ
75442014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7545
7546 * remote-utils.c: Include ctype.h.
7547 (input_interrupt): Explicitly handle the case when the char
7548 received is the NUL byte. Improve the printing of non-ASCII
7549 characters.
7550
beed38b8
JB
75512014-12-16 Joel Brobecker <brobecker@adacore.com>
7552
7553 * linux-low.c (linux_low_filter_event): Update call to
7554 linux_enable_event_reporting following the addition of
7555 a new parameter to that function.
7556
bf330350
CU
75572014-12-16 Catalin Udma <catalin.udma@freescale.com>
7558
7559 PR server/17457
7560 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7561 (AARCH64_FPCR_REGNO): Likewise.
7562 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7563 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7564 (aarch64_store_fpregset): Likewise.
7565
5227d625
JB
75662014-12-15 Joel Brobecker <brobecker@adacore.com>
7567
7568 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7569 Remove FIXME comment about assumption about N.
7570
f93b65a0
JB
75712014-12-13 Joel Brobecker <brobecker@adacore.com>
7572
7573 * configure.ac: If large-file support is disabled in GDBserver,
7574 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7575 * configure: Regenerate.
7576
e5a9158d
AA
75772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7578
7579 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7580 warning upon ENODATA from ptrace.
7581 * linux-s390-low.c (s390_store_tdb): New.
7582 (s390_regsets): Add regset for NT_S390_TDB.
7583
feea5f36
AA
75842014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7585
7586 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7587 without a fill_function.
7588 * linux-s390-low.c (s390_fill_last_break): Remove.
7589 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7590 (s390_arch_setup): Use regset's size instead of fill_function for
7591 loop end condition.
7592
098dbe61
AA
75932014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7594
7595 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7596 the regset's store function when ptrace returned an error.
7597 * regcache.c (get_thread_regcache): Invalidate register cache
7598 before fetching inferior's registers.
7599
28eef672
AA
76002014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7601
7602 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7603 while-loop as for-loop.
7604 (regsets_store_inferior_registers): Likewise.
7605
bdca27a2
YQ
76062014-11-28 Yao Qi <yao@codesourcery.com>
7607
7608 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7609 * config.in, configure: Re-generate.
7610 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7611 is defined.
7612
9c232dda
YQ
76132014-11-21 Yao Qi <yao@codesourcery.com>
7614
7615 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7616 (AC_CHECK_HEADERS): Remove malloc.h.
7617 * configure: Re-generated.
7618 * config.in: Re-generated.
7619 * server.h: Don't include alloca.h and malloc.h.
7620 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7621 Don't include malloc.h.
7622
43968415
JB
76232014-11-17 Joel Brobecker <brobecker@adacore.com>
7624
7625 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7626 corresponding ERRNO check in same block.
7627
40e91bc7
PA
76282014-11-12 Pedro Alves <palves@redhat.com>
7629
7630 * server.c (cont_thread): Update comment.
7631 (start_inferior, attach_inferior): No longer clear cont_thread.
7632 (handle_v_cont): No longer set cont_thread.
7633 (captured_main): Clear cont_thread each time a GDB connects.
7634
c2c118cf
PA
76352014-11-12 Pedro Alves <palves@redhat.com>
7636
7637 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7638 thread, and don't resume all threads if the Hc thread has exited.
7639
78708b7c
PA
76402014-11-12 Pedro Alves <palves@redhat.com>
7641
7642 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7643 the process group instead of to a specific LWP.
7644
a2abc7de
PA
76452014-10-15 Pedro Alves <palves@redhat.com>
7646
7647 PR server/17487
7648 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7649 parameter.
7650 (arm_set_thread_context): Delete.
7651 (the_low_target): Adjust.
7652 * win32-i386-low.c (debug_registers_changed)
7653 (debug_registers_used): Delete.
7654 (update_debug_registers_callback): New function.
7655 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7656 needing to update their debug registers.
7657 (win32_get_current_dr): New function.
7658 (x86_dr_low_get_addr, x86_dr_low_get_control)
7659 (x86_dr_low_get_status): Fetch the debug register from the thread
7660 record's context.
7661 (i386_initial_stuff): Adjust.
7662 (i386_get_thread_context): Remove current_event parameter. Don't
7663 clear debug_registers_changed nor copy DR values to
7664 debug_reg_state.
7665 (i386_set_thread_context): Delete.
7666 (i386_prepare_to_resume): New function.
7667 (i386_thread_added): Mark the thread as needing to update irs
7668 debug registers.
7669 (the_low_target): Remove i386_set_thread_context and install
7670 i386_prepare_to_resume.
7671 * win32-low.c (win32_get_thread_context): Adjust.
7672 (win32_set_thread_context): Use SetThreadContext
7673 directly.
7674 (win32_prepare_to_resume): New function.
7675 (win32_require_context): New function, factored out from ...
7676 (thread_rec): ... this.
7677 (continue_one_thread): Call win32_prepare_to_resume on each thread
7678 we're about to continue.
7679 (win32_resume): Call win32_prepare_to_resume on the event thread.
7680 * win32-low.h (struct win32_thread_info)
7681 <debug_registers_changed>: New field.
7682 (struct win32_target_ops): Change prototype of set_thread_context,
7683 delete set_thread_context and add prepare_to_resume.
7684 (win32_require_context): New declaration.
7685
a442d071
GB
76862014-10-08 Gary Benson <gbenson@redhat.com>
7687
7688 * server.h: Do not include common-exceptions.h.
7689
6f1947e8
GB
76902014-10-08 Gary Benson <gbenson@redhat.com>
7691
7692 * server.h: Do not include cleanups.h.
7693
63b434a4
JH
76942014-09-30 James Hogan <james.hogan@imgtec.com>
7695
7696 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7697 mips64-dsp-linux.c.
7698
c4d9ceb6
YQ
76992014-09-23 Yao Qi <yao@codesourcery.com>
7700
7701 * linux-low.c (lp_status_maybe_breakpoint): New function.
7702 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7703 (count_events_callback): Likewise.
7704 (select_event_lwp_callback): Likewise.
7705 (cancel_breakpoints_callback): Likewise.
7706
89a5711c
DB
77072014-09-19 Don Breazeal <donb@codesourcery.com>
7708
7709 * linux-low.c (handle_extended_wait): Call
7710 linux_ptrace_get_extended_event.
7711 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7712 linux_is_extended_waitstatus.
7713
bffc0964
JB
77142014-09-16 Joel Brobecker <brobecker@adacore.com>
7715
7716 * Makefile.in (CPPFLAGS): Define.
7717 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7718 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7719
0bfdf32f
GB
77202014-09-16 Gary Benson <gbenson@redhat.com>
7721
7722 * inferiors.h (current_inferior): Renamed as...
7723 (current_thread): New variable. All uses updated.
7724 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7725 (maybe_move_out_of_jump_pad): Likewise.
7726 (cancel_breakpoint): Likewise.
7727 (linux_low_filter_event): Likewise.
7728 (wait_for_sigstop): Likewise.
7729 (linux_resume_one_lwp): Likewise.
7730 (need_step_over_p): Likewise.
7731 (start_step_over): Likewise.
7732 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7733 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7734 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7735 and save_inferior as saved_thread.
7736 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7737 saved_thread.
7738 (regcache_invalidate_thread): Likewise.
7739 * remote-utils.c (prepare_resume_reply): Likewise.
7740 * thread-db.c (thread_db_get_tls_address): Likewise.
7741 (disable_thread_event_reporting): Likewise.
7742 (remove_thread_event_breakpoints): Likewise.
7743 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7744 as saved_thread.
7745 * target.h (set_desired_inferior): Renamed as...
7746 (set_desired_thread): New declaration. All uses updated.
7747 * server.c (myresume): Updated comment to reference thread instead
7748 of inferior.
7749 (handle_serial_event): Likewise.
7750 (handle_target_event): Likewise.
7751
361c8ade
GB
77522014-09-12 Tom Tromey <tromey@redhat.com>
7753 Gary Benson <gbenson@redhat.com>
7754
7755 * regcache.h: Include common-regcache.h.
7756 (regcache_read_pc): Don't declare.
7757 * regcache.c (get_thread_regcache_for_ptid): New function.
7758
bd9269f7
GB
77592014-09-11 Tom Tromey <tromey@redhat.com>
7760 Gary Benson <gbenson@redhat.com>
7761
7762 * symbol.c: New file.
7763 * Makefile.in (SFILES): Add symbol.c.
7764 (OBS): Add symbol.o.
7765
f8c1d06b
GB
77662014-09-11 Gary Benson <gbenson@redhat.com>
7767
7768 * target.c (target_stop_ptid, target_continue_ptid): New
7769 functions.
7770
721ec300
GB
77712014-09-11 Tom Tromey <tromey@redhat.com>
7772 Gary Benson <gbenson@redhat.com>
7773
7774 * target.h: Include target/target.h.
7775 * target.c (target_read_memory, target_read_uint32)
7776 (target_write_memory): New functions.
7777
c5e92cca
GB
77782014-09-11 Gary Benson <gbenson@redhat.com>
7779
7780 * server.h (debug_hw_points): Don't declare.
7781 * server.c (debug_hw_points): Don't define. Replace all uses
7782 with show_debug_regs.
7783 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7784 all uses with show_debug_regs.
7785
2e4bb98a
EBM
77862014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7787
7788 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7789 endianness into account.
7790 (ppc_supply_ptrace_register): Likewise.
7791
ac740bc7
JH
77922014-09-03 James Hogan <james.hogan@imgtec.com>
7793
7794 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7795 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7796
97ea6506
GB
77972014-09-03 Gary Benson <gbenson@redhat.com>
7798
7799 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7800 ALL_DEBUG_ADDRESS_REGISTERS.
7801
df7e5265
GB
78022014-09-02 Gary Benson <gbenson@redhat.com>
7803
7804 * i386-low.h: Renamed as...
7805 * x86-low.h: New file. All type, function and variable name
7806 prefixes changed from "i386_" to "x86_". All references updated.
7807 * i386-low.c: Renamed as...
7808 * x86-low.c: New file. All type, function and variable name
7809 prefixes changed from "i386_" to "x86_". All references updated.
7810
ed859da7
GB
78112014-09-02 Gary Benson <gbenson@redhat.com>
7812
7813 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7814 (x86_linux_new_thread): Likewise.
7815
860789c7
GB
78162014-08-29 Gary Benson <gbenson@redhat.com>
7817
7818 * server.h (setjmp.h): Do not include.
7819 (toplevel): Do not declare.
7820 (common-exceptions.h): Include.
7821 (cleanups.h): Likewise.
7822 * server.c (toplevel): Do not define.
7823 (exit_code): New static global.
7824 (detach_or_kill_for_exit_cleanup): New function.
7825 (main): New function. Original main renamed to...
7826 (captured_main): New function.
7827 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7828
ff55e1b5
GB
78292014-08-29 Gary Benson <gbenson@redhat.com>
7830
7831 * Makefile.in (SFILES): Add common/common-exceptions.c.
7832 (OBS): Add common-exceptions.o.
7833 (common-exceptions.o): New rule.
7834 * utils.c (prepare_to_throw_exception): New function.
7835
e9bcb658
GB
78362014-08-29 Gary Benson <gbenson@redhat.com>
7837
7838 * config.in: Regenerate.
7839 * configure: Likewise.
7840
e3180625
GB
78412014-08-29 Gary Benson <gbenson@redhat.com>
7842
7843 * Makefile.in (SFILES): Add common/cleanups.c.
7844 (OBS): cleanups.o.
7845 (cleanups.o): New rule.
7846
e3d6ba5d
GB
78472014-08-29 Gary Benson <gbenson@redhat.com>
7848
7849 * utils.c (internal_vwarning): New function.
7850
7096e886
GB
78512014-08-28 Gary Benson <gbenson@redhat.com>
7852
7853 * utils.h (fatal): Remove declaration.
7854 * utils.c (fatal): Remove function.
7855
14ce3192
GB
78562014-08-28 Gary Benson <gbenson@redhat.com>
7857
7858 * tracepoint.c (gdb_agent_init): Replace fatal with
7859 perror_with_name.
7860 (initialize_tracepoint): Likewise.
7861
50278d59
GB
78622014-08-28 Gary Benson <gbenson@redhat.com>
7863
7864 * remote-utils.c (remote_prepare): Replace fatal with error.
7865
aa96c426
GB
78662014-08-28 Gary Benson <gbenson@redhat.com>
7867
7868 * linux-low.c (linux_async): Replace fatal with warning.
7869 Tidy up and return.
7870 (linux_start_non_stop): Return -1 if linux_async failed.
7871
f7160e97
GB
78722014-08-28 Gary Benson <gbenson@redhat.com>
7873
7874 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7875 gdb_assert.
7876 (i386_dr_low_get_addr): Remove vague comment.
7877 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7878 gdb_assert.
7879
38e08fca
GB
78802014-08-28 Gary Benson <gbenson@redhat.com>
7881
7882 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7883 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7884 internal_error.
7885 (linux_resume_one_lwp): Likewise.
7886 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7887 gdb_assert.
7888 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7889 with internal_error.
7890 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7891 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7892 (find_register_by_name): Replace fatal with internal_error.
7893 (find_regno): Likewise.
7894 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7895 * thread-db.c (thread_db_create_event): Likewise.
7896 (thread_db_load_search): Likewise.
7897 (try_thread_db_load_1): Likewise.
7898 * tracepoint.c (get_jump_space_head): Replace fatal with
7899 internal_error.
7900 (claim_trampoline_space): Likewise.
7901 (have_fast_tracepoint_trampoline_buffer): Likewise.
7902 (cmd_qtstart): Likewise.
7903 (stop_tracing): Likewise.
7904 (fast_tracepoint_collecting): Likewise.
7905 (target_malloc): Likewise.
7906 (download_tracepoint): Likewise.
7907 (download_trace_state_variables): Replace check with gdb_assert.
7908 (upload_fast_traceframes): Replace fatal with internal_error.
7909
34abf635
GB
79102014-08-19 Tom Tromey <tromey@redhat.com>
7911 Gary Benson <gbenson@redhat.com>
7912
7913 * Makefile.in (SFILES): Add common/common-debug.c.
7914 (OBS): Add common-debug.o.
7915 (common-debug.o): New rule.
7916 * debug.h (debug_printf): Don't declare.
7917 * debug.c (debug_printf): Renamed and rewritten as...
7918 (debug_vprintf): New function.
7919
f6e94d78
GB
79202014-08-19 Gary Benson <gbenson@redhat.com>
7921
7922 * utils.h: Do not include print-utils.h.
7923
9239eeab
GB
79242014-08-19 Tom Tromey <tromey@redhat.com>
7925 Gary Benson <gbenson@redhat.com>
7926
7927 * server.h: Add static assertion.
7928 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7929
ef87c8bb
GB
79302014-08-19 Tom Tromey <tromey@redhat.com>
7931 Gary Benson <gbenson@redhat.com>
7932
7933 * Makefile.in (SFILES): Add common/errors.c.
7934 (OBS): Add errors.o.
7935 (IPA_OBS): Add errors-ipa.o.
7936 (errors.o): New rule.
7937 (errors-ipa.o): Likewise.
7938 * utils.h (perror_with_name, error, warning): Don't declare.
7939 * utils.c (warning): Renamed and rewritten as...
7940 (vwarning): New function.
7941 (error): Renamed and rewritten as...
7942 (verror): New function.
7943 (internal_error): Renamed and rewritten as...
7944 (internal_verror): New function.
7945
bb974a24
GB
79462014-08-07 Gary Benson <gbenson@redhat.com>
7947
7948 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7949 * configure: Regenerate.
7950 * config.in: Likewise.
7951 * server.h: Do not include errno.h.
7952 * event-loop.c: Likewise.
7953 * hostio-errno.c: Likewise.
7954 * linux-low.c: Likewise.
7955 * remote-utils.c: Likewise.
7956 * spu-low.c: Likewise.
7957 * utils.c: Likewise.
7958 * gdbreplay.c: Unconditionally include errno.h.
7959
6d3d12eb
GB
79602014-08-07 Gary Benson <gbenson@redhat.com>
7961
7962 * server.h: Do not include string.h.
7963 * event-loop.c: Likewise.
7964 * linux-low.c: Likewise.
7965 * regcache.c: Likewise.
7966 * remote-utils.c: Likewise.
7967 * spu-low.c: Likewise.
7968 * utils.c: Likewise.
7969
dccbb609
GB
79702014-08-07 Gary Benson <gbenson@redhat.com>
7971
7972 * server.h: Do not include gdb_assert.h.
7973
e76df0d0
GB
79742014-08-07 Gary Benson <gbenson@redhat.com>
7975
7976 * server.h: Do not include common-utils.h.
7977
4cb9c816
GB
79782014-08-07 Gary Benson <gbenson@redhat.com>
7979
7980 * server.h: Do not include ptid.h.
7981 * notif.h: Likewise.
7982
3995eeee
GB
79832014-08-07 Gary Benson <gbenson@redhat.com>
7984
7985 * server.h: Do not include gdb_locale.h.
7986
cb9f1a9b
GB
79872014-08-07 Gary Benson <gbenson@redhat.com>
7988
7989 * server.h: Do not include gdb/signals.h.
7990 * win32-low.c: Likewise.
7991
a5fceff8
GB
79922014-08-07 Gary Benson <gbenson@redhat.com>
7993
7994 * server.h: Do not include pathmax.h.
7995
b9391142
GB
79962014-08-07 Gary Benson <gbenson@redhat.com>
7997
7998 * server.h: Do not include libiberty.h.
7999 * linux-bfin-low.c: Likewise.
8000
0e443c87
GB
80012014-08-07 Gary Benson <gbenson@redhat.com>
8002
8003 * server.h: Do not include ansidecl.h.
8004
8ebb3f56
GB
80052014-08-07 Gary Benson <gbenson@redhat.com>
8006
8007 * linux-x86-low.c: Do not include stddef.h.
8008 * lynx-ppc-low.c: Likewise.
8009 * tracepoint.c: Likewise.
8010
8980bdf6
GB
80112014-08-07 Gary Benson <gbenson@redhat.com>
8012
8013 * server.h: Do not include stdarg.h.
8014 * nto-low.c: Likewise.
8015
d7096f71
GB
80162014-08-07 Gary Benson <gbenson@redhat.com>
8017
8018 * server.h: Do not include stdlib.h.
8019 * inferiors.c: Likewise.
8020 * linux-low.c: Likewise.
8021 * regcache.c: Likewise.
8022 * spu-low.c: Likewise.
8023 * tracepoint.c: Likewise.
8024 * utils.c: Likewise.
8025
d02f550d
GB
80262014-08-07 Gary Benson <gbenson@redhat.com>
8027
8028 * server.h: Do not include stdio.h.
8029 * linux-low.c: Likewise.
8030 * remote-utils.c: Likewise.
8031 * spu-low.c: Likewise.
8032 * utils.c: Likewise.
8033 * wincecompat.c: Likewise.
8034
87f6c4e3
GB
80352014-08-06 Gary Benson <gbenson@redhat.com>
8036
8037 * regcache.c (init_register_cache): Move conditionals inside if.
8038
7089dca4
GB
80392014-08-06 Gary Benson <gbenson@redhat.com>
8040
8041 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8042
462f517e
GB
80432014-07-31 Gary Benson <gbenson@redhat.com>
8044
8045 * ax.h: Do not include server.h.
8046 * gdbthread.h: Likewise.
8047 * lynx-low.h: Likewise.
8048 * notif.h: Likewise.
8049
976411d6
GB
80502014-07-30 Gary Benson <gbenson@redhat.com>
8051
8052 * server.h: Include common-defs.h.
8053 Do not include config.h or build-gnulib-gdbserver/config.h.
8054
d41f6d8e
GB
80552014-07-30 Gary Benson <gbenson@redhat.com>
8056
8057 * hostio-errno.c: Move server.h to top of includes list.
8058 * inferiors.c: Likewise.
8059 * linux-x86-low.c: Likewise.
8060 * notif.c: Include server.h.
8061
314c6a35
TT
80622014-07-24 Tom Tromey <tromey@redhat.com>
8063 Gary Benson <gbenson@redhat.com>
8064
8065 * server.h (CORE_ADDR): Now unsigned.
8066
69ff6be5
PA
80672014-07-16 Pedro Alves <palves@redhat.com>
8068
8069 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8070
ce9e3fe7
PA
80712014-07-15 Pedro Alves <palves@redhat.com>
8072
8073 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8074 copy.
8075
e76126e8
PA
80762014-07-11 Pedro Alves <palves@redhat.com>
8077
8078 * linux-low.c (kill_wait_lwp): New function, based on
8079 kill_one_lwp_callback, but use my_waitpid directly.
8080 (kill_one_lwp_callback, linux_kill): Use it.
8081
8e9db26e
PA
80822014-06-23 Pedro Alves <palves@redhat.com>
8083
8084 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8085 before setting DR0..DR3.
8086
698b3e08
GB
80872014-06-20 Gary Benson <gbenson@redhat.com>
8088
8089 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8090 * configure: Regenerated.
8091 * config.in: Likewise.
8092
125f8a3d
GB
80932014-06-20 Gary Benson <gbenson@redhat.com>
8094
8095 * Makefile.in (SFILES): Update locations for files moved
8096 from common to nat.
8097 (object file files): Reordered.
8098
42995dbd
GB
80992014-06-20 Gary Benson <gbenson@redhat.com>
8100
8101 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8102 (i386_dr_low_set_addr): Likewise.
8103 (i386_dr_low_get_addr): Likewise.
8104 (i386_dr_low_can_set_control): Likewise.
8105 (i386_dr_low_set_control): Likewise.
8106 (i386_dr_low_get_control): Likewise.
8107 (i386_dr_low_get_status): Likewise.
8108 (i386_get_debug_register_length): Likewise.
8109 * linux-x86-low.c (i386_dr_low_set_addr):
8110 Changed signature. Made static.
8111 (i386_dr_low_get_addr): Likewise.
8112 (i386_dr_low_set_control): Likewise.
8113 (i386_dr_low_get_control): Likewise.
8114 (i386_dr_low_get_status): Likewise.
8115 (i386_dr_low): New global variable.
8116 * win32-i386-low.c (i386_dr_low_set_addr):
8117 Changed signature. Made static.
8118 (i386_dr_low_get_addr): Likewise.
8119 (i386_dr_low_set_control): Likewise.
8120 (i386_dr_low_get_control): Likewise.
8121 (i386_dr_low_get_status): Likewise.
8122 (i386_dr_low): New global variable.
8123
e1d2394b
MS
81242014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8125
8126 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8127 * Makefile.in (AR, AR_FLAGS): Define.
8128 * configure: Regenerate.
8129
3a8ee006
GB
81302014-06-19 Gary Benson <gbenson@redhat.com>
8131
8132 * Makefile.in (i386-dregs.o): New rule.
8133 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8134 * i386-low.c (target.h): Remove include.
8135 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8136 (DR_CONTROL_SHIFT): Likewise.
8137 (DR_CONTROL_SIZE): Likewise.
8138 (DR_RW_EXECUTE): Likewise.
8139 (DR_RW_WRITE): Likewise.
8140 (DR_RW_READ): Likewise.
8141 (DR_RW_IORW): Likewise.
8142 (DR_LEN_1): Likewise.
8143 (DR_LEN_2): Likewise.
8144 (DR_LEN_4): Likewise.
8145 (DR_LEN_8): Likewise.
8146 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8147 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8148 (DR_ENABLE_SIZE): Likewise.
8149 (DR_LOCAL_SLOWDOWN): Likewise.
8150 (DR_GLOBAL_SLOWDOWN): Likewise.
8151 (DR_CONTROL_RESERVED): Likewise.
8152 (I386_DR_CONTROL_MASK): Likewise.
8153 (I386_DR_VACANT): Likewise.
8154 (I386_DR_LOCAL_ENABLE): Likewise.
8155 (I386_DR_GLOBAL_ENABLE): Likewise.
8156 (I386_DR_DISABLE): Likewise.
8157 (I386_DR_SET_RW_LEN): Likewise.
8158 (I386_DR_GET_RW_LEN): Likewise.
8159 (I386_DR_WATCH_HIT): Likewise.
8160 (i386_wp_op_t): Likewise.
8161 (i386_show_dr): Likewise.
8162 (i386_length_and_rw_bits): Likewise.
8163 (i386_insert_aligned_watchpoint): Likewise.
8164 (i386_remove_aligned_watchpoint): Likewise.
8165 (i386_handle_nonaligned_watchpoint): Likewise.
8166 i386_update_inferior_debug_regs(): Likewise.
8167 (i386_dr_insert_watchpoint): Likewise.
8168 (i386_dr_remove_watchpoint): Likewise.
8169 (i386_dr_region_ok_for_watchpoint): Likewise.
8170 (i386_dr_stopped_data_address): Likewise.
8171 (i386_dr_stopped_by_watchpoint): Likewise.
8172
8f26655c
GB
81732014-06-19 Gary Benson <gbenson@redhat.com>
8174
8175 * i386-low.c (i386_dr_show): Renamed to
8176 i386_show_dr and made static. All uses updated.
8177 (i386_dr_length_and_rw_bits): Renamed to
8178 i386_length_and_rw_bits and made static.
8179 All uses updated.
8180 (i386_dr_insert_aligned_watchpoint): Renamed to
8181 i386_insert_aligned_watchpoint and made static.
8182 All uses updated.
8183 (i386_dr_remove_aligned_watchpoint): Renamed to
8184 i386_remove_aligned_watchpoint and made static.
8185 All uses updated.
8186 (i386_dr_update_inferior_debug_regs): Renamed to
8187 i386_update_inferior_debug_regs and made static.
8188 All uses updated.
8189
b9228891
GB
81902014-06-18 Gary Benson <gbenson@redhat.com>
8191
5171def3
GB
8192 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8193 (i386_dr_low_can_set_control): Likewise.
8194 (i386_get_debug_register_length): Likewise.
8195 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8196 (i386_dr_low_can_set_control): Likewise.
8197 (i386_get_debug_register_length): Likewise.
8198
81992014-06-17 Gary Benson <gbenson@redhat.com>
8200
b9228891
GB
8201 * i386-low.h (i386-dregs.h): New include.
8202 (DR_FIRSTADDR): Now in i386-dregs.h.
8203 (DR_LASTADDR): Likewise.
8204 (DR_NADDR): Likewise.
8205 (DR_STATUS): Likewise.
8206 (DR_CONTROL): Likewise.
8207 (i386_debug_reg_state): Likewise.
8208 (i386_dr_insert_watchpoint): Likewise.
8209 (i386_dr_remove_watchpoint): Likewise.
8210 (i386_dr_region_ok_for_watchpoint): Likewise.
8211 (i386_dr_stopped_data_address): Likewise.
8212 (i386_dr_stopped_by_watchpoint): Likewise.
8213 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8214
4be83cc2
GB
82152014-06-18 Gary Benson <gbenson@redhat.com>
8216
8217 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8218 i386_dr_insert_watchpoint.
8219 (i386_low_remove_watchpoint): Renamed to
8220 i386_dr_remove_watchpoint.
8221 (i386_low_region_ok_for_watchpoint): Renamed to
8222 i386_dr_region_ok_for_watchpoint.
8223 (i386_low_stopped_data_address): Renamed to
8224 i386_dr_stopped_data_address.
8225 (i386_low_stopped_by_watchpoint): Renamed to
8226 i386_dr_stopped_by_watchpoint.
8227 * i386-low.c (i386_show_dr): Renamed to
8228 i386_dr_show and made nonstatic. All uses updated.
8229 (i386_length_and_rw_bits): Renamed to
8230 i386_dr_length_and_rw_bits and made nonstatic.
8231 All uses updated.
8232 (i386_insert_aligned_watchpoint): Renamed to
8233 i386_dr_insert_aligned_watchpoint and made nonstatic.
8234 All uses updated.
8235 (i386_remove_aligned_watchpoint): Renamed to
8236 i386_dr_remove_aligned_watchpoint and made nonstatic.
8237 All uses updated.
8238 (i386_update_inferior_debug_regs): Renamed to
8239 i386_dr_update_inferior_debug_regs and made nonstatic.
8240 All uses updated.
8241 (i386_low_insert_watchpoint): Renamed to
8242 i386_dr_insert_watchpoint. All uses updated.
8243 (i386_low_remove_watchpoint): Renamed to
8244 i386_dr_remove_watchpoint. All uses updated.
8245 (i386_low_region_ok_for_watchpoint): Renamed to
8246 i386_dr_region_ok_for_watchpoint. All uses updated.
8247 (i386_low_stopped_data_address): Renamed to
8248 i386_dr_stopped_data_address. All uses updated.
8249 (i386_low_stopped_by_watchpoint): Renamed to
8250 i386_dr_stopped_by_watchpoint. All uses updated.
8251
131aa0d4
GB
82522014-06-18 Gary Benson <gbenson@redhat.com>
8253
8254 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8255 (i386_dr_low_can_set_control): Likewise.
8256 (i386_insert_aligned_watchpoint): New check.
8257
d9305f7f
GB
82582014-06-18 Gary Benson <gbenson@redhat.com>
8259
8260 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8261 Renamed to state.
8262
e927c9fc
GB
82632014-06-18 Gary Benson <gbenson@redhat.com>
8264
8265 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8266 instead of fatal and error.
8267 (i386_handle_nonaligned_watchpoint): Likewise.
8268
1b6d4134
GB
82692014-06-18 Gary Benson <gbenson@redhat.com>
8270
8271 * i386-low.c (i386_get_debug_register_length): New macro.
8272 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8273 (i386_show_dr): Use debug_printf instead of fprintf. Use
8274 phex to format values.
8275
6e62758f
GB
82762014-06-18 Gary Benson <gbenson@redhat.com>
8277
8278 * i386-low.h: Comment changes.
8279 * i386-low.c: Likewise.
8280
fc6e2f03
GB
82812014-06-18 Gary Benson <gbenson@redhat.com>
8282
8283 * i386-low.c: Whitespace changes.
8284
f9d1eeed
TT
82852014-06-12 Tom Tromey <tromey@redhat.com>
8286
8287 * utils.c (freeargv): Remove.
8288
0b04e523
TT
82892014-06-12 Tom Tromey <tromey@redhat.com>
8290
8291 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8292 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8293 (parse_debug_format_options): Likewise.
8294 (gdbserver_usage): Likewise.
8295 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8296 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8297 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8298 against libiberty.
8299 ($(LIBGNU)): Depend on libiberty.
8300 (all-lib): Recurse into all subdirs.
8301 (install-only): Invoke "install" target in subdirs.
8302 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8303 targets.
8304 * configure: Rebuild.
8305 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8306 for vasprintf, vsnprintf, or gettimeofday.
8307 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8308 srv_tgtobj.
8309
270c9937
JB
83102014-06-05 Joel Brobecker <brobecker@adacore.com>
8311
8312 * development.sh: Delete.
8313 * Makefile.in (config.status): Adjust dependency on development.sh.
8314 * configure.ac: Adjust development.sh source call.
8315 * configure: Regenerate.
8316
0a261ed8
PA
83172014-06-02 Pedro Alves <palves@redhat.com>
8318
8319 * ax.c (gdb_free_agent_expr): New function.
8320 * ax.h (gdb_free_agent_expr): New declaration.
8321 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8322 list.
8323 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8324 static.
8325 (clear_breakpoint_conditions_and_commands): New function.
8326 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8327 (clear_breakpoint_conditions_and_commands): New declaration.
8328
e9dae05e
RR
83292014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8330
8331 * linux-aarch64-low.c (asm/ptrace.h): Include.
8332
5876f503
JK
83332014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8334
8335 Fix TLS access for -static -pthread.
8336 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8337 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8338 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8339
802e8e6d
PA
83402014-05-20 Pedro Alves <palves@redhat.com>
8341
8342 * linux-aarch64-low.c (aarch64_insert_point)
8343 (aarch64_remove_point): No longer check whether the type is
8344 supported here. Adjust to new interface.
8345 (the_low_target): Install aarch64_supports_z_point_type as
8346 supports_z_point_type method.
8347 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8348 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8349 instead of a Z packet char. Adjust.
8350 (arm_supports_z_point_type): New function.
8351 (arm_insert_point, arm_remove_point): Adjust to new interface.
8352 (the_low_target): Install arm_supports_z_point_type.
8353 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8354 (cris_insert_point, cris_remove_point): Adjust to new interface.
8355 Don't check whether the type is supported here.
8356 (the_low_target): Install cris_supports_z_point_type.
8357 * linux-low.c (linux_supports_z_point_type): New function.
8358 (linux_insert_point, linux_remove_point): Adjust to new interface.
8359 * linux-low.h (struct linux_target_ops) <insert_point,
8360 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8361 raw_breakpoint pointer parameter.
8362 <supports_z_point_type>: New method.
8363 * linux-mips-low.c (mips_supports_z_point_type): New function.
8364 (mips_insert_point, mips_remove_point): Adjust to new interface.
8365 Use mips_supports_z_point_type.
8366 (the_low_target): Install mips_supports_z_point_type.
8367 * linux-ppc-low.c (the_low_target): Install NULL as
8368 supports_z_point_type method.
8369 * linux-s390-low.c (the_low_target): Install NULL as
8370 supports_z_point_type method.
8371 * linux-sparc-low.c (the_low_target): Install NULL as
8372 supports_z_point_type method.
8373 * linux-x86-low.c (x86_supports_z_point_type): New function.
8374 (x86_insert_point): Adjust to new insert_point interface. Use
8375 insert_memory_breakpoint. Adjust to new
8376 i386_low_insert_watchpoint interface.
8377 (x86_remove_point): Adjust to remove_point interface. Use
8378 remove_memory_breakpoint. Adjust to new
8379 i386_low_remove_watchpoint interface.
8380 (the_low_target): Install x86_supports_z_point_type.
8381 * lynx-low.c (lynx_target_ops): Install NULL as
8382 supports_z_point_type callback.
8383 * nto-low.c (nto_supports_z_point_type): New.
8384 (nto_insert_point, nto_remove_point): Adjust to new interface.
8385 (nto_target_ops): Install nto_supports_z_point_type.
8386 * mem-break.c: Adjust intro comment.
8387 (struct raw_breakpoint) <raw_type, size>: New fields.
8388 <inserted>: Update comment.
8389 <shlib_disabled>: Delete field.
8390 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8391 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8392 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8393 (raw_bkpt_type_to_target_hw_bp_type): New function.
8394 (find_enabled_raw_code_breakpoint_at): New function.
8395 (find_raw_breakpoint_at): New type and size parameters. Use them.
8396 (insert_memory_breakpoint): New function, based off
8397 set_raw_breakpoint_at.
8398 (remove_memory_breakpoint): New function.
8399 (set_raw_breakpoint_at): Reimplement.
8400 (set_breakpoint): New, based on set_breakpoint_at.
8401 (set_breakpoint_at): Reimplement.
8402 (delete_raw_breakpoint): Go through the_target->remove_point
8403 instead of assuming memory breakpoints.
8404 (find_gdb_breakpoint_at): Delete.
8405 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8406 (find_gdb_breakpoint): New function.
8407 (set_gdb_breakpoint_at): Delete.
8408 (z_type_supported): New function.
8409 (set_gdb_breakpoint_1): New function, loosely based off
8410 set_gdb_breakpoint_at.
8411 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8412 (delete_gdb_breakpoint_at): Delete.
8413 (delete_gdb_breakpoint_1): New function, loosely based off
8414 delete_gdb_breakpoint_at.
8415 (delete_gdb_breakpoint): New function.
8416 (clear_gdb_breakpoint_conditions): Rename to ...
8417 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8418 breakpoint.
8419 (add_condition_to_breakpoint): Make static.
8420 (add_breakpoint_condition): Take a struct breakpoint pointer
8421 instead of an address. Adjust.
8422 (gdb_condition_true_at_breakpoint): Rename to ...
8423 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8424 z_type parameter.
8425 (gdb_condition_true_at_breakpoint): Reimplement.
8426 (add_breakpoint_commands): Take a struct breakpoint pointer
8427 instead of an address. Adjust.
8428 (gdb_no_commands_at_breakpoint): Rename to ...
8429 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8430 parameter. Return true if no breakpoint was found. Change debug
8431 output.
8432 (gdb_no_commands_at_breakpoint): Reimplement.
8433 (run_breakpoint_commands): Rename to ...
8434 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8435 and change return type to boolean.
8436 (run_breakpoint_commands): New function.
8437 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8438 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8439 breakpoint. Go through the_target->remove_point instead of
8440 assuming memory breakpoint.
8441 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8442 software and hardware breakpoints.
8443 (reinsert_raw_breakpoint): Go through the_target->insert_point
8444 instead of assuming memory breakpoint.
8445 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8446 software and hardware breakpoints.
8447 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8448 Check both software and hardware breakpoints.
8449 (validate_inserted_breakpoint): Assert the breakpoint is a
8450 software breakpoint. Set the inserted flag to -1 instead of
8451 setting shlib_disabled.
8452 (delete_disabled_breakpoints): Adjust.
8453 (validate_breakpoints): Only validate software breakpoints.
8454 Adjust to inserted flag change.
8455 (check_mem_read, check_mem_write): Skip breakpoint types other
8456 than software breakpoints. Adjust to inserted flag change.
8457 * mem-break.h (enum raw_bkpt_type): New enum.
8458 (raw_breakpoint, struct process_info): Forward declare.
8459 (Z_packet_to_target_hw_bp_type): Delete declaration.
8460 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8461 (set_gdb_breakpoint, delete_gdb_breakpoint)
8462 (clear_breakpoint_conditions): New declarations.
8463 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8464 (breakpoint_inserted_here): Update comment.
8465 (add_breakpoint_condition, add_breakpoint_commands): Replace
8466 address parameter with a breakpoint pointer parameter.
8467 (gdb_breakpoint_here): Update comment.
8468 (delete_gdb_breakpoint_at): Delete.
8469 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8470 * server.c (process_point_options): Take a struct breakpoint
8471 pointer instead of an address. Adjust.
8472 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8473 delete_gdb_breakpoint.
8474 * spu-low.c (spu_target_ops): Install NULL as
8475 supports_z_point_type method.
8476 * target.h: Include mem-break.h.
8477 (struct target_ops) <prepare_to_access_memory>: Update comment.
8478 <supports_z_point_type>: New field.
8479 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8480 instead of a char. Also take a raw breakpoint pointer.
8481 * win32-arm-low.c (the_low_target): Install NULL as
8482 supports_z_point_type.
8483 * win32-i386-low.c (i386_supports_z_point_type): New function.
8484 (i386_insert_point, i386_remove_point): Adjust to new interface.
8485 (the_low_target): Install i386_supports_z_point_type.
8486 * win32-low.c (win32_supports_z_point_type): New function.
8487 (win32_insert_point, win32_remove_point): Adjust to new interface.
8488 (win32_target_ops): Install win32_supports_z_point_type.
8489 * win32-low.h (struct win32_target_ops):
8490 <supports_z_point_type>: New method.
8491 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8492 instead of a char. Also take a raw breakpoint pointer.
8493
932539e3
PA
84942014-05-20 Pedro Alves <palves@redhat.com>
8495
8496 * mem-break.h: Include break-common.h.
8497 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8498 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8499 (Z_packet_to_target_hw_bp_type): New declaration.
8500 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8501 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8502 (Z_PACKET_ACCESS_WP): Delete macros.
8503 (Z_packet_to_hw_type): Delete function.
8504 * i386-low.h: Don't include break-common.h here.
8505 (Z_packet_to_hw_type): Delete declaration.
8506 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8507 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8508 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8509 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8510 * linux-aarch64-low.c: Don't include break-common.h here.
8511 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8512 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8513 (Z_packet_to_target_hw_bp_type): Delete function.
8514 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8515 function.
8516 (mips_insert_point, mips_remove_point): Use
8517 Z_packet_to_target_hw_bp_type.
8518
4ff0d3d8
PA
85192014-05-20 Pedro Alves <palves@redhat.com>
8520
8521 * linux-aarch64-low.c: Include break-common.h.
8522 (enum target_point_type): Delete.
8523 (Z_packet_to_point_type): Rename to ...
8524 (Z_packet_to_target_hw_bp_type): ... this, and return a
8525 target_hw_bp_type instead.
8526 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8527 instead of an enum target_point_type.
8528 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8529 breakpoint type.
8530 (aarch64_dr_state_insert_one_point)
8531 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8532 (aarch64_handle_aligned_watchpoint)
8533 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8534 Take an enum target_hw_bp_type instead of an enum
8535 target_point_type.
8536 (aarch64_supports_z_point_type): New function.
8537 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8538 use Z_packet_to_target_hw_bp_type.
8539
786dc519
JB
85402014-05-20 Joel Brobecker <brobecker@adacore.com>
8541
8542 * configure.ac: Only use -Werror by default when DEVELOPMENT
8543 is true.
8544 * configure: Regenerate.
8545
9e0aa64f
JK
85462014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8547
8548 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8549 * linux-x86-low.c (X86_64_USER_REGS): New.
8550 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8551
2b577b92
YQ
85522014-04-28 Yao Qi <yao@codesourcery.com>
8553
8554 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8555 name.
8556
94611da2
PA
85572014-04-25 Pedro Alves <palves@redhat.com>
8558
8559 PR server/16255
8560 * linux-low.c (linux_attach_fail_reason_string): New function.
8561 (linux_attach_lwp): Delete.
8562 (linux_attach_lwp_1): Rename to ...
8563 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8564 argument. Remove "initial" parameter. Return int instead of
8565 void. Don't error or warn here.
8566 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8567 failure to attach to the tgid. Call warning when failing to
8568 attach to an lwp.
8569 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8570 argument. Remove "initial" parameter. Return int instead of
8571 void. Don't error or warn here.
8572 (linux_attach_fail_reason_string): New declaration.
8573 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8574 interface change. Use linux_attach_fail_reason_string.
8575
01f9f808
MS
85762014-04-24 Michael Sturm <michael.sturm@mintel.com>
8577 Walfred Tedeschi <walfred.tedeschi@intel.com>
8578
8579 * Makefile.in: Added rules to handle new files
8580 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8581 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8582 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8583 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8584 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8585 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8586 x32-avx512-linux.o.
8587 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8588 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8589 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8590 i386/x32-avx512.xml.
8591 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8592 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8593 i386/x32-avx512-linux.xml.
8594 * i387-fp.c (num_avx512_k_registers): New constant for number
8595 of K registers.
8596 (num_avx512_zmmh_low_registers): New constant for number of
8597 lower ZMM registers (0-15).
8598 (num_avx512_zmmh_high_registers): New constant for number of
8599 higher ZMM registers (16-31).
8600 (num_avx512_ymmh_registers): New contant for number of higher
8601 YMM registers (ymm16-31 added by avx521 on x86_64).
8602 (num_avx512_xmm_registers): New constant for number of higher
8603 XMM registers (xmm16-31 added by AVX512 on x86_64).
8604 (struct i387_xsave): Add space for AVX512 registers.
8605 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8606 Add code to handle AVX512 registers.
8607 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8608 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8609 prototypei from generated file.
8610 (tdesc_amd64_avx512_linux): Likewise.
8611 (init_registers_x32_avx512_linux): Likewise.
8612 (tdesc_x32_avx512_linux): Likewise.
8613 (init_registers_i386_avx512_linux): Likewise.
8614 (tdesc_i386_avx512_linux): Likewise.
8615 (x86_64_regmap): Add AVX512 registers.
8616 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8617 mask.
8618 (initialize_low_arch): Add code to initialize AVX512 registers.
8619
51aa91f9
PA
86202014-04-23 Pedro Alves <palves@redhat.com>
8621
8622 * mem-break.c (find_gdb_breakpoint_at): Make static.
8623 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8624
a4165e94
PA
86252014-04-23 Pedro Alves <palves@redhat.com>
8626
8627 * i386-low.c: Don't include break-common.h here.
8628 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8629 prototype to take target_hw_bp_type as argument instead of a Z
8630 packet char.
8631 * i386-low.h: Include break-common.h here.
8632 (Z_packet_to_hw_type): Declare.
8633 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8634 prototypes.
8635 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8636 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8637 (x86_remove_point): Convert the packet number to a
8638 target_hw_bp_type before calling i386_low_remove_watchpoint.
8639 * win32-i386-low.c (i386_insert_point): Convert the packet number
8640 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8641 (i386_remove_point): Convert the packet number to a
8642 target_hw_bp_type before calling i386_low_remove_watchpoint.
8643
b8acf843
PA
86442014-04-23 Pedro Alves <palves@redhat.com>
8645
8646 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8647
d708bcd1
PA
86482014-04-10 Pedro Alves <palves@redhat.com>
8649
8650 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8651 Check if the condition or command is NULL before checking if the
8652 breakpoint is known. On success, return true.
8653 * mem-break.h (add_breakpoint_condition): Document return.
8654 (add_breakpoint_commands): Add describing comment.
8655 * server.c (skip_to_semicolon): New function.
8656 (process_point_options): Use it.
8657
2eec7d5b
PA
86582014-04-09 Pedro Alves <palves@redhat.com>
8659
8660 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8661 to lwpid_of.
8662
fa96cb38
PA
86632014-02-27 Pedro Alves <palves@redhat.com>
8664
8665 PR 12702
8666 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8667 macros.
8668 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8669 output.
8670 (last_thread_of_process_p): Take a PID argument instead of a
8671 thread pointer.
8672 (linux_wait_for_lwp): Delete.
8673 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8674 functions.
8675 (linux_low_filter_event): New function, party factored out from
8676 linux_wait_for_event.
8677 (linux_wait_for_event): Rename to ...
8678 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8679 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8680 sigsuspend. Check for zombie leaders.
8681 (linux_wait_for_event): Reimplement as wrapper around
8682 linux_wait_for_event_filtered.
8683 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8684 a normal or signal exit is seen, it's the whole process exiting.
8685 (wait_for_sigstop): No longer a for_each_inferior callback.
8686 Rewrite on top of linux_wait_for_event_filtered.
8687 (stop_all_lwps): Call wait_for_sigstop directly.
8688 * server.c (resume, handle_target_event): Handle
8689 TARGET_WAITKIND_NO_RESUMED.
8690
d763de10
JB
86912014-02-26 Joel Brobecker <brobecker@adacore.com>
8692
8693 * win32-low.c (psapi_get_dll_name,
8694 * win32_CreateToolhelp32Snapshot): Delete.
8695 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8696 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8697 Delete.
8698 (handle_load_dll): Add function description.
8699 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8700
850a0f76
JB
87012014-02-26 Joel Brobecker <brobecker@adacore.com>
8702
8703 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8704 Add comment.
8705 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8706 base address when calling win32_add_one_solib.
8707 (handle_load_dll): Delete local variable load_addr.
8708 Remove 0x1000 offset applied to DLL base address when calling
8709 win32_add_one_solib.
8710 (handle_unload_dll): Add comment.
8711
f25b3fc3
JB
87122014-02-26 Joel Brobecker <brobecker@adacore.com>
8713
8714 * win32-low.c (win32_add_all_dlls): Renames
8715 win32_ensure_ntdll_loaded. Rewrite function documentation.
8716 Adjust implementation to always load all DLLs.
8717 Add 0x1000 offset to DLL base address when calling
8718 win32_add_one_solib.
8719 (child_initialization_done): New static global.
8720 (do_initial_child_stuff): Set child_initialization_done to
8721 zero during child initialization, and 1 after. Replace call
8722 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8723 Add comment.
8724 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8725 (handle_unload_dll): Add function documentation.
8726 (get_child_debug_event): Ignore load and unload DLL events
8727 during child initialization.
8728
d86d4aaf
DE
87292014-02-20 Doug Evans <dje@google.com>
8730
3bc32da3 8731 Remove global all_lwps.
d86d4aaf
DE
8732 * inferiors.h (ptid_of): Move here from linux-low.h.
8733 (pid_of, lwpid_of): Ditto.
8734 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8735 parameter is a struct thread_info * now.
8736 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8737 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8738 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8739 directly.
8740 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8741 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8742 * linux-arm-low.c (update_registers_callback): Update, "entry"
8743 parameter is a struct thread_info * now.
8744 Fetch lwpid from current_inferior directly.
8745 (arm_insert_point): Pass &all_threads to find_inferior instead of
8746 &all_lwps.
8747 (arm_remove_point): Ditto.
8748 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8749 (arm_prepare_to_resume): Fetch pid from thread.
8750 (arm_read_description): Fetch lwpid from current_inferior directly.
8751 * linux-low.c (all_lwps): Delete.
8752 (delete_lwp): Delete call to remove_inferior.
8753 (handle_extended_wait): Fetch lwpid from thread.
8754 (add_lwp): Don't set lwp->entry.id. Remove call to
8755 add_inferior_to_list.
8756 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8757 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8758 (kill_one_lwp_callback): Ditto.
8759 (linux_kill): Don't dereference NULL pointer.
8760 Fetch ptid,lwpid from thread.
8761 (get_detach_signal): Fetch ptid from thread.
8762 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8763 Simplify call to regcache_invalidate_thread.
8764 (delete_lwp_callback): Update, "entry" parameter is a
8765 struct thread_info * now. Fetch pid from thread.
8766 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8767 (status_pending_p_callback): Update, "entry" parameter is a
8768 struct thread_info * now. Fetch ptid from thread.
8769 (find_lwp_pid): Update, "entry" parameter is a
8770 struct thread_info * now.
8771 (linux_wait_for_lwp): Fetch pid from thread.
8772 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8773 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8774 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8775 (dequeue_one_deferred_signal): Ditto.
8776 (cancel_breakpoint): Fetch ptid from current_inferior.
8777 (linux_wait_for_event): Pass &all_threads to find_inferior,
8778 not &all_lwps. Fetch ptid, lwpid from thread.
8779 (count_events_callback): Update, "entry" parameter is a
8780 struct thread_info * now.
8781 (select_singlestep_lwp_callback): Ditto.
8782 (select_event_lwp_callback): Ditto.
8783 (cancel_breakpoints_callback): Ditto.
8784 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8785 not &all_lwps.
8786 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8787 (unsuspend_one_lwp): Update, "entry" parameter is a
8788 struct thread_info * now.
8789 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8790 not &all_lwps.
8791 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8792 Fetch lwpid from thread, not lwp.
8793 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8794 Pass &all_threads to find_inferior, not &all_lwps.
8795 (send_sigstop): Fetch lwpid from thread, not lwp.
8796 (send_sigstop_callback): Update, "entry" parameter is a
8797 struct thread_info * now.
8798 (suspend_and_send_sigstop_callback): Ditto.
8799 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8800 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8801 struct thread_info * now.
8802 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8803 from thread, lwp.
8804 (lwp_running): Update, "entry" parameter is a
8805 struct thread_info * now.
8806 (stop_all_lwps): Fetch ptid from thread.
8807 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8808 (linux_resume_one_lwp): Fetch lwpid from thread.
8809 (linux_set_resume_request): Update, "entry" parameter is a
8810 struct thread_info * now. Fetch pid, lwpid from thread.
8811 (resume_status_pending_p): Update, "entry" parameter is a
8812 struct thread_info * now.
8813 (need_step_over_p): Ditto. Fetch lwpid from thread.
8814 (start_step_over): Fetch lwpid from thread.
8815 (linux_resume_one_thread): Update, "entry" parameter is a
8816 struct thread_info * now. Fetch lwpid from thread.
8817 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8818 (proceed_one_lwp): Update, "entry" parameter is a
8819 struct thread_info * now. Fetch lwpid from thread.
8820 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8821 struct thread_info * now.
8822 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8823 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8824 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8825 directly.
8826 (regsets_store_inferior_registers): Ditto.
8827 (fetch_register, store_register): Ditto.
8828 (linux_read_memory, linux_write_memory): Ditto.
8829 (linux_request_interrupt): Ditto.
8830 (linux_read_auxv): Ditto.
8831 (linux_xfer_siginfo): Ditto.
8832 (linux_qxfer_spu): Ditto.
8833 (linux_qxfer_libraries_svr4): Ditto.
8834 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8835 moved to inferiors.h.
8836 (get_lwp): Delete.
8837 (get_thread_lwp): Update.
8838 (struct lwp_info): Delete member "entry". Simplify comment for
8839 member "thread".
8840 (all_lwps): Delete.
8841 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8842 current_inferior directly.
8843 (update_watch_registers_callback): Update, "entry" parameter is a
8844 struct thread_info * now. Fetch pid from thread.
8845 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8846 (mips_insert_point): Fetch lwpid from current_inferior.
8847 Pass &all_threads to find_inferior, not &all_lwps.
8848 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8849 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8850 directly.
8851 (mips_stopped_data_address): Ditto.
8852 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8853 directly.
8854 * linux-tile-low.c (tile_arch_setup): Ditto.
8855 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8856 (update_debug_registers_callback): Update, "entry" parameter is a
8857 struct thread_info * now. Fetch pid from thread.
8858 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8859 Pass &all_threads to find_inferior, not &all_lwps.
8860 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8861 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8862 Pass &all_threads to find_inferior, not &all_lwps.
8863 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8864 (i386_dr_low_get_status): Ditto.
8865 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8866 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8867 (x86_linux_read_description): Ditto.
8868 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8869
3b8361aa
DE
88702014-02-20 Doug Evans <dje@google.com>
8871
8872 * inferiors.c (get_first_inferior): Fix buglet.
8873
f7667f0d
DE
88742014-02-19 Doug Evans <dje@google.com>
8875
8876 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8877 * inferiors.c (add_thread): Change result type to struct thread_info *.
8878 All callers updated.
8879 (add_lwp): Call add_thread here instead of in callers.
8880 All callers updated.
8881 * linux-low.h (get_lwp_thread): Rewrite.
8882 (struct lwp_info): New member "thread".
8883
b3312d80
DE
88842014-02-19 Doug Evans <dje@google.com>
8885
8886 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8887 All callers updated.
8888
ecc6f45c
DE
88892014-02-19 Doug Evans <dje@google.com>
8890
8891 * inferiors.c (add_thread): Fix whitespace.
8892
649ebbca
DE
88932014-02-19 Doug Evans <dje@google.com>
8894
8895 * dll.c (clear_dlls): Replace accessing list implemention details
8896 with API function.
8897 * gdbthread.h (get_first_thread): Declare.
8898 * inferiors.c (for_each_inferior_with_data): New function.
8899 (get_first_thread): New function.
8900 (find_thread_ptid): Simplify.
8901 (get_first_inferior): New function.
8902 (clear_list): Delete.
8903 (one_inferior_p): New function.
8904 (clear_inferior_list): New function.
8905 (clear_inferiors): Update.
8906 * inferiors.h (for_each_inferior_with_data): Declare.
8907 (clear_inferior_list): Declare.
8908 (one_inferior_p): Declare.
8909 (get_first_inferior): Declare.
8910 * linux-low.c (linux_wait_for_event): Replace accessing list
8911 implemention details with API function.
8912 * server.c (target_running): Ditto.
8913 (accumulate_file_name_length): New function.
8914 (emit_dll_description): New function.
8915 (handle_qxfer_libraries): Replace accessing list implemention
8916 details with API function.
8917 (handle_qxfer_threads_worker): New function.
8918 (handle_qxfer_threads_proper): Replace accessing list implemention
8919 details with API function.
8920 (handle_query): Ditto.
8921 (visit_actioned_threads_callback_ftype): New typedef.
8922 (visit_actioned_threads_data): New struct.
8923 (visit_actioned_threads): Rewrite to be find_inferior callback.
8924 (resume): Call find_inferior.
8925 (handle_status): Replace accessing list implemention
8926 details with API function.
8927 (process_serial_event): Replace accessing list implemention details
8928 with API function.
8929 * target.c (set_desired_inferior): Replace accessing list implemention
8930 details with API function.
8931 * tracepoint.c (same_process_p): New function.
8932 (gdb_agent_about_to_close): Replace accessing list implemention
8933 details with API function.
8934 * win32-low.c (child_delete_thread): Replace accessing list
8935 implemention details with API function.
8936 (match_dll_by_basename): New function.
8937 (dll_is_loaded_by_basename): New function.
8938 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8939 details call to dll_is_loaded_by_basename.
8940
80894984
DE
89412014-02-19 Doug Evans <dje@google.com>
8942
8943 * dll.h (struct dll_info): Add comment.
8944 * gdbthread.h (struct thread_info): Add comment.
8945 (current_ptid): Simplify.
8946 * inferiors.c (add_process): Update.
8947 (remove_process): Update.
8948 * inferiors.h (struct process_info): Rename member "head" to "entry".
8949 * linux-low.c (delete_lwp): Update.
8950 (add_lwp): Update.
8951 (last_thread_of_process_p): Update.
8952 (kill_one_lwp_callback, linux_kill): Update.
8953 (status_pending_p_callback): Update.
8954 (wait_for_sigstop): Update. Simplify read of ptid.
8955 (start_step_over): Update.
8956 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8957 (get_lwp_thread): Update.
8958 (struct lwp_info): Rename member "head" to "entry".
8959 * regcache.h (inferior_list_entry): Delete.
8960 * server.c (kill_inferior_callback): Update.
8961 (detach_or_kill_inferior_callback): Update.
8962 (print_started_pid): Update.
8963 (print_attached_pid): Update.
8964 (process_serial_event): Simplify read of ptid.
8965 * thread-db.c (thread_db_create_event): Update.
8966 (thread_db_get_tls_address): Update.
8967 * win32-low.c (current_inferior_ptid): Simplify.
8968
46917d26
TT
89692014-02-19 Tom Tromey <tromey@redhat.com>
8970
8971 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8972 argument.
8973 (target_supports_btrace): Update.
8974
0759a81e
YQ
89752014-02-14 Yao Qi <yao@codesourcery.com>
8976
8977 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8978 (rsp-low-ipa.o): New target.
8979
a7191e8b
TT
89802014-02-12 Tom Tromey <tromey@redhat.com>
8981
8982 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8983 convert_ascii_to_int.
8984 * regcache.c (registers_to_string): Likewise.
8985 * remote-utils.c (decode_M_packet): Likewise.
8986 * server.c (process_serial_event): Likewise.
8987
ff0e980e
TT
89882014-02-12 Tom Tromey <tromey@redhat.com>
8989
8990 * server.c (handle_query, handle_v_run): Use hex2bin, not
8991 unhexify.
8992 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8993
e9371aff
TT
89942014-02-12 Tom Tromey <tromey@redhat.com>
8995
8996 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8997 convert_int_to_ascii.
8998 * regcache.c (registers_to_string, collect_register_as_string):
8999 Likewise.
9000 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9001 Likewise.
9002 * server.c (process_serial_event): Likewise.
9003 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9004 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9005
971dc0b8
TT
90062014-02-12 Tom Tromey <tromey@redhat.com>
9007
9008 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9009 bin2hex, not hexify.
9010 * tracepoint.c (cmd_qtstatus): Likewise.
9011
0a822afb
TT
90122014-02-12 Tom Tromey <tromey@redhat.com>
9013
9014 * remote-utils.c (monitor_output): Pass explicit length to
9015 hexify.
9016
9c3d6531
TT
90172014-02-12 Tom Tromey <tromey@redhat.com>
9018
9019 * tracepoint.c: Include rsp-low.h.
9020 * server.c: Include rsp-low.h.
9021 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9022 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9023 declare.
9024 * remote-utils.c: Include rsp-low.h.
9025 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9026 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9027 (convert_int_to_ascii, convert_ascii_to_int): Move to
9028 common/rsp-low.c.
9029 * regcache.c: Include rsp-low.h.
9030 * ax.c: Include rsp-low.h.
9031 * Makefile.in (SFILES): Add common/rsp-low.c.
9032 (OBS): Add rsp-low.o.
9033 (rsp-low.o): New target.
9034
01fd3ea5
TT
90352014-02-12 Tom Tromey <tromey@redhat.com>
9036
9037 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9038 Include print-utils.h.
9039 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9040 (plongest, thirty_two, phex_nz): Remove.
9041 * Makefile.in (SFILES): Add common/print-utils.c.
9042 (OBS): Add print-utils.o.
9043 (print-utils-ipa.o): New target.
9044 (print-utils.o): New target.
9045 (IPA_OBJS): Add print-utils-ipa.o.
9046
e99dc820
TT
90472014-02-06 Tom Tromey <tromey@redhat.com>
9048
9049 * Makefile.in (SFILES): Fix indentation.
9050
ee1e2d4f
DE
90512014-02-05 Doug Evans <dje@google.com>
9052
9053 * linux-low.c (linux_wait_for_event): Improve comment.
9054 (linux_wait_1): Keep current_inferior in sync with event_child.
9055
f5a02773
DE
90562014-01-22 Doug Evans <dje@google.com>
9057
9058 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9059
87ce2a04
DE
90602014-01-22 Doug Evans <dje@google.com>
9061
9062 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9063 * configure: Regenerate.
9064 * config.in: Regenerate.
9065 * Makefile.in (SFILES): Add debug.c.
9066 (OBS): Add debug.o.
9067 * debug.c: New file.
9068 * debug.h: New file.
9069 * linux-aarch64-low.c (*): Update all debugging printfs to use
9070 debug_printf instead of fprintf.
9071 * linux-arm-low.c (*): Ditto.
9072 * linux-cris-low.c (*): Ditto.
9073 * linux-crisv32-low.c (*): Ditto.
9074 * linux-m32r-low.c (*): Ditto.
9075 * linux-sparc-low.c (*): Ditto.
9076 * linux-x86.c (*): Ditto.
9077 * linux-low.c (*): Ditto.
9078 (linux_wait_1): Add calls to debug_enter, debug_exit.
9079 (linux_wait): Remove redundant debugging printf.
9080 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9081 (linux_resume, unstop_all_lwps): Ditto.
9082 * mem-break.c (*): Update all debugging printfs to use
9083 debug_printf instead of fprintf.
9084 * remote-utils.c (*): Ditto.
9085 * thread-db.c (*): Ditto.
9086 * server.c #include <ctype.h>, "gdb_vecs.h".
9087 (debug_threads): Moved to debug.c.
9088 (*): Update all debugging printfs to use debug_printf instead of
9089 fprintf.
9090 (start_inferior): Replace call to fflush with call to debug_flush.
9091 (monitor_show_help): Mention set debug-format.
9092 (parse_debug_format_options): New function.
9093 (handle_monitor_command): Handle "monitor set debug-format".
9094 (gdbserver_usage): Mention --debug-format.
9095 (main): Parse --debug-format.
9096 * server.h (debug_threads): Declaration moved to debug.h.
9097 #include "debug.h".
9098 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9099 trace_debug_1 that uses debug_printf.
9100 (tracepoint_look_up_symbols): Update all debugging printfs to use
9101 debug_printf instead of fprintf.
9102
e671835b
BS
91032014-01-20 Baruch Siach <baruch@tkos.co.il>
9104
9105 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9106 sys/ptrace.h.
9107
b5737fa9
PA
91082014-01-17 Pedro Alves <palves@redhat.com>
9109
ea38d2a9 9110 PR build/16445
c7faa97a
PA
9111 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9112 defined after including gdb_proc_service.h.
b5737fa9 9113
40ed484e
DE
91142014-01-16 Doug Evans <dje@google.com>
9115
9116 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9117 (match_dll): Use it.
9118
969c39fb
MM
91192014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9120
9121 * target.h (target_ops) <read_btrace>: Change parameters and
9122 return type to allow error reporting.
9123 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9124 trace reading errors on.
9125 * linux-low.c (linux_low_read_btrace): Pass trace reading
9126 errors on.
9127 (linux_low_disable_btrace): New.
9128
ab7f45ba
DE
91292014-01-15 Doug Evans <dje@google.com>
9130
9131 * inferiors.c (thread_id_to_gdb_id): Delete.
9132 * inferiors.h (thread_id_to_gdb_id): Delete.
9133
66af0f44
EZ
91342014-01-13 Eli Zaretskii <eliz@gnu.org>
9135
9136 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9137 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9138 versions.
9139
9939e131
PA
91402014-01-08 Pedro Alves <palves@redhat.com>
9141
9142 * server.c (handle_status): Don't discard previous queued stop
9143 replies or thread's pending status here.
9144 (main) <disconnection>: Do it here instead.
9145
b7ea362b
PA
91462014-01-08 Pedro Alves <palves@redhat.com>
9147
9148 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9149 * server.c (visit_actioned_threads, handle_pending_status): New
9150 function.
9151 (handle_v_cont): Factor out parts to ...
9152 (resume): ... this new function. If in all-stop, and a thread
9153 being resumed has a pending status, report it without actually
9154 resuming.
9155 (myresume): Adjust to use the new 'resume' function.
9156 (clear_pending_status_callback, set_pending_status_callback)
9157 (find_status_pending_thread_callback): New functions.
9158 (handle_status): Handle the case of multiple threads having
9159 interesting statuses to report. Report threads' real last signal
9160 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9161 with an interesting thread to report the status for, instead of
9162 always reporting the status of the first thread.
9163
28498c42
JB
91642014-01-01 Joel Brobecker <brobecker@adacore.com>
9165
9166 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9167 * gdbreplay.c (gdbreplay_version): Likewise.
9168
f45c82da
YZ
91692013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9170
9171 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9172 iov.iov_len with the real length in use.
9173
379a5e2d
JB
91742013-12-13 Joel Brobecker <brobecker@adacore.com>
9175
9176 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9177 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9178 for all targets that use win32-low.c.
9179 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9180 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9181
4210d83e
PA
91822013-12-13 Pedro Alves <palves@redhat.com>
9183
9184 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9185 if equal to TARGET_WAITKIND_LOADED.
9186 * win32-low.c (cached_status): New static global.
9187 (win32_wait): Add declaration.
9188 (do_initial_child_stuff): Flush all initial pending debug events
9189 up to the initial breakpoint.
9190 (win32_wait): If CACHED_STATUS was set, return that instead
9191 of doing a real wait. Remove the code resuming the execution
9192 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9193 during the initial phase. Also remove the code changing
9194 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9195 TARGET_WAITKIND_STOPPED.
9196
e7f0d979
YQ
91972013-12-11 Yao Qi <yao@codesourcery.com>
9198
9199 * notif.c (handle_notif_ack): Return 0 if no notification
9200 matches.
9201
ebcf782c
DE
92022013-11-20 Doug Evans <dje@google.com>
9203
9204 * linux-low.c (linux_set_resume_request): Fix comment.
9205
20ad9378
DE
92062013-11-20 Doug Evans <dje@google.com>
9207
9208 * linux-low.c (resume_status_pending_p): Tweak comment.
9209
a196ebeb
WT
92102013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9211
9212 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9213 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9214 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9215 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9216 (srv_amd64_regobj): Add amd64-mpx.o.
9217 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9218 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9219 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9220 * i387-fp.c (num_pl_bnd_register) Added constant.
9221 (num_pl_bnd_cfg_registers) Added constant.
9222 (struct i387_xsave) Added reserved area and MPX fields.
9223 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9224 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9225 function.
9226 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9227 (init_registers_amd64_mpx_linux): Declare new function.
9228 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9229 (x86_64_regmap): Add MPX registers.
9230 (x86_linux_read_description): Add MPX case.
9231 (initialize_low_arch): Initialize MPX targets.
9232
0080a2f6
TT
92332013-11-18 Tom Tromey <tromey@redhat.com>
9234
9235 * configure: Rebuild.
9236 * configure.ac: Don't check for stdlib.h.
9237 * gdbreplay.c: Unconditionally include stdlib.h.
9238
2978b111
TT
92392013-11-18 Tom Tromey <tromey@redhat.com>
9240
9241 * config.in: Rebuild.
9242 * configure: Rebuild.
9243 * configure.ac: Don't use AC_HEADER_DIRENT.
9244
a3d08894
TT
92452013-11-18 Tom Tromey <tromey@redhat.com>
9246
9247 * server.h: Don't check HAVE_STRING_H.
9248 * gdbreplay.c: Don't check HAVE_STRING_H.
9249 * configure: Rebuild.
9250
0a5dd17d
TT
92512013-11-18 Tom Tromey <tromey@redhat.com>
9252
9253 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9254 LIBGNU.
9255
1bd2f0ba
TT
92562013-11-08 Tom Tromey <tromey@redhat.com>
9257
9258 * configure, config.in: Rebuild.
9259 * configure.ac: Remove unused configury.
9260
3266f10b
TT
92612013-11-08 Tom Tromey <tromey@redhat.com>
9262
9263 * acinclude.m4: Include common.m4, codeset.m4.
9264 * configure, config.in: Rebuild.
9265 * configure.ac: Use GDB_AC_COMMON.
9266
6682d959
AA
92672013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9268
9269 * linux-s390-low.c (HWCAP_S390_TE): New define.
9270 (s390_arch_setup): Consider the TE field in the HWCAP for
9271 determining 'have_regset_tdb'.
9272
fd0a4d76
SDJ
92732013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9274
9275 PR gdb/16014
9276 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9277 call to sizeof.
9278
1a3d890b
PA
92792013-10-02 Pedro Alves <palves@redhat.com>
9280
9281 * server.c (process_serial_event): Don't output "GDBserver
9282 exiting" if GDB is connected through stdio.
9283 * target.c (mywait): Likewise, be silent if GDB is connected
9284 through stdio.
9285
97ad4581
JB
92862013-10-01 Joel Brobecker <brobecker@adacore.com>
9287
9288 * lynx-low.c (lynx_add_threads_after_attach): New function.
9289 (lynx_attach): Remove call to add_thread. Add call to
9290 lynx_add_threads_after_attach instead.
9291
5b4e221c
MF
92922013-09-28 Mike Frysinger <vapier@gentoo.org>
9293
9294 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9295 * config.in, configure: Regenerated.
9296
ee47b2f8
YQ
92972013-09-18 Yao Qi <yao@codesourcery.com>
9298
9299 PR server/15959
9300 * server.c (start_inferior): Clear 'resume_info'.
9301
d6707650 93022013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9303
d6707650
JW
9304 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9305 for each register.
9306
9243dd0e 93072013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9308
9243dd0e
JW
9309 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9310 linux-tile-low.o to srv_tgtobj.
9311
c623a6ef
WN
93122013-09-16 Will Newton <will.newton@linaro.org>
9313
9314 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9315 out regs.
9316
fb71d39e
PA
93172013-09-06 Pedro Alves <palves@redhat.com>
9318
9319 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9320 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9321 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9322 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9323 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9324 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9325
8e7e9910
PA
93262013-09-06 Pedro Alves <palves@redhat.com>
9327
9328 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9329 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9330
7c3a12ca
PA
93312013-09-06 Pedro Alves <palves@redhat.com>
9332
9333 * linux-amd64-ipa.c: Include tracepoint.h.
9334 * linux-i386-ipa.c: Include tracepoint.h.
9335
8eb3d7b6
RW
93362013-09-06 Ricard Wanderlof <ricardw@axis.com>
9337
9338 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9339 (ps_get_thread_area): New function.
9340
eddddb9d
RW
93412013-09-06 Ricard Wanderlof <ricardw@axis.com>
9342
9343 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9344 (initialize_low_arch): Call init_registers_crisv32 rather than
9345 init_register_crisv32.
9346
533b0600
PA
93472013-09-05 Pedro Alves <palves@redhat.com>
9348
9349 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9350 to ...
9351 * hostio.h: ... this new file.
9352 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9353 win32-low.c: Include hostio.h.
9354
0ce3d3b5
PA
93552013-09-05 Pedro Alves <palves@redhat.com>
9356
9357 * server.h (gdb_client_data, handler_func, callback_handler_func)
9358 (delete_file_handler, add_file_handler, append_callback_event)
9359 (delete_callback_event, start_event_loop, initialize_event_loop):
9360 Move to event-loop.h and include it.
9361 * event-loop.h: New file.
9362
799cdc37
PA
93632013-09-05 Pedro Alves <palves@redhat.com>
9364
9365 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9366 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9367 (loaded_dll, unloaded_dll): Move to ...
9368 * dll.h: ... this new file.
9369 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9370
6a6bbd9d
PA
93712013-09-05 Pedro Alves <palves@redhat.com>
9372
9373 * server.h (current_process, get_thread_process, all_processes)
9374 (add_inferior_to_list, for_each_inferior, current_inferior)
9375 (remove_inferior, add_process, remove_process, find_process_pid)
9376 (have_started_inferiors_p, have_attached_inferiors_p)
9377 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9378 (clear_inferiors, find_inferior, find_inferior_id)
9379 (inferior_target_data, set_inferior_target_data)
9380 (inferior_regcache_data, set_inferior_regcache_data): Move to
9381 inferiors.h, and include it.
9382 * inferiors.h: New file.
9383
f699aaba
PA
93842013-09-05 Pedro Alves <palves@redhat.com>
9385
9386 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9387 Move ...
72f4393d 9388 * ax.h: ... here.
f699aaba 9389
c144c7a0
PA
93902013-09-05 Pedro Alves <palves@redhat.com>
9391
9392 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9393 tracepoint.h.
9394 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9395 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9396 (handle_tracepoint_general_set, handle_tracepoint_query)
9397 (tracepoint_finished_step, tracepoint_was_hit)
9398 (release_while_stepping_state_list, current_traceframe)
9399 (in_readonly_region, traceframe_read_mem)
9400 (fetch_traceframe_registers, traceframe_read_sdata)
9401 (traceframe_read_info, struct fast_tpoint_collect_status)
9402 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9403 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9404 (supply_fast_tracepoint_registers)
9405 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9406 (ipa_tdesc, claim_trampoline_space)
9407 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9408 (agent_mem_read, agent_get_trace_state_variable_value)
9409 (agent_set_trace_state_variable_value, agent_tsv_read)
9410 (agent_mem_read_string, get_raw_reg_func_addr)
9411 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9412 * tracepoint.h: ... this new file.
9413
ff42e6ab
PA
94142013-09-05 Pedro Alves <palves@redhat.com>
9415
9416 * server.h (perror_with_name, error, fatal, warning, paddress)
9417 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9418 include it.
9419 * utils.h: New file.
9420
541af0f4
PA
94212013-09-05 Pedro Alves <palves@redhat.com>
9422
9423 * server.h (remote_debug, noack_mode, transport_is_reliable)
9424 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9425 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9426 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9427 (write_enn, initialize_async_io, enable_async_io)
9428 (disable_async_io, check_remote_input_interrupt_request)
9429 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9430 (dead_thread_notify, prepare_resume_reply)
9431 (decode_address_to_semicolon, decode_address, decode_m_packet)
9432 (decode_M_packet, decode_X_packet, decode_xfer_write)
9433 (decode_search_memory_packet, unhexify, hexify)
9434 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9435 (look_up_one_symbol, relocate_instruction)
9436 (monitor_output): Move to remote-utils.h, and include it.
9437 * remote-utils.h: New file.
9438
eebdf26b
PA
94392013-09-05 Pedro Alves <palves@redhat.com>
9440
9441 * server.h (_): Delete.
9442
3aafd2ff
PA
94432013-09-02 Pedro Alves <palves@redhat.com>
9444
9445 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9446 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9447 allocated.
9448 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9449
cee83bcb
PM
94502013-09-02 Pierre Muller <muller@sourceware.org>
9451
9452 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9453 or WriteProcessMemory complete successfully and handle
9454 ERROR_PARTIAL_COPY error.
9455
9a13b2fa
PA
94562013-09-02 Pedro Alves <palves@redhat.com>
9457
9458 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9459 error instead of EIO.
9460
602e3198
JK
94612013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9462
9463 PR server/15604
9464 * linux-low.c: Include filestuff.h.
9465 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9466 * lynx-low.c: Include filestuff.h.
9467 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9468 * server.c: Include filestuff.h.
9469 (main): Call notice_open_fds.
9470 * spu-low.c: Include filestuff.h.
9471 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9472
96d7229d
LM
94732013-08-22 Luis Machado <lgustavo@codesourcery.com>
9474
9475 * Makefile.in: Explain why ../target and ../nat are not
9476 listed as include file search paths.
9477 (linux-waitpid.o): New object file rule.
9478 * configure.srv (srv_native_linux_obj): New variable.
9479 Replace all occurrences of linux native object files with
9480 $srv_native_linux_obj.
9481 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9482 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9483 (linux_enable_event_reporting): Remove declaration.
9484 (my_waitpid): Moved to common/linux-waitpid.c.
9485 (linux_wait_for_event): Pass ptid when calling
9486 linux_enable_event_reporting.
9487 (linux_supports_tracefork_flag): Remove.
9488 (linux_enable_event_reporting): Likewise.
9489 (linux_tracefork_grandchild): Remove.
9490 (STACK_SIZE): Moved to common/linux-ptrace.c.
9491 (linux_tracefork_child): Remove.
9492 (linux_test_for_tracefork): Remove.
9493 (linux_look_up_symbols): Call linux_supports_traceclone.
9494 (initialize_low): Remove call to linux_test_for_tracefork.
9495 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9496 common/linux-ptrace.h.
9497 (PTRACE_TYPE_ARG4): Likewise.
9498 Include linux-ptrace.h.
9499
32940073
PA
95002013-08-21 Pedro Alves <palves@redhat.com>
9501
9502 * config.in: Renegerate.
9503
33b60d58 95042013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9505
33b60d58
LM
9506 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9507 (SFILES): Remove $(srcdir)/common/target-common.c and
9508 add $(srcdir)/target/waitstatus.c.
9509 (OBS): Remove target-common.o and add waitstatus.o.
9510 (server_h): Remove $(srcdir)/../common/target-common.h and
9511 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9512 and $(srcdir)/../target/waitstatus.h.
9513 (target-common.o): Remove.
9514 (waitstatus.o): New target object file.
9515 * target.h: Do not include target-common.h and
9516 include target/resume.h, target/wait.h and
9517 target/waitstatus.h.
9518
b8e1b30e
LM
95192013-08-13 Luis Machado <lgustavo@codesourcery.com>
9520
9521 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9522 to PTRACE_TYPE_ARG3.
9523 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9524 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9525 PTRACE_TYPE_ARG4.
9526 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9527 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9528
7a60ad40
YQ
95292013-07-27 Jie Zhang <jie@codesourcery.com>
9530 Daniel Jacobowitz <dan@codesourcery.com>
9531 Yao Qi <yao@codesourcery.com>
9532
9533 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9534 (mips-linux-watch.o): New rule.
9535 (mips_linux_watch_h): New variable.
9536 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9537 srv_tgtobj.
9538 * linux-mips-low.c: Include mips-linux-watch.h.
9539 (struct arch_process_info, struct arch_lwp_info): New.
9540 (update_watch_registers_callback): New function.
9541 (mips_linux_new_process, mips_linux_new_thread) New functions.
9542 (mips_linux_prepare_to_resume, mips_insert_point): New
9543 functions.
9544 (mips_remove_point, mips_stopped_by_watchpoint): New
9545 functions.
9546 (rsp_bp_type_to_target_hw_bp_type): New function.
9547 (mips_stopped_data_address): New function.
9548 (the_low_target): Add watchpoint support functions.
9549
de6f69ad
YQ
95502013-07-27 Yao Qi <yao@codesourcery.com>
9551
9552 * i386-low.c: Include break-common.h.
9553 (enum target_hw_bp_type): Remove.
9554
3360c0bf
LM
95552013-07-24 Luis Machado <lgustavo@codesourcery.com>
9556
9557 * Makefile.in (SFILES): /common/target-common.c.
9558 (OBS): Add target-common.o.
9559 (server_h): Add $(srcdir)/../common/target-common.h.
9560 (target-common.o): New target.
9561 * server.c (queue_stop_reply_callback): Free
9562 status string after use.
9563 * target.c (target_waitstatus_to_string): Remove.
9564 * target.h: Include target-common.h.
9565 (resume_kind): Likewise.
9566 (target_waitkind): Likewise.
9567 (target_waitstatus): Likewise.
9568 (TARGET_WNOHANG): Likewise.
9569
bd885420
YQ
95702013-07-04 Yao Qi <yao@codesourcery.com>
9571
9572 * Makefile.in (host_alias): Use @host_noncanonical@.
9573 (target_alias): Use @target_noncanonical@.
9574 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9575 ACX_NONCANONICAL_HOST.
9576 * configure: Regenerated.
9577
9578 Revert:
9579 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9580
9581 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9582 * configure: Rebuild.
9583 * Makefile.in (version_host, version_target): Get from configure.
9584 (version.c): Use $(version_host) and $(version_target).
9585
17ef446e
PA
95862013-07-03 Pedro Alves <palves@redhat.com>
9587
9588 * Makefile.in (config.status): Depend on development.sh.
9589 * acinclude.m4: Include libmcheck.m4.
9590 * configure: Regenerate.
9591
7a9a7487
MG
95922013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9593
9594 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9595 attribute inside the parentheses.
9596 (winapi_DebugSetProcessKillOnExit): Ditto.
9597 (winapi_DebugBreakProcess): Ditto.
9598 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9599
49b64de6
MG
96002013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9601
9602 * notif.h (notif_event): Add a dummy member to avoid compiler
9603 errors.
9604
d5749ee7
PA
96052013-07-01 Pedro Alves <palves@redhat.com>
9606
9607 * hostio.c (HOSTIO_PATH_MAX): Define.
9608 (require_filename, handle_open, handle_unlink, handle_readlink):
9609 Use it.
9610
d8d2a3ee
PA
96112013-07-01 Pedro Alves <palves@redhat.com>
9612
9613 * server.h: Include "pathmax.h".
9614 * linux-low.c: Don't include sys/param.h.
9615 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9616 MAXPATHLEN.
9617 * win32-low.c: Don't include sys/param.h.
9618 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9619
bc7dea8d
PA
96202013-07-01 Pedro Alves <palves@redhat.com>
9621
9622 * event-loop.c: Don't check HAVE_UNISTD_H before including
9623 <unistd.h>.
9624 * gdbreplay.c: Likewise.
9625 * remote-utils.c: Likewise.
9626 * server.c: Likewise.
9627 * configure.ac: Don't check for unistd.h.
9628 * configure: Regenerate.
9629
d6c2da54
TT
96302013-06-28 Tom Tromey <tromey@redhat.com>
9631
9632 * Makefile.in (version.c): Use version.in, not
9633 common/version.in.
9634
257b6bec
MG
96352013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9636
9637 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9638 * configure: Rebuild.
9639 * Makefile.in (version_host, version_target): Get from configure.
9640 (version.c): Use $(version_host) and $(version_target).
9641
86ebe149
DK
96422013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9643
9644 Fix trace-status to output user name without trailing colon.
9645 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9646
f30aa5af
DK
96472013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9648
9649 Fix trace-status to output proper start-time and stop-time.
9650 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9651 output start time and stop time in hex as gdb expects.
9652
28a93511
YQ
96532013-06-26 Pedro Alves <pedro@codesourcery.com>
9654
9655 * tracepoint.c (build_traceframe_info_xml): Output trace state
9656 variables present in the trace buffer.
9657
01208463
TT
96582013-06-24 Tom Tromey <tromey@redhat.com>
9659
9660 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9661 create-version.sh.
9662 (version.o): Remove.
9663 * gdbreplay.c: Include version.h.
9664 (version, host_name): Don't declare.
9665 * server.h: Include version.h.
9666 (version, host_name): Don't declare.
9667
760256f9
PA
96682013-06-12 Pedro Alves <palves@redhat.com>
9669
9670 * linux-x86-low.c (linux_is_elf64): Delete global.
9671 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9672 with local linux_pid_exe_is_elf_64_file use.
9673
030031ee
PA
96742013-06-11 Pedro Alves <palves@redhat.com>
9675
9676 * linux-low.c (regset_disabled, disable_regset): New functions.
9677 (regsets_fetch_inferior_registers)
9678 (regsets_store_inferior_registers): Use them.
9679 (initialize_regsets_info); Don't allocate the disabled_regsets
9680 array here.
9681 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9682 comment.
9683
5da6eb0a
PA
96842013-06-11 Pedro Alves <palves@redhat.com>
9685
9686 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9687 xmalloc.
9688
7e5aaa09
PA
96892013-06-11 Pedro Alves <palves@redhat.com>
9690
9691 * linux-x86-low.c (initialize_low_arch): Call
9692 init_registers_x32_avx_linux.
9693
d878444c
JK
96942013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9695
9696 Fix compatibility with Android Bionic.
9697 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9698 it is not empty.
9699
3aee8918
PA
97002013-06-07 Pedro Alves <palves@redhat.com>
9701
5f2b57b5 9702 PR server/14823
3aee8918
PA
9703 * Makefile.in (OBS): Add tdesc.o.
9704 (IPA_OBJS): Add tdesc-ipa.o.
9705 (tdesc-ipa.o): New rule.
9706 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9707 interface.
9708 * linux-low.c (new_inferior): Delete.
9709 (disabled_regsets, num_regsets): Delete.
9710 (linux_add_process): Adjust to set the new per-process
9711 new_inferior flag.
9712 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9713 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9714 was a stop. When calling arch_setup, switch the current inferior
9715 to the thread that got an event.
9716 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9717 (regsets_fetch_inferior_registers)
9718 (regsets_store_inferior_registers): New regsets_info parameter.
9719 Adjust to use it.
9720 (linux_register_in_regsets): New regs_info parameter. Adjust to
9721 use it.
9722 (register_addr, fetch_register, store_register): New usrregs_info
9723 parameter. Adjust to use it.
9724 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9725 parameter regs_info. Adjust to use it.
9726 (linux_fetch_registers): Get the current inferior's regs_info, and
9727 adjust to use it.
9728 (linux_store_registers): Ditto.
9729 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9730 (initialize_low): Don't initialize the target_regsets here. Call
9731 initialize_low_arch.
9732 * linux-low.h (target_regsets): Delete declaration.
9733 (struct regsets_info): New.
9734 (struct usrregs_info): New.
9735 (struct regs_info): New.
9736 (struct process_info_private) <new_inferior>: New field.
9737 (struct linux_target_ops): Delete the num_regs, regmap, and
9738 regset_bitmap fields. New field regs_info.
9739 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9740 * i387-fp.c (num_xmm_registers): Delete.
9741 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9742 calls to new interface.
9743 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9744 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9745 Infer the number of xmm registers from the regcache's target
9746 description.
9747 * i387-fp.h (num_xmm_registers): Delete.
9748 * inferiors.c (add_thread): Don't install the thread's regcache
9749 here.
9750 * proc-service.c (gregset_info): Fetch the current inferior's
9751 regs_info. Adjust to use it.
9752 * regcache.c: Include tdesc.h.
9753 (register_bytes, reg_defs, num_registers)
9754 (gdbserver_expedite_regs): Delete.
9755 (get_thread_regcache): If the thread doesn't have a regcache yet,
9756 create one, instead of aborting gdbserver.
9757 (regcache_invalidate_one): Rename to ...
9758 (regcache_invalidate_thread): ... this.
9759 (regcache_invalidate_one): New.
9760 (regcache_invalidate): Only invalidate registers of the current
9761 process.
9762 (init_register_cache): Add target_desc parameter, and use it.
9763 (new_register_cache): Ditto. Assert the target description has a
9764 non zero registers_size.
9765 (regcache_cpy): Add assertions. Adjust.
9766 (realloc_register_cache, set_register_cache): Delete.
9767 (registers_to_string, registers_from_string): Adjust.
9768 (find_register_by_name, find_regno, find_register_by_number)
9769 (register_cache_size): Add target_desc parameter, and use it.
9770 (free_register_cache_thread, free_register_cache_thread_one)
9771 (regcache_release, register_cache_size): New.
9772 (register_size): Add target_desc parameter, and use it.
9773 (register_data, supply_register, supply_register_zeroed)
9774 (supply_regblock, supply_register_by_name, collect_register)
9775 (collect_register_as_string, collect_register_by_name): Adjust.
9776 * regcache.h (struct target_desc): Forward declare.
9777 (struct regcache) <tdesc>: New field.
9778 (init_register_cache, new_register_cache): Add target_desc
9779 parameter.
9780 (regcache_invalidate_thread): Declare.
9781 (regcache_invalidate_one): Delete declaration.
9782 (regcache_release): Declare.
9783 (find_register_by_number, register_cache_size, register_size)
9784 (find_regno): Add target_desc parameter.
9785 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9786 declarations.
9787 * remote-utils.c: Include tdesc.h.
9788 (outreg, prepare_resume_reply): Adjust.
9789 * server.c: Include tdesc.h.
9790 (gdbserver_xmltarget): Delete declaration.
9791 (get_features_xml, process_serial_event): Adjust.
9792 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9793 declare.
9794 (struct process_info) <tdesc>: New field.
9795 (ipa_tdesc): Declare.
9796 * tdesc.c: New file.
9797 * tdesc.h: New file.
9798 * tracepoint.c: Include tdesc.h.
9799 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9800 (get_context_regcache): Adjust to pass ipa_tdesc down.
9801 (do_action_at_tracepoint): Adjust to get the register cache size
9802 from the context regcache's description.
9803 (traceframe_walk_blocks): Adjust to get the register cache size
9804 from the current trace frame's description.
9805 (traceframe_get_pc): Adjust to get current trace frame's
9806 description and pass it down.
9807 (gdb_collect): Adjust to get the register cache size from the
9808 IPA's description.
9809 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9810 (gdbserver_xmltarget): Delete.
9811 (initialize_low_tracepoint): Set the ipa's target description.
9812 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9813 (initialize_low_tracepoint): Set the ipa's target description.
9814 * linux-x86-low.c: Include tdesc.h.
9815 [__x86_64__] (is_64bit_tdesc): New.
9816 (ps_get_thread_area, x86_get_thread_area): Use it.
9817 (i386_cannot_store_register): Rename to ...
9818 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9819 (i386_cannot_fetch_register): Rename to ...
9820 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9821 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9822 to new interface.
9823 (target_regsets): Rename to ...
9824 (x86_regsets): ... this.
9825 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9826 interface.
9827 (x86_siginfo_fixup): Use is_64bit_tdesc.
9828 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9829 (tdesc_x32_avx_linux, tdesc_x32_linux)
9830 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9831 Declare.
9832 (x86_linux_update_xmltarget): Delete.
9833 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9834 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9835 (AMD64_LINUX_USER64_CS): New.
9836 (x86_linux_read_description): New, based on
9837 x86_linux_update_xmltarget.
9838 (same_process_callback): New.
9839 (x86_arch_setup_process_callback): New.
9840 (x86_linux_update_xmltarget): New.
9841 (x86_regsets_info): New.
9842 (amd64_linux_regs_info): New.
9843 (i386_linux_usrregs_info): New.
9844 (i386_linux_regs_info): New.
9845 (x86_linux_regs_info): New.
9846 (x86_arch_setup): Reimplement.
9847 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9848 (x86_emit_ops): Ditto.
9849 (the_low_target): Adjust. Install x86_linux_regs_info,
9850 x86_cannot_fetch_register, and x86_cannot_store_register.
9851 (initialize_low_arch): New.
9852 * linux-ia64-low.c (tdesc_ia64): Declare.
9853 (ia64_fetch_register): Adjust.
9854 (ia64_usrregs_info, regs_info): New globals.
9855 (ia64_regs_info): New function.
9856 (the_low_target): Adjust.
9857 (initialize_low_arch): New function.
9858 * linux-sparc-low.c (tdesc_sparc64): Declare.
9859 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9860 Adjust.
9861 (sparc_arch_setup): New function.
9862 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9863 (the_low_target): Adjust.
9864 (initialize_low_arch): New function.
9865 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9866 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9867 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9868 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9869 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9870 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9871 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9872 (tdesc_powerpc_isa205_vsx64l): Declare.
9873 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9874 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9875 (ppc_set_pc, ppc_get_hwcap): Adjust.
9876 (ppc_usrregs_info): Forward declare.
9877 (!__powerpc64__) ppc_regmap_adjusted: New global.
9878 (ppc_arch_setup): Adjust to the current process'es target
9879 description.
9880 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9881 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9882 (ppc_store_evrregset): Adjust.
9883 (target_regsets): Rename to ...
9884 (ppc_regsets): ... this, and make static.
9885 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9886 (ppc_regs_info): New function.
9887 (the_low_target): Adjust.
9888 (initialize_low_arch): New function.
9889 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9890 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9891 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9892 (tdesc_s390x_linux64v2): Declare.
9893 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9894 (s390_fill_gregset, s390_store_last_break): Adjust.
9895 (target_regsets): Rename to ...
9896 (s390_regsets): ... this, and make static.
9897 (s390_get_pc, s390_set_pc): Adjust.
9898 (s390_get_hwcap): New target_desc parameter, and use it.
9899 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9900 (s390_arch_setup): Adjust to set the current process'es target
9901 description. Don't adjust the regmap.
9902 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9903 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9904 (regs_info_3264): New globals.
9905 (s390_regs_info): New function.
9906 (the_low_target): Adjust.
9907 (initialize_low_arch): New function.
9908 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9909 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9910 [__mips64] (init_registers_mips_linux)
9911 (init_registers_mips_dsp_linux): Delete defines.
9912 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9913 (have_dsp): New global.
9914 (mips_read_description): New, based on mips_arch_setup.
9915 (mips_arch_setup): Reimplement.
9916 (get_usrregs_info): New function.
9917 (mips_cannot_fetch_register, mips_cannot_store_register)
9918 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9919 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9920 (target_regsets): Rename to ...
9921 (mips_regsets): ... this, and make static.
9922 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9923 (dsp_regs_info, regs_info): New globals.
9924 (mips_regs_info): New function.
9925 (the_low_target): Adjust.
9926 (initialize_low_arch): New function.
9927 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9928 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9929 Declare.
9930 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9931 (arm_read_description): New, with bits factored from
9932 arm_arch_setup.
9933 (arm_arch_setup): Reimplement.
9934 (target_regsets): Rename to ...
9935 (arm_regsets): ... this, and make static.
9936 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9937 (arm_regs_info): New function.
9938 (the_low_target): Adjust.
9939 (initialize_low_arch): New function.
9940 * linux-m68k-low.c (tdesc_m68k): Declare.
9941 (target_regsets): Rename to ...
9942 (m68k_regsets): ... this, and make static.
9943 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9944 (m68k_regs_info): New function.
9945 (m68k_arch_setup): New function.
9946 (the_low_target): Adjust.
9947 (initialize_low_arch): New function.
9948 * linux-sh-low.c (tdesc_sharch): Declare.
9949 (target_regsets): Rename to ...
9950 (sh_regsets): ... this, and make static.
9951 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9952 (sh_regs_info, sh_arch_setup): New functions.
9953 (the_low_target): Adjust.
9954 (initialize_low_arch): New function.
9955 * linux-bfin-low.c (tdesc_bfin): Declare.
9956 (bfin_arch_setup): New function.
9957 (bfin_usrregs_info, regs_info): New globals.
9958 (bfin_regs_info): New function.
9959 (the_low_target): Adjust.
9960 (initialize_low_arch): New function.
9961 * linux-cris-low.c (tdesc_cris): Declare.
9962 (cris_arch_setup): New function.
9963 (cris_usrregs_info, regs_info): New globals.
9964 (cris_regs_info): New function.
9965 (the_low_target): Adjust.
9966 (initialize_low_arch): New function.
9967 * linux-cris-low.c (tdesc_crisv32): Declare.
9968 (cris_arch_setup): New function.
9969 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9970 (cris_regs_info): New function.
9971 (the_low_target): Adjust.
9972 (initialize_low_arch): New function.
9973 * linux-m32r-low.c (tdesc_m32r): Declare.
9974 (m32r_arch_setup): New function.
9975 (m32r_usrregs_info, regs_info): New globals.
9976 (m32r_regs_info): Adjust.
9977 (initialize_low_arch): New function.
9978 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9979 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9980 (tic6x_usrregs_info): Forward declare.
9981 (tic6x_read_description): New function, based on ...
9982 (tic6x_arch_setup): ... this. Reimplement.
9983 (target_regsets): Rename to ...
9984 (tic6x_regsets): ... this, and make static.
9985 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9986 (tic6x_regs_info): New function.
9987 (the_low_target): Adjust.
9988 (initialize_low_arch): New function.
9989 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9990 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9991 (target_regsets): Rename to ...
9992 (xtensa_regsets): ... this, and make static.
9993 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9994 globals.
9995 (xtensa_arch_setup, xtensa_regs_info): New functions.
9996 (the_low_target): Adjust.
9997 (initialize_low_arch): New function.
9998 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9999 (nios2_arch_setup): Set the current process'es tdesc.
10000 (target_regsets): Rename to ...
10001 (nios2_regsets): ... this.
10002 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10003 (nios2_regs_info): New function.
10004 (the_low_target): Adjust.
10005 (initialize_low_arch): New function.
a261b8f5
PA
10006 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10007 (aarch64_arch_setup): Set the current process'es tdesc.
10008 (target_regsets): Rename to ...
10009 (aarch64_regsets): ... this.
10010 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10011 (aarch64_regs_info): New function.
10012 (the_low_target): Adjust.
10013 (initialize_low_arch): New function.
3aee8918
PA
10014 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10015 globals.
10016 (target_regsets): Rename to ...
10017 (tile_regsets): ... this.
10018 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10019 (tile_regs_info): New function.
10020 (tile_arch_setup): Set the current process'es tdesc.
10021 (the_low_target): Adjust.
10022 (initialize_low_arch): New function.
10023 * spu-low.c (tdesc_spu): Declare.
10024 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10025 * win32-arm-low.c (tdesc_arm): Declare.
10026 (arm_arch_setup): New function.
10027 (the_low_target): Install arm_arch_setup instead of
10028 init_registers_arm.
10029 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10030 (init_windows_x86): Rename to ...
10031 (i386_arch_setup): ... this. Set `win32_tdesc'.
10032 (the_low_target): Adjust.
10033 * win32-low.c (win32_tdesc): New global.
10034 (child_add_thread): Don't create the thread cache here.
10035 (do_initial_child_stuff): Set the new process'es tdesc.
10036 * win32-low.h (struct target_desc): Forward declare.
10037 (win32_tdesc): Declare.
10038 * lynx-i386-low.c (tdesc_i386): Declare global.
10039 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10040 * lynx-low.c (lynx_tdesc): New global.
10041 (lynx_add_process): Set the new process'es tdesc.
10042 * lynx-low.h (struct target_desc): Forward declare.
10043 (lynx_tdesc): Declare global.
10044 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10045 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10046 * nto-low.c (nto_tdesc): New global.
10047 (do_attach): Set the new process'es tdesc.
10048 * nto-low.h (struct target_desc): Forward declare.
10049 (nto_tdesc): Declare.
10050 * nto-x86-low.c (tdesc_i386): Declare.
10051 (nto_x86_arch_setup): Set `nto_tdesc'.
10052
b1fbec62
GB
100532013-06-04 Gary Benson <gbenson@redhat.com>
10054
10055 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10056 to qSupported response when appropriate.
10057 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10058 with nonzero-length annex.
10059 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10060 arguments supplied in annex.
10061
d1ec4ce7
DE
100622013-05-31 Doug Evans <dje@google.com>
10063
ac44adcb 10064 PR server/15594
d1ec4ce7
DE
10065 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10066 64 bits in 64-cross-32 environment.
10067
9b25f2d3
PA
100682013-05-28 Pedro Alves <palves@redhat.com>
10069
10070 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10071 (aarch64-without-fpu.c): Delete rule.
10072 * configure.srv (aarch64*-*-linux*): Remove references to
10073 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10074 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10075 declaration.
10076
6740dc9c
PA
100772013-05-24 Pedro Alves <palves@redhat.com>
10078
10079 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10080 instead of strchr/decode_address. Error if the range isn't split
10081 with a ','. Don't assume there's be a ':' in the action.
10082
c2d6af84
PA
100832013-05-23 Yao Qi <yao@codesourcery.com>
10084 Pedro Alves <palves@redhat.com>
10085
10086 * linux-low.c (lwp_in_step_range): New function.
10087 (linux_wait_1): If the thread was range stepping and stopped
10088 outside the stepping range, report the stop to GDB. Otherwise,
10089 continue stepping. Add range stepping debug output.
10090 (linux_set_resume_request): Copy the step range from the resume
10091 request to the lwp.
10092 (linux_supports_range_stepping): New.
10093 (linux_target_ops) <supports_range_stepping>: Set to
10094 linux_supports_range_stepping.
10095 * linux-low.h (struct linux_target_ops)
10096 <supports_range_stepping>: New field.
10097 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10098 * linux-x86-low.c (x86_supports_range_stepping): New.
10099 (the_low_target) <supports_range_stepping>: Set to
10100 x86_supports_range_stepping.
10101 * server.c (handle_v_cont): Handle 'r' action.
10102 (handle_v_requests): Append ";r" if the target supports range
10103 stepping.
10104 * target.h (struct thread_resume) <step_range_start,
10105 step_range_end>: New fields.
10106 (struct target_ops) <supports_range_stepping>:
10107 New field.
10108 (target_supports_range_stepping): New macro.
10109
58794e1a
JB
101102013-05-17 Joel Brobecker <brobecker@adacore.com>
10111
10112 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10113 confusion in comment.
10114
d631c5a7
JB
101152013-05-17 Joel Brobecker <brobecker@adacore.com>
10116
10117 * lynx-low.c (struct process_info_private): New type.
10118 (lynx_add_process): New function.
10119 (lynx_create_inferior, lynx_attach): Replace calls to
10120 add_process by calls to lynx_add_process.
10121 (lynx_resume): If PTID is null, then try using
10122 current_process()->private->last_wait_event_ptid.
10123 Add comments.
10124 (lynx_clear_inferiors): Delete. The contents of that function
10125 has been inlined in lynx_mourn;
10126 (lynx_wait_1): Save the ptid in the process's private data.
10127 (lynx_mourn): Free the process' private data. Replace call
10128 to lynx_clear_inferiors by call to clear_inferiors.
10129
96f7a20f
YQ
101302013-05-17 Yao Qi <yao@codesourcery.com>
10131
10132 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10133 the right place.
10134
db0dfaa0
LM
101352013-05-16 Luis Machado <lgustavo@codesourcery.com>
10136
10137 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10138 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10139 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10140 PT_TEXT_END_ADDR guards. Update comments.
10141 (linux_target_op) <read_offsets>: Conditionally define to
10142 linux_read_offsets if the target is UCLIBC and if it defines
10143 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10144
68f5f838
SL
101452013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10146 Andrew Jenner <andrew@codesourcery.com>
10147
10148 * Makefile.in (SFILES): Add linux-nios2-low.c.
10149 (clean): Add action to delete nios2-linux.c.
10150 (nios2-linux.c): New rule.
10151 * configure.srv: Add nios2*-*-linux*.
10152 * linux-nios2-low.c: New.
10153
1ebff1fd
HAQ
101542013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10155
10156 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10157
f6150862
HZ
101582013-04-25 Hui Zhu <hui@codesourcery.com>
10159
10160 PR gdb/15186
f6150862
HZ
10161 * ax.c (ax_printf): Add fflush.
10162
614c279d
TT
101632013-04-22 Tom Tromey <tromey@redhat.com>
10164
10165 * Makefile.in (SFILES): Add filestuff.c.
10166 (OBS): Add filestuff.o.
10167 (filestuff.o): New target.
10168 * config.in, configure: Rebuild.
10169 * configure.ac: Check for fdwalk, pipe2.
10170
7d4e5717
PA
101712013-04-17 Pedro Alves <palves@redhat.com>
10172
10173 * configure.ac (USE_THREAD_DB): Delete variable.
10174 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10175 Don't AC_SUBST USE_THREAD_DB.
10176 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10177 * config.in, configure: Regenerate.
10178
d5c93e41
PA
101792013-04-16 Pedro Alves <palves@redhat.com>
10180
10181 * linux-low.h (struct lwp_info) <thread_known>: Move under
10182 the USE_THREAD_DB #ifdef.
10183
04f5fe89
PA
101842013-04-16 Pedro Alves <palves@redhat.com>
10185
10186 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10187 (linux-low.o): Delete rule.
10188 * linux-low.h: Always include "gdb_thread_db.h" instead of
10189 conditionally including thread_db.h.
10190 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10191 HAVE_THREAD_DB_H.
10192
480b27bf
JK
101932013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10194
10195 * Makefile.in (install-only): Fix make install regression.
10196
43662968
JK
101972013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10198
10199 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10200 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10201 installation.
10202 * gdbserver.1: Remove.
10203
3e74e146
PA
102042013-03-22 Pedro Alves <palves@redhat.com>
10205
10206 * linux-low.c (handle_extended_wait): Don't call
10207 linux_enable_event_reporting.
10208
a8347a2a
TT
102092013-03-15 Tony Theodore <tonyt@logyst.com>
10210
10211 PR build/9098:
10212 * Makefile.in (SHELL): Use @SHELL@.
10213
eeb56fa7
SDJ
102142013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10215
10216 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10217 compiler warning.
10218
4fa7e2ff
JB
102192013-03-13 Joel Brobecker <brobecker@adacore.com>
10220
10221 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10222 Remove extraneous NULL element.
10223
8ddb1965
YQ
102242013-03-13 Yao Qi <yao@codesourcery.com>
10225
10226 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10227 'V' block in trace frame.
10228
9accd112
MM
102292013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10230
10231 * target.h (struct target_ops): Add btrace ops.
10232 (target_supports_btrace): New macro.
10233 (target_enable_btrace): New macro.
10234 (target_disable_btrace): New macro.
10235 (target_read_btrace): New macro.
10236 * gdbthread.h (struct thread_info): Add btrace field.
10237 * server.c: Include btrace-common.h.
10238 (handle_btrace_general_set): New function.
10239 (handle_btrace_enable): New function.
10240 (handle_btrace_disable): New function.
10241 (handle_general_set): Call handle_btrace_general_set.
10242 (handle_qxfer_btrace): New function.
10243 (struct qxfer qxfer_packets[]): Add btrace entry.
10244 * inferiors.c (remove_thread): Disable btrace.
10245 * linux-low: Include linux-btrace.h.
10246 (linux_low_enable_btrace): New function.
10247 (linux_low_read_btrace): New function.
10248 (linux_target_ops): Add btrace ops.
10249 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10250 Add srv_linux_btrace=yes.
10251 (x86_64-*-linux*): Add linux-btrace.o.
10252 Add srv_linux_btrace=yes.
10253 * configure.ac: Define HAVE_LINUX_BTRACE.
10254 * config.in: Regenerated.
10255 * configure: Regenerated.
10256
5cc22e4c
MM
102572013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10258
10259 * server.c (handle_qxfer): Preserve error message if -3 is
10260 returned.
10261 (qxfer): Document the -3 return value.
10262
7c97f91e
MM
102632013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10264
10265 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10266 (linux_btrace_h): New variable.
10267 (linux-btrace.o): New rule.
10268
be9a119c 102692013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10270 Hafiz Abid Qadeer <abidh@codesourcery.com>
10271
10272 * tracepoint.c (trace_buffer_size): New global.
10273 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10274 (init_trace_buffer): Change to one-argument function. Allocate
10275 trace buffer memory.
10276 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10277 handle QTBuffer:size packet.
10278 (cmd_bigqtbuffer_size): New function.
10279 (initialize_tracepoint): Call init_trace_buffer with
10280 DEFAULT_TRACE_BUFFER_SIZE.
10281 * server.c (handle_query): Add QTBuffer:size in the
10282 supported packets.
10283
e64f7499
YQ
102842013-03-07 Yao Qi <yao@codesourcery.com>
10285
10286 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10287 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10288 of -1.
10289 (cmd_qtsp): Adjust condition. Do post increment.
10290 Set cur_action and cur_step_action back to 0.
10291
f0ae6fc3
PA
102922013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10293
10294 PR server/15236
10295 * linux-low.c (linux_write_memory): Return early success if LEN is
10296 zero.
10297
b5b0b0af
CV
102982013-03-05 Corinna Vinschen <vinschen@redhat.de>
10299
334ad4a8 10300 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10301
589bc927
TT
103022013-02-28 Tom Tromey <tromey@redhat.com>
10303
10304 * configure.ac: Invoke AC_SYS_LARGEFILE.
10305 * configure, config.in: Rebuild.
10306
dfe07582
CV
103072013-02-28 Corinna Vinschen <vinschen@redhat.com>
10308
10309 * win32-low.c: Throughout, fix format strings and casts of
10310 printf-like functions to avoid type related warnings on all
10311 platforms.
10312 (get_child_debug_event): Print dwDebugEventCode as hex since
10313 that's how it's usually documented.
10314
736cd585
YQ
103152013-02-28 Yao Qi <yao@codesourcery.com>
10316
10317 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10318 pulongest.
10319
e1f58301
JW
103202013-02-27 Jiong Wang <jiwang@tilera.com>
10321
10322 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10323 (reg-tilegx32.c): New rule.
10324 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10325 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10326 different register info initializer according to elf class.
10327 (init_registers_tilgx32): New function. The tilegx32 register info
10328 initializer.
10329 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10330 (tile_store_gregset): Likewise.
10331
d171ca78
YQ
103322013-02-27 Yao Qi <yao@codesourcery.com>
10333
10334 * server.c (process_point_options): Print debug message when
10335 debug_threads is true.
10336
282bbdf3
YQ
103372013-02-26 Yao Qi <yao@codesourcery.com>
10338
10339 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10340
aca22551
PA
103412013-02-19 Pedro Alves <palves@redhat.com>
10342 Kai Tietz <ktietz@redhat.com>
10343
10344 PR gdb/15161
10345
10346 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10347 instead of strtoul to extract address from packet.
10348 (process_serial_event) <'z'>: Likewise.
10349
4f3cee1c
YQ
103502013-02-18 Yao Qi <yao@codesourcery.com>
10351
10352 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10353
8e1d55a3
PA
103542013-02-14 Pedro Alves <palves@redhat.com>
10355
10356 Plug memory leak.
10357
10358 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10359 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10360
458820da
PA
103612013-02-14 Pedro Alves <palves@redhat.com>
10362
10363 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10364
baea0dae
PA
103652013-02-14 Pedro Alves <palves@redhat.com>
10366
10367 * tracepoint.c (save_string): Delete.
10368 (add_tracepoint_action): Use savestring instead of save_string.
10369
0b1afbb3
PA
103702013-02-12 Pedro Alves <palves@redhat.com>
10371
10372 * linux-xtensa-low.c: Ditto.
10373 * xtensa-xtregs.c: Ditto.
10374
8a4ac37e
PA
103752013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10376
10377 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10378 thread_db.
10379
148de6bb
MS
103802013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10381
10382 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10383 aarch64_num_wp_regs and aarch64_num_bp_regs to
10384 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10385
55fac6e0
MS
103862013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10387
10388 * linux-aarch64-low.c (ps_get_thread_area): Replace
10389 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10390
176eb98c
MS
103912013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10392 Marcus Shawcroft <marcus.shawcroft@arm.com>
10393 Nigel Stephens <nigel.stephens@arm.com>
10394 Yufeng Zhang <yufeng.zhang@arm.com>
10395
10396 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10397 (aarch64.c, aarch64-without-fpu.c): New targets.
10398 * configure.srv (aarch64*-*-linux*): New.
10399 * linux-aarch64-low.c: New file.
10400
56f7af9c
MS
104012013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10402
43aaf8b6 10403 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10404 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10405 (dequeue_one_deferred_signal, linux_resume_one_thread)
10406 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10407 (linux_tracefork_grandchild, linux_test_for_tracefork)
10408 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10409 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10410 where the argument is 0.
10411
60f662b0
YQ
104122013-01-25 Yao Qi <yao@codesourcery.com>
10413
10414 * event-loop.c: Include "queue.h".
10415 (gdb_event_p): New typedef.
10416 (struct gdb_event) <next_event>: Remove.
10417 (event_queue): Change to QUEUE(gdb_event_p).
10418 (async_queue_event): Remove.
10419 (gdb_event_xfree): New.
10420 (initialize_event_loop): New.
10421 (process_event): Use API from QUEUE.
10422 (wait_for_event): Likewise.
10423 * server.c (main): Call initialize_event_loop.
10424 * server.h (initialize_event_loop): Declare.
10425
5ae4861a
YQ
104262013-01-18 Yao Qi <yao@codesourcery.com>
10427
10428 * ax.h (struct eval_agent_expr_context): New.
10429 (gdb_eval_agent_expr): Update declaration.
10430 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10431 TFRAME. Add new argument CTX.
10432 * server.h (struct eval_agent_expr_context): Declare.
10433 (agent_mem_read, agent_tsv_read): Update declaration.
10434 (agent_mem_read_string): Likewise.
10435 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10436 (add_traceframe_block): Add new argument TPOINT.
10437 Increase TPOINT->traceframe_usage.
10438 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10439 eval_tracepoint_agent_expr.
10440 (condition_true_at_tracepoint): Likewise.
10441 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10442 (agent_mem_read_string, agent_tsv_read): Likewise.
10443
85e00e85
YQ
104442013-01-16 Yao Qi <yao@codesourcery.com>
10445
10446 * linux-low.c (linux_resume_one_lwp): Don't check
10447 'lwp->bp_reinsert != 0'.
10448
4039cf45
JB
104492013-01-07 Joel Brobecker <brobecker@adacore.com>
10450 Pedro Alves <palves@redhat.com>
10451
10452 * lynx-low.c (ptrace_request_to_str): Define a temporary
10453 macro and use it to simplify this function's implementation.
10454
9044dee2
JB
104552013-01-07 Joel Brobecker <brobecker@adacore.com>
10456
10457 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10458 sets errno.
10459
e6352c8f
JB
104602013-01-07 Joel Brobecker <brobecker@adacore.com>
10461
10462 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10463
50681a27
JB
104642013-01-07 Joel Brobecker <brobecker@adacore.com>
10465
10466 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10467
3f6e77ef
JB
104682013-01-07 Joel Brobecker <brobecker@adacore.com>
10469
10470 * lynx-low.c (lynx_resume): Use the resume_info parameter
10471 to determine the ptid for the lynx_ptrace call, unless
10472 it is equal to minus_one_ptid, in which case we use the
10473 ptid of the current_inferior.
10474 (lynx_wait_1): After having received a thread create/exit
10475 event, resume the inferior's execution using the signaling
10476 thread's ptid, rather than the old ptid.
10477
7fda33ae
JB
104782013-01-07 Joel Brobecker <brobecker@adacore.com>
10479
10480 * lynx-low.c (lynx_resume): Delete variable ret.
10481
b9786c74
JB
104822013-01-01 Joel Brobecker <brobecker@adacore.com>
10483
10484 * gdbreplay.c (gdbreplay_version): Update copyright year.
10485 * server.c (gdbserver_version): Likewise.
10486
8b93d60f
JB
104872012-12-17 Joel Brobecker <brobecker@adacore.com>
10488
10489 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10490 new thread.
10491
037335a7
JB
104922012-12-17 Joel Brobecker <brobecker@adacore.com>
10493
10494 * lynx-low.c (ptrace_request_to_str): Add handling for
10495 PTRACE_GETTRACESIG.
10496
52d4cbd8
JB
104972012-12-17 Joel Brobecker <brobecker@adacore.com>
10498
10499 * lynx-low.c (lynx_attach): Delete variable new_process.
10500
ab8f6ca9
JB
105012012-12-17 Joel Brobecker <brobecker@adacore.com>
10502
10503 * lynx-low.c (lynx_create_inferior): Delete variable
10504 new_process.
10505
78cbc024
JB
105062012-12-17 Joel Brobecker <brobecker@adacore.com>
10507
10508 * lynx-low.c (ptrace_request_to_str): Do not handle
10509 PTRACE_GETTHREADLIST if this macro does not exist.
10510
14a00470
YQ
105112012-12-15 Yao Qi <yao@codesourcery.com>
10512
10513 * Makefile.in (OBS): Add notif.o.
10514 * notif.c, notif.h: New.
10515 * server.c: Include "notif.h".
10516 (struct vstop_notif) <next>: Remove.
10517 <base>: New field.
10518 (queue_stop_reply): Update.
10519 (push_event, send_next_stop_reply): Remove.
10520 (discard_queued_stop_replies): Update.
10521 (notif_stop): New variable.
10522 (handle_v_stopped): Remove.
10523 (handle_v_requests): Don't call handle_v_stopped. Call
10524 handle_ack_notif instead.
10525 (queue_stop_reply_callback): Call notif_event_enque instead
10526 of queue_stop_reply.
10527 (handle_status): Don't call send_next_stop_reply, call
10528 notif_write_event instead.
10529 (kill_inferior_callback): Likewise.
10530 (detach_or_kill_inferior_callback): Likewise.
10531 (main): Call initialize_notif.
10532 (process_serial_event): Call QUEUE_is_empty.
10533 (handle_target_event): Call notif_push instead of push event.
10534 * server.h (push_event): Remove declaration.
10535
61c125b9
TT
105362012-12-10 Tom Tromey <tromey@redhat.com>
10537
10538 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10539 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10540 macros.
10541 (.c.o): Rewrite.
10542 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10543 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10544 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10545 (amd64-linux-ipa.o, ax.o): Rewrite.
10546 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10547 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10548 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10549 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10550 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10551 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10552 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10553 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10554 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10555 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10556 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10557 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10558 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10559 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10560 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10561 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10562 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10563 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10564 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10565 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10566 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10567 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10568 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10569 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10570 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10571 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10572 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10573 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10574 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10575 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10576 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10577 (reg-tilegx.o): Remove.
10578 (all_object_files): New macro.
10579 Include .deps files.
10580 * aclocal.m4, configure: Rebuild.
10581 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10582 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10583 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10584
e90e9ad9
TT
105852012-12-05 Tom Tromey <tromey@redhat.com>
10586
10587 PR gdb/14917:
10588 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10589
02d403bf 105902012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10591
10592 * configure.ac: Check for linux/perf_event.h.
10593 * config.in: Regenerated.
10594 * configure: Regenerated.
10595
0270a750
PA
105962012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10597
10598 * hostio.c (handle_readlink): Decrease buffer size
10599 parameter passed to readlink by one byte.
10600
8c29b58e
YQ
106012012-11-26 Yao Qi <yao@codesourcery.com>
10602
10603 * configure.ac (build_warnings): Append '-Wempty-body'.
10604 * configure: Regenerated.
10605 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10606 body.
10607
8bdce1ff
PM
106082012-11-15 Pierre Muller <muller@sourceware.org>
10609
10610 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10611 * config.in: Regenerate.
10612 * configure: Regenerate.
10613 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10614 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10615 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10616 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10617 header.
10618 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10619 instead of <sys/wait.h> header.
10620 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10621
02d403bf 106222012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10623
10624 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10625 (various make rules): Remove -DGDBSERVER
10626
fbd5db48
YQ
106272012-11-09 Yao Qi <yao@codesourcery.com>
10628
10629 * spu-low.c (current_ptid): Move it to ..
10630 * gdbthread.h: ... here. New.
10631 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10632 * server.c (myresume, process_serial_event): Likewise.
10633 * thread-db.c (thread_db_find_new_threads): Likewise.
10634 * tracepoint.c (run_inferior_command): Likewise.
10635
b3dc46ff
AB
106362012-10-01 Andrew Burgess <aburgess@broadcom.com>
10637
10638 * server.c (handle_search_memory_1): Include access length in
10639 warning message.
10640
07c04788
HPN
106412012-09-05 Michael Brandt <michael.brandt@axis.com>
10642
10643 * linux-crisv32-low.c: Fix compile errors.
10644
918d227b
YQ
106452012-09-04 Yao Qi <yao@codesourcery.com>
10646
10647 * tracepoint.c (cmd_qtsv): Adjust debug message.
10648 Don't check CUR_TPOINT.
10649
18c1b81a
YQ
106502012-08-28 Yao Qi <yao@codesourcery.com>
10651
10652 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10653 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10654 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10655 Remove declarations of xmalloc, xreallloc, xstrdup and
10656 freeargv.
10657 * Makefile.in (libiberty_h): New.
10658 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10659 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10660
dc82f37b
YQ
106612012-08-23 Yao Qi <yao@codesourcery.com>
10662
10663 * server.h: Remove declaration of 'xsnprintf'.
10664
406b1477
KS
106652012-08-22 Keith Seitz <keiths@redhat.com>
10666
10667 * server.h: Include build-gnulib-gbserver/config.h.
10668 * gdbreplay.c: Likewise.
10669
e6712ff1
DE
106702012-08-08 Doug Evans <dje@google.com>
10671
10672 * Makefile.in (SFILES): Add gdb_vecs.c.
10673 (OBS): Add gdb_vecs.o.
10674 (gdb_vecs_h, host_defs_h): New variables.
10675 (thread-db.o): Add $(gdb_vecs_h) dependency.
10676 (gdb_vecs.o): New rule.
10677 * thread-db.c: #include "gdb_vecs.h".
10678 (thread_db_load_search): Use a vector to iterate over path elements.
10679 Handle text appearing after "$pdir".
10680
10681 * configure.ac: Add check for strstr.
10682 * config.in: Regenerate.
10683 * configure: Regenerate.
10684
7c3270ae
UW
106852012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10686
10687 * hostio.c (handle_pread): If pread fails, fall back to attempting
10688 lseek/read.
10689 (handle_pwrite): Likewise for pwrite.
10690
b62e2b27
UW
106912012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10692
10693 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10694 between unsupported TYPE and unimplementable ADDR/LEN combination.
10695 (arm_insert_point): Act on new return value.
10696
78a99e91
PA
106972012-07-31 Pedro Alves <palves@redhat.com>
10698
10699 * server.c (process_point_options): Only skip tokens if we find
10700 one that is unrecognized. Don't treat 'X' specially while
10701 skipping unrecognized tokens.
10702
fcf303ab
UW
107032012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10704
10705 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10706 to 4-byte-align HW breakpoint addresses for Thumb.
10707
7255706c
YQ
107082012-07-27 Yao Qi <yao@codesourcery.com>
10709
10710 PR remote/14161.
10711
10712 * server.h: Declare gdb_agent_about_to_close.
10713 * target.c (kill_inferior): Include "agent.h".
10714 New. Send command 'kill'.
10715 * target.h (kill_inferior): Removed macro.
10716 * tracepoint.c (gdb_agent_about_to_close): New.
10717 (gdb_agent_helper_thread): Handle command 'close'.
10718 Wait endlessly until the inferior stops.
10719 Install gdb_agent_remove_socket to atexit hook.
10720 (agent_socket_name): New static variable.
10721 (gdb_agent_socket_init): Replace local variable 'name' with
10722 'agent_socket_name'.
10723 (gdb_agent_remove_socket): New.
10724
5a3f286f
YQ
107252012-07-27 Yao Qi <yao@codesourcery.com>
10726
10727 * server.c (process_point_options): Stop at 'X' when parsing.
10728
961bd387
ME
107292012-07-19 Michael Eager <eager@eagercon.com>
10730
a261b8f5 10731 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10732 to hw_execute.
10733 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10734 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10735 hardware breakpoint.
10736
aa7c7447
JK
107372012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10738
10739 * gdbserver/linux-low.c (initialize_low): Call
10740 linux_ptrace_init_warnings.
10741
7f216e7c
DE
107422012-07-02 Doug Evans <dje@google.com>
10743
10744 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10745 pointer to int.
10746
d3ce09f5
SS
107472012-07-02 Stan Shebs <stan@codesourcery.com>
10748
10749 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10750 (ax.o): Add it to build rule.
10751 (ax-ipa.o): Ditto.
10752 (OBS): Add format.o.
10753 (IPA_OBS): Add format.o.
10754 * server.c (handle_query): Claim support for breakpoint commands.
10755 (process_point_options): Add command case.
10756 (process_serial_event): Leave running if there are printfs in
10757 effect.
10758 * mem-break.h (any_persistent_commands): Declare.
10759 (add_breakpoint_commands): Declare.
10760 (gdb_no_commands_at_breakpoint): Declare.
10761 (run_breakpoint_commands): Declare.
10762 * mem-break.c (struct point_command_list): New struct.
10763 (struct breakpoint): New field command_list.
10764 (any_persistent_commands): New function.
10765 (add_commands_to_breakpoint): New function.
10766 (add_breakpoint_commands): New function.
10767 (gdb_no_commands_at_breakpoint): New function.
10768 (run_breakpoint_commands): New function.
10769 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10770 locally.
10771 * ax.c: Include format.h.
10772 (ax_printf): New function.
10773 (gdb_eval_agent_expr): Add printf opcode.
10774
2f8f6aed
YQ
107752012-06-13 Yao Qi <yao@codesourcery.com>
10776
10777 * server.c (start_inferior): Remove duplicated writes to fields
10778 'last_resume_kind' and 'last_status' of 'current_inferior'.
10779
0c9070b3
YQ
107802012-06-12 Yao Qi <yao@codesourcery.com>
10781 Pedro Alves <palves@redhat.com>
10782
10783 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10784 comment.
10785 * server.c (handle_v_cont): Extend comment.
10786
c52daf70
YQ
107872012-06-11 Yao Qi <yao@codesourcery.com>
10788
10789 * linux-low.c (linux_attach): Add 'static'.
10790
d38bbb0a
YQ
107912012-06-06 Yao Qi <yao@codesourcery.com>
10792
10793 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10794
89dc0afd
JK
107952012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10796
10797 Fix gcc -flto compilation warning.
10798 * server.c (main): Make variable multi_mode and attach volatile.
10799
75f62ce7
TJB
108002012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10801
10802 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10803 if the platform doesn't know about it.
10804
65f479b6
PA
108052012-05-30 Jeff Kenton <jkenton@tilera.com>
10806
10807 * Makefile.in (SFILES): Add linux-tile-low.c.
10808 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10809 * configure.srv: Handle tilegx-*-linux*.
10810 * linux-tile-low.c: New file.
10811
0c5bf5a9
JK
108122012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10813
10814 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10815
a493e3e2
PA
108162012-05-24 Pedro Alves <palves@redhat.com>
10817
10818 PR gdb/7205
10819
43aaf8b6 10820 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10821
2ea28649
PA
108222012-05-24 Pedro Alves <palves@redhat.com>
10823
10824 PR gdb/7205
10825
10826 Replace target_signal with gdb_signal throughout.
10827
8d409d16
MR
108282012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10829
10830 * linux-low.c (linux_store_registers): Avoid the copying sequence
10831 when no data has been retrieved by ptrace.
10832
23512c01
MGD
108332012-05-22 Will Deacon <will.deacon@arm.com>
10834
10835 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10836 Include asm/ptrace.h.
10837 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10838 already defined.
10839
4934b29e
MR
108402012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10841
10842 * linux-low.c (linux_store_registers): Don't re-retrieve data
10843 with ptrace that has already been obtained from /proc. Always
10844 copy any data retrieved with ptrace to the buffer supplied.
10845
bde24c0a
PA
108462012-05-11 Yao Qi <yao@codesourcery.com>
10847 Pedro Alves <palves@redhat.com>
10848
10849 * linux-low.c (enum stopping_threads_kind): New.
10850 (stopping_threads): Change type to `enum stopping_threads_kind'.
10851 (handle_extended_wait): If stopping and suspending threads, leave
10852 the new_lwp suspended too.
10853 (linux_wait_for_event): Adjust.
10854 (stop_all_lwps): Set `stopping_threads' to
10855 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10856 whether we're suspending threads or just stopping them. Assert no
10857 recursion happens.
10858
623b6bdf
YQ
108592012-04-29 Yao Qi <yao@codesourcery.com>
10860
10861 * server.h: Move some code to ...
10862 * gdbthread.h: ... here. New.
10863 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10864 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10865 (nto-low.o, win32-low.o): Likewise.
10866 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10867 * regcache.c, remote-utils.c, server.c: Likewise.
10868 * target.c, tracepoint.c, win32-low.c: Likewise.
10869
f15f9948
TJB
108702012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10871
10872 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10873 (PTRACE_ARG4_TYPE): Likewise.
10874 (PTRACE_XFER_TYPE): Likewise.
10875 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10876 ptrace to PTRACE_ARG3_TYPE.
10877 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10878 (PTRACE_ARG4_TYPE): Likewise.
10879 (PTRACE_XFER_TYPE): Likewise.
10880 (linux_detach_one_lwp): Cast fourth argument of
10881 ptrace to long then PTRACE_ARG4_TYPE.
10882 (regsets_fetch_inferior_registers): Cast third argument of
10883 ptrace to long then PTRACE_ARG3_TYPE.
10884 (regsets_store_inferior_registers): Likewise.
10885
38ea300a
PA
108862012-04-20 Pedro Alves <palves@redhat.com>
10887
10888 * configure: Regenerate.
10889
c971b7fa
PA
108902012-04-19 Pedro Alves <palves@redhat.com>
10891
43aaf8b6 10892 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10893 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10894 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10895 (all, install-only, uninstall, clean-info, all-lib, clean): No
10896 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10897 (maintainer-clean realclean distclean): Use subdir_do.
10898 (subdir_do): New.
10899 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10900 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10901 * acinclude.m4: Include acx_configure_dir.m4.
10902 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10903 calls. Call AC_PROG_RANLIB. Configure gnulib using
10904 ACX_CONFIGURE_DIR.
10905 (GNULIB): New.
10906 (GNULIB_STDINT_H): Adjust.
10907 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10908 * gdbreplay.c: Include build-gnulib/config.h.
10909 * server.h: Likewise.
10910 * aclocal.m4: Regenerate.
10911 * config.in: Regenerate.
10912 * configure: Regenerate.
c971b7fa 10913
809277f8
PA
109142012-04-19 Pedro Alves <palves@redhat.com>
10915
10916 * Makefile.in (LIBGNU, INCGNU): Adjust.
10917 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10918 (all, install-only, uninstall, clean-info, all-lib, clean)
10919 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10920 * configure.ac: Adjust AC_OUTPUT output.
10921 * aclocal.m4: Regenerate.
10922 * configure: Regenerate.
10923
fd9bb8b8
PA
109242012-04-19 Pedro Alves <palves@redhat.com>
10925
10926 * Makefile.in (generated_files): New.
10927 (server_h): Remove the explicit dependency on config.h, and depend
10928 on $generated_files.
10929
1c298c66
PA
109302012-04-19 Pedro Alves <palves@redhat.com>
10931
10932 * Makefile.in (INCGNU): Add -Ignulib.
10933
57c4b50b
PA
109342012-04-19 Pedro Alves <palves@redhat.com>
10935
10936 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10937 (INCGNU): ... this, and spell out -I here.
10938 (GNULIB_LIB): Rename to ...
10939 (LIBGNU): ... this.
10940 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10941
1030e047
PA
109422012-04-19 Pedro Alves <palves@redhat.com>
10943
10944 * config.in: Regenerate.
10945
447d4319
PA
109462012-04-19 Pedro Alves <palves@redhat.com>
10947
10948 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10949 * server.h (memmem): Remove declaration.
10950 * config.in: Regenerate.
10951 * configure: Regenerate.
10952
aad9eab9
YQ
109532012-04-19 Yao Qi <yao@codesourcery.com>
10954
10955 * Makefile.in (SFILES): Add common/vec.c.
10956 (OBS): Add vec.o.
10957 (vec.o): New rule.
10958
3e10640f
YQ
109592012-04-19 Yao Qi <yao@codesourcery.com>
10960
10961 * remote-utils.c (prepare_resume_reply): Replace with macro
10962 target_core_of_thread.
10963 * server.c (handle_qxfer_threads_proper): Likewise.
10964 * target.h (traget_core_of_thread): New macro.
10965
71622373
PA
109662012-04-18 Pedro Alves <palves@redhat.com>
10967
10968 * aclocal.m4: Regenerate.
10969 * configure: Regenerate.
10970
80d26939
YQ
109712012-04-16 Yao Qi <yao@codesourcery.com>
10972
10973 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10974 duplicated on address.
10975
42476b70
YQ
109762012-04-16 Yao Qi <yao@codesourcery.com>
10977
10978 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10979 (struct tracepoint_action_ops) <send>: New field.
10980 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10981 (agent_expr_send, x_tracepoint_action_send): New.
10982 (l_tracepoint_action_send): New.
10983 (cmd_qtdp): Download and install tracepoint
10984 according to `use_agent'.
10985 (run_inferior_command): Add one more parameter `len'.
10986 Update callers.
10987 (tracepoint_send_agent): New.
10988 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10989
7bc83639
YQ
109902012-04-16 Yao Qi <yao@codesourcery.com>
10991
10992 * tracepoint.c (download_tracepoints): Moved to ...
10993 (cmd_qtstart): ... here.
10994
5f18041e
YQ
109952012-04-14 Yao Qi <yao@codesourcery.com>
10996
10997 * tracepoint.c: Include inttypes.h.
10998 (struct collect_memory_action): Use sized types.
10999 (struct tracepoint): Likewise.
11000 (cmd_qtdp, stop_tracing): Update print specifiers.
11001 (cmd_qtp, response_tracepoint): Likewise.
11002 (collect_data_at_tracepoint): Likewise.
11003 (collect_data_at_step): Likewise.
11004
55a8c076
YQ
110052012-04-14 Yao Qi <yao@codesourcery.com>
11006
11007 Import gnulib module inttypes.
11008 * aclocal.m4, config.in, configure: Regenerated.
11009
dc750257
YQ
110102012-04-14 Yao Qi <yao@codesourcery.com>
11011
11012 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11013 Makefile and config.status at last.
11014
0ab5faf9
YQ
110152012-04-13 Yao Qi <yao@codesourcery.com>
11016
11017 * tracepoint.c: Include stdint.h unconditionally.
11018
18f5fd81
TJB
110192012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11020
11021 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11022 on BFD_HAVE_SYS_PROCFS_TYPE.
11023 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11024 * configure: Regenerate.
11025 * config.in: Likewise.
11026
4d47af5c
L
110272012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11028
11029 * Makefile.in (clean): Also remove x32.c x32-linux.c
11030 x32-avx.c x32-avx-linux.c.
11031 (x32.o): New target.
11032 (x32.c): Likewise.
11033 (x32-linux.o): Likewise.
11034 (x32-linux.c): Likewise.
11035 (x32-avx.o): Likewise.
11036 (x32-avx.c): Likewise.
11037 (x32-avx-linux.o): Likewise.
11038 (x32-avx-linux.c): Likewise.
11039
11040 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11041 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11042 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11043 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11044 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11045 i386/x32-avx-linux.xml.
11046
11047 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11048 (init_registers_x32_avx_linux): Likwise.
11049 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11050 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11051
ecedbe58
PA
110522012-04-13 Pedro Alves <palves@redhat.com>
11053
11054 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11055 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11056 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11057 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11058 the sub-make.
11059
c92b5177
L
110602012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11061
11062 * linux-x86-low.c (compat_x32_clock_t): New.
11063 (compat_x32_siginfo_t): Likewise.
11064 (compat_x32_siginfo_from_siginfo): Likewise.
11065 (siginfo_from_compat_x32_siginfo): Likewise.
11066 (linux_is_elf64): Likewise.
11067 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11068 and siginfo_from_compat_x32_siginfo for x32.
11069 (x86_arch_setup): Set linux_is_elf64.
11070
214d508e
L
110712012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11072
11073 PR gdb/13969
11074 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11075 e_machine field.
11076 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11077 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11078 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11079 compatible with process.
11080
c9a1864a
YQ
110812012-04-12 Yao Qi <yao@codesourcery.com>
11082
11083 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11084 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11085 (install-only, install-info, clean): Handle sub dir gnulib.
11086 (all-lib, am--refresh): New targets.
11087 (memmem.o): Remove target.
11088 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11089 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11090 (AC_REPLACE_FUNCS): Remove memmem.
11091 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11092 (AC_OUTPUT): Generate Makefile in gnulib/.
11093 * aclocal.m4, config.in, configure: Regenerated.
11094
367ba2c2
MR
110952012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11096
11097 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11098
9d236627
PA
110992012-04-05 Pedro Alves <palves@redhat.com>
11100
11101 -Werror=strict-aliasing
11102
11103 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11104 pointer.
11105
111217b3
PA
111062012-04-04 Pedro Alves <palves@redhat.com>
11107
11108 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11109 (sparc_store_gregset_from_stack, sparc_store_gregset)
11110 (sparc_breakpoint_at): Fix formatting.
11111
8365dcf5
TJB
111122012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11113
11114 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11115 are available.
11116 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11117 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11118 * config.in: Regenerate.
11119 * configure: Likewise.
11120
689cc2ae
PA
111212012-03-29 Pedro Alves <palves@redhat.com>
11122
11123 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11124 Correct ptrace arguments.
11125
c14dfd32
PA
111262012-03-28 Pedro Alves <palves@redhat.com>
11127
11128 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11129 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11130 (IA64_FR1_REGNUM): New defines.
11131 (ia64_fetch_register): New.
11132 (the_low_target): Install it.
11133 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11134 field.
11135 * linux-low.c (linux_fetch_registers): Try the
11136 the_low_target.fetch_register hook first.
11137
11138 * linux-arm-low.c (the_low_target): Adjust.
11139 * linux-bfin-low.c (the_low_target): Adjust.
11140 * linux-cris-low.c (the_low_target): Adjust.
11141 * linux-crisv32-low.c (the_low_target): Adjust.
11142 * linux-m32r-low.c (the_low_target): Adjust.
11143 * linux-m68k-low.c (the_low_target): Adjust.
11144 * linux-mips-low.c (the_low_target): Adjust.
11145 * linux-ppc-low.c (the_low_target): Adjust.
11146 * linux-s390-low.c (the_low_target): Adjust.
11147 * linux-sh-low.c (the_low_target): Adjust.
11148 * linux-sparc-low.c (the_low_target): Adjust.
11149 * linux-tic6x-low.c (the_low_target): Adjust.
11150 * linux-x86-low.c (the_low_target): Adjust.
11151 * linux-xtensa-low.c (the_low_target): Adjust.
11152
63c88e13
PA
111532012-03-26 Pedro Alves <palves@redhat.com>
11154
11155 * server.c (handle_qxfer_libraries): Don't bail early if
11156 the_target->qxfer_libraries_svr4 is not NULL.
11157
fb723180
PA
111582012-03-26 Pedro Alves <palves@redhat.com>
11159
11160 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11161
0afae3cf
PA
111622012-03-23 Pedro Alves <palves@redhat.com>
11163
11164 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11165 "library-list-svr4" element's start tag when the the DSO list is
11166 empty.
11167
485f1ee4
PA
111682012-03-23 Pedro Alves <palves@redhat.com>
11169
11170 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11171 a variable whose type size is the same as the inferior's pointer
11172 size.
11173
a5362b9a
TS
111742012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11175
11176 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11177 struct siginfo.
11178 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11179 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11180 * linux-low.h: Include <signal.h>.
11181 (struct siginfo): Remove forward declaration.
11182 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11183 struct siginfo.
11184
d226c142
MF
111852012-03-21 Mike Frysinger <vapier@gentoo.org>
11186
11187 * .gitignore: Ignore more files.
11188
122f36ef
PA
111892012-03-19 Pedro Alves <palves@redhat.com>
11190 Jan Kratochvil <jan.kratochvil@redhat.com>
11191
11192 * server.c (cont_thread, general_thread): Add describing comments.
11193 (start_inferior): Clear `cont_thread'.
11194 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11195 of a process.
11196
fc3e5175
YQ
111972012-03-15 Yao Qi <yao@codesourcery.com>
11198
11199 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11200 handling to ...
11201 (cmd_qtdp): ... here.
11202
8d0d92cd
YQ
112032012-03-15 Yao Qi <yao@codesourcery.com>
11204
11205 * tracepoint.c (struct tracepoint_action_ops): New.
11206 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11207 (m_tracepoint_action_download): New.
11208 (r_tracepoint_action_download): New.
11209 (x_tracepoint_action_download): New.
11210 (l_tracepoint_action_download): New.
11211 (add_tracepoint_action): Install `action->ops' according type.
11212 (download_tracepoint_1): Move code `download' function pointer
11213 of various tracepoint_action_ops.
11214
87b0bb13
JK
112152012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11216
11217 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11218 linux_ptrace_attach_warnings.
11219
5f572dec
JK
112202012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11221
11222 * Makefile.in (linux-ptrace.o): New.
11223 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11224 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11225 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11226 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11227 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11228 of these targets.
11229 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11230
f4647387
YQ
112312012-03-08 Yao Qi <yao@codesourcery.com>
11232 Pedro Alves <palves@redhat.com>
11233
11234 Fix PR server/13392.
11235 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11236 offset of JMP insn.
11237 * tracepoint.c (remove_tracepoint): New.
11238 (cmd_qtdp): Call remove_tracepoint when failed to install.
11239
9b224c5e
PA
112402012-03-07 Pedro Alves <palves@redhat.com>
11241
11242 * linux-low.c (get_detach_signal): New.
11243 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11244 Pass on pending signals to PTRACE_DETACH. Check the result of the
11245 ptrace call.
11246 * server.c (program_signals, program_signals_p): New.
11247 (handle_general_set): Handle QProgramSignals.
11248 * server.h (program_signals, program_signals_p): Declare.
11249
e237a7e2
JK
112502012-03-05 Pedro Alves <palves@redhat.com>
11251 Jan Kratochvil <jan.kratochvil@redhat.com>
11252
11253 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11254 New comment why.
11255
5808517f
YQ
112562012-03-03 Yao Qi <yao@codesourcery.com>
11257
11258 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11259 agent_look_up_symbols.
11260
58b4daa5
YQ
112612012-03-03 Yao Qi <yao@codesourcery.com>
11262
11263 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11264 (linux-x86-low.o): Likewise.
11265 * server.h: Remove in_process_agent_loaded.
11266 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11267 common/agent.c.
11268 Update callers.
11269
8ffcbaaf
YQ
112702012-03-03 Yao Qi <yao@codesourcery.com>
11271
11272 * tracepoint.c (gdb_agent_capability): New global.
11273 (in_process_agent_loaded_ust): Renamed to
11274 `in_process_agent_supports_ust'.
11275 Update callers.
11276 (in_process_agent_supports_ust): Call agent_capability_check.
11277 (clear_installed_tracepoints): Assert that agent supports
11278 agent.
11279
d1feda86
YQ
112802012-03-03 Yao Qi <yao@codesourcery.com>
11281
11282 * linux-low.c (linux_supports_agent): New.
11283 (linux_target_ops): Initialize field `supports_agent' with
11284 linux_supports_agent.
11285 * target.h (struct target_ops) <supports_agent>: New.
11286 (target_supports_agent): New macro.
11287 * server.c (handle_general_set): Handle packet 'QAgent'.
11288 (handle_query): Send `QAgent+'.
11289 * Makefile.in (server.o): Depends on agent.h.
11290
2fa291ac
YQ
112912012-03-03 Yao Qi <yao@codesourcery.com>
11292
11293 * Makefile.in (OBS): Add agent.o.
11294 Add new rule for agent.o.
11295 Track dependence of tracepoint.c on agent.h.
11296 * tracepoint.c (run_inferior_command_1):
11297 (run_inferior_command): Call agent_run_command.
11298 (gdb_ust_connect_sync_socket): Deleted. Move it to
11299 common/agent.c.
11300 (resume_thread, stop_thread): Likewise.
11301 (gdb_ust_socket_init): Renamed to ...
11302 (gdb_agent_socket_init): ... New.
11303 (gdb_ust_thread): Renamed to ...
11304 (gdb_agent_helper_thread): ... New.
11305 (gdb_ust_init): Move some code to ...
11306 (gdb_agent_init): ... here. New.
11307 [HAVE_UST]: Call gdb_ust_init.
11308 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11309 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11310 * config.in, configure: Regenerated.
11311
05044653
PA
113122012-03-02 Pedro Alves <palves@redhat.com>
11313
11314 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11315 * linux-low.c (struct simple_pid_list): New.
11316 (stopped_pids): New a struct simple_pid_list pointer.
11317 (add_to_pid_list, pull_pid_from_list): New.
11318 (handle_extended_wait): Don't assume the first signal new children
11319 report is SIGSTOP. Adjust call to pull_pid_from_list.
11320 (linux_wait_for_lwp): Adjust.
11321
8d00225b
YQ
113222012-03-02 Yao Qi <yao@codesourcery.com>
11323
11324 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11325 debug log.
11326
19560ba5
YQ
113272012-03-02 Yao Qi <yao@codesourcery.com>
11328
11329 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11330 `stop_pc' and `tpoint'. Update caller.
11331
1faeff08
MR
113322012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11333
11334 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11335 * linux-low.c (use_linux_regsets): New macro.
11336 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11337 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11338 (linux_register_in_regsets): New function.
11339 (usr_fetch_inferior_registers): Skip registers covered by
11340 regsets.
11341 (usr_store_inferior_registers): Likewise.
11342 (usr_fetch_inferior_registers): New macro.
11343 (usr_store_inferior_registers): Likewise.
11344 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11345 (linux_store_registers): Likewise.
11346 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11347 prototype.
11348 (init_registers_mips64_dsp_linux): Likewise.
11349 (init_registers_mips_linux): New macro.
11350 (init_registers_mips_dsp_linux): Likewise.
11351 (mips_dsp_num_regs): Likewise.
11352 (DSP_BASE, DSP_CONTROL): New fallback macros.
11353 (mips_base_regs): New macro.
11354 (mips_regmap): Use it. Fix the size.
11355 (mips_dsp_regmap): New variable.
11356 (mips_dsp_regset_bitmap): Likewise.
11357 (mips_arch_setup): New function.
11358 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11359 than mips_regmap.
11360 (mips_cannot_store_register): Likewise.
11361 (the_low_target): Update .arch_setup, .num_regs and .regmap
11362 initializers. Add .regset_bitmap initializer.
11363 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11364 initializer.
11365 * linux-bfin-low.c (the_low_target): Likewise.
11366 * linux-cris-low.c (the_low_target): Likewise.
11367 * linux-crisv32-low.c (the_low_target): Likewise.
11368 * linux-ia64-low.c (the_low_target): Likewise.
11369 * linux-m32r-low.c (the_low_target): Likewise.
11370 * linux-m68k-low.c (the_low_target): Likewise.
11371 * linux-ppc-low.c (the_low_target): Likewise.
11372 * linux-s390-low.c (the_low_target): Likewise.
11373 * linux-sh-low.c (the_low_target): Likewise.
11374 * linux-sparc-low.c (the_low_target): Likewise.
11375 * linux-tic6x-low.c (the_low_target): Likewise.
11376 * linux-x86-low.c (the_low_target): Likewise.
11377 * linux-xtensa-low.c (the_low_target): Likewise.
11378 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11379 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11380 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11381 srv_xmlfiles.
11382 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11383 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11384
c03e6ccc
YQ
113852012-02-29 Yao Qi <yao@codesourcery.com>
11386 Pedro Alves <palves@redhat.com>
11387
11388 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11389 `step_over_finished' is true.
11390
644cebc9
PA
113912012-02-27 Pedro Alves <palves@redhat.com>
11392
11393 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11394 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11395
c14d7ab2
PA
113962012-02-27 Pedro Alves <palves@redhat.com>
11397
11398 PR server/9684
11399 * linux-low.c (pid_is_stopped): New.
11400 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11401
412c89dd
LM
114022012-02-25 Luis Machado <lgustavo@codesourcery.com>
11403
11404 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11405 of conditions.
11406
b745defe
MR
114072012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11408
11409 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11410
9f3a5c85
LM
114112012-02-24 Luis Machado <lgustavo@codesourcery>
11412
11413 * server.c (handle_query): Advertise support for target-side
11414 breakpoint condition evaluation.
11415 (process_point_options): New function.
11416 (process_serial_event): When inserting a breakpoint, check for
11417 a target-side condition that should be evaluated.
11418
11419 * mem-break.c: Include regcache.h and ax.h.
11420 (point_cond_list_t): New data structure.
11421 (breakpoint) <cond_list>: New field.
11422 (find_gdb_breakpoint_at): Make non-static.
11423 (delete_gdb_breakpoint_at): Clear any target-side
11424 conditions.
11425 (clear_gdb_breakpoint_conditions): New function.
11426 (add_condition_to_breakpoint): Likewise.
11427 (add_breakpoint_condition): Likewise.
11428 (gdb_condition_true_at_breakpoint): Likewise.
11429 (gdb_breakpoint_here): Return result directly instead
11430 of going through a local variable.
11431
11432 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11433 (clear_gdb_breakpoint_conditions): Likewise.
11434 (add_breakpoint_condition): Likewise.
11435 (gdb_condition_true_at_breakpoint): Likewise.
11436
11437 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11438 (need_step_over_p): Take target-side breakpoint condition into
11439 consideration.
11440
5e1dc496
LM
114412012-02-24 Luis Machado <lgustavo@codesourcery>
11442
11443 * server.h: Include tracepoint.h.
11444 (agent_mem_read, agent_get_trace_state_variable_value,
11445 agent_set_trace_state_variable_value,
11446 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11447 get_set_tsv_func_addr): New prototypes.
11448
11449 * ax.h: New include file.
11450 * ax.c: New source file.
11451
11452 * tracepoint.c: Include ax.h.
11453 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11454 agent_expr, eval_result_type): Move to ax.h.
11455 (parse_agent_expr): Rename to ...
11456 (gdb_parse_agent_expr): ... this, make it non-static and move
11457 to ax.h.
11458 (unparse_agent_expr) Rename to ...
11459 (gdb_unparse_agent_expr): ... this, make it non-static and move
11460 to ax.h.
11461 (eval_agent_expr): Rename to ...
11462 (eval_tracepoint_agent_expr): ... this.
11463 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11464 forward declarations.
11465 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11466 (agent_get_trace_state_variable_value): New function.
11467 (agent_set_trace_state_variable_value): New function.
11468 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11469 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11470 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11471 (condition_true_at_tracepoint): Likewise.
11472 (parse_agent_expr): Rename to ...
11473 (gdb_parse_agent_expr): ... this and move to ax.c.
11474 (unparse_agent_expr): Rename to ...
11475 (gdb_unparse_agent_expr): ... this and move to ax.c.
11476 (gdb_agent_op_name): Move to ax.c.
11477 (eval_agent_expr): Rename to ...
11478 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11479 and move to ax.c.
11480 (eval_tracepoint_agent_expr): New function.
11481 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11482 non-static.
5e1dc496
LM
11483 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11484 ax.c.
11485 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11486 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11487 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11488 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11489 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11490 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11491 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11492 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11493 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11494 (compile_bytecodes): Remove forward declaration.
11495 (is_goto_target): Move to ax.c.
11496 (compile_bytecodes): Move to ax.c and call
11497 agent_get_trace_state_variable_value (...) and
11498 agent_set_trace_state_variable_value (...).
11499
11500 * Makefile.in: Update ax.c and IPA dependencies.
11501
277e4e52
PA
115022012-02-24 Pedro Alves <palves@redhat.com>
11503
11504 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11505 (cmd_bigqtbuffer_circular): ... this. Only handle
11506 'QTBuffer:circular:'.
11507 (handle_tracepoint_general_set): Adjust.
11508
bf4c19f7
YQ
115092012-02-16 Yao Qi <yao@codesourcery.com>
11510
11511 * inferiors.c: Move code to ...
11512 * dll.c: .... here. New.
11513 * server.h: Declare clear_dlls.
11514 * Makefile.in (SFILES): Add dll.c.
11515 (OBS): Add dll.o
11516 (dll.o): New rule.
11517
d73f2619
YQ
115182012-02-11 Yao Qi <yao@codesourcery.com>
11519
11520 * server.c: (handle_monitor_command): Add a new parameter
11521 `own_buf'.
11522 (handle_query): Update caller.
11523
f8255c2a
JB
115242012-02-09 Joel Brobecker <brobecker@adacore.com>
11525
11526 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11527 * configure, config.in: Regenerate.
11528 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11529 is not defined.
11530
da84f473
PA
115312012-02-02 Pedro Alves <palves@redhat.com>
11532
11533 Try SIGKILL first, then PTRACE_KILL.
11534 * linux-low.c (linux_kill_one_lwp): New.
11535 (linux_kill_one_lwp): Rename to ...
11536 (kill_one_lwp_callback): ... this. Use the new
11537 linux_kill_one_lwp.
11538
e886a173
PA
115392012-02-02 Pedro Alves <palves@redhat.com>
11540
11541 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11542 inferior.
11543
be07f1a2
PA
115442012-01-27 Pedro Alves <palves@redhat.com>
11545
11546 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11547 (elf_64_file_p): Make static.
11548 (linux_pid_exe_is_elf_64_file): New.
11549 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11550 Delete declarations.
11551 (linux_pid_exe_is_elf_64_file): Declare.
11552 * linux-x86-low.c (x86_arch_setup): Use
11553 linux_pid_exe_is_elf_64_file.
11554
d8301ad1
JK
115552012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11556
11557 * linux-low.c (linux_wait_for_event_1): Rename to ...
11558 (linux_wait_for_event): ... here and merge it with former
11559 linux_wait_for_event - new variable wait_ptid, use it.
11560 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11561
01b17894
PA
115622012-01-23 Pedro Alves <palves@redhat.com>
11563
11564 * server.c (main): Avoid yet another case of infinite loop while
11565 detaching/killing after a longjmp.
11566
e825046f
JK
115672012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11568
11569 Code cleanup.
11570 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11571
b9e7b9c3
UW
115722012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11573
11574 * hostio.c (handle_readlink): New function.
11575 (handle_vFile): Call it to handle "vFile:readlink" packets.
11576
901f9912
UW
115772012-01-20 Pedro Alves <palves@redhat.com>
11578 Ulrich Weigand <ulrich.weigand@linaro.org>
11579
11580 * server.c (handle_v_requests): Only support vAttach and vRun to
11581 start multiple processes when in extended protocol mode.
11582
fc1ab1a0
PA
115832012-01-17 Pedro Alves <palves@redhat.com>
11584
11585 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11586 memalign plus mprotect to allocate the scratch buffer.
11587
7d5d4e98
PA
115882012-01-13 Pedro Alves <palves@redhat.com>
11589
11590 * server.c (attach_inferior): Clear `cont_thread'.
11591
f128d5e9
PA
115922012-01-13 Pedro Alves <palves@redhat.com>
11593
11594 * server.c (main): Avoid infinite loop while detaching/killing
11595 after a longjmp.
11596
06db92f0
DE
115972012-01-09 Doug Evans <dje@google.com>
11598
11599 * server.c (start_inferior): Set last_ptid in --wrapper case.
11600
32d92999
YQ
116012012-01-06 Yao Qi <yao@codesourcery.com>
11602
11603 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11604 defined.
11605 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11606
5e0a92a9
YQ
116072012-01-04 Yao Qi <yao@codesourcery.com>
11608
11609 * tracepoint.c (cmd_qtdp): Print debug message
11610 for static tracepoint.
11611
ae639e8c
YQ
116122012-01-04 Yao Qi <yao@codesourcery.com>
11613
11614 * tracepoint.c (trace_vdebug): Differentiate debug message
11615 between gdbserver and IPA.
11616
f72429c5
YQ
116172012-01-03 Yao Qi <yao@codesourcery.com>
11618
11619 * tracepoint.c (tracepoint_was_hit): Don't collect for
11620 static tracepoint.
11621
12c3e59c
JB
116222012-01-02 Joel Brobecker <brobecker@adacore.com>
11623
11624 * terminal.h: Reformat copyright header.
11625
67827812
JB
116262012-01-02 Joel Brobecker <brobecker@adacore.com>
11627
11628 * server.c (gdbserver_version): Update copyright year.
11629 * gdbreplay.c (gdbreplay_version): Likewise.
11630
3e52c33d
JK
116312011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11632
11633 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11634
11635 Revert:
11636 2011-12-18 Hui Zhu <teawater@gmail.com>
11637 * linux-low.c (linux_create_inferior): Save return value to ret.
11638
66f1260e
HZ
116392011-12-18 Hui Zhu <teawater@gmail.com>
11640
11641 * linux-low.c (linux_create_inferior): Save return value to ret.
11642
e77616d7
DE
116432011-12-16 Doug Evans <dje@google.com>
11644
e7b06c57
DE
11645 * linux-low.c (linux_create_inferior): If stdio connection,
11646 redirect stdin from /dev/null, stdout to stderr.
11647 * remote-utils.c (remote_is_stdio): New static global.
11648 (remote_connection_is_stdio): New function.
11649 (remote_prepare): Handle stdio connection.
11650 (remote_open): Ditto.
11651 (remote_close): Don't close stdin for stdio connections.
11652 (read_prim,write_prim): New functions. Replace all calls to
11653 read/write to these.
11654 * server.c (main): Watch for "-" argument. Move call to
11655 remote_prepare before start_inferior.
11656 * server.h (STDIO_CONNECTION_NAME): New macro.
11657 (remote_connection_is_stdio): Declare.
11658
e77616d7
DE
11659 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11660 in debugging output.
11661
82067193
YQ
116622011-12-15 Yao Qi <yao@codesourcery.com>
11663
11664 * tracepoint.c: Include sys/syscall.h.
11665 (gdb_ust_thread): Remove preprocessor conditional.
11666
82bfbe7e
PA
116672011-12-14 Pedro Alves <pedro@codesourcery.com>
11668
11669 * linux-low.c (linux_detach_one_lwp): Call
11670 the_low_target.prepare_to_resume before detaching.
11671
712c6575
YQ
116722011-12-14 Yao Qi <yao@codesourcery.com>
11673
11674 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11675 of write.
11676
d54d1edf
YQ
116772011-12-14 Yao Qi <yao@codesourcery.com>
11678
11679 * i386-low.c (i386_low_stopped_data_address): Initialize local
11680 variable `control'.
11681
6210a125
PA
116822011-12-13 Pedro Alves <pedro@codesourcery.com>
11683
11684 PR remote/13492
11685
11686 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11687 DR_CONTROL unless necessary. Extend comments.
11688 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11689 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11690
2ece8244
YQ
116912011-12-13 Yao Qi <yao@codesourcery.com>
11692
11693 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11694 macros.
11695 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11696
784867a5
JK
116972011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11698
11699 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11700 Print new debug message for such case.
11701
6bf36717
JK
117022011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11703
11704 Fix overlapping memcpy.
11705 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11706 the read_inferior_memory transfer.
11707 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11708 write_inferior_memory transfer.
11709 (set_fast_tracepoint_jump): New variable buf. Use it for the
11710 read_inferior_memory and write_inferior_memory transfers.
11711 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11712 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11713 Use it for the write_inferior_memory transfer.
11714 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11715 buffers.
11716
50275556
MR
117172011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11718
11719 * linux-low.c (fetch_register, store_register): Make code
11720 consistent, fix formatting.
11721
7325beb4
MR
117222011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11723
11724 * linux-low.c (usr_store_inferior_registers): Factor out code
11725 to handle individual registers into...
11726 (store_register): ... this new function.
11727
c642a434
UW
117282011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11729
11730 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11731 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11732 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11733 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11734 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11735 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11736 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11737 (srv_xmlfiles): Add new XML files.
11738
11739 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11740 and <sys/uio.h>.
11741 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11742 (init_registers_s390_linux32v1): Add prototype.
11743 (init_registers_s390_linux32v2): Likewise.
11744 (init_registers_s390_linux64v1): Likewise.
11745 (init_registers_s390_linux64v2): Likewise.
11746 (init_registers_s390x_linux64v1): Likewise.
11747 (init_registers_s390x_linux64v2): Likewise.
11748 (s390_num_regs): Increment to 52.
11749 (s390_regmap): Add orig_r2 register.
11750 (s390_num_regs_3264): Increment to 68.
11751 (s390_regmap_3264): Add orig_r2 register.
11752 (s390_collect_ptrace_register): Handle orig_r2 register.
11753 (s390_supply_ptrace_register): Likewise.
11754 (s390_fill_last_break): New function.
11755 (s390_store_last_break): Likewise.
11756 (s390_fill_system_call): New function.
11757 (s390_store_system_call): Likewise.
11758 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11759 register sets.
11760 (s390_check_regset): New function.
11761 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11762 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11763 Update target_regsets for available register sets.
11764
2268b414
JK
117652011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11766 Jan Kratochvil <jan.kratochvil@redhat.com>
11767
11768 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11769 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11770 New.
11771 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11772 * linux-low.h (struct process_info_private): New member r_debug.
11773 * server.c (handle_qxfer_libraries): Call
11774 the_target->qxfer_libraries_svr4.
11775 (handle_qxfer_libraries_svr4): New function.
11776 (qxfer_packets): New entry "libraries-svr4".
11777 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11778 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11779 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11780 PACKET_qXfer_libraries_svr4.
11781
d6db1fab
UW
117822011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11783
11784 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11785 PSW address/mask between 8-byte and 16-byte formats.
11786 (s390_supply_ptrace_register): Likewise.
11787 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11788 basic addressing mode bit.
11789
242f5f1c
SS
117902011-11-24 Stan Shebs <stan@codesourcery.com>
11791
11792 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11793
f196051f
SS
117942011-11-17 Stan Shebs <stan@codesourcery.com>
11795
11796 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11797 (tracing_start_time): New global.
11798 (tracing_stop_time): New global.
11799 (tracing_user_name): New global.
11800 (tracing_notes): New global.
11801 (tracing_stop_note): New global.
11802 (cmd_qtstart): Set traceframe_usage, start_time.
11803 (stop_tracing): Set stop_time.
11804 (cmd_qtstatus): Report additional status.
11805 (cmd_qtp): New function.
11806 (handle_tracepoint_query): Call it.
11807 (cmd_qtnotes): New function.
11808 (handle_tracepoint_general_set): Call it.
11809 (get_timestamp): Rename from tsv_get_timestamp.
11810
405f8e94
SS
118112011-11-14 Stan Shebs <stan@codesourcery.com>
11812 Kwok Cheung Yeung <kcy@codesourcery.com>
11813
11814 * linux-x86-low.c (small_jump_insn): New.
11815 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11816 trampoline and error message, build a trampoline and issue a small
11817 jump instruction to it.
11818 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11819 trampoline and error message.
11820 (x86_get_min_fast_tracepoint_insn_len): New.
11821 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11822 * linux-low.h (struct linux_target_ops): Add arguments to
11823 install_fast_tracepoint_jump_pad operation, add new operation.
11824 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11825 arguments.
11826 (linux_get_min_fast_tracepoint_insn_len): New function.
11827 (linux_target_op): Add new operation.
11828 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11829 (gdb_trampoline_buffer_end): Ditto.
11830 (gdb_trampoline_buffer_error): Ditto.
11831 (struct ipa_sym_addresses): Add fields for new IPA variables.
11832 (symbol_list): Add entries for new IPA variables.
11833 (struct tracepoint): Add fields to hold the address range of the
11834 trampoline used by the tracepoint.
11835 (trampoline_buffer_head): New static variable.
11836 (trampoline_buffer_tail): Ditto.
11837 (claim_trampoline_space): New function.
11838 (have_fast_tracepoint_trampoline_buffer): New function.
11839 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11840 structure.
11841 (install_fast_tracepoint): Ditto, also add error buffer argument.
11842 (cmd_qtminftpilen): New function.
11843 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11844 (fast_tracepoint_from_trampoline_address): New function.
11845 (fast_tracepoint_collecting): Handle trampoline as part of jump
11846 pad space.
11847 (set_trampoline_buffer_space): New function.
11848 (initialize_tracepoint): Initialize new IPA variables.
11849 * target.h (struct target_ops): Add arguments to
11850 install_fast_tracepoint_jump_pad operation, add new
11851 get_min_fast_tracepoint_insn_len operation.
11852 (target_get_min_fast_tracepoint_insn_len): New.
11853 (install_fast_tracepoint_jump_pad): Add arguments.
11854 * server.h (IPA_BUFSIZ): Define.
11855 * linux-i386-ipa.c: Include extra header files.
11856 (initialize_fast_tracepoint_trampoline_buffer): New function.
11857 (initialize_low_tracepoint): Call it.
11858 * server.h (set_trampoline_buffer_space): Declare.
11859 (claim_trampoline_space): Ditto.
11860 (have_fast_tracepoint_trampoline_buffer): Ditto.
11861
1e4d1764
YQ
118622011-11-14 Yao Qi <yao@codesourcery.com>
11863
11864 * server.c (handle_query): Handle InstallInTrace for qSupported.
11865 * tracepoint.c (add_tracepoint): Sort list.
11866 (install_tracepoint, download_tracepoint): New.
11867 (cmd_qtdp): Call them to install and download tracepoints.
11868 (sort_tracepoints): Removed.
11869 (cmd_qtstart): Update.
11870
5c73ff4e
YQ
118712011-11-14 Yao Qi <yao@codesourcery.com>
11872
11873 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11874 * mem-break.h: Declare.
11875 * tracepoint.c (cmd_qtstart): Move some code to ...
11876 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11877 New.
11878 (download_tracepoints): Move some code to ...
11879 (download_tracepoint_1): ... here. New.
11880
86a30030
YQ
118812011-11-08 Yao Qi <yao@codesourcery.com>
11882
11883 * remote-utils.c (relocate_instruction): A comment fix.
11884
8d26e50c
JB
118852011-11-07 Joel Brobecker <brobecker@adacore.com>
11886
11887 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11888 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11889 dr_status_mirror and dr_control_mirror from debug_reg_state.
11890 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11891 (i386_initial_stuff): Remove use of deleted globals.
11892 (i386_get_thread_context, i386_set_thread_context,
11893 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11894 from debug_reg_state.
11895
a59306a3
YQ
118962011-11-05 Yao Qi <yao@codesourcery.com>
11897
11898 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11899 address as TPOINT's.
11900
3065dfb6
SS
119012011-11-02 Stan Shebs <stan@codesourcery.com>
11902
11903 * tracepoint.c (agent_mem_read_string): New function.
11904 (eval_agent_expr): Call it for tracenz.
11905 * server.c (handle_query): Report support for tracenz.
11906
fd0d8c7c
YQ
119072011-11-02 Yao Qi <yao@codesourcery.com>
11908
11909 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11910
609086b1
YQ
119112011-11-02 Yao Qi <yao@codesourcery.com>
11912
11913 * target.h: Fix a typo in comment.
11914
b9fd1791
PA
119152011-10-31 Pedro Alves <pedro@codesourcery.com>
11916
11917 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11918 clobber the breakpoints' shadows with fast tracepoint jumps.
11919 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11920 * target.c (write_inferior_memory): Also pass MYADDR down to
11921 check_mem_write.
11922
03583c20
UW
119232011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11924
11925 * configure.ac: Check support for personality routine.
11926 * configure: Regenerate.
11927 * config.in: Likewise.
11928 * linux-low.c: Include <sys/personality.h>.
11929 Define ADDR_NO_RANDOMIZE if necessary.
11930 (linux_create_inferior): Disable address space randomization when
11931 forking inferior, if requested.
11932 (linux_supports_disable_randomization): New function.
11933 (linux_target_ops): Install it.
11934 * server.h (disable_randomization): Declare.
11935 * server.c (disable_randomization): New global variable.
11936 (handle_general_set): Handle QDisableRandomization.
11937 (handle_query): Likewise for qSupported.
11938 (main): Support --disable-randomization and --no-disable-randomization
11939 command line arguments.
11940 * target.h (struct target_ops): Add supports_disable_randomization.
11941 (target_supports_disable_randomization): New macro.
11942
723b724b
MF
119432011-09-29 Mike Frysinger <vapier@gentoo.org>
11944
11945 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11946 ifdef check.
11947 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11948 [!PT_GETDSBT] (target_loadmap): New definition.
11949 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11950 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11951 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11952 and PT_GETDSBT to LINUX_LOADMAP.
11953 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11954 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11955
55329a5c 119562011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11957
11958 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11959 (arm_linux_hwbp_cap): New static variable.
11960 (arm_linux_get_hwbp_cap): Replace by ...
11961 (arm_linux_init_hwbp_cap): ... this new function.
11962 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11963 (arm_linux_get_hw_watchpoint_count): Likewise.
11964 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11965 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11966 (arm_prepare_to_resume): Use perror_with_name instead of error.
11967
55329a5c 119682011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11969
11970 * linux-arm-low.c: Include <signal.h>.
11971 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11972 (struct arm_linux_hwbp_cap): New data type.
11973 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11974 (struct arm_linux_hw_breakpoint): New data type.
11975 (MAX_BPTS, MAX_WPTS): Define.
11976 (struct arch_process_info, struct arch_lwp_info): New data types.
11977 (arm_linux_get_hwbp_cap): New function.
11978 (arm_linux_get_hw_breakpoint_count): Likewise.
11979 (arm_linux_get_hw_watchpoint_count): Likewise.
11980 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11981 (arm_hwbp_control_initialize): Likewise.
11982 (arm_hwbp_control_is_enabled): Likewise.
11983 (arm_hwbp_control_is_initialized): Likewise.
11984 (arm_hwbp_control_disable): Likewise.
11985 (arm_linux_hw_breakpoint_equal): Likewise.
11986 (arm_linux_hw_point_initialize): Likewise.
11987 (struct update_registers_data): New data structure.
11988 (update_registers_callback: New function.
11989 (arm_insert_point): Likewise.
11990 (arm_remove_point): Likewise.
11991 (arm_stopped_by_watchpoint): Likewise.
11992 (arm_stopped_data_address): Likewise.
11993 (arm_new_process): Likewise.
11994 (arm_new_thread): Likewise.
11995 (arm_prepare_to_resume): Likewise.
11996 (the_low_target): Register arm_insert_point, arm_remove_point,
11997 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11998 arm_new_thread, and arm_prepare_to_resume.
11999
6b9801d4
SS
120002011-09-15 Stan Shebs <stan@codesourcery.com>
12001
12002 * server.h (struct emit_ops): Add compare-goto fields.
12003 * tracepoint.c (gdb_agent_op_sizes): New table.
12004 (emit_eq_goto): New function.
12005 (emit_ne_goto): New function.
12006 (emit_lt_goto): New function.
12007 (emit_le_goto): New function.
12008 (emit_gt_goto): New function.
12009 (emit_ge_goto): New function.
12010 (is_goto_target): New function.
12011 (compile_bytecodes): Recognize special cases of compare-goto
12012 combinations and call specialized emitters for them.
12013 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12014 (amd64_emit_ne_goto): New function.
12015 (amd64_emit_lt_goto): New function.
12016 (amd64_emit_le_goto): New function.
12017 (amd64_emit_gt_goto): New function.
12018 (amd64_emit_ge_goto): New function.
12019 (amd64_emit_ops): Add the new functions.
12020 (i386_emit_eq_goto): New function.
12021 (i386_emit_ne_goto): New function.
12022 (i386_emit_lt_goto): New function.
12023 (i386_emit_le_goto): New function.
12024 (i386_emit_gt_goto): New function.
12025 (i386_emit_ge_goto): New function.
12026 (i386_emit_ops): Add the new functions.
12027
bf15cbda
SS
120282011-09-08 Stan Shebs <stan@codesourcery.com>
12029
12030 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12031 (i386_emit_epilogue): Restore %ebx.
12032
943ca1dd
JZ
120332011-08-31 Jie Zhang <jzhang918@gmail.com>
12034
12035 * server.c (step_thread): Remove definition.
12036 (process_serial_event): Don't handle Hs.
12037 * server.h (step_thread): Remove declaration.
12038 * target.c (set_desired_inferior): Remove use of step_thread.
12039
e3deef73
LM
120402011-08-24 Luis Machado <lgustavo@codesourcery.com>
12041
12042 * linux-low.c: Include linux-procfs.h.
12043 (linux_attach_lwp_1): Update comments.
12044 (linux_attach): Scan for existing threads when attaching to a
12045 process that is the tgid.
12046 * Makefile.in: Update dependencies.
12047
13da1c97
LM
120482011-08-24 Luis Machado <lgustavo@codesourcery.com>
12049
12050 * configure.srv: Add linux-procfs.o dependencies.
12051
881127c9
YQ
120522011-08-14 Yao Qi <yao@codesourcery.com>
12053
12054 * target.h (struct target_ops): Fix indent.
12055 * win32-low.c (win32_target_ops): Fix comment.
12056
58dbd541
YQ
120572011-08-14 Andrew Jenner <andrew@codesourcery.com>
12058 Yao Qi <yao@codesourcery.com>
12059
12060 * Makefile.in (clean): Remove tic6x-*.c files.
12061 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12062 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12063 (tic6x-c64xp-linux.c): Likewise.
12064 * configure.srv: Add support for tic6x-*-uclinux.
12065 * linux-tic6x-low.c: New.
12066 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12067
78d85199
YQ
120682011-08-14 Andrew Stubbs <ams@codesourcery.com>
12069 Yao Qi <yao@codesourcery.com>
12070
12071 * target.h (struct target_ops): Add read_loadmap.
12072 * linux-low.c (struct target_loadseg): New type.
12073 (struct target_loadmap): New type.
12074 (linux_read_loadmap): New function.
12075 (linux_target_ops): Add linux_read_loadmap.
12076 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12077 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12078 to NULL.
78d85199 12079
a959a88d
EZ
120802011-08-05 Eli Zaretskii <eliz@gnu.org>
12081
12082 * win32-low.c: Include <stdint.h>.
12083
1ced966e
PA
120842011-07-22 Pedro Alves <pedro@codesourcery.com>
12085
12086 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12087 to the inferior here.
12088 (i386_remove_aligned_watchpoint): Ditto.
12089 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12090 fit part of the watchpoint in the debug registers.
12091 (i386_update_inferior_debug_regs): New.
12092 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12093 registers, and only update the inferior on success.
12094 (i386_low_remove_watchpoint): Ditto.
12095
d26e3629
KY
120962011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12097
12098 * linux-low.c (compare_ints, unique, list_threads, show_process,
12099 linux_core_of_thread): Delete.
12100 (linux_target_ops): Change linux_core_of_thread to
12101 linux_common_core_of_thread.
12102 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12103 * utils.c (malloc_failure): Change type of argument.
12104 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12105 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12106 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12107 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12108 (IPA_OBJS): Add common-utils-ipa.o.
12109 (ptid_h, linux_osdata_h): New macros.
12110 (server_h): Add common/common-utils.h, common/xml-utils.h,
12111 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12112 common/ptid.h.
12113 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12114 ptid.o, buffer.o): New rules.
12115 (linux-low.o): Add common/linux-osdata.h as a dependency.
12116 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12117 * configure.ac: Add AC_HEADER_DIRENT check.
12118 * config.in: Regenerate.
12119 * configure: Regenerate.
12120 * remote-utils.c (xml_escape_text): Delete.
12121 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12122 buffer_xml_printf): Move to common/buffer.c.
12123 * server.c (main): Remove call to initialize_inferiors.
12124 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12125 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12126 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12127 internal_error, gdb_assert, gdb_assert_fail): Delete.
12128 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12129 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12130 common/buffer.h.
12131 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12132 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12133 initialize_inferiors): Delete.
12134
2275a1a7
PA
121352011-07-20 Pedro Alves <pedro@codesourcery.com>
12136
12137 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12138 symbol error.
12139
0a5b1e09
PA
121402011-05-31 Pedro Alves <pedro@codesourcery.com>
12141
12142 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12143 assertion.
12144 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12145
6938fd34
YQ
121462011-05-26 Yao Qi <yao@codesourcery.com>
12147
12148 * Makefile.in (thread-db.o): Track dependence to
12149 common/gdb_thread_db.h.
12150 * thread-db.c: include gdb_thread_db.h from right place.
12151
b481f9e0
TT
121522011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12153
12154 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12155 __FILE__ and __LINE__ to internal_error.
12156
98a5dd13
DE
121572011-05-13 Doug Evans <dje@google.com>
12158
12159 * thread-db.c (try_thread_db_load_from_sdir): New function.
12160 (try_thread_db_load_from_dir): New function.
12161 (thread_db_load_search): Handle $sdir, ignore $pdir.
12162 Remove trying of system directories if search of
12163 libthread-db-search-path fails, that is now done via $sdir.
12164
d248b706
KY
121652011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12166
12167 * server.c (handle_query): Add EnableDisableTracepoints to the list
12168 of supported features.
43aaf8b6 12169 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12170 tracepoints.
43aaf8b6
PA
12171 (cmd_qtenable_disable): New.
12172 (cmd_qtstart): Install tracepoints even if disabled.
12173 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12174 receiving a QTEnable or QTDisable packet.
12175 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12176 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12177 tracepoints.
12178 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12179
84e578fb
DE
121802011-05-10 Doug Evans <dje@google.com>
12181
12182 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12183
71f55dd8
DE
121842011-05-04 Doug Evans <dje@google.com>
12185
12186 * linux-low.c (linux_join): Skip process lookup.
12187 * spu-low.c (spu_join): Ditto.
12188 * server.c (join_inferiors_callback): Delete.
12189 (process_serial_event): For 'D' packet (detach) call join_inferior
12190 directly.
12191
4d393d60
JM
121922011-05-04 Joseph Myers <joseph@codesourcery.com>
12193
12194 * README: Don't mention xscale*-*-linux*.
12195 * configure.srv (xscale*-*-linux*): Don't handle target.
12196
b00ad6ff
NF
121972011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12198
12199 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12200 casting pointers.
12201 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12202 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12203 (i386_emit_void_call_2): Likewise.
12204
af96c192
YQ
122052011-04-26 Yao Qi <yao@codesourcery.com>
12206
43aaf8b6
PA
12207 * linux-low.c: Move common macros to linux-ptrace.h.
12208 Include linux-ptrace.h.
af96c192
YQ
12209 * Makefile.in (linux_ptrace_h): New.
12210 (linux-low.o): Depends on linux-ptrace.h.
12211
03f2bd59
JK
122122011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12213
12214 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12215 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12216 (remote_prepare): New function with most of the TCP code from ...
12217 (remote_open): ... here. Detect PORT here unconditionally. Move also
12218 setting transport_is_reliable.
12219 * server.c (run_once): New variable.
12220 (gdbserver_usage): Document it.
12221 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12222 the first run if RUN_ONCE.
12223 * server.h (run_once, remote_prepare): New declarations.
12224
7a9dd1b2
TT
122252011-04-19 Tom Tromey <tromey@redhat.com>
12226
12227 * win32-low.c (handle_load_dll): Remove duplicate "the".
12228
81239425
PM
122292011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12230
12231 Remove support for old Cygwin 1.5 versions.
12232 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12233 function to avoid warning.
12234 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12235 warning.
12236
9e0627f1
PM
122372011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12238
12239 * gdbserver/server.h (Macro _): Define it if not available.
12240
588eebee
MS
122412011-03-14 Michael Snyder <msnyder@vmware.com>
12242
348af9f7 12243 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12244
43f70d4c
JB
122452011-03-10 Joel Brobecker <brobecker@adacore.com>
12246
12247 * Makefile.in (maintainer-clean realclean distclean): Remove
12248 "make ... subdir_do" command.
12249
348af9f7
MS
122502011-03-10 Michael Snyder <msnyder@vmware.com>
12251
12252 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12253
12254 * server.c (handle_v_run): Free alloced buffer on early return.
12255
e637a4f5
YQ
122562011-03-09 Yao Qi <yao@codesourcery.com>
12257
12258 Revert:
12259 2011-03-04 Yao Qi <yao@codesourcery.com>
12260
12261 * Makefile.in: Remove GNU make feature --directory.
12262
12263 2011-03-05 Yao Qi <yao@codesourcery.com>
12264
12265 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12266 (subdir_do): New make target. Copied from gdb/Makefile.
12267 (maintainer-clean, realclean, distclean, clean): Call corresponding
12268 make targets in common/Makefile.
12269
12270 2011-02-11 Yao Qi <yao@codesourcery.com>
12271
12272 * configure.ac: Call AC_PROG_RANLIB.
12273 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12274 * configure: Regenerate.
12275
e6edda56
JK
122762011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12277
12278 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12279
e5141119
JB
122802011-03-06 Yao Qi <yao@codesourcery.com>
12281
12282 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12283
64794aa4
JB
122842011-03-05 Yao Qi <yao@codesourcery.com>
12285
12286 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12287 (subdir_do): New make target. Copied from gdb/Makefile.
12288 (maintainer-clean, realclean, distclean, clean): Call corresponding
12289 make targets in common/Makefile.
12290
7a762829
YQ
122912011-03-04 Yao Qi <yao@codesourcery.com>
12292
12293 * Makefile.in: Remove GNU make feature --directory.
12294
348af9f7
MS
122952011-03-04 Michael Snyder <msnyder@vmware.com>
12296
12297 * server.c (queue_stop_reply): Call xmalloc not malloc.
12298
122992011-03-02 Michael Snyder <msnyder@vmware.com>
12300
12301 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12302
9f72fee2
MS
123032011-02-28 Michael Snyder <msnyder@vmware.com>
12304
588eebee
MS
12305 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12306 (cmd_qtframe): Ditto.
12307 (cmd_qtbuffer): Ditto.
12308 (cmd_bigqtbuffer): Ditto.
12309
9f72fee2
MS
12310 * utils.c (decimal2str): Initialize 'width' to nine, then
12311 don't mess with it.
12312
8040bd49
UW
123132011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12314
12315 * hostio.c (require_data): Free *data, not data.
12316
7e52cbd0
JK
123172011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12318
12319 * hostio.c (require_data): Use free, not xfree.
12320
9130f83e
MS
123212011-02-27 Michael Snyder <msnyder@vmware.com>
12322
4b812f4e
MS
12323 * server.c (handle_query): Discard unused value.
12324
9130f83e
MS
12325 * hostio.c (require_data): Free malloc memory before returning
12326 error.
12327
69d37113
MS
123282011-02-26 Michael Snyder <msnyder@vmware.com>
12329
12330 * linux-low.c (list_threads): Call closedir for dirent.
12331
35f5825a
MS
123322011-02-27 Michael Snyder <msnyder@vmware.com>
12333
2a589cef
MS
12334 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12335 a case statement falls through.
12336
0adea5f7
MS
12337 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12338
35f5825a
MS
12339 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12340 in comparison.
12341
238f1c74
MS
123422011-02-26 Michael Snyder <msnyder@vmware.com>
12343
12344 * utils.c (decimal2str): Eliminate dead code and dead param.
12345 (pulongest): Drop dead param from call to decimal2str.
12346 (plongest): Ditto.
12347
633ff500
JB
123482011-02-24 Joel Brobecker <brobecker@adacore.com>
12349
12350 Revert the following patch (not approved yet):
12351 2011-02-21 Hui Zhu <teawater@gmail.com>
12352 * tracepoint.c (tp_printf): New function.
12353 (eval_agent_expr): Handle gdb_agent_op_printf.
12354
f9c6ff72
HZ
123552011-02-21 Hui Zhu <teawater@gmail.com>
12356
12357 * tracepoint.c (tp_printf): New function.
12358 (eval_agent_expr): Handle gdb_agent_op_printf.
12359
94d5e490
TT
123602011-02-18 Tom Tromey <tromey@redhat.com>
12361
12362 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12363 (tracepoint.o): Likewise.
12364 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12365 (gdb_agent_op_names): Likewise.
12366
c7f96d2b
TT
123672011-02-18 Tom Tromey <tromey@redhat.com>
12368
12369 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12370 gdb_agent_op_rot>: New constants.
12371 (gdb_agent_op_names): Add pick and roll.
12372 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12373 cases.
12374
0feedb2c
JK
123752011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12376
12377 * aclocal.m4: Regenerated with aclocal-1.11.1.
12378
b3b9301e
PA
123792011-02-14 Pedro Alves <pedro@codesourcery.com>
12380
12381 * server.c (handle_qxfer_traceframe_info): New.
12382 (qxfer_packets): Register "traceframe-info".
12383 (handle_query): Report support for qXfer:traceframe-info:read+.
12384 * tracepoint.c (match_blocktype): New.
12385 (traceframe_find_block_type): Rename to ...
12386 (traceframe_walk_blocks): ... this. Add callback filter argument,
12387 and use it.
12388 (traceframe_find_block_type): New, reimplemented on top of
12389 traceframe_walk_blocks.
12390 (build_traceframe_info_xml): New.
12391 (traceframe_read_info): New.
12392 * server.h (traceframe_read_info): Declare.
12393
4f3e6fb7
YQ
123942011-02-11 Yao Qi <yao@codesourcery.com>
12395
12396 * configure.ac: Call AC_PROG_RANLIB.
12397 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12398 * configure: Regenerate.
12399
764880b7
PA
124002011-02-07 Pedro Alves <pedro@codesourcery.com>
12401
12402 * server.c (gdb_read_memory): Change return semantics to allow
12403 partial transfers.
12404 (handle_search_memory_1): Adjust.
12405 (process_serial_event) <'m' packet>: Handle partial transfers.
12406 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12407
1c79eb8a
PA
124082011-01-28 Pedro Alves <pedro@codesourcery.com>
12409
12410 * regcache.c (init_register_cache): Initialize
12411 regcache->register_status.
12412 (free_register_cache): Release regcache->register_status.
12413 (regcache_cpy): Copy register_status.
12414 (registers_to_string): Print 'x's for unavailable registers.
12415 (supply_register): Mark the register's status valid or
12416 unavailable, depending on whether a buffer was passed in or not.
12417 (supply_register_zeroed): New.
12418 (supply_regblock): Mark the registers' status valid or
12419 unavailable, depending on whether a buffer was passed in or not.
12420 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12421 (struct regcache): New `register_status' field.
12422 (supply_register_zeroed): Declare.
12423 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12424 supply_register_zeroed, rather than passing a NULL buffer to
12425 supply_register.
12426 * tracepoint.c (fetch_traceframe_registers): Update comment.
12427
85724a0e
PA
124282011-01-28 Pedro Alves <pedro@codesourcery.com>
12429
12430 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12431 buffer explicit.
12432
d08aafef
PA
124332011-01-25 Pedro Alves <pedro@codesourcery.com>
12434
12435 * server.h (decode_xfer_write): Change prototype.
12436 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12437 and don't extract the annex here.
12438 * server.c (decode_xfer_read): Remove `annex' parameter,
12439 and don't extract the annex here.
12440 (decode_xfer): New.
12441 (struct qxfer): New.
12442 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12443 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12444 (handle_qxfer_statictrace): New functions, abstracted out from
12445 handle_query, and made to use the struct qxfer interface.
12446 (handle_threads_qxfer_proper): Rename to ...
12447 (handle_qxfer_threads_proper): ... this.
12448 (handle_threads_qxfer): Rename to ...
12449 (handle_qxfer_threads): ... this. Adjust.
12450 (qxfer_packets): New array.
12451 (handle_qxfer): New function.
12452 (handle_query): Use handle_qxfer.
12453
493e2a69
MS
124542011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12455
12456 * gdbreplay.c: Shorten lines of >= 80 columns.
12457 * linux-low.c: Ditto.
12458 * linux-ppc-low.c: Ditto.
12459 * linux-s390-low.c: Ditto.
12460 * linux-sparc-low.c: Ditto.
12461 * linux-x86-low.c: Ditto.
12462 * linux-xtensa-low.c: Ditto.
12463 * mem-break.c: Ditto.
12464 * nto-low.c: Ditto.
12465 * regcache.h: Ditto.
12466 * remote-utils.c: Ditto.
12467 * server.c: Ditto.
12468 * server.h: Ditto.
12469 * thread-db.c: Ditto.
12470 * tracepoint.c: Ditto.
12471 * utils.c: Ditto.
12472 * win32-low.h: Ditto.
12473
44944448
JB
124742011-01-05 Joel Brobecker <brobecker@adacore.com>
12475
12476 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12477 update.
12478
71ce852c
JB
124792011-01-01 Joel Brobecker <brobecker@adacore.com>
12480
12481 * server.c (gdbserver_version): Update copyright year in version
12482 output.
12483 * gdbreplay.c (gdbreplay_version): Ditto.
12484
eb826dc6
MF
124852010-12-29 Jie Zhang <jie.zhang@analog.com>
12486
12487 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12488 * linux-bfin-low.c: New file.
12489 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12490 PT_DATA_ADDR for BFIN targets.
12491 * Makefile.in (SFILES): Add linux-bfin-low.c.
12492 (clean): Remove reg-bfin.c.
12493 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12494 * README: Mention supported Blackfin targets.
12495
39ab222a
MF
124962010-12-23 Mike Frysinger <vapier@gentoo.org>
12497
12498 * .gitignore: New file.
12499
a1f2ce7d
MF
125002010-11-16 Mike Frysinger <vapier@gentoo.org>
12501
12502 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12503
f474844c
JZ
125042010-10-22 Jie Zhang <jie@codesourcery.com>
12505
12506 * Makefile.in: Add FLAGS_TO_PASS variable.
12507 (install): Remove dependency of install-only and recursively
12508 invoke make for install-only.
12509
f1048712
DE
125102010-10-04 Doug Evans <dje@google.com>
12511
12512 * Makefile.in (uninstall): Use $(DESTDIR).
12513
b53a1623
PA
125142010-09-24 Pedro Alves <pedro@codesourcery.com>
12515
e6ee044d
PA
12516 PR gdb/11842
12517
b53a1623
PA
12518 * linux-x86-low.c (compat_siginfo_from_siginfo)
12519 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12520 si_code is < 0. Check for si_code == SI_TIMER before checking for
12521 si_code < 0.
12522
fa1bd1e4
JB
125232010-09-13 Joel Brobecker <brobecker@adacore.com>
12524
12525 * lynx-i386-low.c: New file.
12526 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12527
47fac8f8
JB
125282010-09-13 Joel Brobecker <brobecker@adacore.com>
12529
12530 * lynx-low.c (ptrace_request_to_str): Remove handling for
12531 request values that have been removed in LynxOS 5.x.
12532
1adfc54d
JB
125332010-09-13 Joel Brobecker <brobecker@adacore.com>
12534
12535 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12536 <ptrace.h>
12537
c2a66c29
NS
125382010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12539
12540 * configure.ac: Add --enable-inprocess-agent option.
12541 * configure: Rebuilt.
12542
32fcada3
YQ
125432010-09-06 Yao Qi <yao@codesourcery.com>
12544
12545 * linux-low.c (linux_kill): Remove unused variable.
12546 (linux_stabilize_threads): Likewise.
12547 * server.c (start_inferior): Likewise.
12548 (queue_stop_reply_callback): Likewise.
12549 * tracepoint.c (do_action_at_tracepoint): Likewise.
12550
0cccb683
YQ
125512010-09-06 Yao Qi <yao@codesourcery.com>
12552
12553 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12554 on return.
12555
423ec54c
JK
125562010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12557
12558 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12559
12ac6819
PA
125602010-09-06 Pedro Alves <pedro@codesourcery.com>
12561
12562 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12563 "$(IPA_DEPFILES)".
12564
8ed54b31
JB
125652010-09-01 Joel Brobecker <brobecker@adacore.com>
12566
12567 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12568 gdbserver/lynx-ppc-low.c: New files.
12569 * Makefile.in (lynx_low_h): New variable.
12570 (lynx-low.o, lynx-ppc-low.o): New rules.
12571 * configure.ac: On LynxOS, link with -lnetinet.
12572 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12573 * configure: regenerate.
12574
bb0116a4
JB
125752010-09-01 Joel Brobecker <brobecker@adacore.com>
12576
12577 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12578 * configure.ac: Add check for vasprintf and vsnprintf.
12579 * configure, config.in: Regenerate.
12580 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12581
a778ab81 125822010-09-01 Joel Brobecker <brobecker@adacore.com>
12583
12584 * gdbreplay.c: Move include of alloca.h up, next to include of
12585 malloc.h.
12586 * server.h: Add include of malloc.h.
12587 * mem-break.c: Remove include of malloc.h.
12588 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12589
8b034a19 125902010-09-01 Joel Brobecker <brobecker@adacore.com>
12591
12592 * Makefile.in (memmem.o): Build with -Wno-error.
12593
125942010-09-01 Joel Brobecker <brobecker@adacore.com>
12595
12596 * utils.c (xsnprintf): Make non-static.
12597 * server.h: Add xsnprintf declaration.
12598 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12599 replace calls to snprintf by calls to xsnprintf throughout.
12600
126012010-09-01 Joel Brobecker <brobecker@adacore.com>
12602
12603 * configure.ac: Add configure check for alloca.
12604 * configure, config.in: Regenerate.
12605 * server.h: Include alloca.h if it exists.
12606 * gdbreplay.c: Include alloca.h if it exists.
12607
1a981360
PA
126082010-08-28 Pedro Alves <pedro@codesourcery.com>
12609
12610 * linux-low.c (__SIGRTMIN): Define if not already defined.
12611 (linux_create_inferior): Check for __ANDROID__ rather than
12612 __SIGRTMIN.
12613 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12614 are already deferred.
12615 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12616 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12617 stopped and already has a pending signal to report.
12618 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12619 a pending signal to report or is moving out of a jump pad.
12620 (linux_init_signals): Check for __ANDROID__ rather than
12621 __SIGRTMIN.
12622
b4d51a55
PA
126232010-08-28 Pedro Alves <pedro@codesourcery.com>
12624
12625 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12626 debug_threads check. Avoid a linear search when not doing debug
12627 output.
12628
ec48365d
PA
126292010-08-27 Pedro Alves <pedro@codesourcery.com>
12630
12631 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12632 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12633 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12634 (process_event): Change local fd's type to gdb_fildes_t.
12635 (create_file_handler): Adjust prototype.
12636 (delete_file_handler): Adjust prototype.
12637 (handle_file_event): Adjust prototype. Use pfildes.
12638 (create_file_event): Adjsut prototype.
12639 * remote-utils.c (remote_desc, listen_desc): Change type to
12640 gdb_fildes_t.
12641 * server.h: New gdb_fildes_t typedef.
12642 [USE_WIN32API]: Include winsock2.h.
12643 (delete_file_handler, add_file_handler): Adjust prototypes.
12644 (pfildes): Declare.
12645 * utils.c (pfildes): New.
12646
854d88f0
PA
126472010-08-27 Pedro Alves <pedro@codesourcery.com>
12648
12649 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12650 * configure: Regenerate.
12651
0146f85b
PA
126522010-08-27 Pedro Alves <pedro@codesourcery.com>
12653
12654 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12655 (linux_done_accessing_memory): ... this.
12656 (linux_target_ops): Adjust.
12657 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12658 * nto-low.c (nto_target_ops): Adjust comment.
12659 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12660 * spu-low.c (spu_target_ops): Adjust comment.
12661 * target.h (target_ops): Rename unprepare_to_access_memory field
12662 to done_accessing_memory.
12663 (unprepare_to_access_memory): Rename to ...
12664 (done_accessing_memory): ... this.
12665
90d74c30
PA
126662010-08-26 Pedro Alves <pedro@codesourcery.com>
12667
12668 * linux-low.c (linux_prepare_to_access_memory): New.
12669 (linux_unprepare_to_access_memory): New.
12670 (linux_target_ops): Install them.
12671 * server.c (read_memory): Rename to ...
12672 (gdb_read_memory): ... this. Use
12673 prepare_to_access_memory/prepare_to_access_memory.
12674 (write_memory): Rename to ...
12675 (gdb_write_memory): ... this. Use
12676 prepare_to_access_memory/prepare_to_access_memory.
12677 (handle_search_memory_1): Adjust.
12678 (process_serial_event): Adjust.
12679 * target.h (struct target_ops): New fields
12680 prepare_to_access_memory and unprepare_to_access_memory.
12681 (prepare_to_access_memory, unprepare_to_access_memory): New.
12682 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12683 prepare_to_access_memory/prepare_to_access_memory.
12684 * nto-low.c (nto_target_ops): Adjust.
12685 * spu-low.c (spu_target_ops): Adjust.
12686 * win32-low.c (win32_target_ops): Adjust.
12687
fd467969
PA
126882010-08-26 Pedro Alves <pedro@codesourcery.com>
12689
12690 * Makefile.in (WARN_CFLAGS): Get it from configure.
12691 (WERROR_CFLAGS): New.
12692 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12693 * configure.ac: Introduce --enable-werror, which adds -Werror to
12694 the compiler command line. Enabled by default. Disable with
12695 --disable-werror. Add -Wdeclaration-after-statement
12696 Wpointer-arith and -Wformat-nonliteral to warning flags.
12697 * configure: Regenerate.
12698
331e2f5f
PA
126992010-08-26 Pedro Alves <pedro@codesourcery.com>
12700
12701 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12702
e581f2b4
PA
127032010-08-26 Pedro Alves <pedro@codesourcery.com>
12704
12705 * gdbreplay.c (remote_error): New.
12706 (gdbchar): New.
12707 (expect): Use gdbchar. Check for error reading from GDB.
12708 Clarify sync error output.
12709 (play): Check for errors writing to GDB.
12710 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12711 * remote-utils.c (getpkt): Check for errors writing to the remote
12712 descriptor.
12713
3c11dd79
PA
127142010-08-25 Pedro Alves <pedro@codesourcery.com>
12715
12716 * linux-low.c (linux_wait_1): Move non-debugging code out of
12717 `debug_threads' control.
12718
d20a8ad9
PA
127192010-08-25 Pedro Alves <pedro@codesourcery.com>
12720
12721 * linux-low.c (linux_wait_1): Don't set last_status here.
12722 * server.c (push_event, queue_stop_reply_callback): Assert we're
12723 not pushing a TARGET_WAITKIND_IGNORE event.
12724 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12725 (myresume, handle_target_event): Set the thread's last_resume_kind
12726 and last_status from the target returned status.
12727
964e4306
PA
127282010-08-25 Pedro Alves <pedro@codesourcery.com>
12729
12730 PR threads/10729
12731
12732 * linux-x86-low.c (update_debug_registers_callback): New.
12733 (i386_dr_low_set_addr): Use it.
12734 (i386_dr_low_get_addr): New.
12735 (i386_dr_low_set_control): Use update_debug_registers_callback.
12736 (i386_dr_low_get_control): New.
12737 (i386_dr_low_get_status): Adjust.
12738 * linux-low.c (linux_stop_lwp): New.
12739 * linux-low.h (linux_stop_lwp): Declare.
12740
12741 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12742 argument instead of a i386_debug_reg_state.
12743 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12744 a i386_debug_reg_state.
12745 (i386_insert_aligned_watchpoint): Adjust.
12746 (i386_remove_aligned_watchpoint): Adjust.
12747 (i386_low_stopped_data_address): Read the debug registers from the
12748 inferior instead of from the mirrors.
12749 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12750 (i386_dr_low_get_addr): Declare.
12751 (i386_dr_low_get_control): Declare.
12752 (i386_dr_low_get_status): Change prototype.
12753
12754 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12755 (i386_dr_low_get_addr): New.
12756 (i386_dr_low_get_control): New.
12757 (i386_dr_low_get_status): Adjust prototype. Return
12758 dr_status_mirror.
12759 (i386_initial_stuff): Clear dr_status_mirror and
12760 dr_control_mirror.
12761 (i386_get_thread_context): Adjust.
12762 (i386_set_thread_context): Adjust.
12763 (i386_thread_added): Adjust.
12764
5f21a75b
PA
127652010-08-24 Pedro Alves <pedro@codesourcery.com>
12766
12767 * linux-low.h (linux_thread_area): Delete declaration.
12768
3e4c1235
TS
127692010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12770
12771 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12772 after its termination.
12773
1971b033
PA
127742010-08-09 Pedro Alves <pedro@codesourcery.com>
12775
12776 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12777 (gdb_wants_all_stopped): Delete.
12778 (linux_wait_1): Don't call them.
12779 * server.c (handle_v_cont): Tag all threads as want-stopped.
12780 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12781 stopped as "client-wants-stopped".
12782
310444ac
PA
127832010-07-31 Pedro Alves <pedro@codesourcery.com>
12784
12785 * Makefile.in (signals_h): New.
12786 (server_h): Depend on it.
12787 (server.o): Don't depend on $(signals_def).
12788 (signals.o): Depend on $(signals_def).
12789
a19cae16
JK
127902010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12791
12792 * Makefile.in (signals_def): New.
12793 (server_h): Append include/gdb/signals.h and signals_def.
12794 (server.o): Append signals_def.
12795
30d50328
JK
127962010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12797
12798 * server.c (handle_target_event): Use target_signal_to_host for
12799 resume_info.sig initialization.
12800 * target.h (struct thread_resume) <sig>: New comment.
12801
5c3216e2
OS
128022010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12803
c6f46ca0
OS
12804 * server.c (handle_query): strcpy() the returned string from paddress()
12805 instead of sprintf().
5c3216e2
OS
12806 * utils.c (paddress): Return phex_nz().
12807
6bd31874
JB
128082010-07-07 Joel Brobecker <brobecker@adacore.com>
12809
12810 * server.c (handle_v_cont): Call mourn_inferior if process
12811 just exited.
12812 (myresume): Likewise.
12813
0fb4aa4b
PA
128142010-07-01 Pedro Alves <pedro@codesourcery.com>
12815
12816 Static tracepoints, and integration with UST.
12817
12818 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12819 * mem-break.c (uninsert_all_breakpoints)
12820 (reinsert_all_breakpoints): New.
12821 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12822 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12823 (gdb_agent_ust_loaded, helper_thread_id)
12824 (gdb_agent_helper_thread_id): New macros.
12825 (struct ipa_sym_addresses): Add addr_ust_loaded,
12826 addr_helper_thread_id, addr_cmd_buf.
12827 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12828 (in_process_agent_loaded_ust): New.
12829 (write_e_ust_not_loaded): New.
12830 (maybe_write_ipa_ust_not_loaded): New.
12831 (struct collect_static_trace_data_action): New.
12832 (enum tracepoint_type) <static_tracepoint>: New.
12833 (struct tracepoint) <handle>: Mention static tracepoints.
12834 (struct static_tracepoint_ctx): New.
12835 (CMD_BUF_SIZE): New.
12836 (add_tracepoint_action): Handle static tracepoint actions.
12837 (unprobe_marker_at): New.
12838 (clear_installed_tracepoints): Handle static tracepoints.
12839 (cmd_qtdp): Handle static tracepoints.
12840 (probe_marker_at): New.
12841 (cmd_qtstart): Handle static tracepoints.
12842 (response_tracepoint): Handle static tracepoints.
12843 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12844 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12845 (get_context_regcache): Handle static tracepoints.
12846 (do_action_at_tracepoint): Handle static tracepoint actions.
12847 (traceframe_find_block_type): Handle static trace data blocks.
12848 (traceframe_read_sdata): New.
12849 (download_tracepoints): Download static tracepoint actions.
12850 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12851 (GDB_PROBE_NAME): New.
12852 (ust_ops): New.
12853 (GET_UST_SYM): New.
12854 (USTF): New.
12855 (dlsym_ust): New.
12856 (ust_marker_to_static_tracepoint): New.
12857 (gdb_probe): New.
12858 (collect_ust_data_at_tracepoint): New.
12859 (gdb_ust_probe): New.
12860 (UNIX_PATH_MAX, SOCK_DIR): New.
12861 (gdb_ust_connect_sync_socket): New.
12862 (resume_thread, stop_thread): New.
12863 (run_inferior_command): New.
12864 (init_named_socket): New.
12865 (gdb_ust_socket_init): New.
12866 (cstr_to_hexstr): New.
12867 (next_st): New.
12868 (first_marker, next_marker): New.
12869 (response_ust_marker): New.
12870 (cmd_qtfstm, cmd_qtsstm): New.
12871 (unprobe_marker_at, probe_marker_at): New.
12872 (cmd_qtstmat, gdb_ust_thread): New.
12873 (gdb_ust_init): New.
12874 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12875 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12876 (ST_REGENTRY): New.
12877 (x86_64_st_collect_regmap): New.
12878 (X86_64_NUM_ST_COLLECT_GREGS): New.
12879 (AMD64_RIP_REGNUM): New.
12880 (supply_static_tracepoint_registers): New.
12881 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12882 (ST_REGENTRY): New.
12883 (i386_st_collect_regmap): New.
12884 (i386_NUM_ST_COLLECT_GREGS): New.
12885 (supply_static_tracepoint_registers): New.
12886 * server.c (handle_query): Handle qXfer:statictrace:read.
12887 <qSupported>: Report support for StaticTracepoints, and
12888 qXfer:statictrace:read features.
12889 * server.h (traceframe_read_sdata)
12890 (supply_static_tracepoint_registers): Declare.
12891 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12892 (unpack_varlen_hex): Include in IPA build.
12893 * Makefile.in (ustlibs, ustinc): New.
12894 (IPA_OBJS): Add remote-utils-ipa.o.
12895 ($(IPA_LIB)): Link -ldl and -lpthread.
12896 (UST_CFLAGS): New.
12897 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12898 * config.in, configure: Regenerate.
12899
9e4344e5
PA
129002010-06-20 Ian Lance Taylor <iant@google.com>
12901 Pedro Alves <pedro@codesourcery.com>
12902
12903 * linux-x86-low.c (always_true): Delete.
12904 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12905 trying to fool the compiler with always_true.
12906
c6beb2cb
PA
129072010-06-20 Pedro Alves <pedro@codesourcery.com>
12908
12909 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12910 conditions in gdbserver.
12911
d2ed6730
UW
129122010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12913
12914 * spu-low.c (spu_read_memory): Wrap around local store limit.
12915 (spu_write_memory): Likewise.
12916
4e29fb54
PA
129172010-06-15 Pedro Alves <pedro@codesourcery.com>
12918
12919 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12920 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12921 LONGEST uses.
12922 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12923 uses.
12924 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12925 uses with LONGEST uses.
12926
6a271cae
PA
129272010-06-14 Stan Shebs <stan@codesourcery.com>
12928 Pedro Alves <pedro@codesourcery.com>
12929
12930 Bytecode compiler.
12931
12932 * linux-x86-low.c: Include limits.h.
12933 (add_insns): New.
12934 (always_true): New.
12935 (EMIT_ASM): New.
12936 (EMIT_ASM32): New.
12937 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12938 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12939 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12940 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12941 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12942 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12943 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12944 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12945 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12946 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12947 (amd64_emit_void_call_2): New.
12948 (amd64_emit_ops): New.
12949 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12950 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12951 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12952 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12953 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12954 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12955 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12956 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12957 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12958 (i386_emit_stack_adjust, i386_emit_int_call_1)
12959 (i386_emit_void_call_2): New.
12960 (i386_emit_ops): New.
12961 (x86_emit_ops): New.
12962 (the_low_target): Install x86_emit_ops.
12963 * server.h (struct emit_ops): New.
12964 (get_raw_reg_func_addr): Declare.
12965 (current_insn_ptr, emit_error): Declare.
12966 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12967 (set_trace_state_variable_value): New defines.
12968 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12969 addr_get_trace_state_variable_value and
12970 addr_set_trace_state_variable_value.
12971 (symbol_list): New fields for get_raw_reg,
12972 get_trace_state_variable_value and set_trace_state_variable_value.
12973 (condfn): New typedef.
12974 (struct tracepoint): New field `compiled_cond'.
12975 (do_action_at_tracepoint): Clear compiled_cond.
12976 (get_trace_state_variable_value, set_trace_state_variable_value):
12977 Export in the IPA.
12978 (condition_true_at_tracepoint): If there's a compiled condition,
12979 run that.
12980 (current_insn_ptr, emit_error): New globals.
12981 (struct bytecode_address): New.
12982 (get_raw_reg_func_addr): New.
12983 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12984 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12985 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12986 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12987 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12988 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12989 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12990 (compile_tracepoint_condition, compile_bytecodes): New.
12991 * target.h (emit_ops): Forward declare.
12992 (struct target_ops): New field emit_ops.
12993 (target_emit_ops): New.
12994 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12995 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12996 * linux-low.c (linux_emit_ops): New.
12997 (linux_target_ops): Install it.
12998 * linux-low.h (struct linux_target_ops): New field emit_ops.
12999
92b72907
UW
130002010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13001
13002 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13003 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13004
fa593d66
PA
130052010-06-01 Pedro Alves <pedro@codesourcery.com>
13006 Stan Shebs <stan@codesourcery.com>
13007
13008 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13009 (all): Depend on $(extra_libraries).
13010 (install-only): Install the IPA.
13011 (IPA_OBJS, IPA_LIB): New.
13012 (clean): Remove the IPA lib.
13013 (IPAGENT_CFLAGS): New.
13014 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13015 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13016 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13017 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13018 * configure.ac: Check for atomic builtins support in the compiler.
13019 (IPA_DEPFILES, extra_libraries): Define.
13020 * configure.srv (ipa_obj): Add description.
13021 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13022 (i[34567]86-*-linux*): Set ipa_obj.
13023 (x86_64-*-linux*): Set ipa_obj.
13024 * linux-low.c (stabilizing_threads): New.
13025 (supports_fast_tracepoints): New.
13026 (linux_detach): Stabilize threads before detaching.
13027 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13028 the lwp is either not stabilizing, or is moving out of a jump pad.
13029 (linux_fast_tracepoint_collecting): New.
13030 (maybe_move_out_of_jump_pad): New.
13031 (enqueue_one_deferred_signal): New.
13032 (dequeue_one_deferred_signal): New.
13033 (linux_wait_for_event_1): If moving out of a jump pad, defer
13034 pending signals to later.
13035 (linux_stabilize_threads): New.
13036 (linux_wait_1): Check if threads need moving out of jump pads, and
13037 do it if so.
13038 (stuck_in_jump_pad_callback): New.
13039 (move_out_of_jump_pad_callback): New.
13040 (lwp_running): New.
13041 (linux_resume_one_lwp): Handle moving out of jump pads.
13042 (linux_set_resume_request): Dequeue deferred signals.
13043 (need_step_over_p): Also step over fast tracepoint jumps.
13044 (start_step_over): Also uninsert fast tracepoint jumps.
13045 (finish_step_over): Also reinsert fast tracepoint jumps.
13046 (linux_install_fast_tracepoint_jump): New.
13047 (linux_target_ops): Install linux_stabilize_threads and
13048 linux_install_fast_tracepoint_jump_pad.
13049 * linux-low.h (linux_target_ops) <get_thread_area,
13050 install_fast_tracepoint_jump_pad>: New fields.
13051 (struct lwp_info) <collecting_fast_tracepoint,
13052 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13053 (linux_get_thread_area): Declare.
13054 * linux-x86-low.c (jump_insn): New.
13055 (x86_get_thread_area): New.
13056 (append_insns): New.
13057 (push_opcode): New.
13058 (amd64_install_fast_tracepoint_jump_pad): New.
13059 (i386_install_fast_tracepoint_jump_pad): New.
13060 (x86_install_fast_tracepoint_jump_pad): New.
13061 (the_low_target): Install x86_get_thread_area and
13062 x86_install_fast_tracepoint_jump_pad.
13063 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13064 (struct fast_tracepoint_jump): New.
13065 (fast_tracepoint_jump_insn): New.
13066 (fast_tracepoint_jump_shadow): New.
13067 (find_fast_tracepoint_jump_at): New.
13068 (fast_tracepoint_jump_here): New.
13069 (delete_fast_tracepoint_jump): New.
13070 (set_fast_tracepoint_jump): New.
13071 (uninsert_fast_tracepoint_jumps_at): New.
13072 (reinsert_fast_tracepoint_jumps_at): New.
13073 (set_breakpoint_at): Use write_inferior_memory.
13074 (uninsert_raw_breakpoint): Use write_inferior_memory.
13075 (check_mem_read): Mask out fast tracepoint jumps.
13076 (check_mem_write): Mask out fast tracepoint jumps.
13077 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13078 (set_fast_tracepoint_jump): Declare.
13079 (delete_fast_tracepoint_jump)
13080 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13081 (reinsert_fast_tracepoint_jumps_at): Declare.
13082 * regcache.c: Don't compile many functions when building the
13083 in-process agent library.
13084 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13085 the register buffer in the heap.
13086 (free_register_cache): If the register buffer isn't owned by the
13087 regcache, don't free it.
13088 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13089 pre-existing register caches.
13090 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13091 type.
13092 (convert_ascii_to_int): : Constify `from' parameter type.
13093 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13094 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13095 the needed buffer in-place.
13096 (relocate_instruction): New.
13097 * server.c (handle_query) <qSymbols>: If the target supports
13098 tracepoints, give it a chance of looking up symbols. Report
13099 support for fast tracepoints.
13100 (handle_status): Stabilize threads.
13101 (process_serial_event): Adjust.
13102 * server.h (struct fast_tracepoint_jump): Forward declare.
13103 (struct process_info) <fast_tracepoint_jumps>: New field.
13104 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13105 (decode_X_packet, decode_M_packet): Adjust.
13106 (relocate_instruction): Declare.
13107 (in_process_agent_loaded): Declare.
13108 (tracepoint_look_up_symbols): Declare.
13109 (struct fast_tpoint_collect_status): Declare.
13110 (fast_tracepoint_collecting): Declare.
13111 (force_unlock_trace_buffer): Declare.
13112 (handle_tracepoint_bkpts): Declare.
13113 (initialize_low_tracepoint)
13114 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13115 * target.h (struct target_ops) <stabilize_threads,
13116 install_fast_tracepoint_jump_pad>: New fields.
13117 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13118 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13119 [HAVE_STDINT_H]: Include stdint.h.
13120 (trace_debug_1): Rename to ...
13121 (trace_vdebug): ... this.
13122 (trace_debug): Rename to ...
13123 (trace_debug_1): ... this. Add `level' parameter.
13124 (trace_debug): New.
13125 (ATTR_USED, ATTR_NOINLINE): New.
13126 (IP_AGENT_EXPORT): New.
13127 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13128 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13129 (about_to_request_buffer_space, trace_buffer_is_full)
13130 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13131 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13132 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13133 (traceframe_write_count, traceframes_created)
13134 (trace_state_variables)
13135 New renaming defines.
13136 (struct ipa_sym_addresses): New.
13137 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13138 (symbol_list): New.
13139 (ipa_sym_addrs): New.
13140 (all_tracepoint_symbols_looked_up): New.
13141 (in_process_agent_loaded): New.
13142 (write_e_ipa_not_loaded): New.
13143 (maybe_write_ipa_not_loaded): New.
13144 (tracepoint_look_up_symbols): New.
13145 (debug_threads) [IN_PROCESS_AGENT]: New.
13146 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13147 (UNKNOWN_SIDE_EFFECTS): New.
13148 (stop_tracing): New.
13149 (flush_trace_buffer): New.
13150 (stop_tracing_bkpt): New.
13151 (flush_trace_buffer_bkpt): New.
13152 (read_inferior_integer): New.
13153 (read_inferior_uinteger): New.
13154 (read_inferior_data_pointer): New.
13155 (write_inferior_data_pointer): New.
13156 (write_inferior_integer): New.
13157 (write_inferior_uinteger): New.
13158 (struct collect_static_trace_data_action): Delete.
13159 (enum tracepoint_type): New.
13160 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13161 <actions_str, step_actions, step_actions_str>: Only include in
13162 GDBserver.
fa593d66
PA
13163 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13164 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13165 (tracepoints): Use IP_AGENT_EXPORT.
13166 (last_tracepoint): Don't include in the IPA.
13167 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13168 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13169 (alloced_trace_state_variables): New.
13170 (trace_state_variables): Use IP_AGENT_EXPORT.
13171 (traceframe_t): Delete unused variable.
13172 (circular_trace_buffer): Don't include in the IPA.
13173 (trace_buffer_start): Delete.
13174 (struct trace_buffer_control): New.
13175 (trace_buffer_free): Delete.
13176 (struct ipa_trace_buffer_control): New.
13177 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13178 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13179 New.
13180 (trace_buffer_ctrl): New.
13181 (TRACE_BUFFER_CTRL_CURR): New.
13182 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13183 Reimplement as macros.
13184 (trace_buffer_wrap): Delete.
13185 (traceframe_write_count, traceframe_read_count)
13186 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13187 (struct tracepoint_hit_ctx) <type>: New field.
13188 (struct fast_tracepoint_ctx): New.
13189 (memory_barrier): New.
13190 (cmpxchg): New.
13191 (record_tracepoint_error): Update atomically in the IPA.
13192 (clear_inferior_trace_buffer): New.
13193 (about_to_request_buffer_space): New.
13194 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13195 updating the same buffer.
13196 (add_tracepoint): Default the tracepoint's type to trap
13197 tracepoint, and orig_size to -1.
13198 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13199 internal variables.
13200 (create_trace_state_variable): New parameter `gdb'. Handle it.
13201 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13202 (cmd_qtdp): Handle fast tracepoints.
13203 (cmd_qtdv): Adjust.
13204 (max_jump_pad_size): New.
13205 (gdb_jump_pad_head): New.
13206 (get_jump_space_head): New.
13207 (claim_jump_space): New.
13208 (sort_tracepoints): New.
13209 (MAX_JUMP_SIZE): New.
13210 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13211 IPA.
13212 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13213 support. Upload fast traceframes, and delete internal IPA
13214 breakpoints.
13215 (stop_tracing_handler): New.
13216 (flush_trace_buffer_handler): New.
13217 (cmd_qtstop): Upload fast tracepoints.
13218 (response_tracepoint): Handle fast tracepoints.
13219 (tracepoint_finished_step): Upload fast traceframes. Set the
13220 tracepoint hit context's tracepoint type.
13221 (handle_tracepoint_bkpts): New.
13222 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13223 type. Add comment about fast tracepoints.
13224 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13225 non-existing action_str field.
13226 (get_context_regcache): Handle fast tracepoints.
13227 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13228 to the regcache.
13229 (fast_tracepoint_from_jump_pad_address): New.
13230 (fast_tracepoint_from_ipa_tpoint_address): New.
13231 (collecting_t): New.
13232 (force_unlock_trace_buffer): New.
13233 (fast_tracepoint_collecting): New.
13234 (collecting): New.
13235 (gdb_collect): New.
13236 (write_inferior_data_ptr): New.
13237 (target_tp_heap): New.
13238 (target_malloc): New.
13239 (download_agent_expr): New.
13240 (UALIGN): New.
13241 (download_tracepoints): New.
13242 (download_trace_state_variables): New.
13243 (upload_fast_traceframes): New.
13244 (IPA_FIRST_TRACEFRAME): New.
13245 (IPA_NEXT_TRACEFRAME_1): New.
13246 (IPA_NEXT_TRACEFRAME): New.
13247 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13248 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13249 (gdb_jump_pad_buffer_end): New.
13250 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13251 (initialize_tracepoint): Adjust.
13252 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13253 buffer. Initialize the low module.
13254 * utils.c (PREFIX, TOOLNAME): New.
13255 (malloc_failure): Use PREFIX.
13256 (error): In the IPA, an error causes an exit.
13257 (fatal, warning): Use PREFIX.
13258 (internal_error): Use TOOLNAME.
13259 (NUMCELLS): Increase to 10.
13260 * configure, config.in: Regenerate.
13261
d149dd1d
PA
132622010-06-01 Pedro Alves <pedro@codesourcery.com>
13263
13264 * server.c (handle_query) <qSupported>: Do two passes over the
13265 qSupported string to avoid nesting strtok.
13266
f6528abd
JK
132672010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13268
13269 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13270 (CDEPS): New.
13271 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13272 -Wl,--dynamic-list.
13273 * configure: Regenerate.
13274 * proc-service.list: New.
13275
ca2a87a0
JK
132762010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13277
13278 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13279 New comment.
13280
363a6e9f
OS
132812010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13282
13283 * gdbreplay.c (remote_open): Check error return from socket() call by
13284 its equality to -1 not by it being negative.
13285 * remote-utils.c (remote_open): Likewise.
13286
d23b6cb1
PA
132872010-05-23 Pedro Alves <pedro@codesourcery.com>
13288
13289 * config.h: Regenerate.
13290
28d3cf85
MK
132912010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13292
13293 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13294 doesn't provide PTRACE_GET_THREAD_AREA.
13295
fea36a59
MK
132962010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13297
13298 * linux-m68k-low.c: Include <asm/ptrace.h>
13299 (ps_get_thread_area): Implement.
13300
24b066ba
DE
133012010-05-03 Doug Evans <dje@google.com>
13302
13303 * event-loop.c (struct callback_event): New struct.
13304 (callback_list): New global.
13305 (append_callback_event, delete_callback_event): New functions.
13306 (process_callback): New function.
13307 (start_event_loop): Call it.
13308 * remote-utils.c (NOT_SCHEDULED): Define.
13309 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13310 moved out of readchar.
13311 (readchar): Rewrite. Call reschedule before returning.
13312 (reset_readchar): New function.
13313 (remote_close): Call it.
13314 (process_remaining, reschedule): New functions.
13315 * server.h (callback_handler_func): New typedef.
13316 (append_callback_event, delete_callback_event): Declare.
13317
9836d6ea
PA
133182010-05-03 Pedro Alves <pedro@codesourcery.com>
13319
13320 * proc-service.c (ps_pglobal_lookup): Use
13321 thread_db_look_up_one_symbol.
13322 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13323 parameter. Use it instead of all_symbols_looked_up.
13324 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13325 field.
13326 (all_symbols_looked_up): Don't declare.
13327 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13328 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13329 field.
13330 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13331 Set all_symbols_looked_up here.
13332 (thread_db_look_up_one_symbol): New.
13333 (thread_db_get_tls_address): Adjust.
13334 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13335 thread_db object on the heap, and tentatively set it in the
13336 process structure.
13337 (thread_db_init): Don't set all_symbols_looked_up here.
13338 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13339
7984d532
PA
133402010-05-03 Pedro Alves <pedro@codesourcery.com>
13341
13342 * linux-low.c (linux_kill, linux_detach): Adjust.
13343 (status_pending_p_callback): Remove redundant statement. Check
13344 for !TARGET_WAITIKIND_IGNORE, instead of
13345 TARGET_WAITKIND_STOPPED.
13346 (handle_tracepoints): Make sure LWP is locked. Adjust.
13347 (linux_wait_for_event_1): Adjust.
13348 (linux_cancel_breakpoints): New.
13349 (unsuspend_one_lwp): New.
13350 (unsuspend_all_lwps): New.
13351 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13352 (send_sigstop_callback): Change return type to int, add new
13353 `except' parameter and handle it.
13354 (suspend_and_send_sigstop_callback): New.
13355 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13356 pass them down. If SUSPEND, also increment the lwp's suspend
13357 count.
13358 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13359 (need_step_over_p): Don't consider suspended LWPs.
13360 (start_step_over): Adjust.
13361 (proceed_one_lwp): Change return type to int, add new `except'
13362 parameter and handle it.
13363 (unsuspend_and_proceed_one_lwp): New.
13364 (proceed_all_lwps): Use find_inferior instead of
13365 for_each_inferior.
13366 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13367 also decrement the suspend count of LWPs. Pass `except' down,
13368 instead of hacking its suspend count.
13369 (linux_pause_all): Add `freeze' parameter. Adjust.
13370 (linux_unpause_all): New.
13371 (linux_target_ops): Install linux_unpause_all.
13372 * server.c (handle_status): Adjust.
13373 * target.h (struct target_ops): New fields `unpause_all' and
13374 `cancel_breakpoints'. Add new parameter to `pause_all'.
13375 (pause_all): Add new `freeze' parameter.
13376 (unpause_all): New.
13377 (cancel_breakpoints): New.
13378 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13379 cancel breakpoints.
13380 (cmd_qtstart): Pause threads.
13381 (stop_tracing): Pause threads, and cancel breakpoints.
13382 * win32-low.c (win32_target_ops): Adjust.
13383
e471f25b
PA
133842010-05-03 Pedro Alves <pedro@codesourcery.com>
13385
13386 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13387 the inferior right away from here...
13388 (linux_wait_1): ... to here, and adjust to check the thread's
13389 last_resume_kind instead of the lwp's step or stop_expected flags.
13390
1915ef4f
PA
133912010-05-02 Pedro Alves <pedro@codesourcery.com>
13392
13393 * README: Use consistent `GDB' and `GDBserver' spellings.
13394
f9e39928
PA
133952010-05-02 Pedro Alves <pedro@codesourcery.com>
13396
13397 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13398 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13399 (linux_detach_one_lwp): Assume the lwp is stopped.
13400 (any_thread_of): Delete.
13401 (linux_detach): Stop all lwps here. Don't blindly delete all
13402 breakpoints.
13403 (delete_lwp_callback): New.
13404 (linux_mourn): Delete all lwps of the process that is gone.
13405 (linux_wait_1): Don't delete the last lwp of the process here.
13406 * mem-break.h (mark_breakpoints_out): Declare.
13407 * mem-break.c (mark_breakpoints_out): New.
13408 (free_all_breakpoints): Use it.
13409 * server.c (handle_target_event): If the process is gone, mark
13410 breakpoints out.
13411 * thread-db.c (struct thread_db) <create_bp>: New field.
13412 (thread_db_enable_reporting): Fix prototype. Store a thread event
13413 breakpoint reference in the thread_db struct.
13414 (thread_db_load_search): Clear the thread_db object.
13415 (try_thread_db_load_1): Ditto.
13416 (switch_to_process): New.
13417 (disable_thread_event_reporting): Use it.
13418 (remove_thread_event_breakpoints): New.
13419 (thread_db_detach, thread_db_mourn): Use it.
13420
1e7fc18c
PA
134212010-05-01 Pedro Alves <pedro@codesourcery.com>
13422
13423 * linux-low.c (linux_enable_event_reporting): New.
13424 (linux_wait_for_event_1, handle_extended_wait): Use it.
13425
02fc4de7
PA
134262010-04-30 Pedro Alves <pedro@codesourcery.com>
13427
13428 * linux-low.c (linux_kill_one_lwp, linux_kill)
13429 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13430 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13431 SIGSTOP even if the LWP is stopped.
13432 (send_sigstop_callback): New.
13433 (stop_all_lwps): Use send_sigstop_callback instead.
13434 (linux_resume_one_thread): Adjust.
13435 (proceed_one_lwp): Still proceed an LWP that the client has
13436 requested to stop, if we haven't reported it as stopped yet. Make
13437 sure that LWPs the client want stopped, have a pending SIGSTOP.
13438
bc3b5632
DE
134392010-04-26 Doug Evans <dje@google.com>
13440
ae1ada35
DE
13441 * server.c (handle_general_set): Make static.
13442
bc3b5632
DE
13443 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13444 Print received char after testing for error/eof instead of before.
13445 (input_interrupt): Tweak comment.
13446
65730243
DE
134472010-04-23 Doug Evans <dje@google.com>
13448
13449 * server.c (start_inferior): Print inferior argv if --debug.
13450
a8ae7dc0
AR
134512010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13452
13453 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13454 * nto-x86-low.c: Include server.h
13455
1c07cc19
PM
134562010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13457
13458 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13459 be consistent with other sources of this directory.
13460 (init_registers_amd64): Correct name of source file of this function
13461 in the comment.
13462
e0a61e09
PM
134632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13464
13465 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13466 64-bit executables.
13467
54709339
PM
134682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13469
13470 * win32-i386-low.c: Add 64-bit support.
13471 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13472 (init_registers_amd64): Declare.
13473 (mappings): Add 64-bit version of array.
13474 (init_windows_x86): New function.
13475 (the_low_target): Change init_arch field to init_windows_x86.
13476
e8f0053d
PM
134772010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13478
13479 * win32-low.c: Adapt to support also 64-bit architecture.
13480 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13481 (get_image_name): Use SIZE_T type for local variable `done'.
13482 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13483 (toolhelp_get_dll_name): Idem.
13484 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13485 Use uintptr_t typecast to avoid warning.
13486 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13487 (handle_exception): Use phex_nz to avoid warning.
13488 (win32_wait): Remove unused local variable `process'.
13489
c481e77e
PM
134902010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13491
13492 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13493 `amd64-avx.o'.
13494
12ea4b69
PM
134952010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13496
13497 * configure.ac: Use `ws2_32' library for srv_mingw.
13498 * configure: Regenerate.
13499 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13500 * remote-utils.c: Likewise.
13501
f6d1620c
L
135022010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13503
13504 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13505 if __x86_64__ is defined.
13506
8e642873
PM
135072010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13508
13509 * configure: Regenerate.
13510
711e434b
PM
135112010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13512
13513 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13514 * target.h (target_ops): New get_tib_address field.
13515 * win32-low.h (win32_thread_info): Add thread_local_base field.
13516 * win32-low.c (child_add_thread): Add tlb argument.
13517 Set thread_local_base field to TLB.
13518 (get_child_debug_event): Adapt to child_add_thread change.
13519 (win32_get_tib_address): New function.
13520 (win32_target_ops): Set get_tib_address field to
13521 win32_get_tib_address.
13522 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13523
505106cd
PA
135242010-04-12 Pedro Alves <pedro@codesourcery.com>
13525
505106cd
PA
13526 * linux-low.c (linux_mourn): Also remove the process.
13527 * server.c (handle_target_event): Don't remove the process here.
13528 * nto-low.c (nto_mourn): New.
13529 (nto_target_ops): Install it.
13530 * spu-low.c (spu_mourn): New.
13531 (spu_target_ops): Install it.
13532 * win32-low.c (win32_mourn): New.
13533 (win32_target_ops): Install it.
13534
e8470a06
PA
135352010-04-12 Pedro Alves <pedro@codesourcery.com>
13536
13537 * server.h (buffer_xml_printf): Remove redundant `;'.
13538
45ba0d02
PA
135392010-04-12 Pedro Alves <pedro@codesourcery.com>
13540
13541 * regcache.c (set_register_cache): Invalidate regcaches before
13542 changing the register cache layout.
13543 (regcache_invalidate_one): Allow a NULL regcache.
13544 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13545 regcaches before changing the register cache layout or the target
13546 regsets.
13547
59e04013
L
135482010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13549
13550 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13551 variable warning on Linux/x86-64.
13552
8336d594
PA
135532010-04-11 Pedro Alves <pedro@codesourcery.com>
13554
13555 GDBserver disconnected tracing support.
13556
13557 * linux-low.c (linux_remove_process): Delete.
13558 (add_lwp): Don't set last_resume_kind here.
13559 (linux_kill): Use `mourn'.
13560 (linux_detach): Use `thread_db_detach', and `mourn'.
13561 (linux_mourn): New.
13562 (linux_attach_lwp_1): Adjust comment.
13563 (linux_attach): last_resume_kind moved the thread_info; adjust.
13564 (status_pending_p_callback): Adjust.
13565 (linux_wait_for_event_1): Adjust.
13566 (count_events_callback, select_singlestep_lwp_callback)
13567 (select_event_lwp_callback, cancel_breakpoints_callback)
13568 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13569 (proceed_one_lwp): Adjust.
13570 (linux_async): Add debug output.
13571 (linux_thread_stopped): New.
13572 (linux_pause_all): New.
13573 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13574 linux_pause_all.
13575 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13576 (thread_db_free): Delete declaration.
13577 (thread_db_detach, thread_db_mourn): Declare.
13578 * thread-db.c (thread_db_init): Use thread_db_mourn.
13579 (thread_db_free): Delete, split in two.
13580 (disable_thread_event_reporting): New.
13581 (thread_db_detach): New.
13582 (thread_db_mourn): New.
13583
13584 * server.h (struct thread_info) <last_resume_kind>: New field.
13585 <attached>: Add comment.
13586 <gdb_detached>: New field.
13587 (handler_func): Change return type to int.
13588 (handle_serial_event, handle_target_event): Ditto.
13589 (gdb_connected): Declare.
13590 (tracing): Delete.
13591 (disconnected_tracing): Declare.
13592 (stop_tracing): Declare.
13593
13594 * server.c (handle_query) <qSupported>: Report support for
13595 disconnected tracing.
13596 (queue_stop_reply_callback): Account for running threads.
13597 (gdb_wants_thread_stopped): New.
13598 (gdb_wants_all_threads_stopped): New.
13599 (gdb_reattached_process): New.
13600 (handle_status): Clear the `gdb_detached' flag of all processes.
13601 In all-stop, stop all threads.
13602 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13603 (process_serial_event): If the remote connection breaks, or if an
13604 exit was forced with "monitor exit", force an event loop exit.
13605 Handle disconnected tracing on detach.
13606 (handle_serial_event): Adjust.
13607 (handle_target_event): If GDB isn't connected, forward events back
13608 to the inferior, unless the last process exited, in which case,
13609 exit gdbserver. Adjust interface.
13610
13611 * remote-utils.c (remote_open): Don't block in accept. Instead
13612 register an event loop source on the listen socket file
13613 descriptor. Refactor bits into ...
13614 (listen_desc): ... this new global.
13615 (gdb_connected): ... this new function.
13616 (enable_async_notification): ... this new function.
13617 (handle_accept_event): ... this new function.
13618 (remote_close): Clear remote_desc.
13619
13620 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13621
13622 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13623 New fields.
13624 (mourn_inferior): Define.
13625 (target_process_qsupported): Avoid the dangling else problem.
13626 (thread_stopped): Define.
13627 (pause_all): Define.
13628 (target_waitstatus_to_string): Declare.
13629 * target.c (target_waitstatus_to_string): New.
13630
13631 * tracepoint.c (tracing): Make extern.
13632 (disconnected_tracing): New.
13633 (stop_tracing): Make extern. Handle tracing stops due to GDB
13634 disconnecting.
13635 (cmd_qtdisconnected): New.
13636 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13637 (handle_tracepoint_general_set): Handle QTDisconnected.
13638
13639 * event-loop.c (event_handler_func): Change return type to int.
13640 (process_event): Bail out if the event handler wants the event
13641 loop to stop.
13642 (handle_file_event): Ditto.
13643 (start_event_loop): Bail out if the event handler wants the event
13644 loop to stop.
13645
13646 * nto-low.c (nto_target_ops): Adjust.
13647 * spu-low.c (spu_wait): Don't remove the process here.
13648 (spu_target_ops): Adjust.
13649 * win32-low.c (win32_wait): Don't remove the process here.
13650 (win32_target_ops): Adjust.
13651
5d267c4c
PA
136522010-04-11 Pedro Alves <pedro@codesourcery.com>
13653
13654 * regcache.c (realloc_register_cache): Invalidate inferior's
13655 regcache before recreating it.
13656
623ccd72
PA
136572010-04-09 Pedro Alves <pedro@codesourcery.com>
13658
13659 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13660
219f2f23
PA
136612010-04-09 Stan Shebs <stan@codesourcery.com>
13662 Pedro Alves <pedro@codesourcery.com>
13663
13664 * server.h (LONGEST): New.
13665 (struct thread_info) <while_stepping>: New field.
13666 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13667 Declare.
13668 (initialize_tracepoint, handle_tracepoint_general_set)
13669 (handle_tracepoint_query, tracepoint_finished_step)
13670 (tracepoint_was_hit, release_while_stepping_state_list):
13671 (current_traceframe): Declare.
13672 * server.c (handle_general_set): Handle tracepoint packets.
13673 (read_memory): New.
13674 (write_memory): New.
13675 (handle_search_memory_1): Use read_memory.
13676 (handle_query): Report support for conditional tracepoints, trace
13677 state variables, and tracepoint sources. Handle tracepoint
13678 queries.
13679 (main): Initialize the tracepoints module.
13680 (process_serial_event): Handle traceframe reads/writes.
13681
13682 * linux-low.c (handle_tracepoints): New.
13683 (linux_wait_1): Call it.
13684 (linux_resume_one_lwp): Handle while-stepping.
13685 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13686 (linux_target_ops): Install them.
13687 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13688 New field.
13689 * linux-x86-low.c (x86_supports_tracepoints): New.
13690 (the_low_target). Install it.
13691
13692 * mem-break.h (delete_breakpoint): Declare.
13693 * mem-break.c (delete_breakpoint): Make external.
13694
13695 * target.h (struct target_ops): Add `supports_tracepoints',
13696 `read_pc', and `write_pc' fields.
13697 (target_supports_tracepoints): Define.
13698 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13699 (phex_nz): New.
13700
13701 * regcache.h (struct regcache) <registers_owned>: New field.
13702 (init_register_cache, regcache_cpy): Declare.
13703 (regcache_read_pc, regcache_write_pc): Declare.
13704 (register_cache_size): Declare.
13705 (supply_regblock): Declare.
13706 * regcache.c (init_register_cache): New.
13707 (new_register_cache): Use it.
13708 (regcache_cpy): New.
13709 (register_cache_size): New.
13710 (supply_regblock): New.
13711 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13712
219f2f23
PA
13713 * tracepoint.c: New.
13714
13715 * Makefile.in (OBS): Add tracepoint.o.
13716 (tracepoint.o): New rule.
13717
3a13a53b
L
137182010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13719
13720 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13721 (i386-mmx.o): New.
13722 (i386-mmx.c): Likewise.
13723 (i386-mmx-linux.o): Likewise.
13724 (i386-mmx-linux.c): Likewise.
13725
13726 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13727 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13728 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13729 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13730
13731 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13732 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13733 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13734
1570b33e
L
137352010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13736
13737 * Makefile.in (clean): Updated.
13738 (i386-avx.o): New.
13739 (i386-avx.c): Likewise.
13740 (i386-avx-linux.o): Likewise.
13741 (i386-avx-linux.c): Likewise.
13742 (amd64-avx.o): Likewise.
13743 (amd64-avx.c): Likewise.
13744 (amd64-avx-linux.o): Likewise.
13745 (amd64-avx-linux.c): Likewise.
13746
13747 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13748 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13749 (srv_amd64_regobj): Add amd64-avx.o.
13750 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13751 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13752 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13753 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13754 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13755 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13756 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13757
13758 * i387-fp.c: Include "i386-xstate.h".
13759 (i387_xsave): New.
13760 (i387_cache_to_xsave): Likewise.
13761 (i387_xsave_to_cache): Likewise.
13762 (x86_xcr0): Likewise.
13763
13764 * i387-fp.h (i387_cache_to_xsave): Likewise.
13765 (i387_xsave_to_cache): Likewise.
13766 (x86_xcr0): Likewise.
13767
13768 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13769 * linux-crisv32-low.c (target_regsets): Likewise.
13770 * linux-m68k-low.c (target_regsets): Likewise.
13771 * linux-mips-low.c (target_regsets): Likewise.
13772 * linux-ppc-low.c (target_regsets): Likewise.
13773 * linux-s390-low.c (target_regsets): Likewise.
13774 * linux-sh-low.c (target_regsets): Likewise.
13775 * linux-sparc-low.c (target_regsets): Likewise.
13776 * linux-xtensa-low.c (target_regsets): Likewise.
13777
13778 * linux-low.c: Include <sys/uio.h>.
13779 (regsets_fetch_inferior_registers): Support nt_type.
13780 (regsets_store_inferior_registers): Likewise.
13781 (linux_process_qsupported): New.
13782 (linux_target_ops): Add linux_process_qsupported.
13783
13784 * linux-low.h (regset_info): Add nt_type.
13785 (linux_target_ops): Add process_qsupported.
13786
13787 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13788 and <sys/uio.h>.
13789 (init_registers_i386_avx_linux): New.
13790 (init_registers_amd64_avx_linux): Likewise.
13791 (xmltarget_i386_linux_no_xml): Likewise.
13792 (xmltarget_amd64_linux_no_xml): Likewise.
13793 (PTRACE_GETREGSET): Likewise.
13794 (PTRACE_SETREGSET): Likewise.
13795 (x86_fill_xstateregset): Likewise.
13796 (x86_store_xstateregset): Likewise.
13797 (use_xml): Likewise.
13798 (x86_linux_update_xmltarget): Likewise.
13799 (x86_linux_process_qsupported): Likewise.
13800 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13801 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13802 init_registers_i386_linux here. Call
13803 x86_linux_update_xmltarget.
13804 (the_low_target): Add x86_linux_process_qsupported.
13805
13806 * server.c (handle_query): Call target_process_qsupported.
13807
13808 * target.h (target_ops): Add process_qsupported.
13809 (target_process_qsupported): New.
13810
fc7238bb
PA
138112010-04-03 Pedro Alves <pedro@codesourcery.com>
13812
13813 * inferiors.c (add_thread): Set last_status kind to
13814 TARGET_WAITKIND_IGNORE.
13815 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13816 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13817 (linux_wait_1): Move `thread' local definition to block that uses
13818 it. Don't NULL initialize `event_child'.
13819 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13820 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13821 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13822
bdabb078
PA
138232010-04-01 Pedro Alves <pedro@codesourcery.com>
13824
13825 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13826 an extended waitstatus, or by a watchpoint.
13827 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13828 thread was stepping or has been stopped by a watchpoint.
13829
d3bbe7a0
PA
138302010-04-01 Pedro Alves <pedro@codesourcery.com>
13831
13832 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13833 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13834 of another, then delete the previous, and validate all
13835 breakpoints.
13836 (validate_inserted_breakpoint): New.
13837 (delete_disabled_breakpoints): New.
13838 (validate_breakpoints): New.
13839 (check_mem_read): Validate breakpoints before trusting their
13840 shadow. Delete disabled breakpoints.
13841 (check_mem_write): Validate breakpoints before trusting they
13842 should be inserted. Delete disabled breakpoints.
13843 * mem-break.h (validate_breakpoints):
13844 * server.c (handle_query): Validate breakpoints when we see a
13845 qSymbol query.
13846
8b07ae33
PA
138472010-04-01 Pedro Alves <pedro@codesourcery.com>
13848
13849 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13850 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13851 if we could tell there's a GDB breakpoint at stop_pc.
13852 (need_step_over_p): Don't do a step over if we find a GDB
13853 breakpoint at the resume PC.
13854
13855 * mem-break.c (struct raw_breakpoint): New.
13856 (enum bkpt_type): New type `gdb_breakpoint'.
13857 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13858 fields. New field `raw'.
13859 (find_raw_breakpoint_at): New.
13860 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13861 breakpoint instead.
13862 (set_breakpoint_at): Adjust.
13863 (delete_raw_breakpoint): New.
13864 (release_breakpoint): New.
13865 (delete_breakpoint): Rename to...
13866 (delete_breakpoint_1): ... this. Add proc parameter. Use
13867 release_breakpoint. Return ENOENT.
13868 (delete_breakpoint): Reimplement.
13869 (find_breakpoint_at): Delete.
13870 (find_gdb_breakpoint_at): New.
13871 (delete_breakpoint_at): Delete.
13872 (set_gdb_breakpoint_at): New.
13873 (delete_gdb_breakpoint_at): New.
13874 (gdb_breakpoint_here): New.
13875 (set_reinsert_breakpoint): Use release_breakpoint.
13876 (uninsert_breakpoint): Rename to ...
13877 (uninsert_raw_breakpoint): ... this.
13878 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13879 (reinsert_raw_breakpoint): Change parameter type to
13880 raw_breakpoint.
13881 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13882 instead.
13883 (check_breakpoints): Adjust. Use release_breakpoint.
13884 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13885 (breakpoint_inserted_here): Ditto.
13886 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13887 Don't trust the breakpoint's shadow if it is not inserted.
13888 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13889 (delete_all_breakpoints): Adjust.
13890 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13891 use delete_breakpoint_1.
13892
13893 * mem-break.h (breakpoints_supported): Delete declaration.
13894 (set_gdb_breakpoint_at): Declare.
13895 (gdb_breakpoint_here): Declare.
13896 (delete_breakpoint_at): Delete.
13897 (delete_gdb_breakpoint_at): Declare.
13898
13899 * server.h (struct raw_breakpoint): Forward declare.
13900 (struct process_info): New field `raw_breakpoints'.
13901
13902 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13903 breakpoints.
13904
6bf5e0ba
PA
139052010-03-24 Pedro Alves <pedro@codesourcery.com>
13906
13907 * linux-low.c (status_pending_p_callback): Fix comment.
13908 (linux_wait_for_event_1): Move most of the internal breakpoint
13909 handling from here...
13910 (linux_wait_1): ... to here.
13911 (count_events_callback): New.
13912 (select_singlestep_lwp_callback): New.
13913 (select_event_lwp_callback): New.
13914 (cancel_breakpoints_callback): New.
13915 (select_event_lwp): New.
13916 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13917 priority to all LWPs that have had events that should be reported
13918 to the client. Cancel breakpoints when about to reporting the
13919 event to the client, not while stopping lwps. No longer cancel
13920 finished single-steps here.
13921 (cancel_finished_single_step): Delete.
13922 (cancel_finished_single_steps): Delete.
13923
414a389f
PA
139242010-03-24 Pedro Alves <pedro@codesourcery.com>
13925
13926 * mem-break.c (enum bkpt_type): New.
13927 (struct breakpoint): New field `type'.
13928 (set_breakpoint_at): Change return type to struct breakpoint
13929 pointer. Set type to `other_breakpoint' by default.
13930 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13931 in the breakpoint list.
13932 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13933 (reinsert_breakpoint): Rename to ...
13934 (reinsert_raw_breakpoint): ... this.
13935 (reinsert_breakpoints_at): Adjust.
13936 * mem-break.h (struct breakpoint): Declare.
13937 (set_breakpoint_at): Change return type to struct breakpoint
13938 pointer.
13939
2280c721
PA
139402010-03-24 Pedro Alves <pedro@codesourcery.com>
13941
13942 * server.c (handle_query): Assign, not compare.
13943
d50171e4
PA
139442010-03-24 Pedro Alves <pedro@codesourcery.com>
13945
13946 Teach linux gdbserver to step-over-breakpoints.
13947
13948 * linux-low.c (can_hardware_single_step): New.
13949 (supports_breakpoints): New.
13950 (handle_extended_wait): If stopping threads, read the stop pc of
13951 the new cloned LWP.
13952 (get_pc): New.
13953 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13954 low target doesn't support retrieving the PC.
13955 (add_lwp): Set last_resume_kind to resume_continue.
13956 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13957 (linux_attach): Don't clear stop_expected. Set the lwp's
13958 last_resume_kind to resume_stop.
13959 (linux_detach_one_lwp): Don't check for removed breakpoints.
13960 (check_removed_breakpoint): Delete.
13961 (status_pending_p): Rename to ...
13962 (status_pending_p_callback): ... this. Don't check for removed
13963 breakpoints. Don't consider threads that are stopped from GDB's
13964 perspective.
13965 (linux_wait_for_lwp): Always read the stop_pc here.
13966 (cancel_breakpoint): New.
13967 (step_over_bkpt): New global.
13968 (linux_wait_for_event_1): Implement stepping over breakpoints.
13969 (gdb_wants_lwp_stopped): New.
13970 (gdb_wants_all_stopped): New.
13971 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13972 single-step traps here. Store the thread's last reported target
13973 wait status.
13974 (send_sigstop): Don't clear stop_expected. Always set it,
13975 instead.
13976 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13977 (cancel_finished_single_step): New.
13978 (cancel_finished_single_steps): New.
13979 (wait_for_sigstop): Don't cancel finished single-step traps here.
13980 (linux_resume_one_lwp): Don't check for removed breakpoints.
13981 Don't set `step' on non-hardware step archs.
13982 (linux_set_resume_request): Ignore resume_stop requests if already
13983 stopping or stopped. Set the lwp's last_resume_kind.
13984 (resume_status_pending_p): Don't check for removed breakpoints.
13985 (need_step_over_p): New.
13986 (start_step_over): New.
13987 (finish_step_over): New.
13988 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13989 requests. Clear the thread's last reported target waitstatus.
13990 Don't use the `suspended' flag. Don't consider pending breakpoints.
13991 (linux_resume): Start a step-over if necessary.
13992 (proceed_one_lwp): New.
13993 (proceed_all_lwps): New.
13994 (unstop_all_lwps): New.
13995 * linux-low.h (struct lwp_info): Rewrite comment for the
13996 `suspended' flag. Add the `stop_pc' field. Delete the
13997 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13998 Add `'last_resume_kind' and `need_step_over' fields.
13999 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14000 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14001 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14002 (set_raw_breakpoint_at): New.
14003 (set_breakpoint_at): Rewrite to use it.
14004 (reinsert_breakpoint_handler): Delete.
14005 (set_reinsert_breakpoint): New.
14006 (reinsert_breakpoint_by_bp): Delete.
14007 (delete_reinsert_breakpoints): New.
14008 (uninsert_breakpoint): Rewrite.
14009 (uninsert_breakpoints_at): New.
14010 (reinsert_breakpoint): Rewrite.
14011 (reinsert_breakpoints_at): New.
14012 (check_breakpoints): Rewrite.
14013 (breakpoint_here): New.
14014 (breakpoint_inserted_here): New.
14015 (check_mem_read): Adjust.
14016 * mem-break.h (breakpoints_supported, breakpoint_here)
14017 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14018 (reinsert_breakpoint_by_bp): Delete declaration.
14019 (delete_reinsert_breakpoints): Declare.
14020 (reinsert_breakpoint): Delete declaration.
14021 (reinsert_breakpoints_at): Declare.
14022 (uninsert_breakpoint): Delete declaration.
14023 (uninsert_breakpoints_at): Declare.
14024 (check_breakpoints): Adjust prototype.
14025 * server.h: Adjust include order.
14026 (struct thread_info): Declare here. Add a `last_status' field.
14027
30ba68cb
MS
140282010-03-23 Michael Snyder <msnyder@vmware.com>
14029
14030 * server.c (crc32): New function.
14031 (handle_query): Add handling for 'qCRC:' request.
14032
b9a881c2
PA
140332010-03-23 Pedro Alves <pedro@codesourcery.com>
14034
14035 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14036 lwp had been stopped by a watchpoint.
14037
e92d13d5
PA
140382010-03-16 Pedro Alves <pedro@codesourcery.com>
14039
14040 * server.h (internal_error): Declare.
14041 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14042 * utils.c (internal_error): New function.
14043
64daa791
AS
140442010-03-15 Andreas Schwab <schwab@redhat.com>
14045
14046 * configure.srv: Fix typo setting srv_regobj.
14047
f52cd8cd
PA
140482010-03-15 Pedro Alves <pedro@codesourcery.com>
14049
14050 * linux-low.c (fetch_register): Avoid passing a non string literal
14051 format to `error'.
14052 (usr_store_inferior_registers): Ditto.
14053
93ae6fdc
PA
140542010-03-14 Pedro Alves <pedro@codesourcery.com>
14055
14056 * linux-low.c (linux_write_memory): Bail out early if peeking
14057 memory failed.
14058
c3adc08c
PA
140592010-03-14 Pedro Alves <pedro@codesourcery.com>
14060
14061 * linux-low.h (struct lwp_info): New fields
14062 `stopped_by_watchpoint' and `stopped_data_address'.
14063 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14064 here, and cache them in the lwp object.
14065 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14066 directly.
14067 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14068 field.
14069 (linux_stopped_by_watchpoint): Rewrite.
14070 (linux_stopped_data_address): Rewrite.
14071
bce522a2
PA
140722010-03-06 Simo Melenius <simo.melenius@iki.fi>
14073
14074 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14075 switching the current inferior, not before.
14076
90884b2b
L
140772010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14078
14079 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14080 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14081 i386-linux.c and amd64-linux.c.
14082 (reg-i386.o): Removed.
14083 (reg-i386.c): Likewise.
14084 (reg-i386-linux.o): Likewise.
14085 (reg-i386-linux.c): Likewise.
14086 (reg-x86-64.o): Likewise.
14087 (reg-x86-64.c): Likewise.
14088 (reg-x86-64-linux.o): Likewise.
14089 (reg-x86-64-linux.c): Likewise.
14090 (i386.o): New.
14091 (i386.c): Likewise.
14092 (i386-linux.o): Likewise.
14093 (i386-linux.c): Likewise.
14094 (amd64.o): Likewise.
14095 (amd64.c): Likewise.
14096 (amd64-linux.o): Likewise.
14097 (amd64-linux.c): Likewise.
14098
14099 * configure.srv (srv_i386_regobj): New.
14100 (srv_i386_linux_regobj): Likewise.
14101 (srv_amd64_regobj): Likewise.
14102 (srv_amd64_linux_regobj): Likewise.
14103 (srv_i386_32bit_xmlfiles): Likewise.
14104 (srv_i386_64bit_xmlfiles): Likewise.
14105 (srv_i386_xmlfiles): Likewise.
14106 (srv_amd64_xmlfiles): Likewise.
14107 (srv_i386_linux_xmlfiles): Likewise.
14108 (srv_amd64_linux_xmlfiles): Likewise.
14109 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14110 srv_xmlfiles to $srv_i386_xmlfiles.
14111 (i[34567]86-*-mingw32ce*): Likewise.
14112 (i[34567]86-*-mingw*): Likewise.
14113 (i[34567]86-*-nto*): Likewise.
14114 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14115 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14116 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14117 (x86_64-*-linux*): Likewise.
14118
14119 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14120 (init_registers_amd64_linux): New.
14121 (x86_arch_setup): Replace init_registers_x86_64_linux with
14122 init_registers_amd64_linux.
14123
193f13e6
MK
141242010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14125
14126 * configure.ac: Check for libdl. If it is not available link against
14127 static libthread_db.
14128 * configure: Regenerate.
14129
85d721b8
PA
141302010-02-22 Pedro Alves <pedro@codesourcery.com>
14131
14132 PR9605
14133
14134 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14135 handing a read watchpoint.
14136 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14137
6076632b
DE
141382010-02-12 Doug Evans <dje@google.com>
14139
14140 * linux-low.c (linux_supports_tracefork_flag): Document.
14141 (linux_look_up_symbols): Add comment.
14142
3327ccf7
L
141432010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14144
14145 * regcache.c (supply_register): Clear regcache if buf is NULL.
14146
0718675c 141472010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14148 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14149
14150 * inferiors.c (find_inferior): Add function documentation.
14151 (unloaded_dll): Handle the case where the unloaded dll has not
14152 been previously registered in the dll list.
14153
177321bd
DJ
141542010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14155
14156 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14157 (thumb2_breakpoint): New.
14158 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14159
2b009048
DJ
141602010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14161
14162 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14163 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14164 breakpoints.
14165
3be029c7
PA
141662010-01-21 Pedro Alves <pedro@codesourcery.com>
14167
14168 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14169
18f5de3b
JK
141702010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14171
14172 * linux-s390-low.c (s390_collect_ptrace_register)
14173 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14174
3743bb4f
DE
141752010-01-21 Doug Evans <dje@google.com>
14176
14ce3065
DE
14177 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14178 (PTRACE_ARG4_TYPE): New macro.
14179 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14180 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14181 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14182 (usr_store_inferior_registers): Ditto.
14183 (linux_read_memory, linux_write_memory): Ditto.
14184 (linux_test_for_tracefork): Ditto.
14185
3743bb4f
DE
14186 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14187 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14188
8b315be5
PA
141892010-01-21 Pedro Alves <pedro@codesourcery.com>
14190
14191 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14192 target.
14193
85492558
PA
141942010-01-21 Pedro Alves <pedro@codesourcery.com>
14195
14196 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14197 prototype to take a regcache. Adjust.
14198
442ea881
PA
141992010-01-20 Pedro Alves <pedro@codesourcery.com>
14200
14201 * regcache.h (struct thread_info): Forward declare.
14202 (struct regcache): New.
14203 (new_register_cache): Adjust prototype.
14204 (get_thread_regcache): Declare.
14205 (free_register_cache): Adjust prototype.
14206 (registers_to_string, registers_from_string): Ditto.
14207 (supply_register, supply_register_by_name, collect_register)
14208 (collect_register_as_string, collect_register_by_name): Ditto.
14209 * regcache.c (struct inferior_regcache_data): Delete.
14210 (get_regcache): Rename to ...
14211 (get_thread_regcache): ... this. Adjust. Switch inferior before
14212 fetching registers.
14213 (regcache_invalidate_one): Adjust.
14214 (regcache_invalidate): Fix prototype.
14215 (new_register_cache): Return the new register cache.
14216 (free_register_cache): Change prototype.
14217 (realloc_register_cache): Adjust.
14218 (registers_to_string): Change prototype to take a regcache. Adjust.
14219 (registers_from_string): Ditto.
14220 (register_data): Ditto.
14221 (supply_register): Ditto.
14222 (supply_register_by_name): Ditto.
14223 (collect_register): Ditto.
14224 (collect_register_as_string): Ditto.
14225 (collect_register_by_name): Ditto.
14226 * server.c (process_serial_event): Adjust.
14227 * linux-low.h (regset_fill_func, regset_store_func): Change
14228 prototype.
14229 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14230 Change prototype.
14231 * linux-low.c (get_stop_pc): Adjust.
14232 (check_removed_breakpoint): Adjust.
14233 (linux_wait_for_event): Adjust.
14234 (linux_resume_one_lwp): Adjust.
14235 (fetch_register): Add regcache parameter. Adjust.
14236 (usr_store_inferior_registers): Ditto.
14237 (regsets_fetch_inferior_registers): Ditto.
14238 (regsets_store_inferior_registers): Ditto.
14239 (linux_fetch_registers, linux_store_registers): Ditto.
14240 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14241 regcache. Adjust.
43aaf8b6
PA
14242 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14243 Ditto.
442ea881
PA
14244 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14245 prototype to take a regcache.
14246 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14247 * remote-utils.c (convert_ascii_to_int, outreg)
14248 (prepare_resume_reply): Change prototype to take a regcache.
14249 Adjust.
14250 * target.h (struct target_ops) <fetch_registers, store_registers>:
14251 Change prototype to take a regcache.
14252 (fetch_inferior_registers, store_inferior_registers): Change
14253 prototype to take a regcache. Adjust.
14254 * proc-service.c (ps_lgetregs): Adjust.
14255 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14256 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14257 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14258 take a regcache. Adjust.
14259 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14260 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14261 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14262 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14263 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14264 (cris_cannot_fetch_register):
14265 (cris_breakpoint_at): Change prototype to take a regcache.
14266 Adjust.
14267 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14268 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14269 to take a regcache. Adjust.
14270 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14271 Adjust.
14272 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14273 take a regcache. Adjust.
14274 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14275 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14276 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14277 * linux-mips-low.c (mips_get_pc):
14278 (mips_set_pc): Change prototype to take a regcache. Adjust.
14279 (mips_reinsert_addr): Adjust.
14280 (mips_collect_register): Change prototype to take a regcache.
14281 Adjust.
14282 (mips_supply_register):
14283 (mips_collect_register_32bit, mips_supply_register_32bit)
14284 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14285 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14286 * linux-ppc-low.c (ppc_supply_ptrace_register)
14287 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14288 (parse_spufs_run): Adjust.
14289 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14290 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14291 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14292 take a regcache. Adjust.
14293 * linux-s390-low.c (s390_collect_ptrace_register)
14294 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14295 (s390_set_pc): Change prototype to take a regcache. Adjust.
14296 (s390_arch_setup): Adjust.
14297 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14298 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14299 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14300 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14301 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14302 regcache. Adjust.
14303 (sparc_breakpoint_at): Adjust.
14304 * linux-xtensa-low.c (xtensa_fill_gregset):
14305 (xtensa_store_gregset):
14306 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14307 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14308 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14309 prototype to take a regcache. Adjust.
14310 * win32-arm-low.c (arm_fetch_inferior_register)
14311 (arm_store_inferior_register): Change prototype to take a
14312 regcache. Adjust.
14313 * win32-i386-low.c (i386_fetch_inferior_register)
14314 (i386_store_inferior_register): Change prototype to take a
14315 regcache. Adjust.
14316 * win32-low.c (child_fetch_inferior_registers)
14317 (child_store_inferior_registers): Change prototype to take a
14318 regcache. Adjust.
14319 (win32_wait): Adjust.
14320 (win32_fetch_inferior_registers): Change prototype to take a
14321 regcache. Adjust.
14322 (win32_store_inferior_registers): Adjust.
14323 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14324 store_inferior_register>: Change prototype to take a regcache.
14325
60c3d7b0
DE
143262010-01-20 Doug Evans <dje@google.com>
14327
14328 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14329 #ifdef.
14330 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14331 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14332
dc146f7c
VP
143332010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14334
14335 * linux-low.c (linux_core_of_thread): New.
14336 (compare_ints, show_process, list_threads): New.
14337 (linux_qxfer_osdata): Report threads and cores.
14338 (linux_target_op): Register linux_core_of_thread.
14339 * remote-utils.c (prepare_resume_reply): Report the core.
14340 (buffer_xml_printf): Support %d specifier.
14341 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14342 New.
14343 (handle_query): Handle qXfer:threads. Announce availability
14344 thereof.
14345 * target.h (struct target_ops): New field core_of_thread.
14346
7803799a
UW
143472010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14348
14349 * Makefile.in (clean): Remove new generated files.
14350 (reg-s390.o, reg-s390.c): Remove rules.
14351 (reg-s390x.o, reg-s390x.c): Likewise.
14352 (s390-linux32.o, s390-linux32.c): Add rules.
14353 (s390-linux64.o, s390-linux64.c): Likewise.
14354 (s390x-linux64.o, s390x-linux64.c): Likewise.
14355 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14356 * linux-s390-low.c: Include <elf.h>.
14357 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14358 (init_registers_s390): Remove prototype.
14359 (init_registers_s390x): Likewise.
14360 (init_registers_s390_linux32): Add prototype.
14361 (init_registers_s390_linux64): Likewise.
14362 (init_registers_s390x_linux64): Likewise.
14363 (s390_num_regs_3264): New define.
14364 (s390_regmap_3264): New global variable.
14365 (s390_cannot_fetch_register): Remove obsolete check.
14366 (s390_cannot_store_register): Likewise.
14367 (s390_collect_ptrace_register): Handle upper/lower register halves.
14368 (s390_supply_ptrace_register): Likewise.
14369 (s390_fill_gregset): Update to register number changes.
14370 (s390_get_hwcap): New routine.
14371 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14372 Install appropriate regmap and register set.
14373
6e7ffa39
JB
143742010-01-01 Joel Brobecker <brobecker@adacore.com>
14375
14376 * server.c (gdbserver_version): Update copyright year to 2010.
14377 * gdbreplay.c (gdbreplay_version): Likewise.
14378
957f3f49
DE
143792009-12-28 Doug Evans <dje@google.com>
14380
14381 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14382 elf/external.h. Include <elf.h> instead but only if necessary.
14383
ca5c370d
PA
143842009-12-28 Pedro Alves <pedro@codesourcery.com>
14385
14386 * linux-low.c (linux_remove_process): Remove `detaching'
14387 parameter. Don't release/detach from thread_db here.
14388 (linux_kill): Release/detach from thread_db here, ...
14389 (linux_detach): ... and here, before actually detaching.
14390 (linux_wait_1): ... and here, when a process exits.
14391 * thread-db.c (any_thread_of): New.
14392 (thread_db_free): Switch the current inferior to a thread of the
14393 passed in process.
14394
4ee62156
DE
143952009-12-21 Doug Evans <dje@google.com>
14396
d90e6a88
DE
14397 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14398
c5f62d5f
DE
14399 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14400 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14401 warning ifndef __NR_tkill. Move setting of errno there too.
14402 Delete unnecessary resetting of errno after syscall.
14403 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14404
10e86dd7
DE
14405 * configure.ac: Check for dladdr.
14406 * config.in: Regenerate.
14407 * configure: Regenerate.
14408 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14409 (try_thread_db_load): Update.
14410
4ee62156
DE
14411 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14412
00f515da
DE
144132009-12-18 Doug Evans <dje@google.com>
14414
e9464885
DE
14415 * event-loop.c: Include unistd.h if it exists.
14416
07d4f67e
DE
14417 * linux-low.c (my_waitpid): Move definition away from being in
14418 between linux_tracefork_child/linux_test_for_tracefork.
14419
00f515da
DE
14420 * gdb_proc_service.h (psaddr_t): Fix type.
14421 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14422 signature to match glibc.
14423
1de1badb
DE
144242009-12-16 Doug Evans <dje@google.com>
14425
14426 * linux-low.c (linux_read_memory): Fix argument to read.
14427
aeeb81d1
PA
144282009-11-26 Pedro Alves <pedro@codesourcery.com>
14429
14430 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14431 events, don't leave current_inferior pointing at null.
14432
10357975
PA
144332009-11-26 Pedro Alves <pedro@codesourcery.com>
14434
14435 * win32-low.c (LOG): Delete.
14436 (OUTMSG): Output to stderr.
14437 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14438 on compile time LOG macro.
14439 (win32_wait): Fix debug output.
14440
cf6e3471
PA
144412009-11-26 Pedro Alves <pedro@codesourcery.com>
14442
14443 * win32-low.c (win32_add_one_solib): If the dll name is
14444 "ntdll.dll", prepend the system directory to the dll path.
14445
0c85e18e
MK
144462009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14447
14448 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14449
9ac544ce 144502009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14451 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14452
14453 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14454 * configure.ac: Check for __mcoldfire__ and set
14455 gdb_cv_m68k_is_coldfire.
14456 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14457 reg-cf.o and reg-m68k.o.
14458 * configure: Regenerated.
14459
fd7dd3e6
PA
144602009-11-16 Pedro Alves <pedro@codesourcery.com>
14461
14462 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14463 Pass it to thread_db_free.
14464 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14465 proper `detaching' argument to linux_remove_process.
14466 * linux-low.h (thread_db_free): Add `detaching' parameter.
14467 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14468 to thread_db_free.
14469 (thread_db_free): Add `detaching' parameter. Only
14470 call td_ta_clear_event if detaching from process.
14471
75aa492e
MK
144722009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14473
14474 * thread-db.c (thread_db_free): Fix typo.
14475
21e1bee4
PP
144762009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14477
14478 PR gdb/10838
14479 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14480
8838b45e
NS
144812009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14482
14483 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14484 with an i686 compiler.
14485 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14486 needed.
14487 * configure: Rebuilt.
14488
8a35fb51
SL
144892009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14490
14491 PR gdb/10783
14492
14493 * server.c (handle_search_memory_1): Correct read_addr initialization
14494 in loop for searching subsequent chunks.
14495
96f15937
PP
144962009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14497
14498 * configure.ac: New --with-libthread-db option.
14499 * thread-db.c: Allow direct dependence on libthread_db.
14500 (thread_db_free): Adjust.
14501 * config.in: Regenerate.
14502 * configure: Likewise.
889bf7c5 14503
5f7d1694
PP
145042009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14505
14506 PR gdb/10757
14507 * thread-db.c (attach_thread): New function.
14508 (maybe_attach_thread): Return success/failure.
14509 (find_new_threads_callback): Adjust.
889bf7c5
PA
14510 (thread_db_find_new_threads): Loop until no new threads.
14511
88e3b899
PA
145122009-10-13 Pedro Alves <pedro@codesourcery.com>
14513
14514 * proc-service.c (ps_lgetregs): Formatting.
14515
cdbfd419
PP
145162009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14517
14518 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14519 * configure.ac: Adjust.
14520 * linux-low.h (struct process_info_private): Move members to struct
14521 thread_db.
14522 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14523 * linux-low.c (linux_remove_process): Adjust.
14524 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14525 * server.c (handle_query): Move code ...
14526 (handle_monitor_command): ... here. New function.
14527 * target.h (struct target_ops): New member.
14528 * thread-db.c (struct thread_db): New.
14529 (libthread_db_search_path): New variable.
14530 (thread_db_create_event, thread_db_enable_reporting)
14531 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14532 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14533 (try_thread_db_load_1, dladdr_to_soname): New functions.
14534 (try_thread_db_load, thread_db_load_search): New functions.
14535 (thread_db_init): Search for libthread_db.
14536 (thread_db_free): New function.
14537 (thread_db_handle_monitor_command): Likewise.
14538 * config.in: Regenerate.
14539 * configure: Regenerate.
889bf7c5 14540
4168d2d6
UW
145412009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14542
14543 * spu-low.c (spu_kill): Wait for inferior to terminate.
14544 Call clear_inferiors.
14545 (spu_detach): Call clear_inferiors.
14546
81ecdfbb
RW
145472009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14548
14549 * aclocal.m4: Regenerate.
14550 * config.in: Likewise.
14551 * configure: Likewise.
14552
0b9ff2c0
UW
145532009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14554
14555 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14556 (parse_spufs_run): New function.
14557 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14558 (ppc_breakpoint_at): Handle SPU breakpoints.
14559
efcbbd14
UW
145602009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14561
14562 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14563 (SPUFS_MAGIC): Define.
14564 (spu_enumerate_spu_ids): New function.
14565 (linux_qxfer_spu): New function.
14566 (linux_target_ops): Install linux_qxfer_spu.
14567
f4d9bade
UW
145682009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14569
14570 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14571 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14572 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14573 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14574 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14575 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14576 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14577 (init_registers_powerpc_cell32l): Add prototype.
14578 (init_registers_powerpc_cell64l): Likewise.
14579 (ppc_arch_setup): Detect Cell/B.E. architecture.
14580
96e946ca
RW
145812009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14582
14583 * Makefile.in (datarootdir): New variable.
14584
58d6951d
DJ
145852009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14586
14587 * linux-low.c (linux_write_memory): Update debugging output.
14588 * Makefile.in (clean): Add new descriptions.
14589 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14590 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14591 * configure.srv: Add new files for arm*-*-linux*.
14592 * linux-arm-low.c: Add new declarations.
14593 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14594 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14595 (HWCAP_VFPv3D16): New.
14596 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14597 instead of __IWMMXT__.
14598 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14599 (arm_arch_setup): New.
14600 (target_regsets): Remove #ifdef. Add VFP regset.
14601 (the_low_target): Use arm_arch_setup.
14602
12b42a12
DJ
146032009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14604
14605 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14606 the main thread again.
14607
ac8c974e
AR
146082009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14609
14610 Adding Neutrino gdbserver.
14611 * configure: Regenerated.
14612 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14613 * configure.srv (i[34567]86-*-nto*): New target.
14614 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14615 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14616 (nto_comctrl) [__QNX__]: New function.
14617 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14618
4424e0c3 146192009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14620
14621 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14622 srv_tgtobj.
14623
912cf4ba
PA
146242009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14625 Pedro Alves <pedro@codesourcery.com>
14626
14627 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14628 don't support CONTEXT_EXTENDED_REGISTERS.
14629 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14630 (the_low_target): Install them.
14631 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14632 failing with ERROR_PIPE_NOT_CONNECTED.
14633
aa5ca48f
DE
146342009-06-30 Doug Evans <dje@google.com>
14635 Pierre Muller <muller@ics.u-strasbg.fr>
14636
14637 Add h/w watchpoint support to x86-linux, win32-i386.
14638 * Makefile.in (SFILES): Add i386-low.c
14639 (i386_low_h): Define.
14640 (i386-low.o): Add dependencies.
14641 (linux-x86-low.o): Add i386-low.h dependency.
14642 (win32-i386-low.o): Ditto.
14643 * i386-low.c: New file.
14644 * i386-low.h: New file.
14645 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14646 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14647 * linux-low.c (linux_add_process): Initialize arch_private.
14648 (linux_remove_process): Free arch_private.
14649 (add_lwp): Initialize arch_private.
14650 (delete_lwp): Free arch_private.
14651 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14652 provided.
14653 * linux-low.h (process_info_private): New member arch_private.
14654 (lwp_info): New member arch_private.
14655 (linux_target_ops): New members new_process, new_thread,
14656 prepare_to_resume.
14657 (ptid_of): New macro.
14658 * linux-x86-low.c: Include stddef.h, i386-low.h.
14659 (arch_process_info): New struct.
14660 (arch_lwp_info): New struct.
14661 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14662 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14663 (i386_dr_low_get_status): New function.
14664 (x86_insert_point, x86_remove_point): New functions.
14665 (x86_stopped_by_watchpoint): New function.
14666 (x86_stopped_data_address): New function.
14667 (x86_linux_new_process, x86_linux_new_thread): New functions.
14668 (x86_linux_prepare_to_resume): New function.
14669 (the_low_target): Add entries for insert_point, remove_point,
14670 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14671 prepare_to_resume.
14672 * server.c (debug_hw_points): New global.
14673 (monitor_show_help): Document set debug-hw-points.
14674 (handle_query): Process "set debug-hw-points".
14675 * server.h (debug_hw_points): Declare.
14676 (paddress): Declare.
14677 * utils.c (NUMCELLS, CELLSIZE): New macros.
14678 (get_sell, xsnprintf, paddress): New functions.
14679 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14680 remove_point, stopped_by_watchpoint, stopped_data_address.
14681 * win32-i386-low.c: Include i386-low.h.
14682 (debug_reg_state): Replaces dr.
14683 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14684 (i386_dr_low_get_status): New function.
14685 (i386_insert_point, i386_remove_point): New functions.
14686 (i386_stopped_by_watchpoint): New function.
14687 (i386_stopped_data_address): New function.
14688 (i386_initial_stuff): Update.
14689 (get_thread_context,set_thread_context,i386_thread_added): Update.
14690 (the_low_target): Add entries for insert_point,
14691 remove_point, stopped_by_watchpoint, stopped_data_address.
14692 * win32-low.c (win32_insert_watchpoint): New function.
14693 (win32_remove_watchpoint): New function.
14694 (win32_stopped_by_watchpoint): New function.
14695 (win32_stopped_data_address): New function.
14696 (win32_target_ops): Add entries for insert_watchpoint,
14697 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14698 * win32-low.h (win32_target_ops): New members insert_point,
14699 remove_point, stopped_by_watchpoint, stopped_data_address.
14700
d993e290
PA
147012009-06-25 Pedro Alves <pedro@codesourcery.com>
14702
14703 * server.c (process_serial_event): Re-return unsupported, not
14704 error, if the type isn't recognized. Re-allow supporting only
14705 insert or remove packets. Also call require_running for
14706 breakpoints. Add missing break statement to default case. Tidy.
14707 * target.h (struct target_ops): Rename insert_watchpoint to
14708 insert_point, and remove_watchpoint to remove_point.
14709
14710 * linux-low.h (struct linux_target_ops): Likewise.
14711 * linux-low.c (linux_insert_watchpoint): Rename to ...
14712 (linux_insert_point): ... this. Adjust.
14713 (linux_remove_watchpoint): Rename to ...
14714 (linux_remove_point): ... this. Adjust.
14715 (linux_target_ops): Adjust.
14716 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14717 (cris_insert_point): ... this.
14718 (cris_remove_watchpoint): Rename to ...
14719 (cris_remove_point): ... this.
14720 (the_low_target): Adjust.
14721
0f54c268
PM
147222009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14723
14724 * server.c (handle_v_kill): Pass signal_pid to
14725 kill_inferior if multi_process is zero.
14726
c6314022
AR
147272009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14728
14729 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14730 * target.h (target_ops): Comment for *_watchpoint to make it clear
14731 the functions can get types '0' and '1'.
14732
4463ce24
AR
147332009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14734
14735 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14736 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14737 * regcache.c (get_regcache): Likewise.
14738 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14739 * win32-low.c (child_fetch_inferior_registers): Remove check for
14740 regno 0.
14741
cf8fd78b
PA
147422009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14743 Pedro Alves <pedro@codesourcery.com>
14744
14745 * target.h (struct target_ops) <supports_multi_process>: New
14746 callback.
14747 (target_supports_multi_process): New.
14748 * server.c (handle_query): Even if GDB reports support, only
14749 enable multi-process if the target also supports it. Report
14750 multi-process support only if the target backend supports it.
14751 * linux-low.c (linux_supports_multi_process): New function.
14752 (linux_target_ops): Install it as target_supports_multi_process
14753 callback.
14754
47c0c975
DE
147552009-05-24 Doug Evans <dje@google.com>
14756
e09875d4
DE
14757 Global renaming of find_thread_pid to find_thread_ptid.
14758 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14759 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14760 All callers updated.
14761
e27d73f6
DE
14762 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14763 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14764 directly.
14765
47c0c975
DE
14766 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14767 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14768 (linux_resume_one_lwp): Ditto.
14769
2acc282a
DE
147702009-05-23 Doug Evans <dje@google.com>
14771
14772 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14773 from struct inferior_list_entry * to struct lwp_info *.
14774 All callers updated.
14775
9f1036c1
DE
147762009-05-13 Doug Evans <dje@google.com>
14777
14778 * linux-x86-low.c: Don't include assert.h.
14779 (x86_siginfo_fixup): Use fatal, not assert.
14780 (x86_arch_setup): Fix comment.
14781
d0722149
DE
147822009-05-12 Doug Evans <dje@google.com>
14783
14784 Biarch support for i386/amd64 gdbserver.
14785 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14786 Add linux-x86-low.c.
14787 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14788 (linux-x86-low.o): Add.
14789 * linux-x86-64-low.c: Delete.
14790 * linux-i386-low.c: Delete.
14791 * linux-x86-low.c: New file.
14792 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14793 linux-x86-low.o.
14794 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14795 linux-x86-low.o.
14796 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14797 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14798 (linux_child_pid_to_exec_file): New function.
14799 (elf_64_header_p, elf_64_file_p): New functions.
14800 (siginfo_fixup): New function.
14801 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14802 give target a chance to convert layout.
14803 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14804 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14805
fdeb2a12
DE
148062009-05-07 Doug Evans <dje@google.com>
14807
14808 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14809 (regsets_store_inferior_registers): Ditto.
14810
a6dbe5df
PA
148112009-05-06 Pedro Alves <pedro@codesourcery.com>
14812
14813 PR server/10048
14814
14815 * linux-low.c (must_set_ptrace_flags): Delete.
14816 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14817 of the global.
14818 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14819 `lwp->must_set_ptrace_flags' instead.
ba42693b 14820 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14821 (linux_wait_1): ... not here.
14822
5091eb23
DE
148232009-04-30 Doug Evans <dje@google.com>
14824
9f767825
DE
14825 * inferiors.c (started_inferior_callback): New function.
14826 (attached_inferior_callback): New function.
14827 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14828 * server.c (print_started_pid, print_attached_pid): New functions.
14829 (detach_or_kill_for_exit): New function.
14830 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14831 * server.h (have_started_inferiors_p): Declare.
14832 (have_attached_inferiors_p): Declare.
14833
5091eb23
DE
14834 * inferiors.c (remove_process): Fix memory leak, free process.
14835 * linux-low.c (linux_remove_process): New function.
14836 (linux_kill): Call it instead of remove_process.
14837 (linux_detach, linux_wait_1): Ditto.
14838
155c8968
PA
148392009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14840
14841 * configure.srv: Add x86 Windows CE target.
14842
7fe519cb
UW
148432009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14844
14845 * inferiors.c (get_thread_process): Make global.
14846 * server.h (get_thread_process): Add prototype.
14847 * thread-db.c (find_one_thread): Use get_thread_process
14848 instead of current_process.
14849 (thread_db_get_tls_address): Do not crash if called when
14850 thread layer is not yet initialized.
14851
5472f405
UW
148522009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14853
14854 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14855 * spu-low.c (current_tid): Rename to ...
14856 (current_ptid): ... this.
14857 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14858 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14859 ptid_get_lwp (current_ptid) instead of current_tid.
14860 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14861 instead of current_tid. Use find_process_pid to verify pid
14862 argument is valid. Pass proper argument to remove_process.
14863 (spu_thread_alive): Compare current_ptid instead of current_tid.
14864 (spu_resume): Likewise.
14865
55ac2b99
PA
148662009-04-02 Pedro Alves <pedro@codesourcery.com>
14867
14868 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14869 variable.
14870
95954743
PA
148712009-04-01 Pedro Alves <pedro@codesourcery.com>
14872
14873 Implement the multiprocess extensions, and add linux multiprocess
14874 support.
14875
14876 * server.h (ULONGEST): Declare.
14877 (struct ptid, ptid_t): New.
14878 (minus_one_ptid, null_ptid): Declare.
14879 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14880 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14881 (struct inferior_list_entry): Change `id' type from unsigned from
14882 to ptid_t.
14883 (struct sym_cache, struct breakpoint, struct
14884 process_info_private): Forward declare.
14885 (struct process_info): Declare.
14886 (current_process): Declare.
14887 (all_processes): Declare.
14888 (initialize_inferiors): Declare.
14889 (add_thread): Adjust to use ptid_t.
14890 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14891 (add_process, remove_process, find_thread_pid): Declare.
14892 (find_inferior_id): Adjust to use ptid_t.
14893 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14894 (multi_process): Declare.
14895 (push_event): Adjust to use ptid_t.
14896 (read_ptid, write_ptid): Declare.
14897 (prepare_resume_reply): Adjust to use ptid_t.
14898 (clear_symbol_cache): Declare.
14899 * inferiors.c (all_processes): New.
14900 (null_ptid, minus_one_ptid): New.
14901 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14902 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14903 (add_thread): Change unsigned long to ptid. Remove gdb_id
14904 parameter. Adjust.
14905 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14906 (gdb_id_to_thread): Rename to ...
14907 (find_thread_pid): ... this. Change unsigned long to ptid.
14908 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14909 (loaded_dll, pull_pid_from_list): Adjust.
14910 (add_process, remove_process, find_process_pid)
14911 (get_thread_process, current_process, initialize_inferiors): New.
14912 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14913 (struct target_waitstatus) <related_pid>: Ditto.
14914 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14915 return type to int.
14916 (struct target_ops) <join>: Add `pid' argument.
14917 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14918 (struct target_ops) <wait>: Add `ptid' field. Change return type
14919 to ptid.
14920 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14921 (mywait): Add `ptid' argument. Change return type to ptid_t.
14922 (target_pid_to_str): Declare.
14923 * target.c (set_desired_inferior): Adjust to use ptids.
14924 (mywait): Add new `ptid' argument. Adjust.
14925 (target_pid_to_str): New.
14926 * mem-break.h (free_all_breakpoints): Declare.
14927 * mem-break.c (breakpoints): Delelete.
14928 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14929 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14930 to use per-process breakpoint list.
14931 (free_all_breakpoints): New.
14932 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14933 (symbol_cache, all_symbols_looked_up): Delete.
14934 (hexchars): New.
14935 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14936 read_ptid): New.
14937 (prepare_resume_reply): Change ptid argument's type from unsigned
14938 long to ptid_t. Adjust. Implement W;process and X;process.
14939 (free_sym_cache, clear_symbol_cache): New.
14940 (look_up_one_symbol): Adjust to per-process symbol cache. *
14941 * server.c (cont_thread, general_thread, step_thread): Change type
14942 to ptid_t.
14943 (attached): Delete.
14944 (multi_process): New.
14945 (last_ptid): Change type to ptid_t.
14946 (struct vstop_notif) <ptid>: Change type to ptid_t.
14947 (queue_stop_reply, push_event): Change `ptid' argument's type to
14948 ptid_t.
14949 (discard_queued_stop_replies): Add `pid' argument.
14950 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14951 changes. Don't reference the `attached' global.
14952 (attach_inferior): Adjust to mywait interface changes.
14953 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14954 features. Handle and report "multiprocess+". Handle
14955 "qAttached:PID".
14956 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14957 changes.
14958 (handle_v_kill): New.
14959 (handle_v_stopped): Adjust to use target_pid_to_str.
14960 (handle_v_requests): Allow multiple attaches and runs when
14961 multiprocess extensions are in effect. Handle "vKill".
14962 (myresume): Adjust to use ptids.
14963 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14964 (handle_status): Adjust to discard_queued_stop_replies interface
14965 change.
14966 (first_thread_of, kill_inferior_callback)
14967 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14968 (main): Call initialize_inferiors. Adjust to use ptids, killing
14969 and detaching from all inferiors. Handle multiprocess packet
14970 variants.
14971 * linux-low.h: Include gdb_proc_service.h.
14972 (struct process_info_private): New.
14973 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14974 <lwpid_of>: Use ptid_get_lwp.
14975 (get_lwp_thread): Adjust.
14976 (struct lwp_info): Add `dead' member.
14977 (find_lwp_pid): Declare.
14978 * linux-low.c (thread_db_active): Delete.
14979 (new_inferior): Adjust comment.
14980 (inferior_pid): Delete.
14981 (linux_add_process): New.
14982 (handle_extended_wait): Adjust.
14983 (add_lwp): Change unsigned long to ptid.
14984 (linux_create_inferior): Add process to processes table. Adjust
14985 to use ptids. Don't set new_inferior here.
14986 (linux_attach_lwp): Rename to ...
14987 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14988 it. Adjust to use ptids.
14989 (linux_attach_lwp): New.
14990 (linux_attach): Add process to processes table. Don't set
14991 new_inferior here.
14992 (struct counter): New.
14993 (second_thread_of_pid_p, last_thread_of_process_p): New.
14994 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14995 multiple processes.
14996 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14997 processes. Remove process from process table.
14998 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14999 to multiple processes.
15000 (any_thread_of): New.
15001 (linux_detach): Add `pid' argument, and handle it. Remove process
15002 from processes table.
15003 (linux_join): Add `pid' argument. Handle it.
15004 (linux_thread_alive): Change unsighed long argument to ptid_t.
15005 Consider dead lwps as not being alive.
15006 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15007 threads we're not interested in.
15008 (same_lwp, find_lwp_pid): New.
15009 (linux_wait_for_lwp): Change `pid' argument's type from int to
15010 ptid_t. Adjust.
15011 (linux_wait_for_event): Rename to ...
15012 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15013 from int to ptid_t. Adjust.
15014 (linux_wait_for_event): New.
15015 (linux_wait_1): Add `ptid' argument. Change return type to
15016 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15017 that exit from the process table.
15018 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15019 Adjust.
15020 (mark_lwp_dead): New.
15021 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15022 stopping all threads, mark its main lwp as dead.
15023 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15024 ptids.
15025 (fetch_register, usr_store_inferior_registers)
15026 (regsets_fetch_inferior_registers)
15027 (regsets_store_inferior_registers, linux_read_memory)
15028 (linux_write_memory): Inline `inferior_pid'.
15029 (linux_look_up_symbols): Adjust to use per-process
15030 `thread_db_active'.
15031 (linux_request_interrupt): Adjust to use ptids.
15032 (linux_read_auxv): Inline `inferior_pid'.
15033 (initialize_low): Don't reference thread_db_active.
15034 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15035 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15036 (ps_getpid): Return the pid of the current inferior.
15037 * thread-db.c (proc_handle, thread_agent): Delete.
15038 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15039 per-process data.
15040 (find_one_thread): Change argument type to ptid_t. Adjust to
15041 per-process data.
15042 (maybe_attach_thread): Adjust to per-process data and ptids.
15043 (thread_db_find_new_threads): Ditto.
15044 (thread_db_init): Ditto.
15045 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15046 processes table. Adjust to use ptids.
15047 (spu_kill, spu_detach): Adjust interface. Remove process from
15048 processes table.
15049 (spu_join, spu_thread_alive): Adjust interface.
15050 (spu_wait): Adjust interface. Remove process from processes
15051 table. Adjust to use ptids.
15052 * win32-low.c (current_inferior_tid): Delete.
15053 (current_inferior_ptid): New.
15054 (debug_event_ptid): New.
15055 (thread_rec): Take a ptid. Adjust.
15056 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15057 (child_delete_thread): Ditto.
15058 (do_initial_child_stuff): Add `attached' argument. Add process to
15059 processes table.
15060 (child_fetch_inferior_registers, child_store_inferior_registers):
15061 Adjust.
15062 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15063 (win32_attach): Pass 1 to do_initial_child_stuff.
15064 (win32_kill): Adjust interface. Remove process from processes
15065 table.
15066 (win32_detach): Ditto.
15067 (win32_join): Adjust interface.
15068 (win32_thread_alive): Take a ptid.
15069 (win32_resume): Adjust to use ptids.
15070 (get_child_debug_event): Ditto.
15071 (win32_wait): Adjust interface. Remove exiting process from
15072 processes table.
15073
bd99dc85
PA
150742009-04-01 Pedro Alves <pedro@codesourcery.com>
15075
15076 Non-stop mode support.
15077
15078 * server.h (non_stop): Declare.
15079 (gdb_client_data, handler_func): Declare.
15080 (delete_file_handler, add_file_handler, start_event_loop):
15081 Declare.
15082 (handle_serial_event, handle_target_event, push_event)
15083 (putpkt_notif): Declare.
15084 * target.h (enum resume_kind): New.
15085 (struct thread_resume): Replace `step' field by `kind' field.
15086 (TARGET_WNOHANG): Define.
15087 (struct target_ops) <wait>: Add `options' argument.
15088 <supports_non_stop, async, start_non_stop>: New fields.
15089 (target_supports_non_stop, target_async): New.
15090 (start_non_stop): Declare.
15091 (mywait): Add `options' argument.
15092 * target.c (mywait): Add `options' argument. Print child exit
15093 notifications here.
15094 (start_non_stop): New.
15095 * server.c (non_stop, own_buf, mem_buf): New globals.
15096 (struct vstop_notif): New.
15097 (notif_queue): New global.
15098 (queue_stop_reply, push_event, discard_queued_stop_replies)
15099 (send_next_stop_reply): New.
15100 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15101 interface changes.
15102 (attach_inferior): In non-stop mode, don't wait for the target
15103 here.
15104 (handle_general_set): Handle QNonStop.
15105 (handle_query): When handling qC, return the current general
15106 thread, instead of the first thread of the list.
15107 (handle_query): If the backend supports non-stop mode, include
15108 QNonStop+ in the qSupported query response.
15109 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15110 and non-stop mode.
15111 (handle_v_attach, handle_v_run): Handle non-stop mode.
15112 (handle_v_stopped): New.
15113 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15114 (myresume): Adjust to use resume_kind. Handle non-stop.
15115 (queue_stop_reply_callback): New.
15116 (handle_status): Handle non-stop mode.
15117 (main): Clear non_stop flag on reconnection. Use the event-loop.
15118 Refactor serial protocol handling from here ...
15119 (process_serial_event): ... to this new function. When GDB
15120 selects any thread, select one here. In non-stop mode, wait until
15121 GDB acks all pending events before exiting.
15122 (handle_serial_event, handle_target_event): New.
15123 * remote-utils.c (remote_open): Install remote_desc in the event
15124 loop.
15125 (remote_close): Remove remote_desc from the event loop.
15126 (putpkt_binary): Rename to...
15127 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15128 (putpkt_binary): New as wrapper around putpkt_binary_1.
15129 (putpkt_notif): New.
15130 (prepare_resume_reply): In non-stop mode, don't change the
15131 general_thread.
15132 * event-loop.c: New.
15133 * Makefile.in (OBJ): Add event-loop.o.
15134 (event-loop.o): New rule.
15135
15136 * linux-low.h (pid_of): Moved here.
15137 (lwpid_of): New.
15138 (get_lwp_thread): Use lwpid_of.
15139 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15140 * linux-low.c (pid_of): Delete.
15141 (inferior_pid): Use lwpid_of.
15142 (linux_event_pipe): New.
15143 (target_is_async_p): New.
15144 (delete_lwp): New.
15145 (handle_extended_wait): Use lwpid_of.
15146 (add_lwp): Don't set lwpid field.
15147 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15148 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15149 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15150 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15151 first. Adjust to linux_wait_for_event interface changes. Use
15152 lwpid_of.
15153 (linux_detach): Don't delete the main lwp here.
15154 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15155 (status_pending_p): Don't consider explicitly suspended lwps.
15156 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15157 pointer. Add OPTIONS argument. Change return type to int. Use
15158 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15159 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15160 pointer. Add status pointer argument. Return a pid instead of a
15161 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15162 changes. In non-stop mode, don't switch to a random thread.
15163 (linux_wait): Rename to...
15164 (linux_wait_1): ... this. Add target_options argument, and handle
15165 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15166 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15167 clean exit and signal exit code. Don't stop all threads in
15168 non-stop mode. In all-stop mode, only stop all threads when
15169 reporting a stop to GDB. Handle explicit thread stop requests.
15170 (async_file_flush, async_file_mark): New.
15171 (linux_wait): New.
15172 (send_sigstop): Use lwpid_of.
15173 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15174 interface changes. In non-stop mode, don't switch to a random
15175 thread.
15176 (linux_resume_one_lwp): Use lwpid_of.
15177 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15178 (linux_resume_one_thread): ... this. Handle resume_stop. In
15179 non-stop mode, don't look for pending flag in all threads.
15180 (resume_status_pending_p): Don't consider explicitly suspended
15181 threads.
15182 (my_waitpid): Reimplement. Emulate __WALL.
15183 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15184 Use lwpid_of.
15185 (sigchld_handler, linux_supports_non_stop, linux_async)
15186 (linux_start_non_stop): New.
15187 (linux_target_ops): Register linux_supports_non_stop, linux_async
15188 and linux_start_non_stop.
15189 (initialize_low): Install SIGCHLD handler.
15190 * thread-db.c (thread_db_create_event, find_one_thread)
15191 (thread_db_get_tls_address): Use lwpid_of.
15192 * win32-low.c (win32_detach): Adjust to use resume_kind.
15193 (win32_wait): Add `options' argument.
15194 * spu-low.c (spu_resume): Adjust to use resume_kind.
15195 (spu_wait): Add `options' argument.
15196
5b1c542e
PA
151972009-04-01 Pedro Alves <pedro@codesourcery.com>
15198
15199 Decouple target code from remote protocol.
15200
15201 * target.h (enum target_waitkind): New.
15202 (struct target_waitstatus): New.
15203 (struct target_ops) <wait>: Return an unsigned long. Take a
15204 target_waitstatus pointer instead of a char pointer.
15205 (mywait): Likewise.
15206 * target.c (mywait): Change prototype to return an unsigned long.
15207 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15208 * server.h (thread_from_wait, old_thread_from_wait): Delete
15209 declarations.
15210 (prepare_resume_reply): Change prototype to take a
15211 target_waitstatus.
15212 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15213 (last_status, last_ptid): New.
15214 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15215 pid instead of a signal.
15216 (attach_inferior): Remove "status" and "signal" parameters.
15217 Adjust.
15218 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15219 not as an address.
15220 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15221 (handle_v_requests, myresume): Remove "status" and "signal"
15222 parameters. Adjust.
15223 (handle_status): New.
15224 (main): Delete local `status'. Adjust.
15225 * remote-utils.c: Include target.h.
15226 (prepare_resume_reply): Change prototype to take a
15227 target_waitstatus. Adjust.
15228
15229 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15230 interface.
15231 * spu-low.c (spu_wait): Adjust.
15232 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15233 Delete.
15234 (win32_wait): Adjust.
15235
2bd7c093
PA
152362009-04-01 Pedro Alves <pedro@codesourcery.com>
15237
15238 * target.h (struct thread_resume): Delete leave_stopped member.
15239 (struct target_ops): Add a `n' argument to the `resume' callback.
15240 * server.c (start_inferior): Adjust.
15241 (handle_v_cont, myresume): Adjust.
15242 * linux-low.c (check_removed_breakpoint): Adjust to resume
15243 interface change, and to removed leave_stopped field.
15244 (resume_ptr): Delete.
15245 (struct thread_resume_array): New.
15246 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15247 resume interface change.
15248 (linux_continue_one_thread, linux_queue_one_thread)
15249 (resume_status_pending_p): Check if the resume field is NULL
15250 instead of checking the leave_stopped member.
15251 (linux_resume): Adjust to the target resume interface change.
15252 * spu-low.c (spu_resume): Adjust to the target resume interface
15253 change.
15254 * win32-low.c (win32_detach, win32_resume): Ditto.
15255
c35fafde
PA
152562009-04-01 Pedro Alves <pedro@codesourcery.com>
15257
15258 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15259 flag.
15260 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15261 pending.
15262 (linux_continue_one_thread): Only preserve the stepping flag if
15263 there's a pending breakpoint.
15264
0a59d50b
PA
152652009-03-31 Pedro Alves <pedro@codesourcery.com>
15266
15267 * server.c (main): After the inferior having exited, call
15268 remote_close before exiting gdbserver.
15269
f04c6d38
TJB
152702009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15271
15272 Fix size of FPSCR in Power 7 processors.
15273 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15274 (PPC_FEATURE_HAS_DFP): New #define.
15275 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15276 size of the FPSCR.
15277
78e5cee6
PA
152782009-03-23 Pedro Alves <pedro@codesourcery.com>
15279
15280 * server.c (handle_query) Whitespace and formatting.
15281
1b3f6016
PA
152822009-03-22 Pedro Alves <pedro@codesourcery.com>
15283
15284 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15285 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15286 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15287 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15288 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15289 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15290 Makefile.in, configure.ac: Fix whitespace throughout.
15291 * configure: Regenerate.
15292
a07b2135
PA
152932009-03-22 Pedro Alves <pedro@codesourcery.com>
15294
15295 * inferiors.c (find_inferior): Make it safe for the callback
15296 function to delete the currently iterated inferior.
15297
67cc2626
PA
152982009-03-22 Pedro Alves <pedro@codesourcery.com>
15299
15300 * Makefile.in (linuw_low_h): Move higher.
15301 (thread-db.o): Depend on $(linux_low_h).
15302
54a0b537
PA
153032009-03-17 Pedro Alves <pedro@codesourcery.com>
15304
15305 Rename "process" to "lwp" throughout.
15306
15307 * linux-low.c (all_processes): Rename to...
15308 (all_lwps): ... this.
15309 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15310 (add_process): Rename to ...
15311 (add_lwp): ... this. Adjust.
15312 (linux_create_inferior): Adjust.
15313 (linux_attach_lwp): Adjust.
15314 (linux_attach): Adjust.
15315 (linux_kill_one_process): Rename to ...
15316 (linux_kill_one_lwp): ... this. Adjust.
15317 (linux_kill): Adjust.
15318 (linux_detach_one_process): Rename to ...
15319 (linux_detach_one_lwp): ... this. Adjust.
15320 (linux_detach): Adjust.
15321 (check_removed_breakpoint): Adjust.
15322 (status_pending_p): Adjust.
15323 (linux_wait_for_process): Rename to ...
15324 (linux_wait_for_lwp): ... this. Adjust.
15325 (linux_wait_for_event): Adjust.
15326 (send_sigstop): Adjust.
15327 (wait_for_sigstop): Adjust.
15328 (stop_all_processes): Rename to ...
15329 (stop_all_lwps): ... this.
15330 (linux_resume_one_process): Rename to ...
15331 (linux_resume_one_lwp): ... this. Adjust.
15332 (linux_set_resume_request, linux_continue_one_thread)
15333 (linux_queue_one_thread, resume_status_pending_p)
15334 (usr_store_inferior_registers, regsets_store_inferior_registers)
15335 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15336 Adjust.
15337 * linux-low.h (get_process): Rename to ...
15338 (get_lwp): ... this. Adjust.
15339 (get_thread_process): Rename to ...
15340 (get_thread_lwp): ... this. Adjust.
15341 (get_process_thread): Rename to ...
15342 (get_lwp_thread): ... this. Adjust.
15343 (struct process_info): Rename to ...
15344 (struct lwp_info): ... this.
15345 (all_processes): Rename to ...
15346 (all_lwps): ... this.
15347 * proc-service.c (ps_lgetregs): Adjust.
15348 * thread-db.c (thread_db_create_event, find_one_thread)
15349 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15350
0b16c5cf
PA
153512009-03-14 Pedro Alves <pedro@codesourcery.com>
15352
15353 * server.c (handle_query): Handle "qAttached".
15354
32de4b9d
NS
153552009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15356
15357 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15358 GPLv3, update license URL.
15359
2aecd87f
DE
153602009-03-01 Doug Evans <dje@google.com>
15361
93efd302 15362 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15363 (server_h): Add gdb_signals.h.
15364 (signals.o): Update.
15365 * server.h (target_signal_from_host,target_signal_to_host_p)
15366 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15367
86b1f9c5
PM
153682009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15369
15370 * remote-utils.c (getpkt): Also generate remote-debug
15371 information if noack_mode is set.
15372
4aa995e1
PA
153732009-02-06 Pedro Alves <pedro@codesourcery.com>
15374
15375 * server.c (handle_query): Report qXfer:siginfo:read and
15376 qXfer:siginfo:write as supported and handle them.
15377 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15378 * linux-low.c (linux_xfer_siginfo): New.
15379 (linux_target_ops): Set it.
15380
62709adf
PA
153812009-01-26 Pedro Alves <pedro@codesourcery.com>
15382
15383 * server.c (gdbserver_usage): Mention --remote-debug.
15384 (main): Accept '--remote-debug' switch.
15385
aef93bd7
DE
153862009-01-18 Doug Evans <dje@google.com>
15387
15388 * regcache.c (new_register_cache): No need to check result of xcalloc.
15389 * server.c (handle_search_memory): Back out calls to xmalloc,
15390 result is checked and error is returned to user upon failure.
15391 (handle_query): Ditto. Add more checks for result of malloc.
15392 (handle_v_cont): Check result of malloc, report error back to
15393 user upon failure.
15394 (handle_v_run): Ditto. Call freeargv.
15395 * server.h (freeargv): Declare.
15396 * utils.c (freeargv): New fn.
15397
54363045
DE
153982009-01-15 Doug Evans <dje@google.com>
15399
f626972c
DE
15400 * gdbreplay.c (perror_with_name): Make arg const char *.
15401 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15402 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15403 * utils.c (perror_with_name): Make arg const char *.
54363045 15404
18aae699
PA
154052009-01-14 Pedro Alves <pedro@codesourcery.com>
15406
15407 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15408 when handling a EXIT_PROCESS_DEBUG_EVENT.
15409
ff703abe
JB
154102009-01-06 Joel Brobecker <brobecker@adacore.com>
15411
15412 * gdbreplay.c (gdbreplay_version): Update copyright year.
15413 * server.c (gdbserver_version): Likewise.
15414
f21cc1a2 154152009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15416
15417 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15418 (handle_extended_wait): Improve comment.
0e21c1ec 15419
bca929d3
DE
154202008-12-13 Doug Evans <dje@google.com>
15421
15422 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15423 * server.h (ATTR_MALLOC): New macro.
15424 (xmalloc,xcalloc,xstrdup): Declare.
15425 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15426 * inferiors.c: Ditto.
15427 * linux-low.c: Ditto.
15428 * mem-break.c: Ditto.
15429 * regcache.c: Ditto.
15430 * remote-utils.c: Ditto.
15431 * server.c: Ditto.
15432 * target.c: Ditto.
15433 * win32-low.c: Ditto.
15434
97438e3f
DE
154352008-12-12 Doug Evans <dje@google.com>
15436
896c7fbb
DE
15437 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15438 in debugging printf.
15439
97438e3f
DE
15440 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15441
e3b886f8
DE
154422008-12-09 Doug Evans <dje@google.com>
15443
15444 * linux-low.h (struct process_info): Delete member tid, unused.
15445 * thread-db.c (find_one_thread): Update.
15446 (maybe_attach_thread): Update.
15447
07e059b5
VP
154482008-12-02 Pedro Alves <pedro@codesourcery.com>
15449
889bf7c5
PA
15450 * target.h (struct target_ops): Add qxfer_osdata member.
15451 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15452 and dirent.h.
15453 (linux_qxfer_osdata): New functions.
15454 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15455 callback.
15456 * server.c (handle_query): Handle "qXfer:osdata:read:".
15457 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15458 (buffer_xml_printf): New functions.
15459 * server.h (struct buffer): New.
15460 (buffer_grow_str, buffer_grow_str0): New macros.
15461 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15462 (buffer_xml_printf): Declare.
07e059b5 15463
4cab47ab
DE
154642008-11-24 Doug Evans <dje@google.com>
15465
15466 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15467
f142445f
DJ
154682008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15469
15470 * server.c (handle_v_run): Always use the supplied argument list.
15471
d0107bb6 154722008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15473
d0107bb6
BW
15474 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15475 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15476
2c4ad781
TJB
154772008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15478
15479 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15480 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15481 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15482 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15483 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15484 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15485 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15486 XML target descriptions.
15487 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15488 when inferior is running on an ISA 2.05 or later processor. Add
15489 special case to return offset for full 64-bit slot of FPSCR when
15490 in 32-bits.
15491
dfb64f85
DJ
154922008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15493
15494 * Makefile.in (SFILES, clean): Added sparc64 files.
15495 (reg-sparc64.o, reg-sparc64.c): New.
15496 * configure.srv (sparc*-*-linux*): New configuration.
15497 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15498 syscall arguments for SPARC.
15499 (regsets_store_inferior_registers): Likewise.
15500 * linux-sparc-low.c: New file.
15501
66b6e1dd
DE
155022008-10-21 Doug Evans <dje@google.com>
15503
15504 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15505 (READLINE_DIR,READLINE_DEP): Delete.
15506 (INTERNAL_CFLAGS): Update.
15507 (LINTFLAGS): Update.
15508
9b710a42
PA
155092008-10-10 Pedro Alves <pedro@codesourcery.com>
15510
15511 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15512 whole argv from the last run, not just argv[0].
15513
5822d809
PA
155142008-09-08 Pedro Alves <pedro@codesourcery.com>
15515
15516 * regcache.c (new_register_cache): Return NULL if the register
15517 cache size isn't known yet.
15518 (free_register_cache): Avoid dereferencing a NULL regcache.
15519
74aac56f
DJ
155202008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15521
15522 * configure.srv: Merge MIPS and MIPS64.
15523
400b20f5
MR
155242008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15525
15526 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15527
677c5bb1
LM
155282008-08-18 Luis Machado <luisgpm@br.ibm.com>
15529
15530 * Makefile.in: Add required vsx dependencies.
15531
15532 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15533 Declare init_registers_powerpc_vsx32l.
15534 Declare init_registers_powerpc_vsx64l.
15535 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15536 (ppc_arch_setup): Check for VSX in hwcap.
15537 (ppc_fill_vsxregset): New function.
15538 (ppc_store_vsxregset): New function.
15539 Add new VSX entry in regset_info target_regsets.
15540
15541 * configure.srv: Add new VSX dependencies.
15542
a6f3e723
SL
155432008-08-12 Pedro Alves <pedro@codesourcery.com>
15544
15545 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15546 (remote_open): Set or clear transport_is_reliable.
15547 (putpkt_binary): Don't expect acks in noack mode.
15548 (getpkt): Don't send ack/nac in noack mode.
15549 * server.c (handle_general_set): Handle QStartNoAckMode.
15550 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15551 qSupported.
15552 (main): Reset noack_mode on every connection.
15553 * server.h (noack_mode): Declare.
15554
a417dc56
RW
155552008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15556
15557 * Makefile.in (GDBREPLAY_OBS): New variable.
15558 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15559
3221518c
UW
155602008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15561 Daniel Jacobowitz <dan@codesourcery.com>
15562
15563 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15564 (usr_store_inferior_registers): Likewise.
15565 (regsets_store_inferior_registers): Likewise.
15566
ec56be1b
PA
155672008-07-31 Rolf Jansen <rj@surtec.com>
15568 Pedro Alves <pedro@codesourcery.com>
15569
15570 * configure.ac: Check for memmem declaration.
15571 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15572 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15573 (disable_packet_qfThreadInfo): Unconditionally compile.
15574 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15575 * configure, config.in: Regenerate.
15576
2fe5e3ff
DE
155772008-07-28 Doug Kwan <dougkwan@google.com>
15578
15579 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15580 (linux_write_memory): Remove declaration of errno.
15581
836acd6d
UW
155822008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15583
15584 * linux-low.c (handle_extended_wait): Do not use "status"
15585 variable uninitialized.
15586
aeba519e
PA
155872008-07-07 Pedro Alves <pedro@codesourcery.com>
15588
15589 * server.c (handle_v_attach): Inhibit reporting dll changes.
15590
db42f210
PA
155912008-06-27 Pedro Alves <pedro@codesourcery.com>
15592
15593 * remote-utils.c (prepare_resume_reply): If requested, don't
15594 output "thread:TID" in the T stop reply.
15595
15596 * server.c (disable_packet_vCont, disable_packet_Tthread)
15597 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15598 (handle_query): If requested, disable support for qC, qfThreadInfo
15599 and qsThreadInfo.
15600 (handle_v_requests): If requested, disable support for vCont.
15601 (gdbserver_show_disableable): New.
15602 (main): Handle --disable-packet and --disable-packet=LIST.
15603
15604 * server.h (disable_packet_vCont, disable_packet_Tthread)
15605 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15606
8e4c5421
CD
156072008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15608
15609 * server.c (gdbserver_usage): Mention --version.
15610
6e23a804
DJ
156112008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15612
15613 * Makefile.in (gdbreplay.o): New rule.
15614
90aa6a40
JM
156152008-06-06 Joseph Myers <joseph@codesourcery.com>
15616
15617 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15618 message, not gdbserver.
15619
c16158bc 156202008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15621 Nathan Sidwell <nathan@codesourcery.com>
15622 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15623
15624 * acinclude.m4: Include ../../config/acx.m4.
15625 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15626 * configure, config.in: Regenerate.
15627 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15628 * server.c (gdbserver_version): Print PKGVERSION.
15629 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15630 (main): Adjust gdbserver_usage calls.
15631 * gdbreplay.c (version, host_name): Add declarations.
15632 (gdbreplay_version, gdbreplay_usage): New.
15633 (main): Accept --version and --help options.
15634
aeb75bf5
DJ
156352008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15636
15637 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15638 (arm_breakpoint_at): Handle Thumb.
15639 (the_low_target): Add comment.
15640
76b233dd
UW
156412008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15642
15643 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15644
08388c79
DE
156452008-05-09 Doug Evans <dje@google.com>
15646
a3c83fae
DE
15647 * server.h (decode_search_memory_packet): Declare.
15648 * remote-utils.c (decode_search_memory_packet): New fn.
15649 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15650 (handle_search_memory): New fn.
15651 (handle_query): Process qSearch:memory packets.
15652
bb9c3d36
UW
156532008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15654
15655 * regcache.c (registers_length): Remove.
15656 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15657 full register packet.
15658 * regcache.h (registers_length): Remove prototype.
15659 * server.h (PBUFSIZ): Define to 16384.
15660
7284e1be
UW
156612008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15662
15663 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15664 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15665 powerpc-64l.o, and powerpc-altivec64l.o.
15666 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15667 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15668 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15669 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15670 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15671 to srv_xmlfiles.
15672
15673 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15674 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15675 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15676 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15677 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15678 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15679 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15680 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15681 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15682 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15683 (clean): Update.
15684
15685 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15686 (init_registers_powerpc_32l): ... this new prototype.
15687 (init_registers_powerpc_32): Remove, replace by ...
15688 (init_registers_powerpc_altivec32l): ... this new prototype.
15689 (init_registers_powerpc_e500): Remove, replace by ...
15690 (init_registers_powerpc_e500l): ... this new prototype.
15691 (init_registers_ppc64): Remove, replace by ...
15692 (init_registers_powerpc_64l): ... this new prototype.
15693 (init_registers_powerpc_64): Remove, replace by ...
15694 (init_registers_powerpc_altivec64l): ... this new prototype.
15695 (ppc_num_regs): Set to 73.
15696 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15697 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15698 (ppc_cannot_store_register): Handle orig_r3 and trap.
15699 (ppc_arch_setup): Update init_registers_... calls.
15700 (ppc_fill_gregset): Handle orig_r3 and trap.
15701
15702 * inferiors.c (clear_inferiors): Reset current_inferior.
15703
fdc59709
PB
157042008-04-23 Paolo Bonzini <bonzini@gnu.org>
15705
889bf7c5
PA
15706 * acinclude.m4: Add override.m4.
15707 * configure: Regenerate.
fdc59709 15708
c9b2f845
UW
157092008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15710
15711 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15712 initial call to init_register_ppc64.
15713
550512b8
UW
157142008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15715
43aaf8b6
PA
15716 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15717 single powerpc*-*-linux* case.
550512b8
UW
15718 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15719
b6430ec3
UW
157202008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15721
15722 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15723 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15724 from reg_xmlfiles.
15725 * linux-ppc-low.c: Include <elf.h>.
15726 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15727 (ppc_hwcap): New global variable.
15728 (ppc_regmap): Remove __SPE__ #ifdef sections.
15729 (ppc_regmap_e500): New global variable.
15730 (ppc_cannot_store_register): Update __SPE__ special case.
15731 (ppc_get_hwcap): New function.
15732 (ppc_arch_setup): Use it to determine whether inferior supports
15733 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15734 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15735 Do not access registers if target does not support AltiVec.
15736 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15737 Do not access registers if target does not support SPE.
15738 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15739
52fa2412
UW
157402008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15741
15742 * linux-low.c (disabled_regsets, num_regsets): New.
15743 (use_regsets_p): Delete.
15744 (linux_wait_for_process): Clear disabled_regsets.
15745 (regsets_fetch_inferior_registers): Check and set it.
15746 (regsets_store_inferior_registers): Likewise.
15747 (linux_fetch_registers, linux_store_registers): Do not use
15748 use_regsets_p.
15749 (initialize_low): Allocate disabled_regsets.
15750
e28b3332
DJ
157512008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15752
15753 * Makefile.in (LIBOBJS): New.
15754 (OBS): Use LIBOBJS.
15755 (memmem.o): New rule.
15756 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15757 * configure: Regenerated.
15758
4536995d
UW
157592008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15760
15761 * server.c (handle_query): Never return "unsupported" for
15762 qXfer:features:read queries.
15763
221c031f
UW
157642008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15765
15766 * server.c (get_features_xml): Fix inverted condition.
15767 (handle_query): Always support qXfer:feature:read.
15768
ccd213ac
DJ
157692008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15770
15771 * server.c (wrapper_argv): New.
15772 (start_inferior): Handle wrapper_argv. If set, expect an extra
15773 trap.
15774 (gdbserver_usage): Document --wrapper.
15775 (main): Parse --wrapper.
15776
6fe305f7
UW
157772008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15778
15779 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15780 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15781 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15782 (ppc_set_pc): Likewise.
15783 (ppc_arch_setup): New function.
15784 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15785 of collect_register.
889bf7c5 15786 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15787
5b0a002e
UW
157882008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15789
15790 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15791 instead of linux-ppc64-low.o.
15792 * linux-ppc64-low.c: Remove file.
15793 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15794 (linux-ppc64-low.o): Remove rule.
15795
15796 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15797 (init_registers_powerpc_64): Likewise.
15798 (ppc_regmap): Conditionally define depending on __powerpc64__.
15799 (ppc_cannot_store_register): Do not special-case "fpscr" when
15800 compiled on __powerpc64__.
15801 (ppc_collect_ptrace_register): New function.
15802 (ppc_supply_ptrace_register): New function.
15803 (ppc_breakpoint): Change type to "unsigned int".
15804 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15805 (the_low_target): Conditionally provide initializers for the
889bf7c5 15806 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15807 collect_ptrace_register and supply_ptrace_register members.
15808
9b4b61c8
UW
158092008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15810
15811 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15812 * server.c (gdbserver_xmltarget): Define.
15813 (get_features_xml): Use it to replace "target.xml" and arch_string.
15814
15815 * configure.srv: Remove srv_xmltarget. Add XML files that were
15816 mentioned there to srv_xmlfiles instead. Remove conditional tests
15817 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15818 srv_xmlfiles and srv_regobj to include all possible choices.
15819 * configure.ac (srv_xmltarget): Remove.
15820 (srv_xmlfiles): Do not add "target.xml".
15821 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15822 checks for supplementary target information.
15823 * configure: Regenerate.
15824 * Makefile.in (XML_TARGET): Remove.
15825 (target.xml): Remove rule.
15826 (clean): Do not clean up target.xml.
15827 (.PRECIOUS): Do not mention target.xml.
15828
15829 * target.h (struct target_ops): Remove arch_string member.
15830 * linux-low.c (linux_arch_string): Remove.
15831 (linux_target_ops): Remove arch_string initializer.
15832 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15833 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15834 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15835 * spu-low.c (spu_arch_string): Remove.
15836 (spu_target_ops): Remove arch_string initializer.
15837 * win32-low.c (win32_arch_string): Remove.
15838 (win32_target_ops): Remove arch_string initializer.
15839 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15840 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15841 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15842
ee1a7ae4
UW
158432008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15844
15845 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15846 by collect_ptrace_register and supply_ptrace_register hooks.
15847 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15848 instead of checking for the_low_target.left_pad_xfer.
15849 (usr_store_inferior_registers): Use collect_ptrace_register callback
15850 instead of checking for the_low_target.left_pad_xfer.
15851
15852 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15853 (s390_supply_ptrace_register): Likewise.
15854 (s390_fill_gregset): Call s390_collect_ptrace_register.
15855 (the_low_target): Update.
15856
15857 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15858 (ppc_supply_ptrace_register): Likewise.
15859 (the_low_target): Update.
15860
15861 * linux-i386-low.c (the_low_target): Update.
15862 * linux-x86-64-low.c (the_low_target): Update.
15863
d61ddec4
UW
158642008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15865
15866 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15867 reg-s390.o and reg-s390x.o.
15868
15869 * linux-low.c (new_inferior): New global variable.
15870 (linux_create_inferior, linux_attach): Set it.
15871 (linux_wait_for_process): Call the_low_target.arch_setup after the
15872 target has stopped for the first time.
15873 (initialize_low): Do not call the_low_target.arch_setup.
15874
15875 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15876 (s390_set_pc): Likewise.
15877 (s390_arch_setup): New function.
15878 (the_low_target): Use s390_arch_setup as arch_setup routine.
15879
15880 * regcache.c (realloc_register_cache): New function.
15881 (set_register_cache): Call it for each existing regcache.
15882
d05b4ac3
UW
158832008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15884
15885 * server.h (init_registers): Remove prototype.
15886
15887 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15888 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15889 instead of init_registers ().
15890 * linux-arm-low.c (init_registers_arm): Add prototype.
15891 (init_registers_arm_with_iwmmxt): Likewise.
15892 (the_low_target): Add initializer for arch_setup field.
15893 * linux-cris-low.c (init_registers_cris): Add prototype.
15894 (the_low_target): Add initializer for arch_setup field.
15895 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15896 (the_low_target): Add initializer for arch_setup field.
15897 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15898 (the_low_target): Add initializer for arch_setup field.
15899 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15900 (the_low_target): Add initializer for arch_setup field.
15901 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15902 (the_low_target): Add initializer for arch_setup field.
15903 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15904 (the_low_target): Add initializer for arch_setup field.
15905 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15906 (init_registers_mips64_linux): Likewise.
15907 (the_low_target): Add initializer for arch_setup field.
15908 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15909 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15910 (the_low_target): Add initializer for arch_setup field.
15911 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15912 (init_registers_powerpc_64): Likewise.
15913 (the_low_target): Add initializer for arch_setup field.
15914 * linux-s390-low.c (init_registers_s390): Add prototype.
15915 (init_registers_s390x): Likewise.
15916 (the_low_target): Add initializer for arch_setup field.
15917 * linux-sh-low.c (init_registers_sh): Add prototype.
15918 (the_low_target): Add initializer for arch_setup field.
15919 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15920 (the_low_target): Add initializer for arch_setup field.
15921 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15922 (the_low_target): Add initializer for arch_setup field.
15923
15924 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15925 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15926 instead of init_registers ().
15927 * win32-arm-low.c (init_registers_arm): Add prototype.
15928 (the_low_target): Add initializer for arch_setup field.
15929 * win32-i386-low.c (init_registers_i386): Add prototype.
15930 (the_low_target): Add initializer for arch_setup field.
15931
15932 * spu-low.c (init_registers_spu): Add prototype.
15933 (initialize_low): Call initialie_registers_spu () instead of
15934 initialize_registers ().
15935
fd96d250
PA
159362008-02-19 Pedro Alves <pedro@codesourcery.com>
15937
15938 * server.c (handle_v_requests): When handling the vRun and vAttach
15939 packets, if already debugging a process, don't kill it. Return an
15940 error instead.
15941
d41b6bb4
DJ
159422008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15943
15944 * server.c (handle_query): Correct length check.
15945
5ac588cf
PA
159462008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15947
15948 * win32-low.c (do_initial_child_stuff): Add process handle
15949 parameter. Set current_process_handle and current_process_id from the
15950 parameters. Clear globals.
15951 (win32_create_inferior): Don't set current_process_handle and
15952 current_process_id here. Instead pass them on the call to
15953 do_initial_child_stuff.
15954 (win32_attach): Likewise.
15955 (win32_clear_inferiors): New.
15956 (win32_kill): Don't close the current process handle or the
15957 current thread handle here. Instead call win32_clear_inferiors.
15958 (win32_detach): Don't open a new handle to the process. Call
15959 win32_clear_inferiors.
15960 (win32_join): Don't rely on current_process_handle; open a new
15961 handle using the process id.
15962 (win32_wait): Call win32_clear_inferiors when the inferior process
15963 has exited.
15964
ecd7ecbc
DJ
159652008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15966
15967 * server.c (monitor_show_help): Add "exit".
15968
1525d545
MG
159692008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15970
ecd7ecbc 15971 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15972 (clean): Add reg-xtensa.c.
15973 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15974 * configure.srv (xtensa*-*-linux*) New target.
15975 * linux-xtensa-low.c: New.
15976 * xtensa-xtregs.c: New.
1525d545 15977
59a016f0
PA
159782008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15979
15980 * hostio.c: Don't include errno.h.
15981 (errno_to_fileio_errno): Move to hostio-errno.
15982 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15983 error number outputting to the target->hostio_last_error callback.
15984 (hostio_packet_error): Use FILEIO_EINVAL directly.
15985 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15986 calls to hostio_error.
15987 * hostio-errno.c: New.
15988 * server.h (hostio_last_error_from_errno): Declare.
15989 * target.h (target_ops): Add hostio_last_error member.
15990 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15991 as hostio_last_error handler.
889bf7c5 15992 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15993 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15994 (wince_hostio_last_error): New functions.
15995 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15996 as hostio_last_error handler.
15997 (win32_target_ops) [!_WIN32_WCE]: Register
15998 hostio_last_error_from_errno as hostio_last_error handler.
15999 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16000 (hostio-errno.o): New rule.
16001 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16002 * configure.srv (srv_hostio_err_objs): New variable. Default to
16003 hostio-errno.o.
16004 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16005 * configure: Regenerate.
16006
2d717e4f
DJ
160072008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16008
16009 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16010 (linux_kill, linux_detach): Clean up the process list.
16011 * remote-utils.c (remote_open): Improve port number parsing.
16012 (putpkt_binary, input_interrupt): Only send interrupts if the target
16013 is running.
16014 * server.c (extended_protocol): Make static.
16015 (attached): Define earlier.
16016 (exit_requested, response_needed, program_argv): New variables.
16017 (target_running): New.
16018 (start_inferior): Clear attached here.
16019 (attach_inferior): Set attached here.
16020 (require_running): Define.
16021 (handle_query): Use require_running and target_running. Implement
16022 "monitor exit".
16023 (handle_v_attach, handle_v_run): New.
16024 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16025 (gdbserver_usage): Update.
16026 (main): Redo argument parsing. Handle --debug and --multi. Handle
16027 --attach along with other options or after the port. Save
16028 program_argv. Support no initial program. Resynchronize
16029 communication with GDB after an error. Handle "monitor exit".
16030 Use require_running and target_running. Always allow the extended
16031 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16032 restart in extended mode.
16033 * README: Refer to the GDB manual. Update --attach usage.
16034
7407e2de
AS
160352007-12-20 Andreas Schwab <schwab@suse.de>
16036
16037 * linux-low.c (STACK_SIZE): Define.
16038 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16039 (linux_test_for_tracefork): Likewise.
16040
b65d95c5
DJ
160412007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16042
16043 * linux-low.c (linux_wait_for_event): Update messages. Do not
16044 reinsert auto-delete breakpoints.
16045 * mem-break.c (struct breakpoint): Change return type of handler to
16046 int.
16047 (set_breakpoint_at): Update handler type.
16048 (reinsert_breakpoint_handler): Return 1 instead of calling
16049 delete_breakpoint.
16050 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16051 setting a new one.
16052 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16053 * mem-break.h (set_breakpoint_at): Update handler type.
16054 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16055 * win32-low.c (auto_delete_breakpoint): New.
16056 (get_child_debug_event): Use it.
16057
4e799345
DJ
160582007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16059
16060 * configure.ac: Check for pread and pwrite.
16061 * hostio.c (handle_pread): Fall back to lseek and read.
16062 (handle_pwrite): Fall back to lseek and write.
16063 * config.in, configure: Regenerated.
16064
27524b67
DJ
160652007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16066
16067 * server.c (myresume): Add own_buf argument.
16068 (main): Update calls.
16069
a20d5e98
DJ
160702007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16071
16072 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16073 * remote-utils.c (remote_open): Do not call disable_async_io.
16074 (block_async_io): Delete.
16075 (unblock_async_io): Make static.
16076 (initialize_async_io): New.
16077 * server.c (handle_v_cont): Handle async I/O here.
16078 (myresume): Likewise. Move other common resume tasks here...
16079 (main): ... from here. Call initialize_async_io. Disable async
16080 I/O before the main loop.
16081 * server.h (initialize_async_io): Declare.
16082 (block_async_io, unblock_async_io): Delete prototypes.
16083 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16084
b79d787e
DJ
160852007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16086
16087 * remote-utils.c (readchar): Allow binary data in received messages.
16088
d97903b2
PA
160892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16090
16091 * win32-low.c (attaching): New global.
16092 (win32_create_inferior): Clear the `attaching' global.
16093 (win32_attach): Set the `attaching' global.
16094 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16095 attaching. Only set a breakpoint at the entry point if not
16096 attaching.
16097
311de423
PA
160982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16099
16100 * server.c (main): Don't report dll events on the initial
16101 connection on attaches.
16102
6c2d16d2
PA
161032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16104
16105 * server.c (main): Relax numerical bases supported for the pid of
16106 the --attach command line argument.
16107
5ca906e6
PA
161082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16109
16110 * win32-low.c (win32_attach): Call OpenProcess before
16111 DebugActiveProcess, not after. Add last error output to error
16112 call.
16113
9c6c8194
PA
161142007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16115
16116 * win32-low.c (win32_get_thread_context)
16117 (win32_set_thread_context): New functions.
16118 (thread_rec): Use win32_get_thread_context.
16119 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16120 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16121 field.
16122
4d5d1aaa
PA
161232007-12-03 Leo Zayas
16124 Pedro Alves <pedro_alves@portugalmail.pt>
16125
16126 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16127 global variables.
16128 (child_add_thread): Minor cleanup.
16129 (child_continue): Resume artificially suspended threads before
16130 calling ContinueDebugEvent.
16131 (suspend_one_thread): New.
16132 (fake_breakpoint_event): New.
16133 (get_child_debug_event): Change return type to int. Check here if
16134 gdb sent an interrupt request. If a soft interrupt was requested,
16135 fake a breakpoint event. Return 0 if there is no event to handle,
16136 and 1 otherwise.
16137 (win32_wait): Don't check here if gdb sent an interrupt request.
16138 Ensure there is a valid event to handle.
16139 (win32_request_interrupt): Add soft interruption method as last
16140 resort.
16141
c436e841
PA
161422007-12-03 Leo Zayas
16143 Pedro Alves <pedro_alves@portugalmail.pt>
16144
16145 * win32-low.h (win32_thread_info): Add descriptions to the
16146 structure members. Replace `suspend_count' counter by a
16147 `suspended' flag.
16148 * win32-low.c (thread_rec): Update condition of when to get the
16149 context from the inferior. Rely on ContextFlags being set if it
16150 has already been retrieved. Only suspend the inferior thread if
16151 we haven't already. Warn if that fails.
16152 (continue_one_thread): s/suspend_count/suspended/. Only call
16153 ResumeThread once. Warn if that fails.
16154
e7b5fa67
PA
161552007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16156
16157 * win32-low.c (win32_wait): Don't read from the inferior when it
16158 has already exited.
16159
a385171d
PA
161602007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16161
16162 * Makefile.in (win32_low_h): New variable.
16163 (win32-low.o): Add dependency on $(win32_low_h).
16164 (win32-arm-low.o, win32-i386-low.o): New rules.
16165
f80c84b3
DJ
161662007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16167
16168 * hostio.c: Correct copyright year.
16169
a6b151f1
DJ
161702007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16171
16172 * Makefile.in (OBS): Add hostio.o.
16173 (hostio.o): New rule.
16174 * server.h (handle_vFile): Declare.
16175 * hostio.c: New file.
16176 * server.c (handle_v_requests): Take packet_len and new_packet_len
16177 for binary packets. Call handle_vFile.
16178 (main): Update call to handle_v_requests.
16179
f9387fc3
DJ
161802007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16181
16182 * linux-low.c: Include <sched.h>.
16183
51c2684e
DJ
161842007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16185
16186 * linux-low.c (linux_tracefork_grandchild): New.
16187 (linux_tracefork_child): Use clone.
16188 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16189
75f83163
JB
161902007-10-31 Joel Brobecker <brobecker@adacore.com>
16191
16192 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16193
da5898ce
DJ
161942007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16195
16196 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16197
24a09b5f
DJ
161982007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16199
16200 * inferiors.c (change_inferior_id): Delete.
16201 (add_pid_to_list, pull_pid_from_list): New.
16202 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16203 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16204 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16205 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16206 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16207 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16208 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16209 (using_threads): Always set to 1.
16210 (handle_extended_wait): New.
16211 (add_process): Do not set TID.
16212 (linux_create_inferior): Set must_set_ptrace_flags.
16213 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16214 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16215 (linux_thread_alive): Rename TID argument to LWPID.
16216 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16217 (linux_wait_for_event): Do not use TID or check using_threads. Update
16218 call to dead_thread_notify. Call handle_extended_wait.
16219 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16220 (send_sigstop): Delete sigstop_sent.
16221 (wait_for_sigstop): Avoid TID.
16222 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16223 (linux_test_for_tracefork): New.
16224 (linux_lookup_signals): Use thread_db_active and
16225 linux_supports_tracefork_flag.
16226 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16227 * linux-low.h (get_process_thread): Avoid TID.
16228 (struct process_ifo): Move thread_known and tid to the end. Remove
16229 sigstop_sent.
16230 (linux_attach_lwp, thread_db_init): Update prototypes.
16231 * server.h (change_inferior_id): Delete prototype.
16232 (add_pid_to_list, pull_pid_from_list): New prototypes.
16233 * thread-db.c (thread_db_use_events): New.
16234 (find_first_thread): Rename to...
16235 (find_one_thread): ...this. Update callers and messages. Do not
16236 call fatal. Check thread_db_use_events. Do not call
16237 change_inferior_id or new_thread_notify.
16238 (maybe_attach_thread): Update. Do not call new_thread_notify.
16239 (thread_db_init): Set thread_db_use_events. Check use_events.
16240 * utils.c (fatal, warning): Correct message prefix.
16241
30ed0a8f
DJ
162422007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16243
16244 * Makefile.in (clean): Remove new files.
16245 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16246 (powerpc-64.o, powerpc-64.c): New rules.
16247 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16248 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16249 with SPE.
16250 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16251 SPE targets.
16252 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16253 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16254 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16255 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16256 (target_regsets): Add AltiVec and SPE register sets.
16257 * configure.ac: Check for AltiVec and SPE.
16258 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16259 (ppc_fill_vrregset, ppc_store_vrregset): New.
16260 (target_regsets): Add AltiVec register set.
16261 * configure: Regenerated.
16262
fd462a61
DJ
162632007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16264
16265 * linux-low.c (O_LARGEFILE): Define.
16266 (linux_read_memory): Use /proc/PID/mem.
16267 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16268 * configure, config.in: Regenerated.
16269
69f223ed
DJ
162702007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16271
16272 * linux-low.c (linux_wait_for_event): Do not pass signals while
16273 single-stepping.
16274
aec18585
PA
162752007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16276
16277 * win32-low.c (create_process): New.
16278 (win32_create_inferior): Use create_process instead of
16279 CreateProcess. If create_process failed retry appending an ".exe"
16280 suffix. Store the GetLastError result immediatelly after
16281 create_process calls and use it on the call to error.
16282
34d86ddd
PA
162832007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16284
16285 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16286
5a0e3bd0
JB
162872007-08-23 Joel Brobecker <brobecker@adacore.com>
16288
16289 * configure.ac: Switch license to GPLv3.
16290
f88c79e6
MS
162912007-08-01 Michael Snyder <msnyder@access-company.com>
16292
16293 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16294
6b3d9b83
PA
162952007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16296
16297 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16298 typedef.
16299 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16300 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16301 CloseToolhelp32Snapshot.
16302 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16303 CloseToolhelp32Snapshot.
16304
c588c53c
MS
163052007-07-27 Michael Snyder <michael.snyder@access-company.com>
16306
16307 * server.c (main): Check for inferior exit before main loop.
16308
aa0403d9
PA
163092007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16310
16311 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16312 instead of on tmp_desc.
16313
255e7678
DJ
163142007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16315 Daniel Jacobowitz <dan@codesourcery.com>
16316
16317 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16318 (add_thread): Minor cleanups.
16319 (clear_inferiors): Move lower in the file. Clear the DLL
16320 list.
16321 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16322 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16323 (xml_escape_text): New.
16324 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16325 for qSupported.
16326 (handle_v_cont): Report errors.
16327 (gdbserver_version): Update.
16328 (main): Correct size of own_buf. Do not report initial DLL events.
16329 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16330 (unloaded_dll, xml_escape_text): New.
16331 * win32-low.c (enum target_waitkind): Update comments.
16332 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16333 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16334 (win32_EnumProcessModules, win32_GetModuleInformation)
16335 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16336 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16337 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16338 (win32_Module32First, win32_Module32Next, load_toolhelp)
16339 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16340 (get_child_debug_event): Handle DLL events.
16341 (win32_wait): Likewise.
16342
0d37add9
DJ
163432007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16344
16345 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16346 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16347
45e2715e
PA
163482007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16349
16350 * win32-low.c (handle_output_debug_string): Ignore event if not
16351 waiting.
16352
c5674cf1
PA
163532007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16354
16355 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16356
2bbe3cc1
DJ
163572007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16358
16359 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16360
ae13219e
DJ
163612007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16362
16363 * inferiors.c (change_inferior_id): Add comment.
16364 * linux-low.c (check_removed_breakpoint): Add an early
16365 prototype. Improve debug output.
16366 (linux_attach): Doc update.
16367 (linux_detach_one_process, linux_detach): Clean up before releasing
16368 each process.
16369 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16370 * linux-low.h (struct process_info): Doc improvement.
16371 * mem-break.c (delete_all_breakpoints): New.
16372 * mem-break.h (delete_all_breakpoints): New prototype.
16373 * thread-db.c (find_first_thread): New.
16374 (thread_db_create_event): Call it instead of
16375 thread_db_find_new_threads. Clean up unused variables.
16376 (maybe_attach_thread): Remove first thread handling.
16377 (thread_db_find_new_threads): Use find_first_thread.
16378 (thread_db_get_tls_address): Likewise.
16379
4105de34
DJ
163802007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16381
16382 * thread-db.c (thread_db_find_new_threads): Add prototype.
16383 (thread_db_create_event): Check for the main thread before adding
16384 a new thread.
16385 (maybe_attach_thread): Only enable event reporting if TID == 0.
16386 (thread_db_get_tls_address): Check for new threads.
16387
2b876972
DJ
163882007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16389
16390 * linux-low.c (linux_create_inferior): Try execv before execvp.
16391 * spu-low.c (spu_create_inferior): Likewise.
16392
7a245884
DJ
163932007-06-13 Mike Frysinger <vapier@gentoo.org>
16394
16395 * linux-low.c (linux_create_inferior): Change execv to execvp.
16396 * spu-low.c (spu_create_inferior): Likewies.
16397
117ce543
DJ
163982007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16399
16400 * Makefile.in (clean): Clean new files instead of deleted ones.
16401 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16402 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16403 rules.
16404 * configure.srv: Specify XML files and new regformats for MIPS and
16405 MIPS64 GNU/Linux.
16406 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16407 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16408 an entry for the restart register.
16409 (mips_cannot_fetch_register, mips_cannot_store_register)
16410 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16411 register names to match the XML descriptions.
16412 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16413 restart register instead of $0.
16414
0e7f50da
UW
164152007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16416 Markus Deuling <deuling@de.ibm.com>
16417
16418 * remote-utils.c (decode_xfer_write): New function.
16419 * server.h (decode_xfer_write): Add prototype.
16420 * server.c (handle_query): Add PACKET_LEN argument. Support
16421 qXfer:spu:read and qXfer:spu:write packets.
16422 (main): Pass packet_len to handle_query.
16423 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16424 * target.h (target_ops): Add qxfer_spu.
16425
374c1d38
UW
164262007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16427
16428 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16429 accessing non-seekable spufs files.
16430
bb63802a
UW
164312007-05-16 Markus Deuling <deuling@de.ibm.com>
16432
889bf7c5 16433 * server.c (handle_query): Add reply for qC packet.
bb63802a 16434
7390519e
PA
164352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16436 Leo Zayas <lerele@champenstudios@com>
16437
16438 * server.h (check_remote_input_interrupt_request): New function.
16439 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16440 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16441 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16442 (check_remote_input_interrupt_request): New function.
16443 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16444 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16445 winapi_GenerateConsoleCtrlEvent): New typedefs.
16446 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16447 to 250 ms.
16448 (win32_wait): Check for remote interrupt request
16449 with check_remote_input_interrupt_request.
16450 (win32_request_interrupt): New function.
16451 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16452
34b34921
PA
164532007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16454
16455 * win32-low.c (debug_registers_changed,
16456 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16457 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16458 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16459 (thread_rec): Get context using the low target.
16460 (child_add_thread): Call thread_added on the low target,
16461 which does the same thing.
16462 (regptr): Delete.
16463 (do_initial_child_stuff): Remove debug registers references.
16464 Set context using the low target. Resume threads after
16465 setting the contexts.
16466 (child_continue): Remove dead variable. Remove debug
16467 registers references.
16468 (child_fetch_inferior_registers): Go through the low target.
16469 (do_child_store_inferior_registers): Remove.
16470 (child_store_inferior_registers): Go through the low target.
16471 (win32_resume): Remove debug registers references.
16472 Set context using the low target.
16473 (handle_exception): Change return type to void. Don't record
16474 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16475 first chance exception.
889bf7c5 16476 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16477 goto loop. Always return after waiting for debug event.
16478 (win32_wait): Convert to switch statement. Handle spurious
16479 events.
16480
16481 * win32-i386-low.c (debug_registers_changed,
16482 debug_registers_used): New.
16483 (initial_stuff): Rename to ...
16484 (i386_initial_stuff): ... this. Clear debug registers
16485 state variables.
16486 (store_debug_registers): Delete.
16487 (i386_get_thread_context): New.
16488 (load_debug_registers): Delete.
16489 (i386_set_thread_context): New.
16490 (i386_thread_added): New.
16491 (single_step): Rename to ...
16492 (i386_single_step): ... this.
16493 (do_fetch_inferior_registers): Rename to ...
16494 (i386_fetch_inferior_register): ... this.
16495 (i386_store_inferior_register): New.
16496 (the_low_target): Adapt to new interface.
16497
16498 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16499 (arm_get_thread_context): New.
16500 (arm_set_thread_context): New.
16501 (regptr): New.
16502 (do_fetch_inferior_registers): Rename to ...
16503 (arm_fetch_inferior_register): ... this.
16504 (arm_store_inferior_register): New.
16505 (arm_wince_breakpoint): Reimplement as unsigned long.
16506 (arm_wince_breakpoint_len): Define.
16507 (the_low_target): Adapt to new interface.
16508
16509 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16510 load_debug_registers. Add get_thread_context, set_thread_context,
16511 thread_added and store_inferior_register. Rename
16512 fetch_inferior_registers to fetch_inferior_register.
16513 (regptr): Remove declaration.
16514
dd6953e1
PA
165152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16516
16517 * linux-low.c (linux_detach): Change return type to int. Return 0.
16518 * spu-low.c (spu_detach): Likewise.
16519
444d6139
PA
165202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16521
16522 * target.h (target_ops): Change return type of detach to int.
16523 Add join.
16524 (join_inferior): New.
16525 * server.c (main): Don't skip detach support on mingw32.
16526 If the inferior doesn't support detaching return error.
16527 Call join_inferior instead of using waitpid.
16528 * linux-low.c (linux_join): New.
16529 (linux_target_op): Add linux_join.
16530 * spu-low.c (spu_join): New.
16531 (spu_target_ops): Add spu_join.
16532 * win32-low.c (win32_detach): Adapt to new interface.
16533 Reopen current_process_handle before detaching. Issue a child
16534 resume before detaching.
16535 (win32_join): New.
16536 (win32_target_op): Add win32_join.
16537
1d5315fe
PA
165382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16539
16540 * win32-low.c (win32-attach): Fix return value.
16541 * target.h (target_ops): Describe ATTACH return values.
16542
bf914831
PA
165432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16544
16545 * win32-low.c (GETPROCADDRESS): Define.
16546 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16547 (winapi_DebugSetProcessKillOnExit): Likewise.
16548 (win32_create_inferior): Force usage of ansi CreateProcessA.
16549 (win32_attach): Use GETPROCADDRESS.
16550 (win32_detach): Likewise.
16551
f72f3e60
PA
165522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16553
16554 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16555
ed50f18f
PA
165562007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16557
16558 * win32-low.c: Commit leftover changes from 2007-03-29.
16559
0c2ead7e
DJ
165602007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16561
16562 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16563 fields short instead of int. Add explicit padding.
16564 (i387_cache_to_fsave): Remove unnecessary casts.
16565 (i387_fsave_to_cache): Doc fix.
16566 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16567
73725ff3
DJ
165682007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16569
16570 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16571 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16572
d99f33d8
PA
165732007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16574
16575 * configure.srv (arm*-*-mingw32ce*): Move near the other
16576 arm targets.
16577
68070c10
PA
165782007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16579
2482afc6 16580 * configure.ac: Add errno checking.
68070c10
PA
16581 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16582 sys/file.h and malloc.h.
16583 (AC_CHECK_DECLS): Add perror.
16584 (srv_mingwce): Handle.
2482afc6 16585 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16586 win32-i386-low.o to srv_tgtobj.
16587 (i[34567]86-*-mingw*): Likewise.
16588 (arm*-*-mingw32ce*): Add case.
16589 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16590 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16591 [__MINGW32CE__] (strerror): New function.
16592 [__MINGW32CE__] (errno): Define to GetLastError.
16593 [__MINGW32CE__] (COUNTOF): New macro.
16594 (remote_open): Remove extra close call.
16595 * mem-break.c (delete_breakpoint_at): New function.
16596 * mem-break.h (delete_breakpoint_at): Declare.
16597 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16598 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16599 [USE_WIN32API] (read, write): Add char* casts.
16600 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16601 * server.h: Include wincecompat.h on Windows CE.
16602 [HAVE_ERRNO_H]: Check.
16603 (perror): Declare if not declared.
16604 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16605 (perror_with_name): Remove errno declaration.
16606 * wincecompat.h: New.
16607 * wincecompat.c: New.
16608 * win32-low.h: New.
16609 * win32-arm-low.c: New.
16610 * win32-i386-low.c: New.
16611 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16612 (OUTMSG2): Make it safe.
16613 (_T): New macro.
16614 (COUNTOF): New macro.
16615 (NUM_REGS): Get it from the low target.
16616 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16617 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16618 (thread_rec): Let low target handle debug registers.
16619 (child_add_thread): Likewise.
16620 (child_init_thread_list): Likewise.
16621 (continue_one_thread): Likewise.
16622 (regptr): New.
16623 (do_child_fetch_inferior_registers): Move to ...
16624 * win32-i386-low.c: ... here, and rename to ...
16625 (do_fetch_inferior_registers): ... this.
889bf7c5 16626 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16627 Go through the low target.
16628 (do_child_store_inferior_registers): Use regptr.
16629 (strwinerror): New function.
16630 (win32_create_inferior): Handle Windows CE.
16631 Use strwinerror instead of strerror on Windows error
16632 codes. Add program to the error output.
16633 Don't close the main thread handle on Windows CE.
16634 (win32_attach): Use coredll.dll on Windows CE.
16635 (win32_kill): Close current process and current
16636 thread handles.
16637 (win32_detach): Use coredll.dll on Windows CE.
16638 (win32_resume): Let low target handle debug registers, and
16639 step request.
16640 (handle_exception): Add/Remove initial breakpoint. Avoid
16641 non-existant WSTOPSIG on Windows CE.
16642 (win32_read_inferior_memory): Cast to remove warning.
16643 (win32_arch_string): Go through the low target.
16644 (initialize_low): Call set_breakpoint_data with the low
16645 target's breakpoint.
16646 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16647 FOP_REGNUM, mappings): Move to ...
16648 * win32-i386-low.c: ... here.
16649 * win32-low.c (win32_thread_info): Move to ...
16650 * win32-low.h: ... here.
16651 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16652 win32-arm-low.c and wincecompat.c.
16653 (all:): Add $EXEEXT.
16654 (install-only:): Likewise.
16655 (gdbserver:): Likewise.
16656 (gdbreplay:): Likewise.
16657 * config.in: Regenerate.
16658 * configure: Regenerate.
16659
41093d81
PA
166602007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16661
16662 * win32-low.c: Rename typedef thread_info to
16663 win32_thread_info throughout.
16664
544afa54
PA
166652007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16666
16667 * win32-i386-low.c: Rename to ...
16668 * win32-low.c: ... this.
16669 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16670 * Makefile.in: Likewise.
16671
bce7165d
PA
166722007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16673
16674 * remote-utils.c (monitor_output): Constify msg parameter.
16675 * server.h (monitor_output): Likewise.
16676 * win32-i386-low.c (handle_output_debug_string): New.
16677 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16678 handle_output_debug_string.
16679 (get_child_debug_event): Likewise.
16680
506c7aa0
DJ
166812007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16682
16683 * server.c (main): Correct strtoul check.
16684
42c81e2a
DJ
166852007-03-27 Jon Ringle <jon@ringle.org>
16686
16687 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16688
9453113a
DJ
166892007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16690
16691 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16692
64a69107
DJ
166932007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16694
16695 * terminal.h: Check HAVE_SGTTY_H.
16696
166972007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16698
16699 * remote-utils.c (remote_open): Print out the assigned port number.
16700
c74d0ad8
DJ
167012007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16702
16703 * remote-utils.c (monitor_output): New function.
16704 * server.c (debug_threads): Define here.
16705 (monitor_show_help): New function.
16706 (handle_query): Handle qRcmd.
16707 (main): Do not handle 'd' packet.
16708 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16709 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16710 of debug_threads.
16711
de7c3b4a
PA
167122007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16713
16714 * Makefile.in (EXEEXT): New.
16715 (clean): Use $(EXEEXT).
16716
ef57601b
PA
167172007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16718
16719 * target.h (target_ops): Rename send_signal to request_interrupt,
16720 and remove enum target_signal parameter.
16721 * linux-low.c (linux_request_interrupt): Rename from
16722 linux_send_signal, and always send SIGINT.
16723 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16724 and always send SIGINT.
16725 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16726 of send_signal.
16727 (input_interrupt): Likewise.
16728
820f2bda
PA
167292007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16730
16731 * server.c (get_features_xml): Check if target implemented
16732 arch_string.
16733 * win32-i386-low.c (win32_arch_string): New.
16734 (win32_target_ops): Add win32_arch_string as arch_string member.
16735
ab39bf24
UW
167362007-02-22 Markus Deuling <deuling@de.ibm.com>
16737
16738 * spu-low.c (spu_arch_string): New.
16739 (spu_target_ops): Add spu_arch_string.
16740
61ff6e04
DJ
167412007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16742
16743 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16744 * configure.ac: Do not check for terminal.h.
16745 * configure, config.in: Regenerated.
16746
fb1e4ffc
DJ
167472007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16748
16749 * Makefile.in (OBS): Add $(XML_BUILTIN).
16750 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16751 (clean): Update.
16752 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16753 (arm-with-iwmmxt.c): New.
16754 * config.in, configure: Regenerate.
16755 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16756 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16757 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16758 (arm*-*-linux*): Add iWMMXt and regset support.
16759 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16760 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16761 (arm_store_wmmxregset, target_regsets): New.
16762 * server.c (get_features_xml): Take annex argument. Check builtin
16763 XML documents.
16764 (handle_query): Handle multiple annexes.
16765
0f48aa01
DJ
167662007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16767
16768 * remote-utils.c [USE_WIN32API] (read, write): Define.
16769 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16770 write.
16771
23181151
DJ
167722007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16773
16774 * linux-i386-low.c (the_low_target): Set arch_string.
16775 * linux-x86-64-low.c (the_low_target): Likewise.
16776 * linux-low.c (linux_arch_string): New.
16777 (linux_target_ops): Add it.
16778 * linux-low.h (struct linux_target_ops): Add arch_string.
16779 * server.c (write_qxfer_response): Use const void * for DATA.
16780 (get_features_xml): New.
16781 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16782 * target.h (struct target_ops): Add arch_string method.
16783
9d606399
DJ
167842007-01-03 Denis Pilat <denis.pilat@st.com>
16785 Daniel Jacobowitz <dan@codesourcery.com>
16786
16787 * linux-low.c (linux_kill): Handle being called with no threads.
16788 * win32-i386-low.c (win32_kill): Likewise.
16789 (get_child_debug_event): Clear current_process_handle.
16790
167912006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16792 Daniel Jacobowitz <dan@codesourcery.com>
16793
16794 * remote-utils.c (remote_open): Check the type of specified
16795 serial port devices before opening them.
16796 * server.c (main): Kill the inferior if an error occurs during
16797 the first remote_open.
16798
a5e13d24
DJ
167992006-12-05 Markus Deuling <deuling@de.ibm.com>
16800
16801 * README: Update supported targets.
16802
186947f7
DJ
168032006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16804
16805 * Makefile.in (clean): Remove reg-mips64.c.
16806 (reg-mips64.c, reg-mips64.o): New rules.
16807 * configure.srv: Handle mips64. Include regset support for mips.
16808 * linux-mips-low.c (union mips_register): New.
16809 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16810 (mips_breakpoint, mips_breakpoint_at): Use int.
16811 (mips_collect_register, mips_supply_register)
16812 (mips_collect_register_32bit, mips_supply_register_32bit)
16813 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16814 (mips_store_fpregset, target_regsets): New.
16815 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16816
a13e2c95
UW
168172006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16818
16819 * configure.srv: Add target "spu*-*-*".
16820 * Makefile.in (clean): Remove reg-spu.c.
16821 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16822 * spu-low.c: New file.
16823
cb7283db
DJ
168242006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16825
16826 * configure.ac: Correct td_thr_tls_get_addr test.
16827 * configure: Regenerated.
16828
89be2091
DJ
168292006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16830
16831 * linux-low.c (linux_wait_for_event): Reformat. Use the
16832 pass_signals array.
16833 * remote-utils.c (decode_address_to_semicolon): New.
16834 * server.c (pass_signals, handle_general_set): New.
16835 (handle_query): Mention QPassSignals for qSupported.
16836 (main): Call handle_general_set.
16837 * server.h (pass_signals, decode_address_to_semicolon): New.
16838
000ef4f0
DJ
168392006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16840
16841 * server.c (handle_query): Correct error handling for read_auxv.
16842
b7149293
UW
168432005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16844
16845 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16846 and srv_linux_thread_db to yes.
16847 * linux-s390-low.c (s390_fill_gregset): New function.
16848 (target_regsets): Define data structure.
16849
dae5f5cf
DJ
168502006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16851
16852 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16853 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16854 * config.in, configure: Regenerated.
16855 * inferiors.c (gdb_id_to_thread): New function.
16856 (gdb_id_to_thread_id): Use it.
16857 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16858 * linux-low.h (struct process_info): Add th member.
16859 (thread_db_get_tls_address): New prototype.
16860 * remote-utils.c (decode_address): Make non-static.
16861 * server.c (handle_query): Handle qGetTLSAddr.
16862 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16863 * target.h (struct target_ops): Add get_tls_address.
16864 * thread-db.c (maybe_attach_thread): Save the thread handle.
16865 (thread_db_get_tls_address): New.
16866
32ca6d61
DJ
168672006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16868
16869 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16870 (linux_resume_one_process): Take a siginfo_t *. Update all
16871 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16872 (struct pending_signals): Add a siginfo_t.
16873 (linux_wait_for_process): Always set last_status.
16874 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16875 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16876 * linux-low.h (struct process_info): Add last_status.
16877
5ffff7c1
DJ
168782006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16879
16880 * remote-utils.c (try_rle): New function.
16881 (putpkt_binary): Use it.
16882
8695c747
DJ
168832006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16884
16885 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16886 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16887 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16888 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16889 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16890 point registers.
16891
290fadea
RS
168922006-08-08 Richard Sandiford <richard@codesourcery.com>
16893
16894 * server.c (terminal_fd): New variable.
16895 (old_foreground_pgrp): Likewise.
16896 (restore_old_foreground_pgrp): New function.
16897 (start_inferior): Record the terminal file descriptor in terminal_fd
16898 and its original foreground group in old_foreground_pgrp. Register
16899 restore_old_foreground_pgrp with atexit().
16900
9f2e1e63
DJ
169012006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16902
16903 * server.c (handle_query): Correct qPart to qXfer.
16904
b80864fb
DJ
169052006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16906
16907 * configure.ac: Check for more headers which are missing on
16908 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16909 * configure.srv: Add Cygwin and mingw32.
16910 * remote-utils.c: Don't include headers unconditionally which
16911 are missing on mingw32. Include <winsock.h> for mingw32.
16912 (remote_open): Adjust for mingw32 support. Flush
16913 standard error after writing to it.
16914 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16915 (unblock_async_io, enable_async_io, disable_async_io)
16916 (readchar, getpkt): Update for Winsock support.
16917 (prepare_resume_reply): Expect a protocol signal number.
16918 * server.c: Disable <sys/wait.h> on mingw32.
16919 (start_inferior): Adjust for mingw32 support. Flush
16920 standard error after writing to it.
16921 (attach_inferior): Likewise. Use protocol signal
16922 numbers.
16923 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16924 and names.
16925 * win32-i386-low.c: New file.
16926 * Makefile.in (XM_CLIBS): Set.
16927 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16928 (win32-i386-low.o): New dependency rule.
16929 * linux-low.c (linux_wait): Use target signal numbers.
16930 * target.h (struct target_ops): Doc fix.
16931 * server.h (target_signal_to_name): New prototype.
16932 * gdbreplay.c: Don't include headers unconditionally which
16933 are missing on mingw32. Include <winsock.h> for mingw32.
16934 (remote_close, remote_open): Adjust for Winsock support.
16935 * configure, config.in: Regenerated.
16936
0876f84a
DJ
169372006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16938
16939 * server.c (decode_xfer_read, write_qxfer_response): New.
16940 (handle_query): Take a packet length argument. Handle
16941 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16942 the qSupported response.
16943 (main): Update call to handle_query.
16944
01f9e8fa
DJ
169452006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16946
16947 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16948 (putpkt_binary): Renamed from putpkt and adjusted for binary
16949 data.
16950 (putpkt): New wrapper for putpkt_binary.
16951 (readchar): Don't mask off the high bit.
16952 (decode_X_packet): New function.
16953 * server.c (main): Call putpkt_binary if a handler sets the packet
16954 length. Save the length of the incoming packet. Handle 'X'.
16955 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16956
be2a5f71
DJ
169572006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16958
16959 * server.c (handle_query): Handle qSupported.
16960
ea025f5f
DJ
169612006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16962
16963 * remote-utils.c (all_symbols_looked_up): New variable.
16964 (look_up_one_symbol): Check it.
16965 * server.h (look_up_one_symbol): New declaration.
16966 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16967
9308fc88
DJ
169682006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16969
16970 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16971 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16972 (PTRACE_GET_THREAD_AREA): Define.
16973 (ps_get_thread_area): New function.
16974
52fb6437
NS
169752006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16976
16977 * configure.srv (m68k*-*-uclinux*): New target.
16978 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16979 (linux_resume_one_process): Remove extraneous cast.
16980 (linux_read_offsets): New.
16981 (linux_target_op): Add linux_read_offsets on mmuless systems.
16982 * server.c (handle_query): Add qOffsets logic.
16983 * target.h (struct target_ops): Add read_offsets.
16984
21b0f40c
DJ
169852006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16986
16987 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16988 (PTRACE_GET_THREAD_AREA): Define.
16989 (ps_get_thread_area): New function.
16990 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16991 (linux-x86-64-low.o): Update.
16992
0050a760
DJ
169932006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16994
16995 * configure.ac: Remove checks for prfpregset_t.
16996 * gdb_proc_service.h: New file.
16997 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16998 new "gdb_proc_service.h".
16999 * proc-service.c: Likewise.
17000 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17001 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17002 * Makefile.in (gdb_proc_service_h): Updated.
17003 * configure, config.in: Regenerated.
17004
b92a518e
DJ
170052006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17006
17007 * remote-utils.c (prepare_resume_reply): Move declaration
17008 of gdb_id_from_wait to the top of the block.
17009
545587ee
DJ
170102006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17011
17012 * linux-low.c (regsets_store_inferior_registers): Read the regset
17013 from the target before filling it.
17014
9db87ebd
DJ
170152006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17016
17017 * server.c (attach_inferior): Return SIGTRAP for a successful
17018 attach.
17019
dd24457d
DJ
170202006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17021
17022 * Makefile.in (OBS): Add version.o.
17023 (STAGESTUFF): Delete.
17024 (version.o): Add dependencies.
17025 (version.c): Replace rule.
17026 (clean): Remove version.c.
17027 * server.c (gdbserver_version): New.
17028 (gdbserver_usage): Use printf.
17029 (main): Handle --version and --help.
17030 * server.h (version, host_name): Add declarations.
17031
6f0f660e
EZ
170322005-12-23 Eli Zaretskii <eliz@gnu.org>
17033
889bf7c5
PA
17034 * linux-arm-low.c:
17035 * linux-arm-low.c:
17036 * inferiors.c:
17037 * i387-fp.h:
17038 * i387-fp.c:
17039 * gdbreplay.c:
17040 * regcache.c:
17041 * proc-service.c:
17042 * mem-break.h:
17043 * mem-break.c:
17044 * linux-x86-64-low.c:
17045 * linux-sh-low.c:
17046 * linux-s390-low.c:
17047 * linux-ppc64-low.c:
17048 * linux-ppc-low.c:
17049 * linux-mips-low.c:
17050 * linux-m68k-low.c:
17051 * linux-m32r-low.c:
17052 * linux-low.h:
17053 * linux-low.c:
17054 * linux-ia64-low.c:
17055 * linux-i386-low.c:
17056 * linux-crisv32-low.c:
17057 * thread-db.c:
17058 * terminal.h:
17059 * target.h:
17060 * target.c:
17061 * server.h:
17062 * server.c:
17063 * remote-utils.c:
17064 * regcache.h:
17065 * utils.c:
17066 * Makefile.in:
17067 * configure.ac:
6f0f660e
EZ
17068 * gdbserver.1: Add (C) after Copyright. Update the FSF
17069 address.
17070
9d1fb177
DJ
170712005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17072
17073 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17074 (arm_breakpoint_at): Recognize both breakpoints.
17075 (the_low_target): Use the correct breakpoint instruction.
17076
011a70c2
DJ
170772005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17078
17079 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17080 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17081 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17082 (the_low_target): Update.
17083
7fb85e41
AS
170842005-10-25 Andreas Schwab <schwab@suse.de>
17085
17086 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17087
17088 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17089 (ia64_num_regs): Reduce to 462.
17090
3db0444b
DJ
170912005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17092
17093 * acinclude.m4: Correct quoting.
17094 * aclocal.m4: Regenerated.
17095
17096 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17097 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17098 (thread_db_init): Call thread_db_err_str.
17099 * configure.ac: Check for TD_VERSION.
17100 * config.in, configure: Regenerated.
17101
bee0189a
DJ
171022005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17103
17104 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17105
e9d25b98
DJ
171062005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17107
17108 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17109 is not available. Define HAVE_PTRACE_GETREGS if it is.
17110 * config.in, configure: Regenerated.
17111 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17112 * linux-i386-low.c, linux-m68k-low.c: Update to use
17113 HAVE_PTRACE_GETREGS.
17114 * linux-low.c (regsets_fetch_inferior_registers)
17115 (regsets_store_inferior_registers): Only return 0 if we processed
17116 GENERAL_REGS.
17117 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17118 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17119
a06660f7
DJ
171202005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17121
17122 * inferiors.c (struct thread_info): Add gdb_id.
17123 (add_thread): Add gdb_id argument.
17124 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17125 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17126 calls to add_thread.
17127 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17128 * server.c (handle_query): Use thread_to_gdb_id.
17129 (handle_v_cont, main): Use gdb_id_to_thread_id.
17130 * server.h (add_thread): Update prototype.
17131 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17132 prototypes.
17133
5a1f5858
DJ
171342005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17135
17136 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17137 left-padded registers.
17138 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17139 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17140
e122f1f5
SE
171412005-07-01 Steve Ellcey <sje@cup.hp.com>
17142
17143 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17144 * configure: Regenerate.
17145 * config.in: Regenerate.
17146 * server.h (NEED_DECLARATION_STRERROR):
17147 Replace with !HAVE_DECL_STRERROR.
17148
d592fa2f
DJ
171492005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17150
17151 * linux-low.c (linux_wait, linux_send_signal): Don't test
17152 an unsigned long variable for > 0 if it could be MAX_ULONG.
17153 * server.c (myresume): Likewise.
17154 * target.c (set_desired_inferior): Likewise.
17155
ccbd4912
MK
171562005-06-13 Mark Kettenis <kettenis@gnu.org>
17157
17158 * configure.ac: Simplify and improve check for socklen_t.
17159 * configure, config.in: Regenerate.
17160
f450004a
DJ
171612005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17162
17163 * acconfig.h: Remove.
17164 * configure.ac: Add a test for socklen_t. Use three-argument
17165 AC_DEFINE throughout.
17166 * config.in: Regenerated using autoheader 2.59.
17167 * configure: Regenerated.
17168
17169 * gdbreplay.c (socklen_t): Provide a default.
17170 (remote_open): Use socklen_t.
17171 * remote-utils.c (socklen_t): Provide a default.
17172 (remote_open): Use socklen_t.
17173 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17174 unsigned char.
17175
17176 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17177 char for buffers.
17178 * linux-low.c (linux_read_memory, linux_write_memory)
17179 (linux_read_auxv): Likewise.
17180 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17181 (check_mem_write): Likewise.
17182 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17183 Likewise.
17184 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17185 (registers_from_string, register_data): Likewise.
17186 * server.c (handle_query, main): Likewise.
17187 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17188 (decode_M_packet): Likewise.
17189 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17190 * target.h (struct target_ops): Update read_memory, write_memory,
17191 and read_auxv.
17192 (read_inferior_memory, write_inferior_memory): Update.
17193 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17194 to unsigned char *.
17195 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17196 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17197 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17198 linux-s390-low.c, linux-sh-low.c: Update for changes in
17199 read_inferior_memory and the_low_target->breakpoint.
17200
eee84df1
DJ
172012005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17202
17203 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17204 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17205 * configure.srv: Add powerpc64-*-linux*.
17206 * linux-ppc64-low.c: New file.
17207
45b134e5
OF
172082005-05-23 Orjan Friberg <orjanf@axis.com>
17209
17210 * linux-cris-low.c: New file with support for CRIS.
17211 * linux-crisv32-low.c: Ditto for CRISv32.
17212 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17213 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17214 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17215 reg-crisv32.o, and reg-crisv32.c to make rules.
17216 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17217 recognized targets.
17218
48d93c75
UW
172192005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17220
17221 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17222 of sizeof (PTRACE_XFER_TYPE).
17223 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17224
e013ee27
OF
172252005-05-12 Orjan Friberg <orjanf@axis.com>
17226
889bf7c5 17227 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17228 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17229 pointers for hardware watchpoint support.
17230 * linux-low.h (struct linux_target_ops): Ditto.
17231 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17232 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17233 to linux_target_ops.
17234 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17235 reply packet.
17236 * server.c (main): Recognize 'Z' and 'z' packets.
17237
b0ded00b
UW
172382005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17239
17240 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17241 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17242 (the_low_target): Add new members.
17243
8643e2ad
DJ
172442005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17245
17246 * proc-service.c (ps_lgetregs): Search all_processes instead of
17247 all_threads.
17248
fc620387
DJ
172492005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17250
17251 * server.c (start_inferior): Change return type to int.
17252 (attach_inferior): Change sigptr to int *.
17253 (handle_v_cont, handle_v_requests): Change signal to int *.
17254 (main): Change signal to int.
17255
172562005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17257
17258 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17259 * configure.srv: Add m32r*-*-linux*.
17260 * linux-m32r-low.c: New file.
17261
e0e76420
DJ
172622005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17263
17264 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17265
a1928bad
DJ
172662005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17267
17268 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17269 Take unsigned long arguments for PIDs.
17270 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17271 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17272 (wait_for_sigstop, linux_resume_one_process)
17273 (regsets_fetch_inferior_registers, linux_send_signal)
17274 (linux_read_auxv): Likewise. Update the types of variables holding
17275 PIDs. Update format string specifiers.
17276 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17277 * remote-utils.c (prepare_resume_reply): Likewise.
17278 * server.c (cont_thread, general_thread, step_thread)
17279 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17280 unsigned long.
17281 (handle_query): Update format specifiers.
17282 (handle_v_cont, main): Use strtoul for thread IDs.
17283 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17284 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17285 (general_thread, step_thread, thread_from_wait)
17286 (old_thread_from_wait): Update.
17287 * target.h (struct thread_resume): Use unsigned long for THREAD.
17288 (struct target_ops): Use unsigned long for arguments to attach and
17289 thread_alive.
17290
dcdb98d2
DJ
172912005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17292
17293 * acinclude.m4: Include bfd/bfd.m4 directly.
17294 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17295 <agriffis@toolchain.org>.
17296 * aclocal.m4, configure: Regenerated.
17297
bec39cab
AC
172982005-01-07 Andrew Cagney <cagney@gnu.org>
17299
17300 * configure.ac: Rename configure.in, require autoconf 2.59.
17301 * configure: Re-generate.
17302
434c4c77
DJ
173032004-12-08 Daniel Jacobowitz <dan@debian.org>
17304
17305 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17306 LIBS when finished.
17307 * aclocal.m4: Regenerated.
17308 * configure: Regenerated.
17309
db1d3e1b
AS
173102004-11-21 Andreas Schwab <schwab@suse.de>
17311
17312 * linux-m68k-low.c (m68k_num_gregs): Define.
17313 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17314 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17315 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17316 (m68k_breakpoint_at): New. Add to the_low_target.
17317
17318 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17319 srv_linux_thread_db to yes.
17320
43360365
JB
173212004-10-20 Joel Brobecker <brobecker@gnat.com>
17322
17323 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17324 (ARCH_SET_FS): Likewise.
17325 (ARCH_GET_FS): Likewise.
17326 (ARCH_GET_GS): Likewise.
17327
fd500816
DJ
173282004-10-16 Daniel Jacobowitz <dan@debian.org>
17329
17330 * linux-i386-low.c (ps_get_thread_area): New.
17331 * linux-x86-64-low.c (ps_get_thread_area): New.
17332 * linux-low.c: Include <sys/syscall.h>.
17333 (linux_kill_one_process): Don't kill the first thread here.
17334 (linux_kill): Kill the first thread here.
17335 (kill_lwp): New function.
17336 (send_sigstop, linux_send_signal): Use it.
17337 * proc-service.c: Clean up #ifdefs.
17338 (fpregset_info): Delete.
17339 (ps_lgetregs): Update and enable implementation.
17340 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17341 implementations.
17342 * remote-utils.c (struct sym_cache, symbol_cache): New.
17343 (input_interrupt): Print a clearer message.
17344 (async_io_enabled): New variable.
17345 (enable_async_io, disable_async_io): Use it. Update comments.
17346 (look_up_one_symbol): Use the symbol cache.
17347 * thread-db.c (thread_db_look_up_symbols): New function.
17348 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17349
f6de3c42
DJ
173502004-10-16 Daniel Jacobowitz <dan@debian.org>
17351
17352 * configure.in: Test for -rdynamic.
17353 * configure: Regenerated.
17354 * Makefile (INTERNAL_LDFLAGS): New.
17355 (gdbserver, gdbreplay): Use it.
17356
2c0fc042
AC
173572004-09-02 Andrew Cagney <cagney@gnu.org>
17358
17359 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17360
075b3282
DJ
173612004-03-23 Daniel Jacobowitz <drow@mvista.com>
17362
17363 * linux-low.c (linux_wait): Clear all_processes list also.
17364
fa6a77dc
DJ
173652004-03-12 Daniel Jacobowitz <drow@mvista.com>
17366
17367 * linux-low.c: Include <errno.h>. Remove extern declaration of
17368 errno.
17369
6d782a97
DJ
173702004-03-12 Daniel Jacobowitz <drow@mvista.com>
17371
17372 * gdbreplay.c, server.h, utils.c: Update copyright years.
17373
3a7fb99b
DJ
173742004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17375
17376 * server.c (main): Print child status or termination signal from
17377 variable 'signal', not 'sig'.
17378
c3e735a6
DJ
173792004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17380
17381 * linux-low.c (linux_read_memory): Change return type to
17382 int. Check for and return error from ptrace().
17383 * target.c (read_inferior_memory): Change return type to int. Pass
17384 back return status from the_target->read_memory().
17385 * target.h (struct target_ops): Adapt *read_memory() prototype.
17386 Update comment.
17387 (read_inferior_memory): Adapt prototype.
17388 * server.c (main): Return an error packet if
17389 read_inferior_memory() returns an error.
17390
a59d1c82
DJ
173912004-03-04 Daniel Jacobowitz <drow@mvista.com>
17392
17393 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17394 Unify with other clean targets.
17395
dc3f8883
DJ
173962004-02-29 Daniel Jacobowitz <drow@mvista.com>
17397
17398 * server.c (handle_v_cont): Call set_desired_inferior.
17399
89a208da
DJ
174002004-02-29 Daniel Jacobowitz <drow@mvista.com>
17401
17402 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17403
62ea82f5
DJ
174042004-02-29 Daniel Jacobowitz <drow@mvista.com>
17405
17406 * linux-low.c (linux_wait): Unblock async I/O.
17407 (linux_resume): Block and enable async I/O.
17408 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17409 * server.h (block_async_io, unblock_async_io): Add prototypes.
17410
6910d122
DJ
174112004-02-29 Daniel Jacobowitz <drow@mvista.com>
17412
17413 * remote-utils.c (remote_open): Print a status notice after
17414 opening a TCP port.
17415 * server.c (attach_inferior): Print a status notice after
17416 attaching.
17417
174182004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17419
17420 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17421
c89dc5d4
DJ
174222004-02-26 Daniel Jacobowitz <drow@mvista.com>
17423
17424 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17425 error packet.
17426 * server.c, target.h: Update copyright years.
17427
4b8dad4a
RM
174282004-02-25 Roland McGrath <roland@redhat.com>
17429
17430 * target.h (struct target_ops): New member `read_auxv'.
17431 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17432 * linux-low.c (linux_read_auxv): New function.
17433 (linux_target_ops): Initialize `read_auxv' member to that.
17434
d7446758
JB
174352004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17436
17437 Committed by Jim Blandy <jimb@redhat.com>.
17438
17439 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17440 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17441 instead of GPR_SIZE to distiguish s390 and s390x targets.
17442
5544ad89
DJ
174432004-01-31 Daniel Jacobowitz <drow@mvista.com>
17444
17445 * linux-low.c: Update copyright year.
17446 (check_removed_breakpoint): Clear pending_is_breakpoint.
17447 (linux_set_resume_request, linux_queue_one_thread)
17448 (resume_status_pending_p): New functions.
17449 (linux_continue_one_thread): Use process->resume.
17450 (linux_resume): Only resume threads if there are no pending events.
17451 * linux-low.h (struct process_info): Add resume request
17452 pointer.
17453
2a68b70e
DJ
174542004-01-30 Daniel Jacobowitz <drow@mvista.com>
17455
17456 * regcache.c (new_register_cache): Clear the allocated register
17457 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17458
64386c31
DJ
174592003-10-13 Daniel Jacobowitz <drow@mvista.com>
17460
17461 * linux-low.c (linux_resume): Take a struct thread_resume *
17462 argument.
17463 (linux_wait): Update call.
17464 (resume_ptr): New static variable.
17465 (linux_continue_one_thread): Renamed from
17466 linux_continue_one_process. Use resume_ptr.
17467 (linux_resume): Use linux_continue_one_thread.
17468 * server.c (handle_v_cont, handle_v_requests): New functions.
17469 (myresume): New function.
17470 (main): Handle 'v' case.
17471 * target.h (struct thread_resume): New type.
17472 (struct target_ops): Change argument of "resume" to struct
17473 thread_resume *.
17474 (myresume): Delete macro.
17475
c938e9b0
L
174762003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17477
17478 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17479 (uninstall): Support DESTDIR.
17480
7f313d07
BC
17481Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17482
17483 * configure.srv: Add xscale*linux copy of arm*linux entry.
17484
3b2fc2ea
DJ
174852003-07-24 Daniel Jacobowitz <drow@mvista.com>
17486
17487 * linux-arm-low.c (arm_reinsert_addr): New function.
17488 (the_low_target): Add arm_reinsert_addr.
17489
1c0a559e
MK
174902003-07-08 Mark Kettenis <kettenis@gnu.org>
17491
17492 * mem-break.c: Remove whitespace at end of file.
17493
43d5792c
DJ
174942003-06-28 Daniel Jacobowitz <drow@mvista.com>
17495
17496 * configure.in: Check whether we need to prototype strerror.
17497 * server.h: Optionally prototype strerror.
17498 * gdbreplay.c (perror_with_name): Use strerror.
17499 * linux-low.c (linux_attach_lwp): Use strerror.
17500 * utils.c (perror_with_name): Use strerror.
17501 * config.in, configure: Regenerated.
17502
c8a86edf
DJ
175032003-06-28 Daniel Jacobowitz <drow@mvista.com>
17504
17505 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17506 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17507
73d37363
DJ
175082003-06-20 Daniel Jacobowitz <drow@mvista.com>
17509
17510 * Makefile.in (SFILES): Update.
17511 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17512 low-sun3.c: Remove files.
17513
6ad8ae5c
DJ
175142003-06-17 Daniel Jacobowitz <drow@mvista.com>
17515
17516 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17517 (linux_detach_one_process, linux_detach): New functions.
17518 (linux_target_ops): Add linux_detach.
17519 * server.c (main): Handle 'D' packet.
17520 * target.h (struct target_ops): Add "detach" member.
17521 (detach_inferior): Define.
17522
1581182a
MK
175232003-06-13 Mark Kettenis <kettenis@gnu.org>
17524
17525 From Kelley Cook <kelleycook@wideopenwest.com>:
17526 * configure.srv: Accept i[34567]86 variants.
17527
e5379b03
DJ
175282003-06-05 Daniel Jacobowitz <drow@mvista.com>
17529
17530 * linux-low.c (linux_wait_for_event): Correct comment typos.
17531 (linux_resume_one_process): Call check_removed_breakpoint.
17532 (linux_send_signal): New function.
17533 (linux_target_ops): Add linux_send_signal.
17534 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17535 of kill.
17536 * target.h (struct target_ops): Add send_signal.
17537
2ff29de4
JB
175382003-05-29 Jim Blandy <jimb@redhat.com>
17539
17540 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17541 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17542 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17543 away part of the register's value.
17544
254787d4
DJ
175452003-03-26 Daniel Jacobowitz <drow@mvista.com>
17546
17547 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17548 (linux_wait_for_event, linux_init_signals): Likewise.
17549
94e10508
DJ
175502003-03-17 Daniel Jacobowitz <drow@mvista.com>
17551
17552 * configure.in: Check for stdlib.h.
17553 * configure: Regenerated.
17554 * config.in: Regenerated.
17555
4c0711e0
DJ
175562003-01-04 Andreas Schwab <schwab@suse.de>
17557
17558 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17559
ef66e766
AC
175602003-01-02 Andrew Cagney <ac131313@redhat.com>
17561
17562 * Makefile.in: Remove obsolete code.
17563
a1358604
DJ
175642002-11-20 Daniel Jacobowitz <drow@mvista.com>
17565
17566 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17567 defined(PT_FPR0_HI).
17568
23ce3b1c
DJ
175692002-11-17 Stuart Hughes <seh@zee2.com>
17570
17571 * linux-arm-low.c (arm_num_regs): Increase.
17572 (arm_regmap): Include status register.
17573
175742002-11-17 Daniel Jacobowitz <drow@mvista.com>
17575
17576 * linux-low.c (register_addr): Remove incorrect -1 check.
17577
a9fa9f7d
DJ
175782002-08-29 Daniel Jacobowitz <drow@mvista.com>
17579
17580 * linux-low.c (linux_create_inferior): Call setpgid. Return
17581 the new PID.
17582 (unstopped_p, linux_signal_pid): Remove.
17583 (linux_target_ops): Remove linux_signal_pid.
17584 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17585 global instead of target method.
17586 * target.h (struct target_ops): Remove signal_pid. Update comment
17587 for create_inferior.
17588 * server.c (signal_pid): New variable.
17589 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17590 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17591 (attach_inferior): Set signal_pid.
17592
17574093
DJ
175932002-08-23 Daniel Jacobowitz <drow@mvista.com>
17594
17595 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17596
175972002-08-20 Jim Blandy <jimb@redhat.com>
17598
17599 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17600 default for this.
17601
176022002-08-01 Andrew Cagney <cagney@redhat.com>
17603
17604 * Makefile.in: Make chill references obsolete.
17605
176062002-07-24 Kevin Buettner <kevinb@redhat.com>
17607
17608 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17609 * configure: Regenerate.
17610 * config.in: Regenerate.
17611
176122002-07-09 David O'Brien <obrien@FreeBSD.org>
17613
17614 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17615 (perror_with_name, remote_close, remote_open, expect, play): Static.
17616
176172002-07-04 Michal Ludvig <mludvig@suse.cz>
17618
4b8dad4a 17619 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17620 byte offsets instead of an array of indexes.
17621 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17622
176232002-06-13 Daniel Jacobowitz <drow@mvista.com>
17624
17625 * regcache.c: Add comment.
17626
176272002-06-11 Daniel Jacobowitz <drow@mvista.com>
17628
17629 * thread-db.c: New file.
17630 * proc-service.c: New file.
17631 * acinclude.m4: New file.
17632 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17633 proc-service.o, and thread-db.o.
17634 (linux-low.o): Add USE_THREAD_DB.
17635 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17636 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17637 * aclocal.m4: Regenerated.
17638 * config.in: Regenerated.
17639 * configure: Regenerated.
17640 * configure.in: Check for proc_service.h, sys/procfs.h,
17641 thread_db.h, and linux/elf.h headrs.
17642 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17643 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17644 Check for -lthread_db and thread support.
17645 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17646 PowerPC, and SuperH.
17647 * i387-fp.c: Constify arguments.
17648 * i387-fp.h: Likewise.
17649 * inferiors.c: (struct thread_info): Renamed from
17650 `struct inferior_info'. Remove PID member. Use generic inferior
17651 list header. All uses updated.
17652 (inferiors, signal_pid): Removed.
17653 (all_threads): New variable.
17654 (get_thread): Define.
17655 (add_inferior_to_list): New function.
17656 (for_each_inferior): New function.
17657 (change_inferior_id): New function.
17658 (add_inferior): Removed.
17659 (remove_inferior): New function.
17660 (add_thread): New function.
17661 (free_one_thread): New function.
17662 (remove_thread): New function.
17663 (clear_inferiors): Use for_each_inferior and free_one_thread.
17664 (find_inferior): New function.
17665 (find_inferior_id): New function.
17666 (inferior_target_data): Update argument type.
17667 (set_inferior_target_data): Likewise.
17668 (inferior_regcache_data): Likewise.
17669 (set_inferior_regcache_data): Likewise.
17670 * linux-low.c (linux_bp_reinsert): Remove.
17671 (all_processes, stopping_threads, using_thrads)
17672 (struct pending_signals, debug_threads, pid_of): New.
17673 (inferior_pid): Replace with macro.
17674 (struct inferior_linux_data): Remove.
17675 (get_stop_pc, add_process): New functions.
17676 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17677 Use add_process and add_thread.
17678 (linux_attach_lwp): New function, based on old linux_attach. Use
17679 add_process and add_thread. Set stop_expected for new threads.
17680 (linux_attach): New function.
17681 (linux_kill_one_process): New function.
17682 (linux_kill): Kill all LWPs.
17683 (linux_thread_alive): Use find_inferior_id.
17684 (check_removed_breakpoints, status_pending_p): New functions.
17685 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17686 Update. Use WNOHANG. Wait for cloned processes also. Update process
17687 struct for the found process.
17688 (linux_wait_for_event): New function.
17689 (linux_wait): Use it. Support LWPs.
17690 (send_sigstop, wait_for_sigstop, stop_all_processes)
17691 (linux_resume_one_process, linux_continue_one_process): New functions.
17692 (linux_resume): Support LWPs.
17693 (REGISTER_RAW_SIZE): Remove.
17694 (fetch_register): Use register_size instead. Call supply_register.
17695 (usr_store_inferior_registers): Likewise. Call collect_register.
17696 Fix recursive case.
17697 (regsets_fetch_inferior_registers): Improve error message.
17698 (regsets_store_inferior_registers): Add debugging.
17699 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17700 (unstopped_p, linux_signal_pid): New functions.
17701 (linux_target_ops): Add linux_signal_pid.
17702 (linux_init_signals): New function.
17703 (initialize_low): Call it. Initialize using_threads.
17704 * regcache.c (inferior_regcache_data): Add valid
17705 flag.
17706 (get_regcache): Fetch registers lazily. Add fetch argument
17707 and update all callers.
17708 (regcache_invalidate_one, regcache_invalidate): New
17709 functions.
17710 (new_register_cache): Renamed from create_register_cache.
17711 Return the new regcache.
17712 (free_register_cache): Change argument to a void *.
17713 (registers_to_string, registers_from_string): Call get_regcache
17714 with fetch flag set.
17715 (register_data): Make static. Pass fetch flag to get_regcache.
17716 (supply_register): Call get_regcache with fetch flag clear.
17717 (collect_register): Call get_regcache with fetch flag set.
17718 (collect_register_as_string): New function.
17719 * regcache.h: Update.
17720 * remote-utils.c (putpkt): Flush after debug output and use
17721 stderr.
17722 Handle input interrupts while waiting for an ACK.
17723 (input_interrupt): Use signal_pid method.
17724 (getpkt): Flush after debug output and use stderr.
17725 (outreg): Use collect_register_as_string.
17726 (new_thread_notify, dead_thread_notify): New functions.
17727 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17728 and general_thread.
17729 (look_up_one_symbol): Flush after debug output.
17730 * server.c (step_thread, server_waiting): New variables.
17731 (start_inferior): Don't use signal_pid. Update call to mywait.
17732 (attach_inferior): Update call to mywait.
17733 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17734 (main): Don't fetch/store registers explicitly. Use
17735 set_desired_inferior. Support proposed ``Hs'' packet. Update
17736 calls to mywait.
17737 * server.h: Update.
17738 (struct inferior_list, struct_inferior_list_entry): New.
17739 * target.c (set_desired_inferior): New.
17740 (write_inferior_memory): Constify.
17741 (mywait): New function.
17742 * target.h: Update.
17743 (struct target_ops): New signal_pid method.
17744 (mywait): Removed macro, added prototype.
17745
17746 * linux-low.h (regset_func): Removed.
17747 (regset_fill_func, regset_store_func): New.
17748 (enum regset_type): New.
17749 (struct regset_info): Add type field. Use new operation types.
17750 (struct linux_target_ops): stop_pc renamed to get_pc.
17751 Add decr_pc_after_break and breakpoint_at.
17752 (get_process, get_thread_proess, get_process_thread)
17753 (strut process_info, all_processes, linux_attach_lwp)
17754 (thread_db_init): New.
17755
17756 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17757 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17758 (the_low_target): Add new members.
17759 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17760 (i386_store_fpxregset): Constify.
17761 (target_regsets): Add new kind identifier.
17762 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17763 (i386_set_pc): Add debugging.
17764 (i386_breakpoint_at): New function.
17765 (the_low_target): Add new members.
17766 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17767 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17768 (mips_breakpoint_at): New.
17769 (the_low_target): Add new members.
17770 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17771 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17772 (the_low_target): Add new members.
17773 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17774 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17775 (the_low_target): Add new members.
17776 * linux-x86-64-low.c (target_regsets): Add new kind
17777 identifier.
17778
177792002-05-15 Daniel Jacobowitz <drow@mvista.com>
17780
17781 From Martin Pool <mbp@samba.org>:
17782 * server.c (gdbserver_usage): New function.
17783 (main): Call it.
17784
177852002-05-14 Daniel Jacobowitz <drow@mvista.com>
17786
17787 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17788 stop_at -> stop_pc.
17789
177902002-05-04 Andrew Cagney <ac131313@redhat.com>
17791
17792 * Makefile.in: Remove obsolete code.
17793
177942002-04-24 Michal Ludvig <mludvig@suse.cz>
17795
17796 * linux-low.c (regsets_fetch_inferior_registers),
17797 (regsets_store_inferior_registers): Removed cast to int from
17798 ptrace() calls.
17799 * regcache.h: Added declaration of struct inferior_info.
17800
178012002-04-20 Daniel Jacobowitz <drow@mvista.com>
17802
17803 * inferiors.c (struct inferior_info): Add regcache_data.
17804 (add_inferior): Call create_register_cache.
17805 (clear_inferiors): Call free_register_cache.
17806 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17807 * regcache.c (struct inferior_regcache_data): New.
17808 (registers): Remove.
17809 (get_regcache): New function.
17810 (create_register_cache, free_register_cache): New functions.
17811 (set_register_cache): Don't initialize the register cache here.
17812 (registers_to_string, registers_from_string, register_data): Call
17813 get_regcache.
17814 * regcache.h: Add prototypes.
17815 * server.h: Likewise.
17816
178172002-04-20 Daniel Jacobowitz <drow@mvista.com>
17818
17819 * mem-break.c: New file.
17820 * mem-break.h: New file.
17821 * Makefile.in: Add mem-break.o rule; update server.h
17822 dependencies.
17823 * inferiors.c (struct inferior_info): Add target_data
17824 member.
17825 (clear_inferiors): Free target_data member if set.
17826 (inferior_target_data, set_inferior_target_data): New functions.
17827 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17828 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17829 * linux-low.c (linux_bp_reinsert): New variable.
17830 (struct inferior_linux_data): New.
17831 (linux_create_inferior): Use set_inferior_target_data.
17832 (linux_attach): Likewise. Call add_inferior.
17833 (linux_wait_for_one_inferior): New function.
17834 (linux_wait): Call it.
17835 (linux_write_memory): Add const.
17836 (initialize_low): Call set_breakpoint_data.
17837 * linux-low.h (struct linux_target_ops): Add breakpoint
17838 handling members.
17839 * server.c (attach_inferior): Remove extra add_inferior
17840 call.
17841 * server.h: Include mem-break.h. Update inferior.c
17842 prototypes.
17843 * target.c (read_inferior_memory)
17844 (write_inferior_memory): New functions.
17845 * target.h (read_inferior_memory)
17846 (write_inferior_memory): Change macros to prototypes.
17847 (struct target_ops): Update comments. Add const to write_memory
17848 definition.
17849
178502002-04-11 Daniel Jacobowitz <drow@mvista.com>
17851
17852 * linux-low.c (usr_store_inferior_registers): Support
17853 registers which are allowed to fail to store.
17854 * linux-low.h (linux_target_ops): Likewise.
17855 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17856 (ppc_cannot_store_register): FPSCR may not be storable.
17857
178582002-04-09 Daniel Jacobowitz <drow@mvista.com>
17859
17860 * server.h: Include <string.h> if HAVE_STRING_H.
17861 * ChangeLog: Correct paths in last ChangeLog entry.
17862
178632002-04-09 Daniel Jacobowitz <drow@mvista.com>
17864
17865 * linux-low.h: Remove obsolete prototypes.
17866 (struct linux_target_ops): New.
17867 (extern the_low_target): New.
17868 * linux-low.c (num_regs, regmap): Remove declarations.
17869 (register_addr): Use the_low_target explicitly.
17870 (fetch_register): Likewise.
17871 (usr_fetch_inferior_registers): Likewise.
17872 (usr_store_inferior_registers): Likewise.
17873 * linux-arm-low.c (num_regs): Remove.
17874 (arm_num_regs): Define.
17875 (arm_regmap): Renamed from regmap, made static.
17876 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17877 made static.
17878 (arm_cannot_store_register): Renamed from cannot_store_register,
17879 made static.
17880 (the_low_target): New.
17881 * linux-i386-low.c (num_regs): Remove.
17882 (i386_num_regs): Define.
17883 (i386_regmap): Renamed from regmap, made static.
17884 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17885 made static.
17886 (i386_cannot_store_register): Renamed from cannot_store_register,
17887 made static.
17888 (the_low_target): New.
17889 * linux-ia64-low.c (num_regs): Remove.
17890 (ia64_num_regs): Define.
17891 (ia64_regmap): Renamed from regmap, made static.
17892 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17893 made static.
17894 (ia64_cannot_store_register): Renamed from cannot_store_register,
17895 made static.
17896 (the_low_target): New.
17897 * linux-m68k-low.c (num_regs): Remove.
17898 (m68k_num_regs): Define.
17899 (m68k_regmap): Renamed from regmap, made static.
17900 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17901 made static.
17902 (m68k_cannot_store_register): Renamed from cannot_store_register,
17903 made static.
17904 (the_low_target): New.
17905 * linux-mips-low.c (num_regs): Remove.
17906 (mips_num_regs): Define.
17907 (mips_regmap): Renamed from regmap, made static.
17908 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17909 made static.
17910 (mips_cannot_store_register): Renamed from cannot_store_register,
17911 made static.
17912 (the_low_target): New.
17913 * linux-ppc-low.c (num_regs): Remove.
17914 (ppc_num_regs): Define.
17915 (ppc_regmap): Renamed from regmap, made static.
17916 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17917 made static.
17918 (ppc_cannot_store_register): Renamed from cannot_store_register,
17919 made static.
17920 (the_low_target): New.
17921 * linux-s390-low.c (num_regs): Remove.
17922 (s390_num_regs): Define.
17923 (s390_regmap): Renamed from regmap, made static.
17924 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17925 made static.
17926 (s390_cannot_store_register): Renamed from cannot_store_register,
17927 made static.
17928 (the_low_target): New.
17929 * linux-sh-low.c (num_regs): Remove.
17930 (sh_num_regs): Define.
17931 (sh_regmap): Renamed from regmap, made static.
17932 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17933 made static.
17934 (sh_cannot_store_register): Renamed from cannot_store_register,
17935 made static.
17936 (the_low_target): New.
17937 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17938 (the_low_target): New.
17939
179402002-04-09 Daniel Jacobowitz <drow@mvista.com>
17941
17942 * Makefile.in: Add stamp-h target.
17943 * configure.in: Create stamp-h.
17944 * configure: Regenerated.
17945
179462002-04-09 Daniel Jacobowitz <drow@mvista.com>
17947
17948 * inferiors.c: New file.
17949 * target.c: New file.
17950 * target.h: New file.
17951 * Makefile.in: Add target.o and inferiors.o. Update
17952 dependencies.
17953 * linux-low.c (inferior_pid): New static variable,
17954 moved from server.c.
17955 (linux_create_inferior): Renamed from create_inferior.
17956 Call add_inferior. Return 0 on success instead of a PID.
17957 (linux_attach): Renamed from myattach.
17958 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17959 (linux_thread_alive): Renamed from mythread_alive.
17960 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17961 child dies.
17962 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17963 (regsets_store_inferior_registers): Correct error message.
17964 Add missing ``return 0''.
17965 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17966 (linux_store_registers): Renamed from store_inferior_registers.
17967 (linux_read_memory): Renamed from read_inferior_memory.
17968 (linux_write_memory): Renamed from write_inferior_memory.
17969 (linux_target_ops): New structure.
17970 (initialize_low): Call set_target_ops ().
17971 * remote-utils.c (unhexify): New function.
17972 (hexify): New function.
17973 (input_interrupt): Send signals to ``signal_pid''.
17974 * server.c (inferior_pid): Remove.
17975 (start_inferior): Update create_inferior call.
17976 (attach_inferior): Call add_inferior.
17977 (handle_query): New function.
17978 (main): Call handle_query for `q' packets.
17979 * server.h: Include "target.h". Remove obsolete prototypes.
17980 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17981
179822002-04-09 Daniel Jacobowitz <drow@mvista.com>
17983
17984 * Makefile.in: Add WARN_CFLAGS. Update configury
17985 dependencies.
17986 * configure.in: Check for <string.h>
17987 * configure: Regenerate.
17988 * config.in: Regenerate.
17989 * gdbreplay.c: Include needed system headers.
17990 (remote_open): Remove strchr prototype.
17991 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17992 * regcache.c (supply_register): Change buf argument to const void *.
17993 (supply_register_by_name): Likewise.
17994 (collect_register): Change buf argument to void *.
17995 (collect_register_by_name): Likewise.
17996 * regcache.h: Add missing prototypes.
17997 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17998 * server.c (handle_query): New function.
17999 (attached): New static variable, moved out of main.
18000 (main): Quiet longjmp clobber warnings.
18001 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18002 * utils.c (error): Remove NORETURN.
18003 (fatal): Likewise.
This page took 2.810385 seconds and 4 git commands to generate.