Make the class name in the definition match the declaration
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
42cd72aa
MR
12020-01-24 Maciej W. Rozycki <macro@wdc.com>
2
3 * Makefile.in (SFILES): Adjust paths to point to real files.
4 (OBS): Move waitstatus.o to target/waitstatus.o.
5 (TAGS): Transform paths appropriately.
6 (%.o): Rename to...
7 (nat/%.o): ... this pattern rule.
8 (%.o): Rename to...
9 (target/%.o): ... this pattern rule.
10 * configure.srv: Adjust paths throughout to include nat/ prefix
11 with the revant files.
12 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
13 * configure: Regenerate.
14
42ba50ec
MR
152020-01-24 Maciej W. Rozycki <macro@wdc.com>
16
17 * Makefile.in (TAGS): Remove config files from the recipe.
18
05ea2a05
TT
192020-01-14 Tom Tromey <tom@tromey.com>
20
21 * configure: Rebuild.
22 * configure.ac: Remove any checks that were added to common.m4.
23 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
24 lib-link.m4.
25
01027315
TT
262020-01-14 Tom Tromey <tom@tromey.com>
27
28 * server.h: Include config.h.
29 * gdbreplay.c: Include config.h.
30 * configure: Rebuild.
31 * configure.ac: Don't source common.host.
32 * acinclude.m4: Update path.
33 * Makefile.in (INCSUPPORT): New variable.
34 (INCLUDE_CFLAGS): Add INCSUPPORT.
35 (SFILES): Update paths.
36 (version-generated.c): Update path to create-version.sh.
37 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
38
b2ceabe8
TT
392020-01-14 Tom Tromey <tom@tromey.com>
40
41 * configure.ac (LIBS): Use WIN32APILIBS.
42 (USE_WIN32API): Don't define.
43 * configure: Rebuild.
44
25c51f71
TT
452020-01-14 Tom Tromey <tom@tromey.com>
46
47 * configure: Rebuild.
48
c0bd321d
SM
492020-01-13 Simon Marchi <simon.marchi@efficios.com>
50
51 * Makefile.in (%-generated.c): Remove rule for files from
52 regformats/i386.
53
bb564c58
SM
542020-01-13 Simon Marchi <simon.marchi@efficios.com>
55
56 * configure: Re-generate.
57
6e37c371
SM
582020-01-13 Simon Marchi <simon.marchi@efficios.com>
59
60 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
61 Define to static.
62 * tracepoint.c (stop_tracing, flush_trace_buffer,
63 about_to_request_buffer_space, get_trace_state_variable_value,
64 set_trace_state_variable_value, gdb_collect): Add declaration.
65
df4a0200
SM
662020-01-13 Simon Marchi <simon.marchi@efficios.com>
67
68 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
69 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
70 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
71 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
72 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
73 static.
74
89e94ec9
SM
752020-01-13 Simon Marchi <simon.marchi@efficios.com>
76
77 * inferiors.c: Include gdbsupport/common-inferior.h.
78
2552728a
SM
792020-01-13 Simon Marchi <simon.marchi@efficios.com>
80
81 * hostio-errno.c: Include hostio.h.
82
4025fa09
SM
832020-01-13 Simon Marchi <simon.marchi@efficios.com>
84
85 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
86 prerequisite.
87
c0b0a142
SM
882020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
89
90 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
91 * linux-arm-tdesc.h: Include arch/arm.h.
92
bb1183e2
SM
932020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
94
95 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
96
f5df0b5f
SM
972020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
98
99 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
100 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
101
5b6d1e4f
PA
1022020-01-10 Pedro Alves <palves@redhat.com>
103
104 * fork-child.c (post_fork_inferior): Pass target down to
105 startup_inferior.
106 * inferiors.c (switch_to_thread): Add process_stratum_target
107 parameter.
108 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
109 * nto-low.c (nto_target_ops): Now a process_stratum_target.
110 * linux-low.c (linux_target_ops): Now a process_stratum_target.
111 * remote-utils.c (prepare_resume_reply): Pass the target to
112 switch_to_thread.
113 * target.c (the_target): Now a process_stratum_target.
114 (done_accessing_memory): Pass the target to switch_to_thread.
115 (set_target_ops): Ajust to use process_stratum_target.
116 * target.h (struct target_ops): Rename to ...
117 (struct process_stratum_target): ... this.
118 (the_target, set_target_ops): Adjust.
119 (prepare_to_access_memory): Adjust comment.
120 * win32-low.c (child_xfer_memory): Adjust to use
121 process_stratum_target.
122 (win32_target_ops): Now a process_stratum_target.
123
559e7e50
EZ
1242020-01-06 Eli Zaretskii <eliz@gnu.org>
125 Pedro Alves <palves@redhat.com>
126
127 * win32-low.c (get_child_debug_event): Extract the fatal exception
128 from the exit status and convert to the equivalent Posix signal
129 number.
130 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
131 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
132
48189bec
HD
1332020-01-01 Hannes Domani <ssbssa@yahoo.de>
134
135 * Makefile.in: Use INSTALL_PROGRAM_ENV.
136
5dd8bf88
JB
1372020-01-01 Joel Brobecker <brobecker@adacore.com>
138
139 * server.c (gdbserver_version): Change copyright year to 2020.
140 * gdbreplay.c (gdbreplay_version): Likewise.
141
0ad6b8ee
CB
1422019-12-19 Christian Biesinger <cbiesinger@google.com>
143
144 * configure: Regenerate.
145 * configure.ac: Quote variable arguments of test.
146
1ee7b812
BE
1472019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
148
149 * Makefile.in: Fix build with GNU Make 3.81
150
d9fa87f4
TT
1512019-12-16 Tom Tromey <tromey@adacore.com>
152
153 * server.c (get_exec_file): Constify result.
154
ab7d13f0
CB
1552019-12-10 Christian Biesinger <cbiesinger@google.com>
156
157 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
158 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
159 * config.in: Regenerate.
160 * configure: Regenerate.
161 * configure.ac: Don't check for strerror.
162 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
163 Call safe_strerror instead of strerror.
164 * server.h (strerror): Remove this now-unnecessary declaration.
165 * tracepoint.c (init_named_socket): Call safe_strerror instead of
166 strerror.
167 (gdb_agent_helper_thread): Likewise.
168 * utils.c (perror_with_name): Likewise.
169
4da8c3a8
TT
1702019-11-26 Tom Tromey <tom@tromey.com>
171
172 * configure, config.in: Rebuild.
173
21987b9c
TT
1742019-11-26 Tom Tromey <tom@tromey.com>
175
176 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
177 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
178 gdb_sigmask.
179 * configure, config.in: Rebuild.
180
5e030278
TT
1812019-11-26 Tom Tromey <tom@tromey.com>
182
183 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
184 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
185 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
186 * acinclude.m4: Include ax_pthread.m4.
187 * config.in, configure: Rebuild.
188
6d91ce9a
CB
1892019-11-26 Christian Biesinger <cbiesinger@google.com>
190
191 * debug.c (debug_set_output): Call safe_strerror instead of
192 strerror.
193 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
194 (linux_kill_one_lwp): Likewise.
195 (linux_detach_one_lwp): Likewise.
196 (linux_wait_for_event_filtered): Likewise.
197 (store_register): Likewise.
198 * lynx-low.c (lynx_attach): Likewise.
199 * mem-break.c (insert_memory_breakpoint): Likewise.
200 (remove_memory_breakpoint): Likewise.
201 (delete_fast_tracepoint_jump): Likewise.
202 (set_fast_tracepoint_jump): Likewise.
203 (uninsert_fast_tracepoint_jumps_at): Likewise.
204 (reinsert_fast_tracepoint_jumps_at): Likewise.
205 * nto-low.c (nto_xfer_memory): Likewise.
206 (nto_resume): Likewise.
207
6cdd651f
LM
2082019-11-20 Luis Machado <luis.machado@linaro.org>
209
210 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
211 instead of register count.
212 * tdesc.c (tdesc_contains_feature): New function.
213 * tdesc.h (tdesc_contains_feature): New prototype.
214
cd850b40
CB
2152019-11-15 Christian Biesinger <cbiesinger@google.com>
216
217 * Makefile.in: Add safe-strerror.c.
218 * configure: Regenerate.
219 * configure.ac: Don't source common.host.
220
5abebf3c
CB
2212019-11-15 Christian Biesinger <cbiesinger@google.com>
222
223 * config.in: Regenerate.
224 * configure: Regenerate.
225
e06f3d6e
AB
2262019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
227
228 * ax.c (ax_printf): Handle size_t_arg.
229
ca3a04f6
CB
2302019-11-06 Christian Biesinger <cbiesinger@google.com>
231
232 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
233 * mi/mi-main.c (output_cores): Likewise.
234 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
235 (linux_xfer_osdata_modules): Likewise.
236 * remote.c (register_remote_support_xml): Likewise.
237 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
238 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
239
e48f6033
CB
2402019-11-01 Christian Biesinger <cbiesinger@google.com>
241
242 * configure: Regenerate.
243 * configure.ac: Remove check for strerror_r.
244
e7e97a2e
CB
2452019-10-31 Christian Biesinger <cbiesinger@google.com>
246
247 * config.in: Regenerate.
248 * configure: Regenerate.
249 * configure.ac: Also check for strerror_r.
250
75cafaa6
CB
2512019-10-31 Christian Biesinger <cbiesinger@google.com>
252
253 * ax.h (debug_agent): Remove duplicate declaration.
254
30baf67b
TV
2552019-10-26 Tom de Vries <tdevries@suse.de>
256
257 * linux-aarch64-low.c: Fix typos in comments.
258 * linux-arm-low.c: Same.
259 * linux-low.c: Same.
260 * linux-ppc-low.c: Same.
261 * proc-service.c: Same.
262 * regcache.h: Same.
263 * server.c: Same.
264 * tracepoint.c: Same.
265 * win32-low.c: Same.
266
52c64cf7
TT
2672019-10-25 Tom Tromey <tromey@adacore.com>
268
269 * utils.c (xstrdup): Remove.
270
c12d372d
TT
2712019-10-23 Tom Tromey <tom@tromey.com>
272
273 * configure, config.in: Rebuild.
274
4d0b984b
TT
2752019-10-23 Tom Tromey <tom@tromey.com>
276
277 * configure: Rebuild.
278 * acinclude.m4: Use m4_include, not sinclude.
279
c5adaa19
TT
2802019-10-17 Tom Tromey <tromey@adacore.com>
281
282 * configure: Rebuild.
283 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
284 in AC_CONFIG_FILES invocation.
285 * Makefile.in (stamp-h, Makefile): Use new-style config.status
286 invocation.
287
fec4e896
CB
2882019-10-16 Christian Biesinger <cbiesinger@google.com>
289
290 * server.c: Include xml-builtin.h.
291 (get_xml_features): Don't declare xml_builtins here.
292
00975ff6
AB
2932019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
294
295 * Makefile.in: Remove references to vec-ipa.o.
296
0dc32745
AB
2972019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
298
299 * Makefile.in: Remove references to vec.c.
300
3e6ec53a
CB
3012019-10-02 Christian Biesinger <cbiesinger@google.com>
302
303 * server.c (server_waiting): Change to bool.
304 (extended_protocol): Likewise.
305 (response_needed): Likewise.
306 (exit_requested): Likewise.
307 (run_once): Likewise.
308 (report_no_resumed): Likewise.
309 (non_stop): Likewise.
310 (disable_packet_vCont): Likewise.
311 (disable_packet_Tthread): Likewise.
312 (disable_packet_qC): Likewise.
313 (disable_packet_qfThreadInfo): Likewise.
314 (handle_general_set): Update.
315 (handle_detach): Update.
316 (handle_monitor_command): Update.
317 (handle_query): Update.
318 (captured_main): Update.
319 (process_serial_event): Update.
320 * server.h (server_waiting): Change to bool.
321 (disable_packet_vCont): Likewise.
322 (disable_packet_Tthread): Likewise.
323 (disable_packet_qC): Likewise.
324 (disable_packet_qfThreadInfo): Likewise.
325 (run_once): Likewise.
326 (non_stop): Likewise.
327 * target.c (target_stop_and_wait): Update.
328
80fd2826
TT
3292019-10-02 Tom Tromey <tromey@adacore.com>
330
331 * Makefile.in (SFILES): Add common-inferior.c.
332 (OBS): Add common-inferior.o.
333 * server.c (startup_with_shell): Don't define.
334
46f29a9a
AB
3352019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
336
337 * linux-low.c (linux_low_read_btrace): Update for change to
338 std::vector.
339
f9d949fb
CB
3402019-09-20 Christian Biesinger <cbiesinger@google.com>
341
342 * debug.c (debug_threads): Remove comment in favor of the header.
343 * debug.h (using_threads): Add declaration.
344 (debug_threads): Add comment.
345 * linux-aarch64-low.c: Include debug.h and remove declaration of
346 debug_threads.
347 * nto-low.c: Likewise.
348 * remote-utils.c: Likewise.
349 * thread-db.c: Likewise.
350
abf516c6
UW
3512019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
352
353 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
354 and powerpc-cell64l-ipa.o.
355 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
356 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
357 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
358 (spu*-*-*): Remove.
359
360 * spu-low.c: Remove file.
361
362 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
363 (parse_spufs_run): Remove.
364 (ppc_get_pc): Remove Cell/B.E. support.
365 (ppc_set_pc): Likewise.
366 (ppc_breakpoint_at): Likewise.
367 (ppc_arch_setup): Likewise.
368 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
369 tdesc_powerpc_cell32l.
370 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
371 or init_registers_powerpc_cell32l.
372 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
373 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
374 or init_registers_powerpc_cell32l.
375 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
376 (init_registers_powerpc_cell32l): Remove prototype.
377 (init_registers_powerpc_cell64l): Likewise.
378
379 * target.h (struct target_ops): Remove qxfer_spu member.
380 * server.c (handle_qxfer_spu): Remove.
381 (qxfer_packets): Remove entry for "spu".
382 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
383 * linux-low.c (SPUFS_MAGIC): Remove.
384 (spu_enumerate_spu_ids): Remove.
385 (linux_qxfer_spu): Remove.
386 (linux_target_ops): Remove qxfer_spu member.
387 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
388 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
389 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
390
2d41fa11
SDJ
3912019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
392
393 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
394 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
395 * config.in: Regenerate.
396 * configure: Regenerate.
397
d59b55f0
TT
3982019-08-15 Tom Tromey <tromey@adacore.com>
399
400 * target.c (target_write_memory): Use gdb::byte_vector.
401
4196ab2a
TT
4022019-08-15 Tom Tromey <tromey@adacore.com>
403
404 * tracepoint.c (write_inferior_data_pointer)
405 (write_inferior_integer, write_inferior_int8)
406 (write_inferior_uinteger, m_tracepoint_action_download)
407 (r_tracepoint_action_download, x_tracepoint_action_download)
408 (l_tracepoint_action_download, clear_inferior_trace_buffer)
409 (download_agent_expr, download_tracepoint_1)
410 (download_trace_state_variables, upload_fast_traceframes): Update.
411 * server.c (gdb_write_memory): Update.
412 * remote-utils.c (relocate_instruction): Update.
413 * proc-service.c (ps_pdwrite): Update.
414 * mem-break.c (remove_memory_breakpoint)
415 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
416 (uninsert_fast_tracepoint_jumps_at)
417 (reinsert_fast_tracepoint_jumps_at): Update.
418 * linux-x86-low.c (append_insns)
419 (i386_install_fast_tracepoint_jump_pad)
420 (amd64_write_goto_address, i386_write_goto_address): Update.
421 * linux-s390-low.c (append_insns, s390_write_goto_address):
422 Update.
423 * linux-ppc-low.c (ppc_relocate_instruction)
424 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
425 (ppc_write_goto_address): Update.
426 * linux-aarch64-low.c (append_insns): Update.
427 * target.h (struct target_ops): Update.
428 (write_inferior_memory): Don't declare.
429 * target.c (target_write_memory): Rename from
430 write_inferior_memory. Remove old target_write_memory.
431
c6778d00
TT
4322019-08-15 Tom Tromey <tromey@adacore.com>
433
434 * target.c (write_inferior_memory): Use std::vector.
435
404f2902
FCE
4362019-08-06 Frank Ch. Eigler <fche@redhat.com>
437
438 PR build/24886
439 * configure.ac: Drop enable-libmcheck support.
440 * configure, config.in: Rebuild.
441 * acinclude.m4: Don't include it.
442
4c5aa8e0
AH
4432019-07-19 Alan Hayward <alan.hayward@arm.com>
444
445 * configure.srv: Remove Arm xml files.
446
7cc17433
AH
4472019-07-19 Alan Hayward <alan.hayward@arm.com>
448
449 * configure.srv: Add new files. Remove xml generated files.
450 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
451 registers.
452 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
453 * linux-aarch32-tdesc.c: New file.
454 * linux-aarch32-tdesc.h: New file.
455 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
456 * linux-arm-low.c (init_registers_arm, tdesc_arm)
457 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
458 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
459 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
460 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
461 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
462 (arm_read_description): Call arm_linux_read_description.
463 (initialize_low_arch): Don't init registers.
464 * linux-arm-tdesc.c: New file.
465 * linux-arm-tdesc.h: New file.
466
166a82be
AH
4672019-07-10 Alan Hayward <alan.hayward@arm.com>
468
469 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
470 Move counter inside for.
471 (arm_read_description): Check ptrace earlier.
472 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
473
268a13a5
TT
4742019-07-09 Tom Tromey <tom@tromey.com>
475
476 * configure: Rebuild.
477 * configure.ac: Change common to gdbsupport.
478 * acinclude.m4: Change common to gdbsupport.
479 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
480 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
481 common to gdbsupport.
482 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
483 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
484 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
485 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
486 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
487 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
488 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
489 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
490 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
491 common to gdbsupport.
492
350fab54
AH
4932019-07-04 Alan Hayward <alan.hayward@arm.com>
494
495 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
496 defines.
497 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
498
2b40fda7
AH
4992019-07-04 Alan Hayward <alan.hayward@arm.com>
500
501 * configure.srv: Remove legacy xml.
502 * linux-aarch64-low.c (initialize_low_arch): Remove
503 initialize_low_tdesc call.
504 * linux-aarch64-tdesc-selftest.c: Remove file.
505 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
506 * linux-x86-low.c (initialize_low_arch): Remove
507 initialize_low_tdesc call.
508 * linux-x86-tdesc-selftest.c: Remove file.
509 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
510
7d10623d
TV
5112019-06-20 Tom de Vries <tdevries@suse.de>
512
513 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
514 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
515
8d6a48df
TV
5162019-06-19 Tom de Vries <tdevries@suse.de>
517
518 * debug.h (debug_write): Change return type to ssize_t.
519 * debug.c (debug_write): Same.
520
73cc7272
TT
5212019-06-14 Tom Tromey <tom@tromey.com>
522
523 * configure.ac: Use new path to gnulib.
524 * configure: Rebuild.
525 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
526 to gnulib.
527
08f10e02
TT
5282019-06-11 Tom Tromey <tom@tromey.com>
529
530 * Makefile.in (SFILES): Add alloc.c.
531 (OBS): Add alloc.o.
532 (IPA_OBJS): Add alloc-ipa.o.
533 (alloc-ipa.o): New target.
534 (%.o: ../%.c): New pattern rule.
535
422186a9
TT
5362019-06-10 Tom Tromey <tromey@adacore.com>
537
538 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
539 end warning with a newline.
540 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
541 newline.
542 * thread-db.c (attach_thread): Don't end warning with a newline.
543 (thread_db_notice_clone): Likewise.
544 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
545 newline.
546 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
547 end warning with a newline.
548
b02f78f9
PA
5492019-06-04 Pedro Alves <palves@redhat.com>
550
551 * server.c (captured_main): Use make_unique_xstrdup.
552
88ed7edb
TT
5532019-06-02 Tom Tromey <tom@tromey.com>
554
555 * gdbreplay.c (fromhex): Remove.
556 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
557
33a6bc35
TT
5582019-05-29 Tom Tromey <tromey@adacore.com>
559
560 * configure: Rebuild.
561
e90a813d
KB
5622019-05-06 Kevin Buettner <kevinb@redhat.com>
563
564 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
565 sign extension code on 32-bit builds.
566
353ea2d1
EZ
5672019-05-03 Eli Zaretskii <eliz@gnu.org>
568
569 * remote-utils.c:
570 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
571
b494cdff
TT
5722019-04-19 Tom Tromey <tom@tromey.com>
573
574 * server.c (struct vstop_notif): Derive from notif_event.
575 <base>: Remove.
576 (queue_stop_reply): Update.
577 (remove_all_on_match_ptid): Change type. Rewrite.
578 (discard_queued_stop_replies): Rewrite.
579 (in_queued_stop_replies_ptid): Change type.
580 (in_queued_stop_replies): Rewrite.
581 (notif_stop): Update.
582 (queue_stop_reply_callback): Update.
583 (captured_main): Don't call initialize_notif.
584 (push_stop_notification): Update.
585 * notif.c (notif_write_event, handle_notif_ack)
586 (notif_event_enque, notif_push): Update.
587 (notif_event_xfree, initialize_notif): Remove.
588 * notif.h (struct notif_event): Include <list>, not
589 "common/queue.h".
590 (struct notif_server) <queue>: Now a std::list.
591 (notif_event_p): Remove typedef.
592 (initialize_notif): Don't declare.
593 (struct notif_event): Add virtual destructor.
594
a7e559cc
AH
5952019-04-17 Alan Hayward <alan.hayward@arm.com>
596
597 * ax.c (ax_vdebug): Call debug_printf.
598 * debug.c (debug_write): New function.
599 * debug.h (debug_write): New declaration.
600 * linux-low.c (sigchld_handler): Call debug_write.
601
aeb2e706
AH
6022019-04-17 Alan Hayward <alan.hayward@arm.com>
603
604 * debug.c (debug_set_output): New function.
605 (debug_vprintf): Send output to debug_file.
606 (debug_flush): Likewise.
607 * debug.h (debug_set_output): New declaration.
608 * server.c (handle_monitor_command): Add debug-file option.
609 (captured_main): Likewise.
610
c1bc0935
AH
6112019-04-17 Alan Hayward <alan.hayward@arm.com>
612
613 * debug.c (remote_debug): Add definition.
614 * debug.h (remote_debug): Add declaration.
615 * hostio.c (remote_debug): Remove declaration.
616 * remote-utils.c (struct ui_file): Likewise.
617 (remote_debug): Likewise.
618 * remote-utils.h (remote_debug): Likewise,
619 * server.c (remote_debug): Remove definition.
620
3f52fdbc
KB
6212019-04-10 Kevin Buettner <kevinb@redhat.com>
622
623 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
624 when using a 64-bit gdbserver.
625
b0319eaa
TT
6262019-04-09 Tom Tromey <tromey@adacore.com>
627
628 * linux-low.c (select_event_lwp): Use find_thread_in_random.
629
eedc3f4f
TT
6302019-04-08 Tom Tromey <tom@tromey.com>
631
632 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
633 throw.
634 (linux_resume_one_lwp): Likewise.
635
230d2906
TT
6362019-04-08 Tom Tromey <tom@tromey.com>
637
638 * gdbreplay.c: Update.
639 * linux-low.c: Update.
640 * server.c: Update.
641
a70b8144
TT
6422019-04-08 Tom Tromey <tom@tromey.com>
643
644 * server.c: Use C++ exception handling.
645 * linux-low.c: Use C++ exception handling.
646 * gdbreplay.c: Use C++ exception handling.
647
3d6e9d23
TT
6482019-04-08 Tom Tromey <tom@tromey.com>
649
650 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
651 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
652 (captured_main, main): Update.
653 * gdbreplay.c (main): Update.
654
0570503d
PFC
6552019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
656
657 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
658 value in argument pointer, return 1 if the entry is found and 0
659 otherwise. Move comment.
660 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
661 * linux-low.h (linux_get_auxv): Declare.
662 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
663
227a9e65
TT
6642019-04-05 Tom Tromey <tromey@adacore.com>
665
666 * server.c (gdbserver_usage): Use upper-case for metasyntactic
667 variables.
668
69f4c9cc
AH
6692019-03-28 Alan Hayward <alan.hayward@arm.com>
670
671 * linux-low.c (AT_HWCAP2): Add define if not already included.
672
974c89e0
AH
6732019-03-26 Alan Hayward <alan.hayward@arm.com>
674
675 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
676 (aarch64_arch_setup): Call linux_get_hwcap.
677 * linux-arm-low.c (arm_get_hwcap): Remove function.
678 (arm_read_description): Call linux_get_hwcap.
679 * linux-low.c (linux_get_auxv): New function.
680 (linux_get_hwcap): Likewise.
681 (linux_get_hwcap2): Likewise.
682 * linux-low.h (linux_get_hwcap): New declaration.
683 (linux_get_hwcap2): Likewise.
684 * linux-ppc-low.c (ppc_get_auxv): Remove function.
685 (ppc_arch_setup): Call linux_get_hwcap.
686 * linux-s390-low.c (s390_get_hwcap): Remove function.
687 (s390_arch_setup): Call linux_get_hwcap.
688
1ef53e6b
AH
6892019-03-22 Alan Hayward <alan.hayward@arm.com>
690 Jiong Wang <jiong.wang@arm.com>
691
692 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
693 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
694 to fail.
695 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
696
ee4fbcfa
AH
6972019-03-22 Alan Hayward <alan.hayward@arm.com>
698 Jiong Wang <jiong.wang@arm.com>
699
700 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
701 (aarch64_get_hwcap): New function.
702 (aarch64_arch_setup): Read APIA hwcap.
703
6dc0ebde
AH
7042019-03-22 Alan Hayward <alan.hayward@arm.com>
705 Jiong Wang <jiong.wang@arm.com>
706
707 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
708 (initialize_low_tracepoint): Likewise.
709 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
710 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
711 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
712 (aarch64_linux_read_description): Likewise.
713 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
714
1163a4b7
JB
7152019-03-12 John Baldwin <jhb@FreeBSD.org>
716
717 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
718 i386_create_target_description for 'segments' parameter.
719 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
720 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
721 * win32-i386-low.c (i386_arch_setup): Likewise.
722
d3a70e03
TT
7232019-03-12 Tom Tromey <tromey@adacore.com>
724
725 * linux-low.c (iterate_over_lwps): Update.
726
37991b4f
TT
7272019-03-06 Tom Tromey <tom@tromey.com>
728
729 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
730 (captured_main): Use SCOPE_EXIT.
731
45950eb6
SDJ
7322019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
733
734 * configure.srv: Use '$enable_unittest' instead of '$development'
735 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
736 case.
737
43ac54fc
TT
7382019-02-27 Tom Tromey <tromey@adacore.com>
739
740 * gdbreplay.c (logchar): Handle \r\n.
741
df0da8a2
AH
7422019-02-07 Alan Hayward <alan.hayward@arm.com>
743
744 * linux-low.c (linux_attach): Add process before lwp.
745 * server.c (attach_inferior): Check if already attached.
746
1a5c2598
TT
7472019-02-07 Tom Tromey <tom@tromey.com>
748
749 * x86-tdesc.h: Rename include guard.
750 * x86-low.h: Add include guard.
751 * wincecompat.h: Rename include guard.
752 * win32-low.h: Add include guard.
753 * utils.h: Rename include guard.
754 * tracepoint.h: Rename include guard.
755 * tdesc.h: Rename include guard.
756 * target.h: Rename include guard.
757 * server.h: Rename include guard.
758 * remote-utils.h: Rename include guard.
759 * regcache.h: Rename include guard.
760 * nto-low.h: Rename include guard.
761 * notif.h: Add include guard.
762 * mem-break.h: Rename include guard.
763 * lynx-low.h: Add include guard.
764 * linux-x86-tdesc.h: Add include guard.
765 * linux-s390-tdesc.h: Add include guard.
766 * linux-ppc-tdesc-init.h: Add include guard.
767 * linux-low.h: Add include guard.
768 * linux-aarch64-tdesc.h: Add include guard.
769 * linux-aarch32-low.h: Add include guard.
770 * inferiors.h: Rename include guard.
771 * i387-fp.h: Rename include guard.
772 * hostio.h: Rename include guard.
773 * gdbthread.h: Rename include guard.
774 * gdb_proc_service.h: Rename include guard.
775 * event-loop.h: Rename include guard.
776 * dll.h: Rename include guard.
777 * debug.h: Rename include guard.
778 * ax.h: Rename include guard.
779
956cc47c
SN
7802018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
781
782 PR gdb/23985
783 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
784 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
785
a0707f3c
TT
7862019-01-25 Tom Tromey <tom@tromey.com>
787
788 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
789
0747795c
TT
7902019-01-25 Tom Tromey <tom@tromey.com>
791
792 * win32-low.c: Fix common/ includes.
793 * win32-i386-low.c: Fix common/ includes.
794 * tracepoint.c: Fix common/ includes.
795 * thread-db.c: Fix common/ includes.
796 * target.h: Fix common/ includes.
797 * symbol.c: Fix common/ includes.
798 * spu-low.c: Fix common/ includes.
799 * server.h: Fix common/ includes.
800 * server.c: Fix common/ includes.
801 * remote-utils.c: Fix common/ includes.
802 * regcache.h: Fix common/ includes.
803 * regcache.c: Fix common/ includes.
804 * nto-x86-low.c: Fix common/ includes.
805 * notif.h: Fix common/ includes.
806 * mem-break.h: Fix common/ includes.
807 * lynx-low.c: Fix common/ includes.
808 * lynx-i386-low.c: Fix common/ includes.
809 * linux-x86-tdesc-selftest.c: Fix common/ includes.
810 * linux-x86-low.c: Fix common/ includes.
811 * linux-low.c: Fix common/ includes.
812 * inferiors.h: Fix common/ includes.
813 * i387-fp.c: Fix common/ includes.
814 * hostio.c: Fix common/ includes.
815 * hostio-errno.c: Fix common/ includes.
816 * gdbthread.h: Fix common/ includes.
817 * gdbreplay.c: Fix common/ includes.
818 * fork-child.c: Fix common/ includes.
819 * event-loop.c: Fix common/ includes.
820 * ax.c:
821 (enum gdb_agent_op): Fix common/ includes.
822
be6d4f74
TT
8232019-01-21 Tom Tromey <tom@tromey.com>
824
825 * tracepoint.c: Fix includes.
826 * remote-utils.c: Fix includes.
827 * linux-x86-low.c: Fix includes.
828
66d91b39
JB
8292019-01-01 Joel Brobecker <brobecker@adacore.com>
830
831 * gdbreplay.c (gdbreplay_version): Update copyright year in
832 version message.
833 * server.c (gdbserver_version): Likewise.
834
754e3168
AH
8352018-12-05 Alan Hayward <alan.hayward@arm.com>
836
837 * linux-low.c (add_lwp): Switch ordering.
838
d105de22
TT
8392018-11-29 Tom Tromey <tom@tromey.com>
840
841 * win32-low.c (win32_join): Take pid, not process.
842 * target.h (struct target_ops) <join>: Change argument type.
843 (join_inferior): Change argument name.
844 * spu-low.c (spu_join): Take pid, not process.
845 * server.c (handle_detach): Preserve pid before destroying
846 process.
847 * lynx-low.c (lynx_join): Take pid, not process.
848 * linux-low.c (linux_join): Take pid, not process.
849
50138245
AH
8502018-11-23 Alan Hayward <alan.hayward@arm.com>
851
852 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
853 (aarch64_cannot_fetch_register): Likewise.
854 (struct linux_target_ops): Update references.
855
64f57f3d
PFC
8562018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
857
858 * linux-ppc-low.c: Include nat/linux-ptrace.h.
859
8d619c01
EBM
8602018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
861
862 * configure.srv (ipa_ppc_linux_regobj): Add
863 powerpc-isa207-htm-vsx32l-ipa.o and
864 powerpc-isa207-htm-vsx64l-ipa.o.
865 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
866 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
867 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
868 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
869 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
870 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
871 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
872 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
873 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
874 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
875 (init_registers_powerpc_isa207_htm_vsx32l)
876 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
877 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
878 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
879 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
880 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
881 (ppc_store_tm_ctarregset): New functions.
882 (ppc_regsets): Add entries for HTM regsets.
883 (ppc_arch_setup): Set htm in features struct when needed. Set
884 sizes for the HTM regsets.
885 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
886 (initialize_low_arch): Call
887 init_registers_powerpc_isa207_htm_vsx32l and
888 init_registers_powerpc_isa207_htm_vsx64l.
889 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
890 PPC_TDESC_ISA207_HTM_VSX.
891 (initialize_low_tracepoint): Call
892 init_registers_powerpc_isa207_htm_vsx32l and
893 init_registers_powerpc_isa207_htm_vsx64l.
894
232bfb86
EBM
8952018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
896
897 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
898 rs6000/power-linux-pmu.xml to srv_xmlfiles.
899 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
900 (ppc_store_pmuregset): New functions.
901 (ppc_regsets): Add entries for ebb and pmu regsets.
902 (ppc_arch_setup): Set isa207 in features struct if the ebb and
903 pmu regsets are available. Set sizes for these regsets.
904
f2cf6173
EBM
9052018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
906
907 * configure.srv (ipa_ppc_linux_regobj): Add
908 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
909 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
910 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
911 rs6000/powerpc-isa207-vsx32l.xml, and
912 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
913 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
914 <PPC_TDESC_ISA207_VSX>: New enum value.
915 (init_registers_powerpc_isa207_vsx32l): Declare.
916 (init_registers_powerpc_isa207_vsx64l): Declare.
917 * linux-ppc-low.c (ppc_fill_tarregset): New function.
918 (ppc_store_tarregset): New function.
919 (ppc_regsets): Add entry for the TAR regset.
920 (ppc_arch_setup): Set isa207 in features struct when needed. Set
921 size for the TAR regsets.
922 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
923 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
924 and init_registers_powerpc_isa207_vsx64l.
925 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
926 (initialize_low_tracepoint): Call
927 init_registers_powerpc_isa207_vsx32l and
928 init_registers_powerpc_isa207_vsx64l.
929
7ca18ed6
EBM
9302018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
931 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
932
933 * configure.srv (ipa_ppc_linux_regobj): Add
934 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
935 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
936 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
937 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
938 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
939 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
940 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
941 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
942 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
943 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
944 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
945 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
946 (ppc_hwcap): Add comment.
947 (ppc_hwcap2): New global.
948 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
949 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
950 (ppc_regsets): Add entries for the DSCR and PPR regsets.
951 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
952 when needed. Set sizes for the the DSCR and PPR regsets.
953 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
954 (initialize_low_arch): Call
955 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
956 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
957 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
958 PPC_TDESC_ISA205_PPR_DSCR_VSX.
959 (initialize_low_tracepoint): Call
960 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
961 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
962
5c849b22
PFC
9632018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
964
965 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
966
8ecfd7bd
SDJ
9672018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
968 Simon Marchi <simark@simark.ca>
969
970 * acinclude.m4: Include "../selftest.m4".
971 * configure: Regenerate.
972 * configure.ac: Use "GDB_AC_SELFTEST".
973 * configure.srv: Use "$enable_unittests" instead of
974 "$development" when checking whether unit tests have been
975 enabled.
976 * server.c (captured_main): Update message informing that
977 selftests have been disabled.
978
96643e35
TT
9792018-10-04 Tom Tromey <tom@tromey.com>
980
981 * configure: Rebuild.
982
da4ae14a
TT
9832018-10-04 Tom Tromey <tom@tromey.com>
984
985 * server.c (handle_status): Rename inner "thread".
986 (process_serial_event): Declare "res" in 'm' case.
987 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
988 (iterate_over_lwps): Rename inner "thread".
989 (linux_qxfer_libraries_svr4): Rename inner "len".
990 * gdbthread.h (find_thread_in_random): Rename inner "thread".
991
7c619dbd
GB
9922018-10-01 Gary Benson <gbenson@redhat.com>
993
994 * gdb_proc_service.h: Moved common code to
995 common/gdb_proc_service.h.
996
3795e814
GB
9972018-10-01 Gary Benson <gbenson@redhat.com>
998
999 * gdb_proc_service.h: Synchronize comments and whitespace with
1000 GDB's version of this file.
1001
49b036f1
TT
10022018-09-25 Tom Tromey <tom@tromey.com>
1003
1004 * configure: Rebuild.
1005 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1006
8ff03f0b
SM
10072018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1008
1009 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1010 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1011 ($(IPA_LIB)): Sort IPA_OBJS.
1012
a1cd91dc
SM
10132018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1014
1015 * Makefile.in: Remove references to $(ADD_DEPS).
1016
752312ba
TT
10172018-09-16 Tom Tromey <tom@tromey.com>
1018
1019 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1020 variables.
1021 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1022 variables.
1023
f1628857
TT
10242018-09-05 Tom Tromey <tom@tromey.com>
1025
1026 * configure: Rebuild.
1027
ad202fcc
SM
10282018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1029
1030 PR build/23399
1031 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1032
d3d8724a
TT
10332018-08-27 Tom Tromey <tom@tromey.com>
1034
1035 PR build/23087:
1036 * configure: Rebuild.
1037
b4f183d2
TT
10382018-08-27 Tom Tromey <tom@tromey.com>
1039
1040 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1041 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1042 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1043 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1044 (s390x_emit_stack_adjust): Add casts to unsigned char.
1045
4e2aa472
SM
10462018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1047
1048 PR gdb/23374
1049 PR gdb/23375
1050 * server.h (struct client_state) <disable_randomization>:
1051 Initialize to 1.
1052
cf4088a9
SM
10532018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1054
1055 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1056 variable.
1057 (mips_supply_ptrace_register): Likewise.
1058
a0de763e
TT
10592018-07-22 Tom Tromey <tom@tromey.com>
1060
1061 * configure: Rebuild.
1062
b0a7723d
TT
10632018-07-22 Tom Tromey <tom@tromey.com>
1064
1065 * win32-low.c (win32_create_inferior): Remove unused variables.
1066 * gdbreplay.c (remote_open): Remove unused variable.
1067 * remote-utils.c (remote_prepare): Remove unused variable.
1068 * x86-tdesc.h (X86_TDESC_H): Define.
1069 (amd64_expedite_regs): Define conditionally.
1070 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1071 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1072 * remote-utils.c (readchar): Remove unused variable.
1073
a780ef4f
PA
10742018-07-13 Pedro Alves <palves@redhat.com>
1075
1076 * linux-low.c (linux_kill): Change parameter to process_info
1077 pointer instead of pid. Adjust.
1078 * lynx-low.c (lynx_kill): Likewise.
1079 * nto-low.c (nto_kill): Likewise.
1080 * spu-low.c (spu_kill): Likewise.
1081 * win32-low.c (win32_kill): Likewise.
1082 * server.c (handle_v_kill, kill_inferior_callback)
1083 (detach_or_kill_for_exit): Adjust.
1084 * target.c (kill_inferior): Change parameter to process_info
1085 pointer instead of pid. Adjust.
1086 * target.h (struct target_ops) <kill>: Change parameter to
1087 process_info pointer instead of pid. Adjust all implementations
1088 and callers.
1089 (kill_inferior): Likewise.
1090
ef2ddb33
PA
10912018-07-13 Pedro Alves <palves@redhat.com>
1092
1093 * linux-low.c (linux_detach, linux_join): Change parameter to
1094 process_info pointer instead of pid. Adjust.
1095 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1096 * nto-low.c (nto_detach): Likewise.
1097 * spu-low.c (spu_detach, spu_join): Likewise.
1098 * win32-low.c (win32_detach, win32_join): Likewise.
1099 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1100 * target.h (struct target_ops) <detach, join>: Change parameter to
1101 process_info pointer instead of pid. Adjust all implementations
1102 and callers.
1103 (detach_inferior, join_inferior): Rename 'pid' parameter to
1104 'proc'.
1105
c7ab0aef
SDJ
11062018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1107 Jan Kratochvil <jan.kratochvil@redhat.com>
1108 Paul Fertser <fercerpav@gmail.com>
1109 Tsutomu Seki <sekiriki@gmail.com>
1110
1111 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1112 (OBS): Add 'common/netstuff.o'.
1113 (GDBREPLAY_OBS): Likewise.
1114 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1115 (remote_open): Implement support for IPv6
1116 connections.
1117 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1118 and 'wspiapi.h'.
1119 (handle_accept_event): Accept connections from IPv6 sources.
1120 (remote_prepare): Handle IPv6-style hostnames; implement
1121 support for IPv6 connections.
1122 (remote_open): Implement support for printing connections from
1123 IPv6 sources.
1124
31445d10
PA
11252018-07-11 Pedro Alves <palves@redhat.com>
1126
1127 PR gdb/23377
1128 * mem-break.c (any_persistent_commands): Add process_info
1129 parameter and use it instead of relying on the current process.
1130 Change return type to bool.
1131 * mem-break.h (any_persistent_commands): Add process_info
1132 parameter and change return type to bool.
1133 * server.c (handle_detach): Remove require_running_or_return call.
1134 Look up the process_info for the process we're about to detach.
1135 If not found, return back error to GDB. Adjust
1136 any_persistent_commands call to pass down a process pointer.
1137
cb197132
PA
11382018-07-11 Pedro Alves <palves@redhat.com>
1139
1140 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1141 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1142 instead of collect_register_by_name.
1143 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1144 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1145
1b919490
VB
11462018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1147 Pedro Alves <palves@redhat.com>
1148
1149 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1150
d7e15655
TT
11512018-07-03 Tom Tromey <tom@tromey.com>
1152
1153 * linux-low.c: Update.
1154 * lynx-low.c: Update.
1155 * mem-break.c: Update.
1156 * nto-low.c: Update.
1157 * remote-utils.c: Update.
1158 * server.c: Update.
1159 * spu-low.c: Update.
1160 * target.c: Update.
1161 * win32-low.c: Update.
1162
26a57c92
TT
11632018-07-03 Tom Tromey <tom@tromey.com>
1164
1165 * server.c: Update.
1166
0e998d96
TT
11672018-07-03 Tom Tromey <tom@tromey.com>
1168
1169 * linux-low.c: Update.
1170
cc6bcb54
TT
11712018-07-03 Tom Tromey <tom@tromey.com>
1172
1173 * target.c: Update.
1174
e38504b3
TT
11752018-07-03 Tom Tromey <tom@tromey.com>
1176
1177 * linux-low.c: Update.
1178 * linux-mips-low.c: Update.
1179 * lynx-low.c: Update.
1180 * nto-low.c: Update.
1181 * remote-utils.c: Update.
1182 * server.c: Update.
1183 * spu-low.c: Update.
1184 * target.c: Update.
1185 * thread-db.c: Update.
1186
e99b03dc
TT
11872018-07-03 Tom Tromey <tom@tromey.com>
1188
1189 * linux-low.c: Update.
1190 * linux-mips-low.c: Update.
1191 * lynx-low.c: Update.
1192 * mem-break.c: Update.
1193 * nto-low.c: Update.
1194 * remote-utils.c: Update.
1195 * server.c: Update.
1196 * spu-low.c: Update.
1197 * target.c: Update.
1198 * tracepoint.c: Update.
1199
f2907e49
TT
12002018-07-03 Tom Tromey <tom@tromey.com>
1201
1202 * linux-low.c: Update.
1203 * linux-ppc-low.c: Update.
1204 * linux-x86-low.c: Update.
1205 * proc-service.c: Update.
1206 * server.c: Update.
1207 * spu-low.c: Update.
1208 * thread-db.c: Update.
1209 * win32-low.c: Update.
1210
fd79271b
TT
12112018-07-03 Tom Tromey <tom@tromey.com>
1212
1213 * linux-low.c: Update.
1214 * lynx-low.c: Update.
1215 * nto-low.c: Update.
1216 * remote-utils.c: Update.
1217 * spu-low.c: Update.
1218 * thread-db.c: Update.
1219 * win32-low.c: Update.
1220
c0867626
SDJ
12212018-06-29 Joel Brobecker <brobecker@adacore.com>
1222
1223 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1224 parameter in call to 'amd64_create_target_description'.
1225
2512d7ef
JK
12262018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1227
1228 * x86-tdesc.h: Remove executable permission flag.
1229
d0ac1c44
SM
12302018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1231
1232 * configure.ac: Remove AC_PREREQ, add missing quoting.
1233 * configure: Re-generate.
1234 * config.in: Re-generate.
1235 * aclocal.m4: Re-generate.
1236
c4eb05ff
SM
12372018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1238
1239 * tracepoint.h (current_traceframe): Remove declaration.
1240
02895270
AH
12412018-06-18 Alan Hayward <alan.hayward@arm.com>
1242
1243 * linux-aarch64-low.c (is_sve_tdesc): New function.
1244 (aarch64_sve_regs_copy_to_regcache): Likewise.
1245 (aarch64_sve_regs_copy_from_regcache): Likewise.
1246 (aarch64_regs_info): Add SVE checks.
1247 (initialize_low_arch): Initialize SVE.
1248
e9902bfc
AH
12492018-06-18 Alan Hayward <alan.hayward@arm.com>
1250
1251 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1252
fefa175e
AH
12532018-06-11 Alan Hayward <alan.hayward@arm.com>
1254
1255 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1256 (initialize_low_tracepoint): Likewise
1257 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1258 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1259 param.
1260 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1261 checks.
1262 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1263
b91ad3ff
AH
12642018-06-11 Alan Hayward <alan.hayward@arm.com>
1265
1266 * server.h (PBUFSIZ): Increase size
1267
f868386e
AH
12682018-06-11 Alan Hayward <alan.hayward@arm.com>
1269
1270 * regcache.c (regcache::raw_compare): New function.
1271 * regcache.h (regcache::raw_compare): New declaration.
1272
9c861883
AH
12732018-06-11 Alan Hayward <alan.hayward@arm.com>
1274
1275 * regcache.c (new_register_cache): Use new.
1276 (free_register_cache): Use delete.
1277 (register_data): Use const.
1278 (supply_register): Move body inside regcache.
1279 (regcache::raw_supply): New override function.
1280 (collect_register): Move body inside regcache.
1281 (regcache::raw_collect): New override function.
1282 (regcache::get_register_status): New override function.
1283 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1284
40591844
TT
12852018-06-09 Tom Tromey <tom@tromey.com>
1286
1287 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1288 declare queue.
1289 (event_queue): Use std::queue.
1290 (gdb_event_xfree): Remove.
1291 (initialize_event_loop, process_event, wait_for_event): Update.
1292
6341380d
SC
12932018-06-08 Stan Cox <scox@redhat.com>
1294
1295 * win32-low.c (win32_create_inferior): last_ptid and last_status
1296 moved to client_state.
1297
03349c93
PA
12982018-06-08 Pedro Alves <palves@redhat.com>
1299
1300 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1301 common/common-exceptions.o, common/common-utils.o,
1302 common/errors.o, common/print-utils.o and utils.o.
1303 * gdbreplay.c: Include "common-defs.h" instead of the two
1304 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1305 string.h or alloca.h.
1306 (perror_with_name): Delete.
1307 (remote_open): Use xstrdup instead of strdup.
1308 (main): Rename to ...
1309 (captured_main): ... this.
1310 (main): New.
1311
8dcc53b3
TT
13122018-06-08 Tom Tromey <tom@tromey.com>
1313
1314 * linux-low.c (linux_low_read_btrace): Update.
1315
c12a5089
SC
13162018-06-04 Stan Cox <scox@redhat.com>
1317
1318 * server.h (struct client_state): New.
1319 * server.c (cont_thread, general_thread, multi_process)
1320 (report_fork_events, report_vfork_events, report_exec_events)
1321 (report_thread_events, swbreak_feature, hwbreak_feature)
1322 (vCont_supported, disable_randomization, pass_signals)
1323 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1324 Moved to client_state.
1325 * remote-utils.c (remote_debug, noack_mode)
1326 (transport_is_reliable): Moved to client_state.
1327 * tracepoint.c (current_traceframe): Moved to client_state.
1328
1329 Update all callers.
1330 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1331 linux-low.c, remote-utils.h, target.c: Use client_state.
1332
122394f1
AH
13332018-05-31 Alan Hayward <alan.hayward@arm.com>
1334
1335 * configure.srv: Add new c/h file.
1336
95228a0d
AH
13372018-05-31 Alan Hayward <alan.hayward@arm.com>
1338
1339 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1340 null VQ.
1341
d8dab6c3
MR
13422018-05-25 Maciej W. Rozycki <macro@mips.com>
1343
1344 * gdb.arch/mips-fpregset-core.exp: New test.
1345 * gdb.arch/mips-fpregset-core.c: New test source.
1346
81e25b7c
EK
13472018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1348
1349 PR server/23198
1350 * hostio.c (require_int): Do not report overflow for integers
1351 between 0xfffffff and 0x7fffffff.
1352
7e947ad3
MR
13532018-05-22 Maciej W. Rozycki <macro@mips.com>
1354
1355 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1356 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1357 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1358 functions.
1359 (the_low_target): Wire them.
1360
1d75a658
PFC
13612018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1362
1363 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1364 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1365 mode. Call collect_register_by_name with vscr using
1366 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1367 (ppc_store_vrregset): Add and set vscr_offset variable as in
1368 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1369 vscr_offset.
1370
d078308a
PFC
13712018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1372
1373 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1374 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1375 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1376
7273b5fc
PFC
13772018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1378
1379 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1380 (ppc_store_vsxregset): Likewise.
1381 (ppc_fill_vrregset): Likewise.
1382 (ppc_store_vrregset): Likewise.
1383 (ppc_fill_evrregset): Likewise.
1384 (ppc_store_evrregset): Likewise.
1385 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1386 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1387 needed.
1388
2e077f5e
PFC
13892018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1390
1391 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1392 wordsize of the inferior. Call ppc_linux_target_wordsize.
1393
bd64614e
PFC
13942018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1395
1396 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1397 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1398 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1399 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1400 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1401 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1402 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1403 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1404 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1405 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1406 (tdesc_powerpc_e500l): Remove.
1407 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1408 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1409 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1410 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1411 linux-ppc-tdesc.h.
1412 (ppc_arch_setup): Remove target description matching code. Fill a
1413 ppc_linux_features struct and call ppc_linux_match_description
1414 with it.
1415
75d74cca
MR
14162018-05-22 Maciej W. Rozycki <macro@mips.com>
1417
1418 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1419 width of the requested register exceeds the width of the
1420 `ptrace' data type.
1421 (mips_cannot_store_register): Likewise.
1422
e4439e43
MR
14232018-05-21 Maciej W. Rozycki <macro@mips.com>
1424
1425 * linux-mips-low.c (mips_fetch_register): New function. Update
1426 preceding comment.
1427 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1428 (the_low_target): Wire `mips_fetch_register'.
1429
55271bf9
JB
14302018-05-10 Joel Brobecker <brobecker@adacore.com>
1431
1432 * lynx-i386-low.c (LYNXOS_178): New macro.
1433 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1434 the layout on LynxOS-178.
1435 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1436 handle floating point registers that are not supported by
1437 LynxOS-178.
1438
1a34f210
TT
14392018-05-10 Tom Tromey <tom@tromey.com>
1440
1441 * configure: Rebuild.
1442
190852c8
JB
14432018-05-10 Joel Brobecker <brobecker@adacore.com>
1444
1445 PR server/23158:
1446 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1447 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1448 Use it to set the expedite_regs field in the given tdesc.
1449 * x86-tdesc.h: New file.
1450 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1451 Adjust following the addition of the new expedite_regs parameter
1452 to init_target_desc.
1453 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1454 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1455 (i386_linux_read_description, amd64_linux_read_description):
1456 Adjust following the addition of the new expedite_regs parameter
1457 to init_target_desc.
1458 * lynx-i386-low.c: #include "x86-tdesc.h".
1459 (lynx_i386_arch_setup): Adjust following the addition of the new
1460 expedite_regs parameter to init_target_desc.
1461 * nto-x86-low.c: #include "x86-tdesc.h".
1462 (nto_x86_arch_setup): Adjust following the addition of the new
1463 expedite_regs parameter to init_target_desc.
1464 * win32-i386-low.c: #include "x86-tdesc.h".
1465 (i386_arch_setup): Adjust following the addition of the new
1466 expedite_regs parameter to init_target_desc.
1467
7dbac825
JB
14682018-05-10 Joel Brobecker <brobecker@adacore.com>
1469
1470 PR server/23158:
1471 * win32-low.c (win32_create_inferior): Add call to my_wait
1472 setting last_status global.
1473
906994d9
JB
14742018-05-10 Joel Brobecker <brobecker@adacore.com>
1475
1476 PR server/23158:
1477 * win32-low.c (create_process): Only call gdb_tilde_expand if
1478 inferior_cwd is not NULL.
1479
8ee22052
AB
14802018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1481
1482 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1483 registers to the cache if their values have changed.
1484 (i387_xsave_to_cache): Provide default values for x87 control
1485 registers when these features are available, but disabled.
1486 * regcache.c (supply_register_by_name_zeroed): New function.
1487 * regcache.h (supply_register_by_name_zeroed): Declare new
1488 function.
1489
aff689d3
TT
14902018-05-07 Tom Tromey <tom@tromey.com>
1491
1492 * configure: Rebuild.
1493
85e26832
TT
14942018-05-04 Tom Tromey <tom@tromey.com>
1495
1496 * configure: Rebuild.
1497
a3b60e45
JK
14982018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1499 Pedro Alves <palves@redhat.com>
1500
1501 * linux-aarch64-low.c (aarch64_stopped_data_address):
1502 Likewise.
1503
632e107b
TT
15042018-04-27 Tom Tromey <tom@tromey.com>
1505
1506 * configure: Rebuild.
1507
458412c3
TT
15082018-04-23 Tom Tromey <tom@tromey.com>
1509
1510 * configure: Rebuild.
1511
f31c089e
SM
15122018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1513
1514 * Makefile.in (depcomp): Add "..".
1515 (all_deps_files): New and use it.
1516
b319b098
AH
15172018-04-18 Alan Hayward <alan.hayward@arm.com>
1518
1519 * configure.srv (aarch64*-*-linux*): Don't include xml.
1520 (i[34567]86-*-cygwin*): Likewise.
1521 (i[34567]86-*-linux*): Likewise.
1522 (i[34567]86-*-lynxos*): Likewise.
1523 (i[34567]86-*-mingw32ce*): Likewise.
1524 (i[34567]86-*-mingw*): Likewise.
1525 (i[34567]86-*-nto*): Likewise.
1526 (tic6x-*-uclinux): Likewise.
1527 (x86_64-*-linux*): Likewise.
1528 (x86_64-*-mingw*): Likewise.
1529 (x86_64-*-cygwin*): Likewise.
1530
3b74854b
AH
15312018-04-18 Alan Hayward <alan.hayward@arm.com>
1532
1533 * tdesc.c: Remove xml parameter.
1534
e98577a9
AH
15352018-04-18 Alan Hayward <alan.hayward@arm.com>
1536
1537 * server.c (get_features_xml): Remove cast.
1538 * tdesc.c (void target_desc::accept): Fill in function.
1539 (tdesc_get_features_xml): Remove old xml creation.
1540 (print_xml_feature::visit_pre): Add xml vistor.
1541 * tdesc.h (struct target_desc): Make xmltarget mutable.
1542 (tdesc_get_features_xml): Remove declaration.
1543
d278f585
AH
15442018-04-18 Alan Hayward <alan.hayward@arm.com>
1545
1546 * tdesc.c (tdesc_architecture_name): Add new function.
1547 (tdesc_osabi_name): Likewise.
1548 (tdesc_get_features_xml): Use new functions.
1549
eee8a18d
AH
15502018-04-18 Alan Hayward <alan.hayward@arm.com>
1551
1552 * tdesc.c (tdesc_create_flags): Remove.
1553 (tdesc_add_flag): Likewise.
1554 (tdesc_named_type): Likewise.
1555 (tdesc_create_union): Likewise.
1556 (tdesc_create_struct): Likewise.
1557 (tdesc_create_vector): Likewise.
1558 (tdesc_add_bitfield): Likewise.
1559 (tdesc_add_field): Likewise.
1560 (tdesc_set_struct_size): Likewise.
1561
82ec9bc7
AH
15622018-04-18 Alan Hayward <alan.hayward@arm.com>
1563
1564 * tdesc.c (~target_desc): Remove implictly deleted items.
1565 (init_target_desc): Iterate all features.
1566 (tdesc_get_features_xml): Use vector.
1567 (tdesc_create_feature): Create feature.
1568 * tdesc.h (tdesc_feature) Remove
1569 (target_desc): Add features.
1570
ea3e7d71
AH
15712018-04-18 Alan Hayward <alan.hayward@arm.com>
1572
1573 * Makefile.in: Add common/tdesc.c
1574 * tdesc.c (init_target_desc): init all reg_defs from register
1575 vector.
1576 (tdesc_create_reg): Create tdesc_reg.
1577 * tdesc.h (tdesc_feature): Add register vector.
1578
17d08cd4
SM
15792018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1580
1581 * tdesc.h (struct target_desc) <features>: Change type to
1582 std::vector<std::string>.
1583 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1584 changes.
1585 (tdesc_get_features_xml): Likewise.
1586 (tdesc_create_feature): Likewise.
1587
5cd3e386
AH
15882018-03-26 Alan Hayward <alan.hayward@arm.com>
1589
1590 * regcache.c (find_register_by_number): Return a ref.
1591 (find_regno): Use references.
1592 (register_size): Likewise.
1593 (register_data): Likewise.
1594 * tdesc.c (target_desc::~target_desc): Remove free calls.
1595 (target_desc::operator==): Use std::vector compare.
1596 (init_target_desc): Use reference.
1597 (tdesc_create_reg): Use reg constructors.
1598 * tdesc.h (struct target_desc): Replace pointer with object.
1599
dff7492c
AH
16002018-03-23 Alan Hayward <alan.hayward@arm.com>
1601
1602 * regcache.c (find_register_by_number): Make static.
1603 (find_regno): Use find_register_by_number
1604 * regcache.h (struct reg): Remove declaration.
1605
d80e5242
AH
16062018-03-23 Alan Hayward <alan.hayward@arm.com>
1607
1608 * tdesc.c (target_desc::~target_desc): Move to here.
1609 (target_desc::operator==): Likewise.
1610 * tdesc.h (target_desc::~target_desc): Move from here.
1611 (target_desc::operator==): Likewise.
1612
f69c5afb
AA
16132018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1614
1615 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1616
ce29f843
AA
16172018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1618
1619 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1620 S390_TDESC_GS.
1621 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1622 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1623 and init_registers_s390_gs_linux64.
1624
c49bd90b
AA
16252018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1626
1627 * linux-s390-low.c (s390_fill_gs): Remove function.
1628 (s390_fill_gsbc): Remove function.
1629 (s390_regsets): Set fill functions for the guarded storage regsets
1630 to NULL.
1631
7edb9bd3
AA
16322018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1633
1634 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1635 the word size. Add comment.
1636 (s390_get_wordsize): New function.
1637 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1638 pswm with it. Instead, use s390_get_wordsize to determine the
1639 word size first and derive the correct tdesc from that directly.
1640
39be3c7e
SM
16412018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1642
1643 * Makefile.in: Include silent-rules.mk.
1644 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1645 (COMPILE): Add ECHO_CXX.
1646 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1647 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1648 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1649 (version-generated.c): Add ECHO_GEN.
1650 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1651 (IPAGENT_COMPILE): Add ECHO_CXX.
1652 (%-generated.c): Add ECHO_REGDAT.
1653
3ae9ce5d
TT
16542018-03-14 Tom Tromey <tom@tromey.com>
1655
1656 PR cli/14977:
1657 * ax.c (ax_printf): Special case for NULL.
1658
e6a58aa8
SM
16592018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1660
1661 * linux-low.c (linux_qxfer_libraries_svr4): Use
1662 xml_escape_text_append.
1663
f6e8a41e
SM
16642018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1665
1666 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1667
b9671caf
SM
16682018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1669
1670 * server.c (handle_general_set): Remove unnecessary xstrdup.
1671
e80aaf61
SM
16722018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1673
1674 * server.c (parse_debug_format_options): Adjust to
1675 delim_string_to_char_ptr_vec changes.
1676 * thread-db.c (thread_db_load_search): Adjust to
1677 dirnames_to_char_ptr_vec changes.
1678
b1223e78
MM
16792018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1680
1681 * target.h (target_enable_btrace, target_disable_btrace)
1682 (target_read_btrace, target_read_btrace_conf): Turn macro into
1683 inline function. Throw error if target method is not defined.
1684 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1685 check for btrace target method. Be prepared to handle exceptions
1686 from btrace target methods.
1687
81561546
SDJ
16882018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1689
1690 * server.c (captured_main): Change order of error message printed
1691 when the current working directory cannot be found.
1692
25e3c82c
SDJ
16932018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1694
1695 * server.c: Include "filenames.h" and "pathstuff.h".
1696 (program_name): Delete variable.
1697 (program_path): New anonymous class.
1698 (get_exec_wrapper): Use "program_path" instead of
1699 "program_name".
1700 (handle_v_run): Likewise.
1701 (captured_main): Likewise.
1702 (process_serial_event): Likewise.
1703
b4987c95
SDJ
17042018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1705
1706 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1707 (OBJS): Add "pathstuff.o".
1708 * server.c (current_directory): New global variable.
1709 (captured_main): Initialize "current_directory".
1710
f46cd62a
AH
17112018-02-26 Alan Hayward <alan.hayward@arm.com>
1712
1713 * tdesc.c: Use common/tdesc.h.
1714 * tdesc.h: Likewise.
1715
a543c5ca
AH
17162018-02-20 Alan Hayward <alan.hayward@arm.com>
1717 Simon Marchi <simon.marchi@ericsson.com>
1718
1719 * Makefile.in: Switch order of make rules.
1720
b5884fa7
AH
17212018-02-19 Alan Hayward <alan.hayward@arm.com>
1722
1723 * Makefile.in: Add common directory in build.
1724 * configure.ac: Add common reference.
1725 * configure: Regenerate.
1726
de6242d3
MM
17272018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1728
1729 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1730 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1731 * spu-low.c (spu_target_ops): Likewise.
1732 * win32-low.c (win32_target_ops): Likewise.
1733 * server.c (supported_btrace_packets): Report packets unconditionally.
1734 * target.h (target_ops) <supports_btrace>: Remove.
1735 (target_supports_btrace): Remove.
1736
9ee23a85
MM
17372018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1738
1739 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1740 (handle_btrace_disable): Change return type to void. Use exceptions
1741 to report errors.
1742 (handle_btrace_general_set): Catch exception and copy message to
1743 return message.
1744
8ce47547
TT
17452018-02-08 Tom Tromey <tom@tromey.com>
1746
1747 * linux-low.c (install_software_single_step_breakpoints): Use
1748 make_scoped_restore.
1749 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1750 (do_restore_current_thread_cleanup): Remove.
1751 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1752 declare.
1753
45dd3607
TT
17542018-02-08 Tom Tromey <tom@tromey.com>
1755
1756 * mem-break.c (set_raw_breakpoint_at): Use
1757 gdb::unique_xmalloc_ptr.
1758
e671cd59
PA
17592018-01-30 Pedro Alves <palves@redhat.com>
1760
1761 PR gdb/13211
1762 * target.c (target_terminal::terminal_state): Rename to ...
1763 (target_terminal::m_terminal_state): ... this.
1764
a0aad537
JC
17652018-01-19 James Clarke <jrtc27@jrtc27.com>
1766
1767 * linux-low.c (handle_extended_wait): Surround call to
1768 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1769
4d9b86e1
SM
17702018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1771
1772 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1773 linux_ptrace_attach_fail_reason_string now returning an
1774 std::string.
1775 (linux_attach): Likewise.
1776 * thread-db.c (attach_thread): Likewise.
1777
f517c180
EA
17782018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1779
1780 PR gdb/21559
1781 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1782 checking for fs_base/gs_base fields in struct user_regs_struct.
1783 * configure: Regenerate.
1784
9a70f35c
YQ
17852018-01-16 Yao Qi <yao.qi@linaro.org>
1786
1787 PR gdb/18749
1788 * linux-low.c (fetch_register): Call supply_register instead of
1789 error.
1790
605fd3c6
YQ
17912018-01-08 Yao Qi <yao.qi@linaro.org>
1792 Simon Marchi <simon.marchi@ericsson.com>
1793
1794 * Makefile.in (OBS): Remove selftest.o.
1795 * configure.ac: Set srv_selftest_objs if $development is true.
1796 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1797 * configure: Re-generated.
1798 * server.c (captured_main): Wrap variable selftest_filter with
1799 GDB_SELF_TEST.
1800
2cc05030
SM
18012018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1802
1803 * server.c (parse_debug_format_options): Return std::string.
1804 (handle_monitor_command, captured_main): Adjust.
1805
e379cee6
PA
18062018-01-05 Pedro Alves <palves@redhat.com>
1807
1808 PR gdb/18653
1809 * server.c (captured_main): Pass quiet=false to
1810 save_original_signals_state.
1811
82e1e79a
JB
18122018-01-01 Joel Brobecker <brobecker@adacore.com>
1813
1814 * gdbreplay.c (gdbreplay_version): Update copyright year in
1815 version message.
1816 * server.c (gdbserver_version): Likewise.
1817
8e481c3b
TT
18182017-12-08 Tom Tromey <tom@tromey.com>
1819
1820 * ax.c (ax_printf): Update.
1821
a8806230
YQ
18222017-12-07 Yao Qi <yao.qi@linaro.org>
1823
1824 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1825 aarch64_linux_read_description.
1826 * linux-amd64-ipa.c (idx2mask): New array.
1827 (get_ipa_tdesc): Move idx2mask out.
1828 (initialize_low_tracepoint): Initialize target descriptions.
1829 * linux-i386-ipa.c (idx2mask): New array.
1830 (get_ipa_tdesc): Move idx2mask out.
1831 (initialize_low_tracepoint): Initialize target descriptions.
1832
d4a0e8b5
SM
18332017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1834
1835 * tdesc.c (struct tdesc_type): Change return type.
1836 (tdesc_add_flag): Change parameter type.
1837 (tdesc_add_bitfield): Likewise.
1838 (tdesc_add_field): Likewise.
1839 (tdesc_set_struct_size): Likewise.
1840
798a7429
SM
18412017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1842
1843 * regcache.c (registers_to_string): Remove unused variable.
1844
c0e15c9b
SM
18452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1846
1847 * inferiors.c (for_each_inferior_with_data): Remove.
1848 * inferiors.h (for_each_inferior_with_data): Remove.
1849 * server.c (handle_qxfer_threads_worker): Change parameter type.
1850 (handle_qxfer_threads_proper): Use for_each_thread.
1851
f0045347
SM
18522017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1853
1854 * inferiors.c (for_each_inferior): Remove.
1855 (clear_inferiors): Use for_each_thread.
1856 * inferiors.h (for_each_inferior): Remove.
1857 * linux-low.c (linux_wait_for_event_filtered): Use
1858 for_each_thread.
1859 (linux_stabilize_threads): Likewise.
1860 * regcache.c (regcache_release): Likewise.
1861 * server.c (gdb_wants_all_threads_stopped): Likewise.
1862 (clear_pending_status_callback): Remove.
1863 (handle_status): Use for_each_thread.
1864 (captured_main): Likewise.
1865 * win32-low.c (child_init_thread_list): Likewise.
1866 (win32_clear_inferiors): Likewise.
1867 (fake_breakpoint_event): Likewise.
1868
9521758b
SM
18692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1870
1871 * inferiors.h (find_inferior): Remove.
1872 * inferiors.c (find_inferior): Remove.
1873
8f86d7aa
SM
18742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1875
1876 * linux-low.c (resume_status_pending_p): Update comment.
1877 (need_step_over_p): Update comment.
1878
e2b44075
SM
18792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1880
1881 * linux-low.c (proceed_one_lwp): Return void, change parameter
1882 type.
1883 (unsuspend_and_proceed_one_lwp): Likewise.
1884 (proceed_all_lwps): Use for_each_thread.
1885 (unstop_all_lwps): Likewise.
1886
c80825ff
SM
18872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1888
1889 * linux-low.c (linux_resume_one_thread): Return void, take
1890 parameter directly.
1891 (linux_resume): Use for_each_thread.
1892
df3e4dbe
SM
18932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1894
1895 * linux-low.c (send_sigstop_callback): Return void, change
1896 parameter type. Rename to...
1897 (send_sigstop): ... this.
1898 (suspend_and_send_sigstop_callback): Return void, change parameter
1899 type. Rename to...
1900 (suspend_and_send_sigstop): ... this.
1901 (stop_all_lwps): Use for_each_thread.
1902
5a6b0a41
SM
19032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1904
1905 * linux-low.c (lwp_running): Return bool, remove unused
1906 argument.
1907 (linux_stabilize_threads): Use find_thread.
1908
39a64da5
SM
19092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1910
1911 * linux-low.c (select_singlestep_lwp_callback): Remove.
1912 (count_events_callback): Remove.
1913 (select_event_lwp_callback): Remove.
1914 (select_event_lwp): Use find_thread/for_each_thread.
1915
a1385b7b
SM
19162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1917
1918 * linux-low.c (not_stopped_callback): Return bool, take filter
1919 argument directly.
1920 (linux_wait_for_event_filtered): Use find_thread.
1921 (linux_wait_1): Likewise.
1922
454296a2
SM
19232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1924
1925 * linux-low.c (same_lwp): Remove.
1926 (find_lwp_pid): Use find_thread.
1927
6b2a85da
SM
19282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1929
1930 * linux-low.c (delete_lwp_callback): Remove.
1931 (linux_mourn): Use for_each_thread.
1932
798a38e8
SM
19332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1934
1935 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1936 args parameter, don't check for pid.
1937 (linux_detach): Use for_each_thread.
1938
e4eb0dec
SM
19392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1940
1941 * linux-low.c (struct counter): Remove.
1942 (second_thread_of_pid_p): Remove.
1943 (last_thread_of_process_p): Use find_thread.
1944
83e1b6c1
SM
19452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1946
1947 * inferiors.c (find_inferior_in_random): Remove.
1948 * inferiors.h (find_inferior_in_random): Remove.
1949 * linux-low.c (status_pending_p_callback): Return bool, accept
1950 parameter ptid directly.
1951 (linux_wait_for_event_filtered): Use find_thread_in_random.
1952 (linux_wait_1): Likewise.
1953
8dc7b443
SM
19542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1955
1956 * inferiors.c (find_inferior_id): Remove.
1957 (find_thread_ptid): Move implemention from find_inferior_id to
1958 here.
1959 * inferiors.h (find_inferior_id): Remove.
1960 * server.c (handle_status): Use find_thread_ptid.
1961 (process_serial_event): Likewise.
1962 * thread-db.c (find_one_thread): Likewise.
1963 (thread_db_thread_handle): Likewise.
1964 * win32-low.c (thread_rec): Likewise.
1965 (child_delete_thread): Likewise.
1966 (win32_thread_alive): Likewise.
1967 (get_child_debug_event): Likewise.
1968
da25033c
SM
19692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1970
1971 * linux-mips-low.c (update_watch_registers_callback): Return
1972 void, remove pid_p parameter, don't check for pid.
1973 (mips_insert_point, mips_remove_point): Use for_each_thread.
1974
c91bb56b
SM
19752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1976
1977 * lynx.low (lynx_delete_thread_callback): Remove.
1978 (lynx_mourn): Use for_each_thread.
1979
634a3254
SM
19802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1981
1982 * regcache.c (regcache_invalidate_one): Remove.
1983 (regcache_invalidate_pid): use for_each_thread.
1984
41272101
TT
19852017-11-26 Tom Tromey <tom@tromey.com>
1986
1987 * linux-low.c (linux_create_inferior): Update.
1988
f5291a6f
UW
19892017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1990
1991 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1992
6654d750
AH
19932017-11-24 Alan Hayward <alan.hayward@arm.com>
1994
1995 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1996 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1997 * linux-aarch64-tdesc-selftest.c: New file.
1998 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1999
20002017-11-24 Alan Hayward <alan.hayward@arm.com>
2001
2002 * configure.srv: Add new file.
2003 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2004 * linux-aarch64-tdesc-selftest.c: New file.
2005 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2006
49bdb7ee
AH
20072017-11-24 Alan Hayward <alan.hayward@arm.com>
2008
2009 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2010 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2011 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2012
d6d7ce56
AH
20132017-11-24 Alan Hayward <alan.hayward@arm.com>
2014
2015 * configure.srv: Add new files.
2016 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2017 aarch64_linux_read_description.
2018 * linux-aarch64-low.c (aarch64_linux_read_description):
2019 Merge with aarch64_arch_setup.
2020 (aarch64_arch_setup): Call aarch64_linux_read_description.
2021 * linux-aarch64-tdesc.c: New file.
2022 * linux-aarch64-tdesc.h: New file.
2023
506fe5f4
YQ
20242017-11-24 Yao Qi <yao.qi@linaro.org>
2025
2026 * configure.srv: Set $srv_regobj for tic6x-linux.
2027 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2028 (tic6x_read_description): Move some code to tic6x_arch_setup.
2029 (tic6x_tdesc_test): New function.
2030 (initialize_low_arch): Call selftests::register_test.
2031
29f9a567
YQ
20322017-11-22 Yao Qi <yao.qi@linaro.org>
2033
2034 * remote-utils.c (prepare_resume_reply): Use memcpy.
2035
578290ec
SM
20362017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2037
2038 * linux-low.c (kill_one_lwp_callback): Return void, take
2039 argument directly, don't filter on pid.
2040 (linux_kill): Use for_each_thread.
2041
eca55aec
SM
20422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2043
2044 * linux-low.c (need_step_over_p): Return bool, remove dummy
2045 argument.
2046 (linux_resume, proceed_all_lwps): Use find_thread.
2047
25c28b4d
SM
20482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2049
2050 * linux-low.c (resume_status_pending_p): Return bool, remove
2051 flag_p argument.
2052 (linux_resume): Use find_thread.
2053
5fdda392
SM
20542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2055
2056 * linux-low.c (struct thread_resume_array): Remove.
2057 (linux_set_resume_request): Return void, take arguments
2058 directly.
2059 (linux_resume): Use for_each_thread.
2060
fcb056a5
SM
20612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2062
2063 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2064 return bool, remove data argument.
2065 (linux_stabilize_threads): Use find_thread.
2066
139720c5
SM
20672017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2068
2069 * linux-low.c (unsuspend_one_lwp): Remove.
2070 (unsuspend_all_lwps): Use for_each_thread, inline code from
2071 unsuspend_one_lwp.
2072
6d1e5673
SM
20732017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2074
2075 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2076 * linux-low.c (struct iterate_over_lwps_args): Remove.
2077 (iterate_over_lwps_filter): Remove.
2078 (iterate_over_lwps): Use find_thread.
2079
bbf550d5
SM
20802017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2081
2082 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2083 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2084 code from reset_lwp_ptrace_options_callback.
2085
00192f77
SM
20862017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2087
2088 * linux-arm-low.c (struct update_registers_data): Remove.
2089 (update_registers_callback): Return void, take arguments
2090 directly, don't check thread's pid.
2091 (arm_insert_point, arm_remove_point): Use for_each_thread.
2092
2bee2b6c
SM
20932017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2094
2095 * win32-low.c (continue_one_thread): Return void, take argument
2096 directly.
2097 (child_continue): Use for_each_thread.
2098
0b360f19
SM
20992017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2100
2101 * win32-i386-low.c (update_debug_registers_callback): Rename
2102 to ...
2103 (update_debug_registers): ... this, return void, remove pid_p arg.
2104 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2105
f27866ba
SM
21062017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2107
2108 * inferiors.h (struct process_info): Add constructor, initialize
2109 fields..
2110 <syscalls_to_catch>: Change type to std::vector<int>.
2111 * inferiors.c (add_process): Allocate process_info with new.
2112 (remove_process): Free process_info with delete.
2113 * linux-low.c (handle_extended_wait): Adjust.
2114 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2115 * server.c (handle_general_set): Adjust.
2116
e849ea89
PA
21172017-11-16 Pedro Alves <palves@redhat.com>
2118
2119 * remote-utils.c (remote_close): Block SIGIO signals instead of
2120 uninstalling the SIGIO handler.
2121
1d0aa65c
AH
21222017-11-16 Alan Hayward <alan.hayward@arm.com>
2123
2124 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2125
3491a34c
YQ
21262017-11-16 Yao Qi <yao.qi@linaro.org>
2127
2128 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2129 (tic6x_store_gregset): Likewise.
2130 (tic6x_usrregs_info): Move it up.
2131
a602f924
AH
21322017-11-15 Alan Hayward <alan.hayward@arm.com>
2133
2134 * Makefile.in: Update arch rules.
2135 * configure.srv: Explicitly mark arch/ files.
2136
5616b6c3
AS
21372017-11-13 Andreas Schwab <schwab@suse.de>
2138
2139 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2140 function.
2141 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2142
d1928160
PA
21432017-11-06 Pedro Alves <palves@redhat.com>
2144
2145 * config.in, configure: Regenerate.
2146
bac608e7
SM
21472017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2148
2149 * target.c (struct thread_search): Remove.
2150 (thread_search_callback): Remove.
2151 (prepare_to_access_memory): Use for_each_thread instead of
2152 find_inferior. Inline code from thread_search_callback.
2153
eaddb425
SM
21542017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2155
2156 * server.c (struct visit_actioned_threads_data): Remove.
2157 (visit_actioned_threads): Change prototype to take arguments
2158 directly.
2159 (resume): Use find_thread instead of find_inferior.
2160
99078d34
SM
21612017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2162
2163 * server.c (queue_stop_reply_callback): Change prototype, return
2164 void.
2165 (find_status_pending_thread_callback): Remove.
2166 (handle_status): Replace find_inferior with find_thread and
2167 for_each_thread.
2168
cc628f3d
AH
21692017-10-25 Alan Hayward <alan.hayward@arm.com>
2170
2171 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2172 with REGNO.
2173 (aarch64_store_gregset): Likewise.
2174 (aarch64_fill_fpregset): Likewise.
2175 (aarch64_store_fpregset): Likewise.
2176
4d3bb80e
SM
21772017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2178
2179 * gdbthread.h (find_thread, for_each_thread): New functions.
2180 * inferiors.c (thread_of_pid): Remove.
2181 (find_any_thread_of_pid): Use find_thread.
2182 * linux-low.c (num_lwps): Use for_each_thread.
2183
7a7cdfa0
YQ
21842017-10-17 Yao Qi <yao.qi@linaro.org>
2185
2186 * Makefile.in: Remove one rule.
2187 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2188
e675d170
YQ
21892017-10-17 Yao Qi <yao.qi@linaro.org>
2190
2191 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2192 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2193
7eb4e0f9
YQ
21942017-10-17 Yao Qi <yao.qi@linaro.org>
2195
2196 * configure.srv: Rename arm.o with arch/arm.o.
2197
60d6cfc9
YQ
21982017-10-17 Yao Qi <yao.qi@linaro.org>
2199
2200 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2201 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2202 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2203 (arch-i386.o, arch-amd64.o): Remove rules.
2204 (arch/%.o): New rule.
2205 Update POSTCOMPILE and COMPILE.pre.
2206 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2207 * configure: Re-generated.
2208 * configure.srv: Replace arch-i386.o with arch/i386.o.
2209 Replace arch-amd64.o with arch/amd64.o.
2210
5bfda255
YQ
22112017-10-16 Yao Qi <yao.qi@linaro.org>
2212
2213 * configure: Regenerated.
2214
9c80ecd6
SM
22152017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2216
2217 * inferiors.h: (struct inferior_list): Remove.
2218 (struct inferior_list_entry); Remove.
2219 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2220 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2221 get_first_inferior): Remove.
2222 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2223 find_inferior_id, find_inferior_in_random): Change signature.
2224 * inferiors.c (all_threads): Change type to
2225 std::list<thread_info *>.
2226 (get_thread): Remove macro.
2227 (find_inferior, find_inferior_id): Change signature, implement
2228 using find_thread.
2229 (find_inferior_in_random): Change signature, implement using
2230 find_thread_in_random.
2231 (for_each_inferior, for_each_inferior_with_data): Change
2232 signature, implement using for_each_thread.
2233 (add_inferior_to_list, remove_inferior): Remove.
2234 (add_thread, get_first_thread, thread_of_pid,
2235 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2236 (get_first_inferior, one_inferior_p, clear_inferior_list):
2237 Remove.
2238 (clear_inferiors, get_thread_process): Update.
2239 * gdbthread.h: Include <list>.
2240 (struct thread_info) <entry>: Remove field.
2241 <id>: New field.
2242 (all_threads): Change type to std::list<thread_info *>.
2243 (get_first_inferior): Add doc.
2244 (find_thread, for_each_thread, find_thread_in_random): New
2245 functions.
2246 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2247 * linux-arm-low.c (update_registers_callback): Update.
2248 * linux-low.c (second_thread_of_pid_p): Update.
2249 (kill_one_lwp_callback, linux_detach_lwp_callback,
2250 delete_lwp_callback, status_pending_p_callback, same_lwp,
2251 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2252 iterate_over_lwps, not_stopped_callback,
2253 resume_stopped_resumed_lwps, count_events_callback,
2254 select_singlestep_lwp_callback, select_event_lwp_callback,
2255 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2256 suspend_and_send_sigstop_callback, wait_for_sigstop,
2257 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2258 lwp_running, linux_set_resume_request, resume_status_pending_p,
2259 need_step_over_p, start_step_over, linux_resume_one_thread,
2260 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2261 reset_lwp_ptrace_options_callback): Update.
2262 * linux-mips-low.c (update_watch_registers_callback): Update.
2263 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2264 Update.
2265 (free_register_cache_thread_one): Remove.
2266 (regcache_release): Update.
2267 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2268 handle_qxfer_threads_worker): Update.
2269 (handle_query): Update, use list iterator.
2270 (visit_actioned_threads, handle_pending_status,
2271 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2272 clear_pending_status_callback, set_pending_status_callback,
2273 find_status_pending_thread_callback, handle_status,
2274 process_serial_event): Update.
2275 * target.c (thread_search_callback): Update.
2276 * thread-db.c (thread_db_get_tls_address): Update.
2277 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2278 Update.
2279 * win32-i386-low.c (update_debug_registers_callback): Update.
2280 * win32-low.c (delete_thread_info, child_delete_thread,
2281 continue_one_thread, suspend_one_thread,
2282 get_child_debug_event): Adjust.
2283
9179355e
SM
22842017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2285
2286 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2287 * inferiors.h: Include <list>.
2288 (struct process_info) <entry>: Remove field.
2289 <pid>: New field.
2290 (pid_of): Change macro to function.
2291 (ptid_of, lwpid_of): Remove macro.
2292 (all_processes): Change type to std::list<process_info *>.
2293 (ALL_PROCESSES): Remove macro.
2294 (for_each_process, find_process): New function.
2295 * inferiors.c (all_processes): Change type to
2296 std::list<process_info *>.
2297 (find_thread_process): Adjust.
2298 (add_process): Likewise.
2299 (remove_process): Likewise.
2300 (find_process_pid): Likewise.
2301 (get_first_process): Likewise.
2302 (started_inferior_callback): Remove.
2303 (have_started_inferiors_p): Adjust.
2304 (attached_inferior_callback): Remove.
2305 (have_attached_inferiors_p): Adjust.
2306 * linux-low.c (check_zombie_leaders): Likewise.
2307 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2308 (x86_linux_update_xmltarget): Adjust.
2309 * server.c (handle_query): Likewise.
2310 (gdb_reattached_process): Remove.
2311 (handle_status): Adjust.
2312 (kill_inferior_callback): Likewise.
2313 (detach_or_kill_inferior): Remove.
2314 (print_started_pid): Likewise.
2315 (print_attached_pid): Likewise.
2316 (detach_or_kill_for_exit): Update.
2317 (process_serial_event): Likewise.
2318 * linux-arm-low.c (arm_new_fork): Likewise.
2319
c9cb8905
SM
23202017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2321
2322 * dll.h: Include <list>.
2323 (struct dll_info): Add constructor.
2324 <entry>: Remove field.
2325 (all_dlls): Change type to std::list<dll_info>.
2326 * dll.c: Include <algorithm>.
2327 (get_dll): Remove macro.
2328 (all_dlls): Change type to std::list<dll_info *>.
2329 (free_one_dll): Remove.
2330 (match_dll): Likewise.
2331 (loaded_dll): Adjust.
2332 (unloaded_dll): Adjust to all_dlls type change, use
2333 std::find_if. Inline code from match_dll.
2334 (clear_dlls): Adjust to all_dlls type change.
2335 * server.c (emit_dll_description): Remove.
2336 (handle_qxfer_libraries): Adjust to all_dlls type change,
2337 integrate emit_dll_description's functionality.
2338
04ec7890
SM
23392017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2340
2341 * linux-low.h (struct linux_target_ops) <delete_process>: New
2342 field.
2343 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2344 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2345 (struct linux_target_ops): Add delete_process callback.
2346 * linux-arm-low.c (arm_delete_process): New.
2347 (struct linux_target_ops): Add delete_process callback.
2348 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2349 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2350 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2351 * linux-mips-low.c (mips_linux_delete_process): New.
2352 (struct linux_target_ops): Add delete_process callback.
2353 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2354 * linux-s390-low.c (struct linux_target_ops): Likewise.
2355 * linux-sh-low.c (struct linux_target_ops): Likewise.
2356 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2357 * linux-tile-low.c (struct linux_target_ops): Likewise.
2358 * linux-x86-low.c (x86_linux_delete_process): New.
2359 (struct linux_target_ops): Add delete_process callback.
2360 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2361
466eecee
SM
23622017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2363
2364 * linux-aarch64-low.c (the_low_target): Add thread delete
2365 callback.
2366 * linux-arm-low.c (arm_delete_thread): New function.
2367 (the_low_target): Add thread delete callback.
2368 * linux-bfin-low.c (the_low_target): Likewise.
2369 * linux-crisv32-low.c (the_low_target): Likewise.
2370 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2371 set.
2372 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2373 field.
2374 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2375 * linux-mips-low.c (mips_linux_delete_thread): New function.
2376 (the_low_target): Add thread delete callback.
2377 * linux-ppc-low.c (the_low_target): Likewise.
2378 * linux-s390-low.c (the_low_target): Likewise.
2379 * linux-sh-low.c (the_low_target): Likewise.
2380 * linux-tic6x-low.c (the_low_target): Likewise.
2381 * linux-tile-low.c (the_low_target): Likewise.
2382 * linux-x86-low.c (the_low_target): Likewise.
2383 * linux-xtensa-low.c (the_low_target): Likewise.
2384
b79f7801
YZ
23852017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2386
2387 * win32-low.c: Include "common-inferior.h".
2388
bc3b087d
SDJ
23892017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2390
2391 * inferiors.c (set_inferior_cwd): New function.
2392 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2393 (handle_query): Inform that QSetWorkingDir is supported.
2394 * win32-low.c (create_process): Pass the inferior's cwd to
2395 CreateProcess.
2396
d092c5a2
SDJ
23972017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2398
2399 * inferiors.c (current_inferior_cwd): New global variable.
2400 (get_inferior_cwd): New function.
2401 * inferiors.h (struct process_info) <cwd>: New field.
2402
7da0a886
SDJ
24032017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2404
2405 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2406 (OBS): Add gdb_tilde_expand.o.
2407
289a6840
SM
24082017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2409
2410 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2411 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2412
256642e8
PA
24132017-09-29 Pedro Alves <palves@redhat.com>
2414
2415 * ax.c (gdb_parse_agent_expr): Constify.
2416 * ax.h (gdb_parse_agent_expr): Constify.
2417 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2418 Constify.
2419 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2420 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2421 * remote-utils.h (read_ptid): Constify.
2422 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2423 (process_point_options, process_serial_event): Constify.
2424 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2425 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2426 (cmd_qtbuffer): Constify.
2427
5b9ca4d4
PA
24282017-09-29 Pedro Alves <palves@redhat.com>
2429
2430 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2431 fails.
2432
94c207e0
PA
24332017-09-29 Pedro Alves <palves@redhat.com>
2434
2435 * linux-low.c (handle_extended_wait): Pass parent thread instead
2436 of process to thread_db_notice_clone.
2437 * linux-low.h (thread_db_notice_clone): Replace parent process
2438 parameter with parent thread parameter.
2439 * thread-db.c (find_one_thread): Add comment.
2440 (thread_db_notice_clone): Replace parent process parameter with
2441 parent thread parameter. Temporarily switch to the parent thread.
2442
75352e28
SDJ
24432017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2444
2445 * gdbthread.h: Include "common-gdbthread.h".
2446 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2447 "if" when validating the ptid.
2448 * remote-utils.c: Include "gdbthread.h".
2449 (prepare_resume_reply): Use "switch_to_thread".
2450 * target.c (done_accessing_memory): Likewise.
2451
ad339634
AA
24522017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2453
2454 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2455 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2456 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2457 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2458 s390x-gs-linux64-ipa.o to ipa_obj.
2459 * linux-s390-low.c (HWCAP_S390_GS): New define.
2460 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2461 New functions.
2462 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2463 (s390_arch_setup): Check for guarded-storage support and choose
2464 appropriate tdesc.
2465 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2466 init_registers_s390x_gs_linux64.
2467 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2468 enum value.
2469 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2470 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2471
cc4d742f
SM
24722017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2473
2474 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2475
f6327dcb
KB
24762017-09-21 Kevin Buettner <kevinb@redhat.com>
2477
2478 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2479 (thread_db_thread_handle): Declare.
2480 * linux-low.c (linux_target_ops): Initialize thread_handle.
2481 * server.c (handle_qxfer_threads_worker): Add support for
2482 "handle" attribute.
2483 * target.h (struct target_ops): Add new function pointer,
2484 thread_handle.
2485 (target_thread_handle): Define.
2486 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2487 field in lwp.
2488 (thread_db_thread_handle): New function.
2489
86299109
KB
24902017-09-21 Kevin Buettner <kevinb@redhat.com>
2491
2492 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2493 * linux-low.h (thread_db_notice_clone): Declare.
2494 * thread-db.c (thread_db_notice_clone): New function.
2495
f557a88a
PA
24962017-09-21 Pedro Alves <palves@redhat.com>
2497
2498 * server.c (gdb_read_memory, handle_status, process_serial_event)
2499 (handle_serial_event, handle_target_event): Adjust to
2500 set_desired_thread prototype change.
2501 * target.c (set_desired_thread): Remove 'use_general' parameter
2502 and adjust.
2503 * target.h (set_desired_thread): Remove 'use_general' parameter.
2504
223ffa71
TT
25052017-09-20 Tom Tromey <tom@tromey.com>
2506
2507 * target.c (target_terminal::terminal_state): Define.
2508 (target_terminal::init): Rename from target_terminal_init.
2509 (target_terminal::inferior): Rename from
2510 target_terminal_inferior.
2511 (target_terminal::ours): Rename from target_terminal_ours.
2512 (target_terminal::ours_for_output, target_terminal::info): New.
2513
04fd3ba9
SM
25142017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2515
2516 * server.c (accumulate_file_name_length): Remove.
2517 (emit_dll_description): Adjust to std::string change.
2518 (handle_qxfer_libraries): Use std::string to hold document.
2519
5e187554
SM
25202017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2521
2522 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2523 return type of xml_escape_text.
2524 * server.c (emit_dll_description): Likewise.
2525
1526853e
SM
25262017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2527
2528 * server.c (captured_main): Accept argument for --selftest.
2529 Update run_tests call.
2530 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2531 when registering selftests.
2532
c4dfafab
SDJ
25332017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2534
2535 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2536 instead of "VEC" for "target_desc.reg_defs".
2537 (regcache_cpy): Likewise.
2538 (registers_to_string): Likewise.
2539 (registers_from_string): Likewise.
2540 (find_regno): Likewise.
2541 (supply_regblock): Likewise.
2542 (regcache_raw_read_unsigned): Likewise.
2543 * tdesc.c (init_target_desc): Likewise.
2544 (tdesc_create_reg): Likewise.
2545 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2546 (struct target_desc) <reg_defs>: Convert to "std::vector".
2547 (target_desc): Do not initialize "reg_defs".
2548 (~target_desc): Update code to use "std::vector" instead of "VEC"
2549 for "target_desc.reg_defs".
2550 (operator==): Likewise.
2551
124aceb4
SM
25522017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2553
2554 * inferiors.h (thread_to_gdb_id): Remove.
2555 * inferiors.c (thread_to_gdb_id): Remove.
2556 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2557 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2558 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2559 Likewise.
2560 * nto-low.c (nto_fetch_registers, nto_store_registers,
2561 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2562
96cde54f
SM
25632017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2564
2565 * inferiors.h (gdb_id_to_thread_id): Remove.
2566 * inferiors.c (gdb_id_to_thread_id): Remove.
2567 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2568 removal. Move pid declaration closer to where it's used.
2569
e8ca139e
SM
25702017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2571
2572 * server.c (handle_detach): New function.
2573 (process_serial_event): Move code out, call handle_detach.
2574
f8a4e119
SM
25752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2576
2577 * server.c (require_running): Rename to ...
2578 (require_running_or_return): ... this ...
2579 (require_running_or_break): ... and this.
2580 (handle_query, process_serial_event): Adjust.
2581
0eb0a407
SM
25822017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2583
2584 * linux-low.c (linux_set_resume_request): Remove unused
2585 variables.
2586
785922a5
SM
25872017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2588
2589 * server.c (first_thread_of): Remove.
2590 (process_serial_event): Replace usage of first_thread_of with
2591 find_any_thread_of_pid.
2592 * tracepoint.c (same_process_p): Remove.
2593 (gdb_agent_about_to_close): Replace usage of same_process_p with
2594 find_any_thread_of_pid.
2595 * linux-x86-low.c (same_process_callback): Remove.
2596 (x86_arch_setup_process_callback): Replace usage of
2597 same_process_callback with find_any_thread_of_pid.
2598 * thread-db.c (any_thread_of): Remove.
2599 (switch_to_process): Replace usage of any_thread_of with
2600 find_any_thread_of_pid.
2601 * inferiors.c (thread_pid_matches_callback): Remove.
2602 (find_thread_process): Adjust to use find_any_thread_of_pid.
2603
a059f00c
SDJ
26042017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2605
2606 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2607 with "!VEC_empty".
a059f00c 2608
cc397f3a
SDJ
26092017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2610
2611 * linux-low.c (handle_extended_wait): Use
2612 "allocate_target_description" instead of "XNEW".
2613 * linux-x86-low.c (initialize_low_arch): Likewise.
2614
22916b07
YQ
26152017-09-05 Yao Qi <yao.qi@linaro.org>
2616
2617 * configure.srv (srv_i386_regobj): Remove.
2618 (srv_amd64_regobj): Remove.
2619 (srv_regobj): Set it to "" for x86 non-linux targets.
2620 * linux-x86-tdesc.c (i386_linux_read_description):
2621 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2622 (init_registers_i386): Remove the declaration.
2623 (tdesc_i386): Remove the declaration.
2624 (lynx_i386_arch_setup): Call i386_create_target_description.
2625 * nto-x86-low.c: Likewise.
2626 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2627 [!__x86_64__]: include arch/i386.h.
2628 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2629
38602d55
YQ
26302017-09-05 Yao Qi <yao.qi@linaro.org>
2631
2632 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2633 i386/amd64-XXX-linux from it.
2634
44b886ff
YQ
26352017-09-05 Yao Qi <yao.qi@linaro.org>
2636
2637 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2638 false.
2639 (ipa_amd64_linux_regobj): Remove.
2640 (ipa_x32_linux_regobj): Remove.
2641
b4570e4b
YQ
26422017-09-05 Yao Qi <yao.qi@linaro.org>
2643
2644 * Makefile.in (arch-amd64.o): New rule.
2645 * configure.srv: Append arch-amd64.o.
2646 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2647 (get_ipa_tdesc): Call amd64_linux_read_description.
2648 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2649 and init_registers_amd64_XXX.
2650 * linux-x86-low.c (x86_linux_read_description): Call
2651 amd64_linux_read_description.
2652 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2653 (initialize_low_arch): Don't call init_registers_x32_XXX and
2654 init_registers_amd64_XXX.
2655 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2656 and tdesc_amd64_XXX.
2657 [__x86_64__] (amd64_tdesc_test): New function.
2658 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2659 and init_registers_amd64_XXX.
2660 * linux-x86-tdesc.c: Include arch/amd64.h.
2661 (xcr0_to_tdesc_idx): New function.
2662 (i386_linux_read_description): New function.
2663 (amd64_get_ipa_tdesc_idx): New function.
2664 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2665 (amd64_get_ipa_tdesc): Declare.
2666
d1f28ea2
YQ
26672017-09-05 Yao Qi <yao.qi@linaro.org>
2668
2669 * configure.srv (srv_i386_linux_xmlfiles): Remove
2670 i386/i386-XXX-linux.xml from it.
2671
25a93583
YQ
26722017-09-05 Yao Qi <yao.qi@linaro.org>
2673
2674 * configure.srv: Set srv_i386_linux_regobj empty if $development
2675 is false.
2676 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2677 initialize_low_tdesc.
2678 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2679 with #if initialize_low_tdesc.
2680 * linux-x86-tdesc-selftest.c: New file.
2681 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2682
5f035c07
YQ
26832017-09-05 Yao Qi <yao.qi@linaro.org>
2684
2685 * Makefile.in (arch-i386.o): New rule.
2686 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2687 (x86_64-*-linux*): Likewise.
2688 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2689 include arch/i386.h.
2690 (i386_linux_read_description): Remove code and call
2691 i386_create_target_description.
2692 * tdesc.c (allocate_target_description): New function.
2693 * tdesc.h (set_tdesc_architecture): Remove declaration.
2694 (set_tdesc_osabi): Likewise.
2695
0abe8a89
YQ
26962017-09-05 Yao Qi <yao.qi@linaro.org>
2697
2698 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2699 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2700 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2701 .xmltarget.
2702 * server.c (get_features_xml): Call tdesc_get_features_xml.
2703 * tdesc.c (set_tdesc_architecture): New function.
2704 (set_tdesc_osabi): New function.
2705 (tdesc_get_features_xml): New function.
2706 (tdesc_create_feature): Add an argument.
2707 * tdesc.h (struct target_desc) <features>: New field.
2708 <arch, osabi>: New field.
2709 (~target_desc): xfree features, arch, and osabi.
2710 (target_desc::oerator==): Don't compare .xmltarget.
2711 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2712 (set_tdesc_osabi): Likewise.
2713 (tdesc_get_features_xml): Likewise.
2714
0a188386
YQ
27152017-09-05 Yao Qi <yao.qi@linaro.org>
2716
2717 * linux-x86-tdesc.c: Include selftest.h.
2718 (i386_tdesc_test): New function.
2719 (initialize_low_tdesc): Call selftests::register_test.
2720 * tdesc.h: Include regdef.h.
2721 (target_desc): Override operator == and !=.
2722
f49ff000
YQ
27232017-09-05 Yao Qi <yao.qi@linaro.org>
2724
2725 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2726 (ipa_obj): Likewise.
2727 * linux-i386-ipa.c: Include common/x86-xstate.h
2728 (get_ipa_tdesc): Call i386_linux_read_description.
2729 (initialize_low_tracepoint): Don't call init_registers_XXX
2730 functions, call initialize_low_tdesc instead.
2731 * linux-x86-low.c (x86_linux_read_description): Call
2732 i386_linux_read_description.
2733 (initialize_low_arch): Don't call init_registers_i386_XXX
2734 functions, call initialize_low_tdesc.
2735 * linux-x86-tdesc.c: New file.
2736 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2737 (i386_get_ipa_tdesc_idx): Declare.
2738 (i386_get_ipa_tdesc): Declare.
2739 (initialize_low_tdesc): Declare.
2740
2b68ef2f
YQ
27412017-09-05 Yao Qi <yao.qi@linaro.org>
2742
2743 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2744 instead of 0.
2745
f7000548
YQ
27462017-09-05 Yao Qi <yao.qi@linaro.org>
2747
2748 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2749 * regcache.c (get_thread_regcache): Use VEC_length.
2750 (init_register_cache): Likewise.
2751 (regcache_cpy): Likewise.
2752 (registers_to_string): Iterate reg_defs via VEC_iterate.
2753 (find_regno): Likewise.
2754 (find_register_by_number): Use VEC_index.
2755 (register_size): Call find_register_by_number.
2756 (register_data): Call find_register_by_number.
2757 (supply_regblock): Use VEC_length.
2758 (regcache_raw_read_unsigned): Likewise.
2759 * tdesc.c (init_target_desc): Iterate reg_defs via
2760 VEC_iterate.
2761 (default_description): Update initializer.
2762 (copy_target_description): Don't update field num_registers.
2763 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2764 <num_registers>: Remove.
2765
50a421ac
SM
27662017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2767
2768 * Makefile.in (.SECONDARY): Define target.
2769
23fdd69e
SM
27702017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2771
2772 * linux-low.c (linux_wait_1): Adjust.
2773 * server.c (queue_stop_reply_callback): Adjust.
2774
0a2dde4a
SDJ
27752017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2776
2777 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2778 QEnvironmentUnset and QEnvironmentReset packets.
2779 (handle_query): Inform remote that QEnvironmentHexEncoded,
2780 QEnvironmentUnset and QEnvironmentReset are supported.
2781
6afd337d
SM
27822017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2783
2784 * inferiors.h (inferior_target_data): Rename to ...
2785 (thread_target_data): ... this.
2786 (inferior_regcache_data): Rename to ...
2787 (thread_regcache_data): ... this.
2788 (set_inferior_regcache_data): Rename to ...
2789 (set_thread_regcache_data): ... this.
2790 * inferiors.c (inferior_target_data): Rename to ...
2791 (thread_target_data): ... this.
2792 (inferior_regcache_data): Rename to ...
2793 (thread_regcache_data): ... this.
2794 (set_inferior_regcache_data): Rename to ...
2795 (set_thread_regcache_data): ... this.
2796 (free_one_thread): Update.
2797 * linux-low.h (get_thread_lwp): Update.
2798 * regcache.c (get_thread_regcache): Update.
2799 (regcache_invalidate_thread): Update.
2800 (free_register_cache_thread): Update.
2801 * win32-i386-low.c (update_debug_registers_callback): Update.
2802 (win32_get_current_dr): Update.
2803 * win32-low.c (thread_rec): Update.
2804 (delete_thread_info): Update.
2805 (continue_one_thread): Update.
2806 (suspend_one_thread): Update.
2807
a160cc46
SM
28082017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2809
2810 * inferiors.c (set_inferior_target_data): Remove.
2811 * inferiors.h (set_inferior_target_data): Remove.
2812
6d580b63
YQ
28132017-08-18 Yao Qi <yao.qi@linaro.org>
2814
2815 * Makefile.in (OBS): Add selftest.o.
2816 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2817 * configure, config.in: Re-generated.
2818 * server.c: Include common/sefltest.h.
2819 (captured_main): Handle option --selftest.
2820
f5a29eb0
YQ
28212017-08-09 Yao Qi <yao.qi@linaro.org>
2822
2823 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2824 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2825 i386-avx-mpx.o and i386-mmx.o.
2826 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2827 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2828 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2829 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2830 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2831 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2832 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2833 i386/amd64-avx-mpx.xml.
2834
57757c2f
YQ
28352017-08-09 Yao Qi <yao.qi@linaro.org>
2836
2837 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2838 and x32-avx-avx512.o.
2839 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2840 i386/x32-avx-avx512.xml.
2841
229d26fc
SM
28422017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2843
2844 * tracepoint.h (enum class fast_tpoint_collect_result): New
2845 enumeration.
2846 (fast_tracepoint_collecting): Change return type to
2847 fast_tpoint_collect_result.
2848 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2849 * linux-low.h: Include tracepoint.h.
2850 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2851 fast_tpoint_collect_result.
2852 * linux-low.c (handle_tracepoints): Adjust.
2853 (linux_fast_tracepoint_collecting): Change return type to
2854 fast_tpoint_collect_result.
2855 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2856 linux_wait_1, stuck_in_jump_pad_callback,
2857 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2858 proceed_one_lwp): Adjust to type change.
2859
2e1e43e1
YQ
28602017-07-10 Yao Qi <yao.qi@linaro.org>
2861
2862 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2863
adc764e7
YQ
28642017-06-29 Yao Qi <yao.qi@linaro.org>
2865
2866 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2867 Remove.
2868 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2869
a206891a
SM
28702017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2871
2872 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2873
9a6c7d9c
SDJ
28742017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2875
2876 * linux-low.c (linux_create_inferior): Adjust code to access the
2877 environment information via 'gdb_environ' class.
2878 * lynx-low.c (lynx_create_inferior): Likewise.
2879 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2880 (get_environ): Return a pointer to 'our_environ'.
2881 (captured_main): Initialize 'our_environ'.
2882 * server.h (get_environ): Adjust prototype.
2883 * spu-low.c (spu_create_inferior): Adjust code to access the
2884 environment information via 'gdb_environ' class.
2885
ae3e2ccf
SM
28862017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2887
2888 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2889 usage of "register" keyword.
2890
3e019bdc
SM
28912017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2892
2893 * configure: Re-generate.
2894
8465943a
SM
28952017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2896
2897 * configure: Re-generate.
2898
cf0dd6f0
SM
28992017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2900
2901 * Makefile.in (COMPILE.pre): Add "-x c++".
2902
9845682b
SDJ
29032017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2904
2905 * fork-child.c: Conditionally include <signal.h>.
2906
aefd8b33
SDJ
29072017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2908
2909 * server.c (handle_general_set): Handle new packet
2910 "QStartupWithShell".
2911 (handle_query): Add "QStartupWithShell" to the list of supported
2912 packets.
2913 (gdbserver_usage): Add help text explaining the
2914 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2915 options.
2916 (captured_main): Recognize and act upon the presence of the new
2917 CLI options.
2918
2090129c
SDJ
29192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2920 Pedro Alves <palves@redhat.com>
2921
2922 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2923 * configure: Regenerate.
2924 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2925 "fork-inferior.o".
2926 (i[34567]86-*-lynxos*): Likewise.
2927 (spu*-*-*): Likewise.
2928 * fork-child.c: New file.
2929 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2930 and "environ.h".
2931 (linux_ptrace_fun): New function.
2932 (linux_create_inferior): Adjust function prototype to reflect
2933 change on "target.h". Adjust function code to use
2934 "fork_inferior".
2935 (linux_request_interrupt): Delete "signal_pid".
2936 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2937 (lynx_ptrace_fun): New function.
2938 (lynx_create_inferior): Adjust function prototype to reflect
2939 change on "target.h". Adjust function code to use
2940 "fork_inferior".
2941 * nto-low.c (nto_create_inferior): Adjust function prototype and
2942 code to reflect change on "target.h". Update comments.
2943 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2944 "common-terminal.h" and "environ.h".
2945 (terminal_fd): Moved to fork-child.c.
2946 (old_foreground_pgrp): Likewise.
2947 (restore_old_foreground_pgrp): Likewise.
2948 (last_status): Make it global.
2949 (last_ptid): Likewise.
2950 (our_environ): New variable.
2951 (startup_with_shell): Likewise.
2952 (program_name): Likewise.
2953 (program_argv): Rename to...
2954 (program_args): ...this.
2955 (wrapper_argv): New variable.
2956 (start_inferior): Delete function.
2957 (get_exec_wrapper): New function.
2958 (get_exec_file): Likewise.
2959 (get_environ): Likewise.
2960 (prefork_hook): Likewise.
2961 (post_fork_inferior): Likewise.
2962 (postfork_hook): Likewise.
2963 (postfork_child_hook): Likewise.
2964 (handle_v_run): Update code to deal with arguments coming from the
2965 remote host. Update calls from "start_inferior" to
2966 "create_inferior".
2967 (captured_main): Likewise. Initialize environment variable. Call
2968 "have_job_control".
2969 * server.h (post_fork_inferior): New prototype.
2970 (get_environ): Likewise.
2971 (last_status): Declare.
2972 (last_ptid): Likewise.
2973 (signal_pid): Likewise.
2974 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2975 (spu_ptrace_fun): New function.
2976 (spu_create_inferior): Adjust function prototype to reflect change
2977 on "target.h". Adjust function code to use "fork_inferior".
2978 * target.c (target_terminal_init): New function.
2979 (target_terminal_inferior): Likewise.
2980 (target_terminal_ours): Likewise.
2981 * target.h: Include <vector>.
2982 (struct target_ops) <create_inferior>: Update prototype.
2983 (create_inferior): Update macro.
2984 * utils.c (gdb_flush_out_err): New function.
2985 * win32-low.c (win32_create_inferior): Adjust function prototype
2986 and code to reflect change on "target.h".
2987
043a4934
SDJ
29882017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2989
2990 * inferiors.c (switch_to_thread): New function.
2991
15652511
SDJ
29922017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2993
2994 * Makefile.in (SFILE): Add "common/job-control.c".
2995 (OBS): Add "job-control.o".
2996
21ea5acd
SDJ
29972017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2998
2999 * Makefile: Remove "@host_makefile_frag@".
3000
e13cb306
PA
30012017-05-05 Pedro Alves <palves@redhat.com>
3002
3003 * configure: Regenerate.
3004
c94fee56
SDJ
30052017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3006
3007 * configure: Regenerate.
3008
a0ff9e1a
SM
30092017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3010
3011 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3012 software_single_step change of return type to
3013 std::vector<CORE_ADDR>.
3014 * linux-low.c (install_software_single_step_breakpoints):
3015 Likewise.
3016 * linux-low.h (install_software_single_step_breakpoints):
3017 Likewise.
3018
be628ab8
SDJ
30192017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3020
3021 * remote-utils.c: Include "gdb_termios.h" instead of
3022 "terminal.h".
3023 * terminal.h: Delete file.
3024
7c5ded6a
SDJ
30252017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3026
3027 * server.c: Include <vector>.
3028 <program_argv, wrapper_argv>: Convert to std::vector.
3029 (start_inferior): Rewrite function to use C++.
3030 (handle_v_run): Likewise. Update code that calculates the argv
3031 based on the vRun packet; use C++.
3032 (captured_main): Likewise.
3033
436252de
SM
30342017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3035
3036 * server.c (handle_v_cont): Initialize thread_resume::thread
3037 with null_ptid.
3038
9bf2a700
PA
30392017-04-05 Pedro Alves <palves@redhat.com>
3040
3041 * configure: Regenerate.
3042
a121b7c1
PA
30432017-04-05 Pedro Alves <palves@redhat.com>
3044
3045 * gdbreplay.c (sync_error): Constify.
3046 * linux-x86-low.c (push_opcode): Constify.
3047
21c8a587
PA
30482017-04-05 Pedro Alves <palves@redhat.com>
3049
3050 * win32-low.c (get_child_debug_event)
3051 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3052 Report TARGET_WAITKIND_SPURIOUS instead.
3053
fb32b4f7
PA
30542017-04-05 Pedro Alves <palves@redhat.com>
3055
e79be6e5
SM
3056 * remote-utils.c (remote_prepare, remote_open): Constify.
3057 * remote-utils.h (remote_prepare, remote_open): Constify.
3058 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3059
65dd1e59
SM
30602017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3061
3062 * Makefile.in (clean): Clear .deps.
3063
8fa5b777
SM
30642017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3065
3066 * .gitignore: Remove generated files, replace with wildcard.
3067 * (clean): Replace removal of generated files with wildcard.
3068 (version.c): Replace with...
3069 (version-generated.c): ...this.
3070 (xml-builtin.c): Replace with...
3071 (xml-builtin-generated.c): ...this.
3072 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3073 (%.c: *regformats*): Replace with...
3074 (%-generated.c: *regformats*): ...this.
3075
a12e714b
MF
30762017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3077
3078 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3079 (xtensa_fill_gregset): Call collect_register_by_name for
3080 threadptr register.
3081 (xtensa_store_gregset): Call supply_register_by_name for
3082 threadptr register.
3083
1a09b50a
MF
30842017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3085
3086 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3087 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3088 (xtensa_store_gregset): Call supply_register for all registers in
3089 a0_regnum..a0_regnum + C0_NREGS range.
3090
1a01e7c6
SM
30912017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3092
3093 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3094 (ax-ipa.o: ax.c): Remove.
3095 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3096 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3097 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3098 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3099 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3100
36bc18a8
SM
31012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3102
3103 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3104 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3105 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3106 (errors-ipa.o: ../common/errors.c): Remove.
3107 (format-ipa.o: ../common/format.c): Remove.
3108 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3109
a8ebe3d5
SM
31102017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3111
3112 * Makefile.in (%-ipa.o: %.c): New rule.
3113 (tracepoint-ipa.o: tracepoint.c): Remove.
3114 (utils-ipa.o: utils.c): Remove.
3115 (remote-utils-ipa.o: remote-utils.c): Remove.
3116 (regcache-ipa.o: regcache.c): Remove.
3117 (i386-linux-ipa.o: i386-linux.c): Remove.
3118 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3119 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3120 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3121 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3122 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3123 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3124 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3125 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3126 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3127 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3128 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3129 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3130 (aarch64-ipa.o: aarch64.c): Remove.
3131 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3132 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3133 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3134 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3135 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3136 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3137 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3138 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3139 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3140 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3141 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3142 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3143 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3144 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3145 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3146 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3147 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3148 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3149 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3150 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3151 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3152 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3153 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3154 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3155 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3156 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3157 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3158 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3159 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3160 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3161 (tdesc-ipa.o: tdesc.c): Remove.
3162 (x32-linux-ipa.o: x32-linux.c): Remove.
3163 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3164 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3165
50cfacb7
SM
31662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3167
3168 * Makefile.in (%.o: ../arch/%.c): New rule.
3169 (arm.o: ../arch/arm.c): Remove.
3170 (arm-linux.o: ../arch/arm-linux.c): Remove.
3171 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3172 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3173
c5a22423
SM
31742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3175
3176 * Makefile.in (%.o: ../nat/%.c): New rule.
3177 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3178 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3179 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3180 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3181 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3182 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3183 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3184 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3185 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3186 (linux-personality.o: ../nat/linux-personality.c): Remove.
3187 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3188 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3189 (x86-linux.o: ../nat/x86-linux.c): Remove.
3190 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3191 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3192
6bda016b
SM
31932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3194
3195 * Makefile.in (%.o: ../common/%.c): New rule.
3196 (signals.o: ../common/signals.c): Remove.
3197 (print-utils.o: ../common/print-utils.c): Remove.
3198 (rsp-low.o: ../common/rsp-low.c): Remove.
3199 (common-utils.o: ../common/common-utils.c): Remove.
3200 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3201 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3202 (vec.o: ../common/vec.c): Remove.
3203 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3204 (xml-utils.o: ../common/xml-utils.c): Remove.
3205 (ptid.o: ../common/ptid.c): Remove.
3206 (buffer.o: ../common/buffer.c): Remove.
3207 (format.o: ../common/format.c): Remove.
3208 (filestuff.o: ../common/filestuff.c): Remove.
3209 (agent.o: ../common/agent.c): Remove.
3210 (errors.o: ../common/errors.c): Remove.
3211 (environ.o: ../common/environ.c): Remove.
3212 (common-debug.o: ../common/common-debug.c): Remove.
3213 (cleanups.o: ../common/cleanups.c): Remove.
3214 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3215 (fileio.o: ../common/fileio.c): Remove.
3216 (common-regcache.o: ../common/common-regcache.c): Remove.
3217 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3218 (new-op.o: ../common/new-op.c): Remove.
3219 (btrace-common.o: ../common/btrace-common.c): Remove.
3220
21122961
SM
32212017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3222
3223 * Makefile.in (%.o: ../target/%.c): New rule.
3224 (waitstatus.o: ../target/waitstatus.c): Remove.
3225
c362e621
SM
32262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3227
3228 * Makefile.in
3229 (%.c: ../regformats/%.dat,
3230 (%.c: ../regformats/arm/%.dat,
3231 (%.c: ../regformats/i386/%.dat,
3232 (%.c: ../regformats/rs6000/%.dat): New rules.
3233 (aarch64.c): Remove.
3234 (reg-arm.c): Remove.
3235 (arm-with-iwmmxt.c): Remove.
3236 (arm-with-vfpv2.c): Remove.
3237 (arm-with-vfpv3.c): Remove.
3238 (arm-with-neon.c): Remove.
3239 (reg-bfin.c): Remove.
3240 (reg-cris.c): Remove.
3241 (reg-crisv32.c): Remove.
3242 (i386.c): Remove.
3243 (i386-linux.c): Remove.
3244 (i386-avx.c): Remove.
3245 (i386-avx-linux.c): Remove.
3246 (i386-avx-avx512.c): Remove.
3247 (i386-avx-avx512-linux.c): Remove.
3248 (i386-mpx.c): Remove.
3249 (i386-mpx-linux.c): Remove.
3250 (i386-avx-mpx-avx512-pku.c): Remove.
3251 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3252 (i386-avx-mpx.c): Remove.
3253 (i386-avx-mpx-linux.c): Remove.
3254 (i386-mmx.c): Remove.
3255 (i386-mmx-linux.c): Remove.
3256 (reg-ia64.c): Remove.
3257 (reg-m32r.c): Remove.
3258 (reg-m68k.c): Remove.
3259 (reg-cf.c): Remove.
3260 (mips-linux.c): Remove.
3261 (mips-dsp-linux.c): Remove.
3262 (mips64-linux.c): Remove.
3263 (mips64-dsp-linux.c): Remove.
3264 (nios2-linux.c): Remove.
3265 (powerpc-32.c): Remove.
3266 (powerpc-32l.c): Remove.
3267 (powerpc-altivec32l.c): Remove.
3268 (powerpc-cell32l.c): Remove.
3269 (powerpc-vsx32l.c): Remove.
3270 (powerpc-isa205-32l.c): Remove.
3271 (powerpc-isa205-altivec32l.c): Remove.
3272 (powerpc-isa205-vsx32l.c): Remove.
3273 (powerpc-e500l.c): Remove.
3274 (powerpc-64l.c): Remove.
3275 (powerpc-altivec64l.c): Remove.
3276 (powerpc-cell64l.c): Remove.
3277 (powerpc-vsx64l.c): Remove.
3278 (powerpc-isa205-64l.c): Remove.
3279 (powerpc-isa205-altivec64l.c): Remove.
3280 (powerpc-isa205-vsx64l.c): Remove.
3281 (s390-linux32.c): Remove.
3282 (s390-linux32v1.c): Remove.
3283 (s390-linux32v2.c): Remove.
3284 (s390-linux64.c): Remove.
3285 (s390-linux64v1.c): Remove.
3286 (s390-linux64v2.c): Remove.
3287 (s390-te-linux64.c): Remove.
3288 (s390-vx-linux64.c): Remove.
3289 (s390-tevx-linux64.c): Remove.
3290 (s390x-linux64.c): Remove.
3291 (s390x-linux64v1.c): Remove.
3292 (s390x-linux64v2.c): Remove.
3293 (s390x-te-linux64.c): Remove.
3294 (s390x-vx-linux64.c): Remove.
3295 (s390x-tevx-linux64.c): Remove.
3296 (tic6x-c64xp-linux.c): Remove.
3297 (tic6x-c64x-linux.c): Remove.
3298 (tic6x-c62x-linux.c): Remove.
3299 (reg-sh.c): Remove.
3300 (reg-sparc64.c): Remove.
3301 (reg-spu.c): Remove.
3302 (amd64.c): Remove.
3303 (amd64-linux.c): Remove.
3304 (amd64-avx.c): Remove.
3305 (amd64-avx-linux.c): Remove.
3306 (amd64-avx-avx512.c): Remove.
3307 (amd64-avx-avx512-linux.c): Remove.
3308 (amd64-mpx.c): Remove.
3309 (amd64-mpx-linux.c): Remove.
3310 (amd64-avx-mpx-avx512-pku.c): Remove.
3311 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3312 (amd64-avx-mpx.c): Remove.
3313 (amd64-avx-mpx-linux.c): Remove.
3314 (x32.c): Remove.
3315 (x32-linux.c): Remove.
3316 (x32-avx.c): Remove.
3317 (x32-avx-linux.c): Remove.
3318 (x32-avx-avx512.c): Remove.
3319 (x32-avx-avx512-linux.c): Remove.
3320 (reg-xtensa.c): Remove.
3321 (reg-tilegx.c): Remove.
3322 (reg-tilegx32.c): Remove.
3323
1672e0d9
SDJ
33242017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3325
3326 * Makefile.in (SFILES): Add "common/environ.c".
3327 (OBJS): Add "common/environ.h".
3328
239b6d10
WT
33292017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3330
3331 * configure.ac: Check if the fs_base and gs_base members of
3332 `struct user_regs_struct' exist.
3333 * config.in: Regenerated.
3334 * configure: Likewise.
3335
694b382c
AT
33362017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3337
3338 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3339 target_read_memory.
3340 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3341 (get_next_pcs_syscall_next_pc): Likewise.
3342
7dc53023
LM
33432016-12-23 Luis Machado <lgustavo@codesourcery.com>
3344
3345 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3346 * nto-x86-low.c: Likewise.
3347
ad02e4fe
SM
33482016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3349
3350 * Makefile.in: Include disable-implicit-rules.mk.
3351
dcb07cfa
PA
33522016-11-23 Pedro Alves <palves@redhat.com>
3353
3354 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3355 (debug_vprintf): Use std::chrono::steady_clock instead of
3356 gettimeofday. Use '.' instead of ':'.
3357 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3358 (get_timestamp): Use std::chrono::steady_clock instead of
3359 gettimeofday.
3360
8629c02c
SM
33612016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3362
3363 * Makefile.in: Fix whitespace formatting.
3364
b593ecca
SM
33652016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3366
3367 * Makefile.in (SFILES, OBS): Flatten list and order
3368 alphabetically.
3369
9986ba08
PA
33702016-11-23 Pedro Alves <palves@redhat.com>
3371
3372 * event-loop.c (handle_file_event): Use warning.
3373 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3374 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3375 Use warning.
3376
4eefa7bc
PA
33772016-11-23 Pedro Alves <palves@redhat.com>
3378
3379 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3380 output.
3381 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3382 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3383 debug_printf and debug_flush for debug output.
3384 * server.c (handle_general_set): Likewise.
3385 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3386 output.
3387
5443506e
SM
33882016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3389
3390 * Makefile.in (.c.o): Replace rule with ...
3391 (%.o: %.c): ... this one.
3392
3b165252
SM
33932016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3394
3395 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3396 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3397 make.
3398 * configure.ac: Remove checks for the make program.
3399 * configure: Re-generate.
3400
0bcda685
PA
34012016-10-28 Pedro Alves <palves@redhat.com>
3402
3403 * Makefile.in (CXX_DIALECT): Get from configure.
3404 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3405 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3406 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3407 * config.in: Regenerate.
3408 * configure: Regenerate.
3409
c3805894
YQ
34102016-10-27 Yao Qi <yao.qi@linaro.org>
3411
3412 * linux-low.c (linux_supports_range_stepping): Return true if
3413 can_software_single_step return true.
3414
89342618
YQ
34152016-10-27 Yao Qi <yao.qi@linaro.org>
3416
3417 * inferiors.c (find_inferior_in_random): New function.
3418 * inferiors.h (find_inferior_in_random): Declare.
3419 * linux-low.c (linux_wait_for_event_filtered): Call
3420 find_inferior_in_random instead of find_inferior.
3421
e3652c84
YQ
34222016-10-27 Yao Qi <yao.qi@linaro.org>
3423
3424 * linux-low.c (linux_wait_1): If single-step breakpoints are
3425 inserted, remove them.
3426
5a04c4cf
PA
34272016-10-26 Pedro Alves <palves@redhat.com>
3428
3429 * linux-low.c (handle_extended_wait): Link parent/child fork
3430 threads.
3431 (linux_wait_1): Unlink them.
3432 (linux_set_resume_request): Ignore resume requests for
3433 already-resumed and unhandled fork child threads.
3434 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3435 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3436 New functions.
3437 (handle_v_requests) <vCont>: Don't call require_running.
3438 * server.h (in_queued_stop_replies): New declaration.
3439
cb93dc7f
YQ
34402016-10-24 Yao Qi <yao.qi@linaro.org>
3441
3442 PR server/20733
3443 * linux-aarch64-low.c (append_insns): Cast the return value to
3444 'uint32_t *'.
3445
a1078bea
YQ
34462016-10-10 Yao Qi <yao.qi@linaro.org>
3447
3448 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3449
1fb77080
SDJ
34502016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3451
3452 * target.c (target_supports_multi_process): New function, moved
3453 from...
3454 * target.h (target_supports_multi_process): ... here. Remove
3455 macro.
3456
39b5a3b9
TT
34572016-10-05 Tom Tromey <tom@tromey.com>
3458
3459 PR remote/20655:
3460 * tracepoint.c (handle_tracepoint_bkpts): Check
3461 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3462
c1d0b70a
YQ
34632016-10-05 Yao Qi <yao.qi@linaro.org>
3464
3465 * configure.srv: Update the path of arm-*.xml files.
3466
0a69eedb
YQ
34672016-10-05 Terry Guo <terry.guo@arm.com>
3468 Yao Qi <yao.qi@linaro.org>
3469
3470 * Makefile.in: Adjust the path of rules.
3471 * configure.srv: Update the path of xml files.
3472 * regformats/arm-with-iwmmxt.dat: Regenerated.
3473 * regformats/arm-with-neon.dat: Likewise.
3474 * regformats/arm-with-vfpv2.dat: Likewise.
3475 * regformats/arm-with-vfpv3.dat Likewise.
3476
17e16485
YQ
34772016-09-30 Yao Qi <yao.qi@linaro.org>
3478
3479 PR gdbserver/20627
3480 * target.c (target_stop_and_wait): Don't call
3481 target_continue_no_signal, use resume_stop instead.
3482
edeeb602
YQ
34832016-09-26 Yao Qi <yao.qi@linaro.org>
3484
3485 * linux-low.c (linux_wait_1): Call debug_exit.
3486
503b1c39
PA
34872016-09-23 Pedro Alves <palves@redhat.com>
3488
3489 * Makefile.in (SFILES): Add common/new-op.c.
3490 (OBS): Add common/new-op.o.
3491 (new-op.o): New rule.
3492
74172ecf
SM
34932016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3494
3495 * .gitinore: Ignore more files.
3496
fc6cda2e
YQ
34972016-09-21 Yao Qi <yao.qi@linaro.org>
3498
3499 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3500 23.
3501
bc1e6c81
SDJ
35022016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3503
3504 * server.c (start_inferior): Call target_mourn_inferior instead of
3505 mourn_inferior; pass ptid_t argument to it.
3506 (resume): Likewise.
3507 (handle_target_event): Likewise.
3508 * target.c (target_mourn_inferior): New function.
3509 * target.h (mourn_inferior): Delete macro.
3510
0e00e962
AA
35112016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3512
3513 * linux-low.c (lwp_is_stepping): New function.
3514
1d8cb77d
CL
35152016-09-06 Carl Love <cel@us.ibm.com>
3516
3517 * server.c (start_inferior): Fixed comment, requested comment change
3518 didn't get updated correctly. Removed reference to ptrace () call as
3519 it is only true on Linux systems.
3520
7313bced
CL
35212016-09-06 Carl Love <cel@us.ibm.com>
3522
3523 * server.c (start_inferior): Do not call
3524 function target_post_create_inferior () if the
3525 inferior process has already exited.
3526
cf6de44d
PA
35272016-09-05 Pedro Alves <palves@redhat.com>
3528
3529 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3530 (COMPILE.pre, CC_LD): Use CXX directly.
3531 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3532 * acinclude.m4: Don't include build-with-cxx.m4.
3533 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3534 * configure: Regenerate.
3535
c1da6748
AT
35362016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3537
3538 PR gdb/19495
3539 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3540 call writing data to own_buf.
3541
f2b9e3df
SDJ
35422016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3543
3544 * target.c (mywait): Call target_wait instead of
3545 the_target->wait.
3546 (target_wait): New function.
3547
049a8570
SDJ
35482016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3549
3550 * server.c (start_inferior): New variable 'ptid'. Replace calls
3551 to the_target->resume by target_continue{,_no_signal}, depending
3552 on the case.
3553 * target.c (target_stop_and_wait): Call target_continue_no_signal
3554 instead of the_target->resume.
3555 (target_continue): New function.
3556
3aa5cfa0
AT
35572016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3558
3559 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3560
754653a7
AZ
35612016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3562
3563 PR server/20491
3564 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3565 ps_prochandle.
3566 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3567 * linux-arm-low.c (ps_get_thread_area): Likewise.
3568 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3569 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3570 * linux-mips-low.c (ps_get_thread_area): Likewise.
3571 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3572 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3573 * linux-x86-low.c (ps_get_thread_area): Likewise.
3574 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3575
ed036b40
PA
35762016-08-19 Pedro Alves <palves@redhat.com>
3577
3578 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3579
c8ef42ee
PA
35802016-08-19 Pedro Alves <palves@redhat.com>
3581
3582 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3583 comment. Use memcpy instead of casting through unsigned long.
3584
9c235a72
PA
35852016-08-19 Pedro Alves <palves@redhat.com>
3586
3587 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3588 allocating around 0x80000000.
3589
201506da
PA
35902016-08-19 Pedro Alves <palves@redhat.com>
3591
3592 PR gdb/20415
3593 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3594 (x32-avx512-linux-ipa.o): New rules.
3595 * configure.ac (x86_64-*-linux*): New x32 check.
3596 * configure.srv (ipa_x32_linux_regobj): New.
3597 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3598 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3599 descriptions.
3600 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3601 descriptions.
3602 * configure: Regenerate.
3603
f348d89a
PA
36042016-08-09 Pedro Alves <palves@redhat.com>
3605
3606 PR gdb/18653
3607 * Makefile.in (OBS): Add signals-state-save-restore.o.
3608 (signals-state-save-restore.o): New rule.
3609 * config.in: Regenerate.
3610 * configure: Regenerate.
3611 * linux-low.c: Include "signals-state-save-restore.h".
3612 (linux_create_inferior): Call
3613 restore_original_signals_state.
3614 * server.c: Include "dispositions-save-restore.h".
3615 (captured_main): Call save_original_signals_state.
3616
1baf5149
PA
36172016-08-05 Pedro Alves <palves@redhat.com>
3618
3619 * configure: Regenerate.
3620
fcd4a73d
YQ
36212016-08-04 Yao Qi <yao.qi@linaro.org>
3622
3623 * linux-low.c (regsets_fetch_inferior_registers): Check
3624 errno is ESRCH or not.
3625
979659d0
YQ
36262016-08-02 Yao Qi <yao.qi@linaro.org>
3627
3628 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3629 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3630 (thread_db_load_search): Update.
3631 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3632 td_ta_set_event and td_ta_event_getmsg.
3633
6598661d
PA
36342016-07-26 Pedro Alves <palves@redhat.com>
3635
3636 PR server/20414
3637 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3638 of unsigned long for 64-bit registers and use uint32_t instead of
3639 unsigned int for 32-bit registers.
3640
9cf12d57
PA
36412016-07-26 Pedro Alves <palves@redhat.com>
3642
3643 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3644 to 'ptrace'.
3645
305450ed
TT
36462016-07-21 Tom Tromey <tom@tromey.com>
3647
3648 * configure: Rebuild.
3649
2583da7c
YQ
36502016-07-21 Yao Qi <yao.qi@linaro.org>
3651
3652 * mem-break.c (find_gdb_breakpoint): Cast bp to
3653 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3654
21536b36
YQ
36552016-07-21 Yao Qi <yao.qi@linaro.org>
3656
3657 * server.c (handle_v_requests): Support s and S actions
3658 if target_supports_software_single_step return true.
3659
8901d193
YQ
36602016-07-21 Yao Qi <yao.qi@linaro.org>
3661
3662 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3663 is resume_step, call maybe_hw_step.
3664 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3665 and unstop them.
3666 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3667 breakpoints or not.
3668 (proceed_one_lwp): If resume request is resume_step, install
3669 reinsert breakpoints and call maybe_hw_step.
3670
0e9a339e
YQ
36712016-07-21 Yao Qi <yao.qi@linaro.org>
3672
3673 * linux-low.c (proceed_one_lwp): Declare.
3674 (linux_resume_one_thread): Remove local variable 'step'.
3675 Lift code enqueue signal. Call proceed_one_lwp instead of
3676 linux_resume_one_lwp.
3677
4281b351
YQ
36782016-07-21 Yao Qi <yao.qi@linaro.org>
3679
3680 * linux-low.c (linux_resume_one_thread): Call
3681 enqueue_pending_signal.
3682
984a2c04
YQ
36832016-07-21 Yao Qi <yao.qi@linaro.org>
3684
3685 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3686 * inferiors.c (do_restore_current_thread_cleanup): New function.
3687 (make_cleanup_restore_current_thread): Likewise.
3688 * linux-low.c (install_software_single_step_breakpoints): Call
3689 make_cleanup_restore_current_thread. Switch current_thread to
3690 thread.
3691
bec903c9
YQ
36922016-07-21 Yao Qi <yao.qi@linaro.org>
3693
3694 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3695 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3696 (clone_one_breakpoint): Likewise.
3697 (delete_reinsert_breakpoints): Change parameter to thread.
3698 Callers updated.
3699 (has_reinsert_breakpoints): Likewise.
3700 (uninsert_reinsert_breakpoints): Likewise.
3701 (reinsert_reinsert_breakpoints): Likewise.
3702 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3703 (delete_reinsert_breakpoints): Likewise.
3704 (reinsert_reinsert_breakpoints): Likewise.
3705 (uninsert_reinsert_breakpoints): Likewise.
3706 (has_reinsert_breakpoints): Likewise.
3707
63c40ec7
YQ
37082016-07-21 Yao Qi <yao.qi@linaro.org>
3709
3710 * inferiors.c (get_thread_process): Make parameter const.
3711 * inferiors.h (get_thread_process): Update declaration.
3712 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3713 Add new parameters child_thread and parent_thread. Callers
3714 updated.
3715 * mem-break.h (clone_all_breakpoints): Update declaration.
3716
9aa76cd0
YQ
37172016-07-21 Yao Qi <yao.qi@linaro.org>
3718
3719 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3720 <command_list, handler>: Remove.
3721 (struct gdb_breakpoint): New.
3722 (struct other_breakpoint): New.
3723 (struct reinsert_breakpoint): New.
3724 (is_gdb_breakpoint): New function.
3725 (any_persistent_commands): Update command_list if
3726 is_gdb_breakpoint returns true.
3727 (set_breakpoint): Create breakpoints according to their types.
3728 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3729 (set_gdb_breakpoint_1): Likewise.
3730 (set_gdb_breakpoint): Likewise.
3731 (clear_breakpoint_conditions): Change parameter type to
3732 'struct gdb_breakpoint *'.
3733 (clear_breakpoint_commands): Likewise.
3734 (clear_breakpoint_conditions_and_commands): Likewise.
3735 (add_condition_to_breakpoint): Likewise.
3736 (add_breakpoint_condition): Likewise.
3737 (add_commands_to_breakpoint): Likewise.
3738 (check_breakpoints): Check other_breakpoint.
3739 (clone_one_breakpoint): Clone breakpopint according to its type.
3740 * mem-break.h (struct gdb_breakpoint): Declare.
3741 (set_gdb_breakpoint): Update declaration.
3742 (clear_breakpoint_conditions_and_commands): Likewise.
3743 (add_breakpoint_condition): Likewise.
3744 (add_breakpoint_commands): Likewise.
3745 * server.c (process_point_options): Change parameter type to
3746 'struct gdb_breakpoint *'.
3747
811f8301
YQ
37482016-07-21 Yao Qi <yao.qi@linaro.org>
3749
3750 * mem-break.c (set_breakpoint_at): Rename it to ...
3751 (set_breakpoint_type_at): ... it.
3752 (set_breakpoint_at): Call set_breakpoint_type_at.
3753 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3754 * mem-break.h (set_breakpoint_at): Update comments.
3755
b1c51e36
CLT
37562016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3757
3758 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3759 to buf parameter.
3760 (nios2_store_gregset): Likewise.
3761
ced2dffb
PA
37622016-07-01 Pedro Alves <palves@redhat.com>
3763 Antoine Tremblay <antoine.tremblay@ericsson.com>
3764
3765 * linux-low.c: Change interface to take the target lwp_info
3766 pointer directly and return void. Handle detaching from a zombie
3767 thread.
3768 (linux_detach_lwp_callback): New function.
3769 (linux_detach): Detach from the leader thread after detaching from
3770 the clone threads.
3771
2ac09a5b
YQ
37722016-06-28 Yao Qi <yao.qi@linaro.org>
3773
3774 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3775 for variable new_offset.
3776 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3777 (aarch64_ftrace_insn_reloc_cb): Likewise.
3778 (aarch64_ftrace_insn_reloc_tb): Likewise.
3779 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3780 PRIx64 instead of PRIx32.
3781
79e7fd4f
YQ
37822016-06-28 Yao Qi <yao.qi@linaro.org>
3783
3784 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3785 (the_low_target): Install arm_get_syscall_trapinfo.
3786
061fc021
YQ
37872016-06-28 Yao Qi <yao.qi@linaro.org>
3788
3789 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3790 function.
3791 (the_low_target): Install aarch64_get_syscall_trapinfo.
3792
4cc32bec
YQ
37932016-06-28 Yao Qi <yao.qi@linaro.org>
3794
3795 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3796 Callers updated.
3797 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3798 Remove parameter sysno.
3799 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3800 sysret.
3801
782c1122
AA
38022016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3803
3804 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3805 (s390_emit_ne_goto): Likewise.
3806 (s390_emit_lt_goto): Likewise.
3807 (s390_emit_le_goto): Likewise.
3808 (s390_emit_gt_goto): Likewise.
3809 (s390_emit_ge_goto): Likewise.
3810 (s390x_emit_eq_goto): Likewise.
3811 (s390x_emit_ne_goto): Likewise.
3812 (s390x_emit_lt_goto): Likewise.
3813 (s390x_emit_le_goto): Likewise.
3814 (s390x_emit_gt_goto): Likewise.
3815 (s390x_emit_ge_goto): Likewise.
3816 (s390_emit_ops_impl): Mark variable static.
3817 (s390x_emit_ops): Likewise.
3818
2e7b624b
YQ
38192016-06-17 Yao Qi <yao.qi@linaro.org>
3820
3821 * linux-low.c (handle_extended_wait): Call
3822 uninsert_reinsert_breakpoints for the parent process. Remove
3823 reinsert breakpoints from the child process. Reinsert them to
3824 the parent process when vfork is done.
3825 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3826 (reinsert_reinsert_breakpoints): New function.
3827 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3828 (reinsert_reinsert_breakpoints): Declare.
3829
8a81c5d7
YQ
38302016-06-17 Yao Qi <yao.qi@linaro.org>
3831
3832 * linux-low.c (handle_extended_wait): If the parent is doing
3833 step-over, remove the reinsert breakpoints from the forked child.
3834
f50bf8e5
YQ
38352016-06-17 Yao Qi <yao.qi@linaro.org>
3836
3837 * linux-low.c (unsuspend_all_lwps): Declare.
3838 (linux_low_filter_event): If thread exited, call finish_step_over.
3839 If step-over is finished, unsuspend other threads.
3840
8376a3cb
YQ
38412016-06-17 Yao Qi <yao.qi@linaro.org>
3842
3843 * linux-low.c (linux_resume_one_lwp_throw): Assert
3844 has_reinsert_breakpoints returns false.
3845 * mem-break.c (delete_disabled_breakpoints): Assert
3846 bp type isn't reinsert_breakpoint.
3847
f79b145d
YQ
38482016-06-17 Yao Qi <yao.qi@linaro.org>
3849
3850 * linux-low.c (maybe_hw_step): New function.
3851 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3852 (finish_step_over): Switch current_thread to lwp temporarily,
3853 and assert has_reinsert_breakpoints returns true.
3854 (proceed_one_lwp): Call maybe_hw_step.
3855 * mem-break.c (has_reinsert_breakpoints): New function.
3856 * mem-break.h (has_reinsert_breakpoints): Declare.
3857
0ae534d2
JT
38582016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3859
3860 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3861
fcdad592
YQ
38622016-05-17 Yao Qi <yao.qi@linaro.org>
3863
3864 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3865 instead of find_inferior.
3866
9e784964
YQ
38672016-05-05 Yao Qi <yao.qi@linaro.org>
3868
3869 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3870 Initialize res to zero.
3871
cf2ebb6e
YQ
38722016-05-05 Yao Qi <yao.qi@linaro.org>
3873
3874 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3875 to uint32_t.
3876
c1aebf87
UW
38772016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3878
3879 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3880 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3881 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3882
35fd2deb 38832016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3884 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3885
3886 * tracepoint.c (write_inferior_int8): New function.
3887 (cmd_qtenable_disable): Write enable flag using
3888 write_inferior_int8.
3889
484b3c32
YQ
38902016-04-25 Yao Qi <yao.qi@linaro.org>
3891
3892 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3893 (need_step_over_p): Return zero if the LWP has pending signals
3894 can be delivered on software single step target.
3895
85ba7d86
YQ
38962016-04-25 Yao Qi <yao.qi@linaro.org>
3897
3898 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3899 return instead of error.
3900
3539aa13
YQ
39012016-04-22 Yao Qi <yao.qi@linaro.org>
3902
3903 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3904 to 23.
3905
5b061e98
YQ
39062016-04-22 Yao Qi <yao.qi@linaro.org>
3907
3908 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3909 signal when stepping over breakpoint with software single
3910 step.
3911
3451269c
PA
39122016-04-21 Pedro Alves <palves@redhat.com>
3913
3914 * linux-s390-low.c (s390_collect_ptrace_register)
3915 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3916 add casts.
3917 (s390_check_regset): Use void * instead of gdb_byte *.
3918
a2358508
PA
39192016-04-20 Pedro Alves <palves@redhat.com>
3920
3921 * configure: Renegerate.
3922
6885166d
YQ
39232016-04-20 Yao Qi <yao.qi@linaro.org>
3924
3925 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3926 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3927 number 16.
3928 (arm_store_gregset): Likewise.
3929
2b863f51
WT
39302016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3931
3932 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3933 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3934 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3935 (amd64-avx-mpx-linux.c): New rules.
3936 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3937 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3938 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3939 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3940 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3941 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3942 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3943 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3944 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3945 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3946 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3947 * linux-x86-low.c (x86_linux_read_description): Add case for
3948 X86_XSTATE_AVX_MPX_MASK.
3949 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3950 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3951 init_registers_i386_avx_mpx_linux.
3952 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3953 (initialize_low_tracepoint): Call
3954 init_registers_i386_avx_mpx_linux.
3955 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3956 (initialize_low_tracepoint): Call
3957 init_registers_amd64_avx_mpx_linux.
3958 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3959 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3960 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3961 declarations.
3962
9b30624b
PA
39632016-04-18 Pedro Alves <palves@redhat.com>
3964
3965 * configure: Regenerate.
3966
45e3745e
AT
39672016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3968
3969 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3970 (aarch64_emit_sub): Likewise.
3971
2afc13ff
PA
39722016-04-12 Pedro Alves <palves@redhat.com>
3973
3974 * utils.c (prepare_to_throw_exception): Delete.
3975
6e774b13
SM
39762016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3977
3978 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3979
4dca19f8
MK
39802016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3981
3982 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3983
d0a9981f
MK
39842016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3985
3986 * linux-aarch64-ipa.c: Add <elf.h> include.
3987 * linux-ppc-ipa.c: Add <elf.h> include.
3988 * linux-s390-ipa.c: Add <elf.h> include.
3989
252db07e
MK
39902016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3991
3992 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3993 (get_raw_reg_ptr): Likewise.
3994 (get_trace_state_variable_value_ptr): Likewise.
3995 (set_trace_state_variable_value_ptr): Likewise.
3996 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3997 char *.
3998
14e2b6d9
MK
39992016-03-31 Wei-cheng Wang <cole945@gmail.com>
4000 Marcin Kościelnicki <koriakin@0x04.net>
4001
4002 PR/17221
4003 * linux-ppc-low.c (emit_insns): New function.
4004 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4005 (ppc_emit_prologue): New function.
4006 (ppc_emit_epilogue): New function.
4007 (ppc_emit_add): New function.
4008 (ppc_emit_sub): New function.
4009 (ppc_emit_mul): New function.
4010 (ppc_emit_lsh): New function.
4011 (ppc_emit_rsh_signed): New function.
4012 (ppc_emit_rsh_unsigned): New function.
4013 (ppc_emit_ext): New function.
4014 (ppc_emit_zero_ext): New function.
4015 (ppc_emit_log_not): New function.
4016 (ppc_emit_bit_and): New function.
4017 (ppc_emit_bit_or): New function.
4018 (ppc_emit_bit_xor): New function.
4019 (ppc_emit_bit_not): New function.
4020 (ppc_emit_equal): New function.
4021 (ppc_emit_less_signed): New function.
4022 (ppc_emit_less_unsigned): New function.
4023 (ppc_emit_ref): New function.
4024 (ppc_emit_const): New function.
4025 (ppc_emit_reg): New function.
4026 (ppc_emit_pop): New function.
4027 (ppc_emit_stack_flush): New function.
4028 (ppc_emit_swap): New function.
4029 (ppc_emit_stack_adjust): New function.
4030 (ppc_emit_call): New function.
4031 (ppc_emit_int_call_1): New function.
4032 (ppc_emit_void_call_2): New function.
4033 (ppc_emit_if_goto): New function.
4034 (ppc_emit_goto): New function.
4035 (ppc_emit_eq_goto): New function.
4036 (ppc_emit_ne_goto): New function.
4037 (ppc_emit_lt_goto): New function.
4038 (ppc_emit_le_goto): New function.
4039 (ppc_emit_gt_goto): New function.
4040 (ppc_emit_ge_goto): New function.
4041 (ppc_write_goto_address): New function.
4042 (ppc_emit_ops_impl): New static variable.
4043 (ppc64v1_emit_prologue): New function.
4044 (ppc64v2_emit_prologue): New function.
4045 (ppc64_emit_epilogue): New function.
4046 (ppc64_emit_add): New function.
4047 (ppc64_emit_sub): New function.
4048 (ppc64_emit_mul): New function.
4049 (ppc64_emit_lsh): New function.
4050 (ppc64_emit_rsh_signed): New function.
4051 (ppc64_emit_rsh_unsigned): New function.
4052 (ppc64_emit_ext): New function.
4053 (ppc64_emit_zero_ext): New function.
4054 (ppc64_emit_log_not): New function.
4055 (ppc64_emit_bit_and): New function.
4056 (ppc64_emit_bit_or): New function.
4057 (ppc64_emit_bit_xor): New function.
4058 (ppc64_emit_bit_not): New function.
4059 (ppc64_emit_equal): New function.
4060 (ppc64_emit_less_signed): New function.
4061 (ppc64_emit_less_unsigned): New function.
4062 (ppc64_emit_ref): New function.
4063 (ppc64_emit_const): New function.
4064 (ppc64v1_emit_reg): New function.
4065 (ppc64v2_emit_reg): New function.
4066 (ppc64_emit_pop): New function.
4067 (ppc64_emit_stack_flush): New function.
4068 (ppc64_emit_swap): New function.
4069 (ppc64v1_emit_call): New function.
4070 (ppc64v2_emit_call): New function.
4071 (ppc64v1_emit_int_call_1): New function.
4072 (ppc64v2_emit_int_call_1): New function.
4073 (ppc64v1_emit_void_call_2): New function.
4074 (ppc64v2_emit_void_call_2): New function.
4075 (ppc64_emit_if_goto): New function.
4076 (ppc64_emit_eq_goto): New function.
4077 (ppc64_emit_ne_goto): New function.
4078 (ppc64_emit_lt_goto): New function.
4079 (ppc64_emit_le_goto): New function.
4080 (ppc64_emit_gt_goto): New function.
4081 (ppc64_emit_ge_goto): New function.
4082 (ppc64v1_emit_ops_impl): New static variable.
4083 (ppc64v2_emit_ops_impl): New static variable.
4084 (ppc_emit_ops): New function.
4085 (linux_low_target): Wire in ppc_emit_ops.
4086
a2174ba4
MK
40872016-03-31 Wei-cheng Wang <cole945@gmail.com>
4088 Marcin Kościelnicki <koriakin@0x04.net>
4089
4090 PR/17221
4091 * Makefile.in: Add powerpc-*-ipa.o
4092 * configure.srv: Add ipa_obj for powerpc*-linux.
4093 * linux-ppc-ipa.c: New file.
4094 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4095 includes.
4096 (PPC_FIELD): New macro.
4097 (PPC_SEXT): New macro.
4098 (PPC_OP6): New macro.
4099 (PPC_BO): New macro.
4100 (PPC_LI): New macro.
4101 (PPC_BD): New macro.
4102 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4103 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4104 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4105 (ppc_get_thread_area): New function.
4106 (is_elfv2_inferior): New function.
4107 (gen_ds_form): New function.
4108 (GEN_STD): New macro.
4109 (GEN_STDU): New macro.
4110 (GEN_LD): New macro.
4111 (GEN_LDU): New macro.
4112 (gen_d_form): New function.
4113 (GEN_ADDI): New macro.
4114 (GEN_ADDIS): New macro.
4115 (GEN_LI): New macro.
4116 (GEN_LIS): New macro.
4117 (GEN_ORI): New macro.
4118 (GEN_ORIS): New macro.
4119 (GEN_LWZ): New macro.
4120 (GEN_STW): New macro.
4121 (GEN_STWU): New macro.
4122 (gen_xfx_form): New function.
4123 (GEN_MFSPR): New macro.
4124 (GEN_MTSPR): New macro.
4125 (GEN_MFCR): New macro.
4126 (GEN_MTCR): New macro.
4127 (GEN_SYNC): New macro.
4128 (GEN_LWSYNC): New macro.
4129 (gen_x_form): New function.
4130 (GEN_OR): New macro.
4131 (GEN_MR): New macro.
4132 (GEN_LWARX): New macro.
4133 (GEN_STWCX): New macro.
4134 (GEN_CMPW): New macro.
4135 (gen_md_form): New function.
4136 (GEN_RLDICL): New macro.
4137 (GEN_RLDICR): New macro.
4138 (gen_i_form): New function.
4139 (GEN_B): New macro.
4140 (GEN_BL): New macro.
4141 (gen_b_form): New function.
4142 (GEN_BNE): New macro.
4143 (GEN_LOAD): New macro.
4144 (GEN_STORE): New macro.
4145 (gen_limm): New function.
4146 (gen_atomic_xchg): New function.
4147 (gen_call): New function.
4148 (ppc_relocate_instruction): New function.
4149 (ppc_install_fast_tracepoint_jump_pad): New function.
4150 (ppc_get_min_fast_tracepoint_insn_len): New function.
4151 (ppc_get_ipa_tdesc_idx): New function.
4152 (the_low_target): Wire in the new functions.
4153 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4154 tdescs.
4155 * linux-ppc-tdesc.h: New file.
4156
a13c4696
MK
41572016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4158
4159 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4160 (alloc_jump_pad_buffer): New function.
4161 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4162 (alloc_jump_pad_buffer): New function.
4163 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4164 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4165 (alloc_jump_pad_buffer): New function.
4166 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4167 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4168 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4169 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4170
1cda1512
MK
41712016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4172
4173 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4174 * linux-amd64-ipa.c: Likewise.
4175 * linux-i386-ipa.c: Likewise.
4176 * linux-s390-ipa.c: Likewise.
4177 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4178 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4179 set_trace_state_variable_value_ptr.
4180 (struct ipa_sym_addresses): Likewise.
4181 (symbol_list): Likewise.
4182 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4183 accessing gdb_collect directly.
4184 (gdb_collect_ptr_type): New typedef.
4185 (get_raw_reg_ptr_type): New typedef.
4186 (get_trace_state_variable_value_ptr_type): New typedef.
4187 (set_trace_state_variable_value_ptr_type): New typedef.
4188 (gdb_collect_ptr): New global.
4189 (get_raw_reg_ptr): New global.
4190 (get_trace_state_variable_value_ptr): New global.
4191 (set_trace_state_variable_value_ptr): New global.
4192 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4193 accessing get_raw_reg directly.
4194 (get_get_tsv_func_addr): Likewise for
4195 get_trace_state_variable_value_ptr.
4196 (get_set_tsv_func_addr): Likewise for
4197 set_trace_state_variable_value_ptr.
4198 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4199
72fb5488
SM
42002016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4201
4202 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4203
28170b88
MK
42042016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4205
4206 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4207 packets.
4208 (relocate_instruction): Remove own_buf.
4209 * server.c (own_buf): Make global.
4210 (handle_v_requests): Make global.
4211 * server.h (own_buf): New declaration.
4212 (handle_v_requests): New prototype.
4213
f39e8743
MK
42142016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4215
4216 PR 18377
4217 * linux-s390-low.c (add_insns): New function.
4218 (s390_emit_prologue): New function.
4219 (s390_emit_epilogue): New function.
4220 (s390_emit_add): New function.
4221 (s390_emit_sub): New function.
4222 (s390_emit_mul): New function.
4223 (s390_emit_lsh): New function.
4224 (s390_emit_rsh_signed): New function.
4225 (s390_emit_rsh_unsigned): New function.
4226 (s390_emit_ext): New function.
4227 (s390_emit_log_not): New function.
4228 (s390_emit_bit_and): New function.
4229 (s390_emit_bit_or): New function.
4230 (s390_emit_bit_xor): New function.
4231 (s390_emit_bit_not): New function.
4232 (s390_emit_equal): New function.
4233 (s390_emit_less_signed): New function.
4234 (s390_emit_less_unsigned): New function.
4235 (s390_emit_ref): New function.
4236 (s390_emit_if_goto): New function.
4237 (s390_emit_goto): New function.
4238 (s390_write_goto_address): New function.
4239 (s390_emit_litpool): New function.
4240 (s390_emit_const): New function.
4241 (s390_emit_call): New function.
4242 (s390_emit_reg): New function.
4243 (s390_emit_pop): New function.
4244 (s390_emit_stack_flush): New function.
4245 (s390_emit_zero_ext): New function.
4246 (s390_emit_swap): New function.
4247 (s390_emit_stack_adjust): New function.
4248 (s390_emit_set_r2): New function.
4249 (s390_emit_int_call_1): New function.
4250 (s390_emit_void_call_2): New function.
4251 (s390_emit_eq_goto): New function.
4252 (s390_emit_ne_goto): New function.
4253 (s390_emit_lt_goto): New function.
4254 (s390_emit_le_goto): New function.
4255 (s390_emit_gt_goto): New function.
4256 (s390_emit_ge_goto): New function.
4257 (s390x_emit_prologue): New function.
4258 (s390x_emit_epilogue): New function.
4259 (s390x_emit_add): New function.
4260 (s390x_emit_sub): New function.
4261 (s390x_emit_mul): New function.
4262 (s390x_emit_lsh): New function.
4263 (s390x_emit_rsh_signed): New function.
4264 (s390x_emit_rsh_unsigned): New function.
4265 (s390x_emit_ext): New function.
4266 (s390x_emit_log_not): New function.
4267 (s390x_emit_bit_and): New function.
4268 (s390x_emit_bit_or): New function.
4269 (s390x_emit_bit_xor): New function.
4270 (s390x_emit_bit_not): New function.
4271 (s390x_emit_equal): New function.
4272 (s390x_emit_less_signed): New function.
4273 (s390x_emit_less_unsigned): New function.
4274 (s390x_emit_ref): New function.
4275 (s390x_emit_if_goto): New function.
4276 (s390x_emit_const): New function.
4277 (s390x_emit_call): New function.
4278 (s390x_emit_reg): New function.
4279 (s390x_emit_pop): New function.
4280 (s390x_emit_stack_flush): New function.
4281 (s390x_emit_zero_ext): New function.
4282 (s390x_emit_swap): New function.
4283 (s390x_emit_stack_adjust): New function.
4284 (s390x_emit_int_call_1): New function.
4285 (s390x_emit_void_call_2): New function.
4286 (s390x_emit_eq_goto): New function.
4287 (s390x_emit_ne_goto): New function.
4288 (s390x_emit_lt_goto): New function.
4289 (s390x_emit_le_goto): New function.
4290 (s390x_emit_gt_goto): New function.
4291 (s390x_emit_ge_goto): New function.
4292 (s390_emit_ops): New function.
4293 (struct linux_target_ops): Fill in emit_ops hook.
4294
abd9baf9
MK
42952016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4296
4297 PR 18377
4298 * Makefile.in: Add s390 IPA files.
4299 * configure.srv: Build IPA for s390.
4300 * linux-s390-ipa.c: New file.
4301 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4302 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4303 (tdesc_s390_linux32): Likewise.
4304 (init_registers_s390_linux32v1): Likewise.
4305 (tdesc_s390_linux32v1): Likewise.
4306 (init_registers_s390_linux32v2): Likewise.
4307 (tdesc_s390_linux32v2): Likewise.
4308 (init_registers_s390_linux64): Likewise.
4309 (tdesc_s390_linux64): Likewise.
4310 (init_registers_s390_linux64v1): Likewise.
4311 (tdesc_s390_linux64v1): Likewise.
4312 (init_registers_s390_linux64v2): Likewise.
4313 (tdesc_s390_linux64v2): Likewise.
4314 (init_registers_s390_te_linux64): Likewise.
4315 (tdesc_s390_te_linux64): Likewise.
4316 (init_registers_s390_vx_linux64): Likewise.
4317 (tdesc_s390_vx_linux64): Likewise.
4318 (init_registers_s390_tevx_linux64): Likewise.
4319 (tdesc_s390_tevx_linux64): Likewise.
4320 (init_registers_s390x_linux64): Likewise.
4321 (tdesc_s390x_linux64): Likewise.
4322 (init_registers_s390x_linux64v1): Likewise.
4323 (tdesc_s390x_linux64v1): Likewise.
4324 (init_registers_s390x_linux64v2): Likewise.
4325 (tdesc_s390x_linux64v2): Likewise.
4326 (init_registers_s390x_te_linux64): Likewise.
4327 (tdesc_s390x_te_linux64): Likewise.
4328 (init_registers_s390x_vx_linux64): Likewise.
4329 (tdesc_s390x_vx_linux64): Likewise.
4330 (init_registers_s390x_tevx_linux64): Likewise.
4331 (tdesc_s390x_tevx_linux64): Likewise.
4332 (have_hwcap_s390_vx): New static variable.
4333 (s390_arch_setup): Fill have_hwcap_s390_vx.
4334 (s390_get_thread_area): New function.
4335 (s390_ft_entry_gpr_esa): New const.
4336 (s390_ft_entry_gpr_zarch): New const.
4337 (s390_ft_entry_misc): New const.
4338 (s390_ft_entry_fr): New const.
4339 (s390_ft_entry_vr): New const.
4340 (s390_ft_main_31): New const.
4341 (s390_ft_main_64): New const.
4342 (s390_ft_exit_fr): New const.
4343 (s390_ft_exit_vr): New const.
4344 (s390_ft_exit_misc): New const.
4345 (s390_ft_exit_gpr_esa): New const.
4346 (s390_ft_exit_gpr_zarch): New const.
4347 (append_insns): New function.
4348 (s390_relocate_instruction): New function.
4349 (s390_install_fast_tracepoint_jump_pad): New function.
4350 (s390_get_min_fast_tracepoint_insn_len): New function.
4351 (s390_get_ipa_tdesc_idx): New function.
4352 (struct linux_target_ops): Wire in the above functions.
4353 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4354 * linux-s390-tdesc.h: New file.
4355
a4105d04
MK
43562016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4357
4358 * linux-s390-low.c (s390_supports_tracepoints): New function.
4359 (struct linux_target_ops): Fill supports_tracepoints hook.
4360
35ac8b3e
YQ
43612016-03-18 Yao Qi <yao.qi@linaro.org>
4362
4363 * linux-low.c (lwp_signal_can_be_delivered): New function.
4364 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4365
94610ec4
YQ
43662016-03-18 Yao Qi <yao.qi@linaro.org>
4367
4368 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4369 0 if signal is enqueued. Remove 'signal' from one debugging
4370 message. Move one debugging message to some lines below.
4371 Remove code setting 'signal' to 0.
4372
80aea927
YQ
43732016-03-18 Yao Qi <yao.qi@linaro.org>
4374
4375 * linux-low.c (linux_low_filter_event): Remove redundant
4376 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4377
b04fd3be
MK
43782016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4379
4380 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4381 (struct linux_target_ops): Wire in the above.
4382
c40c8d4b
YQ
43832016-03-03 Yao Qi <yao.qi@linaro.org>
4384
4385 * linux-low.c: Update comments to start_step_over.
4386
0f8288ae
YQ
43872016-03-03 Yao Qi <yao.qi@linaro.org>
4388
4389 PR server/19736
4390 * linux-low.c (handle_extended_wait): Set child suspended
4391 if event_lwp->bp_reinsert isn't zero.
4392
fdbd04a8
YQ
43932016-03-02 Yao Qi <yao.qi@linaro.org>
4394
4395 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4396 enqueue_pending_signal.
4397
6896a8fa
MK
43982016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4399
4400 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4401 is actually loaded.
4402
ab503087
MK
44032016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4404
4405 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4406 (s390_regmap_3264) [!__s390x__]: New global.
4407 (s390_collect_ptrace_register): Skip map entries containing -1.
4408 (s390_supply_ptrace_register): Ditto.
4409 (s390_fill_gprs_high): New function.
4410 (s390_store_gprs_high): New function.
4411 (s390_regsets): Add NT_S390_HIGH_GPRS.
4412 (s390_get_hwcap): Enable on 31-bit.
4413 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4414 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4415 Detect NT_S390_HIGH_GPRS.
4416 (s390_usrregs_info_3264): Enable on 31-bit.
4417 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4418 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4419
ae91f625
MK
44202016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4421
4422 PR gdb/13808
4423 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4424 * configure.srv: Ditto.
4425 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4426 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4427 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4428 (init_registers_amd64_linux): Remove prototype.
4429 (tdesc_amd64_linux): Remove declaration.
4430 (get_ipa_tdesc): New function.
4431 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4432 initialize remaining tdescs.
4433 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4434 (init_registers_i386_linux): Remove prototype.
4435 (tdesc_i386_linux): Remove declaration.
4436 (get_ipa_tdesc): New function.
4437 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4438 initialize remaining tdescs.
4439 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4440 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4441 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4442 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4443 (x86_get_ipa_tdesc_idx): New function.
4444 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4445 * linux-x86-tdesc.h: New file.
4446 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4447 (target_get_ipa_tdesc_idx): New macro.
4448 * tracepoint.c (ipa_tdesc_idx): New macro.
4449 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4450 (symbol_list): Add ipa_tdesc_idx.
4451 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4452 (ipa_tdesc): Remove.
4453 (ipa_tdesc_idx): New variable.
4454 (get_context_regcache): Use get_ipa_tdesc.
4455 (gdb_collect): Ditto.
4456 (gdb_probe): Ditto.
4457 * tracepoint.h (get_ipa_tdesc): New prototype.
4458 (ipa_tdesc): Remove.
4459
e7ad2f14
PA
44602016-02-24 Pedro Alves <palves@redhat.com>
4461
4462 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4463 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4464 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4465 Factor out common code between the USE_SIGTRAP_SIGINFO and
4466 !USE_SIGTRAP_SIGINFO blocks.
4467 (linux_low_filter_event): Call save_stop_reason instead of
4468 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4469 Update comments.
4470 (linux_wait_1): Update comments.
4471
657f9cde
WW
44722016-02-24 Wei-cheng Wang <cole945@gmail.com>
4473
4474 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4475 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4476 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4477 ppc_insert_point, ppc_remove_point.
4478
b00b61e1
MK
44792016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4480
4481 * linux-s390-low.c (s390_supports_z_point_type): New function.
4482 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4483
553cb527
YQ
44842016-02-16 Yao Qi <yao.qi@linaro.org>
4485
4486 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4487 PC. Get pc from regcache_read_pc.
4488
a5652c21
YQ
44892016-02-12 Yao Qi <yao.qi@linaro.org>
4490
4491 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4492 or linux_get_pc_32bit.
4493 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4494
ed443b61
YQ
44952016-02-12 Yao Qi <yao.qi@linaro.org>
4496
4497 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4498 arm_linux_get_next_pcs_fixup.
4499
020ecd38
MK
45002016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4501
4502 * tracepoint.c (x_tracepoint_action_download): Change
4503 write_inferior_data_ptr to write_inferior_data_pointer.
4504 (cmd_qtstart): Likewise.
4505 (write_inferior_data_ptr): Remove.
4506 (download_agent_expr): Change write_inferior_data_ptr to
4507 write_inferior_data_pointer.
4508 (download_tracepoint_1): Likewise.
4509 (download_tracepoint): Likewise.
4510 (download_trace_state_variables): Likewise.
4511
7cae9051
WW
45122016-02-11 Wei-cheng Wang <cole945@gmail.com>
4513 Marcin Kościelnicki <koriakin@0x04.net>
4514
4515 * tracepoint.c (struct tracepoint_action_ops): Remove.
4516 (struct tracepoint_action): Remove ops.
4517 (m_tracepoint_action_download, r_tracepoint_action_download)
4518 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4519 size and offset accordingly.
4520 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4521 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4522 (tracepoint_action_send, tracepoint_action_download): New functions.
4523 Helpers for trace action handlers.
4524 (add_tracepoint_action): Remove setup actions ops.
4525 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4526
9f6a71b4
YQ
45272016-02-10 Yao Qi <yao.qi@linaro.org>
4528
4529 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4530
1e94266c
SM
45312016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4532
4533 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4534 to AC_OUTPUT.
4535 * configure: Regenerate.
4536
8adce034
SM
45372016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4538
4539 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4540 void * to gdb_byte *.
4541 * linux-low.c (siginfo_fixup): Likewise.
4542 (linux_xfer_siginfo): Likewise.
4543 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4544 Likewise.
4545 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4546
93813b37
WT
45472016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4548
4549 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4550 to srv_tgtobj.
4551 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4552 to srv_tgtobj.
4553 * linux-x86-low.c [__x86_64__]: Include
4554 "nat/amd64-linux-siginfo.h".
4555 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4556 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4557 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4558 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4559 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4560 (cpt_si_fd, si_timerid, si_overrun): Move from
4561 nat/amd64-linux-siginfo.c.
4562 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4563
8424cc97
SM
45642016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4565
4566 * server.c (skip_to_semicolon): Remove.
4567 (process_point_options): Use strchrnul instead of
4568 skip_to_semicolon.
4569
4d18591b
YQ
45702016-01-26 Yao Qi <yao.qi@linaro.org>
4571
4572 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4573 * linux-low.c (install_software_single_step_breakpoints): Don't
4574 call regcache_read_pc.
4575 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4576 argument pc.
4577
d8020970
YQ
45782016-01-26 Yao Qi <yao.qi@linaro.org>
4579
4580 * linux-low.c (install_software_single_step_breakpoints): Call
4581 regcache_read_pc instead of get_pc.
4582
8b207339
YQ
45832016-01-26 Yao Qi <yao.qi@linaro.org>
4584
4585 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4586 (unblock_async_io): Rename to ...
4587 (block_unblock_async_io): ... it. New function.
4588 (enable_async_io): Don't install SIGIO handler. Unblock it
4589 instead.
4590 (disable_async_io): Don't ignore SIGIO. Block it instead.
4591 (initialize_async_io): Install SIGIO handler. Don't call
4592 unblock_async_io.
4593
18879fef
YQ
45942016-01-26 Yao Qi <yao.qi@linaro.org>
4595
4596 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4597 first character is '\003', call *the_target->request_interrupt.
4598
a0f8e08a
YQ
45992016-01-25 Yao Qi <yao.qi@linaro.org>
4600
4601 * remote-utils.c (new_thread_notify): Remove.
4602 (dead_thread_notify): Likewise.
4603 * remote-utils.h (new_thread_notify): Remove declaration.
4604 (dead_thread_notify): Likewise.
4605
cc5fd9ab
MK
46062016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4607
4608 * gdb.trace/pending.exp: Fix expected message on continue.
4609
99e8eb11
MK
46102016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4611
4612 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4613 it works properly on big-endian machines where sizeof (CORE_ADDR)
4614 != sizeof (void *).
4615
a994041d
PA
46162016-01-21 Pedro Alves <palves@redhat.com>
4617
4618 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4619 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4620 * configure: Regenerate.
4621
f7a6a40d
YQ
46222016-01-21 Yao Qi <yao.qi@linaro.org>
4623
4624 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4625 is_thumb and set it according to CPSR saved on the stack.
4626 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4627 arm_sigreturn_next_pc.
4628
6f69e520
YQ
46292016-01-18 Yao Qi <yao.qi@linaro.org>
4630
4631 * linux-low.c (linux_set_pc_64bit): New function.
4632 (linux_get_pc_64bit): New function.
4633 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4634 Declare.
4635 * linux-sparc-low.c (debug_threads): Remove declaration.
4636 (sparc_get_pc): Remove.
4637 (the_low_target): Use linux_get_pc_64bit instead of
4638 sparc_get_pc.
4639 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4640 (the_low_target): Use linux_get_pc_64bit and
4641 linux_set_pc_64bit.
4642
276d4552
YQ
46432016-01-18 Yao Qi <yao.qi@linaro.org>
4644
4645 * linux-arm-low.c (debug_threads): Remove declaration.
4646 (arm_get_pc, arm_set_pc): Remove.
4647 (the_low_target): Use linux_get_pc_32bit and
4648 linux_set_pc_32bit.
4649 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4650 (the_low_target): Use linux_get_pc_32bit and
4651 linux_set_pc_32bit.
4652 * linux-cris-low.c (debug_threads): Remove declaration.
4653 (cris_get_pc, cris_set_pc,): Remove.
4654 (the_low_target): Use linux_get_pc_32bit and
4655 linux_set_pc_32bit.
4656 * linux-crisv32-low.c (debug_threads): Remove declaration.
4657 (cris_get_pc, cris_set_pc): Remove.
4658 (the_low_target): Use linux_get_pc_32bit and
4659 linux_set_pc_32bit.
4660 * linux-low.c: Include inttypes.h.
4661 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4662 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4663 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4664 (the_low_target): Use linux_get_pc_32bit and
4665 linux_set_pc_32bit.
4666 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4667 (the_low_target): Use linux_get_pc_32bit and
4668 linux_set_pc_32bit.
4669 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4670 (the_low_target): Use linux_get_pc_32bit and
4671 linux_set_pc_32bit.
4672 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4673 (the_low_target): Use linux_get_pc_32bit and
4674 linux_set_pc_32bit.
4675 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4676 (the_low_target): Use linux_get_pc_32bit and
4677 linux_set_pc_32bit.
4678
eb0edac8
GB
46792016-01-18 Gary Benson <gbenson@redhat.com>
4680
4681 * configure.ac (AC_FUNC_FORK): New check.
4682 * config.in: Regenerate.
4683 * configure: Likewise.
4684
1b451dda
YQ
46852016-01-14 Yao Qi <yao.qi@linaro.org>
4686
4687 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4688 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4689 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4690 arm_get_next_pcs_ctor.
4691
82075af2
JS
46922016-01-12 Josh Stone <jistone@redhat.com>
4693 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4694
4695 * inferiors.h: Include "gdb_vecs.h".
4696 (struct process_info): Add syscalls_to_catch.
4697 * inferiors.c (remove_process): Free syscalls_to_catch.
4698 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4699 syscall_return stops.
4700 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4701 * server.c (handle_general_set): Handle QCatchSyscalls.
4702 (handle_query): Report support for QCatchSyscalls.
4703 * target.h (struct target_ops): Add supports_catch_syscall.
4704 (target_supports_catch_syscall): New macro.
4705 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4706 (struct lwp_info): Add syscall_state.
4707 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4708 Maintain syscall_state and syscalls_to_catch across exec.
4709 (get_syscall_trapinfo): New function, proxy to the_low_target.
4710 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4711 (linux_low_filter_event): Toggle syscall_state entry/return for
4712 syscall traps, and set it ignored for all others.
4713 (gdb_catching_syscalls_p): New function.
4714 (gdb_catch_this_syscall_p): New function.
4715 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4716 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4717 (linux_supports_catch_syscall): New function.
4718 (linux_target_ops): Install it.
4719 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4720 (the_low_target): Install it.
4721
8f13a3ce
MF
47222016-01-12 Mike Frysinger <vapier@gentoo.org>
4723
4724 * acinclude.m4: Include new ../warning.m4 file.
4725 * configure: Regenerated.
4726 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4727
5b3da067
MF
47282016-01-12 Mike Frysinger <vapier@gentoo.org>
4729
4730 * ax.c (is_goto_target): Mark static.
4731 * linux-low.c (register_addr): Likewise.
4732 (linux_fetch_registers, linux_store_registers): Likewise.
4733 * mem-break.c (any_persistent_commands): Fix old prototype.
4734 (add_commands_to_breakpoint): Mark static.
4735 * regcache.c (find_register_by_name): Delete unused func.
4736 * remote-utils.c (hex_or_minus_one): Mark static.
4737 * server.c (monitor_show_help): Mark static.
4738 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4739 handle_v_requests): Likewise.
4740
bc504a31
PA
47412016-01-12 Pedro Alves <palves@redhat.com>
4742
4743 Remove use of the registered trademark symbol throughout.
4744
5a0dd67a
YQ
47452016-01-08 Yao Qi <yao.qi@linaro.org>
4746
4747 * remote-utils.c (getpkt): If c is '\003', call target hook
4748 request_interrupt.
4749
b2ca446f
YQ
47502016-01-06 Yao Qi <yao.qi@linaro.org>
4751
4752 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4753 linux-aarch32-low.c.
4754 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4755 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4756 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4757 (thumb2_breakpoint): Declare.
4758 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4759 linux-aarch32-low.h.
4760 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4761 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4762 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4763
edd88788
JB
47642016-01-01 Joel Brobecker <brobecker@adacore.com>
4765
4766 * gdbreplay.c (gdbreplay_version): Change copyright year in
4767 version message.
4768 * server.c (gdbserver_version): Likewise.
4769
65da7f14
PP
47702015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4771
4772 * server.c (crc32_table): Delete.
4773 (crc32): Use libiberty's xcrc32 function.
4774
4abd5ed2
JB
47752015-12-22 Joel Brobecker <brobecker@adacore.com>
4776
4777 * lynx-low.c (lynx_delete_thread_callback): New function.
4778 (lynx_mourn): Properly delete our process and all of its
4779 threads. Remove call to clear_inferiors.
4780
0e50fe5c
JB
47812015-12-22 Joel Brobecker <brobecker@adacore.com>
4782
4783 * target.c (thread_search_callback): Add check that
4784 the thread_stopped target callback is not NULL before
4785 calling it.
4786
35adc03f
YQ
47872015-12-21 Yao Qi <yao.qi@linaro.org>
4788
4789 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4790 arm breakpoint.
4791
bd2b2909
AT
47922015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4793
4794 * server.c (handle_query): Call target_supports_software_single_step.
4795
7fe5e27e
AT
47962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4797
4798 * linux-low.c (single_step): New function.
4799 (linux_resume_one_lwp_throw): Call single_step.
4800 (start_step_over): Likewise.
4801
d9311bfa
AT
48022015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4803
4804 * Makefile.in (SFILES): Append arch/arm-linux.c,
4805 arch/arm-get-next-pcs.c.
4806 (arm-linux.o): New rule.
4807 (arm-get-next-pcs.o): New rule.
4808 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4809 arm-linux.o.
4810 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4811 to linux-aarch32-low.c.
4812 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4813 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4814 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4815 (thumb2_breakpoint_len): Likewise.
4816 (arm_is_thumb_mode): Make non-static.
4817 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4818 from linux-aarch32-low.c.
4819 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4820 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4821 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4822 (thumb2_breakpoint_len): Likewise.
4823 (arm_is_thumb_mode): New declaration.
4824 * linux-arm-low.c: Include arch/arm-linux.h
4825 aarch/arm-get-next-pcs.h, sys/syscall.h.
4826 (get_next_pcs_ops): New struct.
4827 (get_next_pcs_addr_bits_remove): New function.
4828 (get_next_pcs_is_thumb): New function.
4829 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4830 (arm_sigreturn_next_pc): Likewise.
4831 (get_next_pcs_syscall_next_pc): Likewise.
4832 (arm_gdbserver_get_next_pcs): Likewise.
4833 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4834 Initialize.
4835 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4836 * server.h: Include gdb_vecs.h.
4837
68ce2059
AT
48382015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4839
4840 * Makefile.in (SFILES): Append common/common-regcache.c.
4841 (OBS): Append common-regcache.o.
4842 (common-regcache.o): New rule.
4843 * regcache.c (init_register_cache): Initialize cache to
4844 REG_UNAVAILABLE.
4845 (regcache_raw_read_unsigned): New function.
4846 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4847 register_status enum.
4848
fa5308bd
AT
48492015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4850
4851 * linux-aarch64-low.c (the_low_targets): Rename
4852 breakpoint_reinsert_addr to get_next_pcs.
4853 * linux-arm-low.c (the_low_targets): Likewise.
4854 * linux-bfin-low.c (the_low_targets): Likewise.
4855 * linux-cris-low.c (the_low_targets): Likewise.
4856 * linux-crisv32-low.c (the_low_targets): Likewise.
4857 * linux-low.c (can_software_single_step): Likewise.
4858 (install_software_single_step_breakpoints): New function.
4859 (start_step_over): Use install_software_single_step_breakpoints.
4860 * linux-low.h: New CORE_ADDR vector.
4861 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4862 get_next_pcs.
4863 * linux-mips-low.c (the_low_targets): Likewise.
4864 * linux-nios2-low.c (the_low_targets): Likewise.
4865 * linux-sparc-low.c (the_low_targets): Likewise.
4866
4a6ed09b
PA
48672015-12-17 Pedro Alves <palves@redhat.com>
4868
4869 * linux-low.c (linux_kill_one_lwp): Remove references to
4870 LinuxThreads.
4871 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4872 to 'kill'.
4873 (linux_init_signals): Delete.
4874 (initialize_low): Adjust.
4875 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4876
7544db95
PA
48772015-12-16 Pedro Alves <palves@redhat.com>
4878
4879 * configure.ac (compiler warning flags): When testing a
4880 -Wno-foo option, check whether -Wfoo works instead.
4881 * configure: Regenerate.
4882
8020350c
DB
48832015-12-11 Don Breazeal <donb@codesourcery.com>
4884
4885 * server.c (process_serial_event): Don't exit from gdbserver
4886 in remote mode if there are still active inferiors.
4887
db91f502
YQ
48882015-12-11 Yao Qi <yao.qi@linaro.org>
4889
4890 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4891 arm_breakpoint_at if the process is 32-bit.
4892
b37a6290
YQ
48932015-12-11 Yao Qi <yao.qi@linaro.org>
4894
4895 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4896 arm breakpoint.
4897
17b1509a
YQ
48982015-12-07 Yao Qi <yao.qi@linaro.org>
4899
4900 * configure.srv: Append arm.o to srv_tgtobj for
4901 aarch64*-*-linux* target.
4902 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4903 from linux-arm-low.c.
4904 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4905 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4906 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4907 (thumb2_breakpoint_len): Likewise.
4908 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4909 (arm_breakpoint_kinds): Likewise.
4910 (arm_breakpoint_kind_from_pc): Likewise.
4911 (arm_sw_breakpoint_from_kind): Likewise.
4912 (arm_breakpoint_kind_from_current_state): Likewise.
4913 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4914 (arm_sw_breakpoint_from_kind): Declare.
4915 (arm_breakpoint_kind_from_current_state): Declare.
4916 (arm_breakpoint_at): Declare.
4917 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4918 arm_sw_breakpoint_from_kind if process is 32-bit.
4919 (aarch64_breakpoint_kind_from_pc): New function.
4920 (aarch64_breakpoint_kind_from_current_state): New function.
4921 (the_low_target): Initialize fields breakpoint_kind_from_pc
4922 and breakpoint_kind_from_current_state.
4923 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4924 linux-aarch32-low.c.
4925 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4926 (arm_breakpoint, arm_breakpoint_len): Likewise.
4927 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4928 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4929 (arm_is_thumb_mode): Likewise.
4930 (arm_breakpoint_at): Likewise.
4931 (arm_breakpoint_kind_from_pc): Likewise.
4932 (arm_sw_breakpoint_from_kind): Likewise.
4933 (arm_breakpoint_kind_from_current_state): Likewise.
4934
4935 Revert:
4936 2015-08-04 Yao Qi <yao.qi@linaro.org>
4937
4938 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4939 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4940 * server.c (extended_protocol): Remove "static".
4941 * server.h (extended_protocol): Declare it.
4942
ece66d65
JS
49432015-12-04 Josh Stone <jistone@redhat.com>
4944
4945 * target.h (struct target_ops) <arch_setup>: Rename to ...
4946 (struct target_ops) <post_create_inferior>: ... this.
4947 (target_arch_setup): Rename to ...
4948 (target_post_create_inferior): ... this, calling post_create_inferior.
4949 * server.c (start_inferior): Update target_arch_setup calls to
4950 target_post_create_inferior.
4951 * linux-low.c (linux_low_ptrace_options): Forward declare.
4952 (linux_arch_setup): Update its comment for general use.
4953 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4954 (struct linux_target_ops): Use linux_post_create_inferior.
4955 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4956 to post_create_inferior.
4957 * nto-low.c (struct nto_target_ops): Likewise.
4958 * spu-low.c (struct spu_target_ops): Likewise.
4959 * win32-low.c (struct win32_target_ops): Likewise.
4960
e58c48b4
AT
49612015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4962
4963 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4964
fbec8956
AT
49652015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4966
4967 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4968 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4969 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4970 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4971 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4972 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4973 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4974 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4975 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4976 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4977 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4978 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4979
9b4c5f87
AT
49802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4981
4982 * linux-low.c (linux_look_up_symbols): Don't call
4983 linux_supports_traceclone.
4984 * linux-low.h (thread_db_init): Remove use_events argument.
4985 * thread-db.c (thread_db_use_event): Remove global variable.
4986 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4987 (struct thread_db) <td_create_bp>: Remove field.
4988 (thread_db_create_event): Remove function.
4989 (thread_db_enable_reporting): Likewise.
4990 (find_one_thread): Don't check for thread_db_use_events.
4991 (attach_thread): Likewise.
4992 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4993 (try_thread_db_load_1): Don't check for thread_db_use_events.
4994 (thread_db_init): Remove use_events argument and thread events
4995 handling.
4996 (remove_thread_event_breakpoints): Remove function.
4997 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4998
7d00775e
AT
49992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5000
5001 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5002 New function.
5003 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5004 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5005 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5006 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5007 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5008 Initialize.
5009 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5010 New function.
5011 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5012 * linux-low.c (can_hardware_single_step): Use
5013 supports_hardware_single_step.
5014 (can_software_single_step): New function.
5015 (start_step_over): Call can_software_single_step.
5016 (linux_supports_hardware_single_step): New function.
5017 (struct target_ops) <supports_software_single_step>: Initialize.
5018 * linux-low.h (struct linux_target_ops)
5019 <supports_hardware_single_step>: Initialize.
5020 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5021 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5022 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5023 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5024 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5025 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5026 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5027 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5028 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5029 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5030 Initialize.
5031 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5032 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5033 Initialize.
5034 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5035 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5036 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5037 New function.
5038 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5039 * target.h (struct target_ops): <supports_software_single_step>:
5040 New field.
5041 (target_supports_software_single_step): New macro.
5042
2d97cd35
AT
50432015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5044
5045 * linux-low.c (linux_wait_1): Fix pc advance condition.
5046 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5047 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5048
769ef81f
AT
50492015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5050
5051 * linux-arm-low.c (arm_is_thumb_mode): New function.
5052 (arm_breakpoint_at): Use arm_is_thumb_mode.
5053 (arm_breakpoint_kind_from_current_state): New function.
5054 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5055 Initialize.
5056 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5057 (linux_breakpoint_kind_from_current_state): New function.
5058 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5059 * linux-low.h (struct linux_target_ops)
5060 <breakpoint_kind_from_current_state>: New field.
5061 * target.h (struct target_ops): Likewise.
5062 (target_breakpoint_kind_from_current_state): New macro.
5063
1bebeeca
PA
50642015-11-30 Pedro Alves <palves@redhat.com>
5065
5066 * linux-low.c (linux_resume): Wake up the event loop before
5067 returning.
5068
a67a9fae
PA
50692015-11-30 Pedro Alves <palves@redhat.com>
5070
5071 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5072 check.
5073 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5074 to -1.
5075 * target.c (struct thread_search): New structure.
5076 (thread_search_callback): New function.
5077 (prev_general_thread): New global.
5078 (prepare_to_access_memory, done_accessing_memory): New functions.
5079 * target.h (prepare_to_access_memory, done_accessing_memory):
5080 Replace macros with function declarations.
5081
f2faf941
PA
50822015-11-30 Pedro Alves <palves@redhat.com>
5083
5084 PR 14618
5085 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5086 report TARGET_WAITKIND_NO_RESUMED.
5087 * remote-utils.c (prepare_resume_reply): Handle
5088 TARGET_WAITKIND_NO_RESUMED.
5089 * server.c (report_no_resumed): New global.
5090 (handle_query) <qSupported>: Handle "no-resumed+". Report
5091 "no-resumed+" support.
5092 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5093 return error if the client doesn't support no-resumed events.
5094 (push_stop_notification): New function.
5095 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5096 events if the client supports them.
5097
a681f9c9
PA
50982015-11-30 Pedro Alves <palves@redhat.com>
5099
5100 * linux-low.c (thread_still_has_status_pending_p): Don't check
5101 vCont;t here.
5102 (lwp_resumed): New function.
5103 (status_pending_p_callback): Return early if the LWP is not
5104 supposed to be resumed.
5105
65706a29
PA
51062015-11-30 Pedro Alves <palves@redhat.com>
5107
5108 * linux-low.c (handle_extended_wait): Assert that the LWP's
5109 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5110 thread create events, leave the new child's status pending.
5111 (linux_low_filter_event): If GDB wants to hear about thread exit
5112 events, leave the LWP marked dead and don't delete it.
5113 (linux_wait_for_event_filtered): Don't check for thread exit.
5114 (filter_exit_event): New function.
5115 (linux_wait_1): Use it, when returning an exit event.
5116 (linux_resume_one_lwp_throw): Assert that the LWP's
5117 waitstatus is TARGET_WAITKIND_IGNORE.
5118 * remote-utils.c (prepare_resume_reply): Handle
5119 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5120 * server.c (report_thread_events): New global.
5121 (handle_general_set): Handle QThreadEvents.
5122 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5123 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5124 TARGET_WAITKIND_THREAD_EXITED.
5125 * server.h (report_thread_events): Declare.
5126
56cf4bed
PA
51272015-11-30 Pedro Alves <palves@redhat.com>
5128
5129 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5130 the thread's last_resume_kind was resume_stop.
5131
500c1d85
PA
51322015-11-30 Pedro Alves <palves@redhat.com>
5133
5134 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5135 before returning.
5136
de979965
PA
51372015-11-30 Pedro Alves <palves@redhat.com>
5138
5139 * server.c (handle_v_requests): Handle vCtrlC.
5140
34c65914
PA
51412015-11-30 Pedro Alves <palves@redhat.com>
5142
5143 * gdbthread.h (find_any_thread_of_pid): Declare.
5144 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5145 functions.
5146 * server.c (handle_query): If current_thread is NULL, look for
5147 another thread of the selected process.
5148
79efa585 51492015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5150 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5151
5152 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5153 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5154 name in reply.
5155 * target.h (struct target_ops) <thread_name>: New field.
5156 (target_thread_name): New macro.
5157
80d82c19
JB
51582015-11-23 Joel Brobecker <brobecker@adacore.com>
5159
5160 * regcache.h (regcache_invalidate_pid): Add declaration.
5161 * regcache.c (regcache_invalidate_pid): New function, extracted
5162 from regcache_invalidate.
5163 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5164 Add trivial documentation comment.
5165 * lynx-low.c: Use regcache_invalidate_pid instead of
5166 regcache_invalidate.
5167
64da5dd5
JB
51682015-11-23 Joel Brobecker <brobecker@adacore.com>
5169
5170 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5171 and Elf64_auxv_t if the target is Android.
5172
37ce4055
DE
51732015-11-22 Doug Evans <xdje42@gmail.com>
5174
5175 * target.h: #include <sys/types.h>.
5176
06e03fff
PA
51772015-11-19 Pedro Alves <palves@redhat.com>
5178
5179 * linux-low.c (linux_process_qsupported): Change prototype.
5180 Adjust.
5181 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5182 Change prototype.
5183 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5184 and adjust to loop over all features.
5185 * server.c (handle_query) <qSupported>: Adjust to call
5186 target_process_qsupported once, passing it a vector of unprocessed
5187 features.
5188 * target.h (struct target_ops) <process_qsupported>: Change
5189 prototype.
5190 (target_process_qsupported): Adjust.
5191
9a084706
PA
51922015-11-19 Pedro Alves <palves@redhat.com>
5193
5194 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5195 mode.
5196 * configure: Regenerate.
5197
dad44a1f
PA
51982015-11-19 Pedro Alves <palves@redhat.com>
5199
5200 * configure: Regenerate.
5201
231c0592
YQ
52022015-11-19 Yao Qi <yao.qi@linaro.org>
5203
5204 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5205 type to uint32_t.
5206
6c1c9a8b
YQ
52072015-11-19 Yao Qi <yao.qi@linaro.org>
5208
5209 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5210 (struct aarch64_operand): Move enum out.
5211
9caa3311
YQ
52122015-11-19 Yao Qi <yao.qi@linaro.org>
5213
5214 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5215 struct user_fpsimd_state *.
5216 (aarch64_store_fpregset): Likewise.
5217
6a69a054
YQ
52182015-11-19 Yao Qi <yao.qi@linaro.org>
5219
5220 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5221 struct user_pt_regs *.
5222 (aarch64_store_gregset): Likewise.
5223
1798301e
PA
52242015-11-18 Pedro Alves <palves@redhat.com>
5225
5226 * Makefile.in (all_object_files): Add $IPA_OBJS.
5227
ce7715e2
PA
52282015-11-17 Pedro Alves <palves@redhat.com>
5229
5230 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5231 GDB_SIGNAL_0 and gdb_signal_to_string.
5232
c0879059
PA
52332015-11-17 Pedro Alves <palves@redhat.com>
5234
5235 * win32-low.c (handle_output_debug_string): Remove parameter.
5236 (win32_kill): Remove our_status local and adjust call to
5237 handle_output_debug_string.
5238 (get_child_debug_event): Adjust call to
5239 handle_output_debug_string.
5240
1996e237
SM
52412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5242
5243 * linux-mips-low.c (mips_fill_gregset): Add cast.
5244 (mips_store_gregset): Likewise.
5245 (mips_fill_fpregset): Likewise.
5246 (mips_store_fpregset): Likewise.
5247
cbec665b
SM
52482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5249
5250 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5251 priv.
5252
eb3e3c67
SM
52532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5254
5255 * linux-mips-low.c (mips_linux_new_thread): Change type of
5256 watch_type to enum target_hw_bp_type.
5257
171de4b8
SM
52582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5259
5260 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5261 Change return type to arm_hwbp_type.
5262
04248ead
SM
52632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5264
5265 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5266 (arm_store_gregset): Likewise.
5267 * linux-arm-low.c (arm_get_hwcap): Likewise.
5268 (arm_read_description): Likewise.
5269
04b3479c
SM
52702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5271
5272 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5273
2bc84e8a
SM
52742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5275
5276 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5277 (ppc_fill_vsxregset): Likewise.
5278 (ppc_store_vsxregset): Likewise.
5279 (ppc_fill_vrregset): Likewise.
5280 (ppc_store_vrregset): Likewise.
5281 (ppc_fill_evrregset): Likewise.
5282 (ppc_store_evrregset): Likewise.
5283
e6c5bb05
SM
52842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5285
5286 * linux-ppc-low.c (ppc_usrregs_info): Remove
5287 forward-declaration.
5288 (ppc_arch_setup): Move lower in file.
5289
7ea45d72
SM
52902015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5291
5292 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5293 (ps_pdwrite): Likewise.
5294
69291610
HW
52952015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5296
5297 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5298 to after assert checks.
5299
b42945fd
SM
53002015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5301
5302 * proc-service.c (ps_pdread): Add/adjust casts.
5303 (ps_pdwrite): Add/adjust casts.
5304
d6f85c84
SM
53052015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5306
5307 * server.c (handle_search_memory_1): Cast return value of
5308 memmem.
5309
f98cd059
SM
53102015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5311
5312 * server.c (write_qxfer_response): Change type of data to
5313 gdb_byte *.
5314
d2412fa5
PA
53152015-10-29 Pedro Alves <palves@redhat.com>
5316
5317 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5318
c17414a2
PA
53192015-10-29 Pedro Alves <palves@redhat.com>
5320
5321 * tracepoint.c (clear_installed_tracepoints): Add casts.
5322
e053fbc4
PA
53232015-10-29 Pedro Alves <palves@redhat.com>
5324
5325 * server.c (handle_v_cont, process_serial_event): Add enum
5326 gdb_signal casts to signal parsing code.
5327
add67df8
PA
53282015-10-29 Pedro Alves <palves@redhat.com>
5329
5330 * linux-low.h (NULL_REGSET): Define.
5331 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5332 * linux-arm-low.c (arm_regsets): Likewise.
5333 * linux-crisv32-low.c (cris_regsets): Likewise.
5334 * linux-m68k-low.c (m68k_regsets): Likewise.
5335 * linux-mips-low.c (mips_regsets): Likewise.
5336 * linux-nios2-low.c (nios2_regsets): Likewise.
5337 * linux-ppc-low.c (ppc_regsets): Likewise.
5338 * linux-s390-low.c (s390_regsets): Likewise.
5339 * linux-sh-low.c (sh_regsets): Likewise.
5340 * linux-sparc-low.c (sparc_regsets): Likewise.
5341 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5342 * linux-tile-low.c (tile_regsets): Likewise.
5343 * linux-x86-low.c (x86_regsets): Likewise.
5344 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5345
50bc912a
PA
53462015-10-29 Pedro Alves <palves@redhat.com>
5347
5348 * linux-low.h (NULL_REGSET): Define.
5349 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5350 * linux-arm-low.c (arm_regsets): Likewise.
5351 * linux-crisv32-low.c (cris_regsets): Likewise.
5352 * linux-m68k-low.c (m68k_regsets): Likewise.
5353 * linux-mips-low.c (mips_regsets): Likewise.
5354 * linux-nios2-low.c (nios2_regsets): Likewise.
5355 * linux-ppc-low.c (ppc_regsets): Likewise.
5356 * linux-s390-low.c (s390_regsets): Likewise.
5357 * linux-sh-low.c (sh_regsets): Likewise.
5358 * linux-sparc-low.c (sparc_regsets): Likewise.
5359 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5360 * linux-tile-low.c (tile_regsets): Likewise.
5361 * linux-x86-low.c (x86_regsets): Likewise.
5362 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5363
682b2546
DE
53642015-10-26 Doug Evans <dje@google.com>
5365
5366 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5367
963843d4
DE
53682015-10-26 Doug Evans <dje@google.com>
5369
5370 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5371
d41401ac
DE
53722015-10-26 Doug Evans <dje@google.com>
5373
5374 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5375 for debug_printf.
5376 (attach_thread, find_new_threads_callback): Ditto.
5377
3db28855
AT
53782015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5379
5380 * mem-break.h (set_breakpoint_data): Remove.
5381
fb78e89c
AT
53822015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5383
5384 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5385 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5386 (initialize_low): Remove set_breakpoint_data call.
5387 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5388 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5389 (initialize_low): Remove set_breakpoint_data call.
5390 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5391 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5392 (initialize_low): Remove set_breakpoint_data call.
5393
2e6ee069
AT
53942015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5395
5396 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5397 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5398 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5399 * target.h (target_breakpoint_kind_from_pc): New macro.
5400
1652a986
AT
54012015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5402
5403 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5404 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5405 the default breakpoint kind.
5406
abeead09
AT
54072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5408
5409 * linux-arm-low.c (arm_supports_z_point_type): Add software
5410 breakpoint support.
5411
b0b4b501
AT
54122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5413
5414 * linux-arm-low.c: Refactor breakpoint definitions.
5415 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5416 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5417
8689682c
AT
54182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5419
5420 * Makefile.in: Add arm.c/o.
5421 * configure.srv: Likewise.
5422 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5423 (arm_breakpoint_kind_from_pc): New function.
5424 (arm_sw_breakpoint_from_kind): Return proper kind.
5425 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5426
27165294
AT
54272015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5428
5429 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5430 removal.
5431 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5432 (struct raw_breakpoint) <size>: Remove.
5433 (struct raw_breakpoint) <kind>: Add.
5434 (bp_size): New function.
5435 (bp_opcode): Likewise.
5436 (find_raw_breakpoint_at): Adjust for kind.
5437 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5438 (remove_memory_breakpoint): Adjust for kind call bp_size.
5439 (set_raw_breakpoint_at): Adjust for kind.
5440 (set_breakpoint): Likewise.
5441 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5442 (delete_raw_breakpoint): Adjust for kind.
5443 (delete_breakpoint): Likewise.
5444 (find_gdb_breakpoint): Likewise.
5445 (set_gdb_breakpoint_1): Likewise.
5446 (set_gdb_breakpoint): Likewise.
5447 (delete_gdb_breakpoint_1): Likewise.
5448 (delete_gdb_breakpoint): Likewise.
5449 (uninsert_raw_breakpoint): Likewise.
5450 (reinsert_raw_breakpoint): Likewise.
5451 (set_breakpoint_data): Remove.
5452 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5453 (check_mem_read): Adjust for kind call bp_size.
5454 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5455 (clone_one_breakpoint): Adjust for kind.
5456 * mem-break.h (set_gdb_breakpoint): Likewise.
5457 (delete_gdb_breakpoint): Likewise.
5458 * server.c (process_serial_event): Likewise.
5459
dd373349
AT
54602015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5461
5462 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5463 (struct linux_target_ops) <breakpoint>: Remove.
5464 (struct linux_target_ops) <breakpoint_len>: Remove.
5465 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5466 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5467 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5468 (arm_sw_breakpoint_from_kind): New function.
5469 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5470 (struct linux_target_ops) <breakpoint>: Remove.
5471 (struct linux_target_ops) <breakpoint_len>: Remove.
5472 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5473 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5474 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5475 (struct linux_target_ops) <breakpoint>: Remove.
5476 (struct linux_target_ops) <breakpoint_len>: Remove.
5477 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5478 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5479 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5480 (struct linux_target_ops) <breakpoint>: Remove.
5481 (struct linux_target_ops) <breakpoint_len>: Remove.
5482 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5483 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5484 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5485 and sw_breakpoint_from_kind to increment the pc.
5486 (linux_breakpoint_kind_from_pc): New function.
5487 (linux_sw_breakpoint_from_kind): New function.
5488 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5489 (initialize_low): Call breakpoint_kind_from_pc and
5490 sw_breakpoint_from_kind to replace breakpoint_data/len.
5491 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5492 New field.
5493 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5494 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5495 (struct linux_target_ops) <breakpoint>: Remove.
5496 (struct linux_target_ops) <breakpoint_len>: Remove.
5497 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5498 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5499 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5500 (struct linux_target_ops) <breakpoint>: Remove.
5501 (struct linux_target_ops) <breakpoint_len>: Remove.
5502 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5503 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5504 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5505 (struct linux_target_ops) <breakpoint>: Remove.
5506 (struct linux_target_ops) <breakpoint_len>: Remove.
5507 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5508 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5509 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5510 (struct linux_target_ops) <breakpoint>: Remove.
5511 (struct linux_target_ops) <breakpoint_len>: Remove.
5512 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5513 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5514 * linux-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5530 (struct linux_target_ops) <breakpoint>: Remove.
5531 (struct linux_target_ops) <breakpoint_len>: Remove.
5532 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5533 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5534 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5535 (struct linux_target_ops) <breakpoint>: Remove.
5536 (struct linux_target_ops) <breakpoint_len>: Remove.
5537 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5538 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5539 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5540 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5541 (struct linux_target_ops) <breakpoint>: Remove.
5542 (struct linux_target_ops) <breakpoint_len>: Remove.
5543 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5544 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5545 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5546 (struct linux_target_ops) <breakpoint>: Remove.
5547 (struct linux_target_ops) <breakpoint_len>: Remove.
5548 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5549 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5550
4cd98a19
AT
55512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5552
5553 * linux-cris-low.c (cris_get_pc): Remove void arg.
5554
774ee6d2
AR
55552015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5556
5557 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5558 variable name.
5559
833dcd29
AR
55602015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5561
5562 * inferiors.c (thread_pid_matches_callback): New function.
5563 (find_thread_process): New function.
5564 (remove_thread): Reset current_thread.
5565 (remove_process): Assert threads have been removed first.
5566
8d689ee5
YQ
55672015-10-15 Yao Qi <yao.qi@linaro.org>
5568
5569 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5570 if it is 3.
5571 (aarch64_remove_point): Likewise.
5572 * regcache.c (regcache_register_size): New function.
5573
1c2e1515
YQ
55742015-10-12 Yao Qi <yao.qi@linaro.org>
5575
5576 * linux-aarch64-low.c: Update all callers as emit_load_store
5577 is renamed to aarch64_emit_load_store.
5578
e1c587c3
YQ
55792015-10-12 Yao Qi <yao.qi@linaro.org>
5580
5581 * linux-aarch64-low.c: Update all callers of function renaming
5582 from emit_insn to aarch64_emit_insn.
5583
b6542f81
YQ
55842015-10-12 Yao Qi <yao.qi@linaro.org>
5585
5586 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5587 arch/aarch64-insn.h.
5588 (struct aarch64_memory_operand): Likewise.
5589 (ENCODE): Likewise.
5590 (emit_insn): Move to arch/aarch64-insn.c.
5591 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5592 (emit_load_store): Move to arch/aarch64-insn.c.
5593 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5594 (can_encode_int32): Remove.
5595
246994ce
YQ
55962015-10-12 Yao Qi <yao.qi@linaro.org>
5597
5598 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5599 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5600 (aarch64_relocate_instruction): Likewise.
5601 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5602 (struct aarch64_insn_visitor): Likewise.
5603
0badd99f
YQ
56042015-10-12 Yao Qi <yao.qi@linaro.org>
5605
5606 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5607 (struct aarch64_insn_visitor): New.
5608 (struct aarch64_insn_relocation_data): New.
5609 (aarch64_ftrace_insn_reloc_b): New function.
5610 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5611 (aarch64_ftrace_insn_reloc_cb): Likewise.
5612 (aarch64_ftrace_insn_reloc_tb): Likewise.
5613 (aarch64_ftrace_insn_reloc_adr): Likewise.
5614 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5615 (aarch64_ftrace_insn_reloc_others): Likewise.
5616 (visitor): New.
5617 (aarch64_relocate_instruction): Use visitor.
5618
dfaffe9d
YQ
56192015-10-12 Yao Qi <yao.qi@linaro.org>
5620
5621 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5622 int. Add argument buf.
5623 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5624 aarch64_relocate_instruction.
5625
70b439f0
YQ
56262015-10-12 Yao Qi <yao.qi@linaro.org>
5627
5628 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5629 argument insn. Remove local variable insn. Don't call
5630 target_read_uint32.
5631 (aarch64_install_fast_tracepoint_jump_pad): Call
5632 target_read_uint32.
5633
7781c06f
YQ
56342015-09-30 Yao Qi <yao.qi@linaro.org>
5635
5636 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5637 (emit_load_store_pair): Likewise.
5638
9a3c8263
SM
56392015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5640
5641 * dll.c (match_dll): Add cast(s).
5642 (unloaded_dll): Likewise.
5643 * linux-low.c (second_thread_of_pid_p): Likewise.
5644 (delete_lwp_callback): Likewise.
5645 (count_events_callback): Likewise.
5646 (select_event_lwp_callback): Likewise.
5647 (linux_set_resume_request): Likewise.
5648 * server.c (accumulate_file_name_length): Likewise.
5649 (emit_dll_description): Likewise.
5650 (handle_qxfer_threads_worker): Likewise.
5651 (visit_actioned_threads): Likewise.
5652 * thread-db.c (any_thread_of): Likewise.
5653 * tracepoint.c (same_process_p): Likewise.
5654 (match_blocktype): Likewise.
5655 (build_traceframe_info_xml): Likewise.
5656
224c3ddb
SM
56572015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5658
5659 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5660 assignment.
5661 (gdb_unparse_agent_expr): Likewise.
5662 * hostio.c (require_data): Likewise.
5663 (handle_pread): Likewise.
5664 * linux-low.c (disable_regset): Likewise.
5665 (fetch_register): Likewise.
5666 (store_register): Likewise.
5667 (get_dynamic): Likewise.
5668 (linux_qxfer_libraries_svr4): Likewise.
5669 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5670 (set_fast_tracepoint_jump): Likewise.
5671 (uninsert_fast_tracepoint_jumps_at): Likewise.
5672 (reinsert_fast_tracepoint_jumps_at): Likewise.
5673 (validate_inserted_breakpoint): Likewise.
5674 (clone_agent_expr): Likewise.
5675 * regcache.c (init_register_cache): Likewise.
5676 * remote-utils.c (putpkt_binary_1): Likewise.
5677 (decode_M_packet): Likewise.
5678 (decode_X_packet): Likewise.
5679 (look_up_one_symbol): Likewise.
5680 (relocate_instruction): Likewise.
5681 (monitor_output): Likewise.
5682 * server.c (handle_search_memory): Likewise.
5683 (handle_qxfer_exec_file): Likewise.
5684 (handle_qxfer_libraries): Likewise.
5685 (handle_qxfer): Likewise.
5686 (handle_query): Likewise.
5687 (handle_v_cont): Likewise.
5688 (handle_v_run): Likewise.
5689 (captured_main): Likewise.
5690 * target.c (write_inferior_memory): Likewise.
5691 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5692 * tracepoint.c (init_trace_buffer): Likewise.
5693 (add_tracepoint_action): Likewise.
5694 (add_traceframe): Likewise.
5695 (add_traceframe_block): Likewise.
5696 (cmd_qtdpsrc): Likewise.
5697 (cmd_qtdv): Likewise.
5698 (cmd_qtstatus): Likewise.
5699 (response_source): Likewise.
5700 (response_tsv): Likewise.
5701 (cmd_qtnotes): Likewise.
5702 (gdb_collect): Likewise.
5703 (initialize_tracepoint): Likewise.
5704
afbe19f8
PL
57052015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5706
5707 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5708 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5709 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5710 <NOP>: New.
5711 (enum aarch64_condition_codes): New enum.
5712 (w0): New static global.
5713 (fp): Likewise.
5714 (lr): Likewise.
5715 (struct aarch64_memory_operand) <type>: New
5716 MEMORY_OPERAND_POSTINDEX type.
5717 (postindex_memory_operand): New helper function.
5718 (emit_ret): New function.
5719 (emit_load_store_pair): New function, factored out of emit_stp
5720 with support for MEMORY_OPERAND_POSTINDEX.
5721 (emit_stp): Rewrite using emit_load_store_pair.
5722 (emit_ldp): New function.
5723 (emit_load_store): Likewise.
5724 (emit_ldr): Mention post-index instruction in comment.
5725 (emit_ldrh): New function.
5726 (emit_ldrb): New function.
5727 (emit_ldrsw): Mention post-index instruction in comment.
5728 (emit_str): Likewise.
5729 (emit_subs): New function.
5730 (emit_cmp): Likewise.
5731 (emit_and): Likewise.
5732 (emit_orr): Likewise.
5733 (emit_orn): Likewise.
5734 (emit_eor): Likewise.
5735 (emit_mvn): Likewise.
5736 (emit_lslv): Likewise.
5737 (emit_lsrv): Likewise.
5738 (emit_asrv): Likewise.
5739 (emit_mul): Likewise.
5740 (emit_sbfm): Likewise.
5741 (emit_sbfx): Likewise.
5742 (emit_ubfm): Likewise.
5743 (emit_ubfx): Likewise.
5744 (emit_csinc): Likewise.
5745 (emit_cset): Likewise.
5746 (emit_nop): Likewise.
5747 (emit_ops_insns): New helper function.
5748 (emit_pop): Likewise.
5749 (emit_push): Likewise.
5750 (aarch64_emit_prologue): New function.
5751 (aarch64_emit_epilogue): Likewise.
5752 (aarch64_emit_add): Likewise.
5753 (aarch64_emit_sub): Likewise.
5754 (aarch64_emit_mul): Likewise.
5755 (aarch64_emit_lsh): Likewise.
5756 (aarch64_emit_rsh_signed): Likewise.
5757 (aarch64_emit_rsh_unsigned): Likewise.
5758 (aarch64_emit_ext): Likewise.
5759 (aarch64_emit_log_not): Likewise.
5760 (aarch64_emit_bit_and): Likewise.
5761 (aarch64_emit_bit_or): Likewise.
5762 (aarch64_emit_bit_xor): Likewise.
5763 (aarch64_emit_bit_not): Likewise.
5764 (aarch64_emit_equal): Likewise.
5765 (aarch64_emit_less_signed): Likewise.
5766 (aarch64_emit_less_unsigned): Likewise.
5767 (aarch64_emit_ref): Likewise.
5768 (aarch64_emit_if_goto): Likewise.
5769 (aarch64_emit_goto): Likewise.
5770 (aarch64_write_goto_address): Likewise.
5771 (aarch64_emit_const): Likewise.
5772 (aarch64_emit_call): Likewise.
5773 (aarch64_emit_reg): Likewise.
5774 (aarch64_emit_pop): Likewise.
5775 (aarch64_emit_stack_flush): Likewise.
5776 (aarch64_emit_zero_ext): Likewise.
5777 (aarch64_emit_swap): Likewise.
5778 (aarch64_emit_stack_adjust): Likewise.
5779 (aarch64_emit_int_call_1): Likewise.
5780 (aarch64_emit_void_call_2): Likewise.
5781 (aarch64_emit_eq_goto): Likewise.
5782 (aarch64_emit_ne_goto): Likewise.
5783 (aarch64_emit_lt_goto): Likewise.
5784 (aarch64_emit_le_goto): Likewise.
5785 (aarch64_emit_gt_goto): Likewise.
5786 (aarch64_emit_ge_got): Likewise.
5787 (aarch64_emit_ops_impl): New static global variable.
5788 (aarch64_emit_ops): New target function, return
5789 &aarch64_emit_ops_impl.
5790 (struct linux_target_ops): Install it.
5791
bb903df0
PL
57922015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5793
5794 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5795 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5796 aarch64-ipa.o.
5797 * linux-aarch64-ipa.c: New file.
5798 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5799 and endian.h.
5800 (aarch64_get_thread_area): New target method.
5801 (extract_signed_bitfield): New helper function.
5802 (aarch64_decode_ldr_literal): New function.
5803 (enum aarch64_opcodes): New enum.
5804 (struct aarch64_register): New struct.
5805 (struct aarch64_operand): New struct.
5806 (x0): New static global.
5807 (x1): Likewise.
5808 (x2): Likewise.
5809 (x3): Likewise.
5810 (x4): Likewise.
5811 (w2): Likewise.
5812 (ip0): Likewise.
5813 (sp): Likewise.
5814 (xzr): Likewise.
5815 (aarch64_register): New helper function.
5816 (register_operand): Likewise.
5817 (immediate_operand): Likewise.
5818 (struct aarch64_memory_operand): New struct.
5819 (offset_memory_operand): New helper function.
5820 (preindex_memory_operand): Likewise.
5821 (enum aarch64_system_control_registers): New enum.
5822 (ENCODE): New macro.
5823 (emit_insn): New helper function.
5824 (emit_b): New function.
5825 (emit_bcond): Likewise.
5826 (emit_cb): Likewise.
5827 (emit_tb): Likewise.
5828 (emit_blr): Likewise.
5829 (emit_stp): Likewise.
5830 (emit_ldp_q_offset): Likewise.
5831 (emit_stp_q_offset): Likewise.
5832 (emit_load_store): Likewise.
5833 (emit_ldr): Likewise.
5834 (emit_ldrsw): Likewise.
5835 (emit_str): Likewise.
5836 (emit_ldaxr): Likewise.
5837 (emit_stxr): Likewise.
5838 (emit_stlr): Likewise.
5839 (emit_data_processing_reg): Likewise.
5840 (emit_data_processing): Likewise.
5841 (emit_add): Likewise.
5842 (emit_sub): Likewise.
5843 (emit_mov): Likewise.
5844 (emit_movk): Likewise.
5845 (emit_mov_addr): Likewise.
5846 (emit_mrs): Likewise.
5847 (emit_msr): Likewise.
5848 (emit_sevl): Likewise.
5849 (emit_wfe): Likewise.
5850 (append_insns): Likewise.
5851 (can_encode_int32_in): New helper function.
5852 (aarch64_relocate_instruction): New function.
5853 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5854 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5855 (struct linux_target_ops): Install aarch64_get_thread_area,
5856 aarch64_install_fast_tracepoint_jump_pad and
5857 aarch64_get_min_fast_tracepoint_insn_len.
5858
787749ea
PL
58592015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5860
5861 * Makefile.in (aarch64-insn.o): New rule.
5862 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5863
9812b2e6
YQ
58642015-09-21 Yao Qi <yao.qi@linaro.org>
5865
5866 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5867
18fe412b
YQ
58682015-09-21 Yao Qi <yao.qi@linaro.org>
5869
5870 * tracepoint.c (max_jump_pad_size): Remove.
5871
a0cc84cd
YQ
58722015-09-18 Yao Qi <yao.qi@linaro.org>
5873
5874 * linux-aarch64-low.c: Don't include sys/uio.h.
5875 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5876
d78908cf
WW
58772015-09-16 Wei-cheng Wang <cole945@gmail.com>
5878
5879 * tracepoint.c (eval_result_type): Change prototype.
5880 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5881
d57e0d50
PA
58822015-09-15 Pedro Alves <palves@redhat.com>
5883
5884 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5885 Check whether to report exec events instead of checking whether
5886 multiprocess is enabled.
5887
5a676acc
PA
58882015-09-15 Pedro Alves <palves@redhat.com>
5889
5890 PR remote/18965
5891 * remote-utils.c (prepare_resume_reply): Merge
5892 TARGET_WAITKIND_VFORK_DONE switch case with the
5893 TARGET_WAITKIND_FORKED case.
5894
7c5d0fad
YQ
58952015-09-15 Yao Qi <yao.qi@linaro.org>
5896
5897 * server.c (handle_query): Check string comparison using
5898 "else if" instead of "if".
5899
750ce8d1
YQ
59002015-09-15 Yao Qi <yao.qi@linaro.org>
5901
5902 * server.c (vCont_supported): New global variable.
5903 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5904 matches. Append ";vContSupported+" to own_buf.
5905 (handle_v_requests): Append ";s;S" to own_buf if target supports
5906 hardware single step or vCont_supported is false.
5907 (capture_main): Set vCont_supported to zero.
5908
70b90b91
YQ
59092015-09-15 Yao Qi <yao.qi@linaro.org>
5910
5911 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5912 it to ...
5913 (linux_supports_hardware_single_step): ... New function.
5914 (linux_target_ops): Update.
5915 * lynx-low.c (lynx_target_ops): Set field
5916 supports_hardware_single_step to target_can_do_hardware_single_step.
5917 * nto-low.c (nto_target_ops): Likewise.
5918 * spu-low.c (spu_target_ops): Likewise.
5919 * win32-low.c (win32_target_ops): Likewise.
5920 * target.c (target_can_do_hardware_single_step): New function.
5921 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5922 Remove. <supports_hardware_single_step>: New field.
5923 (target_supports_conditional_breakpoints): Remove.
5924 (target_supports_hardware_single_step): New macro.
5925 (target_can_do_hardware_single_step): Declare.
5926 * server.c (handle_query): Use target_supports_hardware_single_step
5927 instead of target_supports_conditional_breakpoints.
5928
ade90bde
YQ
59292015-09-15 Yao Qi <yao.qi@linaro.org>
5930
5931 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5932 function.
5933 (struct linux_target_ops the_low_target): Install
5934 aarch64_linux_siginfo_fixup.
5935
94585166
DB
59362015-09-11 Don Breazeal <donb@codesourcery.com>
5937 Luis Machado <lgustavo@codesourcery.com>
5938
5939 * linux-low.c (linux_mourn): Static declaration.
5940 (linux_arch_setup): Move in front of
5941 handle_extended_wait.
5942 (linux_arch_setup_thread): New function.
5943 (handle_extended_wait): Handle exec events. Call
5944 linux_arch_setup_thread. Make event_lwp argument a
5945 pointer-to-a-pointer.
5946 (check_zombie_leaders): Do not check stopped threads.
5947 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5948 (linux_low_filter_event): Add lwp and thread for exec'ing
5949 non-leader thread if leader thread has been deleted.
5950 Refactor code into linux_arch_setup_thread and call it.
5951 Pass child lwp pointer by reference to handle_extended_wait.
5952 (linux_wait_for_event_filtered): Update comment.
5953 (linux_wait_1): Prevent clobbering exec event status.
5954 (linux_supports_exec_events): New function.
5955 (linux_target_ops) <supports_exec_events>: Initialize new member.
5956 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5957 new member.
5958 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5959 * server.c (report_exec_events): New global variable.
5960 (handle_query): Handle qSupported query for exec-events feature.
5961 (captured_main): Initialize report_exec_events.
5962 * server.h (report_exec_events): Declare new global variable.
5963 * target.h (struct target_ops) <supports_exec_events>: New
5964 member.
5965 (target_supports_exec_events): New macro.
5966 * win32-low.c (win32_target_ops) <supports_exec_events>:
5967 Initialize new member.
5968
0568462b
MM
59692015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5970
5971 * linux-low.c (linux_low_enable_btrace): Remove.
5972 (linux_target_ops): Replace linux_low_enable_btrace with
5973 linux_enable_btrace.
5974
39edd165
YQ
59752015-09-03 Yao Qi <yao.qi@linaro.org>
5976
5977 * linux-aarch64-low.c (aarch64_insert_point): Call
5978 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5979 returns true.
5980
1db33b5a
UW
59812015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5982
5983 * linux-low.c (check_stopped_by_breakpoint): Use
5984 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5985
ab290430
PA
59862015-08-27 Pedro Alves <palves@redhat.com>
5987
5988 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5989
8d749320
SM
59902015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5991
6711b7f8
SM
5992 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5993 the XNEW-family equivalent.
8d749320
SM
5994 (compile_bytecodes): Likewise.
5995 * dll.c (loaded_dll): Likewise.
5996 * event-loop.c (append_callback_event): Likewise.
5997 (create_file_handler): Likewise.
5998 (create_file_event): Likewise.
5999 * hostio.c (handle_open): Likewise.
6000 * inferiors.c (add_thread): Likewise.
6001 (add_process): Likewise.
6002 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6003 * linux-arm-low.c (arm_new_process): Likewise.
6004 (arm_new_thread): Likewise.
6005 * linux-low.c (add_to_pid_list): Likewise.
6006 (linux_add_process): Likewise.
6007 (handle_extended_wait): Likewise.
6008 (add_lwp): Likewise.
6009 (enqueue_one_deferred_signal): Likewise.
6010 (enqueue_pending_signal): Likewise.
6011 (linux_resume_one_lwp_throw): Likewise.
6012 (linux_resume_one_thread): Likewise.
6013 (linux_read_memory): Likewise.
6014 (linux_write_memory): Likewise.
6015 * linux-mips-low.c (mips_linux_new_process): Likewise.
6016 (mips_linux_new_thread): Likewise.
6017 (mips_add_watchpoint): Likewise.
6018 * linux-x86-low.c (initialize_low_arch): Likewise.
6019 * lynx-low.c (lynx_add_process): Likewise.
6020 * mem-break.c (set_raw_breakpoint_at): Likewise.
6021 (set_breakpoint): Likewise.
6022 (add_condition_to_breakpoint): Likewise.
6023 (add_commands_to_breakpoint): Likewise.
6024 (clone_agent_expr): Likewise.
6025 (clone_one_breakpoint): Likewise.
6026 * regcache.c (new_register_cache): Likewise.
6027 * remote-utils.c (look_up_one_symbol): Likewise.
6028 * server.c (queue_stop_reply): Likewise.
6029 (start_inferior): Likewise.
6030 (queue_stop_reply_callback): Likewise.
6031 (handle_target_event): Likewise.
6032 * spu-low.c (fetch_ppc_memory): Likewise.
6033 (store_ppc_memory): Likewise.
6034 * target.c (set_target_ops): Likewise.
6035 * thread-db.c (thread_db_load_search): Likewise.
6036 (try_thread_db_load_1): Likewise.
6037 * tracepoint.c (add_tracepoint): Likewise.
6038 (add_tracepoint_action): Likewise.
6039 (create_trace_state_variable): Likewise.
6040 (cmd_qtdpsrc): Likewise.
6041 (cmd_qtro): Likewise.
6042 (add_while_stepping_state): Likewise.
6043 * win32-low.c (child_add_thread): Likewise.
6044 (get_image_name): Likewise.
6045
ed8b7b42
YQ
60462015-08-25 Yao Qi <yao.qi@linaro.org>
6047
6048 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6049
db3cb7cb
YQ
60502015-08-25 Yao Qi <yao.qi@linaro.org>
6051
6052 * Makefile.in (aarch64-linux.o): New rule.
6053 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6054 srv_tgtobj.
6055 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6056 (aarch64_init_debug_reg_state): Make it extern.
6057 (aarch64_linux_prepare_to_resume): Remove.
6058
f6011a1c
YQ
60592015-08-25 Yao Qi <yao.qi@linaro.org>
6060
6061 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6062 lwp_arch_private_info and ptid_of_lwp.
6063
88e2cf7e
YQ
60642015-08-25 Yao Qi <yao.qi@linaro.org>
6065
6066 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6067 Find proc_info by find_process_pid. All callers updated.
6068
5e35436e
YQ
60692015-08-25 Yao Qi <yao.qi@linaro.org>
6070
6071 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6072 Remove.
6073 (debug_reg_change_callback): Remove.
6074 (aarch64_notify_debug_reg_change): Remove.
6075
4a8a7965
YQ
60762015-08-25 Yao Qi <yao.qi@linaro.org>
6077
6078 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6079 Call current_lwp_ptid.
6080
32a271ee
YQ
60812015-08-25 Yao Qi <yao.qi@linaro.org>
6082
6083 * linux-aarch64-low.c (debug_reg_change_callback): Use
6084 debug_printf.
6085
0d51c8d7
YQ
60862015-08-25 Yao Qi <yao.qi@linaro.org>
6087
6088 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6089
31a43dd5
YQ
60902015-08-25 Yao Qi <yao.qi@linaro.org>
6091
6092 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6093
8ee52567
YQ
60942015-08-25 Yao Qi <yao.qi@linaro.org>
6095
6096 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6097 the code.
6098
ff3f0f45
YQ
60992015-08-25 Yao Qi <yao.qi@linaro.org>
6100
6101 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6102 Remove.
6103 (debug_reg_change_callback): Remove argument entry and add argument
6104 lwp. Remove local variable thread. Don't print thread id in the
6105 debugging output. Don't check whether pid of thread equals to pid.
6106 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6107 iterate_over_lwps instead find_inferior.
6108
3d40fbb5
PA
61092015-08-24 Pedro Alves <palves@redhat.com>
6110
6111 * inferiors.c (get_first_process): New function.
6112 * inferiors.h (get_first_process): New declaration.
6113 * remote-utils.c (read_ptid): Default to the first process in the
6114 list, instead of to the current thread's process.
6115
438e1e42
PA
61162015-08-24 Pedro Alves <palves@redhat.com>
6117
6118 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6119 * event-loop.c: Likewise.
6120 * remote-utils.c: Likewise.
6121 * tracepoint.c: Likewise.
6122
a8c6d4fc
PA
61232015-08-24 Pedro Alves <palves@redhat.com>
6124
6125 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6126 ptid_get_lwp.
6127
99b0bb12
PA
61282015-08-21 Pedro Alves <palves@redhat.com>
6129
6130 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6131 instead of literal 1.
6132
f8904751
PA
61332015-08-21 Pedro Alves <palves@redhat.com>
6134
6135 * tdesc.c (default_description): Explicitly zero-initialize.
6136
465a859e
PA
61372015-08-21 Pedro Alves <palves@redhat.com>
6138
6139 PR gdb/18749
6140 * inferiors.c (remove_thread): Discard any pending stop reply for
6141 this thread.
6142 * server.c (remove_all_on_match_pid): Rename to ...
6143 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6144 instead of a pid.
6145 (discard_queued_stop_replies): Change parameter to a ptid. Now
6146 extern.
6147 (handle_v_kill, kill_inferior_callback, captured_main)
6148 (process_serial_event): Adjust.
6149 * server.h (discard_queued_stop_replies): Declare.
6150
f0db101d
PA
61512015-08-21 Pedro Alves <palves@redhat.com>
6152
6153 * linux-low.c (wait_for_sigstop): Always switch to no thread
6154 selected if the previously current thread dies.
6155 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6156 process instead of the current thread's.
6157 * remote-utils.c (input_interrupt): Don't check if there's no
6158 current thread.
6159 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6160 current thread to the general thread fails, error out.
6161 (handle_qxfer_auxv, handle_qxfer_libraries)
6162 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6163 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6164 (handle_query): Check if there's a thread selected instead of
6165 checking whether there's any thread in the thread list.
6166 (handle_qxfer_threads, handle_qxfer_btrace)
6167 (handle_qxfer_btrace_conf): Don't error out early if there's no
6168 thread in the thread list.
6169 (handle_v_cont, myresume): Don't set the current thread to the
6170 continue thread.
6171 (process_serial_event) <Hg handling>: Also set thread_id if the
6172 previous general thread is still alive.
6173 (process_serial_event) <g/G handling>: If setting the current
6174 thread to the general thread fails, error out.
6175 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6176 thread's lwp instead of the current thread's.
6177 * target.c (set_desired_thread): If the desired thread was not
6178 found, leave the current thread pointing to NULL. Return an int
6179 (boolean) indicating success.
6180 * target.h (set_desired_thread): Change return type to int.
6181
40045d91
MF
61822015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6183
6184 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6185 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6186 #includes.
6187 (ps_get_thread_area): New function.
6188
45face3b
GB
61892015-08-19 Gary Benson <gbenson@redhat.com>
6190
6191 * hostio.c (handle_pread): Do not attempt to read more data
6192 than hostio_reply_with_data can fit in a packet.
6193
16d5f642
JB
61942015-08-18 Joel Brobecker <brobecker@adacore.com>
6195
6196 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6197
a738da3a
MF
61982015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6199
6200 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6201
33ebda9d
PA
62022015-08-06 Pedro Alves <palves@redhat.com>
6203
6204 * tracepoint.c (expr_eval_result): Now an int.
6205
a44892be
PA
62062015-08-06 Pedro Alves <palves@redhat.com>
6207
6208 * gdbthread.h (struct regcache): Forward declare.
6209 (struct thread_info) <regcache_data>: Now a struct regcache
6210 pointer.
6211 * inferiors.c (inferior_regcache_data)
6212 (set_inferior_regcache_data): Now work with struct regcache
6213 pointers.
6214 * inferiors.h (struct regcache): Forward declare.
6215 (inferior_regcache_data, set_inferior_regcache_data): Now work
6216 with struct regcache pointers.
6217 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6218 (free_register_cache_thread): Remove struct regcache pointer
6219 casts.
6220
608a1e46
PA
62212015-08-06 Pedro Alves <palves@redhat.com>
6222
6223 * server.c (captured_main): On error, print the exception message
6224 to stderr, and if run_once is set, throw a quit.
6225
f0ce0d3a
PA
62262015-08-06 Pedro Alves <palves@redhat.com>
6227
6228 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6229 the current thread.
6230
bf47e248
PA
62312015-08-06 Pedro Alves <palves@redhat.com>
6232
6233 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6234 reading beyond the passed in buffer length.
6235
b6b9ffcc
PL
62362015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6237
6238 * tracepoint.c (symbol_list) <required>: Remove.
6239
863d01bd
PA
62402015-08-06 Pedro Alves <palves@redhat.com>
6241
6242 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6243 count if stopping and suspending threads.
6244 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6245 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6246 (linux_detach): Complete an ongoing step-over.
6247 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6248 throughout.
6249 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6250 (linux_wait_1): If passing a signal to the inferior after
6251 finishing a step-over, unsuspend and re-resume all lwps. If we
6252 see a single-step event but the thread should be continuing, don't
6253 pass the trap to gdb.
6254 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6255 internal_error instead of gdb_assert.
6256 (enqueue_pending_signal): New function.
6257 (check_ptrace_stopped_lwp_gone): Add debug output.
6258 (start_step_over): Use internal_error instead of gdb_assert.
6259 (complete_ongoing_step_over): New function.
6260 (linux_resume_one_thread): Don't resume a suspended thread.
6261 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6262 it stepping.
6263
00db26fa
PA
62642015-08-06 Pedro Alves <palves@redhat.com>
6265
6266 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6267 (linux_thread_alive): Use lwp_is_marked_dead.
6268 (extended_event_reported): Delete.
6269 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6270 instead of extended_event_reported.
6271 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6272 as well.
6273 (lwp_is_marked_dead): New function.
6274 (lwp_running): Use lwp_is_marked_dead.
6275 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6276 comment.
6277
ad071a30
PA
62782015-08-06 Pedro Alves <palves@redhat.com>
6279
6280 * linux-low.c (linux_wait_1): Move fork event output out of the
6281 !report_to_gdb check. Pass event_child->waitstatus to
6282 target_waitstatus_to_string instead of ourstatus.
6283
524b57e6
YQ
62842015-08-04 Yao Qi <yao.qi@linaro.org>
6285
6286 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6287 if current_thread is 32 bit.
6288
6085d6f6
YQ
62892015-08-04 Yao Qi <yao.qi@linaro.org>
6290
6291 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6292 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6293 * server.c (extended_protocol): Remove "static".
6294 * server.h (extended_protocol): Declare it.
6295
8a7e4587
YQ
62962015-08-04 Yao Qi <yao.qi@linaro.org>
6297
6298 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6299 both aarch64 and aarch32.
6300 (aarch64_set_pc): Likewise.
6301
3b53ae99
YQ
63022015-08-04 Yao Qi <yao.qi@linaro.org>
6303
6304 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6305 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6306 arm-with-neon.xml to srv_xmlfiles.
6307 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6308 (is_64bit_tdesc): New function.
6309 (aarch64_linux_read_description): New function.
6310 (aarch64_arch_setup): Call aarch64_linux_read_description.
6311 (regs_info): Rename to regs_info_aarch64.
6312 (aarch64_regs_info): Return right regs_info.
6313 (initialize_low_arch): Call initialize_low_arch_aarch32.
6314
bd9e6534
YQ
63152015-08-04 Yao Qi <yao.qi@linaro.org>
6316
6317 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6318 * linux-aarch32-low.c: New file.
6319 * linux-aarch32-low.h: New file.
6320 * linux-arm-low.c (arm_fill_gregset): Move it to
6321 linux-aarch32-low.c.
6322 (arm_store_gregset): Likewise.
6323 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6324 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6325 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6326 (regs_info): Rename to regs_info_arm.
6327 (arm_regs_info): Return regs_info_aarch32 if
6328 have_ptrace_getregset is 1 and target description is
6329 arm_with_neon or arm_with_vfpv3.
6330 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6331 Call initialize_low_arch_aarch32 instead.
6332
ded48a5e
YQ
63332015-08-04 Yao Qi <yao.qi@linaro.org>
6334
6335 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6336 * linux-low.c: ... here.
6337 * linux-low.h (have_ptrace_getregset): Declare it.
6338
96e9210f
PA
63392015-08-04 Pedro Alves <palves@redhat.com>
6340
6341 * thread-db.c (struct thread_db): Use new typedefs.
6342 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6343 CHK calls.
6344 (disable_thread_event_reporting): Cast result of dlsym to
6345 destination function pointer type.
6346 (thread_db_mourn): Use td_ta_delete_ftype.
6347
af60a1ef
SL
63482015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6349
6350 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6351 arch variant.
6352 (CDX_BREAKPOINT): Define for R2.
6353 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6354 (the_low_target): Add comments.
6355
e8b41681
YQ
63562015-07-30 Yao Qi <yao.qi@linaro.org>
6357
6358 * linux-arm-low.c (arm_hwcap): Remove it.
6359 (arm_read_description): New local variable arm_hwcap. Don't
6360 set arm_hwcap to zero.
6361
89abb039
YQ
63622015-07-30 Yao Qi <yao.qi@linaro.org>
6363
6364 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6365 Use regcache->tdesc instead.
6366 (arm_store_wmmxregset): Likewise.
6367 (arm_fill_vfpregset): Likewise.
6368 (arm_store_vfpregset): Likewise.
6369
deca266c
YQ
63702015-07-30 Yao Qi <yao.qi@linaro.org>
6371
6372 * linux-arm-low.c: Include arch/arm.h.
6373 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6374 (arm_store_gregset): Likewise.
6375
aa58a496
SM
63762015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6377
6378 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6379 ptrace's 4th parameter.
6380
50904b25
YQ
63812015-07-27 Yao Qi <yao.qi@linaro.org>
6382
6383 * configure.srv (case aarch64*-*-linux*): Don't set
6384 srv_linux_usrregs.
6385
5826e159
PA
63862015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6387
6388 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6389 sys/ptrace.h.
6390 * linux-arm-low.c: Likewise.
6391 * linux-cris-low.c: Likewise.
6392 * linux-crisv32-low.c: Likewise.
6393 * linux-low.c: Likewise.
6394 * linux-m68k-low.c: Likewise.
6395 * linux-mips-low.c: Likewise.
6396 * linux-nios2-low.c: Likewise.
6397 * linux-s390-low.c: Likewise.
6398 * linux-sparc-low.c: Likewise.
6399 * linux-tic6x-low.c: Likewise.
6400 * linux-tile-low.c: Likewise.
6401 * linux-x86-low.c: Likewise.
6402
54019719
PA
64032015-07-24 Pedro Alves <palves@redhat.com>
6404
6405 * config.in: Regenerate.
6406 * configure: Regenerate.
6407
eb7aa561
PA
64082015-07-24 Pedro Alves <palves@redhat.com>
6409
6410 * acinclude.m4: Include ../ptrace.m4.
6411 * configure.ac: Call GDB_AC_PTRACE.
6412 * config.in, configure: Regenerate.
6413
55d7b841
YQ
64142015-07-24 Yao Qi <yao.qi@linaro.org>
6415
6416 * linux-low.c (linux_create_inferior): Remove setting to
6417 proc->priv->new_inferior.
6418 (linux_attach): Likewise.
6419 (linux_low_filter_event): Likewise.
6420 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6421
c06cbd92
YQ
64222015-07-24 Yao Qi <yao.qi@linaro.org>
6423
6424 * linux-low.c (linux_arch_setup): New function.
6425 (linux_low_filter_event): If proc->tdesc is NULL and
6426 proc->attached is true, call the_low_target.arch_setup.
6427 Otherwise, keep status pending, and return.
6428 (linux_resume_one_lwp_throw): Don't call get_pc if
6429 thread->while_stepping isn't NULL. Don't call
6430 get_thread_regcache if proc->tdesc is NULL.
6431 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6432 (linux_target_ops): Install arch_setup.
6433 * server.c (start_inferior): Call the_target->arch_setup.
6434 * target.h (struct target_ops) <arch_setup>: New field.
6435 (target_arch_setup): New marco.
6436 * lynx-low.c (lynx_target_ops): Update.
6437 * nto-low.c (nto_target_ops): Update.
6438 * spu-low.c (spu_target_ops): Update.
6439 * win32-low.c (win32_target_ops): Update.
6440
5ae3ebba
YQ
64412015-07-24 Yao Qi <yao.qi@linaro.org>
6442
6443 * linux-low.c (linux_add_process): Don't set
6444 proc->priv->new_inferior.
6445 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6446 (linux_attach): Likewise.
6447
eb97750b
YQ
64482015-07-24 Yao Qi <yao.qi@linaro.org>
6449
6450 * server.c (start_inferior): Code refactor.
6451
51aee833
YQ
64522015-07-24 Yao Qi <yao.qi@linaro.org>
6453
6454 * server.c (process_serial_event): Set general_thread.
6455
af1b22f3
YQ
64562015-07-21 Yao Qi <yao.qi@linaro.org>
6457
6458 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6459 aarch64_linux_get_debug_reg_capacity.
6460
554717a3
YQ
64612015-07-17 Yao Qi <yao.qi@linaro.org>
6462
6463 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6464 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6465 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6466 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6467 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6468 (AARCH64_HWP_ALIGNMENT): Likewise.
6469 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6470 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6471 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6472 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6473 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6474 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6475 (struct aarch64_debug_reg_state): Likewise.
6476 (struct arch_lwp_info): Likewise.
6477 (aarch64_align_watchpoint): Likewise.
6478 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6479 (aarch64_watchpoint_length): Likewise.
6480 (aarch64_point_encode_ctrl_reg): Likewise
6481 (aarch64_point_is_aligned): Likewise.
6482 (aarch64_align_watchpoint): Likewise.
6483 (aarch64_linux_set_debug_regs):
6484 (aarch64_dr_state_insert_one_point): Likewise.
6485 (aarch64_dr_state_remove_one_point): Likewise.
6486 (aarch64_handle_breakpoint): Likewise.
6487 (aarch64_handle_aligned_watchpoint): Likewise.
6488 (aarch64_handle_unaligned_watchpoint): Likewise.
6489 (aarch64_handle_watchpoint): Likewise.
6490
c67ca4de
YQ
64912015-07-17 Yao Qi <yao.qi@linaro.org>
6492
6493 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6494 and don't aarch64_get_debug_reg_state. All callers update.
6495 (aarch64_handle_aligned_watchpoint): Likewise.
6496 (aarch64_handle_unaligned_watchpoint): Likewise.
6497 (aarch64_handle_watchpoint): Likewise.
6498 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6499 (aarch64_remove_point): Likewise.
6500
25abf979
YQ
65012015-07-17 Yao Qi <yao.qi@linaro.org>
6502
6503 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6504 debug_printf.
6505 (aarch64_handle_unaligned_watchpoint): Likewise.
6506
db1ff28b
JK
65072015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6508
6509 Revert the previous 3 commits:
6510 Move gdb_regex* to common/
6511 Move linux_find_memory_regions_full & co.
6512 gdbserver build-id attribute generator
6513
700ca40f
JK
65142015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6515 Jan Kratochvil <jan.kratochvil@redhat.com>
6516
6517 gdbserver build-id attribute generator.
6518 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6519 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6520 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6521 (find_phdr): New.
6522 (get_dynamic): Use find_pdhr to traverse program headers.
6523 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6524 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6525 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6526 (get_hex_build_id): New.
6527 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6528 to reply XML document.
6529
9904185c
JK
65302015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6531 Jan Kratochvil <jan.kratochvil@redhat.com>
6532
6533 * target.c: Include target/target-utils.h and fcntl.h.
6534 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6535 (target_fileio_read_stralloc): New functions.
6536
6e5b4429
JK
65372015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6538
6539 * Makefile.in (OBS): Add gdb_regex.o.
6540 (gdb_regex.o): New.
6541 * config.in: Rebuilt.
6542 * configure: Rebuilt.
6543
ddc98fbf
JK
65442015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6545 Jan Kratochvil <jan.kratochvil@redhat.com>
6546
6547 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6548 * Makefile.in (OBS): Add target-utils.o.
6549 (linux-maps.o, target-utils.o): New.
6550 * configure.srv (srv_linux_obj): Add linux-maps.o.
6551
e57bb7a0
PL
65522015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6553
6554 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6555 function, return 1.
6556 (the_low_target): Install it.
6557
586b02a9
PA
65582015-07-14 Pedro Alves <palves@redhat.com>
6559
6560 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6561 Instead, ignore ECHILD, and throw an error for other errnos.
6562
58c1b36c
PA
65632015-07-10 Pedro Alves <palves@redhat.com>
6564
6565 * event-loop.c (struct callback_event) <data>: Change type to
6566 gdb_client_data instance instead of gdb_client_data pointer.
6567 (append_callback_event): Adjust.
6568
421530db
PL
65692015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6570
6571 * linux-aarch64-low.c: Add comments for each linux_target_ops
6572 method. Remove comments already covered in target_ops and
6573 linux_target_ops definitions.
6574 (the_low_target): Add comments for each unimplemented method.
6575
c2d65f38
YQ
65762015-07-09 Yao Qi <yao.qi@linaro.org>
6577
6578 * linux-aarch64-low.c (aarch64_regmap): Remove.
6579 (aarch64_usrregs_info): Remove.
6580 (regs_info): Set field usrregs to NULL.
6581
b20a6524
MM
65822015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6583
6584 * linux-low.c: Include "rsp-low.h"
6585 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6586 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6587 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6588 (handle_btrace_enable_pt): New.
6589 (handle_btrace_general_set): Support "pt".
6590 (handle_btrace_conf_general_set): Support "pt:size".
6591
96c97461
PL
65922015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6593
6594 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6595 Z_PACKET_SW_BP.
6596
37d66942
PL
65972015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6598
6599 * linux-aarch64-low.c: Remove comment about endianness.
6600 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6601 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6602 memcmp.
6603
dc06243f
GB
66042015-06-24 Gary Benson <gbenson@redhat.com>
6605
6606 * linux-i386-ipa.c (stdint.h): Do not include.
6607 * lynx-i386-low.c (stdint.h): Likewise.
6608 * lynx-ppc-low.c (stdint.h): Likewise.
6609 * mem-break.c (stdint.h): Likewise.
6610 * thread-db.c (stdint.h): Likewise.
6611 * tracepoint.c (stdint.h): Likewise.
6612 * win32-low.c (stdint.h): Likewise.
6613
124e13d9
SM
66142015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6615
6616 * server.c (write_qxfer_response): Update call to
6617 remote_escape_output.
6618
909c2cda
JK
66192015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6620 Jan Kratochvil <jan.kratochvil@redhat.com>
6621
6622 Merge multiple hex conversions.
6623 * gdbreplay.c (tohex): Rename to 'fromhex'.
6624 (logchar): Use fromhex.
6625
24c05f46
JK
66262015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6627
6628 * server.c (handle_qxfer_libraries): Set `version' attribute for
6629 <library-list>.
6630
14d2069a
GB
66312015-06-10 Gary Benson <gbenson@redhat.com>
6632
6633 * target.h (struct target_ops) <multifs_open>: New field.
6634 <multifs_unlink>: Likewise.
6635 <multifs_readlink>: Likewise.
6636 * linux-low.c (nat/linux-namespaces.h): New include.
6637 (linux_target_ops): Initialize the_target->multifs_open,
6638 the_target->multifs_unlink and the_target->multifs_readlink.
6639 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6640 * hostio.c (hostio_fs_pid): New static variable.
6641 (hostio_handle_new_gdb_connection): New function.
6642 (handle_setfs): Likewise.
6643 (handle_open): Use the_target->multifs_open as appropriate.
6644 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6645 (handle_readlink): Use the_target->multifs_readlink as
6646 appropriate.
6647 (handle_vFile): Handle vFile:setfs packets.
6648 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6649 after target_handle_new_gdb_connection.
6650
4b8b5e72
GB
66512015-06-10 Gary Benson <gbenson@redhat.com>
6652
6653 * configure.ac (AC_CHECK_FUNCS): Add setns.
6654 * config.in: Regenerate.
6655 * configure: Likewise.
6656 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6657 (linux-namespaces.o): New rule.
6658 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6659
3ac2e371
GB
66602015-06-09 Gary Benson <gbenson@redhat.com>
6661
6662 * hostio.c (handle_open): Process mode argument with
6663 fileio_to_host_mode.
6664
ca9b78ce
YQ
66652015-06-01 Yao Qi <yao.qi@linaro.org>
6666
6667 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6668 * linux-x86-low.c: Likewise.
6669
bfacd19d
DB
66702015-05-28 Don Breazeal <donb@codesourcery.com>
6671
6672 * linux-low.c (handle_extended_wait): Initialize
6673 thread_info.last_resume_kind for new fork children.
6674
452003ef
PA
66752015-05-15 Pedro Alves <palves@redhat.com>
6676
6677 * target.h (target_handle_new_gdb_connection): Rewrite using if
6678 wrapped in do/while.
6679
1041a03c
JB
66802015-05-14 Joel Brobecker <brobecker@adacore.com>
6681
6682 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6683 * configure, config.in: Regenerate.
6684 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6685 Declare typedef.
6686
c269dbdb
DB
66872015-05-12 Don Breazeal <donb@codesourcery.com>
6688
6689 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6690 PTRACE_EVENT_VFORK_DONE.
6691 (linux_low_ptrace_options, extended_event_reported): Add vfork
6692 events.
6693 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6694 and "vforkdone" for RSP 'T' Stop Reply Packet.
6695 * server.h (report_vfork_events): Declare
6696 global variable.
6697
3a8a0396
DB
66982015-05-12 Don Breazeal <donb@codesourcery.com>
6699
6700 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6701 (the_low_target) <new_fork>: Initialize new member.
6702 * linux-arm-low.c (arm_new_fork): New function.
6703 (the_low_target) <new_fork>: Initialize new member.
6704 * linux-low.c (handle_extended_wait): Call new target function
6705 new_fork.
6706 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6707 * linux-mips-low.c (mips_add_watchpoint): New function
6708 extracted from mips_insert_point.
6709 (the_low_target) <new_fork>: Initialize new member.
6710 (mips_linux_new_fork): New function.
6711 (mips_insert_point): Call mips_add_watchpoint.
6712 * linux-x86-low.c (x86_linux_new_fork): New function.
6713 (the_low_target) <new_fork>: Initialize new member.
6714
de0d863e
DB
67152015-05-12 Don Breazeal <donb@codesourcery.com>
6716
6717 * linux-low.c (handle_extended_wait): Implement return value,
6718 rename argument 'event_child' to 'event_lwp', handle
6719 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6720 (linux_low_ptrace_options): New function.
6721 (linux_low_filter_event): Call linux_low_ptrace_options,
6722 use different argument fo linux_enable_event_reporting,
6723 use return value from handle_extended_wait.
6724 (extended_event_reported): New function.
6725 (linux_wait_1): Call extended_event_reported and set
6726 status to report fork events.
6727 (linux_write_memory): Add pid to debug message.
6728 (reset_lwp_ptrace_options_callback): New function.
6729 (linux_handle_new_gdb_connection): New function.
6730 (linux_target_ops): Initialize new structure member.
6731 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6732 * lynx-low.c: Initialize new structure member.
6733 * remote-utils.c (prepare_resume_reply): Implement stop reason
6734 "fork" for "T" stop message.
6735 * server.c (handle_query): Call handle_new_gdb_connection.
6736 * server.h (report_fork_events): Declare global flag.
6737 * target.h (struct target_ops) <handle_new_gdb_connection>:
6738 New member.
6739 (target_handle_new_gdb_connection): New macro.
6740 * win32-low.c: Initialize new structure member.
6741
ddcbc397
DB
67422015-05-12 Don Breazeal <donb@codesourcery.com>
6743
6744 * mem-break.c (APPEND_TO_LIST): Define macro.
6745 (clone_agent_expr): New function.
6746 (clone_one_breakpoint): New function.
6747 (clone_all_breakpoints): New function.
6748 * mem-break.h: Declare new functions.
6749
89245bc0
DB
67502015-05-12 Don Breazeal <donb@codesourcery.com>
6751
6752 * linux-low.c (linux_supports_fork_events): New function.
6753 (linux_supports_vfork_events): New function.
6754 (linux_target_ops): Initialize new structure members.
6755 (initialize_low): Call linux_check_ptrace_features.
6756 * lynx-low.c (lynx_target_ops): Initialize new structure
6757 members.
6758 * server.c (report_fork_events, report_vfork_events):
6759 New global flags.
6760 (handle_query): Add new features to qSupported packet and
6761 response.
6762 (captured_main): Initialize new global variables.
6763 * target.h (struct target_ops) <supports_fork_events>:
6764 New member.
6765 <supports_vfork_events>: New member.
6766 (target_supports_fork_events): New macro.
6767 (target_supports_vfork_events): New macro.
6768 * win32-low.c (win32_target_ops): Initialize new structure
6769 members.
6770
835205d0
GB
67712015-05-12 Gary Benson <gbenson@redhat.com>
6772
6773 * server.c (handle_qxfer_exec_file): Use current process
6774 if annex is empty.
6775
21e94bd9
SL
67762015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6777
6778 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6779 Remove HAVE_PTRACE_GETREGS conditionals.
6780 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6781 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6782
45614f15
YQ
67832015-05-08 Yao Qi <yao.qi@linaro.org>
6784
6785 * linux-low.c (linux_supports_conditional_breakpoints): New
6786 function.
6787 (linux_target_ops): Install new target method.
6788 * lynx-low.c (lynx_target_ops): Install NULL hook for
6789 supports_conditional_breakpoints.
6790 * nto-low.c (nto_target_ops): Likewise.
6791 * spu-low.c (spu_target_ops): Likewise.
6792 * win32-low.c (win32_target_ops): Likewise.
6793 * server.c (handle_query): Check
6794 target_supports_conditional_breakpoints.
6795 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6796 New field.
6797 (target_supports_conditional_breakpoints): New macro.
6798
80ad801e
PA
67992015-05-06 Pedro Alves <palves@redhat.com>
6800
6801 PR server/18081
6802 * server.c (start_inferior): If the process exits, mourn it.
6803
819843c7
GB
68042015-04-21 Gary Benson <gbenson@redhat.com>
6805
6806 * hostio.c (fileio_open_flags_to_host): Factored out to
6807 fileio_to_host_openflags in common/fileio.c. Single use
6808 updated.
6809
a2d5a9d7
MF
68102015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6811
6812 * linux-xtensa-low.c (xtensa_fill_gregset)
6813 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6814 XCHAL_HAVE_LOOP.
6815
deb44829
MF
68162015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6817
6818 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6819 (regs_info): Replace usrregs pointer with NULL.
6820
e57f1de3
GB
68212015-04-17 Gary Benson <gbenson@redhat.com>
6822
6823 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6824 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6825 * server.c (handle_qxfer_exec_file): New function.
6826 (qxfer_packets): Add exec-file entry.
6827 (handle_query): Report qXfer:exec-file:read as supported packet.
6828
62828379
RN
68292015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6830
6831 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6832
b88bb450
GB
68332015-04-09 Gary Benson <gbenson@redhat.com>
6834
6835 * hostio-errno.c (errno_to_fileio_error): Remove function.
6836 Update caller to use remote_fileio_to_fio_error.
6837
c8f4bfdd
YQ
68382015-04-09 Yao Qi <yao.qi@linaro.org>
6839
6840 * linux-low.c (linux_insert_point): Call
6841 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6842 (linux_remove_point): Call remove_memory_breakpoint if type is
6843 raw_bkpt_type_sw.
6844 * linux-x86-low.c (x86_insert_point): Don't call
6845 insert_memory_breakpoint.
6846 (x86_remove_point): Don't call remove_memory_breakpoint.
6847
41f98f02
PA
68482015-04-01 Pedro Alves <palves@redhat.com>
6849 Cleber Rosa <crosa@redhat.com>
6850
6851 * server.c (gdbserver_usage): Reorganize and extend the usage
6852 message.
6853
2bf6fb9d
PA
68542015-03-24 Pedro Alves <palves@redhat.com>
6855
6856 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6857 output. Also dump TRAP_TRACE.
6858 (linux_low_filter_event): In debug output, distinguish a
6859 resume_stop SIGSTOP from a delayed SIGSTOP.
6860
369f6daa
GB
68612015-03-24 Gary Benson <gbenson@redhat.com>
6862
6863 * linux-x86-low.c (x86_linux_new_thread): Moved to
6864 nat/x86-linux.c.
6865 (x86_linux_prepare_to_resume): Likewise.
6866
8e5d4070
GB
68672015-03-24 Gary Benson <gbenson@redhat.com>
6868
6869 * Makefile.in (x86-linux-dregs.o): New rule.
6870 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6871 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6872 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6873 (x86_linux_dr_get): Likewise.
6874 (x86_linux_dr_set): Likewise.
6875 (update_debug_registers_callback): Likewise.
6876 (x86_linux_dr_set_addr): Likewise.
6877 (x86_linux_dr_get_addr): Likewise.
6878 (x86_linux_dr_set_control): Likewise.
6879 (x86_linux_dr_get_control): Likewise.
6880 (x86_linux_dr_get_status): Likewise.
6881 (x86_linux_update_debug_registers): Likewise.
6882
2b95d440
GB
68832015-03-24 Gary Benson <gbenson@redhat.com>
6884
6885 * linux-x86-low.c (x86_linux_update_debug_registers):
6886 New function, factored out from...
6887 (x86_linux_prepare_to_resume): ...this.
6888
14b0bc68
GB
68892015-03-24 Gary Benson <gbenson@redhat.com>
6890
6891 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6892 (x86_linux_dr_set): Likewise.
6893 (update_debug_registers_callback): Likewise.
6894 (x86_linux_dr_set_addr): Likewise.
6895 (x86_linux_dr_get_addr): Likewise.
6896 (x86_linux_dr_set_control): Likewise.
6897 (x86_linux_dr_get_control): Likewise.
6898 (x86_linux_dr_get_status): Likewise.
6899 (x86_linux_prepare_to_resume): Likewise.
6900
5dfe6ca8
GB
69012015-03-24 Gary Benson <gbenson@redhat.com>
6902
6903 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6904 Use perror_with_name. Pass string through gettext.
6905 (x86_linux_dr_set): Likewise.
6906
d33472ad
GB
69072015-03-24 Gary Benson <gbenson@redhat.com>
6908
6909 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6910 (x86_linux_dr_set_addr): ...this.
6911 (x86_dr_low_get_addr): Rename to...
6912 (x86_linux_dr_get_addr): ...this.
6913 (x86_dr_low_set_control): Rename to...
6914 (x86_linux_dr_set_control): ...this.
6915 (x86_dr_low_get_control): Rename to...
6916 (x86_linux_dr_get_control): ...this.
6917 (x86_dr_low_get_status): Rename to...
6918 (x86_linux_dr_get_status): ...this.
6919 (x86_dr_low): Update with new function names.
6920
4b134ca1
GB
69212015-03-24 Gary Benson <gbenson@redhat.com>
6922
6923 * Makefile.in (x86-linux.o): New rule.
6924 * configure.srv: Add x86-linux.o to relevant targets.
6925 * linux-low.c (lwp_set_arch_private_info): New function.
6926 (lwp_arch_private_info): Likewise.
6927 * linux-x86-low.c: Include nat/x86-linux.h.
6928 (arch_lwp_info): Removed structure.
6929 (update_debug_registers_callback):
6930 Use lwp_set_debug_registers_changed.
6931 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6932 and lwp_set_debug_registers_changed.
6933 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6934
34c703da
GB
69352015-03-24 Gary Benson <gbenson@redhat.com>
6936
6937 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6938 * linux-arm-low.c (arm_new_thread): Likewise.
6939 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6940 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6941 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6942 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6943
cff068da
GB
69442015-03-24 Gary Benson <gbenson@redhat.com>
6945
6946 * linux-low.c (ptid_of_lwp): New function.
6947 (lwp_is_stopped): Likewise.
6948 (lwp_stop_reason): Likewise.
6949 * linux-x86-low.c (update_debug_registers_callback):
6950 Use lwp_is_stopped.
6951 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6952 lwp_stop_reason.
6953
b2f7c7e8
GB
69542015-03-24 Gary Benson <gbenson@redhat.com>
6955
6956 * linux-low.h (linux_stop_lwp): Remove declaration.
6957
6d4ee8c6
GB
69582015-03-24 Gary Benson <gbenson@redhat.com>
6959
6960 * linux-low.h: Include nat/linux-nat.h.
6961 * linux-low.c (iterate_over_lwps_args): New structure.
6962 (iterate_over_lwps_filter): New function.
6963 (iterate_over_lwps): Likewise.
6964 * linux-x86-low.c (update_debug_registers_callback):
6965 Update signature to what iterate_over_lwps expects.
6966 Remove PID check that iterate_over_lwps now performs.
6967 (x86_dr_low_set_addr): Use iterate_over_lwps.
6968 (x86_dr_low_set_control): Likewise.
6969
70a0bb6b
GB
69702015-03-24 Gary Benson <gbenson@redhat.com>
6971
6972 * linux-x86-low.c (x86_debug_reg_state): New function.
6973 (x86_linux_prepare_to_resume): Use the above.
6974
7b669087
GB
69752015-03-24 Gary Benson <gbenson@redhat.com>
6976
6977 * linux-low.c (current_lwp_ptid): New function.
6978 * linux-x86-low.c: Include nat/linux-nat.h.
6979 (x86_dr_low_get_addr): Use current_lwp_ptid.
6980 (x86_dr_low_get_control): Likewise.
6981 (x86_dr_low_get_status): Likewise.
6982
eef49a3d
PA
69832015-03-20 Pedro Alves <palves@redhat.com>
6984
6985 * tracepoint.c (cmd_qtstatus): Make "str" const.
6986
b2333d22
PA
69872015-03-20 Pedro Alves <palves@redhat.com>
6988
6989 * server.c (handle_general_set): Make "req_str" const.
6990
23f238d3
PA
69912015-03-19 Pedro Alves <palves@redhat.com>
6992
6993 * linux-low.c (linux_resume_one_lwp): Rename to ...
6994 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6995 instead call perror_with_name.
6996 (check_ptrace_stopped_lwp_gone): New function.
6997 (linux_resume_one_lwp): Reimplement as wrapper around
6998 linux_resume_one_lwp_throw that swallows errors if the LWP is
6999 gone.
7000
91baf43f
PA
70012015-03-19 Pedro Alves <palves@redhat.com>
7002
7003 * linux-low.c (count_events_callback, select_event_lwp_callback):
7004 No longer check whether the thread has resume_stop as last resume
7005 kind.
7006
8bf3b159
PA
70072015-03-19 Pedro Alves <palves@redhat.com>
7008
7009 * linux-low.c (count_events_callback, select_event_lwp_callback):
7010 Use the lwp's status_pending_p field, not the thread's.
7011
b90fc188
PA
70122015-03-19 Pedro Alves <palves@redhat.com>
7013
7014 * linux-low.c (select_event_lwp_callback): Update comments to
7015 no longer mention SIGTRAP.
7016
464b0089
GB
70172015-03-18 Gary Benson <gbenson@redhat.com>
7018
7019 * server.c (handle_query): Do not report vFile:fstat as supported.
7020
aa9e327f
GB
70212015-03-11 Gary Benson <gbenson@redhat.com>
7022
7023 * hostio.c (sys/types.h): New include.
7024 (sys/stat.h): Likewise.
7025 (common-remote-fileio.h): Likewise.
7026 (handle_fstat): New function.
7027 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7028
791c0056
GB
70292015-03-11 Gary Benson <gbenson@redhat.com>
7030
7031 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7032 struct stat.st_blocks and struct stat.st_blksize.
7033 * configure: Regenerate.
7034 * config.in: Likewise.
7035 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7036 (OBS): Add common-remote-fileio.o.
7037 (common-remote-fileio.o): New rule.
7038
9a9df970
PA
70392015-03-09 Pedro Alves <palves@redhat.com>
7040
7041 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7042 'struct sockaddr' pointer in 'accept' call.
7043
9eb1356e
PA
70442015-03-09 Pedro Alves <palves@redhat.com>
7045
7046 Revert:
7047 2015-03-07 Pedro Alves <palves@redhat.com>
7048 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7049 or <winsock2.h> here. Instead include "gdb_socket.h".
7050 (remote_open): Use union gdb_sockaddr_u.
7051 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7052 or <winsock2.h> here. Instead include "gdb_socket.h".
7053 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7054 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7055 or <sys/un.h>.
7056 (init_named_socket, gdb_agent_helper_thread): Use union
7057 gdb_sockaddr_u.
7058
aac331e4
PA
70592015-03-07 Pedro Alves <palves@redhat.com>
7060
7061 * configure.ac (build_warnings): Move
7062 -Wdeclaration-after-statement to the C-specific set.
7063 * configure: Regenerate.
7064
366c75fc
PA
70652015-03-07 Pedro Alves <palves@redhat.com>
7066
7067 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7068 or <winsock2.h> here. Instead include "gdb_socket.h".
7069 (remote_open): Use union gdb_sockaddr_u.
7070 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7071 or <winsock2.h> here. Instead include "gdb_socket.h".
7072 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7073 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7074 or <sys/un.h>.
7075 (init_named_socket, gdb_agent_helper_thread): Use union
7076 gdb_sockaddr_u.
7077
492d29ea
PA
70782015-03-07 Pedro Alves <palves@redhat.com>
7079
7080 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7081 instead.
7082
60a191ed
YQ
70832015-03-06 Yao Qi <yao.qi@linaro.org>
7084
7085 * linux-aarch64-low.c (aarch64_insert_point): Use
7086 show_debug_regs as a boolean.
7087 (aarch64_remove_point): Likewise.
7088
f5771b1d
PA
70892015-03-05 Pedro Alves <palves@redhat.com>
7090
7091 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7092 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7093 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7094 * nto-low.c (nto_target_ops): Likewise.
7095 * spu-low.c (spu_target_ops): Likewise.
7096 * win32-low.c (win32_target_ops): Likewise.
7097
3e572f71
PA
70982015-03-04 Pedro Alves <palves@redhat.com>
7099
72f4393d 7100 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7101 Decide whether a breakpoint triggered based on the SIGTRAP's
7102 siginfo.si_code.
72f4393d
L
7103 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7104 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7105 (linux_low_filter_event): Check for breakpoints before checking
7106 watchpoints.
7107 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7108 siginfo.si_code.
72f4393d
L
7109 (linux_stopped_by_sw_breakpoint)
7110 (linux_supports_stopped_by_sw_breakpoint)
7111 (linux_stopped_by_hw_breakpoint)
7112 (linux_supports_stopped_by_hw_breakpoint): New functions.
7113 (linux_target_ops): Install new target methods.
3e572f71 7114
1ec68e26
PA
71152015-03-04 Pedro Alves <palves@redhat.com>
7116
7117 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7118 * server.c (swbreak_feature, hwbreak_feature): New globals.
7119 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7120 (captured_main): Clear swbreak_feature and hwbreak_feature.
7121 * server.h (swbreak_feature, hwbreak_feature): Declare.
7122 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7123 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7124 supports_stopped_by_hw_breakpoint>: New fields.
7125 (target_supports_stopped_by_sw_breakpoint)
7126 (target_stopped_by_sw_breakpoint)
7127 (target_supports_stopped_by_hw_breakpoint)
7128 (target_stopped_by_hw_breakpoint): Declare.
7129
15c66dd6
PA
71302015-03-04 Pedro Alves <palves@redhat.com>
7131
7132 enum lwp_stop_reason -> enum target_stop_reason
7133 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7134 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7135 (linux_wait_1, stuck_in_jump_pad_callback)
7136 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7137 (linux_stopped_by_watchpoint):
7138 * linux-low.h (enum lwp_stop_reason): Delete.
7139 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7140 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7141
98fc70d6
YQ
71422015-03-04 Yao Qi <yao.qi@linaro.org>
7143
7144 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7145
dd2ac174
GB
71462015-03-03 Gary Benson <gbenson@redhat.com>
7147
7148 * hostio.c (handle_vFile): Fix prefix lengths.
7149
d68e53f4
MM
71502015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7151
7152 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7153 ptr_bits.
7154
bf2d68ab
AA
71552015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7156
7157 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7158 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7159 (clean): Add "rm -f" for above C files.
7160 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7161 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7162 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7163 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7164 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7165 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7166 (init_registers_s390x_vx_linux64)
7167 (init_registers_s390x_tevx_linux64)
7168 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7169 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7170 declarations.
7171 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7172 (s390_store_vxrs_high): New functions.
7173 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7174 NT_S390_VXRS_HIGH.
7175 (s390_arch_setup): Add logic for selecting one of the new target
7176 descriptions. Activate the new vector regsets if applicable.
7177 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7178 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7179 and init_registers_s390x_tevx_linux64.
7180
c966a859
PA
71812015-03-01 Pedro Alves <palves@redhat.com>
7182
7183 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7184 parameter.
7185
4180215b
PA
71862015-02-27 Pedro Alves <palves@redhat.com>
7187
7188 * linux-x86-low.c (u_debugreg_offset): New function.
7189 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7190
749bab01
PA
71912015-02-27 Pedro Alves <palves@redhat.com>
7192
7193 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7194 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7195 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7196 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7197 (ps_lsetfpregs, ps_getpid)
7198 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7199 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7200 (ps_lsetxregs, ps_plog): Declare.
7201
3c14e5a3
PA
72022015-02-27 Pedro Alves <palves@redhat.com>
7203
7204 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7205 IP_AGENT_EXPORT_FUNC.
7206 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7207 IP_AGENT_EXPORT_FUNC.
7208 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7209 (IP_AGENT_EXPORT): Delete.
7210 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7211 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7212 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7213 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7214 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7215 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7216 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7217 (traceframe_read_count, traceframe_write_count)
7218 (traceframes_created, trace_state_variables, get_raw_reg)
7219 (get_trace_state_variable_value, set_trace_state_variable_value)
7220 (ust_loaded, helper_thread_id, cmd_buf): Use
7221 IPA_SYM_EXPORTED_NAME.
7222 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7223 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7224 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7225 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7226 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7227 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7228 EXTERN_C_PUSH/EXTERN_C_POP.
7229 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7230 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7231 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7232 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7233 (traceframe_write_count, traceframe_read_count)
7234 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7235 (about_to_request_buffer_space, get_trace_state_variable_value)
7236 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7237 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7238 EXTERN_C_PUSH/EXTERN_C_POP.
7239 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7240 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7241 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7242 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7243 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7244 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7245 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7246 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7247 Define.
7248 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7249 (IP_AGENT_EXPORT_VAR_DECL): Define.
7250 (tracing): Declare.
7251 (gdb_agent_get_raw_reg): Declare.
7252
fe978cb0
PA
72532015-02-27 Tom Tromey <tromey@redhat.com>
7254 Pedro Alves <palves@redhat.com>
7255
7256 Rename symbols whose names are reserved C++ keywords throughout.
7257
3bc3d82a
PA
72582015-02-27 Pedro Alves <palves@redhat.com>
7259
7260 * Makefile.in (COMPILER): New, get it from autoconf.
7261 (CXX): Get from autoconf instead.
7262 (COMPILE.pre): Use COMPILER.
7263 (CC-LD): Rename to ...
7264 (CC_LD): ... this. Use COMPILER.
7265 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7266 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7267 * acinclude.m4: Include build-with-cxx.m4.
7268 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7269 Disable -Werror by default if building in C++ mode.
7270 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7271 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7272 the C++ compiler. Save/restore CXXFLAGS too.
7273 * configure: Regenerate.
7274
07697489
PA
72752015-02-27 Pedro Alves <palves@redhat.com>
7276
7277 * acinclude.m4: Include libiberty.m4.
7278 * configure.ac: Call libiberty_INIT.
7279 * config.in, configure: Regenerate.
7280
9beb7c4e
PA
72812015-02-26 Pedro Alves <palves@redhat.com>
7282
7283 * linux-low.c (linux_wait_1): When incrementing the PC past a
7284 program breakpoint always use the_low_target.breakpoint_len as
7285 increment, rather than the maximum between that and
7286 the_low_target.decr_pc_after_break.
7287
8090aef2
PA
72882015-02-23 Pedro Alves <palves@redhat.com>
7289
7290 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7291 thread was doing a step-over; always adjust the PC if
7292 we stepped over a permanent breakpoint.
7293 (linux_wait_1): If we stepped over breakpoint that was on top of a
7294 permanent breakpoint, manually advance the PC past it.
7295
bc9540e8
PA
72962015-02-23 Pedro Alves <palves@redhat.com>
7297
7298 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7299 modes.
7300 (x86_fill_gregset, x86_store_gregset): Use it when handling
7301 $orig_eax.
7302
2db9a427
PA
73032015-02-20 Pedro Alves <palves@redhat.com>
7304
7305 * thread-db.c: Include "nat/linux-procfs.h".
7306 (thread_db_init): Skip listing new threads if the kernel supports
7307 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7308
afa8d396
PA
73092015-02-20 Pedro Alves <palves@redhat.com>
7310
7311 * linux-low.c (status_pending_p_callback): Use ptid_match.
7312
c9587f88
AT
73132015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7314
7315 PR breakpoints/16812
7316 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7317 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7318 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7319
b05ec7a5
AT
73202015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7321
7322 PR breakpoints/15956
7323 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7324
d33501a5
MM
73252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7326
7327 * linux-low.c (linux_low_btrace_conf): Print size.
7328 * server.c (handle_btrace_conf_general_set): New.
7329 (hanle_general_set): Call handle_btrace_conf_general_set.
7330 (handle_query): Report Qbtrace-conf:bts:size as supported.
7331
f4abbc16
MM
73322015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7333
7334 * linux-low.c (linux_low_enable_btrace): Update parameters.
7335 (linux_low_btrace_conf): New.
7336 (linux_target_ops)<to_btrace_conf>: Initialize.
7337 * server.c (current_btrace_conf): New.
7338 (handle_btrace_enable): Rename to ...
7339 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7340 to target_enable_btrace. Update comment. Update users.
7341 (handle_qxfer_btrace_conf): New.
7342 (qxfer_packets): Add btrace-conf entry.
7343 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7344 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7345 (target_ops)<read_btrace_conf>: New.
7346 (target_enable_btrace): Update parameters.
7347 (target_read_btrace_conf): New.
7348
043c3577
MM
73492015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7350
7351 * server.c (handle_btrace_general_set): Remove call to
7352 target_supports_btrace.
7353 (supported_btrace_packets): New.
7354 (handle_query): Call supported_btrace_packets.
7355 * target.h: include btrace-common.h.
7356 (btrace_target_info): Removed.
7357 (supports_btrace, target_supports_btrace): Update parameters.
7358
734b0e4b
MM
73592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7360
7361 * Makefile.in (SFILES): Add common/btrace-common.c.
7362 (OBS): Add common/btrace-common.o.
7363 (btrace-common.o): Add build rules.
7364 * linux-low: Include btrace-common.h.
7365 (linux_low_read_btrace): Use struct btrace_data. Call
7366 btrace_data_init and btrace_data_fini.
7367
d6c146e9
PA
73682015-02-06 Pedro Alves <palves@redhat.com>
7369
7370 * thread-db.c (find_new_threads_callback): Add debug output.
7371
20ba1ce6
PA
73722015-02-04 Pedro Alves <palves@redhat.com>
7373
7374 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7375 (resume_stopped_resumed_lwps): New function.
7376 (linux_wait_for_event_filtered): Use it.
7377
8cc73a39
SDJ
73782015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7379
7380 * Makefile.in (SFILES): Add linux-personality.c.
7381 (linux-personality.o): New rule.
7382 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7383 list of objects to be built.
7384 * linux-low.c: Include nat/linux-personality.h.
7385 (linux_create_inferior): Remove code to disable address space
7386 randomization (moved to ../nat/linux-personality.c). Create
7387 cleanup to disable address space randomization.
7388
fb23d554
SDJ
73892015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7390
7391 * Makefile.in (posix-strerror.o): New rule.
7392 (mingw-strerror.o): Likewise.
7393 * configure: Regenerated.
7394 * configure.ac: Source file ../common/common.host. Initialize new
7395 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7396
cdf43629
YQ
73972015-01-14 Yao Qi <yao@codesourcery.com>
7398
7399 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7400 (ppc-linux.o): New rule.
7401 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7402 * configure.ac: AC_CHECK_FUNCS(getauxval).
7403 * config.in: Re-generated.
7404 * configure: Re-generated.
7405 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7406 ppc64_64bit_inferior_p
7407
514c5338
YQ
74082015-01-14 Yao Qi <yao@codesourcery.com>
7409
7410 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7411 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7412 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7413 (PT_ORIG_R3, PT_TRAP): Likewise.
7414 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7415 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7416 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7417
3368c1e5
JB
74182015-01-10 Joel Brobecker <brobecker@adacore.com>
7419
7420 * i387-fp.c (i387_cache_to_xsave): In look over
7421 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7422 zmmh_low_space field by use of zmmh_high_space.
7423
582511be
PA
74242015-01-09 Pedro Alves <palves@redhat.com>
7425
7426 * linux-low.c (step_over_bkpt): Move higher up in the file.
7427 (handle_extended_wait): Don't store the stop_pc here.
7428 (get_stop_pc): Adjust comments and rename to ...
7429 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7430 stopped for a software breakpoint or hardware breakpoint.
7431 (thread_still_has_status_pending_p): New function.
7432 (status_pending_p_callback): Use
7433 thread_still_has_status_pending_p. If the event is no longer
7434 interesting, resume the LWP.
7435 (handle_tracepoints): Add assert.
7436 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7437 (wstatus_maybe_breakpoint): New function.
7438 (cancel_breakpoint): Delete function.
7439 (check_stopped_by_watchpoint): New function, factored out from
7440 linux_low_filter_event.
7441 (lp_status_maybe_breakpoint): Delete function.
7442 (linux_low_filter_event): Remove filter_ptid argument.
7443 Leave thread group exits pending here. Store the LWP's stop PC.
7444 Always leave events pending.
7445 (linux_wait_for_event_filtered): Pull all events out of the
7446 kernel, and leave them all pending.
7447 (count_events_callback, select_event_lwp_callback): Consider all
7448 events.
7449 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7450 (select_event_lwp): Only give preference to the stepping LWP in
7451 all-stop mode. Adjust comments.
7452 (ignore_event): New function.
7453 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7454 references to cancel_breakpoints. Adjust to renames. Also give
7455 equal priority to all LWPs that have had events in non-stop mode.
7456 If reporting a software breakpoint event, unadjust the LWP's PC.
7457 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7458 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7459 Adjust.
7460 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7461 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7462 (linux_stopped_by_watchpoint): Adjust.
7463 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7464 * linux-low.h (enum lwp_stop_reason): New.
7465 (struct lwp_info) <stop_pc>: Adjust comment.
7466 <stopped_by_watchpoint>: Delete field.
7467 <stop_reason>: New field.
7468 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7469 * mem-break.c (software_breakpoint_inserted_here)
7470 (hardware_breakpoint_inserted_here): New function.
7471 * mem-break.h (software_breakpoint_inserted_here)
7472 (hardware_breakpoint_inserted_here): Declare.
7473 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7474 (cancel_breakpoints): Delete.
7475 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7476 (upload_fast_traceframes): Remove references to
7477 cancel_breakpoints.
7478
a33e3959
PA
74792015-01-09 Pedro Alves <palves@redhat.com>
7480
7481 * thread-db.c (find_new_threads_callback): Ignore thread if the
7482 kernel thread ID is -1.
7483
8784d563
PA
74842015-01-09 Pedro Alves <palves@redhat.com>
7485
7486 * linux-low.c (linux_attach_fail_reason_string): Move to
7487 nat/linux-ptrace.c, and rename.
7488 (linux_attach_lwp): Update comment.
7489 (attach_proc_task_lwp_callback): New function.
7490 (linux_attach): Adjust to rename and use
7491 linux_proc_attach_tgid_threads.
7492 (linux_attach_fail_reason_string): Delete declaration.
7493
76f2b779
JB
74942015-01-01 Joel Brobecker <brobecker@adacore.com>
7495
7496 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7497 * server.c (gdbserver_version): Likewise.
7498
fafcc06a
SDJ
74992014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7500
7501 * remote-utils.c: Include ctype.h.
7502 (input_interrupt): Explicitly handle the case when the char
7503 received is the NUL byte. Improve the printing of non-ASCII
7504 characters.
7505
beed38b8
JB
75062014-12-16 Joel Brobecker <brobecker@adacore.com>
7507
7508 * linux-low.c (linux_low_filter_event): Update call to
7509 linux_enable_event_reporting following the addition of
7510 a new parameter to that function.
7511
bf330350
CU
75122014-12-16 Catalin Udma <catalin.udma@freescale.com>
7513
7514 PR server/17457
7515 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7516 (AARCH64_FPCR_REGNO): Likewise.
7517 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7518 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7519 (aarch64_store_fpregset): Likewise.
7520
5227d625
JB
75212014-12-15 Joel Brobecker <brobecker@adacore.com>
7522
7523 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7524 Remove FIXME comment about assumption about N.
7525
f93b65a0
JB
75262014-12-13 Joel Brobecker <brobecker@adacore.com>
7527
7528 * configure.ac: If large-file support is disabled in GDBserver,
7529 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7530 * configure: Regenerate.
7531
e5a9158d
AA
75322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7533
7534 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7535 warning upon ENODATA from ptrace.
7536 * linux-s390-low.c (s390_store_tdb): New.
7537 (s390_regsets): Add regset for NT_S390_TDB.
7538
feea5f36
AA
75392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7540
7541 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7542 without a fill_function.
7543 * linux-s390-low.c (s390_fill_last_break): Remove.
7544 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7545 (s390_arch_setup): Use regset's size instead of fill_function for
7546 loop end condition.
7547
098dbe61
AA
75482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7549
7550 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7551 the regset's store function when ptrace returned an error.
7552 * regcache.c (get_thread_regcache): Invalidate register cache
7553 before fetching inferior's registers.
7554
28eef672
AA
75552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7556
7557 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7558 while-loop as for-loop.
7559 (regsets_store_inferior_registers): Likewise.
7560
bdca27a2
YQ
75612014-11-28 Yao Qi <yao@codesourcery.com>
7562
7563 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7564 * config.in, configure: Re-generate.
7565 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7566 is defined.
7567
9c232dda
YQ
75682014-11-21 Yao Qi <yao@codesourcery.com>
7569
7570 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7571 (AC_CHECK_HEADERS): Remove malloc.h.
7572 * configure: Re-generated.
7573 * config.in: Re-generated.
7574 * server.h: Don't include alloca.h and malloc.h.
7575 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7576 Don't include malloc.h.
7577
43968415
JB
75782014-11-17 Joel Brobecker <brobecker@adacore.com>
7579
7580 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7581 corresponding ERRNO check in same block.
7582
40e91bc7
PA
75832014-11-12 Pedro Alves <palves@redhat.com>
7584
7585 * server.c (cont_thread): Update comment.
7586 (start_inferior, attach_inferior): No longer clear cont_thread.
7587 (handle_v_cont): No longer set cont_thread.
7588 (captured_main): Clear cont_thread each time a GDB connects.
7589
c2c118cf
PA
75902014-11-12 Pedro Alves <palves@redhat.com>
7591
7592 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7593 thread, and don't resume all threads if the Hc thread has exited.
7594
78708b7c
PA
75952014-11-12 Pedro Alves <palves@redhat.com>
7596
7597 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7598 the process group instead of to a specific LWP.
7599
a2abc7de
PA
76002014-10-15 Pedro Alves <palves@redhat.com>
7601
7602 PR server/17487
7603 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7604 parameter.
7605 (arm_set_thread_context): Delete.
7606 (the_low_target): Adjust.
7607 * win32-i386-low.c (debug_registers_changed)
7608 (debug_registers_used): Delete.
7609 (update_debug_registers_callback): New function.
7610 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7611 needing to update their debug registers.
7612 (win32_get_current_dr): New function.
7613 (x86_dr_low_get_addr, x86_dr_low_get_control)
7614 (x86_dr_low_get_status): Fetch the debug register from the thread
7615 record's context.
7616 (i386_initial_stuff): Adjust.
7617 (i386_get_thread_context): Remove current_event parameter. Don't
7618 clear debug_registers_changed nor copy DR values to
7619 debug_reg_state.
7620 (i386_set_thread_context): Delete.
7621 (i386_prepare_to_resume): New function.
7622 (i386_thread_added): Mark the thread as needing to update irs
7623 debug registers.
7624 (the_low_target): Remove i386_set_thread_context and install
7625 i386_prepare_to_resume.
7626 * win32-low.c (win32_get_thread_context): Adjust.
7627 (win32_set_thread_context): Use SetThreadContext
7628 directly.
7629 (win32_prepare_to_resume): New function.
7630 (win32_require_context): New function, factored out from ...
7631 (thread_rec): ... this.
7632 (continue_one_thread): Call win32_prepare_to_resume on each thread
7633 we're about to continue.
7634 (win32_resume): Call win32_prepare_to_resume on the event thread.
7635 * win32-low.h (struct win32_thread_info)
7636 <debug_registers_changed>: New field.
7637 (struct win32_target_ops): Change prototype of set_thread_context,
7638 delete set_thread_context and add prepare_to_resume.
7639 (win32_require_context): New declaration.
7640
a442d071
GB
76412014-10-08 Gary Benson <gbenson@redhat.com>
7642
7643 * server.h: Do not include common-exceptions.h.
7644
6f1947e8
GB
76452014-10-08 Gary Benson <gbenson@redhat.com>
7646
7647 * server.h: Do not include cleanups.h.
7648
63b434a4
JH
76492014-09-30 James Hogan <james.hogan@imgtec.com>
7650
7651 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7652 mips64-dsp-linux.c.
7653
c4d9ceb6
YQ
76542014-09-23 Yao Qi <yao@codesourcery.com>
7655
7656 * linux-low.c (lp_status_maybe_breakpoint): New function.
7657 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7658 (count_events_callback): Likewise.
7659 (select_event_lwp_callback): Likewise.
7660 (cancel_breakpoints_callback): Likewise.
7661
89a5711c
DB
76622014-09-19 Don Breazeal <donb@codesourcery.com>
7663
7664 * linux-low.c (handle_extended_wait): Call
7665 linux_ptrace_get_extended_event.
7666 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7667 linux_is_extended_waitstatus.
7668
bffc0964
JB
76692014-09-16 Joel Brobecker <brobecker@adacore.com>
7670
7671 * Makefile.in (CPPFLAGS): Define.
7672 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7673 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7674
0bfdf32f
GB
76752014-09-16 Gary Benson <gbenson@redhat.com>
7676
7677 * inferiors.h (current_inferior): Renamed as...
7678 (current_thread): New variable. All uses updated.
7679 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7680 (maybe_move_out_of_jump_pad): Likewise.
7681 (cancel_breakpoint): Likewise.
7682 (linux_low_filter_event): Likewise.
7683 (wait_for_sigstop): Likewise.
7684 (linux_resume_one_lwp): Likewise.
7685 (need_step_over_p): Likewise.
7686 (start_step_over): Likewise.
7687 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7688 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7689 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7690 and save_inferior as saved_thread.
7691 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7692 saved_thread.
7693 (regcache_invalidate_thread): Likewise.
7694 * remote-utils.c (prepare_resume_reply): Likewise.
7695 * thread-db.c (thread_db_get_tls_address): Likewise.
7696 (disable_thread_event_reporting): Likewise.
7697 (remove_thread_event_breakpoints): Likewise.
7698 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7699 as saved_thread.
7700 * target.h (set_desired_inferior): Renamed as...
7701 (set_desired_thread): New declaration. All uses updated.
7702 * server.c (myresume): Updated comment to reference thread instead
7703 of inferior.
7704 (handle_serial_event): Likewise.
7705 (handle_target_event): Likewise.
7706
361c8ade
GB
77072014-09-12 Tom Tromey <tromey@redhat.com>
7708 Gary Benson <gbenson@redhat.com>
7709
7710 * regcache.h: Include common-regcache.h.
7711 (regcache_read_pc): Don't declare.
7712 * regcache.c (get_thread_regcache_for_ptid): New function.
7713
bd9269f7
GB
77142014-09-11 Tom Tromey <tromey@redhat.com>
7715 Gary Benson <gbenson@redhat.com>
7716
7717 * symbol.c: New file.
7718 * Makefile.in (SFILES): Add symbol.c.
7719 (OBS): Add symbol.o.
7720
f8c1d06b
GB
77212014-09-11 Gary Benson <gbenson@redhat.com>
7722
7723 * target.c (target_stop_ptid, target_continue_ptid): New
7724 functions.
7725
721ec300
GB
77262014-09-11 Tom Tromey <tromey@redhat.com>
7727 Gary Benson <gbenson@redhat.com>
7728
7729 * target.h: Include target/target.h.
7730 * target.c (target_read_memory, target_read_uint32)
7731 (target_write_memory): New functions.
7732
c5e92cca
GB
77332014-09-11 Gary Benson <gbenson@redhat.com>
7734
7735 * server.h (debug_hw_points): Don't declare.
7736 * server.c (debug_hw_points): Don't define. Replace all uses
7737 with show_debug_regs.
7738 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7739 all uses with show_debug_regs.
7740
2e4bb98a
EBM
77412014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7742
7743 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7744 endianness into account.
7745 (ppc_supply_ptrace_register): Likewise.
7746
ac740bc7
JH
77472014-09-03 James Hogan <james.hogan@imgtec.com>
7748
7749 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7750 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7751
97ea6506
GB
77522014-09-03 Gary Benson <gbenson@redhat.com>
7753
7754 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7755 ALL_DEBUG_ADDRESS_REGISTERS.
7756
df7e5265
GB
77572014-09-02 Gary Benson <gbenson@redhat.com>
7758
7759 * i386-low.h: Renamed as...
7760 * x86-low.h: New file. All type, function and variable name
7761 prefixes changed from "i386_" to "x86_". All references updated.
7762 * i386-low.c: Renamed as...
7763 * x86-low.c: New file. All type, function and variable name
7764 prefixes changed from "i386_" to "x86_". All references updated.
7765
ed859da7
GB
77662014-09-02 Gary Benson <gbenson@redhat.com>
7767
7768 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7769 (x86_linux_new_thread): Likewise.
7770
860789c7
GB
77712014-08-29 Gary Benson <gbenson@redhat.com>
7772
7773 * server.h (setjmp.h): Do not include.
7774 (toplevel): Do not declare.
7775 (common-exceptions.h): Include.
7776 (cleanups.h): Likewise.
7777 * server.c (toplevel): Do not define.
7778 (exit_code): New static global.
7779 (detach_or_kill_for_exit_cleanup): New function.
7780 (main): New function. Original main renamed to...
7781 (captured_main): New function.
7782 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7783
ff55e1b5
GB
77842014-08-29 Gary Benson <gbenson@redhat.com>
7785
7786 * Makefile.in (SFILES): Add common/common-exceptions.c.
7787 (OBS): Add common-exceptions.o.
7788 (common-exceptions.o): New rule.
7789 * utils.c (prepare_to_throw_exception): New function.
7790
e9bcb658
GB
77912014-08-29 Gary Benson <gbenson@redhat.com>
7792
7793 * config.in: Regenerate.
7794 * configure: Likewise.
7795
e3180625
GB
77962014-08-29 Gary Benson <gbenson@redhat.com>
7797
7798 * Makefile.in (SFILES): Add common/cleanups.c.
7799 (OBS): cleanups.o.
7800 (cleanups.o): New rule.
7801
e3d6ba5d
GB
78022014-08-29 Gary Benson <gbenson@redhat.com>
7803
7804 * utils.c (internal_vwarning): New function.
7805
7096e886
GB
78062014-08-28 Gary Benson <gbenson@redhat.com>
7807
7808 * utils.h (fatal): Remove declaration.
7809 * utils.c (fatal): Remove function.
7810
14ce3192
GB
78112014-08-28 Gary Benson <gbenson@redhat.com>
7812
7813 * tracepoint.c (gdb_agent_init): Replace fatal with
7814 perror_with_name.
7815 (initialize_tracepoint): Likewise.
7816
50278d59
GB
78172014-08-28 Gary Benson <gbenson@redhat.com>
7818
7819 * remote-utils.c (remote_prepare): Replace fatal with error.
7820
aa96c426
GB
78212014-08-28 Gary Benson <gbenson@redhat.com>
7822
7823 * linux-low.c (linux_async): Replace fatal with warning.
7824 Tidy up and return.
7825 (linux_start_non_stop): Return -1 if linux_async failed.
7826
f7160e97
GB
78272014-08-28 Gary Benson <gbenson@redhat.com>
7828
7829 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7830 gdb_assert.
7831 (i386_dr_low_get_addr): Remove vague comment.
7832 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7833 gdb_assert.
7834
38e08fca
GB
78352014-08-28 Gary Benson <gbenson@redhat.com>
7836
7837 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7838 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7839 internal_error.
7840 (linux_resume_one_lwp): Likewise.
7841 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7842 gdb_assert.
7843 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7844 with internal_error.
7845 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7846 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7847 (find_register_by_name): Replace fatal with internal_error.
7848 (find_regno): Likewise.
7849 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7850 * thread-db.c (thread_db_create_event): Likewise.
7851 (thread_db_load_search): Likewise.
7852 (try_thread_db_load_1): Likewise.
7853 * tracepoint.c (get_jump_space_head): Replace fatal with
7854 internal_error.
7855 (claim_trampoline_space): Likewise.
7856 (have_fast_tracepoint_trampoline_buffer): Likewise.
7857 (cmd_qtstart): Likewise.
7858 (stop_tracing): Likewise.
7859 (fast_tracepoint_collecting): Likewise.
7860 (target_malloc): Likewise.
7861 (download_tracepoint): Likewise.
7862 (download_trace_state_variables): Replace check with gdb_assert.
7863 (upload_fast_traceframes): Replace fatal with internal_error.
7864
34abf635
GB
78652014-08-19 Tom Tromey <tromey@redhat.com>
7866 Gary Benson <gbenson@redhat.com>
7867
7868 * Makefile.in (SFILES): Add common/common-debug.c.
7869 (OBS): Add common-debug.o.
7870 (common-debug.o): New rule.
7871 * debug.h (debug_printf): Don't declare.
7872 * debug.c (debug_printf): Renamed and rewritten as...
7873 (debug_vprintf): New function.
7874
f6e94d78
GB
78752014-08-19 Gary Benson <gbenson@redhat.com>
7876
7877 * utils.h: Do not include print-utils.h.
7878
9239eeab
GB
78792014-08-19 Tom Tromey <tromey@redhat.com>
7880 Gary Benson <gbenson@redhat.com>
7881
7882 * server.h: Add static assertion.
7883 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7884
ef87c8bb
GB
78852014-08-19 Tom Tromey <tromey@redhat.com>
7886 Gary Benson <gbenson@redhat.com>
7887
7888 * Makefile.in (SFILES): Add common/errors.c.
7889 (OBS): Add errors.o.
7890 (IPA_OBS): Add errors-ipa.o.
7891 (errors.o): New rule.
7892 (errors-ipa.o): Likewise.
7893 * utils.h (perror_with_name, error, warning): Don't declare.
7894 * utils.c (warning): Renamed and rewritten as...
7895 (vwarning): New function.
7896 (error): Renamed and rewritten as...
7897 (verror): New function.
7898 (internal_error): Renamed and rewritten as...
7899 (internal_verror): New function.
7900
bb974a24
GB
79012014-08-07 Gary Benson <gbenson@redhat.com>
7902
7903 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7904 * configure: Regenerate.
7905 * config.in: Likewise.
7906 * server.h: Do not include errno.h.
7907 * event-loop.c: Likewise.
7908 * hostio-errno.c: Likewise.
7909 * linux-low.c: Likewise.
7910 * remote-utils.c: Likewise.
7911 * spu-low.c: Likewise.
7912 * utils.c: Likewise.
7913 * gdbreplay.c: Unconditionally include errno.h.
7914
6d3d12eb
GB
79152014-08-07 Gary Benson <gbenson@redhat.com>
7916
7917 * server.h: Do not include string.h.
7918 * event-loop.c: Likewise.
7919 * linux-low.c: Likewise.
7920 * regcache.c: Likewise.
7921 * remote-utils.c: Likewise.
7922 * spu-low.c: Likewise.
7923 * utils.c: Likewise.
7924
dccbb609
GB
79252014-08-07 Gary Benson <gbenson@redhat.com>
7926
7927 * server.h: Do not include gdb_assert.h.
7928
e76df0d0
GB
79292014-08-07 Gary Benson <gbenson@redhat.com>
7930
7931 * server.h: Do not include common-utils.h.
7932
4cb9c816
GB
79332014-08-07 Gary Benson <gbenson@redhat.com>
7934
7935 * server.h: Do not include ptid.h.
7936 * notif.h: Likewise.
7937
3995eeee
GB
79382014-08-07 Gary Benson <gbenson@redhat.com>
7939
7940 * server.h: Do not include gdb_locale.h.
7941
cb9f1a9b
GB
79422014-08-07 Gary Benson <gbenson@redhat.com>
7943
7944 * server.h: Do not include gdb/signals.h.
7945 * win32-low.c: Likewise.
7946
a5fceff8
GB
79472014-08-07 Gary Benson <gbenson@redhat.com>
7948
7949 * server.h: Do not include pathmax.h.
7950
b9391142
GB
79512014-08-07 Gary Benson <gbenson@redhat.com>
7952
7953 * server.h: Do not include libiberty.h.
7954 * linux-bfin-low.c: Likewise.
7955
0e443c87
GB
79562014-08-07 Gary Benson <gbenson@redhat.com>
7957
7958 * server.h: Do not include ansidecl.h.
7959
8ebb3f56
GB
79602014-08-07 Gary Benson <gbenson@redhat.com>
7961
7962 * linux-x86-low.c: Do not include stddef.h.
7963 * lynx-ppc-low.c: Likewise.
7964 * tracepoint.c: Likewise.
7965
8980bdf6
GB
79662014-08-07 Gary Benson <gbenson@redhat.com>
7967
7968 * server.h: Do not include stdarg.h.
7969 * nto-low.c: Likewise.
7970
d7096f71
GB
79712014-08-07 Gary Benson <gbenson@redhat.com>
7972
7973 * server.h: Do not include stdlib.h.
7974 * inferiors.c: Likewise.
7975 * linux-low.c: Likewise.
7976 * regcache.c: Likewise.
7977 * spu-low.c: Likewise.
7978 * tracepoint.c: Likewise.
7979 * utils.c: Likewise.
7980
d02f550d
GB
79812014-08-07 Gary Benson <gbenson@redhat.com>
7982
7983 * server.h: Do not include stdio.h.
7984 * linux-low.c: Likewise.
7985 * remote-utils.c: Likewise.
7986 * spu-low.c: Likewise.
7987 * utils.c: Likewise.
7988 * wincecompat.c: Likewise.
7989
87f6c4e3
GB
79902014-08-06 Gary Benson <gbenson@redhat.com>
7991
7992 * regcache.c (init_register_cache): Move conditionals inside if.
7993
7089dca4
GB
79942014-08-06 Gary Benson <gbenson@redhat.com>
7995
7996 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7997
462f517e
GB
79982014-07-31 Gary Benson <gbenson@redhat.com>
7999
8000 * ax.h: Do not include server.h.
8001 * gdbthread.h: Likewise.
8002 * lynx-low.h: Likewise.
8003 * notif.h: Likewise.
8004
976411d6
GB
80052014-07-30 Gary Benson <gbenson@redhat.com>
8006
8007 * server.h: Include common-defs.h.
8008 Do not include config.h or build-gnulib-gdbserver/config.h.
8009
d41f6d8e
GB
80102014-07-30 Gary Benson <gbenson@redhat.com>
8011
8012 * hostio-errno.c: Move server.h to top of includes list.
8013 * inferiors.c: Likewise.
8014 * linux-x86-low.c: Likewise.
8015 * notif.c: Include server.h.
8016
314c6a35
TT
80172014-07-24 Tom Tromey <tromey@redhat.com>
8018 Gary Benson <gbenson@redhat.com>
8019
8020 * server.h (CORE_ADDR): Now unsigned.
8021
69ff6be5
PA
80222014-07-16 Pedro Alves <palves@redhat.com>
8023
8024 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8025
ce9e3fe7
PA
80262014-07-15 Pedro Alves <palves@redhat.com>
8027
8028 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8029 copy.
8030
e76126e8
PA
80312014-07-11 Pedro Alves <palves@redhat.com>
8032
8033 * linux-low.c (kill_wait_lwp): New function, based on
8034 kill_one_lwp_callback, but use my_waitpid directly.
8035 (kill_one_lwp_callback, linux_kill): Use it.
8036
8e9db26e
PA
80372014-06-23 Pedro Alves <palves@redhat.com>
8038
8039 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8040 before setting DR0..DR3.
8041
698b3e08
GB
80422014-06-20 Gary Benson <gbenson@redhat.com>
8043
8044 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8045 * configure: Regenerated.
8046 * config.in: Likewise.
8047
125f8a3d
GB
80482014-06-20 Gary Benson <gbenson@redhat.com>
8049
8050 * Makefile.in (SFILES): Update locations for files moved
8051 from common to nat.
8052 (object file files): Reordered.
8053
42995dbd
GB
80542014-06-20 Gary Benson <gbenson@redhat.com>
8055
8056 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8057 (i386_dr_low_set_addr): Likewise.
8058 (i386_dr_low_get_addr): Likewise.
8059 (i386_dr_low_can_set_control): Likewise.
8060 (i386_dr_low_set_control): Likewise.
8061 (i386_dr_low_get_control): Likewise.
8062 (i386_dr_low_get_status): Likewise.
8063 (i386_get_debug_register_length): Likewise.
8064 * linux-x86-low.c (i386_dr_low_set_addr):
8065 Changed signature. Made static.
8066 (i386_dr_low_get_addr): Likewise.
8067 (i386_dr_low_set_control): Likewise.
8068 (i386_dr_low_get_control): Likewise.
8069 (i386_dr_low_get_status): Likewise.
8070 (i386_dr_low): New global variable.
8071 * win32-i386-low.c (i386_dr_low_set_addr):
8072 Changed signature. Made static.
8073 (i386_dr_low_get_addr): Likewise.
8074 (i386_dr_low_set_control): Likewise.
8075 (i386_dr_low_get_control): Likewise.
8076 (i386_dr_low_get_status): Likewise.
8077 (i386_dr_low): New global variable.
8078
e1d2394b
MS
80792014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8080
8081 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8082 * Makefile.in (AR, AR_FLAGS): Define.
8083 * configure: Regenerate.
8084
3a8ee006
GB
80852014-06-19 Gary Benson <gbenson@redhat.com>
8086
8087 * Makefile.in (i386-dregs.o): New rule.
8088 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8089 * i386-low.c (target.h): Remove include.
8090 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8091 (DR_CONTROL_SHIFT): Likewise.
8092 (DR_CONTROL_SIZE): Likewise.
8093 (DR_RW_EXECUTE): Likewise.
8094 (DR_RW_WRITE): Likewise.
8095 (DR_RW_READ): Likewise.
8096 (DR_RW_IORW): Likewise.
8097 (DR_LEN_1): Likewise.
8098 (DR_LEN_2): Likewise.
8099 (DR_LEN_4): Likewise.
8100 (DR_LEN_8): Likewise.
8101 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8102 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8103 (DR_ENABLE_SIZE): Likewise.
8104 (DR_LOCAL_SLOWDOWN): Likewise.
8105 (DR_GLOBAL_SLOWDOWN): Likewise.
8106 (DR_CONTROL_RESERVED): Likewise.
8107 (I386_DR_CONTROL_MASK): Likewise.
8108 (I386_DR_VACANT): Likewise.
8109 (I386_DR_LOCAL_ENABLE): Likewise.
8110 (I386_DR_GLOBAL_ENABLE): Likewise.
8111 (I386_DR_DISABLE): Likewise.
8112 (I386_DR_SET_RW_LEN): Likewise.
8113 (I386_DR_GET_RW_LEN): Likewise.
8114 (I386_DR_WATCH_HIT): Likewise.
8115 (i386_wp_op_t): Likewise.
8116 (i386_show_dr): Likewise.
8117 (i386_length_and_rw_bits): Likewise.
8118 (i386_insert_aligned_watchpoint): Likewise.
8119 (i386_remove_aligned_watchpoint): Likewise.
8120 (i386_handle_nonaligned_watchpoint): Likewise.
8121 i386_update_inferior_debug_regs(): Likewise.
8122 (i386_dr_insert_watchpoint): Likewise.
8123 (i386_dr_remove_watchpoint): Likewise.
8124 (i386_dr_region_ok_for_watchpoint): Likewise.
8125 (i386_dr_stopped_data_address): Likewise.
8126 (i386_dr_stopped_by_watchpoint): Likewise.
8127
8f26655c
GB
81282014-06-19 Gary Benson <gbenson@redhat.com>
8129
8130 * i386-low.c (i386_dr_show): Renamed to
8131 i386_show_dr and made static. All uses updated.
8132 (i386_dr_length_and_rw_bits): Renamed to
8133 i386_length_and_rw_bits and made static.
8134 All uses updated.
8135 (i386_dr_insert_aligned_watchpoint): Renamed to
8136 i386_insert_aligned_watchpoint and made static.
8137 All uses updated.
8138 (i386_dr_remove_aligned_watchpoint): Renamed to
8139 i386_remove_aligned_watchpoint and made static.
8140 All uses updated.
8141 (i386_dr_update_inferior_debug_regs): Renamed to
8142 i386_update_inferior_debug_regs and made static.
8143 All uses updated.
8144
b9228891
GB
81452014-06-18 Gary Benson <gbenson@redhat.com>
8146
5171def3
GB
8147 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8148 (i386_dr_low_can_set_control): Likewise.
8149 (i386_get_debug_register_length): Likewise.
8150 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8151 (i386_dr_low_can_set_control): Likewise.
8152 (i386_get_debug_register_length): Likewise.
8153
81542014-06-17 Gary Benson <gbenson@redhat.com>
8155
b9228891
GB
8156 * i386-low.h (i386-dregs.h): New include.
8157 (DR_FIRSTADDR): Now in i386-dregs.h.
8158 (DR_LASTADDR): Likewise.
8159 (DR_NADDR): Likewise.
8160 (DR_STATUS): Likewise.
8161 (DR_CONTROL): Likewise.
8162 (i386_debug_reg_state): Likewise.
8163 (i386_dr_insert_watchpoint): Likewise.
8164 (i386_dr_remove_watchpoint): Likewise.
8165 (i386_dr_region_ok_for_watchpoint): Likewise.
8166 (i386_dr_stopped_data_address): Likewise.
8167 (i386_dr_stopped_by_watchpoint): Likewise.
8168 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8169
4be83cc2
GB
81702014-06-18 Gary Benson <gbenson@redhat.com>
8171
8172 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8173 i386_dr_insert_watchpoint.
8174 (i386_low_remove_watchpoint): Renamed to
8175 i386_dr_remove_watchpoint.
8176 (i386_low_region_ok_for_watchpoint): Renamed to
8177 i386_dr_region_ok_for_watchpoint.
8178 (i386_low_stopped_data_address): Renamed to
8179 i386_dr_stopped_data_address.
8180 (i386_low_stopped_by_watchpoint): Renamed to
8181 i386_dr_stopped_by_watchpoint.
8182 * i386-low.c (i386_show_dr): Renamed to
8183 i386_dr_show and made nonstatic. All uses updated.
8184 (i386_length_and_rw_bits): Renamed to
8185 i386_dr_length_and_rw_bits and made nonstatic.
8186 All uses updated.
8187 (i386_insert_aligned_watchpoint): Renamed to
8188 i386_dr_insert_aligned_watchpoint and made nonstatic.
8189 All uses updated.
8190 (i386_remove_aligned_watchpoint): Renamed to
8191 i386_dr_remove_aligned_watchpoint and made nonstatic.
8192 All uses updated.
8193 (i386_update_inferior_debug_regs): Renamed to
8194 i386_dr_update_inferior_debug_regs and made nonstatic.
8195 All uses updated.
8196 (i386_low_insert_watchpoint): Renamed to
8197 i386_dr_insert_watchpoint. All uses updated.
8198 (i386_low_remove_watchpoint): Renamed to
8199 i386_dr_remove_watchpoint. All uses updated.
8200 (i386_low_region_ok_for_watchpoint): Renamed to
8201 i386_dr_region_ok_for_watchpoint. All uses updated.
8202 (i386_low_stopped_data_address): Renamed to
8203 i386_dr_stopped_data_address. All uses updated.
8204 (i386_low_stopped_by_watchpoint): Renamed to
8205 i386_dr_stopped_by_watchpoint. All uses updated.
8206
131aa0d4
GB
82072014-06-18 Gary Benson <gbenson@redhat.com>
8208
8209 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8210 (i386_dr_low_can_set_control): Likewise.
8211 (i386_insert_aligned_watchpoint): New check.
8212
d9305f7f
GB
82132014-06-18 Gary Benson <gbenson@redhat.com>
8214
8215 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8216 Renamed to state.
8217
e927c9fc
GB
82182014-06-18 Gary Benson <gbenson@redhat.com>
8219
8220 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8221 instead of fatal and error.
8222 (i386_handle_nonaligned_watchpoint): Likewise.
8223
1b6d4134
GB
82242014-06-18 Gary Benson <gbenson@redhat.com>
8225
8226 * i386-low.c (i386_get_debug_register_length): New macro.
8227 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8228 (i386_show_dr): Use debug_printf instead of fprintf. Use
8229 phex to format values.
8230
6e62758f
GB
82312014-06-18 Gary Benson <gbenson@redhat.com>
8232
8233 * i386-low.h: Comment changes.
8234 * i386-low.c: Likewise.
8235
fc6e2f03
GB
82362014-06-18 Gary Benson <gbenson@redhat.com>
8237
8238 * i386-low.c: Whitespace changes.
8239
f9d1eeed
TT
82402014-06-12 Tom Tromey <tromey@redhat.com>
8241
8242 * utils.c (freeargv): Remove.
8243
0b04e523
TT
82442014-06-12 Tom Tromey <tromey@redhat.com>
8245
8246 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8247 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8248 (parse_debug_format_options): Likewise.
8249 (gdbserver_usage): Likewise.
8250 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8251 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8252 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8253 against libiberty.
8254 ($(LIBGNU)): Depend on libiberty.
8255 (all-lib): Recurse into all subdirs.
8256 (install-only): Invoke "install" target in subdirs.
8257 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8258 targets.
8259 * configure: Rebuild.
8260 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8261 for vasprintf, vsnprintf, or gettimeofday.
8262 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8263 srv_tgtobj.
8264
270c9937
JB
82652014-06-05 Joel Brobecker <brobecker@adacore.com>
8266
8267 * development.sh: Delete.
8268 * Makefile.in (config.status): Adjust dependency on development.sh.
8269 * configure.ac: Adjust development.sh source call.
8270 * configure: Regenerate.
8271
0a261ed8
PA
82722014-06-02 Pedro Alves <palves@redhat.com>
8273
8274 * ax.c (gdb_free_agent_expr): New function.
8275 * ax.h (gdb_free_agent_expr): New declaration.
8276 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8277 list.
8278 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8279 static.
8280 (clear_breakpoint_conditions_and_commands): New function.
8281 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8282 (clear_breakpoint_conditions_and_commands): New declaration.
8283
e9dae05e
RR
82842014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8285
8286 * linux-aarch64-low.c (asm/ptrace.h): Include.
8287
5876f503
JK
82882014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8289
8290 Fix TLS access for -static -pthread.
8291 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8292 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8293 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8294
802e8e6d
PA
82952014-05-20 Pedro Alves <palves@redhat.com>
8296
8297 * linux-aarch64-low.c (aarch64_insert_point)
8298 (aarch64_remove_point): No longer check whether the type is
8299 supported here. Adjust to new interface.
8300 (the_low_target): Install aarch64_supports_z_point_type as
8301 supports_z_point_type method.
8302 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8303 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8304 instead of a Z packet char. Adjust.
8305 (arm_supports_z_point_type): New function.
8306 (arm_insert_point, arm_remove_point): Adjust to new interface.
8307 (the_low_target): Install arm_supports_z_point_type.
8308 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8309 (cris_insert_point, cris_remove_point): Adjust to new interface.
8310 Don't check whether the type is supported here.
8311 (the_low_target): Install cris_supports_z_point_type.
8312 * linux-low.c (linux_supports_z_point_type): New function.
8313 (linux_insert_point, linux_remove_point): Adjust to new interface.
8314 * linux-low.h (struct linux_target_ops) <insert_point,
8315 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8316 raw_breakpoint pointer parameter.
8317 <supports_z_point_type>: New method.
8318 * linux-mips-low.c (mips_supports_z_point_type): New function.
8319 (mips_insert_point, mips_remove_point): Adjust to new interface.
8320 Use mips_supports_z_point_type.
8321 (the_low_target): Install mips_supports_z_point_type.
8322 * linux-ppc-low.c (the_low_target): Install NULL as
8323 supports_z_point_type method.
8324 * linux-s390-low.c (the_low_target): Install NULL as
8325 supports_z_point_type method.
8326 * linux-sparc-low.c (the_low_target): Install NULL as
8327 supports_z_point_type method.
8328 * linux-x86-low.c (x86_supports_z_point_type): New function.
8329 (x86_insert_point): Adjust to new insert_point interface. Use
8330 insert_memory_breakpoint. Adjust to new
8331 i386_low_insert_watchpoint interface.
8332 (x86_remove_point): Adjust to remove_point interface. Use
8333 remove_memory_breakpoint. Adjust to new
8334 i386_low_remove_watchpoint interface.
8335 (the_low_target): Install x86_supports_z_point_type.
8336 * lynx-low.c (lynx_target_ops): Install NULL as
8337 supports_z_point_type callback.
8338 * nto-low.c (nto_supports_z_point_type): New.
8339 (nto_insert_point, nto_remove_point): Adjust to new interface.
8340 (nto_target_ops): Install nto_supports_z_point_type.
8341 * mem-break.c: Adjust intro comment.
8342 (struct raw_breakpoint) <raw_type, size>: New fields.
8343 <inserted>: Update comment.
8344 <shlib_disabled>: Delete field.
8345 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8346 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8347 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8348 (raw_bkpt_type_to_target_hw_bp_type): New function.
8349 (find_enabled_raw_code_breakpoint_at): New function.
8350 (find_raw_breakpoint_at): New type and size parameters. Use them.
8351 (insert_memory_breakpoint): New function, based off
8352 set_raw_breakpoint_at.
8353 (remove_memory_breakpoint): New function.
8354 (set_raw_breakpoint_at): Reimplement.
8355 (set_breakpoint): New, based on set_breakpoint_at.
8356 (set_breakpoint_at): Reimplement.
8357 (delete_raw_breakpoint): Go through the_target->remove_point
8358 instead of assuming memory breakpoints.
8359 (find_gdb_breakpoint_at): Delete.
8360 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8361 (find_gdb_breakpoint): New function.
8362 (set_gdb_breakpoint_at): Delete.
8363 (z_type_supported): New function.
8364 (set_gdb_breakpoint_1): New function, loosely based off
8365 set_gdb_breakpoint_at.
8366 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8367 (delete_gdb_breakpoint_at): Delete.
8368 (delete_gdb_breakpoint_1): New function, loosely based off
8369 delete_gdb_breakpoint_at.
8370 (delete_gdb_breakpoint): New function.
8371 (clear_gdb_breakpoint_conditions): Rename to ...
8372 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8373 breakpoint.
8374 (add_condition_to_breakpoint): Make static.
8375 (add_breakpoint_condition): Take a struct breakpoint pointer
8376 instead of an address. Adjust.
8377 (gdb_condition_true_at_breakpoint): Rename to ...
8378 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8379 z_type parameter.
8380 (gdb_condition_true_at_breakpoint): Reimplement.
8381 (add_breakpoint_commands): Take a struct breakpoint pointer
8382 instead of an address. Adjust.
8383 (gdb_no_commands_at_breakpoint): Rename to ...
8384 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8385 parameter. Return true if no breakpoint was found. Change debug
8386 output.
8387 (gdb_no_commands_at_breakpoint): Reimplement.
8388 (run_breakpoint_commands): Rename to ...
8389 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8390 and change return type to boolean.
8391 (run_breakpoint_commands): New function.
8392 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8393 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8394 breakpoint. Go through the_target->remove_point instead of
8395 assuming memory breakpoint.
8396 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8397 software and hardware breakpoints.
8398 (reinsert_raw_breakpoint): Go through the_target->insert_point
8399 instead of assuming memory breakpoint.
8400 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8401 software and hardware breakpoints.
8402 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8403 Check both software and hardware breakpoints.
8404 (validate_inserted_breakpoint): Assert the breakpoint is a
8405 software breakpoint. Set the inserted flag to -1 instead of
8406 setting shlib_disabled.
8407 (delete_disabled_breakpoints): Adjust.
8408 (validate_breakpoints): Only validate software breakpoints.
8409 Adjust to inserted flag change.
8410 (check_mem_read, check_mem_write): Skip breakpoint types other
8411 than software breakpoints. Adjust to inserted flag change.
8412 * mem-break.h (enum raw_bkpt_type): New enum.
8413 (raw_breakpoint, struct process_info): Forward declare.
8414 (Z_packet_to_target_hw_bp_type): Delete declaration.
8415 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8416 (set_gdb_breakpoint, delete_gdb_breakpoint)
8417 (clear_breakpoint_conditions): New declarations.
8418 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8419 (breakpoint_inserted_here): Update comment.
8420 (add_breakpoint_condition, add_breakpoint_commands): Replace
8421 address parameter with a breakpoint pointer parameter.
8422 (gdb_breakpoint_here): Update comment.
8423 (delete_gdb_breakpoint_at): Delete.
8424 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8425 * server.c (process_point_options): Take a struct breakpoint
8426 pointer instead of an address. Adjust.
8427 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8428 delete_gdb_breakpoint.
8429 * spu-low.c (spu_target_ops): Install NULL as
8430 supports_z_point_type method.
8431 * target.h: Include mem-break.h.
8432 (struct target_ops) <prepare_to_access_memory>: Update comment.
8433 <supports_z_point_type>: New field.
8434 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8435 instead of a char. Also take a raw breakpoint pointer.
8436 * win32-arm-low.c (the_low_target): Install NULL as
8437 supports_z_point_type.
8438 * win32-i386-low.c (i386_supports_z_point_type): New function.
8439 (i386_insert_point, i386_remove_point): Adjust to new interface.
8440 (the_low_target): Install i386_supports_z_point_type.
8441 * win32-low.c (win32_supports_z_point_type): New function.
8442 (win32_insert_point, win32_remove_point): Adjust to new interface.
8443 (win32_target_ops): Install win32_supports_z_point_type.
8444 * win32-low.h (struct win32_target_ops):
8445 <supports_z_point_type>: New method.
8446 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8447 instead of a char. Also take a raw breakpoint pointer.
8448
932539e3
PA
84492014-05-20 Pedro Alves <palves@redhat.com>
8450
8451 * mem-break.h: Include break-common.h.
8452 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8453 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8454 (Z_packet_to_target_hw_bp_type): New declaration.
8455 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8456 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8457 (Z_PACKET_ACCESS_WP): Delete macros.
8458 (Z_packet_to_hw_type): Delete function.
8459 * i386-low.h: Don't include break-common.h here.
8460 (Z_packet_to_hw_type): Delete declaration.
8461 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8462 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8463 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8464 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8465 * linux-aarch64-low.c: Don't include break-common.h here.
8466 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8467 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8468 (Z_packet_to_target_hw_bp_type): Delete function.
8469 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8470 function.
8471 (mips_insert_point, mips_remove_point): Use
8472 Z_packet_to_target_hw_bp_type.
8473
4ff0d3d8
PA
84742014-05-20 Pedro Alves <palves@redhat.com>
8475
8476 * linux-aarch64-low.c: Include break-common.h.
8477 (enum target_point_type): Delete.
8478 (Z_packet_to_point_type): Rename to ...
8479 (Z_packet_to_target_hw_bp_type): ... this, and return a
8480 target_hw_bp_type instead.
8481 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8482 instead of an enum target_point_type.
8483 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8484 breakpoint type.
8485 (aarch64_dr_state_insert_one_point)
8486 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8487 (aarch64_handle_aligned_watchpoint)
8488 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8489 Take an enum target_hw_bp_type instead of an enum
8490 target_point_type.
8491 (aarch64_supports_z_point_type): New function.
8492 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8493 use Z_packet_to_target_hw_bp_type.
8494
786dc519
JB
84952014-05-20 Joel Brobecker <brobecker@adacore.com>
8496
8497 * configure.ac: Only use -Werror by default when DEVELOPMENT
8498 is true.
8499 * configure: Regenerate.
8500
9e0aa64f
JK
85012014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8502
8503 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8504 * linux-x86-low.c (X86_64_USER_REGS): New.
8505 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8506
2b577b92
YQ
85072014-04-28 Yao Qi <yao@codesourcery.com>
8508
8509 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8510 name.
8511
94611da2
PA
85122014-04-25 Pedro Alves <palves@redhat.com>
8513
8514 PR server/16255
8515 * linux-low.c (linux_attach_fail_reason_string): New function.
8516 (linux_attach_lwp): Delete.
8517 (linux_attach_lwp_1): Rename to ...
8518 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8519 argument. Remove "initial" parameter. Return int instead of
8520 void. Don't error or warn here.
8521 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8522 failure to attach to the tgid. Call warning when failing to
8523 attach to an lwp.
8524 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8525 argument. Remove "initial" parameter. Return int instead of
8526 void. Don't error or warn here.
8527 (linux_attach_fail_reason_string): New declaration.
8528 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8529 interface change. Use linux_attach_fail_reason_string.
8530
01f9f808
MS
85312014-04-24 Michael Sturm <michael.sturm@mintel.com>
8532 Walfred Tedeschi <walfred.tedeschi@intel.com>
8533
8534 * Makefile.in: Added rules to handle new files
8535 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8536 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8537 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8538 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8539 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8540 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8541 x32-avx512-linux.o.
8542 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8543 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8544 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8545 i386/x32-avx512.xml.
8546 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8547 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8548 i386/x32-avx512-linux.xml.
8549 * i387-fp.c (num_avx512_k_registers): New constant for number
8550 of K registers.
8551 (num_avx512_zmmh_low_registers): New constant for number of
8552 lower ZMM registers (0-15).
8553 (num_avx512_zmmh_high_registers): New constant for number of
8554 higher ZMM registers (16-31).
8555 (num_avx512_ymmh_registers): New contant for number of higher
8556 YMM registers (ymm16-31 added by avx521 on x86_64).
8557 (num_avx512_xmm_registers): New constant for number of higher
8558 XMM registers (xmm16-31 added by AVX512 on x86_64).
8559 (struct i387_xsave): Add space for AVX512 registers.
8560 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8561 Add code to handle AVX512 registers.
8562 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8563 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8564 prototypei from generated file.
8565 (tdesc_amd64_avx512_linux): Likewise.
8566 (init_registers_x32_avx512_linux): Likewise.
8567 (tdesc_x32_avx512_linux): Likewise.
8568 (init_registers_i386_avx512_linux): Likewise.
8569 (tdesc_i386_avx512_linux): Likewise.
8570 (x86_64_regmap): Add AVX512 registers.
8571 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8572 mask.
8573 (initialize_low_arch): Add code to initialize AVX512 registers.
8574
51aa91f9
PA
85752014-04-23 Pedro Alves <palves@redhat.com>
8576
8577 * mem-break.c (find_gdb_breakpoint_at): Make static.
8578 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8579
a4165e94
PA
85802014-04-23 Pedro Alves <palves@redhat.com>
8581
8582 * i386-low.c: Don't include break-common.h here.
8583 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8584 prototype to take target_hw_bp_type as argument instead of a Z
8585 packet char.
8586 * i386-low.h: Include break-common.h here.
8587 (Z_packet_to_hw_type): Declare.
8588 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8589 prototypes.
8590 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8591 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8592 (x86_remove_point): Convert the packet number to a
8593 target_hw_bp_type before calling i386_low_remove_watchpoint.
8594 * win32-i386-low.c (i386_insert_point): Convert the packet number
8595 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8596 (i386_remove_point): Convert the packet number to a
8597 target_hw_bp_type before calling i386_low_remove_watchpoint.
8598
b8acf843
PA
85992014-04-23 Pedro Alves <palves@redhat.com>
8600
8601 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8602
d708bcd1
PA
86032014-04-10 Pedro Alves <palves@redhat.com>
8604
8605 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8606 Check if the condition or command is NULL before checking if the
8607 breakpoint is known. On success, return true.
8608 * mem-break.h (add_breakpoint_condition): Document return.
8609 (add_breakpoint_commands): Add describing comment.
8610 * server.c (skip_to_semicolon): New function.
8611 (process_point_options): Use it.
8612
2eec7d5b
PA
86132014-04-09 Pedro Alves <palves@redhat.com>
8614
8615 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8616 to lwpid_of.
8617
fa96cb38
PA
86182014-02-27 Pedro Alves <palves@redhat.com>
8619
8620 PR 12702
8621 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8622 macros.
8623 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8624 output.
8625 (last_thread_of_process_p): Take a PID argument instead of a
8626 thread pointer.
8627 (linux_wait_for_lwp): Delete.
8628 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8629 functions.
8630 (linux_low_filter_event): New function, party factored out from
8631 linux_wait_for_event.
8632 (linux_wait_for_event): Rename to ...
8633 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8634 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8635 sigsuspend. Check for zombie leaders.
8636 (linux_wait_for_event): Reimplement as wrapper around
8637 linux_wait_for_event_filtered.
8638 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8639 a normal or signal exit is seen, it's the whole process exiting.
8640 (wait_for_sigstop): No longer a for_each_inferior callback.
8641 Rewrite on top of linux_wait_for_event_filtered.
8642 (stop_all_lwps): Call wait_for_sigstop directly.
8643 * server.c (resume, handle_target_event): Handle
8644 TARGET_WAITKIND_NO_RESUMED.
8645
d763de10
JB
86462014-02-26 Joel Brobecker <brobecker@adacore.com>
8647
8648 * win32-low.c (psapi_get_dll_name,
8649 * win32_CreateToolhelp32Snapshot): Delete.
8650 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8651 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8652 Delete.
8653 (handle_load_dll): Add function description.
8654 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8655
850a0f76
JB
86562014-02-26 Joel Brobecker <brobecker@adacore.com>
8657
8658 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8659 Add comment.
8660 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8661 base address when calling win32_add_one_solib.
8662 (handle_load_dll): Delete local variable load_addr.
8663 Remove 0x1000 offset applied to DLL base address when calling
8664 win32_add_one_solib.
8665 (handle_unload_dll): Add comment.
8666
f25b3fc3
JB
86672014-02-26 Joel Brobecker <brobecker@adacore.com>
8668
8669 * win32-low.c (win32_add_all_dlls): Renames
8670 win32_ensure_ntdll_loaded. Rewrite function documentation.
8671 Adjust implementation to always load all DLLs.
8672 Add 0x1000 offset to DLL base address when calling
8673 win32_add_one_solib.
8674 (child_initialization_done): New static global.
8675 (do_initial_child_stuff): Set child_initialization_done to
8676 zero during child initialization, and 1 after. Replace call
8677 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8678 Add comment.
8679 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8680 (handle_unload_dll): Add function documentation.
8681 (get_child_debug_event): Ignore load and unload DLL events
8682 during child initialization.
8683
d86d4aaf
DE
86842014-02-20 Doug Evans <dje@google.com>
8685
3bc32da3 8686 Remove global all_lwps.
d86d4aaf
DE
8687 * inferiors.h (ptid_of): Move here from linux-low.h.
8688 (pid_of, lwpid_of): Ditto.
8689 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8690 parameter is a struct thread_info * now.
8691 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8692 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8693 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8694 directly.
8695 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8696 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8697 * linux-arm-low.c (update_registers_callback): Update, "entry"
8698 parameter is a struct thread_info * now.
8699 Fetch lwpid from current_inferior directly.
8700 (arm_insert_point): Pass &all_threads to find_inferior instead of
8701 &all_lwps.
8702 (arm_remove_point): Ditto.
8703 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8704 (arm_prepare_to_resume): Fetch pid from thread.
8705 (arm_read_description): Fetch lwpid from current_inferior directly.
8706 * linux-low.c (all_lwps): Delete.
8707 (delete_lwp): Delete call to remove_inferior.
8708 (handle_extended_wait): Fetch lwpid from thread.
8709 (add_lwp): Don't set lwp->entry.id. Remove call to
8710 add_inferior_to_list.
8711 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8712 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8713 (kill_one_lwp_callback): Ditto.
8714 (linux_kill): Don't dereference NULL pointer.
8715 Fetch ptid,lwpid from thread.
8716 (get_detach_signal): Fetch ptid from thread.
8717 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8718 Simplify call to regcache_invalidate_thread.
8719 (delete_lwp_callback): Update, "entry" parameter is a
8720 struct thread_info * now. Fetch pid from thread.
8721 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8722 (status_pending_p_callback): Update, "entry" parameter is a
8723 struct thread_info * now. Fetch ptid from thread.
8724 (find_lwp_pid): Update, "entry" parameter is a
8725 struct thread_info * now.
8726 (linux_wait_for_lwp): Fetch pid from thread.
8727 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8728 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8729 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8730 (dequeue_one_deferred_signal): Ditto.
8731 (cancel_breakpoint): Fetch ptid from current_inferior.
8732 (linux_wait_for_event): Pass &all_threads to find_inferior,
8733 not &all_lwps. Fetch ptid, lwpid from thread.
8734 (count_events_callback): Update, "entry" parameter is a
8735 struct thread_info * now.
8736 (select_singlestep_lwp_callback): Ditto.
8737 (select_event_lwp_callback): Ditto.
8738 (cancel_breakpoints_callback): Ditto.
8739 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8740 not &all_lwps.
8741 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8742 (unsuspend_one_lwp): Update, "entry" parameter is a
8743 struct thread_info * now.
8744 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8745 not &all_lwps.
8746 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8747 Fetch lwpid from thread, not lwp.
8748 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8749 Pass &all_threads to find_inferior, not &all_lwps.
8750 (send_sigstop): Fetch lwpid from thread, not lwp.
8751 (send_sigstop_callback): Update, "entry" parameter is a
8752 struct thread_info * now.
8753 (suspend_and_send_sigstop_callback): Ditto.
8754 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8755 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8756 struct thread_info * now.
8757 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8758 from thread, lwp.
8759 (lwp_running): Update, "entry" parameter is a
8760 struct thread_info * now.
8761 (stop_all_lwps): Fetch ptid from thread.
8762 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8763 (linux_resume_one_lwp): Fetch lwpid from thread.
8764 (linux_set_resume_request): Update, "entry" parameter is a
8765 struct thread_info * now. Fetch pid, lwpid from thread.
8766 (resume_status_pending_p): Update, "entry" parameter is a
8767 struct thread_info * now.
8768 (need_step_over_p): Ditto. Fetch lwpid from thread.
8769 (start_step_over): Fetch lwpid from thread.
8770 (linux_resume_one_thread): Update, "entry" parameter is a
8771 struct thread_info * now. Fetch lwpid from thread.
8772 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8773 (proceed_one_lwp): Update, "entry" parameter is a
8774 struct thread_info * now. Fetch lwpid from thread.
8775 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8776 struct thread_info * now.
8777 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8778 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8779 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8780 directly.
8781 (regsets_store_inferior_registers): Ditto.
8782 (fetch_register, store_register): Ditto.
8783 (linux_read_memory, linux_write_memory): Ditto.
8784 (linux_request_interrupt): Ditto.
8785 (linux_read_auxv): Ditto.
8786 (linux_xfer_siginfo): Ditto.
8787 (linux_qxfer_spu): Ditto.
8788 (linux_qxfer_libraries_svr4): Ditto.
8789 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8790 moved to inferiors.h.
8791 (get_lwp): Delete.
8792 (get_thread_lwp): Update.
8793 (struct lwp_info): Delete member "entry". Simplify comment for
8794 member "thread".
8795 (all_lwps): Delete.
8796 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8797 current_inferior directly.
8798 (update_watch_registers_callback): Update, "entry" parameter is a
8799 struct thread_info * now. Fetch pid from thread.
8800 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8801 (mips_insert_point): Fetch lwpid from current_inferior.
8802 Pass &all_threads to find_inferior, not &all_lwps.
8803 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8804 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8805 directly.
8806 (mips_stopped_data_address): Ditto.
8807 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8808 directly.
8809 * linux-tile-low.c (tile_arch_setup): Ditto.
8810 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8811 (update_debug_registers_callback): Update, "entry" parameter is a
8812 struct thread_info * now. Fetch pid from thread.
8813 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8814 Pass &all_threads to find_inferior, not &all_lwps.
8815 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8816 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8817 Pass &all_threads to find_inferior, not &all_lwps.
8818 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8819 (i386_dr_low_get_status): Ditto.
8820 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8821 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8822 (x86_linux_read_description): Ditto.
8823 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8824
3b8361aa
DE
88252014-02-20 Doug Evans <dje@google.com>
8826
8827 * inferiors.c (get_first_inferior): Fix buglet.
8828
f7667f0d
DE
88292014-02-19 Doug Evans <dje@google.com>
8830
8831 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8832 * inferiors.c (add_thread): Change result type to struct thread_info *.
8833 All callers updated.
8834 (add_lwp): Call add_thread here instead of in callers.
8835 All callers updated.
8836 * linux-low.h (get_lwp_thread): Rewrite.
8837 (struct lwp_info): New member "thread".
8838
b3312d80
DE
88392014-02-19 Doug Evans <dje@google.com>
8840
8841 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8842 All callers updated.
8843
ecc6f45c
DE
88442014-02-19 Doug Evans <dje@google.com>
8845
8846 * inferiors.c (add_thread): Fix whitespace.
8847
649ebbca
DE
88482014-02-19 Doug Evans <dje@google.com>
8849
8850 * dll.c (clear_dlls): Replace accessing list implemention details
8851 with API function.
8852 * gdbthread.h (get_first_thread): Declare.
8853 * inferiors.c (for_each_inferior_with_data): New function.
8854 (get_first_thread): New function.
8855 (find_thread_ptid): Simplify.
8856 (get_first_inferior): New function.
8857 (clear_list): Delete.
8858 (one_inferior_p): New function.
8859 (clear_inferior_list): New function.
8860 (clear_inferiors): Update.
8861 * inferiors.h (for_each_inferior_with_data): Declare.
8862 (clear_inferior_list): Declare.
8863 (one_inferior_p): Declare.
8864 (get_first_inferior): Declare.
8865 * linux-low.c (linux_wait_for_event): Replace accessing list
8866 implemention details with API function.
8867 * server.c (target_running): Ditto.
8868 (accumulate_file_name_length): New function.
8869 (emit_dll_description): New function.
8870 (handle_qxfer_libraries): Replace accessing list implemention
8871 details with API function.
8872 (handle_qxfer_threads_worker): New function.
8873 (handle_qxfer_threads_proper): Replace accessing list implemention
8874 details with API function.
8875 (handle_query): Ditto.
8876 (visit_actioned_threads_callback_ftype): New typedef.
8877 (visit_actioned_threads_data): New struct.
8878 (visit_actioned_threads): Rewrite to be find_inferior callback.
8879 (resume): Call find_inferior.
8880 (handle_status): Replace accessing list implemention
8881 details with API function.
8882 (process_serial_event): Replace accessing list implemention details
8883 with API function.
8884 * target.c (set_desired_inferior): Replace accessing list implemention
8885 details with API function.
8886 * tracepoint.c (same_process_p): New function.
8887 (gdb_agent_about_to_close): Replace accessing list implemention
8888 details with API function.
8889 * win32-low.c (child_delete_thread): Replace accessing list
8890 implemention details with API function.
8891 (match_dll_by_basename): New function.
8892 (dll_is_loaded_by_basename): New function.
8893 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8894 details call to dll_is_loaded_by_basename.
8895
80894984
DE
88962014-02-19 Doug Evans <dje@google.com>
8897
8898 * dll.h (struct dll_info): Add comment.
8899 * gdbthread.h (struct thread_info): Add comment.
8900 (current_ptid): Simplify.
8901 * inferiors.c (add_process): Update.
8902 (remove_process): Update.
8903 * inferiors.h (struct process_info): Rename member "head" to "entry".
8904 * linux-low.c (delete_lwp): Update.
8905 (add_lwp): Update.
8906 (last_thread_of_process_p): Update.
8907 (kill_one_lwp_callback, linux_kill): Update.
8908 (status_pending_p_callback): Update.
8909 (wait_for_sigstop): Update. Simplify read of ptid.
8910 (start_step_over): Update.
8911 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8912 (get_lwp_thread): Update.
8913 (struct lwp_info): Rename member "head" to "entry".
8914 * regcache.h (inferior_list_entry): Delete.
8915 * server.c (kill_inferior_callback): Update.
8916 (detach_or_kill_inferior_callback): Update.
8917 (print_started_pid): Update.
8918 (print_attached_pid): Update.
8919 (process_serial_event): Simplify read of ptid.
8920 * thread-db.c (thread_db_create_event): Update.
8921 (thread_db_get_tls_address): Update.
8922 * win32-low.c (current_inferior_ptid): Simplify.
8923
46917d26
TT
89242014-02-19 Tom Tromey <tromey@redhat.com>
8925
8926 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8927 argument.
8928 (target_supports_btrace): Update.
8929
0759a81e
YQ
89302014-02-14 Yao Qi <yao@codesourcery.com>
8931
8932 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8933 (rsp-low-ipa.o): New target.
8934
a7191e8b
TT
89352014-02-12 Tom Tromey <tromey@redhat.com>
8936
8937 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8938 convert_ascii_to_int.
8939 * regcache.c (registers_to_string): Likewise.
8940 * remote-utils.c (decode_M_packet): Likewise.
8941 * server.c (process_serial_event): Likewise.
8942
ff0e980e
TT
89432014-02-12 Tom Tromey <tromey@redhat.com>
8944
8945 * server.c (handle_query, handle_v_run): Use hex2bin, not
8946 unhexify.
8947 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8948
e9371aff
TT
89492014-02-12 Tom Tromey <tromey@redhat.com>
8950
8951 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8952 convert_int_to_ascii.
8953 * regcache.c (registers_to_string, collect_register_as_string):
8954 Likewise.
8955 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8956 Likewise.
8957 * server.c (process_serial_event): Likewise.
8958 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8959 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8960
971dc0b8
TT
89612014-02-12 Tom Tromey <tromey@redhat.com>
8962
8963 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8964 bin2hex, not hexify.
8965 * tracepoint.c (cmd_qtstatus): Likewise.
8966
0a822afb
TT
89672014-02-12 Tom Tromey <tromey@redhat.com>
8968
8969 * remote-utils.c (monitor_output): Pass explicit length to
8970 hexify.
8971
9c3d6531
TT
89722014-02-12 Tom Tromey <tromey@redhat.com>
8973
8974 * tracepoint.c: Include rsp-low.h.
8975 * server.c: Include rsp-low.h.
8976 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8977 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8978 declare.
8979 * remote-utils.c: Include rsp-low.h.
8980 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8981 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8982 (convert_int_to_ascii, convert_ascii_to_int): Move to
8983 common/rsp-low.c.
8984 * regcache.c: Include rsp-low.h.
8985 * ax.c: Include rsp-low.h.
8986 * Makefile.in (SFILES): Add common/rsp-low.c.
8987 (OBS): Add rsp-low.o.
8988 (rsp-low.o): New target.
8989
01fd3ea5
TT
89902014-02-12 Tom Tromey <tromey@redhat.com>
8991
8992 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8993 Include print-utils.h.
8994 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8995 (plongest, thirty_two, phex_nz): Remove.
8996 * Makefile.in (SFILES): Add common/print-utils.c.
8997 (OBS): Add print-utils.o.
8998 (print-utils-ipa.o): New target.
8999 (print-utils.o): New target.
9000 (IPA_OBJS): Add print-utils-ipa.o.
9001
e99dc820
TT
90022014-02-06 Tom Tromey <tromey@redhat.com>
9003
9004 * Makefile.in (SFILES): Fix indentation.
9005
ee1e2d4f
DE
90062014-02-05 Doug Evans <dje@google.com>
9007
9008 * linux-low.c (linux_wait_for_event): Improve comment.
9009 (linux_wait_1): Keep current_inferior in sync with event_child.
9010
f5a02773
DE
90112014-01-22 Doug Evans <dje@google.com>
9012
9013 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9014
87ce2a04
DE
90152014-01-22 Doug Evans <dje@google.com>
9016
9017 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9018 * configure: Regenerate.
9019 * config.in: Regenerate.
9020 * Makefile.in (SFILES): Add debug.c.
9021 (OBS): Add debug.o.
9022 * debug.c: New file.
9023 * debug.h: New file.
9024 * linux-aarch64-low.c (*): Update all debugging printfs to use
9025 debug_printf instead of fprintf.
9026 * linux-arm-low.c (*): Ditto.
9027 * linux-cris-low.c (*): Ditto.
9028 * linux-crisv32-low.c (*): Ditto.
9029 * linux-m32r-low.c (*): Ditto.
9030 * linux-sparc-low.c (*): Ditto.
9031 * linux-x86.c (*): Ditto.
9032 * linux-low.c (*): Ditto.
9033 (linux_wait_1): Add calls to debug_enter, debug_exit.
9034 (linux_wait): Remove redundant debugging printf.
9035 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9036 (linux_resume, unstop_all_lwps): Ditto.
9037 * mem-break.c (*): Update all debugging printfs to use
9038 debug_printf instead of fprintf.
9039 * remote-utils.c (*): Ditto.
9040 * thread-db.c (*): Ditto.
9041 * server.c #include <ctype.h>, "gdb_vecs.h".
9042 (debug_threads): Moved to debug.c.
9043 (*): Update all debugging printfs to use debug_printf instead of
9044 fprintf.
9045 (start_inferior): Replace call to fflush with call to debug_flush.
9046 (monitor_show_help): Mention set debug-format.
9047 (parse_debug_format_options): New function.
9048 (handle_monitor_command): Handle "monitor set debug-format".
9049 (gdbserver_usage): Mention --debug-format.
9050 (main): Parse --debug-format.
9051 * server.h (debug_threads): Declaration moved to debug.h.
9052 #include "debug.h".
9053 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9054 trace_debug_1 that uses debug_printf.
9055 (tracepoint_look_up_symbols): Update all debugging printfs to use
9056 debug_printf instead of fprintf.
9057
e671835b
BS
90582014-01-20 Baruch Siach <baruch@tkos.co.il>
9059
9060 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9061 sys/ptrace.h.
9062
b5737fa9
PA
90632014-01-17 Pedro Alves <palves@redhat.com>
9064
ea38d2a9 9065 PR build/16445
c7faa97a
PA
9066 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9067 defined after including gdb_proc_service.h.
b5737fa9 9068
40ed484e
DE
90692014-01-16 Doug Evans <dje@google.com>
9070
9071 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9072 (match_dll): Use it.
9073
969c39fb
MM
90742014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9075
9076 * target.h (target_ops) <read_btrace>: Change parameters and
9077 return type to allow error reporting.
9078 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9079 trace reading errors on.
9080 * linux-low.c (linux_low_read_btrace): Pass trace reading
9081 errors on.
9082 (linux_low_disable_btrace): New.
9083
ab7f45ba
DE
90842014-01-15 Doug Evans <dje@google.com>
9085
9086 * inferiors.c (thread_id_to_gdb_id): Delete.
9087 * inferiors.h (thread_id_to_gdb_id): Delete.
9088
66af0f44
EZ
90892014-01-13 Eli Zaretskii <eliz@gnu.org>
9090
9091 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9092 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9093 versions.
9094
9939e131
PA
90952014-01-08 Pedro Alves <palves@redhat.com>
9096
9097 * server.c (handle_status): Don't discard previous queued stop
9098 replies or thread's pending status here.
9099 (main) <disconnection>: Do it here instead.
9100
b7ea362b
PA
91012014-01-08 Pedro Alves <palves@redhat.com>
9102
9103 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9104 * server.c (visit_actioned_threads, handle_pending_status): New
9105 function.
9106 (handle_v_cont): Factor out parts to ...
9107 (resume): ... this new function. If in all-stop, and a thread
9108 being resumed has a pending status, report it without actually
9109 resuming.
9110 (myresume): Adjust to use the new 'resume' function.
9111 (clear_pending_status_callback, set_pending_status_callback)
9112 (find_status_pending_thread_callback): New functions.
9113 (handle_status): Handle the case of multiple threads having
9114 interesting statuses to report. Report threads' real last signal
9115 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9116 with an interesting thread to report the status for, instead of
9117 always reporting the status of the first thread.
9118
28498c42
JB
91192014-01-01 Joel Brobecker <brobecker@adacore.com>
9120
9121 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9122 * gdbreplay.c (gdbreplay_version): Likewise.
9123
f45c82da
YZ
91242013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9125
9126 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9127 iov.iov_len with the real length in use.
9128
379a5e2d
JB
91292013-12-13 Joel Brobecker <brobecker@adacore.com>
9130
9131 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9132 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9133 for all targets that use win32-low.c.
9134 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9135 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9136
4210d83e
PA
91372013-12-13 Pedro Alves <palves@redhat.com>
9138
9139 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9140 if equal to TARGET_WAITKIND_LOADED.
9141 * win32-low.c (cached_status): New static global.
9142 (win32_wait): Add declaration.
9143 (do_initial_child_stuff): Flush all initial pending debug events
9144 up to the initial breakpoint.
9145 (win32_wait): If CACHED_STATUS was set, return that instead
9146 of doing a real wait. Remove the code resuming the execution
9147 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9148 during the initial phase. Also remove the code changing
9149 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9150 TARGET_WAITKIND_STOPPED.
9151
e7f0d979
YQ
91522013-12-11 Yao Qi <yao@codesourcery.com>
9153
9154 * notif.c (handle_notif_ack): Return 0 if no notification
9155 matches.
9156
ebcf782c
DE
91572013-11-20 Doug Evans <dje@google.com>
9158
9159 * linux-low.c (linux_set_resume_request): Fix comment.
9160
20ad9378
DE
91612013-11-20 Doug Evans <dje@google.com>
9162
9163 * linux-low.c (resume_status_pending_p): Tweak comment.
9164
a196ebeb
WT
91652013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9166
9167 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9168 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9169 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9170 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9171 (srv_amd64_regobj): Add amd64-mpx.o.
9172 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9173 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9174 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9175 * i387-fp.c (num_pl_bnd_register) Added constant.
9176 (num_pl_bnd_cfg_registers) Added constant.
9177 (struct i387_xsave) Added reserved area and MPX fields.
9178 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9179 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9180 function.
9181 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9182 (init_registers_amd64_mpx_linux): Declare new function.
9183 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9184 (x86_64_regmap): Add MPX registers.
9185 (x86_linux_read_description): Add MPX case.
9186 (initialize_low_arch): Initialize MPX targets.
9187
0080a2f6
TT
91882013-11-18 Tom Tromey <tromey@redhat.com>
9189
9190 * configure: Rebuild.
9191 * configure.ac: Don't check for stdlib.h.
9192 * gdbreplay.c: Unconditionally include stdlib.h.
9193
2978b111
TT
91942013-11-18 Tom Tromey <tromey@redhat.com>
9195
9196 * config.in: Rebuild.
9197 * configure: Rebuild.
9198 * configure.ac: Don't use AC_HEADER_DIRENT.
9199
a3d08894
TT
92002013-11-18 Tom Tromey <tromey@redhat.com>
9201
9202 * server.h: Don't check HAVE_STRING_H.
9203 * gdbreplay.c: Don't check HAVE_STRING_H.
9204 * configure: Rebuild.
9205
0a5dd17d
TT
92062013-11-18 Tom Tromey <tromey@redhat.com>
9207
9208 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9209 LIBGNU.
9210
1bd2f0ba
TT
92112013-11-08 Tom Tromey <tromey@redhat.com>
9212
9213 * configure, config.in: Rebuild.
9214 * configure.ac: Remove unused configury.
9215
3266f10b
TT
92162013-11-08 Tom Tromey <tromey@redhat.com>
9217
9218 * acinclude.m4: Include common.m4, codeset.m4.
9219 * configure, config.in: Rebuild.
9220 * configure.ac: Use GDB_AC_COMMON.
9221
6682d959
AA
92222013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9223
9224 * linux-s390-low.c (HWCAP_S390_TE): New define.
9225 (s390_arch_setup): Consider the TE field in the HWCAP for
9226 determining 'have_regset_tdb'.
9227
fd0a4d76
SDJ
92282013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9229
9230 PR gdb/16014
9231 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9232 call to sizeof.
9233
1a3d890b
PA
92342013-10-02 Pedro Alves <palves@redhat.com>
9235
9236 * server.c (process_serial_event): Don't output "GDBserver
9237 exiting" if GDB is connected through stdio.
9238 * target.c (mywait): Likewise, be silent if GDB is connected
9239 through stdio.
9240
97ad4581
JB
92412013-10-01 Joel Brobecker <brobecker@adacore.com>
9242
9243 * lynx-low.c (lynx_add_threads_after_attach): New function.
9244 (lynx_attach): Remove call to add_thread. Add call to
9245 lynx_add_threads_after_attach instead.
9246
5b4e221c
MF
92472013-09-28 Mike Frysinger <vapier@gentoo.org>
9248
9249 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9250 * config.in, configure: Regenerated.
9251
ee47b2f8
YQ
92522013-09-18 Yao Qi <yao@codesourcery.com>
9253
9254 PR server/15959
9255 * server.c (start_inferior): Clear 'resume_info'.
9256
d6707650 92572013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9258
d6707650
JW
9259 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9260 for each register.
9261
9243dd0e 92622013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9263
9243dd0e
JW
9264 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9265 linux-tile-low.o to srv_tgtobj.
9266
c623a6ef
WN
92672013-09-16 Will Newton <will.newton@linaro.org>
9268
9269 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9270 out regs.
9271
fb71d39e
PA
92722013-09-06 Pedro Alves <palves@redhat.com>
9273
9274 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9275 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9276 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9277 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9278 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9279 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9280
8e7e9910
PA
92812013-09-06 Pedro Alves <palves@redhat.com>
9282
9283 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9284 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9285
7c3a12ca
PA
92862013-09-06 Pedro Alves <palves@redhat.com>
9287
9288 * linux-amd64-ipa.c: Include tracepoint.h.
9289 * linux-i386-ipa.c: Include tracepoint.h.
9290
8eb3d7b6
RW
92912013-09-06 Ricard Wanderlof <ricardw@axis.com>
9292
9293 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9294 (ps_get_thread_area): New function.
9295
eddddb9d
RW
92962013-09-06 Ricard Wanderlof <ricardw@axis.com>
9297
9298 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9299 (initialize_low_arch): Call init_registers_crisv32 rather than
9300 init_register_crisv32.
9301
533b0600
PA
93022013-09-05 Pedro Alves <palves@redhat.com>
9303
9304 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9305 to ...
9306 * hostio.h: ... this new file.
9307 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9308 win32-low.c: Include hostio.h.
9309
0ce3d3b5
PA
93102013-09-05 Pedro Alves <palves@redhat.com>
9311
9312 * server.h (gdb_client_data, handler_func, callback_handler_func)
9313 (delete_file_handler, add_file_handler, append_callback_event)
9314 (delete_callback_event, start_event_loop, initialize_event_loop):
9315 Move to event-loop.h and include it.
9316 * event-loop.h: New file.
9317
799cdc37
PA
93182013-09-05 Pedro Alves <palves@redhat.com>
9319
9320 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9321 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9322 (loaded_dll, unloaded_dll): Move to ...
9323 * dll.h: ... this new file.
9324 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9325
6a6bbd9d
PA
93262013-09-05 Pedro Alves <palves@redhat.com>
9327
9328 * server.h (current_process, get_thread_process, all_processes)
9329 (add_inferior_to_list, for_each_inferior, current_inferior)
9330 (remove_inferior, add_process, remove_process, find_process_pid)
9331 (have_started_inferiors_p, have_attached_inferiors_p)
9332 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9333 (clear_inferiors, find_inferior, find_inferior_id)
9334 (inferior_target_data, set_inferior_target_data)
9335 (inferior_regcache_data, set_inferior_regcache_data): Move to
9336 inferiors.h, and include it.
9337 * inferiors.h: New file.
9338
f699aaba
PA
93392013-09-05 Pedro Alves <palves@redhat.com>
9340
9341 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9342 Move ...
72f4393d 9343 * ax.h: ... here.
f699aaba 9344
c144c7a0
PA
93452013-09-05 Pedro Alves <palves@redhat.com>
9346
9347 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9348 tracepoint.h.
9349 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9350 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9351 (handle_tracepoint_general_set, handle_tracepoint_query)
9352 (tracepoint_finished_step, tracepoint_was_hit)
9353 (release_while_stepping_state_list, current_traceframe)
9354 (in_readonly_region, traceframe_read_mem)
9355 (fetch_traceframe_registers, traceframe_read_sdata)
9356 (traceframe_read_info, struct fast_tpoint_collect_status)
9357 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9358 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9359 (supply_fast_tracepoint_registers)
9360 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9361 (ipa_tdesc, claim_trampoline_space)
9362 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9363 (agent_mem_read, agent_get_trace_state_variable_value)
9364 (agent_set_trace_state_variable_value, agent_tsv_read)
9365 (agent_mem_read_string, get_raw_reg_func_addr)
9366 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9367 * tracepoint.h: ... this new file.
9368
ff42e6ab
PA
93692013-09-05 Pedro Alves <palves@redhat.com>
9370
9371 * server.h (perror_with_name, error, fatal, warning, paddress)
9372 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9373 include it.
9374 * utils.h: New file.
9375
541af0f4
PA
93762013-09-05 Pedro Alves <palves@redhat.com>
9377
9378 * server.h (remote_debug, noack_mode, transport_is_reliable)
9379 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9380 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9381 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9382 (write_enn, initialize_async_io, enable_async_io)
9383 (disable_async_io, check_remote_input_interrupt_request)
9384 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9385 (dead_thread_notify, prepare_resume_reply)
9386 (decode_address_to_semicolon, decode_address, decode_m_packet)
9387 (decode_M_packet, decode_X_packet, decode_xfer_write)
9388 (decode_search_memory_packet, unhexify, hexify)
9389 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9390 (look_up_one_symbol, relocate_instruction)
9391 (monitor_output): Move to remote-utils.h, and include it.
9392 * remote-utils.h: New file.
9393
eebdf26b
PA
93942013-09-05 Pedro Alves <palves@redhat.com>
9395
9396 * server.h (_): Delete.
9397
3aafd2ff
PA
93982013-09-02 Pedro Alves <palves@redhat.com>
9399
9400 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9401 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9402 allocated.
9403 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9404
cee83bcb
PM
94052013-09-02 Pierre Muller <muller@sourceware.org>
9406
9407 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9408 or WriteProcessMemory complete successfully and handle
9409 ERROR_PARTIAL_COPY error.
9410
9a13b2fa
PA
94112013-09-02 Pedro Alves <palves@redhat.com>
9412
9413 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9414 error instead of EIO.
9415
602e3198
JK
94162013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9417
9418 PR server/15604
9419 * linux-low.c: Include filestuff.h.
9420 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9421 * lynx-low.c: Include filestuff.h.
9422 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9423 * server.c: Include filestuff.h.
9424 (main): Call notice_open_fds.
9425 * spu-low.c: Include filestuff.h.
9426 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9427
96d7229d
LM
94282013-08-22 Luis Machado <lgustavo@codesourcery.com>
9429
9430 * Makefile.in: Explain why ../target and ../nat are not
9431 listed as include file search paths.
9432 (linux-waitpid.o): New object file rule.
9433 * configure.srv (srv_native_linux_obj): New variable.
9434 Replace all occurrences of linux native object files with
9435 $srv_native_linux_obj.
9436 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9437 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9438 (linux_enable_event_reporting): Remove declaration.
9439 (my_waitpid): Moved to common/linux-waitpid.c.
9440 (linux_wait_for_event): Pass ptid when calling
9441 linux_enable_event_reporting.
9442 (linux_supports_tracefork_flag): Remove.
9443 (linux_enable_event_reporting): Likewise.
9444 (linux_tracefork_grandchild): Remove.
9445 (STACK_SIZE): Moved to common/linux-ptrace.c.
9446 (linux_tracefork_child): Remove.
9447 (linux_test_for_tracefork): Remove.
9448 (linux_look_up_symbols): Call linux_supports_traceclone.
9449 (initialize_low): Remove call to linux_test_for_tracefork.
9450 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9451 common/linux-ptrace.h.
9452 (PTRACE_TYPE_ARG4): Likewise.
9453 Include linux-ptrace.h.
9454
32940073
PA
94552013-08-21 Pedro Alves <palves@redhat.com>
9456
9457 * config.in: Renegerate.
9458
33b60d58 94592013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9460
33b60d58
LM
9461 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9462 (SFILES): Remove $(srcdir)/common/target-common.c and
9463 add $(srcdir)/target/waitstatus.c.
9464 (OBS): Remove target-common.o and add waitstatus.o.
9465 (server_h): Remove $(srcdir)/../common/target-common.h and
9466 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9467 and $(srcdir)/../target/waitstatus.h.
9468 (target-common.o): Remove.
9469 (waitstatus.o): New target object file.
9470 * target.h: Do not include target-common.h and
9471 include target/resume.h, target/wait.h and
9472 target/waitstatus.h.
9473
b8e1b30e
LM
94742013-08-13 Luis Machado <lgustavo@codesourcery.com>
9475
9476 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9477 to PTRACE_TYPE_ARG3.
9478 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9479 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9480 PTRACE_TYPE_ARG4.
9481 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9482 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9483
7a60ad40
YQ
94842013-07-27 Jie Zhang <jie@codesourcery.com>
9485 Daniel Jacobowitz <dan@codesourcery.com>
9486 Yao Qi <yao@codesourcery.com>
9487
9488 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9489 (mips-linux-watch.o): New rule.
9490 (mips_linux_watch_h): New variable.
9491 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9492 srv_tgtobj.
9493 * linux-mips-low.c: Include mips-linux-watch.h.
9494 (struct arch_process_info, struct arch_lwp_info): New.
9495 (update_watch_registers_callback): New function.
9496 (mips_linux_new_process, mips_linux_new_thread) New functions.
9497 (mips_linux_prepare_to_resume, mips_insert_point): New
9498 functions.
9499 (mips_remove_point, mips_stopped_by_watchpoint): New
9500 functions.
9501 (rsp_bp_type_to_target_hw_bp_type): New function.
9502 (mips_stopped_data_address): New function.
9503 (the_low_target): Add watchpoint support functions.
9504
de6f69ad
YQ
95052013-07-27 Yao Qi <yao@codesourcery.com>
9506
9507 * i386-low.c: Include break-common.h.
9508 (enum target_hw_bp_type): Remove.
9509
3360c0bf
LM
95102013-07-24 Luis Machado <lgustavo@codesourcery.com>
9511
9512 * Makefile.in (SFILES): /common/target-common.c.
9513 (OBS): Add target-common.o.
9514 (server_h): Add $(srcdir)/../common/target-common.h.
9515 (target-common.o): New target.
9516 * server.c (queue_stop_reply_callback): Free
9517 status string after use.
9518 * target.c (target_waitstatus_to_string): Remove.
9519 * target.h: Include target-common.h.
9520 (resume_kind): Likewise.
9521 (target_waitkind): Likewise.
9522 (target_waitstatus): Likewise.
9523 (TARGET_WNOHANG): Likewise.
9524
bd885420
YQ
95252013-07-04 Yao Qi <yao@codesourcery.com>
9526
9527 * Makefile.in (host_alias): Use @host_noncanonical@.
9528 (target_alias): Use @target_noncanonical@.
9529 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9530 ACX_NONCANONICAL_HOST.
9531 * configure: Regenerated.
9532
9533 Revert:
9534 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9535
9536 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9537 * configure: Rebuild.
9538 * Makefile.in (version_host, version_target): Get from configure.
9539 (version.c): Use $(version_host) and $(version_target).
9540
17ef446e
PA
95412013-07-03 Pedro Alves <palves@redhat.com>
9542
9543 * Makefile.in (config.status): Depend on development.sh.
9544 * acinclude.m4: Include libmcheck.m4.
9545 * configure: Regenerate.
9546
7a9a7487
MG
95472013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9548
9549 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9550 attribute inside the parentheses.
9551 (winapi_DebugSetProcessKillOnExit): Ditto.
9552 (winapi_DebugBreakProcess): Ditto.
9553 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9554
49b64de6
MG
95552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9556
9557 * notif.h (notif_event): Add a dummy member to avoid compiler
9558 errors.
9559
d5749ee7
PA
95602013-07-01 Pedro Alves <palves@redhat.com>
9561
9562 * hostio.c (HOSTIO_PATH_MAX): Define.
9563 (require_filename, handle_open, handle_unlink, handle_readlink):
9564 Use it.
9565
d8d2a3ee
PA
95662013-07-01 Pedro Alves <palves@redhat.com>
9567
9568 * server.h: Include "pathmax.h".
9569 * linux-low.c: Don't include sys/param.h.
9570 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9571 MAXPATHLEN.
9572 * win32-low.c: Don't include sys/param.h.
9573 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9574
bc7dea8d
PA
95752013-07-01 Pedro Alves <palves@redhat.com>
9576
9577 * event-loop.c: Don't check HAVE_UNISTD_H before including
9578 <unistd.h>.
9579 * gdbreplay.c: Likewise.
9580 * remote-utils.c: Likewise.
9581 * server.c: Likewise.
9582 * configure.ac: Don't check for unistd.h.
9583 * configure: Regenerate.
9584
d6c2da54
TT
95852013-06-28 Tom Tromey <tromey@redhat.com>
9586
9587 * Makefile.in (version.c): Use version.in, not
9588 common/version.in.
9589
257b6bec
MG
95902013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9591
9592 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9593 * configure: Rebuild.
9594 * Makefile.in (version_host, version_target): Get from configure.
9595 (version.c): Use $(version_host) and $(version_target).
9596
86ebe149
DK
95972013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9598
9599 Fix trace-status to output user name without trailing colon.
9600 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9601
f30aa5af
DK
96022013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9603
9604 Fix trace-status to output proper start-time and stop-time.
9605 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9606 output start time and stop time in hex as gdb expects.
9607
28a93511
YQ
96082013-06-26 Pedro Alves <pedro@codesourcery.com>
9609
9610 * tracepoint.c (build_traceframe_info_xml): Output trace state
9611 variables present in the trace buffer.
9612
01208463
TT
96132013-06-24 Tom Tromey <tromey@redhat.com>
9614
9615 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9616 create-version.sh.
9617 (version.o): Remove.
9618 * gdbreplay.c: Include version.h.
9619 (version, host_name): Don't declare.
9620 * server.h: Include version.h.
9621 (version, host_name): Don't declare.
9622
760256f9
PA
96232013-06-12 Pedro Alves <palves@redhat.com>
9624
9625 * linux-x86-low.c (linux_is_elf64): Delete global.
9626 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9627 with local linux_pid_exe_is_elf_64_file use.
9628
030031ee
PA
96292013-06-11 Pedro Alves <palves@redhat.com>
9630
9631 * linux-low.c (regset_disabled, disable_regset): New functions.
9632 (regsets_fetch_inferior_registers)
9633 (regsets_store_inferior_registers): Use them.
9634 (initialize_regsets_info); Don't allocate the disabled_regsets
9635 array here.
9636 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9637 comment.
9638
5da6eb0a
PA
96392013-06-11 Pedro Alves <palves@redhat.com>
9640
9641 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9642 xmalloc.
9643
7e5aaa09
PA
96442013-06-11 Pedro Alves <palves@redhat.com>
9645
9646 * linux-x86-low.c (initialize_low_arch): Call
9647 init_registers_x32_avx_linux.
9648
d878444c
JK
96492013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9650
9651 Fix compatibility with Android Bionic.
9652 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9653 it is not empty.
9654
3aee8918
PA
96552013-06-07 Pedro Alves <palves@redhat.com>
9656
5f2b57b5 9657 PR server/14823
3aee8918
PA
9658 * Makefile.in (OBS): Add tdesc.o.
9659 (IPA_OBJS): Add tdesc-ipa.o.
9660 (tdesc-ipa.o): New rule.
9661 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9662 interface.
9663 * linux-low.c (new_inferior): Delete.
9664 (disabled_regsets, num_regsets): Delete.
9665 (linux_add_process): Adjust to set the new per-process
9666 new_inferior flag.
9667 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9668 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9669 was a stop. When calling arch_setup, switch the current inferior
9670 to the thread that got an event.
9671 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9672 (regsets_fetch_inferior_registers)
9673 (regsets_store_inferior_registers): New regsets_info parameter.
9674 Adjust to use it.
9675 (linux_register_in_regsets): New regs_info parameter. Adjust to
9676 use it.
9677 (register_addr, fetch_register, store_register): New usrregs_info
9678 parameter. Adjust to use it.
9679 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9680 parameter regs_info. Adjust to use it.
9681 (linux_fetch_registers): Get the current inferior's regs_info, and
9682 adjust to use it.
9683 (linux_store_registers): Ditto.
9684 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9685 (initialize_low): Don't initialize the target_regsets here. Call
9686 initialize_low_arch.
9687 * linux-low.h (target_regsets): Delete declaration.
9688 (struct regsets_info): New.
9689 (struct usrregs_info): New.
9690 (struct regs_info): New.
9691 (struct process_info_private) <new_inferior>: New field.
9692 (struct linux_target_ops): Delete the num_regs, regmap, and
9693 regset_bitmap fields. New field regs_info.
9694 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9695 * i387-fp.c (num_xmm_registers): Delete.
9696 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9697 calls to new interface.
9698 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9699 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9700 Infer the number of xmm registers from the regcache's target
9701 description.
9702 * i387-fp.h (num_xmm_registers): Delete.
9703 * inferiors.c (add_thread): Don't install the thread's regcache
9704 here.
9705 * proc-service.c (gregset_info): Fetch the current inferior's
9706 regs_info. Adjust to use it.
9707 * regcache.c: Include tdesc.h.
9708 (register_bytes, reg_defs, num_registers)
9709 (gdbserver_expedite_regs): Delete.
9710 (get_thread_regcache): If the thread doesn't have a regcache yet,
9711 create one, instead of aborting gdbserver.
9712 (regcache_invalidate_one): Rename to ...
9713 (regcache_invalidate_thread): ... this.
9714 (regcache_invalidate_one): New.
9715 (regcache_invalidate): Only invalidate registers of the current
9716 process.
9717 (init_register_cache): Add target_desc parameter, and use it.
9718 (new_register_cache): Ditto. Assert the target description has a
9719 non zero registers_size.
9720 (regcache_cpy): Add assertions. Adjust.
9721 (realloc_register_cache, set_register_cache): Delete.
9722 (registers_to_string, registers_from_string): Adjust.
9723 (find_register_by_name, find_regno, find_register_by_number)
9724 (register_cache_size): Add target_desc parameter, and use it.
9725 (free_register_cache_thread, free_register_cache_thread_one)
9726 (regcache_release, register_cache_size): New.
9727 (register_size): Add target_desc parameter, and use it.
9728 (register_data, supply_register, supply_register_zeroed)
9729 (supply_regblock, supply_register_by_name, collect_register)
9730 (collect_register_as_string, collect_register_by_name): Adjust.
9731 * regcache.h (struct target_desc): Forward declare.
9732 (struct regcache) <tdesc>: New field.
9733 (init_register_cache, new_register_cache): Add target_desc
9734 parameter.
9735 (regcache_invalidate_thread): Declare.
9736 (regcache_invalidate_one): Delete declaration.
9737 (regcache_release): Declare.
9738 (find_register_by_number, register_cache_size, register_size)
9739 (find_regno): Add target_desc parameter.
9740 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9741 declarations.
9742 * remote-utils.c: Include tdesc.h.
9743 (outreg, prepare_resume_reply): Adjust.
9744 * server.c: Include tdesc.h.
9745 (gdbserver_xmltarget): Delete declaration.
9746 (get_features_xml, process_serial_event): Adjust.
9747 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9748 declare.
9749 (struct process_info) <tdesc>: New field.
9750 (ipa_tdesc): Declare.
9751 * tdesc.c: New file.
9752 * tdesc.h: New file.
9753 * tracepoint.c: Include tdesc.h.
9754 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9755 (get_context_regcache): Adjust to pass ipa_tdesc down.
9756 (do_action_at_tracepoint): Adjust to get the register cache size
9757 from the context regcache's description.
9758 (traceframe_walk_blocks): Adjust to get the register cache size
9759 from the current trace frame's description.
9760 (traceframe_get_pc): Adjust to get current trace frame's
9761 description and pass it down.
9762 (gdb_collect): Adjust to get the register cache size from the
9763 IPA's description.
9764 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9765 (gdbserver_xmltarget): Delete.
9766 (initialize_low_tracepoint): Set the ipa's target description.
9767 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9768 (initialize_low_tracepoint): Set the ipa's target description.
9769 * linux-x86-low.c: Include tdesc.h.
9770 [__x86_64__] (is_64bit_tdesc): New.
9771 (ps_get_thread_area, x86_get_thread_area): Use it.
9772 (i386_cannot_store_register): Rename to ...
9773 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9774 (i386_cannot_fetch_register): Rename to ...
9775 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9776 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9777 to new interface.
9778 (target_regsets): Rename to ...
9779 (x86_regsets): ... this.
9780 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9781 interface.
9782 (x86_siginfo_fixup): Use is_64bit_tdesc.
9783 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9784 (tdesc_x32_avx_linux, tdesc_x32_linux)
9785 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9786 Declare.
9787 (x86_linux_update_xmltarget): Delete.
9788 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9789 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9790 (AMD64_LINUX_USER64_CS): New.
9791 (x86_linux_read_description): New, based on
9792 x86_linux_update_xmltarget.
9793 (same_process_callback): New.
9794 (x86_arch_setup_process_callback): New.
9795 (x86_linux_update_xmltarget): New.
9796 (x86_regsets_info): New.
9797 (amd64_linux_regs_info): New.
9798 (i386_linux_usrregs_info): New.
9799 (i386_linux_regs_info): New.
9800 (x86_linux_regs_info): New.
9801 (x86_arch_setup): Reimplement.
9802 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9803 (x86_emit_ops): Ditto.
9804 (the_low_target): Adjust. Install x86_linux_regs_info,
9805 x86_cannot_fetch_register, and x86_cannot_store_register.
9806 (initialize_low_arch): New.
9807 * linux-ia64-low.c (tdesc_ia64): Declare.
9808 (ia64_fetch_register): Adjust.
9809 (ia64_usrregs_info, regs_info): New globals.
9810 (ia64_regs_info): New function.
9811 (the_low_target): Adjust.
9812 (initialize_low_arch): New function.
9813 * linux-sparc-low.c (tdesc_sparc64): Declare.
9814 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9815 Adjust.
9816 (sparc_arch_setup): New function.
9817 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9818 (the_low_target): Adjust.
9819 (initialize_low_arch): New function.
9820 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9821 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9822 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9823 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9824 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9825 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9826 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9827 (tdesc_powerpc_isa205_vsx64l): Declare.
9828 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9829 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9830 (ppc_set_pc, ppc_get_hwcap): Adjust.
9831 (ppc_usrregs_info): Forward declare.
9832 (!__powerpc64__) ppc_regmap_adjusted: New global.
9833 (ppc_arch_setup): Adjust to the current process'es target
9834 description.
9835 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9836 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9837 (ppc_store_evrregset): Adjust.
9838 (target_regsets): Rename to ...
9839 (ppc_regsets): ... this, and make static.
9840 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9841 (ppc_regs_info): New function.
9842 (the_low_target): Adjust.
9843 (initialize_low_arch): New function.
9844 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9845 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9846 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9847 (tdesc_s390x_linux64v2): Declare.
9848 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9849 (s390_fill_gregset, s390_store_last_break): Adjust.
9850 (target_regsets): Rename to ...
9851 (s390_regsets): ... this, and make static.
9852 (s390_get_pc, s390_set_pc): Adjust.
9853 (s390_get_hwcap): New target_desc parameter, and use it.
9854 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9855 (s390_arch_setup): Adjust to set the current process'es target
9856 description. Don't adjust the regmap.
9857 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9858 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9859 (regs_info_3264): New globals.
9860 (s390_regs_info): New function.
9861 (the_low_target): Adjust.
9862 (initialize_low_arch): New function.
9863 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9864 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9865 [__mips64] (init_registers_mips_linux)
9866 (init_registers_mips_dsp_linux): Delete defines.
9867 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9868 (have_dsp): New global.
9869 (mips_read_description): New, based on mips_arch_setup.
9870 (mips_arch_setup): Reimplement.
9871 (get_usrregs_info): New function.
9872 (mips_cannot_fetch_register, mips_cannot_store_register)
9873 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9874 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9875 (target_regsets): Rename to ...
9876 (mips_regsets): ... this, and make static.
9877 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9878 (dsp_regs_info, regs_info): New globals.
9879 (mips_regs_info): New function.
9880 (the_low_target): Adjust.
9881 (initialize_low_arch): New function.
9882 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9883 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9884 Declare.
9885 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9886 (arm_read_description): New, with bits factored from
9887 arm_arch_setup.
9888 (arm_arch_setup): Reimplement.
9889 (target_regsets): Rename to ...
9890 (arm_regsets): ... this, and make static.
9891 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9892 (arm_regs_info): New function.
9893 (the_low_target): Adjust.
9894 (initialize_low_arch): New function.
9895 * linux-m68k-low.c (tdesc_m68k): Declare.
9896 (target_regsets): Rename to ...
9897 (m68k_regsets): ... this, and make static.
9898 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9899 (m68k_regs_info): New function.
9900 (m68k_arch_setup): New function.
9901 (the_low_target): Adjust.
9902 (initialize_low_arch): New function.
9903 * linux-sh-low.c (tdesc_sharch): Declare.
9904 (target_regsets): Rename to ...
9905 (sh_regsets): ... this, and make static.
9906 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9907 (sh_regs_info, sh_arch_setup): New functions.
9908 (the_low_target): Adjust.
9909 (initialize_low_arch): New function.
9910 * linux-bfin-low.c (tdesc_bfin): Declare.
9911 (bfin_arch_setup): New function.
9912 (bfin_usrregs_info, regs_info): New globals.
9913 (bfin_regs_info): New function.
9914 (the_low_target): Adjust.
9915 (initialize_low_arch): New function.
9916 * linux-cris-low.c (tdesc_cris): Declare.
9917 (cris_arch_setup): New function.
9918 (cris_usrregs_info, regs_info): New globals.
9919 (cris_regs_info): New function.
9920 (the_low_target): Adjust.
9921 (initialize_low_arch): New function.
9922 * linux-cris-low.c (tdesc_crisv32): Declare.
9923 (cris_arch_setup): New function.
9924 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9925 (cris_regs_info): New function.
9926 (the_low_target): Adjust.
9927 (initialize_low_arch): New function.
9928 * linux-m32r-low.c (tdesc_m32r): Declare.
9929 (m32r_arch_setup): New function.
9930 (m32r_usrregs_info, regs_info): New globals.
9931 (m32r_regs_info): Adjust.
9932 (initialize_low_arch): New function.
9933 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9934 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9935 (tic6x_usrregs_info): Forward declare.
9936 (tic6x_read_description): New function, based on ...
9937 (tic6x_arch_setup): ... this. Reimplement.
9938 (target_regsets): Rename to ...
9939 (tic6x_regsets): ... this, and make static.
9940 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9941 (tic6x_regs_info): New function.
9942 (the_low_target): Adjust.
9943 (initialize_low_arch): New function.
9944 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9945 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9946 (target_regsets): Rename to ...
9947 (xtensa_regsets): ... this, and make static.
9948 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9949 globals.
9950 (xtensa_arch_setup, xtensa_regs_info): New functions.
9951 (the_low_target): Adjust.
9952 (initialize_low_arch): New function.
9953 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9954 (nios2_arch_setup): Set the current process'es tdesc.
9955 (target_regsets): Rename to ...
9956 (nios2_regsets): ... this.
9957 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9958 (nios2_regs_info): New function.
9959 (the_low_target): Adjust.
9960 (initialize_low_arch): New function.
a261b8f5
PA
9961 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9962 (aarch64_arch_setup): Set the current process'es tdesc.
9963 (target_regsets): Rename to ...
9964 (aarch64_regsets): ... this.
9965 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9966 (aarch64_regs_info): New function.
9967 (the_low_target): Adjust.
9968 (initialize_low_arch): New function.
3aee8918
PA
9969 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9970 globals.
9971 (target_regsets): Rename to ...
9972 (tile_regsets): ... this.
9973 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9974 (tile_regs_info): New function.
9975 (tile_arch_setup): Set the current process'es tdesc.
9976 (the_low_target): Adjust.
9977 (initialize_low_arch): New function.
9978 * spu-low.c (tdesc_spu): Declare.
9979 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9980 * win32-arm-low.c (tdesc_arm): Declare.
9981 (arm_arch_setup): New function.
9982 (the_low_target): Install arm_arch_setup instead of
9983 init_registers_arm.
9984 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9985 (init_windows_x86): Rename to ...
9986 (i386_arch_setup): ... this. Set `win32_tdesc'.
9987 (the_low_target): Adjust.
9988 * win32-low.c (win32_tdesc): New global.
9989 (child_add_thread): Don't create the thread cache here.
9990 (do_initial_child_stuff): Set the new process'es tdesc.
9991 * win32-low.h (struct target_desc): Forward declare.
9992 (win32_tdesc): Declare.
9993 * lynx-i386-low.c (tdesc_i386): Declare global.
9994 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9995 * lynx-low.c (lynx_tdesc): New global.
9996 (lynx_add_process): Set the new process'es tdesc.
9997 * lynx-low.h (struct target_desc): Forward declare.
9998 (lynx_tdesc): Declare global.
9999 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10000 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10001 * nto-low.c (nto_tdesc): New global.
10002 (do_attach): Set the new process'es tdesc.
10003 * nto-low.h (struct target_desc): Forward declare.
10004 (nto_tdesc): Declare.
10005 * nto-x86-low.c (tdesc_i386): Declare.
10006 (nto_x86_arch_setup): Set `nto_tdesc'.
10007
b1fbec62
GB
100082013-06-04 Gary Benson <gbenson@redhat.com>
10009
10010 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10011 to qSupported response when appropriate.
10012 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10013 with nonzero-length annex.
10014 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10015 arguments supplied in annex.
10016
d1ec4ce7
DE
100172013-05-31 Doug Evans <dje@google.com>
10018
ac44adcb 10019 PR server/15594
d1ec4ce7
DE
10020 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10021 64 bits in 64-cross-32 environment.
10022
9b25f2d3
PA
100232013-05-28 Pedro Alves <palves@redhat.com>
10024
10025 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10026 (aarch64-without-fpu.c): Delete rule.
10027 * configure.srv (aarch64*-*-linux*): Remove references to
10028 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10029 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10030 declaration.
10031
6740dc9c
PA
100322013-05-24 Pedro Alves <palves@redhat.com>
10033
10034 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10035 instead of strchr/decode_address. Error if the range isn't split
10036 with a ','. Don't assume there's be a ':' in the action.
10037
c2d6af84
PA
100382013-05-23 Yao Qi <yao@codesourcery.com>
10039 Pedro Alves <palves@redhat.com>
10040
10041 * linux-low.c (lwp_in_step_range): New function.
10042 (linux_wait_1): If the thread was range stepping and stopped
10043 outside the stepping range, report the stop to GDB. Otherwise,
10044 continue stepping. Add range stepping debug output.
10045 (linux_set_resume_request): Copy the step range from the resume
10046 request to the lwp.
10047 (linux_supports_range_stepping): New.
10048 (linux_target_ops) <supports_range_stepping>: Set to
10049 linux_supports_range_stepping.
10050 * linux-low.h (struct linux_target_ops)
10051 <supports_range_stepping>: New field.
10052 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10053 * linux-x86-low.c (x86_supports_range_stepping): New.
10054 (the_low_target) <supports_range_stepping>: Set to
10055 x86_supports_range_stepping.
10056 * server.c (handle_v_cont): Handle 'r' action.
10057 (handle_v_requests): Append ";r" if the target supports range
10058 stepping.
10059 * target.h (struct thread_resume) <step_range_start,
10060 step_range_end>: New fields.
10061 (struct target_ops) <supports_range_stepping>:
10062 New field.
10063 (target_supports_range_stepping): New macro.
10064
58794e1a
JB
100652013-05-17 Joel Brobecker <brobecker@adacore.com>
10066
10067 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10068 confusion in comment.
10069
d631c5a7
JB
100702013-05-17 Joel Brobecker <brobecker@adacore.com>
10071
10072 * lynx-low.c (struct process_info_private): New type.
10073 (lynx_add_process): New function.
10074 (lynx_create_inferior, lynx_attach): Replace calls to
10075 add_process by calls to lynx_add_process.
10076 (lynx_resume): If PTID is null, then try using
10077 current_process()->private->last_wait_event_ptid.
10078 Add comments.
10079 (lynx_clear_inferiors): Delete. The contents of that function
10080 has been inlined in lynx_mourn;
10081 (lynx_wait_1): Save the ptid in the process's private data.
10082 (lynx_mourn): Free the process' private data. Replace call
10083 to lynx_clear_inferiors by call to clear_inferiors.
10084
96f7a20f
YQ
100852013-05-17 Yao Qi <yao@codesourcery.com>
10086
10087 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10088 the right place.
10089
db0dfaa0
LM
100902013-05-16 Luis Machado <lgustavo@codesourcery.com>
10091
10092 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10093 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10094 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10095 PT_TEXT_END_ADDR guards. Update comments.
10096 (linux_target_op) <read_offsets>: Conditionally define to
10097 linux_read_offsets if the target is UCLIBC and if it defines
10098 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10099
68f5f838
SL
101002013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10101 Andrew Jenner <andrew@codesourcery.com>
10102
10103 * Makefile.in (SFILES): Add linux-nios2-low.c.
10104 (clean): Add action to delete nios2-linux.c.
10105 (nios2-linux.c): New rule.
10106 * configure.srv: Add nios2*-*-linux*.
10107 * linux-nios2-low.c: New.
10108
1ebff1fd
HAQ
101092013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10110
10111 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10112
f6150862
HZ
101132013-04-25 Hui Zhu <hui@codesourcery.com>
10114
10115 PR gdb/15186
f6150862
HZ
10116 * ax.c (ax_printf): Add fflush.
10117
614c279d
TT
101182013-04-22 Tom Tromey <tromey@redhat.com>
10119
10120 * Makefile.in (SFILES): Add filestuff.c.
10121 (OBS): Add filestuff.o.
10122 (filestuff.o): New target.
10123 * config.in, configure: Rebuild.
10124 * configure.ac: Check for fdwalk, pipe2.
10125
7d4e5717
PA
101262013-04-17 Pedro Alves <palves@redhat.com>
10127
10128 * configure.ac (USE_THREAD_DB): Delete variable.
10129 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10130 Don't AC_SUBST USE_THREAD_DB.
10131 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10132 * config.in, configure: Regenerate.
10133
d5c93e41
PA
101342013-04-16 Pedro Alves <palves@redhat.com>
10135
10136 * linux-low.h (struct lwp_info) <thread_known>: Move under
10137 the USE_THREAD_DB #ifdef.
10138
04f5fe89
PA
101392013-04-16 Pedro Alves <palves@redhat.com>
10140
10141 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10142 (linux-low.o): Delete rule.
10143 * linux-low.h: Always include "gdb_thread_db.h" instead of
10144 conditionally including thread_db.h.
10145 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10146 HAVE_THREAD_DB_H.
10147
480b27bf
JK
101482013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10149
10150 * Makefile.in (install-only): Fix make install regression.
10151
43662968
JK
101522013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10153
10154 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10155 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10156 installation.
10157 * gdbserver.1: Remove.
10158
3e74e146
PA
101592013-03-22 Pedro Alves <palves@redhat.com>
10160
10161 * linux-low.c (handle_extended_wait): Don't call
10162 linux_enable_event_reporting.
10163
a8347a2a
TT
101642013-03-15 Tony Theodore <tonyt@logyst.com>
10165
10166 PR build/9098:
10167 * Makefile.in (SHELL): Use @SHELL@.
10168
eeb56fa7
SDJ
101692013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10170
10171 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10172 compiler warning.
10173
4fa7e2ff
JB
101742013-03-13 Joel Brobecker <brobecker@adacore.com>
10175
10176 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10177 Remove extraneous NULL element.
10178
8ddb1965
YQ
101792013-03-13 Yao Qi <yao@codesourcery.com>
10180
10181 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10182 'V' block in trace frame.
10183
9accd112
MM
101842013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10185
10186 * target.h (struct target_ops): Add btrace ops.
10187 (target_supports_btrace): New macro.
10188 (target_enable_btrace): New macro.
10189 (target_disable_btrace): New macro.
10190 (target_read_btrace): New macro.
10191 * gdbthread.h (struct thread_info): Add btrace field.
10192 * server.c: Include btrace-common.h.
10193 (handle_btrace_general_set): New function.
10194 (handle_btrace_enable): New function.
10195 (handle_btrace_disable): New function.
10196 (handle_general_set): Call handle_btrace_general_set.
10197 (handle_qxfer_btrace): New function.
10198 (struct qxfer qxfer_packets[]): Add btrace entry.
10199 * inferiors.c (remove_thread): Disable btrace.
10200 * linux-low: Include linux-btrace.h.
10201 (linux_low_enable_btrace): New function.
10202 (linux_low_read_btrace): New function.
10203 (linux_target_ops): Add btrace ops.
10204 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10205 Add srv_linux_btrace=yes.
10206 (x86_64-*-linux*): Add linux-btrace.o.
10207 Add srv_linux_btrace=yes.
10208 * configure.ac: Define HAVE_LINUX_BTRACE.
10209 * config.in: Regenerated.
10210 * configure: Regenerated.
10211
5cc22e4c
MM
102122013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10213
10214 * server.c (handle_qxfer): Preserve error message if -3 is
10215 returned.
10216 (qxfer): Document the -3 return value.
10217
7c97f91e
MM
102182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10219
10220 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10221 (linux_btrace_h): New variable.
10222 (linux-btrace.o): New rule.
10223
be9a119c 102242013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10225 Hafiz Abid Qadeer <abidh@codesourcery.com>
10226
10227 * tracepoint.c (trace_buffer_size): New global.
10228 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10229 (init_trace_buffer): Change to one-argument function. Allocate
10230 trace buffer memory.
10231 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10232 handle QTBuffer:size packet.
10233 (cmd_bigqtbuffer_size): New function.
10234 (initialize_tracepoint): Call init_trace_buffer with
10235 DEFAULT_TRACE_BUFFER_SIZE.
10236 * server.c (handle_query): Add QTBuffer:size in the
10237 supported packets.
10238
e64f7499
YQ
102392013-03-07 Yao Qi <yao@codesourcery.com>
10240
10241 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10242 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10243 of -1.
10244 (cmd_qtsp): Adjust condition. Do post increment.
10245 Set cur_action and cur_step_action back to 0.
10246
f0ae6fc3
PA
102472013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10248
10249 PR server/15236
10250 * linux-low.c (linux_write_memory): Return early success if LEN is
10251 zero.
10252
b5b0b0af
CV
102532013-03-05 Corinna Vinschen <vinschen@redhat.de>
10254
334ad4a8 10255 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10256
589bc927
TT
102572013-02-28 Tom Tromey <tromey@redhat.com>
10258
10259 * configure.ac: Invoke AC_SYS_LARGEFILE.
10260 * configure, config.in: Rebuild.
10261
dfe07582
CV
102622013-02-28 Corinna Vinschen <vinschen@redhat.com>
10263
10264 * win32-low.c: Throughout, fix format strings and casts of
10265 printf-like functions to avoid type related warnings on all
10266 platforms.
10267 (get_child_debug_event): Print dwDebugEventCode as hex since
10268 that's how it's usually documented.
10269
736cd585
YQ
102702013-02-28 Yao Qi <yao@codesourcery.com>
10271
10272 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10273 pulongest.
10274
e1f58301
JW
102752013-02-27 Jiong Wang <jiwang@tilera.com>
10276
10277 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10278 (reg-tilegx32.c): New rule.
10279 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10280 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10281 different register info initializer according to elf class.
10282 (init_registers_tilgx32): New function. The tilegx32 register info
10283 initializer.
10284 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10285 (tile_store_gregset): Likewise.
10286
d171ca78
YQ
102872013-02-27 Yao Qi <yao@codesourcery.com>
10288
10289 * server.c (process_point_options): Print debug message when
10290 debug_threads is true.
10291
282bbdf3
YQ
102922013-02-26 Yao Qi <yao@codesourcery.com>
10293
10294 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10295
aca22551
PA
102962013-02-19 Pedro Alves <palves@redhat.com>
10297 Kai Tietz <ktietz@redhat.com>
10298
10299 PR gdb/15161
10300
10301 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10302 instead of strtoul to extract address from packet.
10303 (process_serial_event) <'z'>: Likewise.
10304
4f3cee1c
YQ
103052013-02-18 Yao Qi <yao@codesourcery.com>
10306
10307 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10308
8e1d55a3
PA
103092013-02-14 Pedro Alves <palves@redhat.com>
10310
10311 Plug memory leak.
10312
10313 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10314 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10315
458820da
PA
103162013-02-14 Pedro Alves <palves@redhat.com>
10317
10318 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10319
baea0dae
PA
103202013-02-14 Pedro Alves <palves@redhat.com>
10321
10322 * tracepoint.c (save_string): Delete.
10323 (add_tracepoint_action): Use savestring instead of save_string.
10324
0b1afbb3
PA
103252013-02-12 Pedro Alves <palves@redhat.com>
10326
10327 * linux-xtensa-low.c: Ditto.
10328 * xtensa-xtregs.c: Ditto.
10329
8a4ac37e
PA
103302013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10331
10332 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10333 thread_db.
10334
148de6bb
MS
103352013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10336
10337 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10338 aarch64_num_wp_regs and aarch64_num_bp_regs to
10339 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10340
55fac6e0
MS
103412013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10342
10343 * linux-aarch64-low.c (ps_get_thread_area): Replace
10344 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10345
176eb98c
MS
103462013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10347 Marcus Shawcroft <marcus.shawcroft@arm.com>
10348 Nigel Stephens <nigel.stephens@arm.com>
10349 Yufeng Zhang <yufeng.zhang@arm.com>
10350
10351 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10352 (aarch64.c, aarch64-without-fpu.c): New targets.
10353 * configure.srv (aarch64*-*-linux*): New.
10354 * linux-aarch64-low.c: New file.
10355
56f7af9c
MS
103562013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10357
43aaf8b6 10358 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10359 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10360 (dequeue_one_deferred_signal, linux_resume_one_thread)
10361 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10362 (linux_tracefork_grandchild, linux_test_for_tracefork)
10363 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10364 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10365 where the argument is 0.
10366
60f662b0
YQ
103672013-01-25 Yao Qi <yao@codesourcery.com>
10368
10369 * event-loop.c: Include "queue.h".
10370 (gdb_event_p): New typedef.
10371 (struct gdb_event) <next_event>: Remove.
10372 (event_queue): Change to QUEUE(gdb_event_p).
10373 (async_queue_event): Remove.
10374 (gdb_event_xfree): New.
10375 (initialize_event_loop): New.
10376 (process_event): Use API from QUEUE.
10377 (wait_for_event): Likewise.
10378 * server.c (main): Call initialize_event_loop.
10379 * server.h (initialize_event_loop): Declare.
10380
5ae4861a
YQ
103812013-01-18 Yao Qi <yao@codesourcery.com>
10382
10383 * ax.h (struct eval_agent_expr_context): New.
10384 (gdb_eval_agent_expr): Update declaration.
10385 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10386 TFRAME. Add new argument CTX.
10387 * server.h (struct eval_agent_expr_context): Declare.
10388 (agent_mem_read, agent_tsv_read): Update declaration.
10389 (agent_mem_read_string): Likewise.
10390 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10391 (add_traceframe_block): Add new argument TPOINT.
10392 Increase TPOINT->traceframe_usage.
10393 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10394 eval_tracepoint_agent_expr.
10395 (condition_true_at_tracepoint): Likewise.
10396 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10397 (agent_mem_read_string, agent_tsv_read): Likewise.
10398
85e00e85
YQ
103992013-01-16 Yao Qi <yao@codesourcery.com>
10400
10401 * linux-low.c (linux_resume_one_lwp): Don't check
10402 'lwp->bp_reinsert != 0'.
10403
4039cf45
JB
104042013-01-07 Joel Brobecker <brobecker@adacore.com>
10405 Pedro Alves <palves@redhat.com>
10406
10407 * lynx-low.c (ptrace_request_to_str): Define a temporary
10408 macro and use it to simplify this function's implementation.
10409
9044dee2
JB
104102013-01-07 Joel Brobecker <brobecker@adacore.com>
10411
10412 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10413 sets errno.
10414
e6352c8f
JB
104152013-01-07 Joel Brobecker <brobecker@adacore.com>
10416
10417 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10418
50681a27
JB
104192013-01-07 Joel Brobecker <brobecker@adacore.com>
10420
10421 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10422
3f6e77ef
JB
104232013-01-07 Joel Brobecker <brobecker@adacore.com>
10424
10425 * lynx-low.c (lynx_resume): Use the resume_info parameter
10426 to determine the ptid for the lynx_ptrace call, unless
10427 it is equal to minus_one_ptid, in which case we use the
10428 ptid of the current_inferior.
10429 (lynx_wait_1): After having received a thread create/exit
10430 event, resume the inferior's execution using the signaling
10431 thread's ptid, rather than the old ptid.
10432
7fda33ae
JB
104332013-01-07 Joel Brobecker <brobecker@adacore.com>
10434
10435 * lynx-low.c (lynx_resume): Delete variable ret.
10436
b9786c74
JB
104372013-01-01 Joel Brobecker <brobecker@adacore.com>
10438
10439 * gdbreplay.c (gdbreplay_version): Update copyright year.
10440 * server.c (gdbserver_version): Likewise.
10441
8b93d60f
JB
104422012-12-17 Joel Brobecker <brobecker@adacore.com>
10443
10444 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10445 new thread.
10446
037335a7
JB
104472012-12-17 Joel Brobecker <brobecker@adacore.com>
10448
10449 * lynx-low.c (ptrace_request_to_str): Add handling for
10450 PTRACE_GETTRACESIG.
10451
52d4cbd8
JB
104522012-12-17 Joel Brobecker <brobecker@adacore.com>
10453
10454 * lynx-low.c (lynx_attach): Delete variable new_process.
10455
ab8f6ca9
JB
104562012-12-17 Joel Brobecker <brobecker@adacore.com>
10457
10458 * lynx-low.c (lynx_create_inferior): Delete variable
10459 new_process.
10460
78cbc024
JB
104612012-12-17 Joel Brobecker <brobecker@adacore.com>
10462
10463 * lynx-low.c (ptrace_request_to_str): Do not handle
10464 PTRACE_GETTHREADLIST if this macro does not exist.
10465
14a00470
YQ
104662012-12-15 Yao Qi <yao@codesourcery.com>
10467
10468 * Makefile.in (OBS): Add notif.o.
10469 * notif.c, notif.h: New.
10470 * server.c: Include "notif.h".
10471 (struct vstop_notif) <next>: Remove.
10472 <base>: New field.
10473 (queue_stop_reply): Update.
10474 (push_event, send_next_stop_reply): Remove.
10475 (discard_queued_stop_replies): Update.
10476 (notif_stop): New variable.
10477 (handle_v_stopped): Remove.
10478 (handle_v_requests): Don't call handle_v_stopped. Call
10479 handle_ack_notif instead.
10480 (queue_stop_reply_callback): Call notif_event_enque instead
10481 of queue_stop_reply.
10482 (handle_status): Don't call send_next_stop_reply, call
10483 notif_write_event instead.
10484 (kill_inferior_callback): Likewise.
10485 (detach_or_kill_inferior_callback): Likewise.
10486 (main): Call initialize_notif.
10487 (process_serial_event): Call QUEUE_is_empty.
10488 (handle_target_event): Call notif_push instead of push event.
10489 * server.h (push_event): Remove declaration.
10490
61c125b9
TT
104912012-12-10 Tom Tromey <tromey@redhat.com>
10492
10493 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10494 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10495 macros.
10496 (.c.o): Rewrite.
10497 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10498 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10499 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10500 (amd64-linux-ipa.o, ax.o): Rewrite.
10501 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10502 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10503 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10504 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10505 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10506 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10507 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10508 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10509 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10510 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10511 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10512 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10513 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10514 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10515 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10516 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10517 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10518 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10519 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10520 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10521 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10522 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10523 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10524 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10525 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10526 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10527 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10528 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10529 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10530 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10531 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10532 (reg-tilegx.o): Remove.
10533 (all_object_files): New macro.
10534 Include .deps files.
10535 * aclocal.m4, configure: Rebuild.
10536 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10537 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10538 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10539
e90e9ad9
TT
105402012-12-05 Tom Tromey <tromey@redhat.com>
10541
10542 PR gdb/14917:
10543 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10544
02d403bf 105452012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10546
10547 * configure.ac: Check for linux/perf_event.h.
10548 * config.in: Regenerated.
10549 * configure: Regenerated.
10550
0270a750
PA
105512012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10552
10553 * hostio.c (handle_readlink): Decrease buffer size
10554 parameter passed to readlink by one byte.
10555
8c29b58e
YQ
105562012-11-26 Yao Qi <yao@codesourcery.com>
10557
10558 * configure.ac (build_warnings): Append '-Wempty-body'.
10559 * configure: Regenerated.
10560 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10561 body.
10562
8bdce1ff
PM
105632012-11-15 Pierre Muller <muller@sourceware.org>
10564
10565 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10566 * config.in: Regenerate.
10567 * configure: Regenerate.
10568 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10569 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10570 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10571 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10572 header.
10573 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10574 instead of <sys/wait.h> header.
10575 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10576
02d403bf 105772012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10578
10579 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10580 (various make rules): Remove -DGDBSERVER
10581
fbd5db48
YQ
105822012-11-09 Yao Qi <yao@codesourcery.com>
10583
10584 * spu-low.c (current_ptid): Move it to ..
10585 * gdbthread.h: ... here. New.
10586 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10587 * server.c (myresume, process_serial_event): Likewise.
10588 * thread-db.c (thread_db_find_new_threads): Likewise.
10589 * tracepoint.c (run_inferior_command): Likewise.
10590
b3dc46ff
AB
105912012-10-01 Andrew Burgess <aburgess@broadcom.com>
10592
10593 * server.c (handle_search_memory_1): Include access length in
10594 warning message.
10595
07c04788
HPN
105962012-09-05 Michael Brandt <michael.brandt@axis.com>
10597
10598 * linux-crisv32-low.c: Fix compile errors.
10599
918d227b
YQ
106002012-09-04 Yao Qi <yao@codesourcery.com>
10601
10602 * tracepoint.c (cmd_qtsv): Adjust debug message.
10603 Don't check CUR_TPOINT.
10604
18c1b81a
YQ
106052012-08-28 Yao Qi <yao@codesourcery.com>
10606
10607 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10608 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10609 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10610 Remove declarations of xmalloc, xreallloc, xstrdup and
10611 freeargv.
10612 * Makefile.in (libiberty_h): New.
10613 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10614 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10615
dc82f37b
YQ
106162012-08-23 Yao Qi <yao@codesourcery.com>
10617
10618 * server.h: Remove declaration of 'xsnprintf'.
10619
406b1477
KS
106202012-08-22 Keith Seitz <keiths@redhat.com>
10621
10622 * server.h: Include build-gnulib-gbserver/config.h.
10623 * gdbreplay.c: Likewise.
10624
e6712ff1
DE
106252012-08-08 Doug Evans <dje@google.com>
10626
10627 * Makefile.in (SFILES): Add gdb_vecs.c.
10628 (OBS): Add gdb_vecs.o.
10629 (gdb_vecs_h, host_defs_h): New variables.
10630 (thread-db.o): Add $(gdb_vecs_h) dependency.
10631 (gdb_vecs.o): New rule.
10632 * thread-db.c: #include "gdb_vecs.h".
10633 (thread_db_load_search): Use a vector to iterate over path elements.
10634 Handle text appearing after "$pdir".
10635
10636 * configure.ac: Add check for strstr.
10637 * config.in: Regenerate.
10638 * configure: Regenerate.
10639
7c3270ae
UW
106402012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10641
10642 * hostio.c (handle_pread): If pread fails, fall back to attempting
10643 lseek/read.
10644 (handle_pwrite): Likewise for pwrite.
10645
b62e2b27
UW
106462012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10647
10648 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10649 between unsupported TYPE and unimplementable ADDR/LEN combination.
10650 (arm_insert_point): Act on new return value.
10651
78a99e91
PA
106522012-07-31 Pedro Alves <palves@redhat.com>
10653
10654 * server.c (process_point_options): Only skip tokens if we find
10655 one that is unrecognized. Don't treat 'X' specially while
10656 skipping unrecognized tokens.
10657
fcf303ab
UW
106582012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10659
10660 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10661 to 4-byte-align HW breakpoint addresses for Thumb.
10662
7255706c
YQ
106632012-07-27 Yao Qi <yao@codesourcery.com>
10664
10665 PR remote/14161.
10666
10667 * server.h: Declare gdb_agent_about_to_close.
10668 * target.c (kill_inferior): Include "agent.h".
10669 New. Send command 'kill'.
10670 * target.h (kill_inferior): Removed macro.
10671 * tracepoint.c (gdb_agent_about_to_close): New.
10672 (gdb_agent_helper_thread): Handle command 'close'.
10673 Wait endlessly until the inferior stops.
10674 Install gdb_agent_remove_socket to atexit hook.
10675 (agent_socket_name): New static variable.
10676 (gdb_agent_socket_init): Replace local variable 'name' with
10677 'agent_socket_name'.
10678 (gdb_agent_remove_socket): New.
10679
5a3f286f
YQ
106802012-07-27 Yao Qi <yao@codesourcery.com>
10681
10682 * server.c (process_point_options): Stop at 'X' when parsing.
10683
961bd387
ME
106842012-07-19 Michael Eager <eager@eagercon.com>
10685
a261b8f5 10686 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10687 to hw_execute.
10688 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10689 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10690 hardware breakpoint.
10691
aa7c7447
JK
106922012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10693
10694 * gdbserver/linux-low.c (initialize_low): Call
10695 linux_ptrace_init_warnings.
10696
7f216e7c
DE
106972012-07-02 Doug Evans <dje@google.com>
10698
10699 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10700 pointer to int.
10701
d3ce09f5
SS
107022012-07-02 Stan Shebs <stan@codesourcery.com>
10703
10704 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10705 (ax.o): Add it to build rule.
10706 (ax-ipa.o): Ditto.
10707 (OBS): Add format.o.
10708 (IPA_OBS): Add format.o.
10709 * server.c (handle_query): Claim support for breakpoint commands.
10710 (process_point_options): Add command case.
10711 (process_serial_event): Leave running if there are printfs in
10712 effect.
10713 * mem-break.h (any_persistent_commands): Declare.
10714 (add_breakpoint_commands): Declare.
10715 (gdb_no_commands_at_breakpoint): Declare.
10716 (run_breakpoint_commands): Declare.
10717 * mem-break.c (struct point_command_list): New struct.
10718 (struct breakpoint): New field command_list.
10719 (any_persistent_commands): New function.
10720 (add_commands_to_breakpoint): New function.
10721 (add_breakpoint_commands): New function.
10722 (gdb_no_commands_at_breakpoint): New function.
10723 (run_breakpoint_commands): New function.
10724 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10725 locally.
10726 * ax.c: Include format.h.
10727 (ax_printf): New function.
10728 (gdb_eval_agent_expr): Add printf opcode.
10729
2f8f6aed
YQ
107302012-06-13 Yao Qi <yao@codesourcery.com>
10731
10732 * server.c (start_inferior): Remove duplicated writes to fields
10733 'last_resume_kind' and 'last_status' of 'current_inferior'.
10734
0c9070b3
YQ
107352012-06-12 Yao Qi <yao@codesourcery.com>
10736 Pedro Alves <palves@redhat.com>
10737
10738 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10739 comment.
10740 * server.c (handle_v_cont): Extend comment.
10741
c52daf70
YQ
107422012-06-11 Yao Qi <yao@codesourcery.com>
10743
10744 * linux-low.c (linux_attach): Add 'static'.
10745
d38bbb0a
YQ
107462012-06-06 Yao Qi <yao@codesourcery.com>
10747
10748 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10749
89dc0afd
JK
107502012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10751
10752 Fix gcc -flto compilation warning.
10753 * server.c (main): Make variable multi_mode and attach volatile.
10754
75f62ce7
TJB
107552012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10756
10757 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10758 if the platform doesn't know about it.
10759
65f479b6
PA
107602012-05-30 Jeff Kenton <jkenton@tilera.com>
10761
10762 * Makefile.in (SFILES): Add linux-tile-low.c.
10763 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10764 * configure.srv: Handle tilegx-*-linux*.
10765 * linux-tile-low.c: New file.
10766
0c5bf5a9
JK
107672012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10768
10769 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10770
a493e3e2
PA
107712012-05-24 Pedro Alves <palves@redhat.com>
10772
10773 PR gdb/7205
10774
43aaf8b6 10775 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10776
2ea28649
PA
107772012-05-24 Pedro Alves <palves@redhat.com>
10778
10779 PR gdb/7205
10780
10781 Replace target_signal with gdb_signal throughout.
10782
8d409d16
MR
107832012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10784
10785 * linux-low.c (linux_store_registers): Avoid the copying sequence
10786 when no data has been retrieved by ptrace.
10787
23512c01
MGD
107882012-05-22 Will Deacon <will.deacon@arm.com>
10789
10790 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10791 Include asm/ptrace.h.
10792 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10793 already defined.
10794
4934b29e
MR
107952012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10796
10797 * linux-low.c (linux_store_registers): Don't re-retrieve data
10798 with ptrace that has already been obtained from /proc. Always
10799 copy any data retrieved with ptrace to the buffer supplied.
10800
bde24c0a
PA
108012012-05-11 Yao Qi <yao@codesourcery.com>
10802 Pedro Alves <palves@redhat.com>
10803
10804 * linux-low.c (enum stopping_threads_kind): New.
10805 (stopping_threads): Change type to `enum stopping_threads_kind'.
10806 (handle_extended_wait): If stopping and suspending threads, leave
10807 the new_lwp suspended too.
10808 (linux_wait_for_event): Adjust.
10809 (stop_all_lwps): Set `stopping_threads' to
10810 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10811 whether we're suspending threads or just stopping them. Assert no
10812 recursion happens.
10813
623b6bdf
YQ
108142012-04-29 Yao Qi <yao@codesourcery.com>
10815
10816 * server.h: Move some code to ...
10817 * gdbthread.h: ... here. New.
10818 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10819 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10820 (nto-low.o, win32-low.o): Likewise.
10821 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10822 * regcache.c, remote-utils.c, server.c: Likewise.
10823 * target.c, tracepoint.c, win32-low.c: Likewise.
10824
f15f9948
TJB
108252012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10826
10827 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10828 (PTRACE_ARG4_TYPE): Likewise.
10829 (PTRACE_XFER_TYPE): Likewise.
10830 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10831 ptrace to PTRACE_ARG3_TYPE.
10832 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10833 (PTRACE_ARG4_TYPE): Likewise.
10834 (PTRACE_XFER_TYPE): Likewise.
10835 (linux_detach_one_lwp): Cast fourth argument of
10836 ptrace to long then PTRACE_ARG4_TYPE.
10837 (regsets_fetch_inferior_registers): Cast third argument of
10838 ptrace to long then PTRACE_ARG3_TYPE.
10839 (regsets_store_inferior_registers): Likewise.
10840
38ea300a
PA
108412012-04-20 Pedro Alves <palves@redhat.com>
10842
10843 * configure: Regenerate.
10844
c971b7fa
PA
108452012-04-19 Pedro Alves <palves@redhat.com>
10846
43aaf8b6 10847 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10848 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10849 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10850 (all, install-only, uninstall, clean-info, all-lib, clean): No
10851 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10852 (maintainer-clean realclean distclean): Use subdir_do.
10853 (subdir_do): New.
10854 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10855 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10856 * acinclude.m4: Include acx_configure_dir.m4.
10857 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10858 calls. Call AC_PROG_RANLIB. Configure gnulib using
10859 ACX_CONFIGURE_DIR.
10860 (GNULIB): New.
10861 (GNULIB_STDINT_H): Adjust.
10862 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10863 * gdbreplay.c: Include build-gnulib/config.h.
10864 * server.h: Likewise.
10865 * aclocal.m4: Regenerate.
10866 * config.in: Regenerate.
10867 * configure: Regenerate.
c971b7fa 10868
809277f8
PA
108692012-04-19 Pedro Alves <palves@redhat.com>
10870
10871 * Makefile.in (LIBGNU, INCGNU): Adjust.
10872 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10873 (all, install-only, uninstall, clean-info, all-lib, clean)
10874 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10875 * configure.ac: Adjust AC_OUTPUT output.
10876 * aclocal.m4: Regenerate.
10877 * configure: Regenerate.
10878
fd9bb8b8
PA
108792012-04-19 Pedro Alves <palves@redhat.com>
10880
10881 * Makefile.in (generated_files): New.
10882 (server_h): Remove the explicit dependency on config.h, and depend
10883 on $generated_files.
10884
1c298c66
PA
108852012-04-19 Pedro Alves <palves@redhat.com>
10886
10887 * Makefile.in (INCGNU): Add -Ignulib.
10888
57c4b50b
PA
108892012-04-19 Pedro Alves <palves@redhat.com>
10890
10891 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10892 (INCGNU): ... this, and spell out -I here.
10893 (GNULIB_LIB): Rename to ...
10894 (LIBGNU): ... this.
10895 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10896
1030e047
PA
108972012-04-19 Pedro Alves <palves@redhat.com>
10898
10899 * config.in: Regenerate.
10900
447d4319
PA
109012012-04-19 Pedro Alves <palves@redhat.com>
10902
10903 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10904 * server.h (memmem): Remove declaration.
10905 * config.in: Regenerate.
10906 * configure: Regenerate.
10907
aad9eab9
YQ
109082012-04-19 Yao Qi <yao@codesourcery.com>
10909
10910 * Makefile.in (SFILES): Add common/vec.c.
10911 (OBS): Add vec.o.
10912 (vec.o): New rule.
10913
3e10640f
YQ
109142012-04-19 Yao Qi <yao@codesourcery.com>
10915
10916 * remote-utils.c (prepare_resume_reply): Replace with macro
10917 target_core_of_thread.
10918 * server.c (handle_qxfer_threads_proper): Likewise.
10919 * target.h (traget_core_of_thread): New macro.
10920
71622373
PA
109212012-04-18 Pedro Alves <palves@redhat.com>
10922
10923 * aclocal.m4: Regenerate.
10924 * configure: Regenerate.
10925
80d26939
YQ
109262012-04-16 Yao Qi <yao@codesourcery.com>
10927
10928 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10929 duplicated on address.
10930
42476b70
YQ
109312012-04-16 Yao Qi <yao@codesourcery.com>
10932
10933 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10934 (struct tracepoint_action_ops) <send>: New field.
10935 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10936 (agent_expr_send, x_tracepoint_action_send): New.
10937 (l_tracepoint_action_send): New.
10938 (cmd_qtdp): Download and install tracepoint
10939 according to `use_agent'.
10940 (run_inferior_command): Add one more parameter `len'.
10941 Update callers.
10942 (tracepoint_send_agent): New.
10943 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10944
7bc83639
YQ
109452012-04-16 Yao Qi <yao@codesourcery.com>
10946
10947 * tracepoint.c (download_tracepoints): Moved to ...
10948 (cmd_qtstart): ... here.
10949
5f18041e
YQ
109502012-04-14 Yao Qi <yao@codesourcery.com>
10951
10952 * tracepoint.c: Include inttypes.h.
10953 (struct collect_memory_action): Use sized types.
10954 (struct tracepoint): Likewise.
10955 (cmd_qtdp, stop_tracing): Update print specifiers.
10956 (cmd_qtp, response_tracepoint): Likewise.
10957 (collect_data_at_tracepoint): Likewise.
10958 (collect_data_at_step): Likewise.
10959
55a8c076
YQ
109602012-04-14 Yao Qi <yao@codesourcery.com>
10961
10962 Import gnulib module inttypes.
10963 * aclocal.m4, config.in, configure: Regenerated.
10964
dc750257
YQ
109652012-04-14 Yao Qi <yao@codesourcery.com>
10966
10967 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10968 Makefile and config.status at last.
10969
0ab5faf9
YQ
109702012-04-13 Yao Qi <yao@codesourcery.com>
10971
10972 * tracepoint.c: Include stdint.h unconditionally.
10973
18f5fd81
TJB
109742012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10975
10976 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10977 on BFD_HAVE_SYS_PROCFS_TYPE.
10978 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10979 * configure: Regenerate.
10980 * config.in: Likewise.
10981
4d47af5c
L
109822012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10983
10984 * Makefile.in (clean): Also remove x32.c x32-linux.c
10985 x32-avx.c x32-avx-linux.c.
10986 (x32.o): New target.
10987 (x32.c): Likewise.
10988 (x32-linux.o): Likewise.
10989 (x32-linux.c): Likewise.
10990 (x32-avx.o): Likewise.
10991 (x32-avx.c): Likewise.
10992 (x32-avx-linux.o): Likewise.
10993 (x32-avx-linux.c): Likewise.
10994
10995 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10996 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10997 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10998 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10999 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11000 i386/x32-avx-linux.xml.
11001
11002 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11003 (init_registers_x32_avx_linux): Likwise.
11004 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11005 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11006
ecedbe58
PA
110072012-04-13 Pedro Alves <palves@redhat.com>
11008
11009 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11010 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11011 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11012 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11013 the sub-make.
11014
c92b5177
L
110152012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11016
11017 * linux-x86-low.c (compat_x32_clock_t): New.
11018 (compat_x32_siginfo_t): Likewise.
11019 (compat_x32_siginfo_from_siginfo): Likewise.
11020 (siginfo_from_compat_x32_siginfo): Likewise.
11021 (linux_is_elf64): Likewise.
11022 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11023 and siginfo_from_compat_x32_siginfo for x32.
11024 (x86_arch_setup): Set linux_is_elf64.
11025
214d508e
L
110262012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11027
11028 PR gdb/13969
11029 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11030 e_machine field.
11031 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11032 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11033 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11034 compatible with process.
11035
c9a1864a
YQ
110362012-04-12 Yao Qi <yao@codesourcery.com>
11037
11038 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11039 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11040 (install-only, install-info, clean): Handle sub dir gnulib.
11041 (all-lib, am--refresh): New targets.
11042 (memmem.o): Remove target.
11043 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11044 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11045 (AC_REPLACE_FUNCS): Remove memmem.
11046 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11047 (AC_OUTPUT): Generate Makefile in gnulib/.
11048 * aclocal.m4, config.in, configure: Regenerated.
11049
367ba2c2
MR
110502012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11051
11052 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11053
9d236627
PA
110542012-04-05 Pedro Alves <palves@redhat.com>
11055
11056 -Werror=strict-aliasing
11057
11058 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11059 pointer.
11060
111217b3
PA
110612012-04-04 Pedro Alves <palves@redhat.com>
11062
11063 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11064 (sparc_store_gregset_from_stack, sparc_store_gregset)
11065 (sparc_breakpoint_at): Fix formatting.
11066
8365dcf5
TJB
110672012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11068
11069 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11070 are available.
11071 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11072 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11073 * config.in: Regenerate.
11074 * configure: Likewise.
11075
689cc2ae
PA
110762012-03-29 Pedro Alves <palves@redhat.com>
11077
11078 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11079 Correct ptrace arguments.
11080
c14dfd32
PA
110812012-03-28 Pedro Alves <palves@redhat.com>
11082
11083 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11084 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11085 (IA64_FR1_REGNUM): New defines.
11086 (ia64_fetch_register): New.
11087 (the_low_target): Install it.
11088 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11089 field.
11090 * linux-low.c (linux_fetch_registers): Try the
11091 the_low_target.fetch_register hook first.
11092
11093 * linux-arm-low.c (the_low_target): Adjust.
11094 * linux-bfin-low.c (the_low_target): Adjust.
11095 * linux-cris-low.c (the_low_target): Adjust.
11096 * linux-crisv32-low.c (the_low_target): Adjust.
11097 * linux-m32r-low.c (the_low_target): Adjust.
11098 * linux-m68k-low.c (the_low_target): Adjust.
11099 * linux-mips-low.c (the_low_target): Adjust.
11100 * linux-ppc-low.c (the_low_target): Adjust.
11101 * linux-s390-low.c (the_low_target): Adjust.
11102 * linux-sh-low.c (the_low_target): Adjust.
11103 * linux-sparc-low.c (the_low_target): Adjust.
11104 * linux-tic6x-low.c (the_low_target): Adjust.
11105 * linux-x86-low.c (the_low_target): Adjust.
11106 * linux-xtensa-low.c (the_low_target): Adjust.
11107
63c88e13
PA
111082012-03-26 Pedro Alves <palves@redhat.com>
11109
11110 * server.c (handle_qxfer_libraries): Don't bail early if
11111 the_target->qxfer_libraries_svr4 is not NULL.
11112
fb723180
PA
111132012-03-26 Pedro Alves <palves@redhat.com>
11114
11115 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11116
0afae3cf
PA
111172012-03-23 Pedro Alves <palves@redhat.com>
11118
11119 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11120 "library-list-svr4" element's start tag when the the DSO list is
11121 empty.
11122
485f1ee4
PA
111232012-03-23 Pedro Alves <palves@redhat.com>
11124
11125 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11126 a variable whose type size is the same as the inferior's pointer
11127 size.
11128
a5362b9a
TS
111292012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11130
11131 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11132 struct siginfo.
11133 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11134 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11135 * linux-low.h: Include <signal.h>.
11136 (struct siginfo): Remove forward declaration.
11137 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11138 struct siginfo.
11139
d226c142
MF
111402012-03-21 Mike Frysinger <vapier@gentoo.org>
11141
11142 * .gitignore: Ignore more files.
11143
122f36ef
PA
111442012-03-19 Pedro Alves <palves@redhat.com>
11145 Jan Kratochvil <jan.kratochvil@redhat.com>
11146
11147 * server.c (cont_thread, general_thread): Add describing comments.
11148 (start_inferior): Clear `cont_thread'.
11149 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11150 of a process.
11151
fc3e5175
YQ
111522012-03-15 Yao Qi <yao@codesourcery.com>
11153
11154 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11155 handling to ...
11156 (cmd_qtdp): ... here.
11157
8d0d92cd
YQ
111582012-03-15 Yao Qi <yao@codesourcery.com>
11159
11160 * tracepoint.c (struct tracepoint_action_ops): New.
11161 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11162 (m_tracepoint_action_download): New.
11163 (r_tracepoint_action_download): New.
11164 (x_tracepoint_action_download): New.
11165 (l_tracepoint_action_download): New.
11166 (add_tracepoint_action): Install `action->ops' according type.
11167 (download_tracepoint_1): Move code `download' function pointer
11168 of various tracepoint_action_ops.
11169
87b0bb13
JK
111702012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11171
11172 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11173 linux_ptrace_attach_warnings.
11174
5f572dec
JK
111752012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11176
11177 * Makefile.in (linux-ptrace.o): New.
11178 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11179 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11180 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11181 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11182 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11183 of these targets.
11184 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11185
f4647387
YQ
111862012-03-08 Yao Qi <yao@codesourcery.com>
11187 Pedro Alves <palves@redhat.com>
11188
11189 Fix PR server/13392.
11190 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11191 offset of JMP insn.
11192 * tracepoint.c (remove_tracepoint): New.
11193 (cmd_qtdp): Call remove_tracepoint when failed to install.
11194
9b224c5e
PA
111952012-03-07 Pedro Alves <palves@redhat.com>
11196
11197 * linux-low.c (get_detach_signal): New.
11198 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11199 Pass on pending signals to PTRACE_DETACH. Check the result of the
11200 ptrace call.
11201 * server.c (program_signals, program_signals_p): New.
11202 (handle_general_set): Handle QProgramSignals.
11203 * server.h (program_signals, program_signals_p): Declare.
11204
e237a7e2
JK
112052012-03-05 Pedro Alves <palves@redhat.com>
11206 Jan Kratochvil <jan.kratochvil@redhat.com>
11207
11208 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11209 New comment why.
11210
5808517f
YQ
112112012-03-03 Yao Qi <yao@codesourcery.com>
11212
11213 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11214 agent_look_up_symbols.
11215
58b4daa5
YQ
112162012-03-03 Yao Qi <yao@codesourcery.com>
11217
11218 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11219 (linux-x86-low.o): Likewise.
11220 * server.h: Remove in_process_agent_loaded.
11221 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11222 common/agent.c.
11223 Update callers.
11224
8ffcbaaf
YQ
112252012-03-03 Yao Qi <yao@codesourcery.com>
11226
11227 * tracepoint.c (gdb_agent_capability): New global.
11228 (in_process_agent_loaded_ust): Renamed to
11229 `in_process_agent_supports_ust'.
11230 Update callers.
11231 (in_process_agent_supports_ust): Call agent_capability_check.
11232 (clear_installed_tracepoints): Assert that agent supports
11233 agent.
11234
d1feda86
YQ
112352012-03-03 Yao Qi <yao@codesourcery.com>
11236
11237 * linux-low.c (linux_supports_agent): New.
11238 (linux_target_ops): Initialize field `supports_agent' with
11239 linux_supports_agent.
11240 * target.h (struct target_ops) <supports_agent>: New.
11241 (target_supports_agent): New macro.
11242 * server.c (handle_general_set): Handle packet 'QAgent'.
11243 (handle_query): Send `QAgent+'.
11244 * Makefile.in (server.o): Depends on agent.h.
11245
2fa291ac
YQ
112462012-03-03 Yao Qi <yao@codesourcery.com>
11247
11248 * Makefile.in (OBS): Add agent.o.
11249 Add new rule for agent.o.
11250 Track dependence of tracepoint.c on agent.h.
11251 * tracepoint.c (run_inferior_command_1):
11252 (run_inferior_command): Call agent_run_command.
11253 (gdb_ust_connect_sync_socket): Deleted. Move it to
11254 common/agent.c.
11255 (resume_thread, stop_thread): Likewise.
11256 (gdb_ust_socket_init): Renamed to ...
11257 (gdb_agent_socket_init): ... New.
11258 (gdb_ust_thread): Renamed to ...
11259 (gdb_agent_helper_thread): ... New.
11260 (gdb_ust_init): Move some code to ...
11261 (gdb_agent_init): ... here. New.
11262 [HAVE_UST]: Call gdb_ust_init.
11263 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11264 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11265 * config.in, configure: Regenerated.
11266
05044653
PA
112672012-03-02 Pedro Alves <palves@redhat.com>
11268
11269 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11270 * linux-low.c (struct simple_pid_list): New.
11271 (stopped_pids): New a struct simple_pid_list pointer.
11272 (add_to_pid_list, pull_pid_from_list): New.
11273 (handle_extended_wait): Don't assume the first signal new children
11274 report is SIGSTOP. Adjust call to pull_pid_from_list.
11275 (linux_wait_for_lwp): Adjust.
11276
8d00225b
YQ
112772012-03-02 Yao Qi <yao@codesourcery.com>
11278
11279 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11280 debug log.
11281
19560ba5
YQ
112822012-03-02 Yao Qi <yao@codesourcery.com>
11283
11284 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11285 `stop_pc' and `tpoint'. Update caller.
11286
1faeff08
MR
112872012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11288
11289 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11290 * linux-low.c (use_linux_regsets): New macro.
11291 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11292 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11293 (linux_register_in_regsets): New function.
11294 (usr_fetch_inferior_registers): Skip registers covered by
11295 regsets.
11296 (usr_store_inferior_registers): Likewise.
11297 (usr_fetch_inferior_registers): New macro.
11298 (usr_store_inferior_registers): Likewise.
11299 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11300 (linux_store_registers): Likewise.
11301 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11302 prototype.
11303 (init_registers_mips64_dsp_linux): Likewise.
11304 (init_registers_mips_linux): New macro.
11305 (init_registers_mips_dsp_linux): Likewise.
11306 (mips_dsp_num_regs): Likewise.
11307 (DSP_BASE, DSP_CONTROL): New fallback macros.
11308 (mips_base_regs): New macro.
11309 (mips_regmap): Use it. Fix the size.
11310 (mips_dsp_regmap): New variable.
11311 (mips_dsp_regset_bitmap): Likewise.
11312 (mips_arch_setup): New function.
11313 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11314 than mips_regmap.
11315 (mips_cannot_store_register): Likewise.
11316 (the_low_target): Update .arch_setup, .num_regs and .regmap
11317 initializers. Add .regset_bitmap initializer.
11318 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11319 initializer.
11320 * linux-bfin-low.c (the_low_target): Likewise.
11321 * linux-cris-low.c (the_low_target): Likewise.
11322 * linux-crisv32-low.c (the_low_target): Likewise.
11323 * linux-ia64-low.c (the_low_target): Likewise.
11324 * linux-m32r-low.c (the_low_target): Likewise.
11325 * linux-m68k-low.c (the_low_target): Likewise.
11326 * linux-ppc-low.c (the_low_target): Likewise.
11327 * linux-s390-low.c (the_low_target): Likewise.
11328 * linux-sh-low.c (the_low_target): Likewise.
11329 * linux-sparc-low.c (the_low_target): Likewise.
11330 * linux-tic6x-low.c (the_low_target): Likewise.
11331 * linux-x86-low.c (the_low_target): Likewise.
11332 * linux-xtensa-low.c (the_low_target): Likewise.
11333 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11334 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11335 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11336 srv_xmlfiles.
11337 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11338 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11339
c03e6ccc
YQ
113402012-02-29 Yao Qi <yao@codesourcery.com>
11341 Pedro Alves <palves@redhat.com>
11342
11343 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11344 `step_over_finished' is true.
11345
644cebc9
PA
113462012-02-27 Pedro Alves <palves@redhat.com>
11347
11348 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11349 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11350
c14d7ab2
PA
113512012-02-27 Pedro Alves <palves@redhat.com>
11352
11353 PR server/9684
11354 * linux-low.c (pid_is_stopped): New.
11355 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11356
412c89dd
LM
113572012-02-25 Luis Machado <lgustavo@codesourcery.com>
11358
11359 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11360 of conditions.
11361
b745defe
MR
113622012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11363
11364 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11365
9f3a5c85
LM
113662012-02-24 Luis Machado <lgustavo@codesourcery>
11367
11368 * server.c (handle_query): Advertise support for target-side
11369 breakpoint condition evaluation.
11370 (process_point_options): New function.
11371 (process_serial_event): When inserting a breakpoint, check for
11372 a target-side condition that should be evaluated.
11373
11374 * mem-break.c: Include regcache.h and ax.h.
11375 (point_cond_list_t): New data structure.
11376 (breakpoint) <cond_list>: New field.
11377 (find_gdb_breakpoint_at): Make non-static.
11378 (delete_gdb_breakpoint_at): Clear any target-side
11379 conditions.
11380 (clear_gdb_breakpoint_conditions): New function.
11381 (add_condition_to_breakpoint): Likewise.
11382 (add_breakpoint_condition): Likewise.
11383 (gdb_condition_true_at_breakpoint): Likewise.
11384 (gdb_breakpoint_here): Return result directly instead
11385 of going through a local variable.
11386
11387 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11388 (clear_gdb_breakpoint_conditions): Likewise.
11389 (add_breakpoint_condition): Likewise.
11390 (gdb_condition_true_at_breakpoint): Likewise.
11391
11392 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11393 (need_step_over_p): Take target-side breakpoint condition into
11394 consideration.
11395
5e1dc496
LM
113962012-02-24 Luis Machado <lgustavo@codesourcery>
11397
11398 * server.h: Include tracepoint.h.
11399 (agent_mem_read, agent_get_trace_state_variable_value,
11400 agent_set_trace_state_variable_value,
11401 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11402 get_set_tsv_func_addr): New prototypes.
11403
11404 * ax.h: New include file.
11405 * ax.c: New source file.
11406
11407 * tracepoint.c: Include ax.h.
11408 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11409 agent_expr, eval_result_type): Move to ax.h.
11410 (parse_agent_expr): Rename to ...
11411 (gdb_parse_agent_expr): ... this, make it non-static and move
11412 to ax.h.
11413 (unparse_agent_expr) Rename to ...
11414 (gdb_unparse_agent_expr): ... this, make it non-static and move
11415 to ax.h.
11416 (eval_agent_expr): Rename to ...
11417 (eval_tracepoint_agent_expr): ... this.
11418 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11419 forward declarations.
11420 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11421 (agent_get_trace_state_variable_value): New function.
11422 (agent_set_trace_state_variable_value): New function.
11423 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11424 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11425 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11426 (condition_true_at_tracepoint): Likewise.
11427 (parse_agent_expr): Rename to ...
11428 (gdb_parse_agent_expr): ... this and move to ax.c.
11429 (unparse_agent_expr): Rename to ...
11430 (gdb_unparse_agent_expr): ... this and move to ax.c.
11431 (gdb_agent_op_name): Move to ax.c.
11432 (eval_agent_expr): Rename to ...
11433 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11434 and move to ax.c.
11435 (eval_tracepoint_agent_expr): New function.
11436 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11437 non-static.
5e1dc496
LM
11438 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11439 ax.c.
11440 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11441 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11442 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11443 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11444 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11445 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11446 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11447 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11448 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11449 (compile_bytecodes): Remove forward declaration.
11450 (is_goto_target): Move to ax.c.
11451 (compile_bytecodes): Move to ax.c and call
11452 agent_get_trace_state_variable_value (...) and
11453 agent_set_trace_state_variable_value (...).
11454
11455 * Makefile.in: Update ax.c and IPA dependencies.
11456
277e4e52
PA
114572012-02-24 Pedro Alves <palves@redhat.com>
11458
11459 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11460 (cmd_bigqtbuffer_circular): ... this. Only handle
11461 'QTBuffer:circular:'.
11462 (handle_tracepoint_general_set): Adjust.
11463
bf4c19f7
YQ
114642012-02-16 Yao Qi <yao@codesourcery.com>
11465
11466 * inferiors.c: Move code to ...
11467 * dll.c: .... here. New.
11468 * server.h: Declare clear_dlls.
11469 * Makefile.in (SFILES): Add dll.c.
11470 (OBS): Add dll.o
11471 (dll.o): New rule.
11472
d73f2619
YQ
114732012-02-11 Yao Qi <yao@codesourcery.com>
11474
11475 * server.c: (handle_monitor_command): Add a new parameter
11476 `own_buf'.
11477 (handle_query): Update caller.
11478
f8255c2a
JB
114792012-02-09 Joel Brobecker <brobecker@adacore.com>
11480
11481 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11482 * configure, config.in: Regenerate.
11483 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11484 is not defined.
11485
da84f473
PA
114862012-02-02 Pedro Alves <palves@redhat.com>
11487
11488 Try SIGKILL first, then PTRACE_KILL.
11489 * linux-low.c (linux_kill_one_lwp): New.
11490 (linux_kill_one_lwp): Rename to ...
11491 (kill_one_lwp_callback): ... this. Use the new
11492 linux_kill_one_lwp.
11493
e886a173
PA
114942012-02-02 Pedro Alves <palves@redhat.com>
11495
11496 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11497 inferior.
11498
be07f1a2
PA
114992012-01-27 Pedro Alves <palves@redhat.com>
11500
11501 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11502 (elf_64_file_p): Make static.
11503 (linux_pid_exe_is_elf_64_file): New.
11504 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11505 Delete declarations.
11506 (linux_pid_exe_is_elf_64_file): Declare.
11507 * linux-x86-low.c (x86_arch_setup): Use
11508 linux_pid_exe_is_elf_64_file.
11509
d8301ad1
JK
115102012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11511
11512 * linux-low.c (linux_wait_for_event_1): Rename to ...
11513 (linux_wait_for_event): ... here and merge it with former
11514 linux_wait_for_event - new variable wait_ptid, use it.
11515 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11516
01b17894
PA
115172012-01-23 Pedro Alves <palves@redhat.com>
11518
11519 * server.c (main): Avoid yet another case of infinite loop while
11520 detaching/killing after a longjmp.
11521
e825046f
JK
115222012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11523
11524 Code cleanup.
11525 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11526
b9e7b9c3
UW
115272012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11528
11529 * hostio.c (handle_readlink): New function.
11530 (handle_vFile): Call it to handle "vFile:readlink" packets.
11531
901f9912
UW
115322012-01-20 Pedro Alves <palves@redhat.com>
11533 Ulrich Weigand <ulrich.weigand@linaro.org>
11534
11535 * server.c (handle_v_requests): Only support vAttach and vRun to
11536 start multiple processes when in extended protocol mode.
11537
fc1ab1a0
PA
115382012-01-17 Pedro Alves <palves@redhat.com>
11539
11540 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11541 memalign plus mprotect to allocate the scratch buffer.
11542
7d5d4e98
PA
115432012-01-13 Pedro Alves <palves@redhat.com>
11544
11545 * server.c (attach_inferior): Clear `cont_thread'.
11546
f128d5e9
PA
115472012-01-13 Pedro Alves <palves@redhat.com>
11548
11549 * server.c (main): Avoid infinite loop while detaching/killing
11550 after a longjmp.
11551
06db92f0
DE
115522012-01-09 Doug Evans <dje@google.com>
11553
11554 * server.c (start_inferior): Set last_ptid in --wrapper case.
11555
32d92999
YQ
115562012-01-06 Yao Qi <yao@codesourcery.com>
11557
11558 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11559 defined.
11560 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11561
5e0a92a9
YQ
115622012-01-04 Yao Qi <yao@codesourcery.com>
11563
11564 * tracepoint.c (cmd_qtdp): Print debug message
11565 for static tracepoint.
11566
ae639e8c
YQ
115672012-01-04 Yao Qi <yao@codesourcery.com>
11568
11569 * tracepoint.c (trace_vdebug): Differentiate debug message
11570 between gdbserver and IPA.
11571
f72429c5
YQ
115722012-01-03 Yao Qi <yao@codesourcery.com>
11573
11574 * tracepoint.c (tracepoint_was_hit): Don't collect for
11575 static tracepoint.
11576
12c3e59c
JB
115772012-01-02 Joel Brobecker <brobecker@adacore.com>
11578
11579 * terminal.h: Reformat copyright header.
11580
67827812
JB
115812012-01-02 Joel Brobecker <brobecker@adacore.com>
11582
11583 * server.c (gdbserver_version): Update copyright year.
11584 * gdbreplay.c (gdbreplay_version): Likewise.
11585
3e52c33d
JK
115862011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11587
11588 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11589
11590 Revert:
11591 2011-12-18 Hui Zhu <teawater@gmail.com>
11592 * linux-low.c (linux_create_inferior): Save return value to ret.
11593
66f1260e
HZ
115942011-12-18 Hui Zhu <teawater@gmail.com>
11595
11596 * linux-low.c (linux_create_inferior): Save return value to ret.
11597
e77616d7
DE
115982011-12-16 Doug Evans <dje@google.com>
11599
e7b06c57
DE
11600 * linux-low.c (linux_create_inferior): If stdio connection,
11601 redirect stdin from /dev/null, stdout to stderr.
11602 * remote-utils.c (remote_is_stdio): New static global.
11603 (remote_connection_is_stdio): New function.
11604 (remote_prepare): Handle stdio connection.
11605 (remote_open): Ditto.
11606 (remote_close): Don't close stdin for stdio connections.
11607 (read_prim,write_prim): New functions. Replace all calls to
11608 read/write to these.
11609 * server.c (main): Watch for "-" argument. Move call to
11610 remote_prepare before start_inferior.
11611 * server.h (STDIO_CONNECTION_NAME): New macro.
11612 (remote_connection_is_stdio): Declare.
11613
e77616d7
DE
11614 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11615 in debugging output.
11616
82067193
YQ
116172011-12-15 Yao Qi <yao@codesourcery.com>
11618
11619 * tracepoint.c: Include sys/syscall.h.
11620 (gdb_ust_thread): Remove preprocessor conditional.
11621
82bfbe7e
PA
116222011-12-14 Pedro Alves <pedro@codesourcery.com>
11623
11624 * linux-low.c (linux_detach_one_lwp): Call
11625 the_low_target.prepare_to_resume before detaching.
11626
712c6575
YQ
116272011-12-14 Yao Qi <yao@codesourcery.com>
11628
11629 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11630 of write.
11631
d54d1edf
YQ
116322011-12-14 Yao Qi <yao@codesourcery.com>
11633
11634 * i386-low.c (i386_low_stopped_data_address): Initialize local
11635 variable `control'.
11636
6210a125
PA
116372011-12-13 Pedro Alves <pedro@codesourcery.com>
11638
11639 PR remote/13492
11640
11641 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11642 DR_CONTROL unless necessary. Extend comments.
11643 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11644 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11645
2ece8244
YQ
116462011-12-13 Yao Qi <yao@codesourcery.com>
11647
11648 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11649 macros.
11650 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11651
784867a5
JK
116522011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11653
11654 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11655 Print new debug message for such case.
11656
6bf36717
JK
116572011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11658
11659 Fix overlapping memcpy.
11660 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11661 the read_inferior_memory transfer.
11662 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11663 write_inferior_memory transfer.
11664 (set_fast_tracepoint_jump): New variable buf. Use it for the
11665 read_inferior_memory and write_inferior_memory transfers.
11666 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11667 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11668 Use it for the write_inferior_memory transfer.
11669 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11670 buffers.
11671
50275556
MR
116722011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11673
11674 * linux-low.c (fetch_register, store_register): Make code
11675 consistent, fix formatting.
11676
7325beb4
MR
116772011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11678
11679 * linux-low.c (usr_store_inferior_registers): Factor out code
11680 to handle individual registers into...
11681 (store_register): ... this new function.
11682
c642a434
UW
116832011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11684
11685 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11686 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11687 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11688 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11689 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11690 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11691 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11692 (srv_xmlfiles): Add new XML files.
11693
11694 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11695 and <sys/uio.h>.
11696 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11697 (init_registers_s390_linux32v1): Add prototype.
11698 (init_registers_s390_linux32v2): Likewise.
11699 (init_registers_s390_linux64v1): Likewise.
11700 (init_registers_s390_linux64v2): Likewise.
11701 (init_registers_s390x_linux64v1): Likewise.
11702 (init_registers_s390x_linux64v2): Likewise.
11703 (s390_num_regs): Increment to 52.
11704 (s390_regmap): Add orig_r2 register.
11705 (s390_num_regs_3264): Increment to 68.
11706 (s390_regmap_3264): Add orig_r2 register.
11707 (s390_collect_ptrace_register): Handle orig_r2 register.
11708 (s390_supply_ptrace_register): Likewise.
11709 (s390_fill_last_break): New function.
11710 (s390_store_last_break): Likewise.
11711 (s390_fill_system_call): New function.
11712 (s390_store_system_call): Likewise.
11713 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11714 register sets.
11715 (s390_check_regset): New function.
11716 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11717 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11718 Update target_regsets for available register sets.
11719
2268b414
JK
117202011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11721 Jan Kratochvil <jan.kratochvil@redhat.com>
11722
11723 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11724 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11725 New.
11726 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11727 * linux-low.h (struct process_info_private): New member r_debug.
11728 * server.c (handle_qxfer_libraries): Call
11729 the_target->qxfer_libraries_svr4.
11730 (handle_qxfer_libraries_svr4): New function.
11731 (qxfer_packets): New entry "libraries-svr4".
11732 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11733 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11734 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11735 PACKET_qXfer_libraries_svr4.
11736
d6db1fab
UW
117372011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11738
11739 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11740 PSW address/mask between 8-byte and 16-byte formats.
11741 (s390_supply_ptrace_register): Likewise.
11742 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11743 basic addressing mode bit.
11744
242f5f1c
SS
117452011-11-24 Stan Shebs <stan@codesourcery.com>
11746
11747 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11748
f196051f
SS
117492011-11-17 Stan Shebs <stan@codesourcery.com>
11750
11751 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11752 (tracing_start_time): New global.
11753 (tracing_stop_time): New global.
11754 (tracing_user_name): New global.
11755 (tracing_notes): New global.
11756 (tracing_stop_note): New global.
11757 (cmd_qtstart): Set traceframe_usage, start_time.
11758 (stop_tracing): Set stop_time.
11759 (cmd_qtstatus): Report additional status.
11760 (cmd_qtp): New function.
11761 (handle_tracepoint_query): Call it.
11762 (cmd_qtnotes): New function.
11763 (handle_tracepoint_general_set): Call it.
11764 (get_timestamp): Rename from tsv_get_timestamp.
11765
405f8e94
SS
117662011-11-14 Stan Shebs <stan@codesourcery.com>
11767 Kwok Cheung Yeung <kcy@codesourcery.com>
11768
11769 * linux-x86-low.c (small_jump_insn): New.
11770 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11771 trampoline and error message, build a trampoline and issue a small
11772 jump instruction to it.
11773 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11774 trampoline and error message.
11775 (x86_get_min_fast_tracepoint_insn_len): New.
11776 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11777 * linux-low.h (struct linux_target_ops): Add arguments to
11778 install_fast_tracepoint_jump_pad operation, add new operation.
11779 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11780 arguments.
11781 (linux_get_min_fast_tracepoint_insn_len): New function.
11782 (linux_target_op): Add new operation.
11783 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11784 (gdb_trampoline_buffer_end): Ditto.
11785 (gdb_trampoline_buffer_error): Ditto.
11786 (struct ipa_sym_addresses): Add fields for new IPA variables.
11787 (symbol_list): Add entries for new IPA variables.
11788 (struct tracepoint): Add fields to hold the address range of the
11789 trampoline used by the tracepoint.
11790 (trampoline_buffer_head): New static variable.
11791 (trampoline_buffer_tail): Ditto.
11792 (claim_trampoline_space): New function.
11793 (have_fast_tracepoint_trampoline_buffer): New function.
11794 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11795 structure.
11796 (install_fast_tracepoint): Ditto, also add error buffer argument.
11797 (cmd_qtminftpilen): New function.
11798 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11799 (fast_tracepoint_from_trampoline_address): New function.
11800 (fast_tracepoint_collecting): Handle trampoline as part of jump
11801 pad space.
11802 (set_trampoline_buffer_space): New function.
11803 (initialize_tracepoint): Initialize new IPA variables.
11804 * target.h (struct target_ops): Add arguments to
11805 install_fast_tracepoint_jump_pad operation, add new
11806 get_min_fast_tracepoint_insn_len operation.
11807 (target_get_min_fast_tracepoint_insn_len): New.
11808 (install_fast_tracepoint_jump_pad): Add arguments.
11809 * server.h (IPA_BUFSIZ): Define.
11810 * linux-i386-ipa.c: Include extra header files.
11811 (initialize_fast_tracepoint_trampoline_buffer): New function.
11812 (initialize_low_tracepoint): Call it.
11813 * server.h (set_trampoline_buffer_space): Declare.
11814 (claim_trampoline_space): Ditto.
11815 (have_fast_tracepoint_trampoline_buffer): Ditto.
11816
1e4d1764
YQ
118172011-11-14 Yao Qi <yao@codesourcery.com>
11818
11819 * server.c (handle_query): Handle InstallInTrace for qSupported.
11820 * tracepoint.c (add_tracepoint): Sort list.
11821 (install_tracepoint, download_tracepoint): New.
11822 (cmd_qtdp): Call them to install and download tracepoints.
11823 (sort_tracepoints): Removed.
11824 (cmd_qtstart): Update.
11825
5c73ff4e
YQ
118262011-11-14 Yao Qi <yao@codesourcery.com>
11827
11828 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11829 * mem-break.h: Declare.
11830 * tracepoint.c (cmd_qtstart): Move some code to ...
11831 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11832 New.
11833 (download_tracepoints): Move some code to ...
11834 (download_tracepoint_1): ... here. New.
11835
86a30030
YQ
118362011-11-08 Yao Qi <yao@codesourcery.com>
11837
11838 * remote-utils.c (relocate_instruction): A comment fix.
11839
8d26e50c
JB
118402011-11-07 Joel Brobecker <brobecker@adacore.com>
11841
11842 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11843 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11844 dr_status_mirror and dr_control_mirror from debug_reg_state.
11845 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11846 (i386_initial_stuff): Remove use of deleted globals.
11847 (i386_get_thread_context, i386_set_thread_context,
11848 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11849 from debug_reg_state.
11850
a59306a3
YQ
118512011-11-05 Yao Qi <yao@codesourcery.com>
11852
11853 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11854 address as TPOINT's.
11855
3065dfb6
SS
118562011-11-02 Stan Shebs <stan@codesourcery.com>
11857
11858 * tracepoint.c (agent_mem_read_string): New function.
11859 (eval_agent_expr): Call it for tracenz.
11860 * server.c (handle_query): Report support for tracenz.
11861
fd0d8c7c
YQ
118622011-11-02 Yao Qi <yao@codesourcery.com>
11863
11864 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11865
609086b1
YQ
118662011-11-02 Yao Qi <yao@codesourcery.com>
11867
11868 * target.h: Fix a typo in comment.
11869
b9fd1791
PA
118702011-10-31 Pedro Alves <pedro@codesourcery.com>
11871
11872 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11873 clobber the breakpoints' shadows with fast tracepoint jumps.
11874 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11875 * target.c (write_inferior_memory): Also pass MYADDR down to
11876 check_mem_write.
11877
03583c20
UW
118782011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11879
11880 * configure.ac: Check support for personality routine.
11881 * configure: Regenerate.
11882 * config.in: Likewise.
11883 * linux-low.c: Include <sys/personality.h>.
11884 Define ADDR_NO_RANDOMIZE if necessary.
11885 (linux_create_inferior): Disable address space randomization when
11886 forking inferior, if requested.
11887 (linux_supports_disable_randomization): New function.
11888 (linux_target_ops): Install it.
11889 * server.h (disable_randomization): Declare.
11890 * server.c (disable_randomization): New global variable.
11891 (handle_general_set): Handle QDisableRandomization.
11892 (handle_query): Likewise for qSupported.
11893 (main): Support --disable-randomization and --no-disable-randomization
11894 command line arguments.
11895 * target.h (struct target_ops): Add supports_disable_randomization.
11896 (target_supports_disable_randomization): New macro.
11897
723b724b
MF
118982011-09-29 Mike Frysinger <vapier@gentoo.org>
11899
11900 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11901 ifdef check.
11902 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11903 [!PT_GETDSBT] (target_loadmap): New definition.
11904 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11905 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11906 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11907 and PT_GETDSBT to LINUX_LOADMAP.
11908 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11909 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11910
55329a5c 119112011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11912
11913 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11914 (arm_linux_hwbp_cap): New static variable.
11915 (arm_linux_get_hwbp_cap): Replace by ...
11916 (arm_linux_init_hwbp_cap): ... this new function.
11917 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11918 (arm_linux_get_hw_watchpoint_count): Likewise.
11919 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11920 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11921 (arm_prepare_to_resume): Use perror_with_name instead of error.
11922
55329a5c 119232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11924
11925 * linux-arm-low.c: Include <signal.h>.
11926 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11927 (struct arm_linux_hwbp_cap): New data type.
11928 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11929 (struct arm_linux_hw_breakpoint): New data type.
11930 (MAX_BPTS, MAX_WPTS): Define.
11931 (struct arch_process_info, struct arch_lwp_info): New data types.
11932 (arm_linux_get_hwbp_cap): New function.
11933 (arm_linux_get_hw_breakpoint_count): Likewise.
11934 (arm_linux_get_hw_watchpoint_count): Likewise.
11935 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11936 (arm_hwbp_control_initialize): Likewise.
11937 (arm_hwbp_control_is_enabled): Likewise.
11938 (arm_hwbp_control_is_initialized): Likewise.
11939 (arm_hwbp_control_disable): Likewise.
11940 (arm_linux_hw_breakpoint_equal): Likewise.
11941 (arm_linux_hw_point_initialize): Likewise.
11942 (struct update_registers_data): New data structure.
11943 (update_registers_callback: New function.
11944 (arm_insert_point): Likewise.
11945 (arm_remove_point): Likewise.
11946 (arm_stopped_by_watchpoint): Likewise.
11947 (arm_stopped_data_address): Likewise.
11948 (arm_new_process): Likewise.
11949 (arm_new_thread): Likewise.
11950 (arm_prepare_to_resume): Likewise.
11951 (the_low_target): Register arm_insert_point, arm_remove_point,
11952 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11953 arm_new_thread, and arm_prepare_to_resume.
11954
6b9801d4
SS
119552011-09-15 Stan Shebs <stan@codesourcery.com>
11956
11957 * server.h (struct emit_ops): Add compare-goto fields.
11958 * tracepoint.c (gdb_agent_op_sizes): New table.
11959 (emit_eq_goto): New function.
11960 (emit_ne_goto): New function.
11961 (emit_lt_goto): New function.
11962 (emit_le_goto): New function.
11963 (emit_gt_goto): New function.
11964 (emit_ge_goto): New function.
11965 (is_goto_target): New function.
11966 (compile_bytecodes): Recognize special cases of compare-goto
11967 combinations and call specialized emitters for them.
11968 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11969 (amd64_emit_ne_goto): New function.
11970 (amd64_emit_lt_goto): New function.
11971 (amd64_emit_le_goto): New function.
11972 (amd64_emit_gt_goto): New function.
11973 (amd64_emit_ge_goto): New function.
11974 (amd64_emit_ops): Add the new functions.
11975 (i386_emit_eq_goto): New function.
11976 (i386_emit_ne_goto): New function.
11977 (i386_emit_lt_goto): New function.
11978 (i386_emit_le_goto): New function.
11979 (i386_emit_gt_goto): New function.
11980 (i386_emit_ge_goto): New function.
11981 (i386_emit_ops): Add the new functions.
11982
bf15cbda
SS
119832011-09-08 Stan Shebs <stan@codesourcery.com>
11984
11985 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11986 (i386_emit_epilogue): Restore %ebx.
11987
943ca1dd
JZ
119882011-08-31 Jie Zhang <jzhang918@gmail.com>
11989
11990 * server.c (step_thread): Remove definition.
11991 (process_serial_event): Don't handle Hs.
11992 * server.h (step_thread): Remove declaration.
11993 * target.c (set_desired_inferior): Remove use of step_thread.
11994
e3deef73
LM
119952011-08-24 Luis Machado <lgustavo@codesourcery.com>
11996
11997 * linux-low.c: Include linux-procfs.h.
11998 (linux_attach_lwp_1): Update comments.
11999 (linux_attach): Scan for existing threads when attaching to a
12000 process that is the tgid.
12001 * Makefile.in: Update dependencies.
12002
13da1c97
LM
120032011-08-24 Luis Machado <lgustavo@codesourcery.com>
12004
12005 * configure.srv: Add linux-procfs.o dependencies.
12006
881127c9
YQ
120072011-08-14 Yao Qi <yao@codesourcery.com>
12008
12009 * target.h (struct target_ops): Fix indent.
12010 * win32-low.c (win32_target_ops): Fix comment.
12011
58dbd541
YQ
120122011-08-14 Andrew Jenner <andrew@codesourcery.com>
12013 Yao Qi <yao@codesourcery.com>
12014
12015 * Makefile.in (clean): Remove tic6x-*.c files.
12016 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12017 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12018 (tic6x-c64xp-linux.c): Likewise.
12019 * configure.srv: Add support for tic6x-*-uclinux.
12020 * linux-tic6x-low.c: New.
12021 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12022
78d85199
YQ
120232011-08-14 Andrew Stubbs <ams@codesourcery.com>
12024 Yao Qi <yao@codesourcery.com>
12025
12026 * target.h (struct target_ops): Add read_loadmap.
12027 * linux-low.c (struct target_loadseg): New type.
12028 (struct target_loadmap): New type.
12029 (linux_read_loadmap): New function.
12030 (linux_target_ops): Add linux_read_loadmap.
12031 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12032 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12033 to NULL.
78d85199 12034
a959a88d
EZ
120352011-08-05 Eli Zaretskii <eliz@gnu.org>
12036
12037 * win32-low.c: Include <stdint.h>.
12038
1ced966e
PA
120392011-07-22 Pedro Alves <pedro@codesourcery.com>
12040
12041 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12042 to the inferior here.
12043 (i386_remove_aligned_watchpoint): Ditto.
12044 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12045 fit part of the watchpoint in the debug registers.
12046 (i386_update_inferior_debug_regs): New.
12047 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12048 registers, and only update the inferior on success.
12049 (i386_low_remove_watchpoint): Ditto.
12050
d26e3629
KY
120512011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12052
12053 * linux-low.c (compare_ints, unique, list_threads, show_process,
12054 linux_core_of_thread): Delete.
12055 (linux_target_ops): Change linux_core_of_thread to
12056 linux_common_core_of_thread.
12057 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12058 * utils.c (malloc_failure): Change type of argument.
12059 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12060 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12061 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12062 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12063 (IPA_OBJS): Add common-utils-ipa.o.
12064 (ptid_h, linux_osdata_h): New macros.
12065 (server_h): Add common/common-utils.h, common/xml-utils.h,
12066 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12067 common/ptid.h.
12068 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12069 ptid.o, buffer.o): New rules.
12070 (linux-low.o): Add common/linux-osdata.h as a dependency.
12071 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12072 * configure.ac: Add AC_HEADER_DIRENT check.
12073 * config.in: Regenerate.
12074 * configure: Regenerate.
12075 * remote-utils.c (xml_escape_text): Delete.
12076 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12077 buffer_xml_printf): Move to common/buffer.c.
12078 * server.c (main): Remove call to initialize_inferiors.
12079 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12080 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12081 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12082 internal_error, gdb_assert, gdb_assert_fail): Delete.
12083 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12084 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12085 common/buffer.h.
12086 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12087 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12088 initialize_inferiors): Delete.
12089
2275a1a7
PA
120902011-07-20 Pedro Alves <pedro@codesourcery.com>
12091
12092 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12093 symbol error.
12094
0a5b1e09
PA
120952011-05-31 Pedro Alves <pedro@codesourcery.com>
12096
12097 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12098 assertion.
12099 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12100
6938fd34
YQ
121012011-05-26 Yao Qi <yao@codesourcery.com>
12102
12103 * Makefile.in (thread-db.o): Track dependence to
12104 common/gdb_thread_db.h.
12105 * thread-db.c: include gdb_thread_db.h from right place.
12106
b481f9e0
TT
121072011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12108
12109 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12110 __FILE__ and __LINE__ to internal_error.
12111
98a5dd13
DE
121122011-05-13 Doug Evans <dje@google.com>
12113
12114 * thread-db.c (try_thread_db_load_from_sdir): New function.
12115 (try_thread_db_load_from_dir): New function.
12116 (thread_db_load_search): Handle $sdir, ignore $pdir.
12117 Remove trying of system directories if search of
12118 libthread-db-search-path fails, that is now done via $sdir.
12119
d248b706
KY
121202011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12121
12122 * server.c (handle_query): Add EnableDisableTracepoints to the list
12123 of supported features.
43aaf8b6 12124 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12125 tracepoints.
43aaf8b6
PA
12126 (cmd_qtenable_disable): New.
12127 (cmd_qtstart): Install tracepoints even if disabled.
12128 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12129 receiving a QTEnable or QTDisable packet.
12130 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12131 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12132 tracepoints.
12133 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12134
84e578fb
DE
121352011-05-10 Doug Evans <dje@google.com>
12136
12137 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12138
71f55dd8
DE
121392011-05-04 Doug Evans <dje@google.com>
12140
12141 * linux-low.c (linux_join): Skip process lookup.
12142 * spu-low.c (spu_join): Ditto.
12143 * server.c (join_inferiors_callback): Delete.
12144 (process_serial_event): For 'D' packet (detach) call join_inferior
12145 directly.
12146
4d393d60
JM
121472011-05-04 Joseph Myers <joseph@codesourcery.com>
12148
12149 * README: Don't mention xscale*-*-linux*.
12150 * configure.srv (xscale*-*-linux*): Don't handle target.
12151
b00ad6ff
NF
121522011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12153
12154 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12155 casting pointers.
12156 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12157 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12158 (i386_emit_void_call_2): Likewise.
12159
af96c192
YQ
121602011-04-26 Yao Qi <yao@codesourcery.com>
12161
43aaf8b6
PA
12162 * linux-low.c: Move common macros to linux-ptrace.h.
12163 Include linux-ptrace.h.
af96c192
YQ
12164 * Makefile.in (linux_ptrace_h): New.
12165 (linux-low.o): Depends on linux-ptrace.h.
12166
03f2bd59
JK
121672011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12168
12169 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12170 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12171 (remote_prepare): New function with most of the TCP code from ...
12172 (remote_open): ... here. Detect PORT here unconditionally. Move also
12173 setting transport_is_reliable.
12174 * server.c (run_once): New variable.
12175 (gdbserver_usage): Document it.
12176 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12177 the first run if RUN_ONCE.
12178 * server.h (run_once, remote_prepare): New declarations.
12179
7a9dd1b2
TT
121802011-04-19 Tom Tromey <tromey@redhat.com>
12181
12182 * win32-low.c (handle_load_dll): Remove duplicate "the".
12183
81239425
PM
121842011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12185
12186 Remove support for old Cygwin 1.5 versions.
12187 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12188 function to avoid warning.
12189 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12190 warning.
12191
9e0627f1
PM
121922011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12193
12194 * gdbserver/server.h (Macro _): Define it if not available.
12195
588eebee
MS
121962011-03-14 Michael Snyder <msnyder@vmware.com>
12197
348af9f7 12198 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12199
43f70d4c
JB
122002011-03-10 Joel Brobecker <brobecker@adacore.com>
12201
12202 * Makefile.in (maintainer-clean realclean distclean): Remove
12203 "make ... subdir_do" command.
12204
348af9f7
MS
122052011-03-10 Michael Snyder <msnyder@vmware.com>
12206
12207 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12208
12209 * server.c (handle_v_run): Free alloced buffer on early return.
12210
e637a4f5
YQ
122112011-03-09 Yao Qi <yao@codesourcery.com>
12212
12213 Revert:
12214 2011-03-04 Yao Qi <yao@codesourcery.com>
12215
12216 * Makefile.in: Remove GNU make feature --directory.
12217
12218 2011-03-05 Yao Qi <yao@codesourcery.com>
12219
12220 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12221 (subdir_do): New make target. Copied from gdb/Makefile.
12222 (maintainer-clean, realclean, distclean, clean): Call corresponding
12223 make targets in common/Makefile.
12224
12225 2011-02-11 Yao Qi <yao@codesourcery.com>
12226
12227 * configure.ac: Call AC_PROG_RANLIB.
12228 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12229 * configure: Regenerate.
12230
e6edda56
JK
122312011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12232
12233 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12234
e5141119
JB
122352011-03-06 Yao Qi <yao@codesourcery.com>
12236
12237 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12238
64794aa4
JB
122392011-03-05 Yao Qi <yao@codesourcery.com>
12240
12241 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12242 (subdir_do): New make target. Copied from gdb/Makefile.
12243 (maintainer-clean, realclean, distclean, clean): Call corresponding
12244 make targets in common/Makefile.
12245
7a762829
YQ
122462011-03-04 Yao Qi <yao@codesourcery.com>
12247
12248 * Makefile.in: Remove GNU make feature --directory.
12249
348af9f7
MS
122502011-03-04 Michael Snyder <msnyder@vmware.com>
12251
12252 * server.c (queue_stop_reply): Call xmalloc not malloc.
12253
122542011-03-02 Michael Snyder <msnyder@vmware.com>
12255
12256 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12257
9f72fee2
MS
122582011-02-28 Michael Snyder <msnyder@vmware.com>
12259
588eebee
MS
12260 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12261 (cmd_qtframe): Ditto.
12262 (cmd_qtbuffer): Ditto.
12263 (cmd_bigqtbuffer): Ditto.
12264
9f72fee2
MS
12265 * utils.c (decimal2str): Initialize 'width' to nine, then
12266 don't mess with it.
12267
8040bd49
UW
122682011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12269
12270 * hostio.c (require_data): Free *data, not data.
12271
7e52cbd0
JK
122722011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12273
12274 * hostio.c (require_data): Use free, not xfree.
12275
9130f83e
MS
122762011-02-27 Michael Snyder <msnyder@vmware.com>
12277
4b812f4e
MS
12278 * server.c (handle_query): Discard unused value.
12279
9130f83e
MS
12280 * hostio.c (require_data): Free malloc memory before returning
12281 error.
12282
69d37113
MS
122832011-02-26 Michael Snyder <msnyder@vmware.com>
12284
12285 * linux-low.c (list_threads): Call closedir for dirent.
12286
35f5825a
MS
122872011-02-27 Michael Snyder <msnyder@vmware.com>
12288
2a589cef
MS
12289 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12290 a case statement falls through.
12291
0adea5f7
MS
12292 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12293
35f5825a
MS
12294 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12295 in comparison.
12296
238f1c74
MS
122972011-02-26 Michael Snyder <msnyder@vmware.com>
12298
12299 * utils.c (decimal2str): Eliminate dead code and dead param.
12300 (pulongest): Drop dead param from call to decimal2str.
12301 (plongest): Ditto.
12302
633ff500
JB
123032011-02-24 Joel Brobecker <brobecker@adacore.com>
12304
12305 Revert the following patch (not approved yet):
12306 2011-02-21 Hui Zhu <teawater@gmail.com>
12307 * tracepoint.c (tp_printf): New function.
12308 (eval_agent_expr): Handle gdb_agent_op_printf.
12309
f9c6ff72
HZ
123102011-02-21 Hui Zhu <teawater@gmail.com>
12311
12312 * tracepoint.c (tp_printf): New function.
12313 (eval_agent_expr): Handle gdb_agent_op_printf.
12314
94d5e490
TT
123152011-02-18 Tom Tromey <tromey@redhat.com>
12316
12317 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12318 (tracepoint.o): Likewise.
12319 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12320 (gdb_agent_op_names): Likewise.
12321
c7f96d2b
TT
123222011-02-18 Tom Tromey <tromey@redhat.com>
12323
12324 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12325 gdb_agent_op_rot>: New constants.
12326 (gdb_agent_op_names): Add pick and roll.
12327 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12328 cases.
12329
0feedb2c
JK
123302011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12331
12332 * aclocal.m4: Regenerated with aclocal-1.11.1.
12333
b3b9301e
PA
123342011-02-14 Pedro Alves <pedro@codesourcery.com>
12335
12336 * server.c (handle_qxfer_traceframe_info): New.
12337 (qxfer_packets): Register "traceframe-info".
12338 (handle_query): Report support for qXfer:traceframe-info:read+.
12339 * tracepoint.c (match_blocktype): New.
12340 (traceframe_find_block_type): Rename to ...
12341 (traceframe_walk_blocks): ... this. Add callback filter argument,
12342 and use it.
12343 (traceframe_find_block_type): New, reimplemented on top of
12344 traceframe_walk_blocks.
12345 (build_traceframe_info_xml): New.
12346 (traceframe_read_info): New.
12347 * server.h (traceframe_read_info): Declare.
12348
4f3e6fb7
YQ
123492011-02-11 Yao Qi <yao@codesourcery.com>
12350
12351 * configure.ac: Call AC_PROG_RANLIB.
12352 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12353 * configure: Regenerate.
12354
764880b7
PA
123552011-02-07 Pedro Alves <pedro@codesourcery.com>
12356
12357 * server.c (gdb_read_memory): Change return semantics to allow
12358 partial transfers.
12359 (handle_search_memory_1): Adjust.
12360 (process_serial_event) <'m' packet>: Handle partial transfers.
12361 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12362
1c79eb8a
PA
123632011-01-28 Pedro Alves <pedro@codesourcery.com>
12364
12365 * regcache.c (init_register_cache): Initialize
12366 regcache->register_status.
12367 (free_register_cache): Release regcache->register_status.
12368 (regcache_cpy): Copy register_status.
12369 (registers_to_string): Print 'x's for unavailable registers.
12370 (supply_register): Mark the register's status valid or
12371 unavailable, depending on whether a buffer was passed in or not.
12372 (supply_register_zeroed): New.
12373 (supply_regblock): Mark the registers' status valid or
12374 unavailable, depending on whether a buffer was passed in or not.
12375 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12376 (struct regcache): New `register_status' field.
12377 (supply_register_zeroed): Declare.
12378 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12379 supply_register_zeroed, rather than passing a NULL buffer to
12380 supply_register.
12381 * tracepoint.c (fetch_traceframe_registers): Update comment.
12382
85724a0e
PA
123832011-01-28 Pedro Alves <pedro@codesourcery.com>
12384
12385 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12386 buffer explicit.
12387
d08aafef
PA
123882011-01-25 Pedro Alves <pedro@codesourcery.com>
12389
12390 * server.h (decode_xfer_write): Change prototype.
12391 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12392 and don't extract the annex here.
12393 * server.c (decode_xfer_read): Remove `annex' parameter,
12394 and don't extract the annex here.
12395 (decode_xfer): New.
12396 (struct qxfer): New.
12397 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12398 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12399 (handle_qxfer_statictrace): New functions, abstracted out from
12400 handle_query, and made to use the struct qxfer interface.
12401 (handle_threads_qxfer_proper): Rename to ...
12402 (handle_qxfer_threads_proper): ... this.
12403 (handle_threads_qxfer): Rename to ...
12404 (handle_qxfer_threads): ... this. Adjust.
12405 (qxfer_packets): New array.
12406 (handle_qxfer): New function.
12407 (handle_query): Use handle_qxfer.
12408
493e2a69
MS
124092011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12410
12411 * gdbreplay.c: Shorten lines of >= 80 columns.
12412 * linux-low.c: Ditto.
12413 * linux-ppc-low.c: Ditto.
12414 * linux-s390-low.c: Ditto.
12415 * linux-sparc-low.c: Ditto.
12416 * linux-x86-low.c: Ditto.
12417 * linux-xtensa-low.c: Ditto.
12418 * mem-break.c: Ditto.
12419 * nto-low.c: Ditto.
12420 * regcache.h: Ditto.
12421 * remote-utils.c: Ditto.
12422 * server.c: Ditto.
12423 * server.h: Ditto.
12424 * thread-db.c: Ditto.
12425 * tracepoint.c: Ditto.
12426 * utils.c: Ditto.
12427 * win32-low.h: Ditto.
12428
44944448
JB
124292011-01-05 Joel Brobecker <brobecker@adacore.com>
12430
12431 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12432 update.
12433
71ce852c
JB
124342011-01-01 Joel Brobecker <brobecker@adacore.com>
12435
12436 * server.c (gdbserver_version): Update copyright year in version
12437 output.
12438 * gdbreplay.c (gdbreplay_version): Ditto.
12439
eb826dc6
MF
124402010-12-29 Jie Zhang <jie.zhang@analog.com>
12441
12442 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12443 * linux-bfin-low.c: New file.
12444 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12445 PT_DATA_ADDR for BFIN targets.
12446 * Makefile.in (SFILES): Add linux-bfin-low.c.
12447 (clean): Remove reg-bfin.c.
12448 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12449 * README: Mention supported Blackfin targets.
12450
39ab222a
MF
124512010-12-23 Mike Frysinger <vapier@gentoo.org>
12452
12453 * .gitignore: New file.
12454
a1f2ce7d
MF
124552010-11-16 Mike Frysinger <vapier@gentoo.org>
12456
12457 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12458
f474844c
JZ
124592010-10-22 Jie Zhang <jie@codesourcery.com>
12460
12461 * Makefile.in: Add FLAGS_TO_PASS variable.
12462 (install): Remove dependency of install-only and recursively
12463 invoke make for install-only.
12464
f1048712
DE
124652010-10-04 Doug Evans <dje@google.com>
12466
12467 * Makefile.in (uninstall): Use $(DESTDIR).
12468
b53a1623
PA
124692010-09-24 Pedro Alves <pedro@codesourcery.com>
12470
e6ee044d
PA
12471 PR gdb/11842
12472
b53a1623
PA
12473 * linux-x86-low.c (compat_siginfo_from_siginfo)
12474 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12475 si_code is < 0. Check for si_code == SI_TIMER before checking for
12476 si_code < 0.
12477
fa1bd1e4
JB
124782010-09-13 Joel Brobecker <brobecker@adacore.com>
12479
12480 * lynx-i386-low.c: New file.
12481 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12482
47fac8f8
JB
124832010-09-13 Joel Brobecker <brobecker@adacore.com>
12484
12485 * lynx-low.c (ptrace_request_to_str): Remove handling for
12486 request values that have been removed in LynxOS 5.x.
12487
1adfc54d
JB
124882010-09-13 Joel Brobecker <brobecker@adacore.com>
12489
12490 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12491 <ptrace.h>
12492
c2a66c29
NS
124932010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12494
12495 * configure.ac: Add --enable-inprocess-agent option.
12496 * configure: Rebuilt.
12497
32fcada3
YQ
124982010-09-06 Yao Qi <yao@codesourcery.com>
12499
12500 * linux-low.c (linux_kill): Remove unused variable.
12501 (linux_stabilize_threads): Likewise.
12502 * server.c (start_inferior): Likewise.
12503 (queue_stop_reply_callback): Likewise.
12504 * tracepoint.c (do_action_at_tracepoint): Likewise.
12505
0cccb683
YQ
125062010-09-06 Yao Qi <yao@codesourcery.com>
12507
12508 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12509 on return.
12510
423ec54c
JK
125112010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12512
12513 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12514
12ac6819
PA
125152010-09-06 Pedro Alves <pedro@codesourcery.com>
12516
12517 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12518 "$(IPA_DEPFILES)".
12519
8ed54b31
JB
125202010-09-01 Joel Brobecker <brobecker@adacore.com>
12521
12522 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12523 gdbserver/lynx-ppc-low.c: New files.
12524 * Makefile.in (lynx_low_h): New variable.
12525 (lynx-low.o, lynx-ppc-low.o): New rules.
12526 * configure.ac: On LynxOS, link with -lnetinet.
12527 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12528 * configure: regenerate.
12529
bb0116a4
JB
125302010-09-01 Joel Brobecker <brobecker@adacore.com>
12531
12532 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12533 * configure.ac: Add check for vasprintf and vsnprintf.
12534 * configure, config.in: Regenerate.
12535 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12536
a778ab81 125372010-09-01 Joel Brobecker <brobecker@adacore.com>
12538
12539 * gdbreplay.c: Move include of alloca.h up, next to include of
12540 malloc.h.
12541 * server.h: Add include of malloc.h.
12542 * mem-break.c: Remove include of malloc.h.
12543 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12544
8b034a19 125452010-09-01 Joel Brobecker <brobecker@adacore.com>
12546
12547 * Makefile.in (memmem.o): Build with -Wno-error.
12548
125492010-09-01 Joel Brobecker <brobecker@adacore.com>
12550
12551 * utils.c (xsnprintf): Make non-static.
12552 * server.h: Add xsnprintf declaration.
12553 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12554 replace calls to snprintf by calls to xsnprintf throughout.
12555
125562010-09-01 Joel Brobecker <brobecker@adacore.com>
12557
12558 * configure.ac: Add configure check for alloca.
12559 * configure, config.in: Regenerate.
12560 * server.h: Include alloca.h if it exists.
12561 * gdbreplay.c: Include alloca.h if it exists.
12562
1a981360
PA
125632010-08-28 Pedro Alves <pedro@codesourcery.com>
12564
12565 * linux-low.c (__SIGRTMIN): Define if not already defined.
12566 (linux_create_inferior): Check for __ANDROID__ rather than
12567 __SIGRTMIN.
12568 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12569 are already deferred.
12570 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12571 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12572 stopped and already has a pending signal to report.
12573 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12574 a pending signal to report or is moving out of a jump pad.
12575 (linux_init_signals): Check for __ANDROID__ rather than
12576 __SIGRTMIN.
12577
b4d51a55
PA
125782010-08-28 Pedro Alves <pedro@codesourcery.com>
12579
12580 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12581 debug_threads check. Avoid a linear search when not doing debug
12582 output.
12583
ec48365d
PA
125842010-08-27 Pedro Alves <pedro@codesourcery.com>
12585
12586 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12587 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12588 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12589 (process_event): Change local fd's type to gdb_fildes_t.
12590 (create_file_handler): Adjust prototype.
12591 (delete_file_handler): Adjust prototype.
12592 (handle_file_event): Adjust prototype. Use pfildes.
12593 (create_file_event): Adjsut prototype.
12594 * remote-utils.c (remote_desc, listen_desc): Change type to
12595 gdb_fildes_t.
12596 * server.h: New gdb_fildes_t typedef.
12597 [USE_WIN32API]: Include winsock2.h.
12598 (delete_file_handler, add_file_handler): Adjust prototypes.
12599 (pfildes): Declare.
12600 * utils.c (pfildes): New.
12601
854d88f0
PA
126022010-08-27 Pedro Alves <pedro@codesourcery.com>
12603
12604 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12605 * configure: Regenerate.
12606
0146f85b
PA
126072010-08-27 Pedro Alves <pedro@codesourcery.com>
12608
12609 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12610 (linux_done_accessing_memory): ... this.
12611 (linux_target_ops): Adjust.
12612 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12613 * nto-low.c (nto_target_ops): Adjust comment.
12614 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12615 * spu-low.c (spu_target_ops): Adjust comment.
12616 * target.h (target_ops): Rename unprepare_to_access_memory field
12617 to done_accessing_memory.
12618 (unprepare_to_access_memory): Rename to ...
12619 (done_accessing_memory): ... this.
12620
90d74c30
PA
126212010-08-26 Pedro Alves <pedro@codesourcery.com>
12622
12623 * linux-low.c (linux_prepare_to_access_memory): New.
12624 (linux_unprepare_to_access_memory): New.
12625 (linux_target_ops): Install them.
12626 * server.c (read_memory): Rename to ...
12627 (gdb_read_memory): ... this. Use
12628 prepare_to_access_memory/prepare_to_access_memory.
12629 (write_memory): Rename to ...
12630 (gdb_write_memory): ... this. Use
12631 prepare_to_access_memory/prepare_to_access_memory.
12632 (handle_search_memory_1): Adjust.
12633 (process_serial_event): Adjust.
12634 * target.h (struct target_ops): New fields
12635 prepare_to_access_memory and unprepare_to_access_memory.
12636 (prepare_to_access_memory, unprepare_to_access_memory): New.
12637 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12638 prepare_to_access_memory/prepare_to_access_memory.
12639 * nto-low.c (nto_target_ops): Adjust.
12640 * spu-low.c (spu_target_ops): Adjust.
12641 * win32-low.c (win32_target_ops): Adjust.
12642
fd467969
PA
126432010-08-26 Pedro Alves <pedro@codesourcery.com>
12644
12645 * Makefile.in (WARN_CFLAGS): Get it from configure.
12646 (WERROR_CFLAGS): New.
12647 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12648 * configure.ac: Introduce --enable-werror, which adds -Werror to
12649 the compiler command line. Enabled by default. Disable with
12650 --disable-werror. Add -Wdeclaration-after-statement
12651 Wpointer-arith and -Wformat-nonliteral to warning flags.
12652 * configure: Regenerate.
12653
331e2f5f
PA
126542010-08-26 Pedro Alves <pedro@codesourcery.com>
12655
12656 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12657
e581f2b4
PA
126582010-08-26 Pedro Alves <pedro@codesourcery.com>
12659
12660 * gdbreplay.c (remote_error): New.
12661 (gdbchar): New.
12662 (expect): Use gdbchar. Check for error reading from GDB.
12663 Clarify sync error output.
12664 (play): Check for errors writing to GDB.
12665 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12666 * remote-utils.c (getpkt): Check for errors writing to the remote
12667 descriptor.
12668
3c11dd79
PA
126692010-08-25 Pedro Alves <pedro@codesourcery.com>
12670
12671 * linux-low.c (linux_wait_1): Move non-debugging code out of
12672 `debug_threads' control.
12673
d20a8ad9
PA
126742010-08-25 Pedro Alves <pedro@codesourcery.com>
12675
12676 * linux-low.c (linux_wait_1): Don't set last_status here.
12677 * server.c (push_event, queue_stop_reply_callback): Assert we're
12678 not pushing a TARGET_WAITKIND_IGNORE event.
12679 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12680 (myresume, handle_target_event): Set the thread's last_resume_kind
12681 and last_status from the target returned status.
12682
964e4306
PA
126832010-08-25 Pedro Alves <pedro@codesourcery.com>
12684
12685 PR threads/10729
12686
12687 * linux-x86-low.c (update_debug_registers_callback): New.
12688 (i386_dr_low_set_addr): Use it.
12689 (i386_dr_low_get_addr): New.
12690 (i386_dr_low_set_control): Use update_debug_registers_callback.
12691 (i386_dr_low_get_control): New.
12692 (i386_dr_low_get_status): Adjust.
12693 * linux-low.c (linux_stop_lwp): New.
12694 * linux-low.h (linux_stop_lwp): Declare.
12695
12696 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12697 argument instead of a i386_debug_reg_state.
12698 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12699 a i386_debug_reg_state.
12700 (i386_insert_aligned_watchpoint): Adjust.
12701 (i386_remove_aligned_watchpoint): Adjust.
12702 (i386_low_stopped_data_address): Read the debug registers from the
12703 inferior instead of from the mirrors.
12704 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12705 (i386_dr_low_get_addr): Declare.
12706 (i386_dr_low_get_control): Declare.
12707 (i386_dr_low_get_status): Change prototype.
12708
12709 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12710 (i386_dr_low_get_addr): New.
12711 (i386_dr_low_get_control): New.
12712 (i386_dr_low_get_status): Adjust prototype. Return
12713 dr_status_mirror.
12714 (i386_initial_stuff): Clear dr_status_mirror and
12715 dr_control_mirror.
12716 (i386_get_thread_context): Adjust.
12717 (i386_set_thread_context): Adjust.
12718 (i386_thread_added): Adjust.
12719
5f21a75b
PA
127202010-08-24 Pedro Alves <pedro@codesourcery.com>
12721
12722 * linux-low.h (linux_thread_area): Delete declaration.
12723
3e4c1235
TS
127242010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12725
12726 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12727 after its termination.
12728
1971b033
PA
127292010-08-09 Pedro Alves <pedro@codesourcery.com>
12730
12731 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12732 (gdb_wants_all_stopped): Delete.
12733 (linux_wait_1): Don't call them.
12734 * server.c (handle_v_cont): Tag all threads as want-stopped.
12735 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12736 stopped as "client-wants-stopped".
12737
310444ac
PA
127382010-07-31 Pedro Alves <pedro@codesourcery.com>
12739
12740 * Makefile.in (signals_h): New.
12741 (server_h): Depend on it.
12742 (server.o): Don't depend on $(signals_def).
12743 (signals.o): Depend on $(signals_def).
12744
a19cae16
JK
127452010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12746
12747 * Makefile.in (signals_def): New.
12748 (server_h): Append include/gdb/signals.h and signals_def.
12749 (server.o): Append signals_def.
12750
30d50328
JK
127512010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12752
12753 * server.c (handle_target_event): Use target_signal_to_host for
12754 resume_info.sig initialization.
12755 * target.h (struct thread_resume) <sig>: New comment.
12756
5c3216e2
OS
127572010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12758
c6f46ca0
OS
12759 * server.c (handle_query): strcpy() the returned string from paddress()
12760 instead of sprintf().
5c3216e2
OS
12761 * utils.c (paddress): Return phex_nz().
12762
6bd31874
JB
127632010-07-07 Joel Brobecker <brobecker@adacore.com>
12764
12765 * server.c (handle_v_cont): Call mourn_inferior if process
12766 just exited.
12767 (myresume): Likewise.
12768
0fb4aa4b
PA
127692010-07-01 Pedro Alves <pedro@codesourcery.com>
12770
12771 Static tracepoints, and integration with UST.
12772
12773 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12774 * mem-break.c (uninsert_all_breakpoints)
12775 (reinsert_all_breakpoints): New.
12776 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12777 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12778 (gdb_agent_ust_loaded, helper_thread_id)
12779 (gdb_agent_helper_thread_id): New macros.
12780 (struct ipa_sym_addresses): Add addr_ust_loaded,
12781 addr_helper_thread_id, addr_cmd_buf.
12782 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12783 (in_process_agent_loaded_ust): New.
12784 (write_e_ust_not_loaded): New.
12785 (maybe_write_ipa_ust_not_loaded): New.
12786 (struct collect_static_trace_data_action): New.
12787 (enum tracepoint_type) <static_tracepoint>: New.
12788 (struct tracepoint) <handle>: Mention static tracepoints.
12789 (struct static_tracepoint_ctx): New.
12790 (CMD_BUF_SIZE): New.
12791 (add_tracepoint_action): Handle static tracepoint actions.
12792 (unprobe_marker_at): New.
12793 (clear_installed_tracepoints): Handle static tracepoints.
12794 (cmd_qtdp): Handle static tracepoints.
12795 (probe_marker_at): New.
12796 (cmd_qtstart): Handle static tracepoints.
12797 (response_tracepoint): Handle static tracepoints.
12798 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12799 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12800 (get_context_regcache): Handle static tracepoints.
12801 (do_action_at_tracepoint): Handle static tracepoint actions.
12802 (traceframe_find_block_type): Handle static trace data blocks.
12803 (traceframe_read_sdata): New.
12804 (download_tracepoints): Download static tracepoint actions.
12805 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12806 (GDB_PROBE_NAME): New.
12807 (ust_ops): New.
12808 (GET_UST_SYM): New.
12809 (USTF): New.
12810 (dlsym_ust): New.
12811 (ust_marker_to_static_tracepoint): New.
12812 (gdb_probe): New.
12813 (collect_ust_data_at_tracepoint): New.
12814 (gdb_ust_probe): New.
12815 (UNIX_PATH_MAX, SOCK_DIR): New.
12816 (gdb_ust_connect_sync_socket): New.
12817 (resume_thread, stop_thread): New.
12818 (run_inferior_command): New.
12819 (init_named_socket): New.
12820 (gdb_ust_socket_init): New.
12821 (cstr_to_hexstr): New.
12822 (next_st): New.
12823 (first_marker, next_marker): New.
12824 (response_ust_marker): New.
12825 (cmd_qtfstm, cmd_qtsstm): New.
12826 (unprobe_marker_at, probe_marker_at): New.
12827 (cmd_qtstmat, gdb_ust_thread): New.
12828 (gdb_ust_init): New.
12829 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12830 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12831 (ST_REGENTRY): New.
12832 (x86_64_st_collect_regmap): New.
12833 (X86_64_NUM_ST_COLLECT_GREGS): New.
12834 (AMD64_RIP_REGNUM): New.
12835 (supply_static_tracepoint_registers): New.
12836 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12837 (ST_REGENTRY): New.
12838 (i386_st_collect_regmap): New.
12839 (i386_NUM_ST_COLLECT_GREGS): New.
12840 (supply_static_tracepoint_registers): New.
12841 * server.c (handle_query): Handle qXfer:statictrace:read.
12842 <qSupported>: Report support for StaticTracepoints, and
12843 qXfer:statictrace:read features.
12844 * server.h (traceframe_read_sdata)
12845 (supply_static_tracepoint_registers): Declare.
12846 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12847 (unpack_varlen_hex): Include in IPA build.
12848 * Makefile.in (ustlibs, ustinc): New.
12849 (IPA_OBJS): Add remote-utils-ipa.o.
12850 ($(IPA_LIB)): Link -ldl and -lpthread.
12851 (UST_CFLAGS): New.
12852 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12853 * config.in, configure: Regenerate.
12854
9e4344e5
PA
128552010-06-20 Ian Lance Taylor <iant@google.com>
12856 Pedro Alves <pedro@codesourcery.com>
12857
12858 * linux-x86-low.c (always_true): Delete.
12859 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12860 trying to fool the compiler with always_true.
12861
c6beb2cb
PA
128622010-06-20 Pedro Alves <pedro@codesourcery.com>
12863
12864 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12865 conditions in gdbserver.
12866
d2ed6730
UW
128672010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12868
12869 * spu-low.c (spu_read_memory): Wrap around local store limit.
12870 (spu_write_memory): Likewise.
12871
4e29fb54
PA
128722010-06-15 Pedro Alves <pedro@codesourcery.com>
12873
12874 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12875 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12876 LONGEST uses.
12877 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12878 uses.
12879 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12880 uses with LONGEST uses.
12881
6a271cae
PA
128822010-06-14 Stan Shebs <stan@codesourcery.com>
12883 Pedro Alves <pedro@codesourcery.com>
12884
12885 Bytecode compiler.
12886
12887 * linux-x86-low.c: Include limits.h.
12888 (add_insns): New.
12889 (always_true): New.
12890 (EMIT_ASM): New.
12891 (EMIT_ASM32): New.
12892 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12893 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12894 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12895 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12896 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12897 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12898 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12899 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12900 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12901 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12902 (amd64_emit_void_call_2): New.
12903 (amd64_emit_ops): New.
12904 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12905 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12906 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12907 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12908 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12909 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12910 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12911 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12912 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12913 (i386_emit_stack_adjust, i386_emit_int_call_1)
12914 (i386_emit_void_call_2): New.
12915 (i386_emit_ops): New.
12916 (x86_emit_ops): New.
12917 (the_low_target): Install x86_emit_ops.
12918 * server.h (struct emit_ops): New.
12919 (get_raw_reg_func_addr): Declare.
12920 (current_insn_ptr, emit_error): Declare.
12921 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12922 (set_trace_state_variable_value): New defines.
12923 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12924 addr_get_trace_state_variable_value and
12925 addr_set_trace_state_variable_value.
12926 (symbol_list): New fields for get_raw_reg,
12927 get_trace_state_variable_value and set_trace_state_variable_value.
12928 (condfn): New typedef.
12929 (struct tracepoint): New field `compiled_cond'.
12930 (do_action_at_tracepoint): Clear compiled_cond.
12931 (get_trace_state_variable_value, set_trace_state_variable_value):
12932 Export in the IPA.
12933 (condition_true_at_tracepoint): If there's a compiled condition,
12934 run that.
12935 (current_insn_ptr, emit_error): New globals.
12936 (struct bytecode_address): New.
12937 (get_raw_reg_func_addr): New.
12938 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12939 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12940 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12941 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12942 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12943 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12944 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12945 (compile_tracepoint_condition, compile_bytecodes): New.
12946 * target.h (emit_ops): Forward declare.
12947 (struct target_ops): New field emit_ops.
12948 (target_emit_ops): New.
12949 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12950 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12951 * linux-low.c (linux_emit_ops): New.
12952 (linux_target_ops): Install it.
12953 * linux-low.h (struct linux_target_ops): New field emit_ops.
12954
92b72907
UW
129552010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12956
12957 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12958 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12959
fa593d66
PA
129602010-06-01 Pedro Alves <pedro@codesourcery.com>
12961 Stan Shebs <stan@codesourcery.com>
12962
12963 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12964 (all): Depend on $(extra_libraries).
12965 (install-only): Install the IPA.
12966 (IPA_OBJS, IPA_LIB): New.
12967 (clean): Remove the IPA lib.
12968 (IPAGENT_CFLAGS): New.
12969 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12970 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12971 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12972 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12973 * configure.ac: Check for atomic builtins support in the compiler.
12974 (IPA_DEPFILES, extra_libraries): Define.
12975 * configure.srv (ipa_obj): Add description.
12976 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12977 (i[34567]86-*-linux*): Set ipa_obj.
12978 (x86_64-*-linux*): Set ipa_obj.
12979 * linux-low.c (stabilizing_threads): New.
12980 (supports_fast_tracepoints): New.
12981 (linux_detach): Stabilize threads before detaching.
12982 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12983 the lwp is either not stabilizing, or is moving out of a jump pad.
12984 (linux_fast_tracepoint_collecting): New.
12985 (maybe_move_out_of_jump_pad): New.
12986 (enqueue_one_deferred_signal): New.
12987 (dequeue_one_deferred_signal): New.
12988 (linux_wait_for_event_1): If moving out of a jump pad, defer
12989 pending signals to later.
12990 (linux_stabilize_threads): New.
12991 (linux_wait_1): Check if threads need moving out of jump pads, and
12992 do it if so.
12993 (stuck_in_jump_pad_callback): New.
12994 (move_out_of_jump_pad_callback): New.
12995 (lwp_running): New.
12996 (linux_resume_one_lwp): Handle moving out of jump pads.
12997 (linux_set_resume_request): Dequeue deferred signals.
12998 (need_step_over_p): Also step over fast tracepoint jumps.
12999 (start_step_over): Also uninsert fast tracepoint jumps.
13000 (finish_step_over): Also reinsert fast tracepoint jumps.
13001 (linux_install_fast_tracepoint_jump): New.
13002 (linux_target_ops): Install linux_stabilize_threads and
13003 linux_install_fast_tracepoint_jump_pad.
13004 * linux-low.h (linux_target_ops) <get_thread_area,
13005 install_fast_tracepoint_jump_pad>: New fields.
13006 (struct lwp_info) <collecting_fast_tracepoint,
13007 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13008 (linux_get_thread_area): Declare.
13009 * linux-x86-low.c (jump_insn): New.
13010 (x86_get_thread_area): New.
13011 (append_insns): New.
13012 (push_opcode): New.
13013 (amd64_install_fast_tracepoint_jump_pad): New.
13014 (i386_install_fast_tracepoint_jump_pad): New.
13015 (x86_install_fast_tracepoint_jump_pad): New.
13016 (the_low_target): Install x86_get_thread_area and
13017 x86_install_fast_tracepoint_jump_pad.
13018 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13019 (struct fast_tracepoint_jump): New.
13020 (fast_tracepoint_jump_insn): New.
13021 (fast_tracepoint_jump_shadow): New.
13022 (find_fast_tracepoint_jump_at): New.
13023 (fast_tracepoint_jump_here): New.
13024 (delete_fast_tracepoint_jump): New.
13025 (set_fast_tracepoint_jump): New.
13026 (uninsert_fast_tracepoint_jumps_at): New.
13027 (reinsert_fast_tracepoint_jumps_at): New.
13028 (set_breakpoint_at): Use write_inferior_memory.
13029 (uninsert_raw_breakpoint): Use write_inferior_memory.
13030 (check_mem_read): Mask out fast tracepoint jumps.
13031 (check_mem_write): Mask out fast tracepoint jumps.
13032 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13033 (set_fast_tracepoint_jump): Declare.
13034 (delete_fast_tracepoint_jump)
13035 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13036 (reinsert_fast_tracepoint_jumps_at): Declare.
13037 * regcache.c: Don't compile many functions when building the
13038 in-process agent library.
13039 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13040 the register buffer in the heap.
13041 (free_register_cache): If the register buffer isn't owned by the
13042 regcache, don't free it.
13043 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13044 pre-existing register caches.
13045 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13046 type.
13047 (convert_ascii_to_int): : Constify `from' parameter type.
13048 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13049 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13050 the needed buffer in-place.
13051 (relocate_instruction): New.
13052 * server.c (handle_query) <qSymbols>: If the target supports
13053 tracepoints, give it a chance of looking up symbols. Report
13054 support for fast tracepoints.
13055 (handle_status): Stabilize threads.
13056 (process_serial_event): Adjust.
13057 * server.h (struct fast_tracepoint_jump): Forward declare.
13058 (struct process_info) <fast_tracepoint_jumps>: New field.
13059 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13060 (decode_X_packet, decode_M_packet): Adjust.
13061 (relocate_instruction): Declare.
13062 (in_process_agent_loaded): Declare.
13063 (tracepoint_look_up_symbols): Declare.
13064 (struct fast_tpoint_collect_status): Declare.
13065 (fast_tracepoint_collecting): Declare.
13066 (force_unlock_trace_buffer): Declare.
13067 (handle_tracepoint_bkpts): Declare.
13068 (initialize_low_tracepoint)
13069 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13070 * target.h (struct target_ops) <stabilize_threads,
13071 install_fast_tracepoint_jump_pad>: New fields.
13072 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13073 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13074 [HAVE_STDINT_H]: Include stdint.h.
13075 (trace_debug_1): Rename to ...
13076 (trace_vdebug): ... this.
13077 (trace_debug): Rename to ...
13078 (trace_debug_1): ... this. Add `level' parameter.
13079 (trace_debug): New.
13080 (ATTR_USED, ATTR_NOINLINE): New.
13081 (IP_AGENT_EXPORT): New.
13082 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13083 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13084 (about_to_request_buffer_space, trace_buffer_is_full)
13085 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13086 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13087 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13088 (traceframe_write_count, traceframes_created)
13089 (trace_state_variables)
13090 New renaming defines.
13091 (struct ipa_sym_addresses): New.
13092 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13093 (symbol_list): New.
13094 (ipa_sym_addrs): New.
13095 (all_tracepoint_symbols_looked_up): New.
13096 (in_process_agent_loaded): New.
13097 (write_e_ipa_not_loaded): New.
13098 (maybe_write_ipa_not_loaded): New.
13099 (tracepoint_look_up_symbols): New.
13100 (debug_threads) [IN_PROCESS_AGENT]: New.
13101 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13102 (UNKNOWN_SIDE_EFFECTS): New.
13103 (stop_tracing): New.
13104 (flush_trace_buffer): New.
13105 (stop_tracing_bkpt): New.
13106 (flush_trace_buffer_bkpt): New.
13107 (read_inferior_integer): New.
13108 (read_inferior_uinteger): New.
13109 (read_inferior_data_pointer): New.
13110 (write_inferior_data_pointer): New.
13111 (write_inferior_integer): New.
13112 (write_inferior_uinteger): New.
13113 (struct collect_static_trace_data_action): Delete.
13114 (enum tracepoint_type): New.
13115 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13116 <actions_str, step_actions, step_actions_str>: Only include in
13117 GDBserver.
fa593d66
PA
13118 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13119 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13120 (tracepoints): Use IP_AGENT_EXPORT.
13121 (last_tracepoint): Don't include in the IPA.
13122 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13123 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13124 (alloced_trace_state_variables): New.
13125 (trace_state_variables): Use IP_AGENT_EXPORT.
13126 (traceframe_t): Delete unused variable.
13127 (circular_trace_buffer): Don't include in the IPA.
13128 (trace_buffer_start): Delete.
13129 (struct trace_buffer_control): New.
13130 (trace_buffer_free): Delete.
13131 (struct ipa_trace_buffer_control): New.
13132 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13133 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13134 New.
13135 (trace_buffer_ctrl): New.
13136 (TRACE_BUFFER_CTRL_CURR): New.
13137 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13138 Reimplement as macros.
13139 (trace_buffer_wrap): Delete.
13140 (traceframe_write_count, traceframe_read_count)
13141 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13142 (struct tracepoint_hit_ctx) <type>: New field.
13143 (struct fast_tracepoint_ctx): New.
13144 (memory_barrier): New.
13145 (cmpxchg): New.
13146 (record_tracepoint_error): Update atomically in the IPA.
13147 (clear_inferior_trace_buffer): New.
13148 (about_to_request_buffer_space): New.
13149 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13150 updating the same buffer.
13151 (add_tracepoint): Default the tracepoint's type to trap
13152 tracepoint, and orig_size to -1.
13153 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13154 internal variables.
13155 (create_trace_state_variable): New parameter `gdb'. Handle it.
13156 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13157 (cmd_qtdp): Handle fast tracepoints.
13158 (cmd_qtdv): Adjust.
13159 (max_jump_pad_size): New.
13160 (gdb_jump_pad_head): New.
13161 (get_jump_space_head): New.
13162 (claim_jump_space): New.
13163 (sort_tracepoints): New.
13164 (MAX_JUMP_SIZE): New.
13165 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13166 IPA.
13167 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13168 support. Upload fast traceframes, and delete internal IPA
13169 breakpoints.
13170 (stop_tracing_handler): New.
13171 (flush_trace_buffer_handler): New.
13172 (cmd_qtstop): Upload fast tracepoints.
13173 (response_tracepoint): Handle fast tracepoints.
13174 (tracepoint_finished_step): Upload fast traceframes. Set the
13175 tracepoint hit context's tracepoint type.
13176 (handle_tracepoint_bkpts): New.
13177 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13178 type. Add comment about fast tracepoints.
13179 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13180 non-existing action_str field.
13181 (get_context_regcache): Handle fast tracepoints.
13182 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13183 to the regcache.
13184 (fast_tracepoint_from_jump_pad_address): New.
13185 (fast_tracepoint_from_ipa_tpoint_address): New.
13186 (collecting_t): New.
13187 (force_unlock_trace_buffer): New.
13188 (fast_tracepoint_collecting): New.
13189 (collecting): New.
13190 (gdb_collect): New.
13191 (write_inferior_data_ptr): New.
13192 (target_tp_heap): New.
13193 (target_malloc): New.
13194 (download_agent_expr): New.
13195 (UALIGN): New.
13196 (download_tracepoints): New.
13197 (download_trace_state_variables): New.
13198 (upload_fast_traceframes): New.
13199 (IPA_FIRST_TRACEFRAME): New.
13200 (IPA_NEXT_TRACEFRAME_1): New.
13201 (IPA_NEXT_TRACEFRAME): New.
13202 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13203 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13204 (gdb_jump_pad_buffer_end): New.
13205 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13206 (initialize_tracepoint): Adjust.
13207 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13208 buffer. Initialize the low module.
13209 * utils.c (PREFIX, TOOLNAME): New.
13210 (malloc_failure): Use PREFIX.
13211 (error): In the IPA, an error causes an exit.
13212 (fatal, warning): Use PREFIX.
13213 (internal_error): Use TOOLNAME.
13214 (NUMCELLS): Increase to 10.
13215 * configure, config.in: Regenerate.
13216
d149dd1d
PA
132172010-06-01 Pedro Alves <pedro@codesourcery.com>
13218
13219 * server.c (handle_query) <qSupported>: Do two passes over the
13220 qSupported string to avoid nesting strtok.
13221
f6528abd
JK
132222010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13223
13224 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13225 (CDEPS): New.
13226 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13227 -Wl,--dynamic-list.
13228 * configure: Regenerate.
13229 * proc-service.list: New.
13230
ca2a87a0
JK
132312010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13232
13233 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13234 New comment.
13235
363a6e9f
OS
132362010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13237
13238 * gdbreplay.c (remote_open): Check error return from socket() call by
13239 its equality to -1 not by it being negative.
13240 * remote-utils.c (remote_open): Likewise.
13241
d23b6cb1
PA
132422010-05-23 Pedro Alves <pedro@codesourcery.com>
13243
13244 * config.h: Regenerate.
13245
28d3cf85
MK
132462010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13247
13248 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13249 doesn't provide PTRACE_GET_THREAD_AREA.
13250
fea36a59
MK
132512010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13252
13253 * linux-m68k-low.c: Include <asm/ptrace.h>
13254 (ps_get_thread_area): Implement.
13255
24b066ba
DE
132562010-05-03 Doug Evans <dje@google.com>
13257
13258 * event-loop.c (struct callback_event): New struct.
13259 (callback_list): New global.
13260 (append_callback_event, delete_callback_event): New functions.
13261 (process_callback): New function.
13262 (start_event_loop): Call it.
13263 * remote-utils.c (NOT_SCHEDULED): Define.
13264 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13265 moved out of readchar.
13266 (readchar): Rewrite. Call reschedule before returning.
13267 (reset_readchar): New function.
13268 (remote_close): Call it.
13269 (process_remaining, reschedule): New functions.
13270 * server.h (callback_handler_func): New typedef.
13271 (append_callback_event, delete_callback_event): Declare.
13272
9836d6ea
PA
132732010-05-03 Pedro Alves <pedro@codesourcery.com>
13274
13275 * proc-service.c (ps_pglobal_lookup): Use
13276 thread_db_look_up_one_symbol.
13277 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13278 parameter. Use it instead of all_symbols_looked_up.
13279 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13280 field.
13281 (all_symbols_looked_up): Don't declare.
13282 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13283 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13284 field.
13285 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13286 Set all_symbols_looked_up here.
13287 (thread_db_look_up_one_symbol): New.
13288 (thread_db_get_tls_address): Adjust.
13289 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13290 thread_db object on the heap, and tentatively set it in the
13291 process structure.
13292 (thread_db_init): Don't set all_symbols_looked_up here.
13293 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13294
7984d532
PA
132952010-05-03 Pedro Alves <pedro@codesourcery.com>
13296
13297 * linux-low.c (linux_kill, linux_detach): Adjust.
13298 (status_pending_p_callback): Remove redundant statement. Check
13299 for !TARGET_WAITIKIND_IGNORE, instead of
13300 TARGET_WAITKIND_STOPPED.
13301 (handle_tracepoints): Make sure LWP is locked. Adjust.
13302 (linux_wait_for_event_1): Adjust.
13303 (linux_cancel_breakpoints): New.
13304 (unsuspend_one_lwp): New.
13305 (unsuspend_all_lwps): New.
13306 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13307 (send_sigstop_callback): Change return type to int, add new
13308 `except' parameter and handle it.
13309 (suspend_and_send_sigstop_callback): New.
13310 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13311 pass them down. If SUSPEND, also increment the lwp's suspend
13312 count.
13313 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13314 (need_step_over_p): Don't consider suspended LWPs.
13315 (start_step_over): Adjust.
13316 (proceed_one_lwp): Change return type to int, add new `except'
13317 parameter and handle it.
13318 (unsuspend_and_proceed_one_lwp): New.
13319 (proceed_all_lwps): Use find_inferior instead of
13320 for_each_inferior.
13321 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13322 also decrement the suspend count of LWPs. Pass `except' down,
13323 instead of hacking its suspend count.
13324 (linux_pause_all): Add `freeze' parameter. Adjust.
13325 (linux_unpause_all): New.
13326 (linux_target_ops): Install linux_unpause_all.
13327 * server.c (handle_status): Adjust.
13328 * target.h (struct target_ops): New fields `unpause_all' and
13329 `cancel_breakpoints'. Add new parameter to `pause_all'.
13330 (pause_all): Add new `freeze' parameter.
13331 (unpause_all): New.
13332 (cancel_breakpoints): New.
13333 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13334 cancel breakpoints.
13335 (cmd_qtstart): Pause threads.
13336 (stop_tracing): Pause threads, and cancel breakpoints.
13337 * win32-low.c (win32_target_ops): Adjust.
13338
e471f25b
PA
133392010-05-03 Pedro Alves <pedro@codesourcery.com>
13340
13341 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13342 the inferior right away from here...
13343 (linux_wait_1): ... to here, and adjust to check the thread's
13344 last_resume_kind instead of the lwp's step or stop_expected flags.
13345
1915ef4f
PA
133462010-05-02 Pedro Alves <pedro@codesourcery.com>
13347
13348 * README: Use consistent `GDB' and `GDBserver' spellings.
13349
f9e39928
PA
133502010-05-02 Pedro Alves <pedro@codesourcery.com>
13351
13352 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13353 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13354 (linux_detach_one_lwp): Assume the lwp is stopped.
13355 (any_thread_of): Delete.
13356 (linux_detach): Stop all lwps here. Don't blindly delete all
13357 breakpoints.
13358 (delete_lwp_callback): New.
13359 (linux_mourn): Delete all lwps of the process that is gone.
13360 (linux_wait_1): Don't delete the last lwp of the process here.
13361 * mem-break.h (mark_breakpoints_out): Declare.
13362 * mem-break.c (mark_breakpoints_out): New.
13363 (free_all_breakpoints): Use it.
13364 * server.c (handle_target_event): If the process is gone, mark
13365 breakpoints out.
13366 * thread-db.c (struct thread_db) <create_bp>: New field.
13367 (thread_db_enable_reporting): Fix prototype. Store a thread event
13368 breakpoint reference in the thread_db struct.
13369 (thread_db_load_search): Clear the thread_db object.
13370 (try_thread_db_load_1): Ditto.
13371 (switch_to_process): New.
13372 (disable_thread_event_reporting): Use it.
13373 (remove_thread_event_breakpoints): New.
13374 (thread_db_detach, thread_db_mourn): Use it.
13375
1e7fc18c
PA
133762010-05-01 Pedro Alves <pedro@codesourcery.com>
13377
13378 * linux-low.c (linux_enable_event_reporting): New.
13379 (linux_wait_for_event_1, handle_extended_wait): Use it.
13380
02fc4de7
PA
133812010-04-30 Pedro Alves <pedro@codesourcery.com>
13382
13383 * linux-low.c (linux_kill_one_lwp, linux_kill)
13384 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13385 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13386 SIGSTOP even if the LWP is stopped.
13387 (send_sigstop_callback): New.
13388 (stop_all_lwps): Use send_sigstop_callback instead.
13389 (linux_resume_one_thread): Adjust.
13390 (proceed_one_lwp): Still proceed an LWP that the client has
13391 requested to stop, if we haven't reported it as stopped yet. Make
13392 sure that LWPs the client want stopped, have a pending SIGSTOP.
13393
bc3b5632
DE
133942010-04-26 Doug Evans <dje@google.com>
13395
ae1ada35
DE
13396 * server.c (handle_general_set): Make static.
13397
bc3b5632
DE
13398 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13399 Print received char after testing for error/eof instead of before.
13400 (input_interrupt): Tweak comment.
13401
65730243
DE
134022010-04-23 Doug Evans <dje@google.com>
13403
13404 * server.c (start_inferior): Print inferior argv if --debug.
13405
a8ae7dc0
AR
134062010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13407
13408 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13409 * nto-x86-low.c: Include server.h
13410
1c07cc19
PM
134112010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13412
13413 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13414 be consistent with other sources of this directory.
13415 (init_registers_amd64): Correct name of source file of this function
13416 in the comment.
13417
e0a61e09
PM
134182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13419
13420 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13421 64-bit executables.
13422
54709339
PM
134232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13424
13425 * win32-i386-low.c: Add 64-bit support.
13426 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13427 (init_registers_amd64): Declare.
13428 (mappings): Add 64-bit version of array.
13429 (init_windows_x86): New function.
13430 (the_low_target): Change init_arch field to init_windows_x86.
13431
e8f0053d
PM
134322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13433
13434 * win32-low.c: Adapt to support also 64-bit architecture.
13435 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13436 (get_image_name): Use SIZE_T type for local variable `done'.
13437 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13438 (toolhelp_get_dll_name): Idem.
13439 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13440 Use uintptr_t typecast to avoid warning.
13441 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13442 (handle_exception): Use phex_nz to avoid warning.
13443 (win32_wait): Remove unused local variable `process'.
13444
c481e77e
PM
134452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13446
13447 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13448 `amd64-avx.o'.
13449
12ea4b69
PM
134502010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13451
13452 * configure.ac: Use `ws2_32' library for srv_mingw.
13453 * configure: Regenerate.
13454 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13455 * remote-utils.c: Likewise.
13456
f6d1620c
L
134572010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13458
13459 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13460 if __x86_64__ is defined.
13461
8e642873
PM
134622010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13463
13464 * configure: Regenerate.
13465
711e434b
PM
134662010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13467
13468 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13469 * target.h (target_ops): New get_tib_address field.
13470 * win32-low.h (win32_thread_info): Add thread_local_base field.
13471 * win32-low.c (child_add_thread): Add tlb argument.
13472 Set thread_local_base field to TLB.
13473 (get_child_debug_event): Adapt to child_add_thread change.
13474 (win32_get_tib_address): New function.
13475 (win32_target_ops): Set get_tib_address field to
13476 win32_get_tib_address.
13477 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13478
505106cd
PA
134792010-04-12 Pedro Alves <pedro@codesourcery.com>
13480
505106cd
PA
13481 * linux-low.c (linux_mourn): Also remove the process.
13482 * server.c (handle_target_event): Don't remove the process here.
13483 * nto-low.c (nto_mourn): New.
13484 (nto_target_ops): Install it.
13485 * spu-low.c (spu_mourn): New.
13486 (spu_target_ops): Install it.
13487 * win32-low.c (win32_mourn): New.
13488 (win32_target_ops): Install it.
13489
e8470a06
PA
134902010-04-12 Pedro Alves <pedro@codesourcery.com>
13491
13492 * server.h (buffer_xml_printf): Remove redundant `;'.
13493
45ba0d02
PA
134942010-04-12 Pedro Alves <pedro@codesourcery.com>
13495
13496 * regcache.c (set_register_cache): Invalidate regcaches before
13497 changing the register cache layout.
13498 (regcache_invalidate_one): Allow a NULL regcache.
13499 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13500 regcaches before changing the register cache layout or the target
13501 regsets.
13502
59e04013
L
135032010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13504
13505 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13506 variable warning on Linux/x86-64.
13507
8336d594
PA
135082010-04-11 Pedro Alves <pedro@codesourcery.com>
13509
13510 GDBserver disconnected tracing support.
13511
13512 * linux-low.c (linux_remove_process): Delete.
13513 (add_lwp): Don't set last_resume_kind here.
13514 (linux_kill): Use `mourn'.
13515 (linux_detach): Use `thread_db_detach', and `mourn'.
13516 (linux_mourn): New.
13517 (linux_attach_lwp_1): Adjust comment.
13518 (linux_attach): last_resume_kind moved the thread_info; adjust.
13519 (status_pending_p_callback): Adjust.
13520 (linux_wait_for_event_1): Adjust.
13521 (count_events_callback, select_singlestep_lwp_callback)
13522 (select_event_lwp_callback, cancel_breakpoints_callback)
13523 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13524 (proceed_one_lwp): Adjust.
13525 (linux_async): Add debug output.
13526 (linux_thread_stopped): New.
13527 (linux_pause_all): New.
13528 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13529 linux_pause_all.
13530 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13531 (thread_db_free): Delete declaration.
13532 (thread_db_detach, thread_db_mourn): Declare.
13533 * thread-db.c (thread_db_init): Use thread_db_mourn.
13534 (thread_db_free): Delete, split in two.
13535 (disable_thread_event_reporting): New.
13536 (thread_db_detach): New.
13537 (thread_db_mourn): New.
13538
13539 * server.h (struct thread_info) <last_resume_kind>: New field.
13540 <attached>: Add comment.
13541 <gdb_detached>: New field.
13542 (handler_func): Change return type to int.
13543 (handle_serial_event, handle_target_event): Ditto.
13544 (gdb_connected): Declare.
13545 (tracing): Delete.
13546 (disconnected_tracing): Declare.
13547 (stop_tracing): Declare.
13548
13549 * server.c (handle_query) <qSupported>: Report support for
13550 disconnected tracing.
13551 (queue_stop_reply_callback): Account for running threads.
13552 (gdb_wants_thread_stopped): New.
13553 (gdb_wants_all_threads_stopped): New.
13554 (gdb_reattached_process): New.
13555 (handle_status): Clear the `gdb_detached' flag of all processes.
13556 In all-stop, stop all threads.
13557 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13558 (process_serial_event): If the remote connection breaks, or if an
13559 exit was forced with "monitor exit", force an event loop exit.
13560 Handle disconnected tracing on detach.
13561 (handle_serial_event): Adjust.
13562 (handle_target_event): If GDB isn't connected, forward events back
13563 to the inferior, unless the last process exited, in which case,
13564 exit gdbserver. Adjust interface.
13565
13566 * remote-utils.c (remote_open): Don't block in accept. Instead
13567 register an event loop source on the listen socket file
13568 descriptor. Refactor bits into ...
13569 (listen_desc): ... this new global.
13570 (gdb_connected): ... this new function.
13571 (enable_async_notification): ... this new function.
13572 (handle_accept_event): ... this new function.
13573 (remote_close): Clear remote_desc.
13574
13575 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13576
13577 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13578 New fields.
13579 (mourn_inferior): Define.
13580 (target_process_qsupported): Avoid the dangling else problem.
13581 (thread_stopped): Define.
13582 (pause_all): Define.
13583 (target_waitstatus_to_string): Declare.
13584 * target.c (target_waitstatus_to_string): New.
13585
13586 * tracepoint.c (tracing): Make extern.
13587 (disconnected_tracing): New.
13588 (stop_tracing): Make extern. Handle tracing stops due to GDB
13589 disconnecting.
13590 (cmd_qtdisconnected): New.
13591 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13592 (handle_tracepoint_general_set): Handle QTDisconnected.
13593
13594 * event-loop.c (event_handler_func): Change return type to int.
13595 (process_event): Bail out if the event handler wants the event
13596 loop to stop.
13597 (handle_file_event): Ditto.
13598 (start_event_loop): Bail out if the event handler wants the event
13599 loop to stop.
13600
13601 * nto-low.c (nto_target_ops): Adjust.
13602 * spu-low.c (spu_wait): Don't remove the process here.
13603 (spu_target_ops): Adjust.
13604 * win32-low.c (win32_wait): Don't remove the process here.
13605 (win32_target_ops): Adjust.
13606
5d267c4c
PA
136072010-04-11 Pedro Alves <pedro@codesourcery.com>
13608
13609 * regcache.c (realloc_register_cache): Invalidate inferior's
13610 regcache before recreating it.
13611
623ccd72
PA
136122010-04-09 Pedro Alves <pedro@codesourcery.com>
13613
13614 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13615
219f2f23
PA
136162010-04-09 Stan Shebs <stan@codesourcery.com>
13617 Pedro Alves <pedro@codesourcery.com>
13618
13619 * server.h (LONGEST): New.
13620 (struct thread_info) <while_stepping>: New field.
13621 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13622 Declare.
13623 (initialize_tracepoint, handle_tracepoint_general_set)
13624 (handle_tracepoint_query, tracepoint_finished_step)
13625 (tracepoint_was_hit, release_while_stepping_state_list):
13626 (current_traceframe): Declare.
13627 * server.c (handle_general_set): Handle tracepoint packets.
13628 (read_memory): New.
13629 (write_memory): New.
13630 (handle_search_memory_1): Use read_memory.
13631 (handle_query): Report support for conditional tracepoints, trace
13632 state variables, and tracepoint sources. Handle tracepoint
13633 queries.
13634 (main): Initialize the tracepoints module.
13635 (process_serial_event): Handle traceframe reads/writes.
13636
13637 * linux-low.c (handle_tracepoints): New.
13638 (linux_wait_1): Call it.
13639 (linux_resume_one_lwp): Handle while-stepping.
13640 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13641 (linux_target_ops): Install them.
13642 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13643 New field.
13644 * linux-x86-low.c (x86_supports_tracepoints): New.
13645 (the_low_target). Install it.
13646
13647 * mem-break.h (delete_breakpoint): Declare.
13648 * mem-break.c (delete_breakpoint): Make external.
13649
13650 * target.h (struct target_ops): Add `supports_tracepoints',
13651 `read_pc', and `write_pc' fields.
13652 (target_supports_tracepoints): Define.
13653 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13654 (phex_nz): New.
13655
13656 * regcache.h (struct regcache) <registers_owned>: New field.
13657 (init_register_cache, regcache_cpy): Declare.
13658 (regcache_read_pc, regcache_write_pc): Declare.
13659 (register_cache_size): Declare.
13660 (supply_regblock): Declare.
13661 * regcache.c (init_register_cache): New.
13662 (new_register_cache): Use it.
13663 (regcache_cpy): New.
13664 (register_cache_size): New.
13665 (supply_regblock): New.
13666 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13667
219f2f23
PA
13668 * tracepoint.c: New.
13669
13670 * Makefile.in (OBS): Add tracepoint.o.
13671 (tracepoint.o): New rule.
13672
3a13a53b
L
136732010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13674
13675 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13676 (i386-mmx.o): New.
13677 (i386-mmx.c): Likewise.
13678 (i386-mmx-linux.o): Likewise.
13679 (i386-mmx-linux.c): Likewise.
13680
13681 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13682 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13683 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13684 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13685
13686 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13687 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13688 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13689
1570b33e
L
136902010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13691
13692 * Makefile.in (clean): Updated.
13693 (i386-avx.o): New.
13694 (i386-avx.c): Likewise.
13695 (i386-avx-linux.o): Likewise.
13696 (i386-avx-linux.c): Likewise.
13697 (amd64-avx.o): Likewise.
13698 (amd64-avx.c): Likewise.
13699 (amd64-avx-linux.o): Likewise.
13700 (amd64-avx-linux.c): Likewise.
13701
13702 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13703 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13704 (srv_amd64_regobj): Add amd64-avx.o.
13705 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13706 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13707 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13708 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13709 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13710 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13711 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13712
13713 * i387-fp.c: Include "i386-xstate.h".
13714 (i387_xsave): New.
13715 (i387_cache_to_xsave): Likewise.
13716 (i387_xsave_to_cache): Likewise.
13717 (x86_xcr0): Likewise.
13718
13719 * i387-fp.h (i387_cache_to_xsave): Likewise.
13720 (i387_xsave_to_cache): Likewise.
13721 (x86_xcr0): Likewise.
13722
13723 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13724 * linux-crisv32-low.c (target_regsets): Likewise.
13725 * linux-m68k-low.c (target_regsets): Likewise.
13726 * linux-mips-low.c (target_regsets): Likewise.
13727 * linux-ppc-low.c (target_regsets): Likewise.
13728 * linux-s390-low.c (target_regsets): Likewise.
13729 * linux-sh-low.c (target_regsets): Likewise.
13730 * linux-sparc-low.c (target_regsets): Likewise.
13731 * linux-xtensa-low.c (target_regsets): Likewise.
13732
13733 * linux-low.c: Include <sys/uio.h>.
13734 (regsets_fetch_inferior_registers): Support nt_type.
13735 (regsets_store_inferior_registers): Likewise.
13736 (linux_process_qsupported): New.
13737 (linux_target_ops): Add linux_process_qsupported.
13738
13739 * linux-low.h (regset_info): Add nt_type.
13740 (linux_target_ops): Add process_qsupported.
13741
13742 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13743 and <sys/uio.h>.
13744 (init_registers_i386_avx_linux): New.
13745 (init_registers_amd64_avx_linux): Likewise.
13746 (xmltarget_i386_linux_no_xml): Likewise.
13747 (xmltarget_amd64_linux_no_xml): Likewise.
13748 (PTRACE_GETREGSET): Likewise.
13749 (PTRACE_SETREGSET): Likewise.
13750 (x86_fill_xstateregset): Likewise.
13751 (x86_store_xstateregset): Likewise.
13752 (use_xml): Likewise.
13753 (x86_linux_update_xmltarget): Likewise.
13754 (x86_linux_process_qsupported): Likewise.
13755 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13756 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13757 init_registers_i386_linux here. Call
13758 x86_linux_update_xmltarget.
13759 (the_low_target): Add x86_linux_process_qsupported.
13760
13761 * server.c (handle_query): Call target_process_qsupported.
13762
13763 * target.h (target_ops): Add process_qsupported.
13764 (target_process_qsupported): New.
13765
fc7238bb
PA
137662010-04-03 Pedro Alves <pedro@codesourcery.com>
13767
13768 * inferiors.c (add_thread): Set last_status kind to
13769 TARGET_WAITKIND_IGNORE.
13770 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13771 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13772 (linux_wait_1): Move `thread' local definition to block that uses
13773 it. Don't NULL initialize `event_child'.
13774 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13775 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13776 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13777
bdabb078
PA
137782010-04-01 Pedro Alves <pedro@codesourcery.com>
13779
13780 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13781 an extended waitstatus, or by a watchpoint.
13782 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13783 thread was stepping or has been stopped by a watchpoint.
13784
d3bbe7a0
PA
137852010-04-01 Pedro Alves <pedro@codesourcery.com>
13786
13787 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13788 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13789 of another, then delete the previous, and validate all
13790 breakpoints.
13791 (validate_inserted_breakpoint): New.
13792 (delete_disabled_breakpoints): New.
13793 (validate_breakpoints): New.
13794 (check_mem_read): Validate breakpoints before trusting their
13795 shadow. Delete disabled breakpoints.
13796 (check_mem_write): Validate breakpoints before trusting they
13797 should be inserted. Delete disabled breakpoints.
13798 * mem-break.h (validate_breakpoints):
13799 * server.c (handle_query): Validate breakpoints when we see a
13800 qSymbol query.
13801
8b07ae33
PA
138022010-04-01 Pedro Alves <pedro@codesourcery.com>
13803
13804 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13805 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13806 if we could tell there's a GDB breakpoint at stop_pc.
13807 (need_step_over_p): Don't do a step over if we find a GDB
13808 breakpoint at the resume PC.
13809
13810 * mem-break.c (struct raw_breakpoint): New.
13811 (enum bkpt_type): New type `gdb_breakpoint'.
13812 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13813 fields. New field `raw'.
13814 (find_raw_breakpoint_at): New.
13815 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13816 breakpoint instead.
13817 (set_breakpoint_at): Adjust.
13818 (delete_raw_breakpoint): New.
13819 (release_breakpoint): New.
13820 (delete_breakpoint): Rename to...
13821 (delete_breakpoint_1): ... this. Add proc parameter. Use
13822 release_breakpoint. Return ENOENT.
13823 (delete_breakpoint): Reimplement.
13824 (find_breakpoint_at): Delete.
13825 (find_gdb_breakpoint_at): New.
13826 (delete_breakpoint_at): Delete.
13827 (set_gdb_breakpoint_at): New.
13828 (delete_gdb_breakpoint_at): New.
13829 (gdb_breakpoint_here): New.
13830 (set_reinsert_breakpoint): Use release_breakpoint.
13831 (uninsert_breakpoint): Rename to ...
13832 (uninsert_raw_breakpoint): ... this.
13833 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13834 (reinsert_raw_breakpoint): Change parameter type to
13835 raw_breakpoint.
13836 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13837 instead.
13838 (check_breakpoints): Adjust. Use release_breakpoint.
13839 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13840 (breakpoint_inserted_here): Ditto.
13841 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13842 Don't trust the breakpoint's shadow if it is not inserted.
13843 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13844 (delete_all_breakpoints): Adjust.
13845 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13846 use delete_breakpoint_1.
13847
13848 * mem-break.h (breakpoints_supported): Delete declaration.
13849 (set_gdb_breakpoint_at): Declare.
13850 (gdb_breakpoint_here): Declare.
13851 (delete_breakpoint_at): Delete.
13852 (delete_gdb_breakpoint_at): Declare.
13853
13854 * server.h (struct raw_breakpoint): Forward declare.
13855 (struct process_info): New field `raw_breakpoints'.
13856
13857 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13858 breakpoints.
13859
6bf5e0ba
PA
138602010-03-24 Pedro Alves <pedro@codesourcery.com>
13861
13862 * linux-low.c (status_pending_p_callback): Fix comment.
13863 (linux_wait_for_event_1): Move most of the internal breakpoint
13864 handling from here...
13865 (linux_wait_1): ... to here.
13866 (count_events_callback): New.
13867 (select_singlestep_lwp_callback): New.
13868 (select_event_lwp_callback): New.
13869 (cancel_breakpoints_callback): New.
13870 (select_event_lwp): New.
13871 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13872 priority to all LWPs that have had events that should be reported
13873 to the client. Cancel breakpoints when about to reporting the
13874 event to the client, not while stopping lwps. No longer cancel
13875 finished single-steps here.
13876 (cancel_finished_single_step): Delete.
13877 (cancel_finished_single_steps): Delete.
13878
414a389f
PA
138792010-03-24 Pedro Alves <pedro@codesourcery.com>
13880
13881 * mem-break.c (enum bkpt_type): New.
13882 (struct breakpoint): New field `type'.
13883 (set_breakpoint_at): Change return type to struct breakpoint
13884 pointer. Set type to `other_breakpoint' by default.
13885 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13886 in the breakpoint list.
13887 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13888 (reinsert_breakpoint): Rename to ...
13889 (reinsert_raw_breakpoint): ... this.
13890 (reinsert_breakpoints_at): Adjust.
13891 * mem-break.h (struct breakpoint): Declare.
13892 (set_breakpoint_at): Change return type to struct breakpoint
13893 pointer.
13894
2280c721
PA
138952010-03-24 Pedro Alves <pedro@codesourcery.com>
13896
13897 * server.c (handle_query): Assign, not compare.
13898
d50171e4
PA
138992010-03-24 Pedro Alves <pedro@codesourcery.com>
13900
13901 Teach linux gdbserver to step-over-breakpoints.
13902
13903 * linux-low.c (can_hardware_single_step): New.
13904 (supports_breakpoints): New.
13905 (handle_extended_wait): If stopping threads, read the stop pc of
13906 the new cloned LWP.
13907 (get_pc): New.
13908 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13909 low target doesn't support retrieving the PC.
13910 (add_lwp): Set last_resume_kind to resume_continue.
13911 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13912 (linux_attach): Don't clear stop_expected. Set the lwp's
13913 last_resume_kind to resume_stop.
13914 (linux_detach_one_lwp): Don't check for removed breakpoints.
13915 (check_removed_breakpoint): Delete.
13916 (status_pending_p): Rename to ...
13917 (status_pending_p_callback): ... this. Don't check for removed
13918 breakpoints. Don't consider threads that are stopped from GDB's
13919 perspective.
13920 (linux_wait_for_lwp): Always read the stop_pc here.
13921 (cancel_breakpoint): New.
13922 (step_over_bkpt): New global.
13923 (linux_wait_for_event_1): Implement stepping over breakpoints.
13924 (gdb_wants_lwp_stopped): New.
13925 (gdb_wants_all_stopped): New.
13926 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13927 single-step traps here. Store the thread's last reported target
13928 wait status.
13929 (send_sigstop): Don't clear stop_expected. Always set it,
13930 instead.
13931 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13932 (cancel_finished_single_step): New.
13933 (cancel_finished_single_steps): New.
13934 (wait_for_sigstop): Don't cancel finished single-step traps here.
13935 (linux_resume_one_lwp): Don't check for removed breakpoints.
13936 Don't set `step' on non-hardware step archs.
13937 (linux_set_resume_request): Ignore resume_stop requests if already
13938 stopping or stopped. Set the lwp's last_resume_kind.
13939 (resume_status_pending_p): Don't check for removed breakpoints.
13940 (need_step_over_p): New.
13941 (start_step_over): New.
13942 (finish_step_over): New.
13943 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13944 requests. Clear the thread's last reported target waitstatus.
13945 Don't use the `suspended' flag. Don't consider pending breakpoints.
13946 (linux_resume): Start a step-over if necessary.
13947 (proceed_one_lwp): New.
13948 (proceed_all_lwps): New.
13949 (unstop_all_lwps): New.
13950 * linux-low.h (struct lwp_info): Rewrite comment for the
13951 `suspended' flag. Add the `stop_pc' field. Delete the
13952 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13953 Add `'last_resume_kind' and `need_step_over' fields.
13954 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13955 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13956 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13957 (set_raw_breakpoint_at): New.
13958 (set_breakpoint_at): Rewrite to use it.
13959 (reinsert_breakpoint_handler): Delete.
13960 (set_reinsert_breakpoint): New.
13961 (reinsert_breakpoint_by_bp): Delete.
13962 (delete_reinsert_breakpoints): New.
13963 (uninsert_breakpoint): Rewrite.
13964 (uninsert_breakpoints_at): New.
13965 (reinsert_breakpoint): Rewrite.
13966 (reinsert_breakpoints_at): New.
13967 (check_breakpoints): Rewrite.
13968 (breakpoint_here): New.
13969 (breakpoint_inserted_here): New.
13970 (check_mem_read): Adjust.
13971 * mem-break.h (breakpoints_supported, breakpoint_here)
13972 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13973 (reinsert_breakpoint_by_bp): Delete declaration.
13974 (delete_reinsert_breakpoints): Declare.
13975 (reinsert_breakpoint): Delete declaration.
13976 (reinsert_breakpoints_at): Declare.
13977 (uninsert_breakpoint): Delete declaration.
13978 (uninsert_breakpoints_at): Declare.
13979 (check_breakpoints): Adjust prototype.
13980 * server.h: Adjust include order.
13981 (struct thread_info): Declare here. Add a `last_status' field.
13982
30ba68cb
MS
139832010-03-23 Michael Snyder <msnyder@vmware.com>
13984
13985 * server.c (crc32): New function.
13986 (handle_query): Add handling for 'qCRC:' request.
13987
b9a881c2
PA
139882010-03-23 Pedro Alves <pedro@codesourcery.com>
13989
13990 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13991 lwp had been stopped by a watchpoint.
13992
e92d13d5
PA
139932010-03-16 Pedro Alves <pedro@codesourcery.com>
13994
13995 * server.h (internal_error): Declare.
13996 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13997 * utils.c (internal_error): New function.
13998
64daa791
AS
139992010-03-15 Andreas Schwab <schwab@redhat.com>
14000
14001 * configure.srv: Fix typo setting srv_regobj.
14002
f52cd8cd
PA
140032010-03-15 Pedro Alves <pedro@codesourcery.com>
14004
14005 * linux-low.c (fetch_register): Avoid passing a non string literal
14006 format to `error'.
14007 (usr_store_inferior_registers): Ditto.
14008
93ae6fdc
PA
140092010-03-14 Pedro Alves <pedro@codesourcery.com>
14010
14011 * linux-low.c (linux_write_memory): Bail out early if peeking
14012 memory failed.
14013
c3adc08c
PA
140142010-03-14 Pedro Alves <pedro@codesourcery.com>
14015
14016 * linux-low.h (struct lwp_info): New fields
14017 `stopped_by_watchpoint' and `stopped_data_address'.
14018 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14019 here, and cache them in the lwp object.
14020 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14021 directly.
14022 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14023 field.
14024 (linux_stopped_by_watchpoint): Rewrite.
14025 (linux_stopped_data_address): Rewrite.
14026
bce522a2
PA
140272010-03-06 Simo Melenius <simo.melenius@iki.fi>
14028
14029 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14030 switching the current inferior, not before.
14031
90884b2b
L
140322010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14033
14034 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14035 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14036 i386-linux.c and amd64-linux.c.
14037 (reg-i386.o): Removed.
14038 (reg-i386.c): Likewise.
14039 (reg-i386-linux.o): Likewise.
14040 (reg-i386-linux.c): Likewise.
14041 (reg-x86-64.o): Likewise.
14042 (reg-x86-64.c): Likewise.
14043 (reg-x86-64-linux.o): Likewise.
14044 (reg-x86-64-linux.c): Likewise.
14045 (i386.o): New.
14046 (i386.c): Likewise.
14047 (i386-linux.o): Likewise.
14048 (i386-linux.c): Likewise.
14049 (amd64.o): Likewise.
14050 (amd64.c): Likewise.
14051 (amd64-linux.o): Likewise.
14052 (amd64-linux.c): Likewise.
14053
14054 * configure.srv (srv_i386_regobj): New.
14055 (srv_i386_linux_regobj): Likewise.
14056 (srv_amd64_regobj): Likewise.
14057 (srv_amd64_linux_regobj): Likewise.
14058 (srv_i386_32bit_xmlfiles): Likewise.
14059 (srv_i386_64bit_xmlfiles): Likewise.
14060 (srv_i386_xmlfiles): Likewise.
14061 (srv_amd64_xmlfiles): Likewise.
14062 (srv_i386_linux_xmlfiles): Likewise.
14063 (srv_amd64_linux_xmlfiles): Likewise.
14064 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14065 srv_xmlfiles to $srv_i386_xmlfiles.
14066 (i[34567]86-*-mingw32ce*): Likewise.
14067 (i[34567]86-*-mingw*): Likewise.
14068 (i[34567]86-*-nto*): Likewise.
14069 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14070 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14071 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14072 (x86_64-*-linux*): Likewise.
14073
14074 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14075 (init_registers_amd64_linux): New.
14076 (x86_arch_setup): Replace init_registers_x86_64_linux with
14077 init_registers_amd64_linux.
14078
193f13e6
MK
140792010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14080
14081 * configure.ac: Check for libdl. If it is not available link against
14082 static libthread_db.
14083 * configure: Regenerate.
14084
85d721b8
PA
140852010-02-22 Pedro Alves <pedro@codesourcery.com>
14086
14087 PR9605
14088
14089 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14090 handing a read watchpoint.
14091 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14092
6076632b
DE
140932010-02-12 Doug Evans <dje@google.com>
14094
14095 * linux-low.c (linux_supports_tracefork_flag): Document.
14096 (linux_look_up_symbols): Add comment.
14097
3327ccf7
L
140982010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14099
14100 * regcache.c (supply_register): Clear regcache if buf is NULL.
14101
0718675c 141022010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14103 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14104
14105 * inferiors.c (find_inferior): Add function documentation.
14106 (unloaded_dll): Handle the case where the unloaded dll has not
14107 been previously registered in the dll list.
14108
177321bd
DJ
141092010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14110
14111 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14112 (thumb2_breakpoint): New.
14113 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14114
2b009048
DJ
141152010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14116
14117 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14118 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14119 breakpoints.
14120
3be029c7
PA
141212010-01-21 Pedro Alves <pedro@codesourcery.com>
14122
14123 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14124
18f5de3b
JK
141252010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14126
14127 * linux-s390-low.c (s390_collect_ptrace_register)
14128 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14129
3743bb4f
DE
141302010-01-21 Doug Evans <dje@google.com>
14131
14ce3065
DE
14132 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14133 (PTRACE_ARG4_TYPE): New macro.
14134 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14135 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14136 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14137 (usr_store_inferior_registers): Ditto.
14138 (linux_read_memory, linux_write_memory): Ditto.
14139 (linux_test_for_tracefork): Ditto.
14140
3743bb4f
DE
14141 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14142 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14143
8b315be5
PA
141442010-01-21 Pedro Alves <pedro@codesourcery.com>
14145
14146 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14147 target.
14148
85492558
PA
141492010-01-21 Pedro Alves <pedro@codesourcery.com>
14150
14151 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14152 prototype to take a regcache. Adjust.
14153
442ea881
PA
141542010-01-20 Pedro Alves <pedro@codesourcery.com>
14155
14156 * regcache.h (struct thread_info): Forward declare.
14157 (struct regcache): New.
14158 (new_register_cache): Adjust prototype.
14159 (get_thread_regcache): Declare.
14160 (free_register_cache): Adjust prototype.
14161 (registers_to_string, registers_from_string): Ditto.
14162 (supply_register, supply_register_by_name, collect_register)
14163 (collect_register_as_string, collect_register_by_name): Ditto.
14164 * regcache.c (struct inferior_regcache_data): Delete.
14165 (get_regcache): Rename to ...
14166 (get_thread_regcache): ... this. Adjust. Switch inferior before
14167 fetching registers.
14168 (regcache_invalidate_one): Adjust.
14169 (regcache_invalidate): Fix prototype.
14170 (new_register_cache): Return the new register cache.
14171 (free_register_cache): Change prototype.
14172 (realloc_register_cache): Adjust.
14173 (registers_to_string): Change prototype to take a regcache. Adjust.
14174 (registers_from_string): Ditto.
14175 (register_data): Ditto.
14176 (supply_register): Ditto.
14177 (supply_register_by_name): Ditto.
14178 (collect_register): Ditto.
14179 (collect_register_as_string): Ditto.
14180 (collect_register_by_name): Ditto.
14181 * server.c (process_serial_event): Adjust.
14182 * linux-low.h (regset_fill_func, regset_store_func): Change
14183 prototype.
14184 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14185 Change prototype.
14186 * linux-low.c (get_stop_pc): Adjust.
14187 (check_removed_breakpoint): Adjust.
14188 (linux_wait_for_event): Adjust.
14189 (linux_resume_one_lwp): Adjust.
14190 (fetch_register): Add regcache parameter. Adjust.
14191 (usr_store_inferior_registers): Ditto.
14192 (regsets_fetch_inferior_registers): Ditto.
14193 (regsets_store_inferior_registers): Ditto.
14194 (linux_fetch_registers, linux_store_registers): Ditto.
14195 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14196 regcache. Adjust.
43aaf8b6
PA
14197 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14198 Ditto.
442ea881
PA
14199 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14200 prototype to take a regcache.
14201 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14202 * remote-utils.c (convert_ascii_to_int, outreg)
14203 (prepare_resume_reply): Change prototype to take a regcache.
14204 Adjust.
14205 * target.h (struct target_ops) <fetch_registers, store_registers>:
14206 Change prototype to take a regcache.
14207 (fetch_inferior_registers, store_inferior_registers): Change
14208 prototype to take a regcache. Adjust.
14209 * proc-service.c (ps_lgetregs): Adjust.
14210 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14211 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14212 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14213 take a regcache. Adjust.
14214 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14215 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14216 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14217 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14218 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14219 (cris_cannot_fetch_register):
14220 (cris_breakpoint_at): Change prototype to take a regcache.
14221 Adjust.
14222 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14223 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14224 to take a regcache. Adjust.
14225 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14226 Adjust.
14227 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14228 take a regcache. Adjust.
14229 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14230 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14231 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14232 * linux-mips-low.c (mips_get_pc):
14233 (mips_set_pc): Change prototype to take a regcache. Adjust.
14234 (mips_reinsert_addr): Adjust.
14235 (mips_collect_register): Change prototype to take a regcache.
14236 Adjust.
14237 (mips_supply_register):
14238 (mips_collect_register_32bit, mips_supply_register_32bit)
14239 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14240 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14241 * linux-ppc-low.c (ppc_supply_ptrace_register)
14242 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14243 (parse_spufs_run): Adjust.
14244 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14245 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14246 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14247 take a regcache. Adjust.
14248 * linux-s390-low.c (s390_collect_ptrace_register)
14249 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14250 (s390_set_pc): Change prototype to take a regcache. Adjust.
14251 (s390_arch_setup): Adjust.
14252 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14253 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14254 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14255 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14256 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14257 regcache. Adjust.
14258 (sparc_breakpoint_at): Adjust.
14259 * linux-xtensa-low.c (xtensa_fill_gregset):
14260 (xtensa_store_gregset):
14261 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14262 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14263 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14264 prototype to take a regcache. Adjust.
14265 * win32-arm-low.c (arm_fetch_inferior_register)
14266 (arm_store_inferior_register): Change prototype to take a
14267 regcache. Adjust.
14268 * win32-i386-low.c (i386_fetch_inferior_register)
14269 (i386_store_inferior_register): Change prototype to take a
14270 regcache. Adjust.
14271 * win32-low.c (child_fetch_inferior_registers)
14272 (child_store_inferior_registers): Change prototype to take a
14273 regcache. Adjust.
14274 (win32_wait): Adjust.
14275 (win32_fetch_inferior_registers): Change prototype to take a
14276 regcache. Adjust.
14277 (win32_store_inferior_registers): Adjust.
14278 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14279 store_inferior_register>: Change prototype to take a regcache.
14280
60c3d7b0
DE
142812010-01-20 Doug Evans <dje@google.com>
14282
14283 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14284 #ifdef.
14285 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14286 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14287
dc146f7c
VP
142882010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14289
14290 * linux-low.c (linux_core_of_thread): New.
14291 (compare_ints, show_process, list_threads): New.
14292 (linux_qxfer_osdata): Report threads and cores.
14293 (linux_target_op): Register linux_core_of_thread.
14294 * remote-utils.c (prepare_resume_reply): Report the core.
14295 (buffer_xml_printf): Support %d specifier.
14296 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14297 New.
14298 (handle_query): Handle qXfer:threads. Announce availability
14299 thereof.
14300 * target.h (struct target_ops): New field core_of_thread.
14301
7803799a
UW
143022010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14303
14304 * Makefile.in (clean): Remove new generated files.
14305 (reg-s390.o, reg-s390.c): Remove rules.
14306 (reg-s390x.o, reg-s390x.c): Likewise.
14307 (s390-linux32.o, s390-linux32.c): Add rules.
14308 (s390-linux64.o, s390-linux64.c): Likewise.
14309 (s390x-linux64.o, s390x-linux64.c): Likewise.
14310 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14311 * linux-s390-low.c: Include <elf.h>.
14312 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14313 (init_registers_s390): Remove prototype.
14314 (init_registers_s390x): Likewise.
14315 (init_registers_s390_linux32): Add prototype.
14316 (init_registers_s390_linux64): Likewise.
14317 (init_registers_s390x_linux64): Likewise.
14318 (s390_num_regs_3264): New define.
14319 (s390_regmap_3264): New global variable.
14320 (s390_cannot_fetch_register): Remove obsolete check.
14321 (s390_cannot_store_register): Likewise.
14322 (s390_collect_ptrace_register): Handle upper/lower register halves.
14323 (s390_supply_ptrace_register): Likewise.
14324 (s390_fill_gregset): Update to register number changes.
14325 (s390_get_hwcap): New routine.
14326 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14327 Install appropriate regmap and register set.
14328
6e7ffa39
JB
143292010-01-01 Joel Brobecker <brobecker@adacore.com>
14330
14331 * server.c (gdbserver_version): Update copyright year to 2010.
14332 * gdbreplay.c (gdbreplay_version): Likewise.
14333
957f3f49
DE
143342009-12-28 Doug Evans <dje@google.com>
14335
14336 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14337 elf/external.h. Include <elf.h> instead but only if necessary.
14338
ca5c370d
PA
143392009-12-28 Pedro Alves <pedro@codesourcery.com>
14340
14341 * linux-low.c (linux_remove_process): Remove `detaching'
14342 parameter. Don't release/detach from thread_db here.
14343 (linux_kill): Release/detach from thread_db here, ...
14344 (linux_detach): ... and here, before actually detaching.
14345 (linux_wait_1): ... and here, when a process exits.
14346 * thread-db.c (any_thread_of): New.
14347 (thread_db_free): Switch the current inferior to a thread of the
14348 passed in process.
14349
4ee62156
DE
143502009-12-21 Doug Evans <dje@google.com>
14351
d90e6a88
DE
14352 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14353
c5f62d5f
DE
14354 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14355 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14356 warning ifndef __NR_tkill. Move setting of errno there too.
14357 Delete unnecessary resetting of errno after syscall.
14358 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14359
10e86dd7
DE
14360 * configure.ac: Check for dladdr.
14361 * config.in: Regenerate.
14362 * configure: Regenerate.
14363 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14364 (try_thread_db_load): Update.
14365
4ee62156
DE
14366 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14367
00f515da
DE
143682009-12-18 Doug Evans <dje@google.com>
14369
e9464885
DE
14370 * event-loop.c: Include unistd.h if it exists.
14371
07d4f67e
DE
14372 * linux-low.c (my_waitpid): Move definition away from being in
14373 between linux_tracefork_child/linux_test_for_tracefork.
14374
00f515da
DE
14375 * gdb_proc_service.h (psaddr_t): Fix type.
14376 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14377 signature to match glibc.
14378
1de1badb
DE
143792009-12-16 Doug Evans <dje@google.com>
14380
14381 * linux-low.c (linux_read_memory): Fix argument to read.
14382
aeeb81d1
PA
143832009-11-26 Pedro Alves <pedro@codesourcery.com>
14384
14385 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14386 events, don't leave current_inferior pointing at null.
14387
10357975
PA
143882009-11-26 Pedro Alves <pedro@codesourcery.com>
14389
14390 * win32-low.c (LOG): Delete.
14391 (OUTMSG): Output to stderr.
14392 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14393 on compile time LOG macro.
14394 (win32_wait): Fix debug output.
14395
cf6e3471
PA
143962009-11-26 Pedro Alves <pedro@codesourcery.com>
14397
14398 * win32-low.c (win32_add_one_solib): If the dll name is
14399 "ntdll.dll", prepend the system directory to the dll path.
14400
0c85e18e
MK
144012009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14402
14403 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14404
9ac544ce 144052009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14406 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14407
14408 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14409 * configure.ac: Check for __mcoldfire__ and set
14410 gdb_cv_m68k_is_coldfire.
14411 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14412 reg-cf.o and reg-m68k.o.
14413 * configure: Regenerated.
14414
fd7dd3e6
PA
144152009-11-16 Pedro Alves <pedro@codesourcery.com>
14416
14417 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14418 Pass it to thread_db_free.
14419 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14420 proper `detaching' argument to linux_remove_process.
14421 * linux-low.h (thread_db_free): Add `detaching' parameter.
14422 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14423 to thread_db_free.
14424 (thread_db_free): Add `detaching' parameter. Only
14425 call td_ta_clear_event if detaching from process.
14426
75aa492e
MK
144272009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14428
14429 * thread-db.c (thread_db_free): Fix typo.
14430
21e1bee4
PP
144312009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14432
14433 PR gdb/10838
14434 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14435
8838b45e
NS
144362009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14437
14438 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14439 with an i686 compiler.
14440 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14441 needed.
14442 * configure: Rebuilt.
14443
8a35fb51
SL
144442009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14445
14446 PR gdb/10783
14447
14448 * server.c (handle_search_memory_1): Correct read_addr initialization
14449 in loop for searching subsequent chunks.
14450
96f15937
PP
144512009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14452
14453 * configure.ac: New --with-libthread-db option.
14454 * thread-db.c: Allow direct dependence on libthread_db.
14455 (thread_db_free): Adjust.
14456 * config.in: Regenerate.
14457 * configure: Likewise.
889bf7c5 14458
5f7d1694
PP
144592009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14460
14461 PR gdb/10757
14462 * thread-db.c (attach_thread): New function.
14463 (maybe_attach_thread): Return success/failure.
14464 (find_new_threads_callback): Adjust.
889bf7c5
PA
14465 (thread_db_find_new_threads): Loop until no new threads.
14466
88e3b899
PA
144672009-10-13 Pedro Alves <pedro@codesourcery.com>
14468
14469 * proc-service.c (ps_lgetregs): Formatting.
14470
cdbfd419
PP
144712009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14472
14473 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14474 * configure.ac: Adjust.
14475 * linux-low.h (struct process_info_private): Move members to struct
14476 thread_db.
14477 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14478 * linux-low.c (linux_remove_process): Adjust.
14479 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14480 * server.c (handle_query): Move code ...
14481 (handle_monitor_command): ... here. New function.
14482 * target.h (struct target_ops): New member.
14483 * thread-db.c (struct thread_db): New.
14484 (libthread_db_search_path): New variable.
14485 (thread_db_create_event, thread_db_enable_reporting)
14486 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14487 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14488 (try_thread_db_load_1, dladdr_to_soname): New functions.
14489 (try_thread_db_load, thread_db_load_search): New functions.
14490 (thread_db_init): Search for libthread_db.
14491 (thread_db_free): New function.
14492 (thread_db_handle_monitor_command): Likewise.
14493 * config.in: Regenerate.
14494 * configure: Regenerate.
889bf7c5 14495
4168d2d6
UW
144962009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14497
14498 * spu-low.c (spu_kill): Wait for inferior to terminate.
14499 Call clear_inferiors.
14500 (spu_detach): Call clear_inferiors.
14501
81ecdfbb
RW
145022009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14503
14504 * aclocal.m4: Regenerate.
14505 * config.in: Likewise.
14506 * configure: Likewise.
14507
0b9ff2c0
UW
145082009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14509
14510 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14511 (parse_spufs_run): New function.
14512 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14513 (ppc_breakpoint_at): Handle SPU breakpoints.
14514
efcbbd14
UW
145152009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14516
14517 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14518 (SPUFS_MAGIC): Define.
14519 (spu_enumerate_spu_ids): New function.
14520 (linux_qxfer_spu): New function.
14521 (linux_target_ops): Install linux_qxfer_spu.
14522
f4d9bade
UW
145232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14524
14525 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14526 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14527 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14528 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14529 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14530 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14531 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14532 (init_registers_powerpc_cell32l): Add prototype.
14533 (init_registers_powerpc_cell64l): Likewise.
14534 (ppc_arch_setup): Detect Cell/B.E. architecture.
14535
96e946ca
RW
145362009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14537
14538 * Makefile.in (datarootdir): New variable.
14539
58d6951d
DJ
145402009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14541
14542 * linux-low.c (linux_write_memory): Update debugging output.
14543 * Makefile.in (clean): Add new descriptions.
14544 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14545 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14546 * configure.srv: Add new files for arm*-*-linux*.
14547 * linux-arm-low.c: Add new declarations.
14548 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14549 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14550 (HWCAP_VFPv3D16): New.
14551 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14552 instead of __IWMMXT__.
14553 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14554 (arm_arch_setup): New.
14555 (target_regsets): Remove #ifdef. Add VFP regset.
14556 (the_low_target): Use arm_arch_setup.
14557
12b42a12
DJ
145582009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14559
14560 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14561 the main thread again.
14562
ac8c974e
AR
145632009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14564
14565 Adding Neutrino gdbserver.
14566 * configure: Regenerated.
14567 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14568 * configure.srv (i[34567]86-*-nto*): New target.
14569 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14570 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14571 (nto_comctrl) [__QNX__]: New function.
14572 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14573
4424e0c3 145742009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14575
14576 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14577 srv_tgtobj.
14578
912cf4ba
PA
145792009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14580 Pedro Alves <pedro@codesourcery.com>
14581
14582 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14583 don't support CONTEXT_EXTENDED_REGISTERS.
14584 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14585 (the_low_target): Install them.
14586 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14587 failing with ERROR_PIPE_NOT_CONNECTED.
14588
aa5ca48f
DE
145892009-06-30 Doug Evans <dje@google.com>
14590 Pierre Muller <muller@ics.u-strasbg.fr>
14591
14592 Add h/w watchpoint support to x86-linux, win32-i386.
14593 * Makefile.in (SFILES): Add i386-low.c
14594 (i386_low_h): Define.
14595 (i386-low.o): Add dependencies.
14596 (linux-x86-low.o): Add i386-low.h dependency.
14597 (win32-i386-low.o): Ditto.
14598 * i386-low.c: New file.
14599 * i386-low.h: New file.
14600 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14601 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14602 * linux-low.c (linux_add_process): Initialize arch_private.
14603 (linux_remove_process): Free arch_private.
14604 (add_lwp): Initialize arch_private.
14605 (delete_lwp): Free arch_private.
14606 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14607 provided.
14608 * linux-low.h (process_info_private): New member arch_private.
14609 (lwp_info): New member arch_private.
14610 (linux_target_ops): New members new_process, new_thread,
14611 prepare_to_resume.
14612 (ptid_of): New macro.
14613 * linux-x86-low.c: Include stddef.h, i386-low.h.
14614 (arch_process_info): New struct.
14615 (arch_lwp_info): New struct.
14616 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14617 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14618 (i386_dr_low_get_status): New function.
14619 (x86_insert_point, x86_remove_point): New functions.
14620 (x86_stopped_by_watchpoint): New function.
14621 (x86_stopped_data_address): New function.
14622 (x86_linux_new_process, x86_linux_new_thread): New functions.
14623 (x86_linux_prepare_to_resume): New function.
14624 (the_low_target): Add entries for insert_point, remove_point,
14625 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14626 prepare_to_resume.
14627 * server.c (debug_hw_points): New global.
14628 (monitor_show_help): Document set debug-hw-points.
14629 (handle_query): Process "set debug-hw-points".
14630 * server.h (debug_hw_points): Declare.
14631 (paddress): Declare.
14632 * utils.c (NUMCELLS, CELLSIZE): New macros.
14633 (get_sell, xsnprintf, paddress): New functions.
14634 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14635 remove_point, stopped_by_watchpoint, stopped_data_address.
14636 * win32-i386-low.c: Include i386-low.h.
14637 (debug_reg_state): Replaces dr.
14638 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14639 (i386_dr_low_get_status): New function.
14640 (i386_insert_point, i386_remove_point): New functions.
14641 (i386_stopped_by_watchpoint): New function.
14642 (i386_stopped_data_address): New function.
14643 (i386_initial_stuff): Update.
14644 (get_thread_context,set_thread_context,i386_thread_added): Update.
14645 (the_low_target): Add entries for insert_point,
14646 remove_point, stopped_by_watchpoint, stopped_data_address.
14647 * win32-low.c (win32_insert_watchpoint): New function.
14648 (win32_remove_watchpoint): New function.
14649 (win32_stopped_by_watchpoint): New function.
14650 (win32_stopped_data_address): New function.
14651 (win32_target_ops): Add entries for insert_watchpoint,
14652 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14653 * win32-low.h (win32_target_ops): New members insert_point,
14654 remove_point, stopped_by_watchpoint, stopped_data_address.
14655
d993e290
PA
146562009-06-25 Pedro Alves <pedro@codesourcery.com>
14657
14658 * server.c (process_serial_event): Re-return unsupported, not
14659 error, if the type isn't recognized. Re-allow supporting only
14660 insert or remove packets. Also call require_running for
14661 breakpoints. Add missing break statement to default case. Tidy.
14662 * target.h (struct target_ops): Rename insert_watchpoint to
14663 insert_point, and remove_watchpoint to remove_point.
14664
14665 * linux-low.h (struct linux_target_ops): Likewise.
14666 * linux-low.c (linux_insert_watchpoint): Rename to ...
14667 (linux_insert_point): ... this. Adjust.
14668 (linux_remove_watchpoint): Rename to ...
14669 (linux_remove_point): ... this. Adjust.
14670 (linux_target_ops): Adjust.
14671 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14672 (cris_insert_point): ... this.
14673 (cris_remove_watchpoint): Rename to ...
14674 (cris_remove_point): ... this.
14675 (the_low_target): Adjust.
14676
0f54c268
PM
146772009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14678
14679 * server.c (handle_v_kill): Pass signal_pid to
14680 kill_inferior if multi_process is zero.
14681
c6314022
AR
146822009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14683
14684 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14685 * target.h (target_ops): Comment for *_watchpoint to make it clear
14686 the functions can get types '0' and '1'.
14687
4463ce24
AR
146882009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14689
14690 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14691 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14692 * regcache.c (get_regcache): Likewise.
14693 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14694 * win32-low.c (child_fetch_inferior_registers): Remove check for
14695 regno 0.
14696
cf8fd78b
PA
146972009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14698 Pedro Alves <pedro@codesourcery.com>
14699
14700 * target.h (struct target_ops) <supports_multi_process>: New
14701 callback.
14702 (target_supports_multi_process): New.
14703 * server.c (handle_query): Even if GDB reports support, only
14704 enable multi-process if the target also supports it. Report
14705 multi-process support only if the target backend supports it.
14706 * linux-low.c (linux_supports_multi_process): New function.
14707 (linux_target_ops): Install it as target_supports_multi_process
14708 callback.
14709
47c0c975
DE
147102009-05-24 Doug Evans <dje@google.com>
14711
e09875d4
DE
14712 Global renaming of find_thread_pid to find_thread_ptid.
14713 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14714 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14715 All callers updated.
14716
e27d73f6
DE
14717 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14718 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14719 directly.
14720
47c0c975
DE
14721 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14722 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14723 (linux_resume_one_lwp): Ditto.
14724
2acc282a
DE
147252009-05-23 Doug Evans <dje@google.com>
14726
14727 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14728 from struct inferior_list_entry * to struct lwp_info *.
14729 All callers updated.
14730
9f1036c1
DE
147312009-05-13 Doug Evans <dje@google.com>
14732
14733 * linux-x86-low.c: Don't include assert.h.
14734 (x86_siginfo_fixup): Use fatal, not assert.
14735 (x86_arch_setup): Fix comment.
14736
d0722149
DE
147372009-05-12 Doug Evans <dje@google.com>
14738
14739 Biarch support for i386/amd64 gdbserver.
14740 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14741 Add linux-x86-low.c.
14742 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14743 (linux-x86-low.o): Add.
14744 * linux-x86-64-low.c: Delete.
14745 * linux-i386-low.c: Delete.
14746 * linux-x86-low.c: New file.
14747 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14748 linux-x86-low.o.
14749 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14750 linux-x86-low.o.
14751 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14752 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14753 (linux_child_pid_to_exec_file): New function.
14754 (elf_64_header_p, elf_64_file_p): New functions.
14755 (siginfo_fixup): New function.
14756 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14757 give target a chance to convert layout.
14758 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14759 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14760
fdeb2a12
DE
147612009-05-07 Doug Evans <dje@google.com>
14762
14763 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14764 (regsets_store_inferior_registers): Ditto.
14765
a6dbe5df
PA
147662009-05-06 Pedro Alves <pedro@codesourcery.com>
14767
14768 PR server/10048
14769
14770 * linux-low.c (must_set_ptrace_flags): Delete.
14771 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14772 of the global.
14773 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14774 `lwp->must_set_ptrace_flags' instead.
ba42693b 14775 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14776 (linux_wait_1): ... not here.
14777
5091eb23
DE
147782009-04-30 Doug Evans <dje@google.com>
14779
9f767825
DE
14780 * inferiors.c (started_inferior_callback): New function.
14781 (attached_inferior_callback): New function.
14782 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14783 * server.c (print_started_pid, print_attached_pid): New functions.
14784 (detach_or_kill_for_exit): New function.
14785 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14786 * server.h (have_started_inferiors_p): Declare.
14787 (have_attached_inferiors_p): Declare.
14788
5091eb23
DE
14789 * inferiors.c (remove_process): Fix memory leak, free process.
14790 * linux-low.c (linux_remove_process): New function.
14791 (linux_kill): Call it instead of remove_process.
14792 (linux_detach, linux_wait_1): Ditto.
14793
155c8968
PA
147942009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14795
14796 * configure.srv: Add x86 Windows CE target.
14797
7fe519cb
UW
147982009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14799
14800 * inferiors.c (get_thread_process): Make global.
14801 * server.h (get_thread_process): Add prototype.
14802 * thread-db.c (find_one_thread): Use get_thread_process
14803 instead of current_process.
14804 (thread_db_get_tls_address): Do not crash if called when
14805 thread layer is not yet initialized.
14806
5472f405
UW
148072009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14808
14809 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14810 * spu-low.c (current_tid): Rename to ...
14811 (current_ptid): ... this.
14812 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14813 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14814 ptid_get_lwp (current_ptid) instead of current_tid.
14815 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14816 instead of current_tid. Use find_process_pid to verify pid
14817 argument is valid. Pass proper argument to remove_process.
14818 (spu_thread_alive): Compare current_ptid instead of current_tid.
14819 (spu_resume): Likewise.
14820
55ac2b99
PA
148212009-04-02 Pedro Alves <pedro@codesourcery.com>
14822
14823 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14824 variable.
14825
95954743
PA
148262009-04-01 Pedro Alves <pedro@codesourcery.com>
14827
14828 Implement the multiprocess extensions, and add linux multiprocess
14829 support.
14830
14831 * server.h (ULONGEST): Declare.
14832 (struct ptid, ptid_t): New.
14833 (minus_one_ptid, null_ptid): Declare.
14834 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14835 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14836 (struct inferior_list_entry): Change `id' type from unsigned from
14837 to ptid_t.
14838 (struct sym_cache, struct breakpoint, struct
14839 process_info_private): Forward declare.
14840 (struct process_info): Declare.
14841 (current_process): Declare.
14842 (all_processes): Declare.
14843 (initialize_inferiors): Declare.
14844 (add_thread): Adjust to use ptid_t.
14845 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14846 (add_process, remove_process, find_thread_pid): Declare.
14847 (find_inferior_id): Adjust to use ptid_t.
14848 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14849 (multi_process): Declare.
14850 (push_event): Adjust to use ptid_t.
14851 (read_ptid, write_ptid): Declare.
14852 (prepare_resume_reply): Adjust to use ptid_t.
14853 (clear_symbol_cache): Declare.
14854 * inferiors.c (all_processes): New.
14855 (null_ptid, minus_one_ptid): New.
14856 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14857 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14858 (add_thread): Change unsigned long to ptid. Remove gdb_id
14859 parameter. Adjust.
14860 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14861 (gdb_id_to_thread): Rename to ...
14862 (find_thread_pid): ... this. Change unsigned long to ptid.
14863 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14864 (loaded_dll, pull_pid_from_list): Adjust.
14865 (add_process, remove_process, find_process_pid)
14866 (get_thread_process, current_process, initialize_inferiors): New.
14867 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14868 (struct target_waitstatus) <related_pid>: Ditto.
14869 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14870 return type to int.
14871 (struct target_ops) <join>: Add `pid' argument.
14872 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14873 (struct target_ops) <wait>: Add `ptid' field. Change return type
14874 to ptid.
14875 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14876 (mywait): Add `ptid' argument. Change return type to ptid_t.
14877 (target_pid_to_str): Declare.
14878 * target.c (set_desired_inferior): Adjust to use ptids.
14879 (mywait): Add new `ptid' argument. Adjust.
14880 (target_pid_to_str): New.
14881 * mem-break.h (free_all_breakpoints): Declare.
14882 * mem-break.c (breakpoints): Delelete.
14883 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14884 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14885 to use per-process breakpoint list.
14886 (free_all_breakpoints): New.
14887 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14888 (symbol_cache, all_symbols_looked_up): Delete.
14889 (hexchars): New.
14890 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14891 read_ptid): New.
14892 (prepare_resume_reply): Change ptid argument's type from unsigned
14893 long to ptid_t. Adjust. Implement W;process and X;process.
14894 (free_sym_cache, clear_symbol_cache): New.
14895 (look_up_one_symbol): Adjust to per-process symbol cache. *
14896 * server.c (cont_thread, general_thread, step_thread): Change type
14897 to ptid_t.
14898 (attached): Delete.
14899 (multi_process): New.
14900 (last_ptid): Change type to ptid_t.
14901 (struct vstop_notif) <ptid>: Change type to ptid_t.
14902 (queue_stop_reply, push_event): Change `ptid' argument's type to
14903 ptid_t.
14904 (discard_queued_stop_replies): Add `pid' argument.
14905 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14906 changes. Don't reference the `attached' global.
14907 (attach_inferior): Adjust to mywait interface changes.
14908 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14909 features. Handle and report "multiprocess+". Handle
14910 "qAttached:PID".
14911 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14912 changes.
14913 (handle_v_kill): New.
14914 (handle_v_stopped): Adjust to use target_pid_to_str.
14915 (handle_v_requests): Allow multiple attaches and runs when
14916 multiprocess extensions are in effect. Handle "vKill".
14917 (myresume): Adjust to use ptids.
14918 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14919 (handle_status): Adjust to discard_queued_stop_replies interface
14920 change.
14921 (first_thread_of, kill_inferior_callback)
14922 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14923 (main): Call initialize_inferiors. Adjust to use ptids, killing
14924 and detaching from all inferiors. Handle multiprocess packet
14925 variants.
14926 * linux-low.h: Include gdb_proc_service.h.
14927 (struct process_info_private): New.
14928 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14929 <lwpid_of>: Use ptid_get_lwp.
14930 (get_lwp_thread): Adjust.
14931 (struct lwp_info): Add `dead' member.
14932 (find_lwp_pid): Declare.
14933 * linux-low.c (thread_db_active): Delete.
14934 (new_inferior): Adjust comment.
14935 (inferior_pid): Delete.
14936 (linux_add_process): New.
14937 (handle_extended_wait): Adjust.
14938 (add_lwp): Change unsigned long to ptid.
14939 (linux_create_inferior): Add process to processes table. Adjust
14940 to use ptids. Don't set new_inferior here.
14941 (linux_attach_lwp): Rename to ...
14942 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14943 it. Adjust to use ptids.
14944 (linux_attach_lwp): New.
14945 (linux_attach): Add process to processes table. Don't set
14946 new_inferior here.
14947 (struct counter): New.
14948 (second_thread_of_pid_p, last_thread_of_process_p): New.
14949 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14950 multiple processes.
14951 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14952 processes. Remove process from process table.
14953 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14954 to multiple processes.
14955 (any_thread_of): New.
14956 (linux_detach): Add `pid' argument, and handle it. Remove process
14957 from processes table.
14958 (linux_join): Add `pid' argument. Handle it.
14959 (linux_thread_alive): Change unsighed long argument to ptid_t.
14960 Consider dead lwps as not being alive.
14961 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14962 threads we're not interested in.
14963 (same_lwp, find_lwp_pid): New.
14964 (linux_wait_for_lwp): Change `pid' argument's type from int to
14965 ptid_t. Adjust.
14966 (linux_wait_for_event): Rename to ...
14967 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14968 from int to ptid_t. Adjust.
14969 (linux_wait_for_event): New.
14970 (linux_wait_1): Add `ptid' argument. Change return type to
14971 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14972 that exit from the process table.
14973 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14974 Adjust.
14975 (mark_lwp_dead): New.
14976 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14977 stopping all threads, mark its main lwp as dead.
14978 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14979 ptids.
14980 (fetch_register, usr_store_inferior_registers)
14981 (regsets_fetch_inferior_registers)
14982 (regsets_store_inferior_registers, linux_read_memory)
14983 (linux_write_memory): Inline `inferior_pid'.
14984 (linux_look_up_symbols): Adjust to use per-process
14985 `thread_db_active'.
14986 (linux_request_interrupt): Adjust to use ptids.
14987 (linux_read_auxv): Inline `inferior_pid'.
14988 (initialize_low): Don't reference thread_db_active.
14989 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14990 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14991 (ps_getpid): Return the pid of the current inferior.
14992 * thread-db.c (proc_handle, thread_agent): Delete.
14993 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14994 per-process data.
14995 (find_one_thread): Change argument type to ptid_t. Adjust to
14996 per-process data.
14997 (maybe_attach_thread): Adjust to per-process data and ptids.
14998 (thread_db_find_new_threads): Ditto.
14999 (thread_db_init): Ditto.
15000 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15001 processes table. Adjust to use ptids.
15002 (spu_kill, spu_detach): Adjust interface. Remove process from
15003 processes table.
15004 (spu_join, spu_thread_alive): Adjust interface.
15005 (spu_wait): Adjust interface. Remove process from processes
15006 table. Adjust to use ptids.
15007 * win32-low.c (current_inferior_tid): Delete.
15008 (current_inferior_ptid): New.
15009 (debug_event_ptid): New.
15010 (thread_rec): Take a ptid. Adjust.
15011 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15012 (child_delete_thread): Ditto.
15013 (do_initial_child_stuff): Add `attached' argument. Add process to
15014 processes table.
15015 (child_fetch_inferior_registers, child_store_inferior_registers):
15016 Adjust.
15017 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15018 (win32_attach): Pass 1 to do_initial_child_stuff.
15019 (win32_kill): Adjust interface. Remove process from processes
15020 table.
15021 (win32_detach): Ditto.
15022 (win32_join): Adjust interface.
15023 (win32_thread_alive): Take a ptid.
15024 (win32_resume): Adjust to use ptids.
15025 (get_child_debug_event): Ditto.
15026 (win32_wait): Adjust interface. Remove exiting process from
15027 processes table.
15028
bd99dc85
PA
150292009-04-01 Pedro Alves <pedro@codesourcery.com>
15030
15031 Non-stop mode support.
15032
15033 * server.h (non_stop): Declare.
15034 (gdb_client_data, handler_func): Declare.
15035 (delete_file_handler, add_file_handler, start_event_loop):
15036 Declare.
15037 (handle_serial_event, handle_target_event, push_event)
15038 (putpkt_notif): Declare.
15039 * target.h (enum resume_kind): New.
15040 (struct thread_resume): Replace `step' field by `kind' field.
15041 (TARGET_WNOHANG): Define.
15042 (struct target_ops) <wait>: Add `options' argument.
15043 <supports_non_stop, async, start_non_stop>: New fields.
15044 (target_supports_non_stop, target_async): New.
15045 (start_non_stop): Declare.
15046 (mywait): Add `options' argument.
15047 * target.c (mywait): Add `options' argument. Print child exit
15048 notifications here.
15049 (start_non_stop): New.
15050 * server.c (non_stop, own_buf, mem_buf): New globals.
15051 (struct vstop_notif): New.
15052 (notif_queue): New global.
15053 (queue_stop_reply, push_event, discard_queued_stop_replies)
15054 (send_next_stop_reply): New.
15055 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15056 interface changes.
15057 (attach_inferior): In non-stop mode, don't wait for the target
15058 here.
15059 (handle_general_set): Handle QNonStop.
15060 (handle_query): When handling qC, return the current general
15061 thread, instead of the first thread of the list.
15062 (handle_query): If the backend supports non-stop mode, include
15063 QNonStop+ in the qSupported query response.
15064 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15065 and non-stop mode.
15066 (handle_v_attach, handle_v_run): Handle non-stop mode.
15067 (handle_v_stopped): New.
15068 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15069 (myresume): Adjust to use resume_kind. Handle non-stop.
15070 (queue_stop_reply_callback): New.
15071 (handle_status): Handle non-stop mode.
15072 (main): Clear non_stop flag on reconnection. Use the event-loop.
15073 Refactor serial protocol handling from here ...
15074 (process_serial_event): ... to this new function. When GDB
15075 selects any thread, select one here. In non-stop mode, wait until
15076 GDB acks all pending events before exiting.
15077 (handle_serial_event, handle_target_event): New.
15078 * remote-utils.c (remote_open): Install remote_desc in the event
15079 loop.
15080 (remote_close): Remove remote_desc from the event loop.
15081 (putpkt_binary): Rename to...
15082 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15083 (putpkt_binary): New as wrapper around putpkt_binary_1.
15084 (putpkt_notif): New.
15085 (prepare_resume_reply): In non-stop mode, don't change the
15086 general_thread.
15087 * event-loop.c: New.
15088 * Makefile.in (OBJ): Add event-loop.o.
15089 (event-loop.o): New rule.
15090
15091 * linux-low.h (pid_of): Moved here.
15092 (lwpid_of): New.
15093 (get_lwp_thread): Use lwpid_of.
15094 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15095 * linux-low.c (pid_of): Delete.
15096 (inferior_pid): Use lwpid_of.
15097 (linux_event_pipe): New.
15098 (target_is_async_p): New.
15099 (delete_lwp): New.
15100 (handle_extended_wait): Use lwpid_of.
15101 (add_lwp): Don't set lwpid field.
15102 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15103 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15104 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15105 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15106 first. Adjust to linux_wait_for_event interface changes. Use
15107 lwpid_of.
15108 (linux_detach): Don't delete the main lwp here.
15109 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15110 (status_pending_p): Don't consider explicitly suspended lwps.
15111 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15112 pointer. Add OPTIONS argument. Change return type to int. Use
15113 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15114 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15115 pointer. Add status pointer argument. Return a pid instead of a
15116 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15117 changes. In non-stop mode, don't switch to a random thread.
15118 (linux_wait): Rename to...
15119 (linux_wait_1): ... this. Add target_options argument, and handle
15120 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15121 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15122 clean exit and signal exit code. Don't stop all threads in
15123 non-stop mode. In all-stop mode, only stop all threads when
15124 reporting a stop to GDB. Handle explicit thread stop requests.
15125 (async_file_flush, async_file_mark): New.
15126 (linux_wait): New.
15127 (send_sigstop): Use lwpid_of.
15128 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15129 interface changes. In non-stop mode, don't switch to a random
15130 thread.
15131 (linux_resume_one_lwp): Use lwpid_of.
15132 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15133 (linux_resume_one_thread): ... this. Handle resume_stop. In
15134 non-stop mode, don't look for pending flag in all threads.
15135 (resume_status_pending_p): Don't consider explicitly suspended
15136 threads.
15137 (my_waitpid): Reimplement. Emulate __WALL.
15138 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15139 Use lwpid_of.
15140 (sigchld_handler, linux_supports_non_stop, linux_async)
15141 (linux_start_non_stop): New.
15142 (linux_target_ops): Register linux_supports_non_stop, linux_async
15143 and linux_start_non_stop.
15144 (initialize_low): Install SIGCHLD handler.
15145 * thread-db.c (thread_db_create_event, find_one_thread)
15146 (thread_db_get_tls_address): Use lwpid_of.
15147 * win32-low.c (win32_detach): Adjust to use resume_kind.
15148 (win32_wait): Add `options' argument.
15149 * spu-low.c (spu_resume): Adjust to use resume_kind.
15150 (spu_wait): Add `options' argument.
15151
5b1c542e
PA
151522009-04-01 Pedro Alves <pedro@codesourcery.com>
15153
15154 Decouple target code from remote protocol.
15155
15156 * target.h (enum target_waitkind): New.
15157 (struct target_waitstatus): New.
15158 (struct target_ops) <wait>: Return an unsigned long. Take a
15159 target_waitstatus pointer instead of a char pointer.
15160 (mywait): Likewise.
15161 * target.c (mywait): Change prototype to return an unsigned long.
15162 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15163 * server.h (thread_from_wait, old_thread_from_wait): Delete
15164 declarations.
15165 (prepare_resume_reply): Change prototype to take a
15166 target_waitstatus.
15167 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15168 (last_status, last_ptid): New.
15169 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15170 pid instead of a signal.
15171 (attach_inferior): Remove "status" and "signal" parameters.
15172 Adjust.
15173 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15174 not as an address.
15175 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15176 (handle_v_requests, myresume): Remove "status" and "signal"
15177 parameters. Adjust.
15178 (handle_status): New.
15179 (main): Delete local `status'. Adjust.
15180 * remote-utils.c: Include target.h.
15181 (prepare_resume_reply): Change prototype to take a
15182 target_waitstatus. Adjust.
15183
15184 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15185 interface.
15186 * spu-low.c (spu_wait): Adjust.
15187 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15188 Delete.
15189 (win32_wait): Adjust.
15190
2bd7c093
PA
151912009-04-01 Pedro Alves <pedro@codesourcery.com>
15192
15193 * target.h (struct thread_resume): Delete leave_stopped member.
15194 (struct target_ops): Add a `n' argument to the `resume' callback.
15195 * server.c (start_inferior): Adjust.
15196 (handle_v_cont, myresume): Adjust.
15197 * linux-low.c (check_removed_breakpoint): Adjust to resume
15198 interface change, and to removed leave_stopped field.
15199 (resume_ptr): Delete.
15200 (struct thread_resume_array): New.
15201 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15202 resume interface change.
15203 (linux_continue_one_thread, linux_queue_one_thread)
15204 (resume_status_pending_p): Check if the resume field is NULL
15205 instead of checking the leave_stopped member.
15206 (linux_resume): Adjust to the target resume interface change.
15207 * spu-low.c (spu_resume): Adjust to the target resume interface
15208 change.
15209 * win32-low.c (win32_detach, win32_resume): Ditto.
15210
c35fafde
PA
152112009-04-01 Pedro Alves <pedro@codesourcery.com>
15212
15213 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15214 flag.
15215 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15216 pending.
15217 (linux_continue_one_thread): Only preserve the stepping flag if
15218 there's a pending breakpoint.
15219
0a59d50b
PA
152202009-03-31 Pedro Alves <pedro@codesourcery.com>
15221
15222 * server.c (main): After the inferior having exited, call
15223 remote_close before exiting gdbserver.
15224
f04c6d38
TJB
152252009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15226
15227 Fix size of FPSCR in Power 7 processors.
15228 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15229 (PPC_FEATURE_HAS_DFP): New #define.
15230 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15231 size of the FPSCR.
15232
78e5cee6
PA
152332009-03-23 Pedro Alves <pedro@codesourcery.com>
15234
15235 * server.c (handle_query) Whitespace and formatting.
15236
1b3f6016
PA
152372009-03-22 Pedro Alves <pedro@codesourcery.com>
15238
15239 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15240 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15241 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15242 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15243 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15244 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15245 Makefile.in, configure.ac: Fix whitespace throughout.
15246 * configure: Regenerate.
15247
a07b2135
PA
152482009-03-22 Pedro Alves <pedro@codesourcery.com>
15249
15250 * inferiors.c (find_inferior): Make it safe for the callback
15251 function to delete the currently iterated inferior.
15252
67cc2626
PA
152532009-03-22 Pedro Alves <pedro@codesourcery.com>
15254
15255 * Makefile.in (linuw_low_h): Move higher.
15256 (thread-db.o): Depend on $(linux_low_h).
15257
54a0b537
PA
152582009-03-17 Pedro Alves <pedro@codesourcery.com>
15259
15260 Rename "process" to "lwp" throughout.
15261
15262 * linux-low.c (all_processes): Rename to...
15263 (all_lwps): ... this.
15264 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15265 (add_process): Rename to ...
15266 (add_lwp): ... this. Adjust.
15267 (linux_create_inferior): Adjust.
15268 (linux_attach_lwp): Adjust.
15269 (linux_attach): Adjust.
15270 (linux_kill_one_process): Rename to ...
15271 (linux_kill_one_lwp): ... this. Adjust.
15272 (linux_kill): Adjust.
15273 (linux_detach_one_process): Rename to ...
15274 (linux_detach_one_lwp): ... this. Adjust.
15275 (linux_detach): Adjust.
15276 (check_removed_breakpoint): Adjust.
15277 (status_pending_p): Adjust.
15278 (linux_wait_for_process): Rename to ...
15279 (linux_wait_for_lwp): ... this. Adjust.
15280 (linux_wait_for_event): Adjust.
15281 (send_sigstop): Adjust.
15282 (wait_for_sigstop): Adjust.
15283 (stop_all_processes): Rename to ...
15284 (stop_all_lwps): ... this.
15285 (linux_resume_one_process): Rename to ...
15286 (linux_resume_one_lwp): ... this. Adjust.
15287 (linux_set_resume_request, linux_continue_one_thread)
15288 (linux_queue_one_thread, resume_status_pending_p)
15289 (usr_store_inferior_registers, regsets_store_inferior_registers)
15290 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15291 Adjust.
15292 * linux-low.h (get_process): Rename to ...
15293 (get_lwp): ... this. Adjust.
15294 (get_thread_process): Rename to ...
15295 (get_thread_lwp): ... this. Adjust.
15296 (get_process_thread): Rename to ...
15297 (get_lwp_thread): ... this. Adjust.
15298 (struct process_info): Rename to ...
15299 (struct lwp_info): ... this.
15300 (all_processes): Rename to ...
15301 (all_lwps): ... this.
15302 * proc-service.c (ps_lgetregs): Adjust.
15303 * thread-db.c (thread_db_create_event, find_one_thread)
15304 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15305
0b16c5cf
PA
153062009-03-14 Pedro Alves <pedro@codesourcery.com>
15307
15308 * server.c (handle_query): Handle "qAttached".
15309
32de4b9d
NS
153102009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15311
15312 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15313 GPLv3, update license URL.
15314
2aecd87f
DE
153152009-03-01 Doug Evans <dje@google.com>
15316
93efd302 15317 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15318 (server_h): Add gdb_signals.h.
15319 (signals.o): Update.
15320 * server.h (target_signal_from_host,target_signal_to_host_p)
15321 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15322
86b1f9c5
PM
153232009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15324
15325 * remote-utils.c (getpkt): Also generate remote-debug
15326 information if noack_mode is set.
15327
4aa995e1
PA
153282009-02-06 Pedro Alves <pedro@codesourcery.com>
15329
15330 * server.c (handle_query): Report qXfer:siginfo:read and
15331 qXfer:siginfo:write as supported and handle them.
15332 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15333 * linux-low.c (linux_xfer_siginfo): New.
15334 (linux_target_ops): Set it.
15335
62709adf
PA
153362009-01-26 Pedro Alves <pedro@codesourcery.com>
15337
15338 * server.c (gdbserver_usage): Mention --remote-debug.
15339 (main): Accept '--remote-debug' switch.
15340
aef93bd7
DE
153412009-01-18 Doug Evans <dje@google.com>
15342
15343 * regcache.c (new_register_cache): No need to check result of xcalloc.
15344 * server.c (handle_search_memory): Back out calls to xmalloc,
15345 result is checked and error is returned to user upon failure.
15346 (handle_query): Ditto. Add more checks for result of malloc.
15347 (handle_v_cont): Check result of malloc, report error back to
15348 user upon failure.
15349 (handle_v_run): Ditto. Call freeargv.
15350 * server.h (freeargv): Declare.
15351 * utils.c (freeargv): New fn.
15352
54363045
DE
153532009-01-15 Doug Evans <dje@google.com>
15354
f626972c
DE
15355 * gdbreplay.c (perror_with_name): Make arg const char *.
15356 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15357 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15358 * utils.c (perror_with_name): Make arg const char *.
54363045 15359
18aae699
PA
153602009-01-14 Pedro Alves <pedro@codesourcery.com>
15361
15362 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15363 when handling a EXIT_PROCESS_DEBUG_EVENT.
15364
ff703abe
JB
153652009-01-06 Joel Brobecker <brobecker@adacore.com>
15366
15367 * gdbreplay.c (gdbreplay_version): Update copyright year.
15368 * server.c (gdbserver_version): Likewise.
15369
f21cc1a2 153702009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15371
15372 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15373 (handle_extended_wait): Improve comment.
0e21c1ec 15374
bca929d3
DE
153752008-12-13 Doug Evans <dje@google.com>
15376
15377 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15378 * server.h (ATTR_MALLOC): New macro.
15379 (xmalloc,xcalloc,xstrdup): Declare.
15380 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15381 * inferiors.c: Ditto.
15382 * linux-low.c: Ditto.
15383 * mem-break.c: Ditto.
15384 * regcache.c: Ditto.
15385 * remote-utils.c: Ditto.
15386 * server.c: Ditto.
15387 * target.c: Ditto.
15388 * win32-low.c: Ditto.
15389
97438e3f
DE
153902008-12-12 Doug Evans <dje@google.com>
15391
896c7fbb
DE
15392 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15393 in debugging printf.
15394
97438e3f
DE
15395 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15396
e3b886f8
DE
153972008-12-09 Doug Evans <dje@google.com>
15398
15399 * linux-low.h (struct process_info): Delete member tid, unused.
15400 * thread-db.c (find_one_thread): Update.
15401 (maybe_attach_thread): Update.
15402
07e059b5
VP
154032008-12-02 Pedro Alves <pedro@codesourcery.com>
15404
889bf7c5
PA
15405 * target.h (struct target_ops): Add qxfer_osdata member.
15406 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15407 and dirent.h.
15408 (linux_qxfer_osdata): New functions.
15409 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15410 callback.
15411 * server.c (handle_query): Handle "qXfer:osdata:read:".
15412 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15413 (buffer_xml_printf): New functions.
15414 * server.h (struct buffer): New.
15415 (buffer_grow_str, buffer_grow_str0): New macros.
15416 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15417 (buffer_xml_printf): Declare.
07e059b5 15418
4cab47ab
DE
154192008-11-24 Doug Evans <dje@google.com>
15420
15421 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15422
f142445f
DJ
154232008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15424
15425 * server.c (handle_v_run): Always use the supplied argument list.
15426
d0107bb6 154272008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15428
d0107bb6
BW
15429 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15430 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15431
2c4ad781
TJB
154322008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15433
15434 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15435 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15436 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15437 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15438 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15439 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15440 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15441 XML target descriptions.
15442 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15443 when inferior is running on an ISA 2.05 or later processor. Add
15444 special case to return offset for full 64-bit slot of FPSCR when
15445 in 32-bits.
15446
dfb64f85
DJ
154472008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15448
15449 * Makefile.in (SFILES, clean): Added sparc64 files.
15450 (reg-sparc64.o, reg-sparc64.c): New.
15451 * configure.srv (sparc*-*-linux*): New configuration.
15452 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15453 syscall arguments for SPARC.
15454 (regsets_store_inferior_registers): Likewise.
15455 * linux-sparc-low.c: New file.
15456
66b6e1dd
DE
154572008-10-21 Doug Evans <dje@google.com>
15458
15459 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15460 (READLINE_DIR,READLINE_DEP): Delete.
15461 (INTERNAL_CFLAGS): Update.
15462 (LINTFLAGS): Update.
15463
9b710a42
PA
154642008-10-10 Pedro Alves <pedro@codesourcery.com>
15465
15466 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15467 whole argv from the last run, not just argv[0].
15468
5822d809
PA
154692008-09-08 Pedro Alves <pedro@codesourcery.com>
15470
15471 * regcache.c (new_register_cache): Return NULL if the register
15472 cache size isn't known yet.
15473 (free_register_cache): Avoid dereferencing a NULL regcache.
15474
74aac56f
DJ
154752008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15476
15477 * configure.srv: Merge MIPS and MIPS64.
15478
400b20f5
MR
154792008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15480
15481 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15482
677c5bb1
LM
154832008-08-18 Luis Machado <luisgpm@br.ibm.com>
15484
15485 * Makefile.in: Add required vsx dependencies.
15486
15487 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15488 Declare init_registers_powerpc_vsx32l.
15489 Declare init_registers_powerpc_vsx64l.
15490 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15491 (ppc_arch_setup): Check for VSX in hwcap.
15492 (ppc_fill_vsxregset): New function.
15493 (ppc_store_vsxregset): New function.
15494 Add new VSX entry in regset_info target_regsets.
15495
15496 * configure.srv: Add new VSX dependencies.
15497
a6f3e723
SL
154982008-08-12 Pedro Alves <pedro@codesourcery.com>
15499
15500 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15501 (remote_open): Set or clear transport_is_reliable.
15502 (putpkt_binary): Don't expect acks in noack mode.
15503 (getpkt): Don't send ack/nac in noack mode.
15504 * server.c (handle_general_set): Handle QStartNoAckMode.
15505 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15506 qSupported.
15507 (main): Reset noack_mode on every connection.
15508 * server.h (noack_mode): Declare.
15509
a417dc56
RW
155102008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15511
15512 * Makefile.in (GDBREPLAY_OBS): New variable.
15513 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15514
3221518c
UW
155152008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15516 Daniel Jacobowitz <dan@codesourcery.com>
15517
15518 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15519 (usr_store_inferior_registers): Likewise.
15520 (regsets_store_inferior_registers): Likewise.
15521
ec56be1b
PA
155222008-07-31 Rolf Jansen <rj@surtec.com>
15523 Pedro Alves <pedro@codesourcery.com>
15524
15525 * configure.ac: Check for memmem declaration.
15526 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15527 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15528 (disable_packet_qfThreadInfo): Unconditionally compile.
15529 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15530 * configure, config.in: Regenerate.
15531
2fe5e3ff
DE
155322008-07-28 Doug Kwan <dougkwan@google.com>
15533
15534 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15535 (linux_write_memory): Remove declaration of errno.
15536
836acd6d
UW
155372008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15538
15539 * linux-low.c (handle_extended_wait): Do not use "status"
15540 variable uninitialized.
15541
aeba519e
PA
155422008-07-07 Pedro Alves <pedro@codesourcery.com>
15543
15544 * server.c (handle_v_attach): Inhibit reporting dll changes.
15545
db42f210
PA
155462008-06-27 Pedro Alves <pedro@codesourcery.com>
15547
15548 * remote-utils.c (prepare_resume_reply): If requested, don't
15549 output "thread:TID" in the T stop reply.
15550
15551 * server.c (disable_packet_vCont, disable_packet_Tthread)
15552 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15553 (handle_query): If requested, disable support for qC, qfThreadInfo
15554 and qsThreadInfo.
15555 (handle_v_requests): If requested, disable support for vCont.
15556 (gdbserver_show_disableable): New.
15557 (main): Handle --disable-packet and --disable-packet=LIST.
15558
15559 * server.h (disable_packet_vCont, disable_packet_Tthread)
15560 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15561
8e4c5421
CD
155622008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15563
15564 * server.c (gdbserver_usage): Mention --version.
15565
6e23a804
DJ
155662008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15567
15568 * Makefile.in (gdbreplay.o): New rule.
15569
90aa6a40
JM
155702008-06-06 Joseph Myers <joseph@codesourcery.com>
15571
15572 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15573 message, not gdbserver.
15574
c16158bc 155752008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15576 Nathan Sidwell <nathan@codesourcery.com>
15577 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15578
15579 * acinclude.m4: Include ../../config/acx.m4.
15580 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15581 * configure, config.in: Regenerate.
15582 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15583 * server.c (gdbserver_version): Print PKGVERSION.
15584 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15585 (main): Adjust gdbserver_usage calls.
15586 * gdbreplay.c (version, host_name): Add declarations.
15587 (gdbreplay_version, gdbreplay_usage): New.
15588 (main): Accept --version and --help options.
15589
aeb75bf5
DJ
155902008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15591
15592 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15593 (arm_breakpoint_at): Handle Thumb.
15594 (the_low_target): Add comment.
15595
76b233dd
UW
155962008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15597
15598 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15599
08388c79
DE
156002008-05-09 Doug Evans <dje@google.com>
15601
a3c83fae
DE
15602 * server.h (decode_search_memory_packet): Declare.
15603 * remote-utils.c (decode_search_memory_packet): New fn.
15604 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15605 (handle_search_memory): New fn.
15606 (handle_query): Process qSearch:memory packets.
15607
bb9c3d36
UW
156082008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15609
15610 * regcache.c (registers_length): Remove.
15611 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15612 full register packet.
15613 * regcache.h (registers_length): Remove prototype.
15614 * server.h (PBUFSIZ): Define to 16384.
15615
7284e1be
UW
156162008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15617
15618 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15619 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15620 powerpc-64l.o, and powerpc-altivec64l.o.
15621 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15622 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15623 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15624 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15625 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15626 to srv_xmlfiles.
15627
15628 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15629 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15630 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15631 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15632 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15633 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15634 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15635 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15636 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15637 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15638 (clean): Update.
15639
15640 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15641 (init_registers_powerpc_32l): ... this new prototype.
15642 (init_registers_powerpc_32): Remove, replace by ...
15643 (init_registers_powerpc_altivec32l): ... this new prototype.
15644 (init_registers_powerpc_e500): Remove, replace by ...
15645 (init_registers_powerpc_e500l): ... this new prototype.
15646 (init_registers_ppc64): Remove, replace by ...
15647 (init_registers_powerpc_64l): ... this new prototype.
15648 (init_registers_powerpc_64): Remove, replace by ...
15649 (init_registers_powerpc_altivec64l): ... this new prototype.
15650 (ppc_num_regs): Set to 73.
15651 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15652 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15653 (ppc_cannot_store_register): Handle orig_r3 and trap.
15654 (ppc_arch_setup): Update init_registers_... calls.
15655 (ppc_fill_gregset): Handle orig_r3 and trap.
15656
15657 * inferiors.c (clear_inferiors): Reset current_inferior.
15658
fdc59709
PB
156592008-04-23 Paolo Bonzini <bonzini@gnu.org>
15660
889bf7c5
PA
15661 * acinclude.m4: Add override.m4.
15662 * configure: Regenerate.
fdc59709 15663
c9b2f845
UW
156642008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15665
15666 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15667 initial call to init_register_ppc64.
15668
550512b8
UW
156692008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15670
43aaf8b6
PA
15671 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15672 single powerpc*-*-linux* case.
550512b8
UW
15673 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15674
b6430ec3
UW
156752008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15676
15677 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15678 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15679 from reg_xmlfiles.
15680 * linux-ppc-low.c: Include <elf.h>.
15681 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15682 (ppc_hwcap): New global variable.
15683 (ppc_regmap): Remove __SPE__ #ifdef sections.
15684 (ppc_regmap_e500): New global variable.
15685 (ppc_cannot_store_register): Update __SPE__ special case.
15686 (ppc_get_hwcap): New function.
15687 (ppc_arch_setup): Use it to determine whether inferior supports
15688 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15689 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15690 Do not access registers if target does not support AltiVec.
15691 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15692 Do not access registers if target does not support SPE.
15693 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15694
52fa2412
UW
156952008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15696
15697 * linux-low.c (disabled_regsets, num_regsets): New.
15698 (use_regsets_p): Delete.
15699 (linux_wait_for_process): Clear disabled_regsets.
15700 (regsets_fetch_inferior_registers): Check and set it.
15701 (regsets_store_inferior_registers): Likewise.
15702 (linux_fetch_registers, linux_store_registers): Do not use
15703 use_regsets_p.
15704 (initialize_low): Allocate disabled_regsets.
15705
e28b3332
DJ
157062008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15707
15708 * Makefile.in (LIBOBJS): New.
15709 (OBS): Use LIBOBJS.
15710 (memmem.o): New rule.
15711 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15712 * configure: Regenerated.
15713
4536995d
UW
157142008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15715
15716 * server.c (handle_query): Never return "unsupported" for
15717 qXfer:features:read queries.
15718
221c031f
UW
157192008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15720
15721 * server.c (get_features_xml): Fix inverted condition.
15722 (handle_query): Always support qXfer:feature:read.
15723
ccd213ac
DJ
157242008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15725
15726 * server.c (wrapper_argv): New.
15727 (start_inferior): Handle wrapper_argv. If set, expect an extra
15728 trap.
15729 (gdbserver_usage): Document --wrapper.
15730 (main): Parse --wrapper.
15731
6fe305f7
UW
157322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15733
15734 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15735 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15736 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15737 (ppc_set_pc): Likewise.
15738 (ppc_arch_setup): New function.
15739 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15740 of collect_register.
889bf7c5 15741 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15742
5b0a002e
UW
157432008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15744
15745 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15746 instead of linux-ppc64-low.o.
15747 * linux-ppc64-low.c: Remove file.
15748 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15749 (linux-ppc64-low.o): Remove rule.
15750
15751 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15752 (init_registers_powerpc_64): Likewise.
15753 (ppc_regmap): Conditionally define depending on __powerpc64__.
15754 (ppc_cannot_store_register): Do not special-case "fpscr" when
15755 compiled on __powerpc64__.
15756 (ppc_collect_ptrace_register): New function.
15757 (ppc_supply_ptrace_register): New function.
15758 (ppc_breakpoint): Change type to "unsigned int".
15759 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15760 (the_low_target): Conditionally provide initializers for the
889bf7c5 15761 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15762 collect_ptrace_register and supply_ptrace_register members.
15763
9b4b61c8
UW
157642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15765
15766 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15767 * server.c (gdbserver_xmltarget): Define.
15768 (get_features_xml): Use it to replace "target.xml" and arch_string.
15769
15770 * configure.srv: Remove srv_xmltarget. Add XML files that were
15771 mentioned there to srv_xmlfiles instead. Remove conditional tests
15772 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15773 srv_xmlfiles and srv_regobj to include all possible choices.
15774 * configure.ac (srv_xmltarget): Remove.
15775 (srv_xmlfiles): Do not add "target.xml".
15776 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15777 checks for supplementary target information.
15778 * configure: Regenerate.
15779 * Makefile.in (XML_TARGET): Remove.
15780 (target.xml): Remove rule.
15781 (clean): Do not clean up target.xml.
15782 (.PRECIOUS): Do not mention target.xml.
15783
15784 * target.h (struct target_ops): Remove arch_string member.
15785 * linux-low.c (linux_arch_string): Remove.
15786 (linux_target_ops): Remove arch_string initializer.
15787 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15788 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15789 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15790 * spu-low.c (spu_arch_string): Remove.
15791 (spu_target_ops): Remove arch_string initializer.
15792 * win32-low.c (win32_arch_string): Remove.
15793 (win32_target_ops): Remove arch_string initializer.
15794 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15795 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15796 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15797
ee1a7ae4
UW
157982008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15799
15800 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15801 by collect_ptrace_register and supply_ptrace_register hooks.
15802 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15803 instead of checking for the_low_target.left_pad_xfer.
15804 (usr_store_inferior_registers): Use collect_ptrace_register callback
15805 instead of checking for the_low_target.left_pad_xfer.
15806
15807 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15808 (s390_supply_ptrace_register): Likewise.
15809 (s390_fill_gregset): Call s390_collect_ptrace_register.
15810 (the_low_target): Update.
15811
15812 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15813 (ppc_supply_ptrace_register): Likewise.
15814 (the_low_target): Update.
15815
15816 * linux-i386-low.c (the_low_target): Update.
15817 * linux-x86-64-low.c (the_low_target): Update.
15818
d61ddec4
UW
158192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15820
15821 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15822 reg-s390.o and reg-s390x.o.
15823
15824 * linux-low.c (new_inferior): New global variable.
15825 (linux_create_inferior, linux_attach): Set it.
15826 (linux_wait_for_process): Call the_low_target.arch_setup after the
15827 target has stopped for the first time.
15828 (initialize_low): Do not call the_low_target.arch_setup.
15829
15830 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15831 (s390_set_pc): Likewise.
15832 (s390_arch_setup): New function.
15833 (the_low_target): Use s390_arch_setup as arch_setup routine.
15834
15835 * regcache.c (realloc_register_cache): New function.
15836 (set_register_cache): Call it for each existing regcache.
15837
d05b4ac3
UW
158382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15839
15840 * server.h (init_registers): Remove prototype.
15841
15842 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15843 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15844 instead of init_registers ().
15845 * linux-arm-low.c (init_registers_arm): Add prototype.
15846 (init_registers_arm_with_iwmmxt): Likewise.
15847 (the_low_target): Add initializer for arch_setup field.
15848 * linux-cris-low.c (init_registers_cris): Add prototype.
15849 (the_low_target): Add initializer for arch_setup field.
15850 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15851 (the_low_target): Add initializer for arch_setup field.
15852 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15853 (the_low_target): Add initializer for arch_setup field.
15854 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15855 (the_low_target): Add initializer for arch_setup field.
15856 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15857 (the_low_target): Add initializer for arch_setup field.
15858 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15859 (the_low_target): Add initializer for arch_setup field.
15860 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15861 (init_registers_mips64_linux): Likewise.
15862 (the_low_target): Add initializer for arch_setup field.
15863 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15864 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15865 (the_low_target): Add initializer for arch_setup field.
15866 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15867 (init_registers_powerpc_64): Likewise.
15868 (the_low_target): Add initializer for arch_setup field.
15869 * linux-s390-low.c (init_registers_s390): Add prototype.
15870 (init_registers_s390x): Likewise.
15871 (the_low_target): Add initializer for arch_setup field.
15872 * linux-sh-low.c (init_registers_sh): Add prototype.
15873 (the_low_target): Add initializer for arch_setup field.
15874 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15875 (the_low_target): Add initializer for arch_setup field.
15876 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15877 (the_low_target): Add initializer for arch_setup field.
15878
15879 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15880 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15881 instead of init_registers ().
15882 * win32-arm-low.c (init_registers_arm): Add prototype.
15883 (the_low_target): Add initializer for arch_setup field.
15884 * win32-i386-low.c (init_registers_i386): Add prototype.
15885 (the_low_target): Add initializer for arch_setup field.
15886
15887 * spu-low.c (init_registers_spu): Add prototype.
15888 (initialize_low): Call initialie_registers_spu () instead of
15889 initialize_registers ().
15890
fd96d250
PA
158912008-02-19 Pedro Alves <pedro@codesourcery.com>
15892
15893 * server.c (handle_v_requests): When handling the vRun and vAttach
15894 packets, if already debugging a process, don't kill it. Return an
15895 error instead.
15896
d41b6bb4
DJ
158972008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15898
15899 * server.c (handle_query): Correct length check.
15900
5ac588cf
PA
159012008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15902
15903 * win32-low.c (do_initial_child_stuff): Add process handle
15904 parameter. Set current_process_handle and current_process_id from the
15905 parameters. Clear globals.
15906 (win32_create_inferior): Don't set current_process_handle and
15907 current_process_id here. Instead pass them on the call to
15908 do_initial_child_stuff.
15909 (win32_attach): Likewise.
15910 (win32_clear_inferiors): New.
15911 (win32_kill): Don't close the current process handle or the
15912 current thread handle here. Instead call win32_clear_inferiors.
15913 (win32_detach): Don't open a new handle to the process. Call
15914 win32_clear_inferiors.
15915 (win32_join): Don't rely on current_process_handle; open a new
15916 handle using the process id.
15917 (win32_wait): Call win32_clear_inferiors when the inferior process
15918 has exited.
15919
ecd7ecbc
DJ
159202008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15921
15922 * server.c (monitor_show_help): Add "exit".
15923
1525d545
MG
159242008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15925
ecd7ecbc 15926 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15927 (clean): Add reg-xtensa.c.
15928 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15929 * configure.srv (xtensa*-*-linux*) New target.
15930 * linux-xtensa-low.c: New.
15931 * xtensa-xtregs.c: New.
1525d545 15932
59a016f0
PA
159332008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15934
15935 * hostio.c: Don't include errno.h.
15936 (errno_to_fileio_errno): Move to hostio-errno.
15937 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15938 error number outputting to the target->hostio_last_error callback.
15939 (hostio_packet_error): Use FILEIO_EINVAL directly.
15940 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15941 calls to hostio_error.
15942 * hostio-errno.c: New.
15943 * server.h (hostio_last_error_from_errno): Declare.
15944 * target.h (target_ops): Add hostio_last_error member.
15945 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15946 as hostio_last_error handler.
889bf7c5 15947 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15948 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15949 (wince_hostio_last_error): New functions.
15950 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15951 as hostio_last_error handler.
15952 (win32_target_ops) [!_WIN32_WCE]: Register
15953 hostio_last_error_from_errno as hostio_last_error handler.
15954 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15955 (hostio-errno.o): New rule.
15956 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15957 * configure.srv (srv_hostio_err_objs): New variable. Default to
15958 hostio-errno.o.
15959 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15960 * configure: Regenerate.
15961
2d717e4f
DJ
159622008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15963
15964 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15965 (linux_kill, linux_detach): Clean up the process list.
15966 * remote-utils.c (remote_open): Improve port number parsing.
15967 (putpkt_binary, input_interrupt): Only send interrupts if the target
15968 is running.
15969 * server.c (extended_protocol): Make static.
15970 (attached): Define earlier.
15971 (exit_requested, response_needed, program_argv): New variables.
15972 (target_running): New.
15973 (start_inferior): Clear attached here.
15974 (attach_inferior): Set attached here.
15975 (require_running): Define.
15976 (handle_query): Use require_running and target_running. Implement
15977 "monitor exit".
15978 (handle_v_attach, handle_v_run): New.
15979 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15980 (gdbserver_usage): Update.
15981 (main): Redo argument parsing. Handle --debug and --multi. Handle
15982 --attach along with other options or after the port. Save
15983 program_argv. Support no initial program. Resynchronize
15984 communication with GDB after an error. Handle "monitor exit".
15985 Use require_running and target_running. Always allow the extended
15986 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15987 restart in extended mode.
15988 * README: Refer to the GDB manual. Update --attach usage.
15989
7407e2de
AS
159902007-12-20 Andreas Schwab <schwab@suse.de>
15991
15992 * linux-low.c (STACK_SIZE): Define.
15993 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15994 (linux_test_for_tracefork): Likewise.
15995
b65d95c5
DJ
159962007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15997
15998 * linux-low.c (linux_wait_for_event): Update messages. Do not
15999 reinsert auto-delete breakpoints.
16000 * mem-break.c (struct breakpoint): Change return type of handler to
16001 int.
16002 (set_breakpoint_at): Update handler type.
16003 (reinsert_breakpoint_handler): Return 1 instead of calling
16004 delete_breakpoint.
16005 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16006 setting a new one.
16007 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16008 * mem-break.h (set_breakpoint_at): Update handler type.
16009 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16010 * win32-low.c (auto_delete_breakpoint): New.
16011 (get_child_debug_event): Use it.
16012
4e799345
DJ
160132007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16014
16015 * configure.ac: Check for pread and pwrite.
16016 * hostio.c (handle_pread): Fall back to lseek and read.
16017 (handle_pwrite): Fall back to lseek and write.
16018 * config.in, configure: Regenerated.
16019
27524b67
DJ
160202007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16021
16022 * server.c (myresume): Add own_buf argument.
16023 (main): Update calls.
16024
a20d5e98
DJ
160252007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16026
16027 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16028 * remote-utils.c (remote_open): Do not call disable_async_io.
16029 (block_async_io): Delete.
16030 (unblock_async_io): Make static.
16031 (initialize_async_io): New.
16032 * server.c (handle_v_cont): Handle async I/O here.
16033 (myresume): Likewise. Move other common resume tasks here...
16034 (main): ... from here. Call initialize_async_io. Disable async
16035 I/O before the main loop.
16036 * server.h (initialize_async_io): Declare.
16037 (block_async_io, unblock_async_io): Delete prototypes.
16038 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16039
b79d787e
DJ
160402007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16041
16042 * remote-utils.c (readchar): Allow binary data in received messages.
16043
d97903b2
PA
160442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16045
16046 * win32-low.c (attaching): New global.
16047 (win32_create_inferior): Clear the `attaching' global.
16048 (win32_attach): Set the `attaching' global.
16049 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16050 attaching. Only set a breakpoint at the entry point if not
16051 attaching.
16052
311de423
PA
160532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16054
16055 * server.c (main): Don't report dll events on the initial
16056 connection on attaches.
16057
6c2d16d2
PA
160582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16059
16060 * server.c (main): Relax numerical bases supported for the pid of
16061 the --attach command line argument.
16062
5ca906e6
PA
160632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16064
16065 * win32-low.c (win32_attach): Call OpenProcess before
16066 DebugActiveProcess, not after. Add last error output to error
16067 call.
16068
9c6c8194
PA
160692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16070
16071 * win32-low.c (win32_get_thread_context)
16072 (win32_set_thread_context): New functions.
16073 (thread_rec): Use win32_get_thread_context.
16074 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16075 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16076 field.
16077
4d5d1aaa
PA
160782007-12-03 Leo Zayas
16079 Pedro Alves <pedro_alves@portugalmail.pt>
16080
16081 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16082 global variables.
16083 (child_add_thread): Minor cleanup.
16084 (child_continue): Resume artificially suspended threads before
16085 calling ContinueDebugEvent.
16086 (suspend_one_thread): New.
16087 (fake_breakpoint_event): New.
16088 (get_child_debug_event): Change return type to int. Check here if
16089 gdb sent an interrupt request. If a soft interrupt was requested,
16090 fake a breakpoint event. Return 0 if there is no event to handle,
16091 and 1 otherwise.
16092 (win32_wait): Don't check here if gdb sent an interrupt request.
16093 Ensure there is a valid event to handle.
16094 (win32_request_interrupt): Add soft interruption method as last
16095 resort.
16096
c436e841
PA
160972007-12-03 Leo Zayas
16098 Pedro Alves <pedro_alves@portugalmail.pt>
16099
16100 * win32-low.h (win32_thread_info): Add descriptions to the
16101 structure members. Replace `suspend_count' counter by a
16102 `suspended' flag.
16103 * win32-low.c (thread_rec): Update condition of when to get the
16104 context from the inferior. Rely on ContextFlags being set if it
16105 has already been retrieved. Only suspend the inferior thread if
16106 we haven't already. Warn if that fails.
16107 (continue_one_thread): s/suspend_count/suspended/. Only call
16108 ResumeThread once. Warn if that fails.
16109
e7b5fa67
PA
161102007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16111
16112 * win32-low.c (win32_wait): Don't read from the inferior when it
16113 has already exited.
16114
a385171d
PA
161152007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16116
16117 * Makefile.in (win32_low_h): New variable.
16118 (win32-low.o): Add dependency on $(win32_low_h).
16119 (win32-arm-low.o, win32-i386-low.o): New rules.
16120
f80c84b3
DJ
161212007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16122
16123 * hostio.c: Correct copyright year.
16124
a6b151f1
DJ
161252007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16126
16127 * Makefile.in (OBS): Add hostio.o.
16128 (hostio.o): New rule.
16129 * server.h (handle_vFile): Declare.
16130 * hostio.c: New file.
16131 * server.c (handle_v_requests): Take packet_len and new_packet_len
16132 for binary packets. Call handle_vFile.
16133 (main): Update call to handle_v_requests.
16134
f9387fc3
DJ
161352007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16136
16137 * linux-low.c: Include <sched.h>.
16138
51c2684e
DJ
161392007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16140
16141 * linux-low.c (linux_tracefork_grandchild): New.
16142 (linux_tracefork_child): Use clone.
16143 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16144
75f83163
JB
161452007-10-31 Joel Brobecker <brobecker@adacore.com>
16146
16147 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16148
da5898ce
DJ
161492007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16150
16151 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16152
24a09b5f
DJ
161532007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16154
16155 * inferiors.c (change_inferior_id): Delete.
16156 (add_pid_to_list, pull_pid_from_list): New.
16157 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16158 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16159 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16160 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16161 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16162 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16163 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16164 (using_threads): Always set to 1.
16165 (handle_extended_wait): New.
16166 (add_process): Do not set TID.
16167 (linux_create_inferior): Set must_set_ptrace_flags.
16168 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16169 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16170 (linux_thread_alive): Rename TID argument to LWPID.
16171 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16172 (linux_wait_for_event): Do not use TID or check using_threads. Update
16173 call to dead_thread_notify. Call handle_extended_wait.
16174 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16175 (send_sigstop): Delete sigstop_sent.
16176 (wait_for_sigstop): Avoid TID.
16177 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16178 (linux_test_for_tracefork): New.
16179 (linux_lookup_signals): Use thread_db_active and
16180 linux_supports_tracefork_flag.
16181 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16182 * linux-low.h (get_process_thread): Avoid TID.
16183 (struct process_ifo): Move thread_known and tid to the end. Remove
16184 sigstop_sent.
16185 (linux_attach_lwp, thread_db_init): Update prototypes.
16186 * server.h (change_inferior_id): Delete prototype.
16187 (add_pid_to_list, pull_pid_from_list): New prototypes.
16188 * thread-db.c (thread_db_use_events): New.
16189 (find_first_thread): Rename to...
16190 (find_one_thread): ...this. Update callers and messages. Do not
16191 call fatal. Check thread_db_use_events. Do not call
16192 change_inferior_id or new_thread_notify.
16193 (maybe_attach_thread): Update. Do not call new_thread_notify.
16194 (thread_db_init): Set thread_db_use_events. Check use_events.
16195 * utils.c (fatal, warning): Correct message prefix.
16196
30ed0a8f
DJ
161972007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16198
16199 * Makefile.in (clean): Remove new files.
16200 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16201 (powerpc-64.o, powerpc-64.c): New rules.
16202 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16203 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16204 with SPE.
16205 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16206 SPE targets.
16207 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16208 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16209 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16210 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16211 (target_regsets): Add AltiVec and SPE register sets.
16212 * configure.ac: Check for AltiVec and SPE.
16213 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16214 (ppc_fill_vrregset, ppc_store_vrregset): New.
16215 (target_regsets): Add AltiVec register set.
16216 * configure: Regenerated.
16217
fd462a61
DJ
162182007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16219
16220 * linux-low.c (O_LARGEFILE): Define.
16221 (linux_read_memory): Use /proc/PID/mem.
16222 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16223 * configure, config.in: Regenerated.
16224
69f223ed
DJ
162252007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16226
16227 * linux-low.c (linux_wait_for_event): Do not pass signals while
16228 single-stepping.
16229
aec18585
PA
162302007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16231
16232 * win32-low.c (create_process): New.
16233 (win32_create_inferior): Use create_process instead of
16234 CreateProcess. If create_process failed retry appending an ".exe"
16235 suffix. Store the GetLastError result immediatelly after
16236 create_process calls and use it on the call to error.
16237
34d86ddd
PA
162382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16239
16240 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16241
5a0e3bd0
JB
162422007-08-23 Joel Brobecker <brobecker@adacore.com>
16243
16244 * configure.ac: Switch license to GPLv3.
16245
f88c79e6
MS
162462007-08-01 Michael Snyder <msnyder@access-company.com>
16247
16248 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16249
6b3d9b83
PA
162502007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16251
16252 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16253 typedef.
16254 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16255 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16256 CloseToolhelp32Snapshot.
16257 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16258 CloseToolhelp32Snapshot.
16259
c588c53c
MS
162602007-07-27 Michael Snyder <michael.snyder@access-company.com>
16261
16262 * server.c (main): Check for inferior exit before main loop.
16263
aa0403d9
PA
162642007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16265
16266 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16267 instead of on tmp_desc.
16268
255e7678
DJ
162692007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16270 Daniel Jacobowitz <dan@codesourcery.com>
16271
16272 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16273 (add_thread): Minor cleanups.
16274 (clear_inferiors): Move lower in the file. Clear the DLL
16275 list.
16276 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16277 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16278 (xml_escape_text): New.
16279 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16280 for qSupported.
16281 (handle_v_cont): Report errors.
16282 (gdbserver_version): Update.
16283 (main): Correct size of own_buf. Do not report initial DLL events.
16284 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16285 (unloaded_dll, xml_escape_text): New.
16286 * win32-low.c (enum target_waitkind): Update comments.
16287 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16288 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16289 (win32_EnumProcessModules, win32_GetModuleInformation)
16290 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16291 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16292 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16293 (win32_Module32First, win32_Module32Next, load_toolhelp)
16294 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16295 (get_child_debug_event): Handle DLL events.
16296 (win32_wait): Likewise.
16297
0d37add9
DJ
162982007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16299
16300 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16301 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16302
45e2715e
PA
163032007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16304
16305 * win32-low.c (handle_output_debug_string): Ignore event if not
16306 waiting.
16307
c5674cf1
PA
163082007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16309
16310 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16311
2bbe3cc1
DJ
163122007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16313
16314 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16315
ae13219e
DJ
163162007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16317
16318 * inferiors.c (change_inferior_id): Add comment.
16319 * linux-low.c (check_removed_breakpoint): Add an early
16320 prototype. Improve debug output.
16321 (linux_attach): Doc update.
16322 (linux_detach_one_process, linux_detach): Clean up before releasing
16323 each process.
16324 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16325 * linux-low.h (struct process_info): Doc improvement.
16326 * mem-break.c (delete_all_breakpoints): New.
16327 * mem-break.h (delete_all_breakpoints): New prototype.
16328 * thread-db.c (find_first_thread): New.
16329 (thread_db_create_event): Call it instead of
16330 thread_db_find_new_threads. Clean up unused variables.
16331 (maybe_attach_thread): Remove first thread handling.
16332 (thread_db_find_new_threads): Use find_first_thread.
16333 (thread_db_get_tls_address): Likewise.
16334
4105de34
DJ
163352007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16336
16337 * thread-db.c (thread_db_find_new_threads): Add prototype.
16338 (thread_db_create_event): Check for the main thread before adding
16339 a new thread.
16340 (maybe_attach_thread): Only enable event reporting if TID == 0.
16341 (thread_db_get_tls_address): Check for new threads.
16342
2b876972
DJ
163432007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16344
16345 * linux-low.c (linux_create_inferior): Try execv before execvp.
16346 * spu-low.c (spu_create_inferior): Likewise.
16347
7a245884
DJ
163482007-06-13 Mike Frysinger <vapier@gentoo.org>
16349
16350 * linux-low.c (linux_create_inferior): Change execv to execvp.
16351 * spu-low.c (spu_create_inferior): Likewies.
16352
117ce543
DJ
163532007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16354
16355 * Makefile.in (clean): Clean new files instead of deleted ones.
16356 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16357 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16358 rules.
16359 * configure.srv: Specify XML files and new regformats for MIPS and
16360 MIPS64 GNU/Linux.
16361 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16362 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16363 an entry for the restart register.
16364 (mips_cannot_fetch_register, mips_cannot_store_register)
16365 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16366 register names to match the XML descriptions.
16367 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16368 restart register instead of $0.
16369
0e7f50da
UW
163702007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16371 Markus Deuling <deuling@de.ibm.com>
16372
16373 * remote-utils.c (decode_xfer_write): New function.
16374 * server.h (decode_xfer_write): Add prototype.
16375 * server.c (handle_query): Add PACKET_LEN argument. Support
16376 qXfer:spu:read and qXfer:spu:write packets.
16377 (main): Pass packet_len to handle_query.
16378 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16379 * target.h (target_ops): Add qxfer_spu.
16380
374c1d38
UW
163812007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16382
16383 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16384 accessing non-seekable spufs files.
16385
bb63802a
UW
163862007-05-16 Markus Deuling <deuling@de.ibm.com>
16387
889bf7c5 16388 * server.c (handle_query): Add reply for qC packet.
bb63802a 16389
7390519e
PA
163902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16391 Leo Zayas <lerele@champenstudios@com>
16392
16393 * server.h (check_remote_input_interrupt_request): New function.
16394 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16395 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16396 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16397 (check_remote_input_interrupt_request): New function.
16398 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16399 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16400 winapi_GenerateConsoleCtrlEvent): New typedefs.
16401 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16402 to 250 ms.
16403 (win32_wait): Check for remote interrupt request
16404 with check_remote_input_interrupt_request.
16405 (win32_request_interrupt): New function.
16406 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16407
34b34921
PA
164082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16409
16410 * win32-low.c (debug_registers_changed,
16411 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16412 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16413 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16414 (thread_rec): Get context using the low target.
16415 (child_add_thread): Call thread_added on the low target,
16416 which does the same thing.
16417 (regptr): Delete.
16418 (do_initial_child_stuff): Remove debug registers references.
16419 Set context using the low target. Resume threads after
16420 setting the contexts.
16421 (child_continue): Remove dead variable. Remove debug
16422 registers references.
16423 (child_fetch_inferior_registers): Go through the low target.
16424 (do_child_store_inferior_registers): Remove.
16425 (child_store_inferior_registers): Go through the low target.
16426 (win32_resume): Remove debug registers references.
16427 Set context using the low target.
16428 (handle_exception): Change return type to void. Don't record
16429 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16430 first chance exception.
889bf7c5 16431 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16432 goto loop. Always return after waiting for debug event.
16433 (win32_wait): Convert to switch statement. Handle spurious
16434 events.
16435
16436 * win32-i386-low.c (debug_registers_changed,
16437 debug_registers_used): New.
16438 (initial_stuff): Rename to ...
16439 (i386_initial_stuff): ... this. Clear debug registers
16440 state variables.
16441 (store_debug_registers): Delete.
16442 (i386_get_thread_context): New.
16443 (load_debug_registers): Delete.
16444 (i386_set_thread_context): New.
16445 (i386_thread_added): New.
16446 (single_step): Rename to ...
16447 (i386_single_step): ... this.
16448 (do_fetch_inferior_registers): Rename to ...
16449 (i386_fetch_inferior_register): ... this.
16450 (i386_store_inferior_register): New.
16451 (the_low_target): Adapt to new interface.
16452
16453 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16454 (arm_get_thread_context): New.
16455 (arm_set_thread_context): New.
16456 (regptr): New.
16457 (do_fetch_inferior_registers): Rename to ...
16458 (arm_fetch_inferior_register): ... this.
16459 (arm_store_inferior_register): New.
16460 (arm_wince_breakpoint): Reimplement as unsigned long.
16461 (arm_wince_breakpoint_len): Define.
16462 (the_low_target): Adapt to new interface.
16463
16464 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16465 load_debug_registers. Add get_thread_context, set_thread_context,
16466 thread_added and store_inferior_register. Rename
16467 fetch_inferior_registers to fetch_inferior_register.
16468 (regptr): Remove declaration.
16469
dd6953e1
PA
164702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16471
16472 * linux-low.c (linux_detach): Change return type to int. Return 0.
16473 * spu-low.c (spu_detach): Likewise.
16474
444d6139
PA
164752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16476
16477 * target.h (target_ops): Change return type of detach to int.
16478 Add join.
16479 (join_inferior): New.
16480 * server.c (main): Don't skip detach support on mingw32.
16481 If the inferior doesn't support detaching return error.
16482 Call join_inferior instead of using waitpid.
16483 * linux-low.c (linux_join): New.
16484 (linux_target_op): Add linux_join.
16485 * spu-low.c (spu_join): New.
16486 (spu_target_ops): Add spu_join.
16487 * win32-low.c (win32_detach): Adapt to new interface.
16488 Reopen current_process_handle before detaching. Issue a child
16489 resume before detaching.
16490 (win32_join): New.
16491 (win32_target_op): Add win32_join.
16492
1d5315fe
PA
164932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16494
16495 * win32-low.c (win32-attach): Fix return value.
16496 * target.h (target_ops): Describe ATTACH return values.
16497
bf914831
PA
164982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16499
16500 * win32-low.c (GETPROCADDRESS): Define.
16501 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16502 (winapi_DebugSetProcessKillOnExit): Likewise.
16503 (win32_create_inferior): Force usage of ansi CreateProcessA.
16504 (win32_attach): Use GETPROCADDRESS.
16505 (win32_detach): Likewise.
16506
f72f3e60
PA
165072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16508
16509 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16510
ed50f18f
PA
165112007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16512
16513 * win32-low.c: Commit leftover changes from 2007-03-29.
16514
0c2ead7e
DJ
165152007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16516
16517 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16518 fields short instead of int. Add explicit padding.
16519 (i387_cache_to_fsave): Remove unnecessary casts.
16520 (i387_fsave_to_cache): Doc fix.
16521 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16522
73725ff3
DJ
165232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16524
16525 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16526 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16527
d99f33d8
PA
165282007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16529
16530 * configure.srv (arm*-*-mingw32ce*): Move near the other
16531 arm targets.
16532
68070c10
PA
165332007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16534
2482afc6 16535 * configure.ac: Add errno checking.
68070c10
PA
16536 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16537 sys/file.h and malloc.h.
16538 (AC_CHECK_DECLS): Add perror.
16539 (srv_mingwce): Handle.
2482afc6 16540 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16541 win32-i386-low.o to srv_tgtobj.
16542 (i[34567]86-*-mingw*): Likewise.
16543 (arm*-*-mingw32ce*): Add case.
16544 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16545 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16546 [__MINGW32CE__] (strerror): New function.
16547 [__MINGW32CE__] (errno): Define to GetLastError.
16548 [__MINGW32CE__] (COUNTOF): New macro.
16549 (remote_open): Remove extra close call.
16550 * mem-break.c (delete_breakpoint_at): New function.
16551 * mem-break.h (delete_breakpoint_at): Declare.
16552 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16553 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16554 [USE_WIN32API] (read, write): Add char* casts.
16555 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16556 * server.h: Include wincecompat.h on Windows CE.
16557 [HAVE_ERRNO_H]: Check.
16558 (perror): Declare if not declared.
16559 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16560 (perror_with_name): Remove errno declaration.
16561 * wincecompat.h: New.
16562 * wincecompat.c: New.
16563 * win32-low.h: New.
16564 * win32-arm-low.c: New.
16565 * win32-i386-low.c: New.
16566 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16567 (OUTMSG2): Make it safe.
16568 (_T): New macro.
16569 (COUNTOF): New macro.
16570 (NUM_REGS): Get it from the low target.
16571 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16572 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16573 (thread_rec): Let low target handle debug registers.
16574 (child_add_thread): Likewise.
16575 (child_init_thread_list): Likewise.
16576 (continue_one_thread): Likewise.
16577 (regptr): New.
16578 (do_child_fetch_inferior_registers): Move to ...
16579 * win32-i386-low.c: ... here, and rename to ...
16580 (do_fetch_inferior_registers): ... this.
889bf7c5 16581 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16582 Go through the low target.
16583 (do_child_store_inferior_registers): Use regptr.
16584 (strwinerror): New function.
16585 (win32_create_inferior): Handle Windows CE.
16586 Use strwinerror instead of strerror on Windows error
16587 codes. Add program to the error output.
16588 Don't close the main thread handle on Windows CE.
16589 (win32_attach): Use coredll.dll on Windows CE.
16590 (win32_kill): Close current process and current
16591 thread handles.
16592 (win32_detach): Use coredll.dll on Windows CE.
16593 (win32_resume): Let low target handle debug registers, and
16594 step request.
16595 (handle_exception): Add/Remove initial breakpoint. Avoid
16596 non-existant WSTOPSIG on Windows CE.
16597 (win32_read_inferior_memory): Cast to remove warning.
16598 (win32_arch_string): Go through the low target.
16599 (initialize_low): Call set_breakpoint_data with the low
16600 target's breakpoint.
16601 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16602 FOP_REGNUM, mappings): Move to ...
16603 * win32-i386-low.c: ... here.
16604 * win32-low.c (win32_thread_info): Move to ...
16605 * win32-low.h: ... here.
16606 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16607 win32-arm-low.c and wincecompat.c.
16608 (all:): Add $EXEEXT.
16609 (install-only:): Likewise.
16610 (gdbserver:): Likewise.
16611 (gdbreplay:): Likewise.
16612 * config.in: Regenerate.
16613 * configure: Regenerate.
16614
41093d81
PA
166152007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16616
16617 * win32-low.c: Rename typedef thread_info to
16618 win32_thread_info throughout.
16619
544afa54
PA
166202007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16621
16622 * win32-i386-low.c: Rename to ...
16623 * win32-low.c: ... this.
16624 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16625 * Makefile.in: Likewise.
16626
bce7165d
PA
166272007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16628
16629 * remote-utils.c (monitor_output): Constify msg parameter.
16630 * server.h (monitor_output): Likewise.
16631 * win32-i386-low.c (handle_output_debug_string): New.
16632 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16633 handle_output_debug_string.
16634 (get_child_debug_event): Likewise.
16635
506c7aa0
DJ
166362007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16637
16638 * server.c (main): Correct strtoul check.
16639
42c81e2a
DJ
166402007-03-27 Jon Ringle <jon@ringle.org>
16641
16642 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16643
9453113a
DJ
166442007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16645
16646 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16647
64a69107
DJ
166482007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16649
16650 * terminal.h: Check HAVE_SGTTY_H.
16651
166522007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16653
16654 * remote-utils.c (remote_open): Print out the assigned port number.
16655
c74d0ad8
DJ
166562007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16657
16658 * remote-utils.c (monitor_output): New function.
16659 * server.c (debug_threads): Define here.
16660 (monitor_show_help): New function.
16661 (handle_query): Handle qRcmd.
16662 (main): Do not handle 'd' packet.
16663 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16664 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16665 of debug_threads.
16666
de7c3b4a
PA
166672007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16668
16669 * Makefile.in (EXEEXT): New.
16670 (clean): Use $(EXEEXT).
16671
ef57601b
PA
166722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16673
16674 * target.h (target_ops): Rename send_signal to request_interrupt,
16675 and remove enum target_signal parameter.
16676 * linux-low.c (linux_request_interrupt): Rename from
16677 linux_send_signal, and always send SIGINT.
16678 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16679 and always send SIGINT.
16680 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16681 of send_signal.
16682 (input_interrupt): Likewise.
16683
820f2bda
PA
166842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16685
16686 * server.c (get_features_xml): Check if target implemented
16687 arch_string.
16688 * win32-i386-low.c (win32_arch_string): New.
16689 (win32_target_ops): Add win32_arch_string as arch_string member.
16690
ab39bf24
UW
166912007-02-22 Markus Deuling <deuling@de.ibm.com>
16692
16693 * spu-low.c (spu_arch_string): New.
16694 (spu_target_ops): Add spu_arch_string.
16695
61ff6e04
DJ
166962007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16697
16698 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16699 * configure.ac: Do not check for terminal.h.
16700 * configure, config.in: Regenerated.
16701
fb1e4ffc
DJ
167022007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16703
16704 * Makefile.in (OBS): Add $(XML_BUILTIN).
16705 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16706 (clean): Update.
16707 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16708 (arm-with-iwmmxt.c): New.
16709 * config.in, configure: Regenerate.
16710 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16711 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16712 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16713 (arm*-*-linux*): Add iWMMXt and regset support.
16714 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16715 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16716 (arm_store_wmmxregset, target_regsets): New.
16717 * server.c (get_features_xml): Take annex argument. Check builtin
16718 XML documents.
16719 (handle_query): Handle multiple annexes.
16720
0f48aa01
DJ
167212007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16722
16723 * remote-utils.c [USE_WIN32API] (read, write): Define.
16724 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16725 write.
16726
23181151
DJ
167272007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16728
16729 * linux-i386-low.c (the_low_target): Set arch_string.
16730 * linux-x86-64-low.c (the_low_target): Likewise.
16731 * linux-low.c (linux_arch_string): New.
16732 (linux_target_ops): Add it.
16733 * linux-low.h (struct linux_target_ops): Add arch_string.
16734 * server.c (write_qxfer_response): Use const void * for DATA.
16735 (get_features_xml): New.
16736 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16737 * target.h (struct target_ops): Add arch_string method.
16738
9d606399
DJ
167392007-01-03 Denis Pilat <denis.pilat@st.com>
16740 Daniel Jacobowitz <dan@codesourcery.com>
16741
16742 * linux-low.c (linux_kill): Handle being called with no threads.
16743 * win32-i386-low.c (win32_kill): Likewise.
16744 (get_child_debug_event): Clear current_process_handle.
16745
167462006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16747 Daniel Jacobowitz <dan@codesourcery.com>
16748
16749 * remote-utils.c (remote_open): Check the type of specified
16750 serial port devices before opening them.
16751 * server.c (main): Kill the inferior if an error occurs during
16752 the first remote_open.
16753
a5e13d24
DJ
167542006-12-05 Markus Deuling <deuling@de.ibm.com>
16755
16756 * README: Update supported targets.
16757
186947f7
DJ
167582006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16759
16760 * Makefile.in (clean): Remove reg-mips64.c.
16761 (reg-mips64.c, reg-mips64.o): New rules.
16762 * configure.srv: Handle mips64. Include regset support for mips.
16763 * linux-mips-low.c (union mips_register): New.
16764 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16765 (mips_breakpoint, mips_breakpoint_at): Use int.
16766 (mips_collect_register, mips_supply_register)
16767 (mips_collect_register_32bit, mips_supply_register_32bit)
16768 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16769 (mips_store_fpregset, target_regsets): New.
16770 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16771
a13e2c95
UW
167722006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16773
16774 * configure.srv: Add target "spu*-*-*".
16775 * Makefile.in (clean): Remove reg-spu.c.
16776 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16777 * spu-low.c: New file.
16778
cb7283db
DJ
167792006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16780
16781 * configure.ac: Correct td_thr_tls_get_addr test.
16782 * configure: Regenerated.
16783
89be2091
DJ
167842006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16785
16786 * linux-low.c (linux_wait_for_event): Reformat. Use the
16787 pass_signals array.
16788 * remote-utils.c (decode_address_to_semicolon): New.
16789 * server.c (pass_signals, handle_general_set): New.
16790 (handle_query): Mention QPassSignals for qSupported.
16791 (main): Call handle_general_set.
16792 * server.h (pass_signals, decode_address_to_semicolon): New.
16793
000ef4f0
DJ
167942006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16795
16796 * server.c (handle_query): Correct error handling for read_auxv.
16797
b7149293
UW
167982005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16799
16800 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16801 and srv_linux_thread_db to yes.
16802 * linux-s390-low.c (s390_fill_gregset): New function.
16803 (target_regsets): Define data structure.
16804
dae5f5cf
DJ
168052006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16806
16807 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16808 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16809 * config.in, configure: Regenerated.
16810 * inferiors.c (gdb_id_to_thread): New function.
16811 (gdb_id_to_thread_id): Use it.
16812 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16813 * linux-low.h (struct process_info): Add th member.
16814 (thread_db_get_tls_address): New prototype.
16815 * remote-utils.c (decode_address): Make non-static.
16816 * server.c (handle_query): Handle qGetTLSAddr.
16817 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16818 * target.h (struct target_ops): Add get_tls_address.
16819 * thread-db.c (maybe_attach_thread): Save the thread handle.
16820 (thread_db_get_tls_address): New.
16821
32ca6d61
DJ
168222006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16823
16824 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16825 (linux_resume_one_process): Take a siginfo_t *. Update all
16826 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16827 (struct pending_signals): Add a siginfo_t.
16828 (linux_wait_for_process): Always set last_status.
16829 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16830 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16831 * linux-low.h (struct process_info): Add last_status.
16832
5ffff7c1
DJ
168332006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16834
16835 * remote-utils.c (try_rle): New function.
16836 (putpkt_binary): Use it.
16837
8695c747
DJ
168382006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16839
16840 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16841 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16842 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16843 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16844 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16845 point registers.
16846
290fadea
RS
168472006-08-08 Richard Sandiford <richard@codesourcery.com>
16848
16849 * server.c (terminal_fd): New variable.
16850 (old_foreground_pgrp): Likewise.
16851 (restore_old_foreground_pgrp): New function.
16852 (start_inferior): Record the terminal file descriptor in terminal_fd
16853 and its original foreground group in old_foreground_pgrp. Register
16854 restore_old_foreground_pgrp with atexit().
16855
9f2e1e63
DJ
168562006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16857
16858 * server.c (handle_query): Correct qPart to qXfer.
16859
b80864fb
DJ
168602006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16861
16862 * configure.ac: Check for more headers which are missing on
16863 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16864 * configure.srv: Add Cygwin and mingw32.
16865 * remote-utils.c: Don't include headers unconditionally which
16866 are missing on mingw32. Include <winsock.h> for mingw32.
16867 (remote_open): Adjust for mingw32 support. Flush
16868 standard error after writing to it.
16869 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16870 (unblock_async_io, enable_async_io, disable_async_io)
16871 (readchar, getpkt): Update for Winsock support.
16872 (prepare_resume_reply): Expect a protocol signal number.
16873 * server.c: Disable <sys/wait.h> on mingw32.
16874 (start_inferior): Adjust for mingw32 support. Flush
16875 standard error after writing to it.
16876 (attach_inferior): Likewise. Use protocol signal
16877 numbers.
16878 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16879 and names.
16880 * win32-i386-low.c: New file.
16881 * Makefile.in (XM_CLIBS): Set.
16882 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16883 (win32-i386-low.o): New dependency rule.
16884 * linux-low.c (linux_wait): Use target signal numbers.
16885 * target.h (struct target_ops): Doc fix.
16886 * server.h (target_signal_to_name): New prototype.
16887 * gdbreplay.c: Don't include headers unconditionally which
16888 are missing on mingw32. Include <winsock.h> for mingw32.
16889 (remote_close, remote_open): Adjust for Winsock support.
16890 * configure, config.in: Regenerated.
16891
0876f84a
DJ
168922006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16893
16894 * server.c (decode_xfer_read, write_qxfer_response): New.
16895 (handle_query): Take a packet length argument. Handle
16896 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16897 the qSupported response.
16898 (main): Update call to handle_query.
16899
01f9e8fa
DJ
169002006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16901
16902 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16903 (putpkt_binary): Renamed from putpkt and adjusted for binary
16904 data.
16905 (putpkt): New wrapper for putpkt_binary.
16906 (readchar): Don't mask off the high bit.
16907 (decode_X_packet): New function.
16908 * server.c (main): Call putpkt_binary if a handler sets the packet
16909 length. Save the length of the incoming packet. Handle 'X'.
16910 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16911
be2a5f71
DJ
169122006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16913
16914 * server.c (handle_query): Handle qSupported.
16915
ea025f5f
DJ
169162006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16917
16918 * remote-utils.c (all_symbols_looked_up): New variable.
16919 (look_up_one_symbol): Check it.
16920 * server.h (look_up_one_symbol): New declaration.
16921 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16922
9308fc88
DJ
169232006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16924
16925 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16926 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16927 (PTRACE_GET_THREAD_AREA): Define.
16928 (ps_get_thread_area): New function.
16929
52fb6437
NS
169302006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16931
16932 * configure.srv (m68k*-*-uclinux*): New target.
16933 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16934 (linux_resume_one_process): Remove extraneous cast.
16935 (linux_read_offsets): New.
16936 (linux_target_op): Add linux_read_offsets on mmuless systems.
16937 * server.c (handle_query): Add qOffsets logic.
16938 * target.h (struct target_ops): Add read_offsets.
16939
21b0f40c
DJ
169402006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16941
16942 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16943 (PTRACE_GET_THREAD_AREA): Define.
16944 (ps_get_thread_area): New function.
16945 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16946 (linux-x86-64-low.o): Update.
16947
0050a760
DJ
169482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16949
16950 * configure.ac: Remove checks for prfpregset_t.
16951 * gdb_proc_service.h: New file.
16952 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16953 new "gdb_proc_service.h".
16954 * proc-service.c: Likewise.
16955 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16956 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16957 * Makefile.in (gdb_proc_service_h): Updated.
16958 * configure, config.in: Regenerated.
16959
b92a518e
DJ
169602006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16961
16962 * remote-utils.c (prepare_resume_reply): Move declaration
16963 of gdb_id_from_wait to the top of the block.
16964
545587ee
DJ
169652006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16966
16967 * linux-low.c (regsets_store_inferior_registers): Read the regset
16968 from the target before filling it.
16969
9db87ebd
DJ
169702006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16971
16972 * server.c (attach_inferior): Return SIGTRAP for a successful
16973 attach.
16974
dd24457d
DJ
169752006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16976
16977 * Makefile.in (OBS): Add version.o.
16978 (STAGESTUFF): Delete.
16979 (version.o): Add dependencies.
16980 (version.c): Replace rule.
16981 (clean): Remove version.c.
16982 * server.c (gdbserver_version): New.
16983 (gdbserver_usage): Use printf.
16984 (main): Handle --version and --help.
16985 * server.h (version, host_name): Add declarations.
16986
6f0f660e
EZ
169872005-12-23 Eli Zaretskii <eliz@gnu.org>
16988
889bf7c5
PA
16989 * linux-arm-low.c:
16990 * linux-arm-low.c:
16991 * inferiors.c:
16992 * i387-fp.h:
16993 * i387-fp.c:
16994 * gdbreplay.c:
16995 * regcache.c:
16996 * proc-service.c:
16997 * mem-break.h:
16998 * mem-break.c:
16999 * linux-x86-64-low.c:
17000 * linux-sh-low.c:
17001 * linux-s390-low.c:
17002 * linux-ppc64-low.c:
17003 * linux-ppc-low.c:
17004 * linux-mips-low.c:
17005 * linux-m68k-low.c:
17006 * linux-m32r-low.c:
17007 * linux-low.h:
17008 * linux-low.c:
17009 * linux-ia64-low.c:
17010 * linux-i386-low.c:
17011 * linux-crisv32-low.c:
17012 * thread-db.c:
17013 * terminal.h:
17014 * target.h:
17015 * target.c:
17016 * server.h:
17017 * server.c:
17018 * remote-utils.c:
17019 * regcache.h:
17020 * utils.c:
17021 * Makefile.in:
17022 * configure.ac:
6f0f660e
EZ
17023 * gdbserver.1: Add (C) after Copyright. Update the FSF
17024 address.
17025
9d1fb177
DJ
170262005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17027
17028 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17029 (arm_breakpoint_at): Recognize both breakpoints.
17030 (the_low_target): Use the correct breakpoint instruction.
17031
011a70c2
DJ
170322005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17033
17034 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17035 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17036 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17037 (the_low_target): Update.
17038
7fb85e41
AS
170392005-10-25 Andreas Schwab <schwab@suse.de>
17040
17041 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17042
17043 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17044 (ia64_num_regs): Reduce to 462.
17045
3db0444b
DJ
170462005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17047
17048 * acinclude.m4: Correct quoting.
17049 * aclocal.m4: Regenerated.
17050
17051 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17052 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17053 (thread_db_init): Call thread_db_err_str.
17054 * configure.ac: Check for TD_VERSION.
17055 * config.in, configure: Regenerated.
17056
bee0189a
DJ
170572005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17058
17059 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17060
e9d25b98
DJ
170612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17062
17063 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17064 is not available. Define HAVE_PTRACE_GETREGS if it is.
17065 * config.in, configure: Regenerated.
17066 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17067 * linux-i386-low.c, linux-m68k-low.c: Update to use
17068 HAVE_PTRACE_GETREGS.
17069 * linux-low.c (regsets_fetch_inferior_registers)
17070 (regsets_store_inferior_registers): Only return 0 if we processed
17071 GENERAL_REGS.
17072 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17073 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17074
a06660f7
DJ
170752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17076
17077 * inferiors.c (struct thread_info): Add gdb_id.
17078 (add_thread): Add gdb_id argument.
17079 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17080 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17081 calls to add_thread.
17082 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17083 * server.c (handle_query): Use thread_to_gdb_id.
17084 (handle_v_cont, main): Use gdb_id_to_thread_id.
17085 * server.h (add_thread): Update prototype.
17086 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17087 prototypes.
17088
5a1f5858
DJ
170892005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17090
17091 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17092 left-padded registers.
17093 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17094 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17095
e122f1f5
SE
170962005-07-01 Steve Ellcey <sje@cup.hp.com>
17097
17098 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17099 * configure: Regenerate.
17100 * config.in: Regenerate.
17101 * server.h (NEED_DECLARATION_STRERROR):
17102 Replace with !HAVE_DECL_STRERROR.
17103
d592fa2f
DJ
171042005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17105
17106 * linux-low.c (linux_wait, linux_send_signal): Don't test
17107 an unsigned long variable for > 0 if it could be MAX_ULONG.
17108 * server.c (myresume): Likewise.
17109 * target.c (set_desired_inferior): Likewise.
17110
ccbd4912
MK
171112005-06-13 Mark Kettenis <kettenis@gnu.org>
17112
17113 * configure.ac: Simplify and improve check for socklen_t.
17114 * configure, config.in: Regenerate.
17115
f450004a
DJ
171162005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17117
17118 * acconfig.h: Remove.
17119 * configure.ac: Add a test for socklen_t. Use three-argument
17120 AC_DEFINE throughout.
17121 * config.in: Regenerated using autoheader 2.59.
17122 * configure: Regenerated.
17123
17124 * gdbreplay.c (socklen_t): Provide a default.
17125 (remote_open): Use socklen_t.
17126 * remote-utils.c (socklen_t): Provide a default.
17127 (remote_open): Use socklen_t.
17128 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17129 unsigned char.
17130
17131 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17132 char for buffers.
17133 * linux-low.c (linux_read_memory, linux_write_memory)
17134 (linux_read_auxv): Likewise.
17135 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17136 (check_mem_write): Likewise.
17137 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17138 Likewise.
17139 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17140 (registers_from_string, register_data): Likewise.
17141 * server.c (handle_query, main): Likewise.
17142 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17143 (decode_M_packet): Likewise.
17144 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17145 * target.h (struct target_ops): Update read_memory, write_memory,
17146 and read_auxv.
17147 (read_inferior_memory, write_inferior_memory): Update.
17148 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17149 to unsigned char *.
17150 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17151 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17152 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17153 linux-s390-low.c, linux-sh-low.c: Update for changes in
17154 read_inferior_memory and the_low_target->breakpoint.
17155
eee84df1
DJ
171562005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17157
17158 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17159 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17160 * configure.srv: Add powerpc64-*-linux*.
17161 * linux-ppc64-low.c: New file.
17162
45b134e5
OF
171632005-05-23 Orjan Friberg <orjanf@axis.com>
17164
17165 * linux-cris-low.c: New file with support for CRIS.
17166 * linux-crisv32-low.c: Ditto for CRISv32.
17167 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17168 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17169 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17170 reg-crisv32.o, and reg-crisv32.c to make rules.
17171 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17172 recognized targets.
17173
48d93c75
UW
171742005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17175
17176 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17177 of sizeof (PTRACE_XFER_TYPE).
17178 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17179
e013ee27
OF
171802005-05-12 Orjan Friberg <orjanf@axis.com>
17181
889bf7c5 17182 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17183 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17184 pointers for hardware watchpoint support.
17185 * linux-low.h (struct linux_target_ops): Ditto.
17186 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17187 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17188 to linux_target_ops.
17189 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17190 reply packet.
17191 * server.c (main): Recognize 'Z' and 'z' packets.
17192
b0ded00b
UW
171932005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17194
17195 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17196 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17197 (the_low_target): Add new members.
17198
8643e2ad
DJ
171992005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17200
17201 * proc-service.c (ps_lgetregs): Search all_processes instead of
17202 all_threads.
17203
fc620387
DJ
172042005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17205
17206 * server.c (start_inferior): Change return type to int.
17207 (attach_inferior): Change sigptr to int *.
17208 (handle_v_cont, handle_v_requests): Change signal to int *.
17209 (main): Change signal to int.
17210
172112005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17212
17213 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17214 * configure.srv: Add m32r*-*-linux*.
17215 * linux-m32r-low.c: New file.
17216
e0e76420
DJ
172172005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17218
17219 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17220
a1928bad
DJ
172212005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17222
17223 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17224 Take unsigned long arguments for PIDs.
17225 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17226 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17227 (wait_for_sigstop, linux_resume_one_process)
17228 (regsets_fetch_inferior_registers, linux_send_signal)
17229 (linux_read_auxv): Likewise. Update the types of variables holding
17230 PIDs. Update format string specifiers.
17231 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17232 * remote-utils.c (prepare_resume_reply): Likewise.
17233 * server.c (cont_thread, general_thread, step_thread)
17234 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17235 unsigned long.
17236 (handle_query): Update format specifiers.
17237 (handle_v_cont, main): Use strtoul for thread IDs.
17238 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17239 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17240 (general_thread, step_thread, thread_from_wait)
17241 (old_thread_from_wait): Update.
17242 * target.h (struct thread_resume): Use unsigned long for THREAD.
17243 (struct target_ops): Use unsigned long for arguments to attach and
17244 thread_alive.
17245
dcdb98d2
DJ
172462005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17247
17248 * acinclude.m4: Include bfd/bfd.m4 directly.
17249 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17250 <agriffis@toolchain.org>.
17251 * aclocal.m4, configure: Regenerated.
17252
bec39cab
AC
172532005-01-07 Andrew Cagney <cagney@gnu.org>
17254
17255 * configure.ac: Rename configure.in, require autoconf 2.59.
17256 * configure: Re-generate.
17257
434c4c77
DJ
172582004-12-08 Daniel Jacobowitz <dan@debian.org>
17259
17260 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17261 LIBS when finished.
17262 * aclocal.m4: Regenerated.
17263 * configure: Regenerated.
17264
db1d3e1b
AS
172652004-11-21 Andreas Schwab <schwab@suse.de>
17266
17267 * linux-m68k-low.c (m68k_num_gregs): Define.
17268 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17269 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17270 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17271 (m68k_breakpoint_at): New. Add to the_low_target.
17272
17273 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17274 srv_linux_thread_db to yes.
17275
43360365
JB
172762004-10-20 Joel Brobecker <brobecker@gnat.com>
17277
17278 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17279 (ARCH_SET_FS): Likewise.
17280 (ARCH_GET_FS): Likewise.
17281 (ARCH_GET_GS): Likewise.
17282
fd500816
DJ
172832004-10-16 Daniel Jacobowitz <dan@debian.org>
17284
17285 * linux-i386-low.c (ps_get_thread_area): New.
17286 * linux-x86-64-low.c (ps_get_thread_area): New.
17287 * linux-low.c: Include <sys/syscall.h>.
17288 (linux_kill_one_process): Don't kill the first thread here.
17289 (linux_kill): Kill the first thread here.
17290 (kill_lwp): New function.
17291 (send_sigstop, linux_send_signal): Use it.
17292 * proc-service.c: Clean up #ifdefs.
17293 (fpregset_info): Delete.
17294 (ps_lgetregs): Update and enable implementation.
17295 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17296 implementations.
17297 * remote-utils.c (struct sym_cache, symbol_cache): New.
17298 (input_interrupt): Print a clearer message.
17299 (async_io_enabled): New variable.
17300 (enable_async_io, disable_async_io): Use it. Update comments.
17301 (look_up_one_symbol): Use the symbol cache.
17302 * thread-db.c (thread_db_look_up_symbols): New function.
17303 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17304
f6de3c42
DJ
173052004-10-16 Daniel Jacobowitz <dan@debian.org>
17306
17307 * configure.in: Test for -rdynamic.
17308 * configure: Regenerated.
17309 * Makefile (INTERNAL_LDFLAGS): New.
17310 (gdbserver, gdbreplay): Use it.
17311
2c0fc042
AC
173122004-09-02 Andrew Cagney <cagney@gnu.org>
17313
17314 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17315
075b3282
DJ
173162004-03-23 Daniel Jacobowitz <drow@mvista.com>
17317
17318 * linux-low.c (linux_wait): Clear all_processes list also.
17319
fa6a77dc
DJ
173202004-03-12 Daniel Jacobowitz <drow@mvista.com>
17321
17322 * linux-low.c: Include <errno.h>. Remove extern declaration of
17323 errno.
17324
6d782a97
DJ
173252004-03-12 Daniel Jacobowitz <drow@mvista.com>
17326
17327 * gdbreplay.c, server.h, utils.c: Update copyright years.
17328
3a7fb99b
DJ
173292004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17330
17331 * server.c (main): Print child status or termination signal from
17332 variable 'signal', not 'sig'.
17333
c3e735a6
DJ
173342004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17335
17336 * linux-low.c (linux_read_memory): Change return type to
17337 int. Check for and return error from ptrace().
17338 * target.c (read_inferior_memory): Change return type to int. Pass
17339 back return status from the_target->read_memory().
17340 * target.h (struct target_ops): Adapt *read_memory() prototype.
17341 Update comment.
17342 (read_inferior_memory): Adapt prototype.
17343 * server.c (main): Return an error packet if
17344 read_inferior_memory() returns an error.
17345
a59d1c82
DJ
173462004-03-04 Daniel Jacobowitz <drow@mvista.com>
17347
17348 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17349 Unify with other clean targets.
17350
dc3f8883
DJ
173512004-02-29 Daniel Jacobowitz <drow@mvista.com>
17352
17353 * server.c (handle_v_cont): Call set_desired_inferior.
17354
89a208da
DJ
173552004-02-29 Daniel Jacobowitz <drow@mvista.com>
17356
17357 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17358
62ea82f5
DJ
173592004-02-29 Daniel Jacobowitz <drow@mvista.com>
17360
17361 * linux-low.c (linux_wait): Unblock async I/O.
17362 (linux_resume): Block and enable async I/O.
17363 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17364 * server.h (block_async_io, unblock_async_io): Add prototypes.
17365
6910d122
DJ
173662004-02-29 Daniel Jacobowitz <drow@mvista.com>
17367
17368 * remote-utils.c (remote_open): Print a status notice after
17369 opening a TCP port.
17370 * server.c (attach_inferior): Print a status notice after
17371 attaching.
17372
173732004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17374
17375 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17376
c89dc5d4
DJ
173772004-02-26 Daniel Jacobowitz <drow@mvista.com>
17378
17379 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17380 error packet.
17381 * server.c, target.h: Update copyright years.
17382
4b8dad4a
RM
173832004-02-25 Roland McGrath <roland@redhat.com>
17384
17385 * target.h (struct target_ops): New member `read_auxv'.
17386 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17387 * linux-low.c (linux_read_auxv): New function.
17388 (linux_target_ops): Initialize `read_auxv' member to that.
17389
d7446758
JB
173902004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17391
17392 Committed by Jim Blandy <jimb@redhat.com>.
17393
17394 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17395 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17396 instead of GPR_SIZE to distiguish s390 and s390x targets.
17397
5544ad89
DJ
173982004-01-31 Daniel Jacobowitz <drow@mvista.com>
17399
17400 * linux-low.c: Update copyright year.
17401 (check_removed_breakpoint): Clear pending_is_breakpoint.
17402 (linux_set_resume_request, linux_queue_one_thread)
17403 (resume_status_pending_p): New functions.
17404 (linux_continue_one_thread): Use process->resume.
17405 (linux_resume): Only resume threads if there are no pending events.
17406 * linux-low.h (struct process_info): Add resume request
17407 pointer.
17408
2a68b70e
DJ
174092004-01-30 Daniel Jacobowitz <drow@mvista.com>
17410
17411 * regcache.c (new_register_cache): Clear the allocated register
17412 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17413
64386c31
DJ
174142003-10-13 Daniel Jacobowitz <drow@mvista.com>
17415
17416 * linux-low.c (linux_resume): Take a struct thread_resume *
17417 argument.
17418 (linux_wait): Update call.
17419 (resume_ptr): New static variable.
17420 (linux_continue_one_thread): Renamed from
17421 linux_continue_one_process. Use resume_ptr.
17422 (linux_resume): Use linux_continue_one_thread.
17423 * server.c (handle_v_cont, handle_v_requests): New functions.
17424 (myresume): New function.
17425 (main): Handle 'v' case.
17426 * target.h (struct thread_resume): New type.
17427 (struct target_ops): Change argument of "resume" to struct
17428 thread_resume *.
17429 (myresume): Delete macro.
17430
c938e9b0
L
174312003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17432
17433 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17434 (uninstall): Support DESTDIR.
17435
7f313d07
BC
17436Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17437
17438 * configure.srv: Add xscale*linux copy of arm*linux entry.
17439
3b2fc2ea
DJ
174402003-07-24 Daniel Jacobowitz <drow@mvista.com>
17441
17442 * linux-arm-low.c (arm_reinsert_addr): New function.
17443 (the_low_target): Add arm_reinsert_addr.
17444
1c0a559e
MK
174452003-07-08 Mark Kettenis <kettenis@gnu.org>
17446
17447 * mem-break.c: Remove whitespace at end of file.
17448
43d5792c
DJ
174492003-06-28 Daniel Jacobowitz <drow@mvista.com>
17450
17451 * configure.in: Check whether we need to prototype strerror.
17452 * server.h: Optionally prototype strerror.
17453 * gdbreplay.c (perror_with_name): Use strerror.
17454 * linux-low.c (linux_attach_lwp): Use strerror.
17455 * utils.c (perror_with_name): Use strerror.
17456 * config.in, configure: Regenerated.
17457
c8a86edf
DJ
174582003-06-28 Daniel Jacobowitz <drow@mvista.com>
17459
17460 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17461 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17462
73d37363
DJ
174632003-06-20 Daniel Jacobowitz <drow@mvista.com>
17464
17465 * Makefile.in (SFILES): Update.
17466 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17467 low-sun3.c: Remove files.
17468
6ad8ae5c
DJ
174692003-06-17 Daniel Jacobowitz <drow@mvista.com>
17470
17471 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17472 (linux_detach_one_process, linux_detach): New functions.
17473 (linux_target_ops): Add linux_detach.
17474 * server.c (main): Handle 'D' packet.
17475 * target.h (struct target_ops): Add "detach" member.
17476 (detach_inferior): Define.
17477
1581182a
MK
174782003-06-13 Mark Kettenis <kettenis@gnu.org>
17479
17480 From Kelley Cook <kelleycook@wideopenwest.com>:
17481 * configure.srv: Accept i[34567]86 variants.
17482
e5379b03
DJ
174832003-06-05 Daniel Jacobowitz <drow@mvista.com>
17484
17485 * linux-low.c (linux_wait_for_event): Correct comment typos.
17486 (linux_resume_one_process): Call check_removed_breakpoint.
17487 (linux_send_signal): New function.
17488 (linux_target_ops): Add linux_send_signal.
17489 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17490 of kill.
17491 * target.h (struct target_ops): Add send_signal.
17492
2ff29de4
JB
174932003-05-29 Jim Blandy <jimb@redhat.com>
17494
17495 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17496 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17497 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17498 away part of the register's value.
17499
254787d4
DJ
175002003-03-26 Daniel Jacobowitz <drow@mvista.com>
17501
17502 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17503 (linux_wait_for_event, linux_init_signals): Likewise.
17504
94e10508
DJ
175052003-03-17 Daniel Jacobowitz <drow@mvista.com>
17506
17507 * configure.in: Check for stdlib.h.
17508 * configure: Regenerated.
17509 * config.in: Regenerated.
17510
4c0711e0
DJ
175112003-01-04 Andreas Schwab <schwab@suse.de>
17512
17513 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17514
ef66e766
AC
175152003-01-02 Andrew Cagney <ac131313@redhat.com>
17516
17517 * Makefile.in: Remove obsolete code.
17518
a1358604
DJ
175192002-11-20 Daniel Jacobowitz <drow@mvista.com>
17520
17521 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17522 defined(PT_FPR0_HI).
17523
23ce3b1c
DJ
175242002-11-17 Stuart Hughes <seh@zee2.com>
17525
17526 * linux-arm-low.c (arm_num_regs): Increase.
17527 (arm_regmap): Include status register.
17528
175292002-11-17 Daniel Jacobowitz <drow@mvista.com>
17530
17531 * linux-low.c (register_addr): Remove incorrect -1 check.
17532
a9fa9f7d
DJ
175332002-08-29 Daniel Jacobowitz <drow@mvista.com>
17534
17535 * linux-low.c (linux_create_inferior): Call setpgid. Return
17536 the new PID.
17537 (unstopped_p, linux_signal_pid): Remove.
17538 (linux_target_ops): Remove linux_signal_pid.
17539 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17540 global instead of target method.
17541 * target.h (struct target_ops): Remove signal_pid. Update comment
17542 for create_inferior.
17543 * server.c (signal_pid): New variable.
17544 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17545 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17546 (attach_inferior): Set signal_pid.
17547
17574093
DJ
175482002-08-23 Daniel Jacobowitz <drow@mvista.com>
17549
17550 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17551
175522002-08-20 Jim Blandy <jimb@redhat.com>
17553
17554 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17555 default for this.
17556
175572002-08-01 Andrew Cagney <cagney@redhat.com>
17558
17559 * Makefile.in: Make chill references obsolete.
17560
175612002-07-24 Kevin Buettner <kevinb@redhat.com>
17562
17563 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17564 * configure: Regenerate.
17565 * config.in: Regenerate.
17566
175672002-07-09 David O'Brien <obrien@FreeBSD.org>
17568
17569 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17570 (perror_with_name, remote_close, remote_open, expect, play): Static.
17571
175722002-07-04 Michal Ludvig <mludvig@suse.cz>
17573
4b8dad4a 17574 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17575 byte offsets instead of an array of indexes.
17576 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17577
175782002-06-13 Daniel Jacobowitz <drow@mvista.com>
17579
17580 * regcache.c: Add comment.
17581
175822002-06-11 Daniel Jacobowitz <drow@mvista.com>
17583
17584 * thread-db.c: New file.
17585 * proc-service.c: New file.
17586 * acinclude.m4: New file.
17587 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17588 proc-service.o, and thread-db.o.
17589 (linux-low.o): Add USE_THREAD_DB.
17590 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17591 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17592 * aclocal.m4: Regenerated.
17593 * config.in: Regenerated.
17594 * configure: Regenerated.
17595 * configure.in: Check for proc_service.h, sys/procfs.h,
17596 thread_db.h, and linux/elf.h headrs.
17597 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17598 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17599 Check for -lthread_db and thread support.
17600 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17601 PowerPC, and SuperH.
17602 * i387-fp.c: Constify arguments.
17603 * i387-fp.h: Likewise.
17604 * inferiors.c: (struct thread_info): Renamed from
17605 `struct inferior_info'. Remove PID member. Use generic inferior
17606 list header. All uses updated.
17607 (inferiors, signal_pid): Removed.
17608 (all_threads): New variable.
17609 (get_thread): Define.
17610 (add_inferior_to_list): New function.
17611 (for_each_inferior): New function.
17612 (change_inferior_id): New function.
17613 (add_inferior): Removed.
17614 (remove_inferior): New function.
17615 (add_thread): New function.
17616 (free_one_thread): New function.
17617 (remove_thread): New function.
17618 (clear_inferiors): Use for_each_inferior and free_one_thread.
17619 (find_inferior): New function.
17620 (find_inferior_id): New function.
17621 (inferior_target_data): Update argument type.
17622 (set_inferior_target_data): Likewise.
17623 (inferior_regcache_data): Likewise.
17624 (set_inferior_regcache_data): Likewise.
17625 * linux-low.c (linux_bp_reinsert): Remove.
17626 (all_processes, stopping_threads, using_thrads)
17627 (struct pending_signals, debug_threads, pid_of): New.
17628 (inferior_pid): Replace with macro.
17629 (struct inferior_linux_data): Remove.
17630 (get_stop_pc, add_process): New functions.
17631 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17632 Use add_process and add_thread.
17633 (linux_attach_lwp): New function, based on old linux_attach. Use
17634 add_process and add_thread. Set stop_expected for new threads.
17635 (linux_attach): New function.
17636 (linux_kill_one_process): New function.
17637 (linux_kill): Kill all LWPs.
17638 (linux_thread_alive): Use find_inferior_id.
17639 (check_removed_breakpoints, status_pending_p): New functions.
17640 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17641 Update. Use WNOHANG. Wait for cloned processes also. Update process
17642 struct for the found process.
17643 (linux_wait_for_event): New function.
17644 (linux_wait): Use it. Support LWPs.
17645 (send_sigstop, wait_for_sigstop, stop_all_processes)
17646 (linux_resume_one_process, linux_continue_one_process): New functions.
17647 (linux_resume): Support LWPs.
17648 (REGISTER_RAW_SIZE): Remove.
17649 (fetch_register): Use register_size instead. Call supply_register.
17650 (usr_store_inferior_registers): Likewise. Call collect_register.
17651 Fix recursive case.
17652 (regsets_fetch_inferior_registers): Improve error message.
17653 (regsets_store_inferior_registers): Add debugging.
17654 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17655 (unstopped_p, linux_signal_pid): New functions.
17656 (linux_target_ops): Add linux_signal_pid.
17657 (linux_init_signals): New function.
17658 (initialize_low): Call it. Initialize using_threads.
17659 * regcache.c (inferior_regcache_data): Add valid
17660 flag.
17661 (get_regcache): Fetch registers lazily. Add fetch argument
17662 and update all callers.
17663 (regcache_invalidate_one, regcache_invalidate): New
17664 functions.
17665 (new_register_cache): Renamed from create_register_cache.
17666 Return the new regcache.
17667 (free_register_cache): Change argument to a void *.
17668 (registers_to_string, registers_from_string): Call get_regcache
17669 with fetch flag set.
17670 (register_data): Make static. Pass fetch flag to get_regcache.
17671 (supply_register): Call get_regcache with fetch flag clear.
17672 (collect_register): Call get_regcache with fetch flag set.
17673 (collect_register_as_string): New function.
17674 * regcache.h: Update.
17675 * remote-utils.c (putpkt): Flush after debug output and use
17676 stderr.
17677 Handle input interrupts while waiting for an ACK.
17678 (input_interrupt): Use signal_pid method.
17679 (getpkt): Flush after debug output and use stderr.
17680 (outreg): Use collect_register_as_string.
17681 (new_thread_notify, dead_thread_notify): New functions.
17682 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17683 and general_thread.
17684 (look_up_one_symbol): Flush after debug output.
17685 * server.c (step_thread, server_waiting): New variables.
17686 (start_inferior): Don't use signal_pid. Update call to mywait.
17687 (attach_inferior): Update call to mywait.
17688 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17689 (main): Don't fetch/store registers explicitly. Use
17690 set_desired_inferior. Support proposed ``Hs'' packet. Update
17691 calls to mywait.
17692 * server.h: Update.
17693 (struct inferior_list, struct_inferior_list_entry): New.
17694 * target.c (set_desired_inferior): New.
17695 (write_inferior_memory): Constify.
17696 (mywait): New function.
17697 * target.h: Update.
17698 (struct target_ops): New signal_pid method.
17699 (mywait): Removed macro, added prototype.
17700
17701 * linux-low.h (regset_func): Removed.
17702 (regset_fill_func, regset_store_func): New.
17703 (enum regset_type): New.
17704 (struct regset_info): Add type field. Use new operation types.
17705 (struct linux_target_ops): stop_pc renamed to get_pc.
17706 Add decr_pc_after_break and breakpoint_at.
17707 (get_process, get_thread_proess, get_process_thread)
17708 (strut process_info, all_processes, linux_attach_lwp)
17709 (thread_db_init): New.
17710
17711 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17712 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17713 (the_low_target): Add new members.
17714 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17715 (i386_store_fpxregset): Constify.
17716 (target_regsets): Add new kind identifier.
17717 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17718 (i386_set_pc): Add debugging.
17719 (i386_breakpoint_at): New function.
17720 (the_low_target): Add new members.
17721 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17722 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17723 (mips_breakpoint_at): New.
17724 (the_low_target): Add new members.
17725 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17726 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17727 (the_low_target): Add new members.
17728 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17729 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17730 (the_low_target): Add new members.
17731 * linux-x86-64-low.c (target_regsets): Add new kind
17732 identifier.
17733
177342002-05-15 Daniel Jacobowitz <drow@mvista.com>
17735
17736 From Martin Pool <mbp@samba.org>:
17737 * server.c (gdbserver_usage): New function.
17738 (main): Call it.
17739
177402002-05-14 Daniel Jacobowitz <drow@mvista.com>
17741
17742 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17743 stop_at -> stop_pc.
17744
177452002-05-04 Andrew Cagney <ac131313@redhat.com>
17746
17747 * Makefile.in: Remove obsolete code.
17748
177492002-04-24 Michal Ludvig <mludvig@suse.cz>
17750
17751 * linux-low.c (regsets_fetch_inferior_registers),
17752 (regsets_store_inferior_registers): Removed cast to int from
17753 ptrace() calls.
17754 * regcache.h: Added declaration of struct inferior_info.
17755
177562002-04-20 Daniel Jacobowitz <drow@mvista.com>
17757
17758 * inferiors.c (struct inferior_info): Add regcache_data.
17759 (add_inferior): Call create_register_cache.
17760 (clear_inferiors): Call free_register_cache.
17761 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17762 * regcache.c (struct inferior_regcache_data): New.
17763 (registers): Remove.
17764 (get_regcache): New function.
17765 (create_register_cache, free_register_cache): New functions.
17766 (set_register_cache): Don't initialize the register cache here.
17767 (registers_to_string, registers_from_string, register_data): Call
17768 get_regcache.
17769 * regcache.h: Add prototypes.
17770 * server.h: Likewise.
17771
177722002-04-20 Daniel Jacobowitz <drow@mvista.com>
17773
17774 * mem-break.c: New file.
17775 * mem-break.h: New file.
17776 * Makefile.in: Add mem-break.o rule; update server.h
17777 dependencies.
17778 * inferiors.c (struct inferior_info): Add target_data
17779 member.
17780 (clear_inferiors): Free target_data member if set.
17781 (inferior_target_data, set_inferior_target_data): New functions.
17782 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17783 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17784 * linux-low.c (linux_bp_reinsert): New variable.
17785 (struct inferior_linux_data): New.
17786 (linux_create_inferior): Use set_inferior_target_data.
17787 (linux_attach): Likewise. Call add_inferior.
17788 (linux_wait_for_one_inferior): New function.
17789 (linux_wait): Call it.
17790 (linux_write_memory): Add const.
17791 (initialize_low): Call set_breakpoint_data.
17792 * linux-low.h (struct linux_target_ops): Add breakpoint
17793 handling members.
17794 * server.c (attach_inferior): Remove extra add_inferior
17795 call.
17796 * server.h: Include mem-break.h. Update inferior.c
17797 prototypes.
17798 * target.c (read_inferior_memory)
17799 (write_inferior_memory): New functions.
17800 * target.h (read_inferior_memory)
17801 (write_inferior_memory): Change macros to prototypes.
17802 (struct target_ops): Update comments. Add const to write_memory
17803 definition.
17804
178052002-04-11 Daniel Jacobowitz <drow@mvista.com>
17806
17807 * linux-low.c (usr_store_inferior_registers): Support
17808 registers which are allowed to fail to store.
17809 * linux-low.h (linux_target_ops): Likewise.
17810 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17811 (ppc_cannot_store_register): FPSCR may not be storable.
17812
178132002-04-09 Daniel Jacobowitz <drow@mvista.com>
17814
17815 * server.h: Include <string.h> if HAVE_STRING_H.
17816 * ChangeLog: Correct paths in last ChangeLog entry.
17817
178182002-04-09 Daniel Jacobowitz <drow@mvista.com>
17819
17820 * linux-low.h: Remove obsolete prototypes.
17821 (struct linux_target_ops): New.
17822 (extern the_low_target): New.
17823 * linux-low.c (num_regs, regmap): Remove declarations.
17824 (register_addr): Use the_low_target explicitly.
17825 (fetch_register): Likewise.
17826 (usr_fetch_inferior_registers): Likewise.
17827 (usr_store_inferior_registers): Likewise.
17828 * linux-arm-low.c (num_regs): Remove.
17829 (arm_num_regs): Define.
17830 (arm_regmap): Renamed from regmap, made static.
17831 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17832 made static.
17833 (arm_cannot_store_register): Renamed from cannot_store_register,
17834 made static.
17835 (the_low_target): New.
17836 * linux-i386-low.c (num_regs): Remove.
17837 (i386_num_regs): Define.
17838 (i386_regmap): Renamed from regmap, made static.
17839 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17840 made static.
17841 (i386_cannot_store_register): Renamed from cannot_store_register,
17842 made static.
17843 (the_low_target): New.
17844 * linux-ia64-low.c (num_regs): Remove.
17845 (ia64_num_regs): Define.
17846 (ia64_regmap): Renamed from regmap, made static.
17847 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17848 made static.
17849 (ia64_cannot_store_register): Renamed from cannot_store_register,
17850 made static.
17851 (the_low_target): New.
17852 * linux-m68k-low.c (num_regs): Remove.
17853 (m68k_num_regs): Define.
17854 (m68k_regmap): Renamed from regmap, made static.
17855 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17856 made static.
17857 (m68k_cannot_store_register): Renamed from cannot_store_register,
17858 made static.
17859 (the_low_target): New.
17860 * linux-mips-low.c (num_regs): Remove.
17861 (mips_num_regs): Define.
17862 (mips_regmap): Renamed from regmap, made static.
17863 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17864 made static.
17865 (mips_cannot_store_register): Renamed from cannot_store_register,
17866 made static.
17867 (the_low_target): New.
17868 * linux-ppc-low.c (num_regs): Remove.
17869 (ppc_num_regs): Define.
17870 (ppc_regmap): Renamed from regmap, made static.
17871 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17872 made static.
17873 (ppc_cannot_store_register): Renamed from cannot_store_register,
17874 made static.
17875 (the_low_target): New.
17876 * linux-s390-low.c (num_regs): Remove.
17877 (s390_num_regs): Define.
17878 (s390_regmap): Renamed from regmap, made static.
17879 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17880 made static.
17881 (s390_cannot_store_register): Renamed from cannot_store_register,
17882 made static.
17883 (the_low_target): New.
17884 * linux-sh-low.c (num_regs): Remove.
17885 (sh_num_regs): Define.
17886 (sh_regmap): Renamed from regmap, made static.
17887 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17888 made static.
17889 (sh_cannot_store_register): Renamed from cannot_store_register,
17890 made static.
17891 (the_low_target): New.
17892 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17893 (the_low_target): New.
17894
178952002-04-09 Daniel Jacobowitz <drow@mvista.com>
17896
17897 * Makefile.in: Add stamp-h target.
17898 * configure.in: Create stamp-h.
17899 * configure: Regenerated.
17900
179012002-04-09 Daniel Jacobowitz <drow@mvista.com>
17902
17903 * inferiors.c: New file.
17904 * target.c: New file.
17905 * target.h: New file.
17906 * Makefile.in: Add target.o and inferiors.o. Update
17907 dependencies.
17908 * linux-low.c (inferior_pid): New static variable,
17909 moved from server.c.
17910 (linux_create_inferior): Renamed from create_inferior.
17911 Call add_inferior. Return 0 on success instead of a PID.
17912 (linux_attach): Renamed from myattach.
17913 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17914 (linux_thread_alive): Renamed from mythread_alive.
17915 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17916 child dies.
17917 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17918 (regsets_store_inferior_registers): Correct error message.
17919 Add missing ``return 0''.
17920 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17921 (linux_store_registers): Renamed from store_inferior_registers.
17922 (linux_read_memory): Renamed from read_inferior_memory.
17923 (linux_write_memory): Renamed from write_inferior_memory.
17924 (linux_target_ops): New structure.
17925 (initialize_low): Call set_target_ops ().
17926 * remote-utils.c (unhexify): New function.
17927 (hexify): New function.
17928 (input_interrupt): Send signals to ``signal_pid''.
17929 * server.c (inferior_pid): Remove.
17930 (start_inferior): Update create_inferior call.
17931 (attach_inferior): Call add_inferior.
17932 (handle_query): New function.
17933 (main): Call handle_query for `q' packets.
17934 * server.h: Include "target.h". Remove obsolete prototypes.
17935 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17936
179372002-04-09 Daniel Jacobowitz <drow@mvista.com>
17938
17939 * Makefile.in: Add WARN_CFLAGS. Update configury
17940 dependencies.
17941 * configure.in: Check for <string.h>
17942 * configure: Regenerate.
17943 * config.in: Regenerate.
17944 * gdbreplay.c: Include needed system headers.
17945 (remote_open): Remove strchr prototype.
17946 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17947 * regcache.c (supply_register): Change buf argument to const void *.
17948 (supply_register_by_name): Likewise.
17949 (collect_register): Change buf argument to void *.
17950 (collect_register_by_name): Likewise.
17951 * regcache.h: Add missing prototypes.
17952 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17953 * server.c (handle_query): New function.
17954 (attached): New static variable, moved out of main.
17955 (main): Quiet longjmp clobber warnings.
17956 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17957 * utils.c (error): Remove NORETURN.
17958 (fatal): Likewise.
This page took 2.253206 seconds and 4 git commands to generate.